@devframes/plugin-a11y 0.0.0

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.
@@ -0,0 +1,12 @@
1
+ import { serverFunctions } from "../rpc/index.mjs";
2
+ import { DevframeNodeContext } from "devframe/types";
3
+
4
+ //#region src/node/index.d.ts
5
+ /**
6
+ * Register the a11y inspector's RPC functions on a devframe node context.
7
+ * Called from the definition's `setup(ctx)` and reusable by host adapters
8
+ * that wire their own context.
9
+ */
10
+ declare function setupA11y(ctx: DevframeNodeContext): void;
11
+ //#endregion
12
+ export { serverFunctions, setupA11y };
@@ -0,0 +1,12 @@
1
+ import { t as serverFunctions } from "../rpc-C13Bq70l.mjs";
2
+ //#region src/node/index.ts
3
+ /**
4
+ * Register the a11y inspector's RPC functions on a devframe node context.
5
+ * Called from the definition's `setup(ctx)` and reusable by host adapters
6
+ * that wire their own context.
7
+ */
8
+ function setupA11y(ctx) {
9
+ for (const fn of serverFunctions) ctx.rpc.register(fn);
10
+ }
11
+ //#endregion
12
+ export { serverFunctions, setupA11y };
@@ -0,0 +1,41 @@
1
+ //#region src/shared/protocol.d.ts
2
+ /** axe-core impact buckets, ordered most → least severe. */
3
+ declare const IMPACT_ORDER: readonly ["critical", "serious", "moderate", "minor"];
4
+ type Impact = (typeof IMPACT_ORDER)[number];
5
+ interface ViolationNode {
6
+ /** Stable id the agent assigned (mirrored to {@link A11Y_NODE_ATTR}). */
7
+ id: string;
8
+ /** axe target selector(s) that resolve to the element. */
9
+ target: string[];
10
+ /** Trimmed `outerHTML` of the element, for display. */
11
+ html: string;
12
+ /** axe's per-node failure summary. */
13
+ failureSummary: string;
14
+ }
15
+ interface Violation {
16
+ /** axe rule id, e.g. `"image-alt"`. */
17
+ ruleId: string;
18
+ impact: Impact;
19
+ /** One-line, human-facing summary of the rule. */
20
+ help: string;
21
+ /** Longer description of what the rule checks. */
22
+ description: string;
23
+ /** Deque University rule documentation. */
24
+ helpUrl: string;
25
+ /** WCAG tags the rule maps to, e.g. `["wcag2a", "wcag111"]`. */
26
+ tags?: string[];
27
+ nodes: ViolationNode[];
28
+ }
29
+ interface ScanReport {
30
+ /** Location of the scanned document. */
31
+ url: string;
32
+ /** Epoch ms the scan finished. */
33
+ scannedAt: number;
34
+ /** axe engine version that produced the report. */
35
+ engine: string;
36
+ violations: Violation[];
37
+ /** Total violating nodes per impact bucket. */
38
+ counts: Record<Impact, number>;
39
+ }
40
+ //#endregion
41
+ export { ViolationNode as i, ScanReport as n, Violation as r, Impact as t };
@@ -0,0 +1,130 @@
1
+ import * as _$devframe from "devframe";
2
+ import * as _$devframe_rpc0 from "devframe/rpc";
3
+ import { RpcDefinitionsToFunctions } from "devframe/rpc";
4
+
5
+ //#region src/rpc/index.d.ts
6
+ declare const serverFunctions: readonly [{
7
+ name: "devframe-a11y-inspector:get-config";
8
+ type?: "static" | undefined;
9
+ cacheable?: boolean;
10
+ args?: undefined;
11
+ returns?: undefined;
12
+ jsonSerializable?: boolean;
13
+ agent?: _$devframe.RpcFunctionAgentOptions;
14
+ setup?: ((context: _$devframe.DevframeNodeContext) => _$devframe_rpc0.Thenable<_$devframe_rpc0.RpcFunctionSetupResult<[], {
15
+ channel: string;
16
+ nodeAttr: string;
17
+ docsBase: string;
18
+ impacts: ({
19
+ label: "Critical";
20
+ blurb: "Blocks people with disabilities from using the page. Fix first.";
21
+ id: "critical" | "serious" | "moderate" | "minor";
22
+ } | {
23
+ label: "Serious";
24
+ blurb: "Severe barriers for some users; frustrating and often exclusionary.";
25
+ id: "critical" | "serious" | "moderate" | "minor";
26
+ } | {
27
+ label: "Moderate";
28
+ blurb: "Causes friction and confusion, though the page stays usable.";
29
+ id: "critical" | "serious" | "moderate" | "minor";
30
+ } | {
31
+ label: "Minor";
32
+ blurb: "Small annoyances and polish — worth clearing once the rest is done.";
33
+ id: "critical" | "serious" | "moderate" | "minor";
34
+ })[];
35
+ }>>) | undefined;
36
+ handler?: (() => {
37
+ channel: string;
38
+ nodeAttr: string;
39
+ docsBase: string;
40
+ impacts: ({
41
+ label: "Critical";
42
+ blurb: "Blocks people with disabilities from using the page. Fix first.";
43
+ id: "critical" | "serious" | "moderate" | "minor";
44
+ } | {
45
+ label: "Serious";
46
+ blurb: "Severe barriers for some users; frustrating and often exclusionary.";
47
+ id: "critical" | "serious" | "moderate" | "minor";
48
+ } | {
49
+ label: "Moderate";
50
+ blurb: "Causes friction and confusion, though the page stays usable.";
51
+ id: "critical" | "serious" | "moderate" | "minor";
52
+ } | {
53
+ label: "Minor";
54
+ blurb: "Small annoyances and polish — worth clearing once the rest is done.";
55
+ id: "critical" | "serious" | "moderate" | "minor";
56
+ })[];
57
+ }) | undefined;
58
+ dump?: _$devframe_rpc0.RpcDump<[], {
59
+ channel: string;
60
+ nodeAttr: string;
61
+ docsBase: string;
62
+ impacts: ({
63
+ label: "Critical";
64
+ blurb: "Blocks people with disabilities from using the page. Fix first.";
65
+ id: "critical" | "serious" | "moderate" | "minor";
66
+ } | {
67
+ label: "Serious";
68
+ blurb: "Severe barriers for some users; frustrating and often exclusionary.";
69
+ id: "critical" | "serious" | "moderate" | "minor";
70
+ } | {
71
+ label: "Moderate";
72
+ blurb: "Causes friction and confusion, though the page stays usable.";
73
+ id: "critical" | "serious" | "moderate" | "minor";
74
+ } | {
75
+ label: "Minor";
76
+ blurb: "Small annoyances and polish — worth clearing once the rest is done.";
77
+ id: "critical" | "serious" | "moderate" | "minor";
78
+ })[];
79
+ }, _$devframe.DevframeNodeContext> | undefined;
80
+ snapshot?: boolean;
81
+ __cache?: WeakMap<object, _$devframe_rpc0.Thenable<_$devframe_rpc0.RpcFunctionSetupResult<[], {
82
+ channel: string;
83
+ nodeAttr: string;
84
+ docsBase: string;
85
+ impacts: ({
86
+ label: "Critical";
87
+ blurb: "Blocks people with disabilities from using the page. Fix first.";
88
+ id: "critical" | "serious" | "moderate" | "minor";
89
+ } | {
90
+ label: "Serious";
91
+ blurb: "Severe barriers for some users; frustrating and often exclusionary.";
92
+ id: "critical" | "serious" | "moderate" | "minor";
93
+ } | {
94
+ label: "Moderate";
95
+ blurb: "Causes friction and confusion, though the page stays usable.";
96
+ id: "critical" | "serious" | "moderate" | "minor";
97
+ } | {
98
+ label: "Minor";
99
+ blurb: "Small annoyances and polish — worth clearing once the rest is done.";
100
+ id: "critical" | "serious" | "moderate" | "minor";
101
+ })[];
102
+ }>>> | undefined;
103
+ __promise?: _$devframe_rpc0.Thenable<_$devframe_rpc0.RpcFunctionSetupResult<[], {
104
+ channel: string;
105
+ nodeAttr: string;
106
+ docsBase: string;
107
+ impacts: ({
108
+ label: "Critical";
109
+ blurb: "Blocks people with disabilities from using the page. Fix first.";
110
+ id: "critical" | "serious" | "moderate" | "minor";
111
+ } | {
112
+ label: "Serious";
113
+ blurb: "Severe barriers for some users; frustrating and often exclusionary.";
114
+ id: "critical" | "serious" | "moderate" | "minor";
115
+ } | {
116
+ label: "Moderate";
117
+ blurb: "Causes friction and confusion, though the page stays usable.";
118
+ id: "critical" | "serious" | "moderate" | "minor";
119
+ } | {
120
+ label: "Minor";
121
+ blurb: "Small annoyances and polish — worth clearing once the rest is done.";
122
+ id: "critical" | "serious" | "moderate" | "minor";
123
+ })[];
124
+ }>> | undefined;
125
+ }];
126
+ declare module 'devframe' {
127
+ interface DevframeRpcServerFunctions extends RpcDefinitionsToFunctions<typeof serverFunctions> {}
128
+ }
129
+ //#endregion
130
+ export { serverFunctions };
@@ -0,0 +1,2 @@
1
+ import { t as serverFunctions } from "../rpc-C13Bq70l.mjs";
2
+ export { serverFunctions };
@@ -0,0 +1,71 @@
1
+ import { defineRpcFunction } from "devframe";
2
+ //#region src/shared/protocol.ts
3
+ /**
4
+ * Wire contract shared by the two browser-side halves of the a11y inspector:
5
+ *
6
+ * - the **agent** — injected into the host application's page, runs axe-core
7
+ * and owns the highlight overlay (`src/inject`);
8
+ * - the **panel** — the Solid SPA that lists violations (`src/client`).
9
+ *
10
+ * They talk over a same-origin {@link https://developer.mozilla.org/docs/Web/API/BroadcastChannel BroadcastChannel}
11
+ * rather than the devframe RPC backend. That keeps the live scan/highlight loop
12
+ * working identically whether the plugin is running as a dev server (WebSocket
13
+ * RPC) or as a baked static build — neither half needs a server to find the
14
+ * other, only a shared browser origin (host page + devtools iframe).
15
+ *
16
+ * devframe RPC still carries the data model on top of this: `get-config`
17
+ * (rule catalogue + impact metadata) is a `static` function, so it resolves
18
+ * live in dev and from the baked dump in a static build.
19
+ */
20
+ /** BroadcastChannel name. Namespaced with the devframe id, per convention. */
21
+ const A11Y_CHANNEL = "devframe-a11y-inspector";
22
+ /**
23
+ * Attribute the agent stamps on each violating element so the panel can ask
24
+ * for a stable target that survives re-scans and DOM reshuffles.
25
+ */
26
+ const A11Y_NODE_ATTR = "data-df-a11y-node";
27
+ /** axe-core impact buckets, ordered most → least severe. */
28
+ const IMPACT_ORDER = [
29
+ "critical",
30
+ "serious",
31
+ "moderate",
32
+ "minor"
33
+ ];
34
+ //#endregion
35
+ //#region src/rpc/functions/get-config.ts
36
+ const IMPACT_COPY = {
37
+ critical: {
38
+ label: "Critical",
39
+ blurb: "Blocks people with disabilities from using the page. Fix first."
40
+ },
41
+ serious: {
42
+ label: "Serious",
43
+ blurb: "Severe barriers for some users; frustrating and often exclusionary."
44
+ },
45
+ moderate: {
46
+ label: "Moderate",
47
+ blurb: "Causes friction and confusion, though the page stays usable."
48
+ },
49
+ minor: {
50
+ label: "Minor",
51
+ blurb: "Small annoyances and polish — worth clearing once the rest is done."
52
+ }
53
+ };
54
+ //#endregion
55
+ //#region src/rpc/index.ts
56
+ const serverFunctions = [defineRpcFunction({
57
+ name: "devframe-a11y-inspector:get-config",
58
+ type: "static",
59
+ jsonSerializable: true,
60
+ handler: () => ({
61
+ channel: A11Y_CHANNEL,
62
+ nodeAttr: A11Y_NODE_ATTR,
63
+ docsBase: "https://dequeuniversity.com/rules/axe/",
64
+ impacts: IMPACT_ORDER.map((id) => ({
65
+ id,
66
+ ...IMPACT_COPY[id]
67
+ }))
68
+ })
69
+ })];
70
+ //#endregion
71
+ export { serverFunctions as t };
@@ -0,0 +1,2 @@
1
+ (function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return t(this.context.count)},getNextContextId(){return t(this.context.count++)}};function t(t){let n=String(t),r=n.length-1;return e.context.id+(r?String.fromCharCode(96+r):``)+n}function n(t){e.context=t}function r(){return{...e.context,id:e.getNextContextId(),count:0}}var i=(e,t)=>e===t,a=Symbol(`solid-proxy`),o=typeof Proxy==`function`,s=Symbol(`solid-track`),c={equals:i},l=null,u=he,d=1,f=2,p={owned:null,cleanups:null,context:null,owner:null},m=null,h=null,g=null,_=null,v=null,y=null,b=null,ee=0;function te(e,t){let n=v,r=m,i=e.length===0,a=t===void 0?r:t,o=i?p:{owned:null,cleanups:null,context:a?a.context:null,owner:a},s=i?e:()=>e(()=>w(()=>E(o)));m=o,v=null;try{return T(s,!0)}finally{v=n,m=r}}function x(e,t){t=t?Object.assign({},c,t):c;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0};return[ce.bind(n),e=>(typeof e==`function`&&(e=h&&h.running&&h.sources.has(n)?e(n.tValue):e(n.value)),le(n,e))]}function S(e,t,n){let r=fe(e,t,!1,d);g&&h&&h.running?y.push(r):ue(r)}function C(e,t,n){n=n?Object.assign({},c,n):c;let r=fe(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,g&&h&&h.running?(r.tState=d,y.push(r)):ue(r),ce.bind(r)}function w(e){if(!_&&v===null)return e();let t=v;v=null;try{return _?_.untrack(e):e()}finally{v=t}}function ne(e){return m===null||(m.cleanups===null?m.cleanups=[e]:m.cleanups.push(e)),e}function re(e){if(h&&h.running)return e(),h.done;let t=v,n=m;return Promise.resolve().then(()=>{v=t,m=n;let r;return(g||se)&&(r=h||={sources:new Set,effects:[],promises:new Set,disposed:new Set,queue:new Set,running:!0},r.done||=new Promise(e=>r.resolve=e),r.running=!0),T(e,!1),v=m=null,r?r.done:void 0})}var[ie,ae]=x(!1);function oe(e){let t=C(e),n=C(()=>Ce(t()));return n.toArray=()=>{let e=n();return Array.isArray(e)?e:e==null?[]:[e]},n}var se;function ce(){let e=h&&h.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===d)ue(this);else{let e=y;y=null,T(()=>_e(this),!1),y=e}if(v){let e=this.observers;if(!e||e[e.length-1]!==v){let t=e?e.length:0;v.sources?(v.sources.push(this),v.sourceSlots.push(t)):(v.sources=[this],v.sourceSlots=[t]),e?(e.push(v),this.observerSlots.push(v.sources.length-1)):(this.observers=[v],this.observerSlots=[v.sources.length-1])}}return e&&h.sources.has(this)?this.tValue:this.value}function le(e,t,n){let r=h&&h.running&&h.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(h){let r=h.running;(r||!n&&h.sources.has(e))&&(h.sources.add(e),e.tValue=t),r||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&T(()=>{for(let t=0;t<e.observers.length;t+=1){let n=e.observers[t],r=h&&h.running;r&&h.disposed.has(n)||((r?!n.tState:!n.state)&&(n.pure?y.push(n):b.push(n),n.observers&&ve(n)),r?n.tState=d:n.state=d)}if(y.length>1e6)throw y=[],Error()},!1)}return t}function ue(e){if(!e.fn)return;E(e);let t=ee;de(e,h&&h.running&&h.sources.has(e)?e.tValue:e.value,t),h&&!h.running&&h.sources.has(e)&&queueMicrotask(()=>{T(()=>{h&&(h.running=!0),v=m=e,de(e,e.tValue,t),v=m=null},!1)})}function de(e,t,n){let r,i=m,a=v;v=m=e;try{r=e.fn(t)}catch(t){return e.pure&&(h&&h.running?(e.tState=d,e.tOwned&&e.tOwned.forEach(E),e.tOwned=void 0):(e.state=d,e.owned&&e.owned.forEach(E),e.owned=null)),e.updatedAt=n+1,Se(t)}finally{v=a,m=i}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&`observers`in e?le(e,r,!0):h&&h.running&&e.pure?(h.sources.has(e)||(e.value=r),h.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function fe(e,t,n,r=d,i){let a={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:m,context:m?m.context:null,pure:n};if(h&&h.running&&(a.state=0,a.tState=r),m===null||m!==p&&(h&&h.running&&m.pure?m.tOwned?m.tOwned.push(a):m.tOwned=[a]:m.owned?m.owned.push(a):m.owned=[a]),_&&a.fn){let e=a.fn,[t,n]=x(void 0,{equals:!1}),r=_.factory(e,n);ne(()=>r.dispose());let i,o=()=>re(n).then(()=>{i&&=(i.dispose(),void 0)});a.fn=n=>(t(),h&&h.running?(i||=_.factory(e,o),i.track(n)):r.track(n))}return a}function pe(e){let t=h&&h.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===f)return _e(e);if(e.suspense&&w(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<ee);){if(t&&h.disposed.has(e))return;(t?e.tState:e.state)&&n.push(e)}for(let r=n.length-1;r>=0;r--){if(e=n[r],t){let t=e,i=n[r+1];for(;(t=t.owner)&&t!==i;)if(h.disposed.has(t))return}if((t?e.tState:e.state)===d)ue(e);else if((t?e.tState:e.state)===f){let t=y;y=null,T(()=>_e(e,n[0]),!1),y=t}}}function T(e,t){if(y)return e();let n=!1;t||(y=[]),b?n=!0:b=[],ee++;try{let t=e();return me(n),t}catch(e){n||(b=null),y=null,Se(e)}}function me(e){if(y&&=(g&&h&&h.running?ge(y):he(y),null),e)return;let t;if(h){if(!h.promises.size&&!h.queue.size){let e=h.sources,n=h.disposed;b.push.apply(b,h.effects),t=h.resolve;for(let e of b)`tState`in e&&(e.state=e.tState),delete e.tState;h=null,T(()=>{for(let e of n)E(e);for(let t of e){if(t.value=t.tValue,t.owned)for(let e=0,n=t.owned.length;e<n;e++)E(t.owned[e]);t.tOwned&&(t.owned=t.tOwned),delete t.tValue,delete t.tOwned,t.tState=0}ae(!1)},!1)}else if(h.running){h.running=!1,h.effects.push.apply(h.effects,b),b=null,ae(!0);return}}let n=b;b=null,n.length&&T(()=>u(n),!1),t&&t()}function he(e){for(let t=0;t<e.length;t++)pe(e[t])}function ge(e){for(let t=0;t<e.length;t++){let n=e[t],r=h.queue;r.has(n)||(r.add(n),g(()=>{r.delete(n),T(()=>{h.running=!0,pe(n)},!1),h&&(h.running=!1)}))}}function _e(e,t){let n=h&&h.running;n?e.tState=0:e.state=0;for(let r=0;r<e.sources.length;r+=1){let i=e.sources[r];if(i.sources){let e=n?i.tState:i.state;e===d?i!==t&&(!i.updatedAt||i.updatedAt<ee)&&pe(i):e===f&&_e(i,t)}}}function ve(e){let t=h&&h.running;for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(t?!r.tState:!r.state)&&(t?r.tState=f:r.state=f,r.pure?y.push(r):b.push(r),r.observers&&ve(r))}}function E(e){let t;if(e.sources)for(;e.sources.length;){let t=e.sources.pop(),n=e.sourceSlots.pop(),r=t.observers;if(r&&r.length){let e=r.pop(),i=t.observerSlots.pop();n<r.length&&(e.sourceSlots[i]=n,r[n]=e,t.observerSlots[n]=i)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)E(e.tOwned[t]);delete e.tOwned}if(h&&h.running&&e.pure)ye(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)E(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}h&&h.running?e.tState=0:e.state=0}function ye(e,t){if(t||(e.tState=0,h.disposed.add(e)),e.owned)for(let t=0;t<e.owned.length;t++)ye(e.owned[t])}function be(e){return e instanceof Error?e:Error(typeof e==`string`?e:`Unknown error`,{cause:e})}function xe(e,t,n){try{for(let n of t)n(e)}catch(e){Se(e,n&&n.owner||null)}}function Se(e,t=m){let n=l&&t&&t.context&&t.context[l],r=be(e);if(!n)throw r;b?b.push({fn(){xe(r,n,t)},state:d}):xe(r,n,t)}function Ce(e){if(typeof e==`function`&&!e.length)return Ce(e());if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n++){let r=Ce(e[n]);if(Array.isArray(r))if(r.length<32768)t.push.apply(t,r);else for(let e=0;e<r.length;e++)t.push(r[e]);else t.push(r)}return t}return e}var we=Symbol(`fallback`);function Te(e){for(let t=0;t<e.length;t++)e[t]()}function Ee(e,t,n={}){let r=[],i=[],a=[],o=0,c=t.length>1?[]:null;return ne(()=>Te(a)),()=>{let l=e()||[],u=l.length,d,f;return l[s],w(()=>{let e,t,s,m,h,g,_,v,y;if(u===0)o!==0&&(Te(a),a=[],r=[],i=[],o=0,c&&=[]),n.fallback&&(r=[we],i[0]=te(e=>(a[0]=e,n.fallback())),o=1);else if(o===0){for(i=Array(u),f=0;f<u;f++)r[f]=l[f],i[f]=te(p);o=u}else{for(s=Array(u),m=Array(u),c&&(h=Array(u)),g=0,_=Math.min(o,u);g<_&&r[g]===l[g];g++);for(_=o-1,v=u-1;_>=g&&v>=g&&r[_]===l[v];_--,v--)s[v]=i[_],m[v]=a[_],c&&(h[v]=c[_]);for(e=new Map,t=Array(v+1),f=v;f>=g;f--)y=l[f],d=e.get(y),t[f]=d===void 0?-1:d,e.set(y,f);for(d=g;d<=_;d++)y=r[d],f=e.get(y),f!==void 0&&f!==-1?(s[f]=i[d],m[f]=a[d],c&&(h[f]=c[d]),f=t[f],e.set(y,f)):a[d]();for(f=g;f<u;f++)f in s?(i[f]=s[f],a[f]=m[f],c&&(c[f]=h[f],c[f](f))):i[f]=te(p);i=i.slice(0,o=u),r=l.slice(0)}return i});function p(e){if(a[f]=e,c){let[e,n]=x(f);return c[f]=n,t(l[f],e)}return t(l[f])}}}var De=!1;function D(t,i){if(De&&e.context){let a=e.context;n(r());let o=w(()=>t(i||{}));return n(a),o}return w(()=>t(i||{}))}function Oe(){return!0}var ke={get(e,t,n){return t===a?n:e.get(t)},has(e,t){return t===a?!0:e.has(t)},set:Oe,deleteProperty:Oe,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:Oe,deleteProperty:Oe}},ownKeys(e){return e.keys()}};function Ae(e){return(e=typeof e==`function`?e():e)?e:{}}function je(){for(let e=0,t=this.length;e<t;++e){let t=this[e]();if(t!==void 0)return t}}function Me(...e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];t||=!!r&&a in r,e[n]=typeof r==`function`?(t=!0,C(r)):r}if(o&&t)return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){let r=Ae(e[n])[t];if(r!==void 0)return r}},has(t){for(let n=e.length-1;n>=0;n--)if(t in Ae(e[n]))return!0;return!1},keys(){let t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(Ae(e[n])));return[...new Set(t)]}},ke);let n={},r=Object.create(null);for(let t=e.length-1;t>=0;t--){let i=e[t];if(!i)continue;let a=Object.getOwnPropertyNames(i);for(let e=a.length-1;e>=0;e--){let t=a[e];if(t===`__proto__`||t===`constructor`)continue;let o=Object.getOwnPropertyDescriptor(i,t);if(!r[t])r[t]=o.get?{enumerable:!0,configurable:!0,get:je.bind(n[t]=[o.get.bind(i)])}:o.value===void 0?void 0:o;else{let e=n[t];e&&(o.get?e.push(o.get.bind(i)):o.value!==void 0&&e.push(()=>o.value))}}}let i={},s=Object.keys(r);for(let e=s.length-1;e>=0;e--){let t=s[e],n=r[t];n&&n.get?Object.defineProperty(i,t,n):i[t]=n?n.value:void 0}return i}function Ne(e,...t){let n=t.length;if(o&&a in e){let r=n>1?t.flat():t[0],i=t.map(t=>new Proxy({get(n){return t.includes(n)?e[n]:void 0},has(n){return t.includes(n)&&n in e},keys(){return t.filter(t=>t in e)}},ke));return i.push(new Proxy({get(t){return r.includes(t)?void 0:e[t]},has(t){return r.includes(t)?!1:t in e},keys(){return Object.keys(e).filter(e=>!r.includes(e))}},ke)),i}let r=[];for(let e=0;e<=n;e++)r[e]={};for(let i of Object.getOwnPropertyNames(e)){let a=n;for(let e=0;e<t.length;e++)if(t[e].includes(i)){a=e;break}let o=Object.getOwnPropertyDescriptor(e,i);!o.get&&!o.set&&o.enumerable&&o.writable&&o.configurable?r[a][i]=o.value:Object.defineProperty(r[a],i,o)}return r}var Pe=e=>`Stale read from <${e}>.`;function Fe(e){let t=`fallback`in e&&{fallback:()=>e.fallback};return C(Ee(()=>e.each,e.children,t||void 0))}function Ie(e){let t=e.keyed,n=C(()=>e.when,void 0,void 0),r=t?n:C(n,void 0,{equals:(e,t)=>!e==!t});return C(()=>{let i=r();if(i){let a=e.children;return typeof a==`function`&&a.length>0?w(()=>a(t?i:()=>{if(!w(r))throw Pe(`Show`);return n()})):a}return e.fallback},void 0,void 0)}function Le(e){let t=oe(()=>e.children),n=C(()=>{let e=t(),n=Array.isArray(e)?e:[e],r=()=>void 0;for(let e=0;e<n.length;e++){let t=e,i=n[e],a=r,o=C(()=>a()?void 0:i.when,void 0,void 0),s=i.keyed?o:C(o,void 0,{equals:(e,t)=>!e==!t});r=()=>a()||(s()?[t,o,i]:void 0)}return r});return C(()=>{let t=n()();if(!t)return e.fallback;let[r,i,a]=t,o=a.children;return typeof o==`function`&&o.length>0?w(()=>o(a.keyed?i():()=>{if(w(n)()?.[0]!==r)throw Pe(`Match`);return i()})):o},void 0,void 0)}function Re(e){return e}var ze=new Set([`className`,`value`,`readOnly`,`noValidate`,`formNoValidate`,`isMap`,`noModule`,`playsInline`,`adAuctionHeaders`,`allowFullscreen`,`browsingTopics`,`defaultChecked`,`defaultMuted`,`defaultSelected`,`disablePictureInPicture`,`disableRemotePlayback`,`preservesPitch`,`shadowRootClonable`,`shadowRootCustomElementRegistry`,`shadowRootDelegatesFocus`,`shadowRootSerializable`,`sharedStorageWritable`,...`allowfullscreen.async.alpha.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.hidden.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.adauctionheaders.browsingtopics.credentialless.defaultchecked.defaultmuted.defaultselected.defer.disablepictureinpicture.disableremoteplayback.preservespitch.shadowrootclonable.shadowrootcustomelementregistry.shadowrootdelegatesfocus.shadowrootserializable.sharedstoragewritable`.split(`.`)]),Be=new Set([`innerHTML`,`textContent`,`innerText`,`children`]),Ve=Object.assign(Object.create(null),{className:`class`,htmlFor:`for`}),He=Object.assign(Object.create(null),{class:`className`,novalidate:{$:`noValidate`,FORM:1},formnovalidate:{$:`formNoValidate`,BUTTON:1,INPUT:1},ismap:{$:`isMap`,IMG:1},nomodule:{$:`noModule`,SCRIPT:1},playsinline:{$:`playsInline`,VIDEO:1},readonly:{$:`readOnly`,INPUT:1,TEXTAREA:1},adauctionheaders:{$:`adAuctionHeaders`,IFRAME:1},allowfullscreen:{$:`allowFullscreen`,IFRAME:1},browsingtopics:{$:`browsingTopics`,IMG:1},defaultchecked:{$:`defaultChecked`,INPUT:1},defaultmuted:{$:`defaultMuted`,AUDIO:1,VIDEO:1},defaultselected:{$:`defaultSelected`,OPTION:1},disablepictureinpicture:{$:`disablePictureInPicture`,VIDEO:1},disableremoteplayback:{$:`disableRemotePlayback`,AUDIO:1,VIDEO:1},preservespitch:{$:`preservesPitch`,AUDIO:1,VIDEO:1},shadowrootclonable:{$:`shadowRootClonable`,TEMPLATE:1},shadowrootdelegatesfocus:{$:`shadowRootDelegatesFocus`,TEMPLATE:1},shadowrootserializable:{$:`shadowRootSerializable`,TEMPLATE:1},sharedstoragewritable:{$:`sharedStorageWritable`,IFRAME:1,IMG:1}});function Ue(e,t){let n=He[e];return typeof n==`object`?n[t]?n.$:void 0:n}var We=new Set([`beforeinput`,`click`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`]),Ge={xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`},Ke=e=>C(()=>e());function qe(e,t,n){let r=n.length,i=t.length,a=r,o=0,s=0,c=t[i-1].nextSibling,l=null;for(;o<i||s<a;){if(t[o]===n[s]){o++,s++;continue}for(;t[i-1]===n[a-1];)i--,a--;if(i===o){let t=a<r?s?n[s-1].nextSibling:n[a-s]:c;for(;s<a;)e.insertBefore(n[s++],t)}else if(a===s)for(;o<i;)(!l||!l.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[a-1]&&n[s]===t[i-1]){let r=t[--i].nextSibling;e.insertBefore(n[s++],t[o++].nextSibling),e.insertBefore(n[--a],r),t[i]=n[a]}else{if(!l){l=new Map;let e=s;for(;e<a;)l.set(n[e],e++)}let r=l.get(t[o]);if(r!=null)if(s<r&&r<a){let c=o,u=1,d;for(;++c<i&&c<a&&!((d=l.get(t[c]))==null||d!==r+u);)u++;if(u>r-s){let i=t[o];for(;s<r;)e.insertBefore(n[s++],i)}else e.replaceChild(n[s++],t[o++])}else o++;else t[o++].remove()}}}var Je=`_$DX_DELEGATE`;function Ye(e,t,n,r={}){let i;return te(r=>{i=r,t===document?e():A(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{i(),t.textContent=``}}function O(e,t,n,r){let i,a=()=>{let t=r?document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`template`):document.createElement(`template`);return t.innerHTML=e,n?t.content.firstChild.firstChild:r?t.firstChild:t.content.firstChild},o=t?()=>w(()=>document.importNode(i||=a(),!0)):()=>(i||=a()).cloneNode(!0);return o.cloneNode=o,o}function Xe(e,t=window.document){let n=t[Je]||(t[Je]=new Set);for(let r=0,i=e.length;r<i;r++){let i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,dt))}}function k(e,t,n){st(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function Ze(e,t,n,r){st(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function Qe(e,t,n){st(e)||(n?e.setAttribute(t,``):e.removeAttribute(t))}function $e(e,t){st(e)||(t==null?e.removeAttribute(`class`):e.className=t)}function et(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){let r=n[0];e.addEventListener(t,n[0]=t=>r.call(e,n[1],t))}else e.addEventListener(t,n,typeof n!=`function`&&n)}function tt(e,t,n={}){let r=Object.keys(t||{}),i=Object.keys(n),a,o;for(a=0,o=i.length;a<o;a++){let r=i[a];!r||r===`undefined`||t[r]||(lt(e,r,!1),delete n[r])}for(a=0,o=r.length;a<o;a++){let i=r[a],o=!!t[i];!i||i===`undefined`||n[i]===o||!o||(lt(e,i,!0),n[i]=o)}return n}function nt(e,t,n){if(!t)return n?k(e,`style`):t;let r=e.style;if(typeof t==`string`)return r.cssText=t;typeof n==`string`&&(r.cssText=n=void 0),n||={},t||={};let i,a;for(a in n)t[a]??r.removeProperty(a),delete n[a];for(a in t)i=t[a],i!==n[a]&&(r.setProperty(a,i),n[a]=i);return n}function rt(e,t,n){n==null?e.style.removeProperty(t):e.style.setProperty(t,n)}function it(e,t={},n,r){let i={};return r||S(()=>i.children=ft(e,t.children,i.children)),S(()=>typeof t.ref==`function`&&at(t.ref,e)),S(()=>ot(e,t,n,!0,i,!0)),i}function at(e,t,n){return w(()=>e(t,n))}function A(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!=`function`)return ft(e,t,r,n);S(r=>ft(e,t(),r,n),r)}function ot(e,t,n,r,i={},a=!1){t||={};for(let r in i)if(!(r in t)){if(r===`children`)continue;i[r]=ut(e,r,null,i[r],n,a,t)}for(let o in t){if(o===`children`){r||ft(e,t.children);continue}let s=t[o];i[o]=ut(e,o,s,i[o],n,a,t)}}function st(t){return!!e.context&&!e.done&&(!t||t.isConnected)}function ct(e){return e.toLowerCase().replace(/-([a-z])/g,(e,t)=>t.toUpperCase())}function lt(e,t,n){let r=t.trim().split(/\s+/);for(let t=0,i=r.length;t<i;t++)e.classList.toggle(r[t],n)}function ut(e,t,n,r,i,a,o){let s,c,l,u,d;if(t===`style`)return nt(e,n,r);if(t===`classList`)return tt(e,n,r);if(n===r)return r;if(t===`ref`)a||n(e);else if(t.slice(0,3)===`on:`){let i=t.slice(3);r&&e.removeEventListener(i,r,typeof r!=`function`&&r),n&&e.addEventListener(i,n,typeof n!=`function`&&n)}else if(t.slice(0,10)===`oncapture:`){let i=t.slice(10);r&&e.removeEventListener(i,r,!0),n&&e.addEventListener(i,n,!0)}else if(t.slice(0,2)===`on`){let i=t.slice(2).toLowerCase(),a=We.has(i);if(!a&&r){let t=Array.isArray(r)?r[0]:r;e.removeEventListener(i,t)}(a||n)&&(et(e,i,n,a),a&&Xe([i]))}else if(t.slice(0,5)===`attr:`)k(e,t.slice(5),n);else if(t.slice(0,5)===`bool:`)Qe(e,t.slice(5),n);else if((d=t.slice(0,5)===`prop:`)||(l=Be.has(t))||!i&&((u=Ue(t,e.tagName))||(c=ze.has(t)))||(s=e.nodeName.includes(`-`)||`is`in o)){if(d)t=t.slice(5),c=!0;else if(st(e))return n;t===`class`||t===`className`?$e(e,n):s&&!c&&!l?e[ct(t)]=n:e[u||t]=n}else{let r=i&&t.indexOf(`:`)>-1&&Ge[t.split(`:`)[0]];r?Ze(e,r,t,n):k(e,Ve[t]||t,n)}return n}function dt(t){if(e.registry&&e.events&&e.events.find(([e,n])=>n===t))return;let n=t.target,r=`$$${t.type}`,i=t.target,a=t.currentTarget,o=e=>Object.defineProperty(t,"target",{configurable:!0,value:e}),s=()=>{let e=n[r];if(e&&!n.disabled){let i=n[`${r}Data`];if(i===void 0?e.call(n,t):e.call(n,i,t),t.cancelBubble)return}return n.host&&typeof n.host!=`string`&&!n.host._$host&&n.contains(t.target)&&o(n.host),!0},c=()=>{for(;s()&&(n=n._$host||n.parentNode||n.host););};if(Object.defineProperty(t,"currentTarget",{configurable:!0,get(){return n||document}}),e.registry&&!e.done&&(e.done=_$HY.done=!0),t.composedPath){let e=t.composedPath();o(e[0]);for(let t=0;t<e.length-2&&(n=e[t],s());t++){if(n._$host){n=n._$host,c();break}if(n.parentNode===a)break}}else c();o(i)}function ft(e,t,n,r,i){let a=st(e);if(a){!n&&(n=[...e.childNodes]);let t=[];for(let e=0;e<n.length;e++){let r=n[e];r.nodeType===8&&r.data.slice(0,2)===`!$`?r.remove():t.push(r)}n=t}for(;typeof n==`function`;)n=n();if(t===n)return n;let o=typeof t,s=r!==void 0;if(e=s&&n[0]&&n[0].parentNode||e,o===`string`||o===`number`){if(a||o===`number`&&(t=t.toString(),t===n))return n;if(s){let i=n[0];i&&i.nodeType===3?i.data!==t&&(i.data=t):i=document.createTextNode(t),n=ht(e,n,r,i)}else n=n!==``&&typeof n==`string`?e.firstChild.data=t:e.textContent=t}else if(t==null||o===`boolean`){if(a)return n;n=ht(e,n,r)}else if(o===`function`)return S(()=>{let i=t();for(;typeof i==`function`;)i=i();n=ft(e,i,n,r)}),()=>n;else if(Array.isArray(t)){let o=[],c=n&&Array.isArray(n);if(pt(o,t,n,i))return S(()=>n=ft(e,o,n,r,!0)),()=>n;if(a){if(!o.length)return n;if(r===void 0)return n=[...e.childNodes];let t=o[0];if(t.parentNode!==e)return n;let i=[t];for(;(t=t.nextSibling)!==r;)i.push(t);return n=i}if(o.length===0){if(n=ht(e,n,r),s)return n}else c?n.length===0?mt(e,o,r):qe(e,n,o):(n&&ht(e),mt(e,o));n=o}else if(t.nodeType){if(a&&t.parentNode)return n=s?[t]:t;if(Array.isArray(n)){if(s)return n=ht(e,n,r,t);ht(e,n,null,t)}else n==null||n===``||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}return n}function pt(e,t,n,r){let i=!1;for(let a=0,o=t.length;a<o;a++){let o=t[a],s=n&&n[e.length],c;if(!(o==null||o===!0||o===!1))if((c=typeof o)==`object`&&o.nodeType)e.push(o);else if(Array.isArray(o))i=pt(e,o,s)||i;else if(c===`function`)if(r){for(;typeof o==`function`;)o=o();i=pt(e,Array.isArray(o)?o:[o],Array.isArray(s)?s:[s])||i}else e.push(o),i=!0;else{let t=String(o);s&&s.nodeType===3&&s.data===t?e.push(s):e.push(document.createTextNode(t))}}return i}function mt(e,t,n=null){for(let r=0,i=t.length;r<i;r++)e.insertBefore(t[r],n)}function ht(e,t,n,r){if(n===void 0)return e.textContent=``;let i=r||document.createTextNode(``);if(t.length){let r=!1;for(let a=t.length-1;a>=0;a--){let o=t[a];if(i!==o){let t=o.parentNode===e;!r&&!a?t?e.replaceChild(i,o):e.insertBefore(i,n):t&&o.remove()}else r=!0}}else e.insertBefore(i,n);return[i]}var gt=`devframe-a11y-inspector`,_t=[`critical`,`serious`,`moderate`,`minor`],vt={critical:`#ff5c7a`,serious:`#ff9b52`,moderate:`#f2d14e`,minor:`#6fb1fc`};function yt(){return{critical:0,serious:0,moderate:0,minor:0}}function bt(...e){return e.filter(Boolean).join(` `)}function xt({variant:e=`primary`,size:t=`md`,class:n}={}){let r={primary:`btn-primary`,secondary:`btn-action`,outline:`btn-action`,ghost:`inline-flex items-center justify-center gap-1.5 rounded px2 py1 op75 hover:op100 hover:bg-active transition disabled:pointer-events-none disabled:op30!`,destructive:`btn-action text-error border-error/30!`,link:`inline-flex items-center gap-1.5 color-active hover:underline underline-offset-2`},i=t===`sm`?e===`primary`?`text-sm px-2.5! py-1!`:`text-sm`:t===`lg`?`text-base px-4! py-2!`:``;return bt(r[e],i,n)}function St(e){return bt(`flex items-center gap-2 shrink-0 h-10 px-3 border-b border-base bg-base z-nav`,e)}function Ct(e){return bt(`flex items-center gap-1.5 shrink-0 font-semibold text-sm select-none`,e)}var wt={critical:`Critical`,serious:`Serious`,moderate:`Moderate`,minor:`Minor`},Tt=O(`<header><span><span class="i-ph-person-arms-spread-duotone text-base color-active"></span><span>A11y Inspector</span></span><span class=flex-1></span><span class=status><span></span></span><button type=button><span class=i-ph-arrows-clockwise></span>Rescan`),Et=O(`<div class=meta><span class=meta__url></span><span class=meta__tag>axe `),Dt=O(`<span class=meta__tag>`),Ot=O(`<div class=summary>`),kt=O(`<button type=button><span class=chip__count></span><span class=chip__label>`);function At(e){let t=()=>e.agentReady?e.scanning?`Scanning…`:`Connected`:`No page connected`,n=()=>e.agentReady?e.scanning?`status__dot status__dot--scanning`:`status__dot status__dot--live`:`status__dot`;return(()=>{var r=Tt(),i=r.firstChild,a=i.nextSibling.nextSibling,o=a.firstChild,s=a.nextSibling,c=s.firstChild;return A(a,t,null),s.$$click=()=>e.onRescan(),S(t=>{var a=St(),l=Ct(),u=n(),d=xt({variant:`primary`,size:`sm`}),f=!e.agentReady||e.scanning,p=!!e.scanning;return a!==t.e&&$e(r,t.e=a),l!==t.t&&$e(i,t.t=l),u!==t.a&&$e(o,t.a=u),d!==t.o&&$e(s,t.o=d),f!==t.i&&(s.disabled=t.i=f),p!==t.n&&c.classList.toggle(`animate-spin`,t.n=p),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0}),r})()}function jt(e){return D(Ie,{get when(){return e.report()},children:t=>(()=>{var n=Et(),r=n.firstChild,i=r.nextSibling;return i.firstChild,A(r,()=>t().url),A(n,D(Ie,{get when(){return e.backend()},children:e=>(()=>{var t=Dt();return A(t,e),t})()}),i),A(i,()=>t().engine,null),S(()=>k(r,`title`,t().url)),n})()})}function Mt(e){return(()=>{var t=Ot();return A(t,D(Fe,{each:_t,children:t=>{let n=()=>e.counts[t];return(()=>{var r=kt(),i=r.firstChild,a=i.nextSibling;return r.$$click=()=>e.onToggle(t),A(i,n),A(a,()=>wt[t]),S(i=>{var a=`chip${n()===0?` chip--zero`:``}`,o=vt[t],s=e.active===t,c=`${n()} ${wt[t]} issues — filter`;return a!==i.e&&$e(r,i.e=a),o!==i.t&&rt(r,`--impact`,i.t=o),s!==i.a&&k(r,`aria-pressed`,i.a=s),c!==i.o&&k(r,`aria-label`,i.o=c),i},{e:void 0,t:void 0,a:void 0,o:void 0}),r})()}})),t})()}Xe([`click`]);var Nt=O(`<span aria-hidden>`);function Pt(e){return t=>{let[n,r]=Ne(t,[`class`]);return(()=>{var t=Nt();return it(t,Me(r,{get class(){return`${e}${n.class?` ${n.class}`:``}`}}),!1,!1),t})()}}var Ft=Pt(`i-ph-caret-right size-3.5`),It=Pt(`i-ph-check-circle-duotone size-10`),Lt=Pt(`i-ph-plugs-duotone size-10`),Rt=O(`<ul class=nodes>`),zt=O(`<a class=rule__docslink target=_blank rel="noreferrer noopener">Learn how to fix <!> ↗`),Bt=O(`<li class=rule><button type=button class=rule__toggle><span class=rule__head><span class=rule__impact></span><code class=rule__id></code><span class=rule__count> </span></span><span class=rule__help>`),Vt=O(`<span class=node__target>`),Ht=O(`<span class=node__summary>`),Ut=O(`<li class=node><button type=button class=node__btn><code class=node__html>`),Wt=O(`<ul class=list>`);function Gt(e){let t=()=>e.violation,n=C(()=>`nodes-${e.index}`),r=()=>t().nodes[0];return(()=>{var i=Bt(),a=i.firstChild,o=a.firstChild,s=o.firstChild,c=s.nextSibling,l=c.nextSibling,u=l.firstChild,d=o.nextSibling;return i.addEventListener(`mouseleave`,()=>e.channel.clearHighlight()),a.addEventListener(`blur`,()=>e.channel.clearHighlight()),a.addEventListener(`focus`,()=>r()&&e.channel.highlight(r())),a.addEventListener(`mouseenter`,()=>r()&&e.channel.highlight(r())),a.$$click=()=>e.onToggle(),A(s,()=>wt[t().impact]),A(c,()=>t().ruleId),A(l,()=>t().nodes.length,u),A(l,()=>t().nodes.length===1?`element`:`elements`,null),A(l,D(Ft,{get class(){return`rule__chevron${e.expanded?` rule__chevron--open`:``}`}}),null),A(d,()=>t().help),A(i,D(Ie,{get when(){return e.expanded},get children(){return[(()=>{var r=Rt();return A(r,D(Fe,{get each(){return t().nodes},children:t=>(()=>{var n=Ut(),r=n.firstChild,i=r.firstChild;return r.$$click=()=>e.channel.highlight(t),r.addEventListener(`blur`,()=>e.channel.clearHighlight()),r.addEventListener(`focus`,()=>e.channel.highlight(t)),r.addEventListener(`mouseenter`,()=>e.channel.highlight(t)),A(i,()=>t.html),A(r,D(Ie,{get when(){return t.target.length},get children(){var e=Vt();return A(e,()=>t.target.join(` `)),e}}),null),A(r,D(Ie,{get when(){return t.failureSummary},get children(){var e=Ht();return A(e,()=>t.failureSummary),e}}),null),n})()})),S(()=>k(r,`id`,n())),r})(),(()=>{var e=zt(),n=e.firstChild.nextSibling;return n.nextSibling,A(e,()=>t().ruleId,n),S(()=>k(e,`href`,t().helpUrl)),e})()]}}),null),S(r=>{var o=vt[t().impact],s=e.expanded,c=n();return o!==r.e&&rt(i,`--impact`,r.e=o),s!==r.t&&k(a,`aria-expanded`,r.t=s),c!==r.a&&k(a,`aria-controls`,r.a=c),r},{e:void 0,t:void 0,a:void 0}),i})()}function Kt(e){return(()=>{var t=Wt();return A(t,D(Fe,{get each(){return e.violations},children:(t,n)=>D(Gt,{violation:t,get index(){return n()},get expanded(){return e.expanded.has(t.ruleId)},onToggle:()=>e.onToggle(t.ruleId),get channel(){return e.channel}})})),t})()}Xe([`click`]);function qt(){let[e,t]=x(null),[n,r]=x(!1),[i,a]=x(!1),o=new BroadcastChannel(gt),s=e=>o.postMessage(e);return o.addEventListener(`message`,n=>{let i=n.data;switch(i.type){case`a11y:agent-ready`:r(!0),e()||s({type:`a11y:panel-ready`});break;case`a11y:report`:r(!0),a(!1),t(i.report);break;case`a11y:scanning`:r(!0),a(!0);break}}),s({type:`a11y:panel-ready`}),ne(()=>o.close()),{report:e,agentReady:n,scanning:i,highlight:e=>s({type:`a11y:highlight`,nodeId:e.id,target:e.target}),clearHighlight:()=>s({type:`a11y:clear`}),rescan:()=>{a(!0),s({type:`a11y:rescan`})}}}var Jt=`__connection.json`,Yt=`__rpc-dump/index.json`,Xt=`devframe_otp`;function Zt(e){return typeof e==`string`?`'${e}'`:new Qt().serialize(e)}var Qt=function(){class e{#e=new Map;compare(e,t){let n=typeof e,r=typeof t;return n===`string`&&r===`string`?e.localeCompare(t):n===`number`&&r===`number`?e-t:String.prototype.localeCompare.call(this.serialize(e,!0),this.serialize(t,!0))}serialize(e,t){if(e===null)return`null`;switch(typeof e){case`string`:return t?e:`'${e}'`;case`bigint`:return`${e}n`;case`object`:return this.$object(e);case`function`:return this.$function(e)}return String(e)}serializeObject(e){let t=Object.prototype.toString.call(e);if(t!==`[object Object]`)return this.serializeBuiltInType(t.length<10?`unknown:${t}`:t.slice(8,-1),e);let n=e.constructor,r=n===Object||n===void 0?``:n.name;if(r!==``&&globalThis[r]===n)return this.serializeBuiltInType(r,e);if(typeof e.toJSON==`function`){let t=e.toJSON();return r+(typeof t==`object`&&t?this.$object(t):`(${this.serialize(t)})`)}return this.serializeObjectEntries(r,Object.entries(e))}serializeBuiltInType(e,t){let n=this[`$`+e];if(n)return n.call(this,t);if(typeof t?.entries==`function`)return this.serializeObjectEntries(e,t.entries());throw Error(`Cannot serialize ${e}`)}serializeObjectEntries(e,t){let n=Array.from(t).sort((e,t)=>this.compare(e[0],t[0])),r=`${e}{`;for(let e=0;e<n.length;e++){let[t,i]=n[e];r+=`${this.serialize(t,!0)}:${this.serialize(i)}`,e<n.length-1&&(r+=`,`)}return r+`}`}$object(e){let t=this.#e.get(e);return t===void 0&&(this.#e.set(e,`#${this.#e.size}`),t=this.serializeObject(e),this.#e.set(e,t)),t}$function(e){let t=Function.prototype.toString.call(e);return t.slice(-15)===`[native code] }`?`${e.name||``}()[native]`:`${e.name}(${e.length})${t.replace(/\s*\n\s*/g,``)}`}$Array(e){let t=`[`;for(let n=0;n<e.length;n++)t+=this.serialize(e[n]),n<e.length-1&&(t+=`,`);return t+`]`}$Date(e){try{return`Date(${e.toISOString()})`}catch{return`Date(null)`}}$ArrayBuffer(e){return`ArrayBuffer[${new Uint8Array(e).join(`,`)}]`}$Set(e){return`Set${this.$Array(Array.from(e).sort((e,t)=>this.compare(e,t)))}`}$Map(e){return this.serializeObjectEntries(`Map`,e.entries())}}for(let t of[`Error`,`RegExp`,`URL`])e.prototype[`$`+t]=function(e){return`${t}(${e})`};for(let t of[`Int8Array`,`Uint8Array`,`Uint8ClampedArray`,`Int16Array`,`Uint16Array`,`Int32Array`,`Uint32Array`,`Float32Array`,`Float64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`,`)}]`};for(let t of[`BigInt64Array`,`BigUint64Array`])e.prototype[`$`+t]=function(e){return`${t}[${e.join(`n,`)}${e.length>0?`n`:``}]`};return e}(),$t=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],en=[1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998],tn=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_`,j=[],nn=class{_data=new rn;_hash=new rn([...$t]);_nDataBytes=0;_minBufferSize=0;finalize(e){e&&this._append(e);let t=this._nDataBytes*8,n=this._data.sigBytes*8;return this._data.words[n>>>5]|=128<<24-n%32,this._data.words[(n+64>>>9<<4)+14]=Math.floor(t/4294967296),this._data.words[(n+64>>>9<<4)+15]=t,this._data.sigBytes=this._data.words.length*4,this._process(),this._hash}_doProcessBlock(e,t){let n=this._hash.words,r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],c=n[5],l=n[6],u=n[7];for(let n=0;n<64;n++){if(n<16)j[n]=e[t+n]|0;else{let e=j[n-15],t=(e<<25|e>>>7)^(e<<14|e>>>18)^e>>>3,r=j[n-2],i=(r<<15|r>>>17)^(r<<13|r>>>19)^r>>>10;j[n]=t+j[n-7]+i+j[n-16]}let d=s&c^~s&l,f=r&i^r&a^i&a,p=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),m=(s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25),h=u+m+d+en[n]+j[n],g=p+f;u=l,l=c,c=s,s=o+h|0,o=a,a=i,i=r,r=h+g|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+s|0,n[5]=n[5]+c|0,n[6]=n[6]+l|0,n[7]=n[7]+u|0}_append(e){typeof e==`string`&&(e=rn.fromUtf8(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes}_process(e){let t,n=this._data.sigBytes/64;n=e?Math.ceil(n):Math.max((n|0)-this._minBufferSize,0);let r=n*16,i=Math.min(r*4,this._data.sigBytes);if(r){for(let e=0;e<r;e+=16)this._doProcessBlock(this._data.words,e);t=this._data.words.splice(0,r),this._data.sigBytes-=i}return new rn(t,i)}},rn=class e{words;sigBytes;constructor(e,t){e=this.words=e||[],this.sigBytes=t===void 0?e.length*4:t}static fromUtf8(t){let n=unescape(encodeURIComponent(t)),r=n.length,i=[];for(let e=0;e<r;e++)i[e>>>2]|=(n.charCodeAt(e)&255)<<24-e%4*8;return new e(i,r)}toBase64(){let e=[];for(let t=0;t<this.sigBytes;t+=3){let n=this.words[t>>>2]>>>24-t%4*8&255,r=this.words[t+1>>>2]>>>24-(t+1)%4*8&255,i=this.words[t+2>>>2]>>>24-(t+2)%4*8&255,a=n<<16|r<<8|i;for(let n=0;n<4&&t*8+n*6<this.sigBytes*8;n++)e.push(tn.charAt(a>>>6*(3-n)&63))}return e.join(``)}concat(e){if(this.words[this.sigBytes>>>2]&=4294967295<<32-this.sigBytes%4*8,this.words.length=Math.ceil(this.sigBytes/4),this.sigBytes%4)for(let t=0;t<e.sigBytes;t++){let n=e.words[t>>>2]>>>24-t%4*8&255;this.words[this.sigBytes+t>>>2]|=n<<24-(this.sigBytes+t)%4*8}else for(let t=0;t<e.sigBytes;t+=4)this.words[this.sigBytes+t>>>2]=e.words[t>>>2];this.sigBytes+=e.sigBytes}};function an(e){return new nn().finalize(e).toBase64()}function on(e){return an(Zt(e))}function sn(e){return on(e)}function cn(e,...t){return typeof e==`function`?e(...t):e}var ln=Error.captureStackTrace,un=class e extends Error{name=`Diagnostic`;docs;fix;sources;get why(){return this.message}constructor(t,n=e){super(t.why,{cause:t.cause}),this.fix=t.fix,this.docs=t.docs,this.sources=t.sources,ln?.(this,n)}toJSON(){return{name:this.name,why:this.why,fix:this.fix,docs:this.docs,sources:this.sources,cause:this.cause,stack:this.stack}}};function dn(e,t){return typeof e==`string`?`${e}/${t.toLowerCase()}`:e?.(t)}function fn(e){let t=e.reporters??[],n={},{docsBase:r}=e;for(let i of Object.keys(e.codes)){let a=e.codes[i],o=a.docs===!1?void 0:a.docs||dn(r,i),s=(e={},n={})=>{let r=new un({why:cn(a.why,e),fix:cn(a.fix,e),docs:o,cause:e.cause,sources:e.sources},s);r.name=i;for(let e of t)e(r,n);return r};n[i]=s}return n}function M(e,t){let n=`\x1B[${e}m`,r=`\x1B[${t}m`;return((e,...t)=>{if(Array.isArray(e)&&`raw`in e){let i=e,a=``;for(let e=0;e<i.length;e++)a+=i[e],e<t.length&&(a+=String(t[e]));return`${n}${a}${r}`}return`${n}${String(e)}${r}`})}var pn={blue:M(34,39),cyan:M(36,39),gray:M(90,39),green:M(32,39),red:M(31,39),yellow:M(33,39),bold:M(1,22),dim:M(2,22),reset:M(0,0),underline:M(4,24)};function mn(e){return t=>{let n=`${e.bold(e.red(`[${t.name}]`))} ${t.message}`,r=[];return t.fix&&r.push(`${e.dim(`fix:`)} ${t.fix}`),t.sources?.length&&r.push(`${e.dim(`sources:`)} ${t.sources.join(`, `)}`),t.docs&&r.push(`${e.dim(`see:`)} ${e.cyan(t.docs)}`),r.length===0?n:[n,...r.map((t,n)=>`${e.dim(n<r.length-1?`├▶`:`╰▶`)} ${t}`)].join(`
2
+ `)}}var hn=mn(pn);function gn(e,{method:t=`warn`}={}){console[t](hn(e))}var _n=fn({docsBase:`https://devfra.me/errors`,reporters:[gn],codes:{DF0019:{why:e=>`RPC function "${e.name}" has \`agent\` set but \`jsonSerializable\` is not \`true\` — MCP requires JSON-serializable data.`,fix:"Set `jsonSerializable: true` if the payload is JSON-safe, or remove `agent` to keep it RPC-only."},DF0020:{why:e=>`RPC function "${e.name}" declares \`jsonSerializable: true\` but the value at "${e.path}" is a ${e.type}.`,fix:"Either drop `jsonSerializable: true` (falls back to structured-clone) or change the value to a JSON-safe shape."},DF0021:{why:e=>`RPC function "${e.name}" is already registered`,fix:"Use the `force` parameter to overwrite an existing registration."},DF0022:{why:e=>`RPC function "${e.name}" is not registered. Use register() to add new functions.`},DF0023:{why:e=>`RPC function "${e.name}" is not registered`},DF0024:{why:e=>`Either handler or setup function must be provided for RPC function "${e.name}"`},DF0025:{why:e=>`Function "${e.name}" not found in dump store`},DF0026:{why:e=>`No dump match for "${e.name}" with args: ${e.args}`},DF0027:{why:e=>`Function "${e.name}" with type "${e.type}" cannot have dump configuration. Only "static" and "query" types support dumps.`},DF0028:{why:e=>`Function "${e.name}" with type "${e.type}" cannot use \`snapshot: true\`. Only "query" functions support this sugar; "static" functions have equivalent default behavior already.`,fix:"Remove `snapshot: true`, or change the function type to `query`."}}});function vn(e){let t=e.cause instanceof Error?e.cause:yn(e.cause)?vn(e.cause):e.cause,n=t===void 0?Error(e.message):Error(e.message,{cause:t});n.name=e.name;for(let t of Object.keys(e))t===`name`||t===`message`||t===`cause`||(n[t]=e[t]);return n}function yn(e){return typeof e==`object`&&!!e&&typeof e.message==`string`&&typeof e.name==`string`}async function bn(e,t){if(!e.setup)return{};if(typeof t==`object`&&t){e.__cache??=new WeakMap;let n=e.__cache.get(t);return n||(n=Promise.resolve(e.setup(t)),e.__cache.set(t,n)),await n}return e.__promise??=Promise.resolve(e.setup(t)),await e.__promise}async function xn(e,t){if(e.handler)return e.handler;let n=await bn(e,t);if(!n.handler)throw _n.DF0024({name:e.name});return n.handler}var Sn=class{cacheMap=new Map;options;keySerializer;constructor(e){this.options=e,this.keySerializer=e.keySerializer||(e=>sn(e))}updateOptions(e){this.options={...this.options,...e}}cached(e,t){let n=this.cacheMap.get(e);if(n)return n.get(this.keySerializer(t))}apply(e,t){let n=this.cacheMap.get(e.m)||new Map;n.set(this.keySerializer(e.a),t),this.cacheMap.set(e.m,n)}validate(e){return this.options.functions.includes(e)}clear(e){e?this.cacheMap.delete(e):this.cacheMap.clear()}},Cn=class{context;definitions=new Map;functions;_onChanged=[];constructor(e){this.context=e;let t=this.definitions,n=this;this.functions=new Proxy({},{get(e,r){let i=t.get(r);if(i)return xn(i,n.context)},has(e,n){return t.has(n)},getOwnPropertyDescriptor(e,n){return{value:t.get(n)?.handler,configurable:!0,enumerable:!0}},ownKeys(){return Array.from(t.keys())}})}register(e,t=!1){if(this.definitions.has(e.name)&&!t)throw _n.DF0021({name:e.name});wn(e),this.definitions.set(e.name,e),this._onChanged.forEach(t=>t(e.name))}update(e,t=!1){if(!this.definitions.has(e.name)&&!t)throw _n.DF0022({name:e.name});wn(e),this.definitions.set(e.name,e),this._onChanged.forEach(t=>t(e.name))}onChanged(e){return this._onChanged.push(e),()=>{let t=this._onChanged.indexOf(e);t!==-1&&this._onChanged.splice(t,1)}}async getHandler(e){return await xn(this.definitions.get(e),this.context)}getSchema(e){let t=this.definitions.get(e);if(!t)throw _n.DF0023({name:String(e)});return{args:t.args,returns:t.returns}}has(e){return this.definitions.has(e)}get(e){return this.definitions.get(e)}list(){return Array.from(this.definitions.keys())}};function wn(e){if(e.agent&&e.jsonSerializable!==!0)throw _n.DF0019({name:e.name})}function Tn(e,t=``){return JSON.stringify(e,function(e,n){let r=this,i=r==null?n:r[e];if(i===void 0){if(Array.isArray(r))throw En(t,`undefined`,r,e);return n}if(i===null)return n;if(typeof i==`bigint`)throw En(t,`BigInt`,r,e);if(typeof i==`object`){if(i instanceof Map)throw En(t,`Map`,r,e);if(i instanceof Set)throw En(t,`Set`,r,e);if(i instanceof Date)throw En(t,`Date`,r,e);if(Array.isArray(i))return n;let a=Object.getPrototypeOf(i);if(a!==null&&a!==Object.prototype)throw En(t,i.constructor?.name??`class instance`,r,e)}return n})}function En(e,t,n,r){let i=Dn(n,r);return _n.DF0020({name:e||`<anonymous>`,type:t,path:i})}function Dn(e,t){return Array.isArray(e)?`[${t}]`:t===``?`<root>`:t}function On(){let e={};function t(t,...n){let r=e[t]||[];for(let e=0,t=r.length;e<t;e++){let t=r[e];t&&t(...n)}}function n(n,...r){t(n,...r),delete e[n]}function r(t,n){return(e[t]||=[]).push(n),()=>{e[t]=e[t]?.filter(e=>n!==e)}}function i(e,t){let n=r(e,((...e)=>(n(),t(...e))));return n}return{_listeners:e,emit:t,emitOnce:n,on:r,once:i}}String.fromCharCode;var kn=/^[\s\w\0+.-]{2,}:([/\\]{1,2})/,An=/^[\s\w\0+.-]{2,}:([/\\]{2})?/,jn=/^([/\\]\s*){2,}[^/\\]/,Mn=/\/$|\/\?|\/#/,Nn=/^\.?\//;function Pn(e,t={}){return typeof t==`boolean`&&(t={acceptRelative:t}),t.strict?kn.test(e):An.test(e)||(t.acceptRelative?jn.test(e):!1)}function Fn(e=``,t){return t?Mn.test(e):e.endsWith(`/`)}function In(e=``,t){if(!t)return(Fn(e)?e.slice(0,-1):e)||`/`;if(!Fn(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);i!==-1&&(n=e.slice(0,i),r=e.slice(i));let[a,...o]=n.split(`?`);return((a.endsWith(`/`)?a.slice(0,-1):a)||`/`)+(o.length>0?`?${o.join(`?`)}`:``)+r}function Ln(e=``,t){if(!t)return e.endsWith(`/`)?e:e+`/`;if(Fn(e,!0))return e||`/`;let n=e,r=``,i=e.indexOf(`#`);if(i!==-1&&(n=e.slice(0,i),r=e.slice(i),!n))return r;let[a,...o]=n.split(`?`);return a+`/`+(o.length>0?`?${o.join(`?`)}`:``)+r}function Rn(e,t){if(zn(t)||Pn(e))return e;let n=In(t);if(e.startsWith(n)){let t=e[n.length];if(!t||t===`/`||t===`?`)return e}return Vn(n,e)}function zn(e){return!e||e===`/`}function Bn(e){return e&&e!==`/`}function Vn(e,...t){let n=e||``;for(let e of t.filter(e=>Bn(e)))if(n){let t=e.replace(Nn,``);n=Ln(n)+t}else n=e;return n}function Hn(e,t){let n=e.match(An);return n||=e.match(/^\/{2,}/),n?t+e.slice(n[0].length):t+e}function Un(e=Xt){try{return new URLSearchParams(globalThis.location?.search).get(e)||void 0}catch{return}}function Wn(e){try{let t=new URL(globalThis.location.href);if(!t.searchParams.has(e))return;t.searchParams.delete(e),globalThis.history?.replaceState(globalThis.history.state,``,t.href)}catch{}}function Gn(e=Xt){let t=Un(e);return t&&Wn(e),t}async function Kn(e,t={}){let n=Gn(t.param??`devframe_otp`);return n?e.isTrusted?!0:e.requestTrustWithCode(n):!1}var qn=Symbol.for(`immer-nothing`),Jn=Symbol.for(`immer-draftable`),N=Symbol.for(`immer-state`);function P(e,...t){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var F=Object,I=F.getPrototypeOf,Yn=`constructor`,Xn=`prototype`,Zn=`configurable`,Qn=`enumerable`,$n=`writable`,er=`value`,L=e=>!!e&&!!e[N];function R(e){return e?rr(e)||cr(e)||!!e[Jn]||!!e[Yn]?.[Jn]||lr(e)||ur(e):!1}var tr=F[Xn][Yn].toString(),nr=new WeakMap;function rr(e){if(!e||!dr(e))return!1;let t=I(e);if(t===null||t===F[Xn])return!0;let n=F.hasOwnProperty.call(t,Yn)&&t[Yn];if(n===Object)return!0;if(!V(n))return!1;let r=nr.get(n);return r===void 0&&(r=Function.toString.call(n),nr.set(n,r)),r===tr}function ir(e,t,n=!0){z(e)===0?(n?Reflect.ownKeys(e):F.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function z(e){let t=e[N];return t?t.type_:cr(e)?1:lr(e)?2:ur(e)?3:0}var ar=(e,t,n=z(e))=>n===2?e.has(t):F[Xn].hasOwnProperty.call(e,t),B=(e,t,n=z(e))=>n===2?e.get(t):e[t],or=(e,t,n,r=z(e))=>{r===2?e.set(t,n):r===3?e.add(n):e[t]=n};function sr(e,t){return e===t?e!==0||1/e==1/t:e!==e&&t!==t}var cr=Array.isArray,lr=e=>e instanceof Map,ur=e=>e instanceof Set,dr=e=>typeof e==`object`,V=e=>typeof e==`function`,fr=e=>typeof e==`boolean`;function pr(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var mr=e=>dr(e)?e?.[N]:null,H=e=>e.copy_||e.base_,hr=e=>e.modified_?e.copy_:e.base_;function gr(e,t){if(lr(e))return new Map(e);if(ur(e))return new Set(e);if(cr(e))return Array[Xn].slice.call(e);let n=rr(e);if(t===!0||t===`class_only`&&!n){let t=F.getOwnPropertyDescriptors(e);delete t[N];let n=Reflect.ownKeys(t);for(let r=0;r<n.length;r++){let i=n[r],a=t[i];a[$n]===!1&&(a[$n]=!0,a[Zn]=!0),(a.get||a.set)&&(t[i]={[Zn]:!0,[$n]:!0,[Qn]:a[Qn],[er]:e[i]})}return F.create(I(e),t)}else{let t=I(e);if(t!==null&&n)return{...e};let r=F.create(t);return F.assign(r,e)}}function _r(e,t=!1){return br(e)||L(e)||!R(e)?e:(z(e)>1&&F.defineProperties(e,{set:yr,add:yr,clear:yr,delete:yr}),F.freeze(e),t&&ir(e,(e,t)=>{_r(t,!0)},!1),e)}function vr(){P(2)}var yr={[er]:vr};function br(e){return e===null||!dr(e)?!0:F.isFrozen(e)}var xr=`MapSet`,Sr=`Patches`,Cr=`ArrayMethods`,wr={};function U(e){let t=wr[e];return t||P(0,e),t}var Tr=e=>!!wr[e];function Er(e,t){wr[e]||(wr[e]=t)}var Dr,Or=()=>Dr,kr=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:Tr(xr)?U(xr):void 0,arrayMethodsPlugin_:Tr(Cr)?U(Cr):void 0});function Ar(e,t){t&&(e.patchPlugin_=U(Sr),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function jr(e){Mr(e),e.drafts_.forEach(Pr),e.drafts_=null}function Mr(e){e===Dr&&(Dr=e.parent_)}var Nr=e=>Dr=kr(Dr,e);function Pr(e){let t=e[N];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Fr(e,t){t.unfinalizedDrafts_=t.drafts_.length;let n=t.drafts_[0];if(e!==void 0&&e!==n){n[N].modified_&&(jr(t),P(4)),R(e)&&(e=Ir(t,e));let{patchPlugin_:r}=t;r&&r.generateReplacementPatches_(n[N].base_,e,t)}else e=Ir(t,n);return Lr(t,e,!0),jr(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e===qn?void 0:e}function Ir(e,t){if(br(t))return t;let n=t[N];if(!n)return Gr(t,e.handledSet_,e);if(!zr(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){let{callbacks_:t}=n;if(t)for(;t.length>0;)t.pop()(e);Ur(n,e)}return n.copy_}function Lr(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&_r(t,n)}function Rr(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var zr=(e,t)=>e.scope_===t,Br=[];function Vr(e,t,n,r){let i=H(e),a=e.type_;if(r!==void 0&&B(i,r,a)===t){or(i,r,n,a);return}if(!e.draftLocations_){let t=e.draftLocations_=new Map;ir(i,(e,n)=>{if(L(n)){let r=t.get(n)||[];r.push(e),t.set(n,r)}})}let o=e.draftLocations_.get(t)??Br;for(let e of o)or(i,e,n,a)}function Hr(e,t,n){e.callbacks_.push(function(r){let i=t;if(!i||!zr(i,r))return;r.mapSetPlugin_?.fixSetContents(i);let a=hr(i);Vr(e,i.draft_??i,a,n),Ur(i,r)})}function Ur(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let r=n.getPath(e);r&&n.generatePatches_(e,r,t)}Rr(e)}}function Wr(e,t,n){let{scope_:r}=e;if(L(n)){let i=n[N];zr(i,r)&&i.callbacks_.push(function(){$r(e),Vr(e,n,hr(i),t)})}else R(n)&&e.callbacks_.push(function(){let i=H(e);e.type_===3?i.has(n)&&Gr(n,r.handledSet_,r):B(i,t,e.type_)===n&&r.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Gr(B(e.copy_,t,e.type_),r.handledSet_,r)})}function Gr(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||L(e)||t.has(e)||!R(e)||br(e)?e:(t.add(e),ir(e,(r,i)=>{if(L(i)){let t=i[N];zr(t,n)&&(or(e,r,hr(t),e.type_),Rr(t))}else R(i)&&Gr(i,t,n)}),e)}function Kr(e,t){let n=cr(e),r={type_:+!!n,scope_:t?t.scope_:Or(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},i=r,a=qr;n&&(i=[r],a=Jr);let{revoke:o,proxy:s}=Proxy.revocable(i,a);return r.draft_=s,r.revoke_=o,[s,r]}var qr={get(e,t){if(t===N)return e;let n=e.scope_.arrayMethodsPlugin_,r=e.type_===1&&typeof t==`string`;if(r&&n?.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);let i=H(e);if(!ar(i,t,e.type_))return Xr(e,i,t);let a=i[t];if(e.finalized_||!R(a)||r&&e.operationMethod&&n?.isMutatingArrayMethod(e.operationMethod)&&pr(t))return a;if(a===Yr(e.base_,t)){$r(e);let n=e.type_===1?+t:t,r=ti(e.scope_,a,e,n);return e.copy_[n]=r}return a},has(e,t){return t in H(e)},ownKeys(e){return Reflect.ownKeys(H(e))},set(e,t,n){let r=Zr(H(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){let r=Yr(H(e),t),i=r?.[N];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(sr(n,r)&&(n!==void 0||ar(e.base_,t,e.type_)))return!0;$r(e),Qr(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])?!0:(e.copy_[t]=n,e.assigned_.set(t,!0),Wr(e,t,n),!0)},deleteProperty(e,t){return $r(e),Yr(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),Qr(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let n=H(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{[$n]:!0,[Zn]:e.type_!==1||t!==`length`,[Qn]:r[Qn],[er]:n[t]}},defineProperty(){P(11)},getPrototypeOf(e){return I(e.base_)},setPrototypeOf(){P(12)}},Jr={};for(let e in qr){let t=qr[e];Jr[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}Jr.deleteProperty=function(e,t){return Jr.set.call(this,e,t,void 0)},Jr.set=function(e,t,n){return qr.set.call(this,e[0],t,n,e[0])};function Yr(e,t){let n=e[N];return(n?H(n):e)[t]}function Xr(e,t,n){let r=Zr(t,n);return r?er in r?r[er]:r.get?.call(e.draft_):void 0}function Zr(e,t){if(!(t in e))return;let n=I(e);for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=I(n)}}function Qr(e){e.modified_||(e.modified_=!0,e.parent_&&Qr(e.parent_))}function $r(e){e.copy_||=(e.assigned_=new Map,gr(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var ei=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,n)=>{if(V(e)&&!V(t)){let n=t;t=e;let r=this;return function(e=n,...i){return r.produce(e,e=>t.call(this,e,...i))}}V(t)||P(6),n!==void 0&&!V(n)&&P(7);let r;if(R(e)){let i=Nr(this),a=ti(i,e,void 0),o=!0;try{r=t(a),o=!1}finally{o?jr(i):Mr(i)}return Ar(i,n),Fr(r,i)}else if(!e||!dr(e)){if(r=t(e),r===void 0&&(r=e),r===qn&&(r=void 0),this.autoFreeze_&&_r(r,!0),n){let t=[],i=[];U(Sr).generateReplacementPatches_(e,r,{patches_:t,inversePatches_:i}),n(t,i)}return r}else P(1,e)},this.produceWithPatches=(e,t)=>{if(V(e))return(t,...n)=>this.produceWithPatches(t,t=>e(t,...n));let n,r;return[this.produce(e,t,(e,t)=>{n=e,r=t}),n,r]},fr(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),fr(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),fr(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){R(e)||P(8),L(e)&&(e=ni(e));let t=Nr(this),n=ti(t,e,void 0);return n[N].isManual_=!0,Mr(t),n}finishDraft(e,t){let n=e&&e[N];(!n||!n.isManual_)&&P(9);let{scope_:r}=n;return Ar(r,t),Fr(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){let r=t[n];if(r.path.length===0&&r.op===`replace`){e=r.value;break}}n>-1&&(t=t.slice(n+1));let r=U(Sr).applyPatches_;return L(e)?r(e,t):this.produce(e,e=>r(e,t))}};function ti(e,t,n,r){let[i,a]=lr(t)?U(xr).proxyMap_(t,n):ur(t)?U(xr).proxySet_(t,n):Kr(t,n);return(n?.scope_??Or()).drafts_.push(i),a.callbacks_=n?.callbacks_??[],a.key_=r,n&&r!==void 0?Hr(n,a,r):a.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:t}=e;a.modified_&&t&&t.generatePatches_(a,[],e)}),i}function ni(e){return L(e)||P(10,e),ri(e)}function ri(e){if(!R(e)||br(e))return e;let t=e[N],n,r=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=gr(e,t.scope_.immer_.useStrictShallowCopy_),r=t.scope_.immer_.shouldUseStrictIteration()}else n=gr(e,!0);return ir(n,(e,t)=>{or(n,e,ri(t))},r),t&&(t.finalized_=!1),n}function ii(){function e(n,r=[]){if(n.key_!==void 0){let e=n.parent_.copy_??n.parent_.base_,t=mr(B(e,n.key_)),i=B(e,n.key_);if(i===void 0||i!==n.draft_&&i!==n.base_&&i!==n.copy_||t!=null&&t.base_!==n.base_)return null;let a=n.parent_.type_===3,o;if(a){let e=n.parent_;o=Array.from(e.drafts_.keys()).indexOf(n.key_)}else o=n.key_;if(!(a&&e.size>o||ar(e,o)))return null;r.push(o)}if(n.parent_)return e(n.parent_,r);r.reverse();try{t(n.copy_,r)}catch{return null}return r}function t(e,t){let n=e;for(let e=0;e<t.length-1;e++){let r=t[e];if(n=B(n,r),!dr(n)||n===null)throw Error(`Cannot resolve path at '${t.join(`/`)}'`)}return n}let n=`replace`,r=`remove`;function i(e,t,n){if(e.scope_.processedForPatches_.has(e))return;e.scope_.processedForPatches_.add(e);let{patches_:r,inversePatches_:i}=n;switch(e.type_){case 0:case 2:return o(e,t,r,i);case 1:return a(e,t,r,i);case 3:return s(e,t,r,i)}}function a(e,t,i,a){let{base_:o,assigned_:s}=e,c=e.copy_;c.length<o.length&&([o,c]=[c,o],[i,a]=[a,i]);let l=e.allIndicesReassigned_===!0;for(let e=0;e<o.length;e++){let r=c[e],u=o[e];if((l||s?.get(e.toString()))&&r!==u){let o=r?.[N];if(o&&o.modified_)continue;let s=t.concat([e]);i.push({op:n,path:s,value:d(r)}),a.push({op:n,path:s,value:d(u)})}}for(let e=o.length;e<c.length;e++){let n=t.concat([e]);i.push({op:`add`,path:n,value:d(c[e])})}for(let e=c.length-1;o.length<=e;--e){let n=t.concat([e]);a.push({op:r,path:n})}}function o(e,t,i,a){let{base_:o,copy_:s,type_:c}=e;ir(e.assigned_,(e,l)=>{let u=B(o,e,c),f=B(s,e,c),p=l?ar(o,e)?n:`add`:r;if(u===f&&p===n)return;let m=t.concat(e);i.push(p===r?{op:p,path:m}:{op:p,path:m,value:d(f)}),a.push(p===`add`?{op:r,path:m}:p===r?{op:`add`,path:m,value:d(u)}:{op:n,path:m,value:d(u)})})}function s(e,t,n,i){let{base_:a,copy_:o}=e,s=0;a.forEach(e=>{if(!o.has(e)){let a=t.concat([s]);n.push({op:r,path:a,value:e}),i.unshift({op:`add`,path:a,value:e})}s++}),s=0,o.forEach(e=>{if(!a.has(e)){let a=t.concat([s]);n.push({op:`add`,path:a,value:e}),i.unshift({op:r,path:a,value:e})}s++})}function c(e,t,r){let{patches_:i,inversePatches_:a}=r;i.push({op:n,path:[],value:t===qn?void 0:t}),a.push({op:n,path:[],value:e})}function l(e,t){return t.forEach(t=>{let{path:i,op:a}=t,o=e;for(let e=0;e<i.length-1;e++){let t=z(o),n=i[e];typeof n!=`string`&&typeof n!=`number`&&(n=``+n),(t===0||t===1)&&(n===`__proto__`||n===Yn)&&P(19),V(o)&&n===Xn&&P(19),o=B(o,n),dr(o)||P(18,i.join(`/`))}let s=z(o),c=u(t.value),l=i[i.length-1];switch(a){case n:switch(s){case 2:return o.set(l,c);case 3:P(16);default:return o[l]=c}case`add`:switch(s){case 1:return l===`-`?o.push(c):o.splice(l,0,c);case 2:return o.set(l,c);case 3:return o.add(c);default:return o[l]=c}case r:switch(s){case 1:return o.splice(l,1);case 2:return o.delete(l);case 3:return o.delete(t.value);default:return delete o[l]}default:P(17,a)}}),e}function u(e){if(!R(e))return e;if(cr(e))return e.map(u);if(lr(e))return new Map(Array.from(e.entries()).map(([e,t])=>[e,u(t)]));if(ur(e))return new Set(Array.from(e).map(u));let t=Object.create(I(e));for(let n in e)t[n]=u(e[n]);return ar(e,Jn)&&(t[Jn]=e[Jn]),t}function d(e){return L(e)?u(e):e}Er(Sr,{applyPatches_:l,generatePatches_:i,generateReplacementPatches_:c,getPath:e})}var ai=new ei,oi=ai.produce,si=ai.produceWithPatches.bind(ai),ci=ai.applyPatches.bind(ai),li=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function ui(e=21){let t=``,n=e;for(;n--;)t+=li[Math.random()*64|0];return t}function di(e){let{enablePatches:t=!1}=e,n=On(),r=e.initialValue,i=new Set;return{on:n.on,value:()=>r,patch:(e,t=ui())=>{i.has(t)||(ii(),r=ci(r,e),i.add(t),n.emit(`updated`,r,void 0,t))},mutate:(e,a=ui())=>{if(!i.has(a))if(i.add(a),t){let[t,i]=si(r,e);r=t,n.emit(`updated`,r,i,a)}else r=oi(r,e),n.emit(`updated`,r,void 0,a)},syncIds:i}}function fi(e){let t=new Map,n=new Map,r=new Set,i=e.connectionMeta.backend===`static`;function a(e,t){let r=n.get(e);return r&&typeof r==`object`&&!Array.isArray(r)&&typeof t==`object`&&!Array.isArray(t)?{...r,...t}:t}e.client.register({name:`devframe:rpc:client-state:updated`,type:`event`,handler:(e,n,r)=>{let i=t.get(e);!i||i.syncIds.has(r)||i.mutate(()=>a(e,n),r)}}),e.client.register({name:`devframe:rpc:client-state:patch`,type:`event`,handler:(e,n,r)=>{let i=t.get(e);!i||i.syncIds.has(r)||i.patch(n,r)}});function o(t,n){let r=[];return r.push(n.on(`updated`,(n,r,a)=>{i||(r?e.callEvent(`devframe:rpc:server-state:patch`,t,r,a):e.callEvent(`devframe:rpc:server-state:set`,t,n,a))})),()=>{for(let e of r)e()}}return{keys:()=>Array.from(t.keys()),onKeyAdded(e){return r.add(e),()=>{r.delete(e)}},get:async(s,c)=>{if(c?.initialValue!==void 0&&n.set(s,c.initialValue),t.has(s))return t.get(s);let l=di({initialValue:c?.initialValue,enablePatches:!1});async function u(){if(i||e.callEvent(`devframe:rpc:server-state:subscribe`,s),c?.initialValue!==void 0){t.set(s,l);for(let e of r)e(s);return e.call(`devframe:rpc:server-state:get`,s).then(e=>{e!==void 0&&l.mutate(()=>a(s,e))}).catch(e=>{console.error(`Error getting server state`,e)}),o(s,l),l}else{let n=await e.call(`devframe:rpc:server-state:get`,s);l.mutate(()=>a(s,n)),t.set(s,l);for(let e of r)e(s);return o(s,l),l}}return new Promise(t=>{e.isTrusted?u().then(t):(t(l),e.events.on(`rpc:is-trusted:updated`,e=>{e&&u()}))})}}}var pi=typeof self==`object`?self:globalThis;function mi(e,t){let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(new pi[e](t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(new pi[a](o),i)};return r}function hi(e){return mi(new Map,e)(0)}var gi=``,{toString:_i}={},{keys:vi}=Object;function yi(e){let t=typeof e;if(t!==`object`||!e)return[0,t];let n=_i.call(e).slice(8,-1);switch(n){case`Array`:return[1,gi];case`Object`:return[2,gi];case`Date`:return[3,gi];case`RegExp`:return[4,gi];case`Map`:return[5,gi];case`Set`:return[6,gi];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:n.includes(`Error`)?[7,n]:[2,n]}function bi([e,t]){return e===0&&(t===`function`||t===`symbol`)}function xi(e,t,n,r){let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=yi(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize ${s}`);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of vi(r))(e||!bi(yi(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(bi(yi(n))||bi(yi(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!bi(yi(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a}function Si(e,t={}){let n=[];return xi(!(t.json||t.lossy),!!t.json,new Map,n)(e),n}var{parse:Ci,stringify:wi}=JSON,Ti={json:!0,lossy:!0};function Ei(e){return hi(Ci(e))}function Di(e){return wi(Si(e,Ti))}function Oi(e){return hi(e)}function ki(e){return Di(e)}function Ai(e){return Ei(e)}function ji(e){return typeof e==`object`&&!!e&&e.type===`static`&&typeof e.path==`string`}function Mi(e){return typeof e==`object`&&!!e&&e.type===`query`&&typeof e.records==`object`&&e.records!==null}function Ni(e){return typeof e==`object`&&!!e&&(`output`in e||`error`in e)}function Pi(e){if(e.error)throw vn(e.error);return e.output}function Fi(e){return e.some(e=>e!=null)}function Ii(e){return typeof e==`object`&&e&&`serialization`in e&&`data`in e?e.data:e}function Li(e,t){let n=new Map,r=new Map;function i(e,t){return t===`structured-clone`&&Array.isArray(e)?Oi(e):e}function a(e,t){return i(Ii(e),t)}async function o(e){n.has(e.path)||n.set(e.path,t(e.path).then(t=>a(t,e.serialization)));let r=await n.get(e.path);return Ni(r)?Pi(r):r}async function s(e,n){return r.has(e)||r.set(e,t(e).then(e=>a(e,n))),await r.get(e)}async function c(t,n){if(!(t in e))throw Error(`[devframe-rpc] Function "${t}" not found in dump store`);let r=e[t];if(ji(r)){if(Fi(n))throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`);return await o(r)}if(Mi(r)){let e=sn(n),i=r.records[e];if(i)return Pi(await s(i,r.serialization));if(r.fallback)return Pi(await s(r.fallback,r.serialization));throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}if(!Fi(n))return r;throw Error(`[devframe-rpc] No dump match for "${t}" with args: ${JSON.stringify(n)}`)}return{call:async(e,t)=>await c(e,t),callOptional:async(t,n)=>{if(t in e)return await c(t,n)},callEvent:async(e,t)=>{}}}async function Ri(e){let t=Li(await e.fetchJsonFromBases(Yt),e.fetchJsonFromBases);return{isTrusted:!0,requestTrust:async()=>!0,requestTrustWithToken:async()=>!0,requestTrustWithCode:async()=>null,ensureTrusted:async()=>!0,call:(...e)=>t.call(e[0],e.slice(1)),callEvent:(...e)=>t.callEvent(e[0],e.slice(1)),callOptional:(...e)=>t.callOptional(e[0],e.slice(1))}}var zi=256,Bi=class extends Error{name=`StreamClosedError`};function Vi(e={}){let t=e.id??ui(),n=Math.max(0,e.replayWindow??0),r=On(),i=new AbortController,a=[],o=!1,s=0;function c(e){if(o)throw new Bi(`Cannot write to a closed stream "${t}"`);s+=1,n>0&&(a.push({seq:s,chunk:e}),a.length>n&&a.splice(0,a.length-n)),r.emit(`chunk`,s,e)}function l(e){if(o)return;o=!0;let t=Ui(e);i.abort(e),r.emit(`end`,t)}function u(){o||(o=!0,i.signal.aborted||i.abort(`stream closed`),r.emit(`end`,void 0))}function d(e){o||i.signal.aborted||i.abort(e??`aborted`)}let f=new WritableStream({write(e){c(e)},close(){u()},abort(e){l(e)}});return{id:t,signal:i.signal,get closed(){return o},get lastSeq(){return s},write:c,error:l,close:u,abort:d,writable:f,events:r,buffer:a}}function Hi(e={}){let t=e.id??ui(),n=Math.max(1,e.highWaterMark??zi),r=[],i=0,a=!1,o=!1,s,c,l,u;function d(){if(c){if(r.length>0){let e=r.shift(),t=c;c=void 0,t.resolve({value:e,done:!1});return}if(a){let e=c;if(c=void 0,s){let t=Error(s.message);t.name=s.name,e.reject(t)}else e.resolve({value:void 0,done:!0})}}}function f(){if(l){for(;r.length>0;){let e=r.shift();try{l.enqueue(e)}catch{break}}if(a&&l){try{if(s){let e=Error(s.message);e.name=s.name,l.error(e)}else l.close()}catch{}l=void 0}}}function p(t,s){if(!(a||o)&&!(t<=i)){if(i=t,r.push(s),r.length>n){let t=r.length-n;r.splice(0,t),e.onOverflow?.(t)}d(),u&&f()}}function m(e){a||(a=!0,s=e,d(),u&&f())}function h(){o||a||(o=!0,e.onCancel?.(),m(void 0))}function g(){return u||(u=new ReadableStream({start(e){l=e,f()},cancel(){h()}}),u)}return{id:t,get cancelled(){return o},get done(){return a},get lastSeenSeq(){return i},get readable(){return g()},cancel:h,_push:p,_end:m,[Symbol.asyncIterator](){return{next(){if(r.length>0)return Promise.resolve({value:r.shift(),done:!1});if(a){if(s){let e=Error(s.message);return e.name=s.name,Promise.reject(e)}return Promise.resolve({value:void 0,done:!0})}return new Promise((e,t)=>{c={resolve:e,reject:t}})},return(){return h(),Promise.resolve({value:void 0,done:!0})}}}}}function Ui(e){if(e instanceof Error)return{name:e.name||`Error`,message:e.message};if(typeof e==`string`)return{name:`Error`,message:e};try{return{name:`Error`,message:JSON.stringify(e)}}catch{return{name:`Error`,message:String(e)}}}var Wi=``;function Gi(e,t){return`${e}${Wi}${t}`}function Ki(e){let t=new Map,n=new Map;e.client.register({name:`devframe:streaming:chunk`,type:`event`,handler(e,n,r,i){t.get(Gi(e,n))?._push(r,i)}}),e.client.register({name:`devframe:streaming:end`,type:`event`,handler(e,n,r){let i=Gi(e,n),a=t.get(i);a&&(a._end(r),t.delete(i))}}),e.client.register({name:`devframe:streaming:upload-cancel`,type:`event`,handler(e,t){let r=Gi(e,t),i=n.get(r);i&&(i.abort(`server cancelled upload`),n.delete(r))}}),e.events.on(`rpc:is-trusted:updated`,n=>{if(n)for(let[n,r]of t){if(r.cancelled||r.done)continue;let t=n.indexOf(Wi);if(t<0)continue;let i=n.slice(0,t),a=n.slice(t+1);e.callEvent(`devframe:streaming:subscribe`,i,a,{afterSeq:r.lastSeenSeq})}});function r(n,r,i={}){let a=Gi(n,r),o=t.get(a);if(o)return o;let s=Hi({id:r,highWaterMark:i.highWaterMark,onOverflow(e){console.warn(`[devframe] DF0029: Stream "${n}#${r}" dropped ${e} chunk(s) after exceeding the client high-water mark.`)},onCancel(){e.callEvent(`devframe:streaming:cancel`,n,r),t.delete(a)}});if(t.set(a,s),e.isTrusted)e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:0});else{let i=e.events.on(`rpc:is-trusted:updated`,o=>{o&&(i(),t.has(a)&&!s.cancelled&&!s.done&&e.callEvent(`devframe:streaming:subscribe`,n,r,{afterSeq:s.lastSeenSeq}))})}return s}function i(t,r){let i=Gi(t,r),a=n.get(i);if(a)return a;let o=Vi({id:r});return o.events.on(`chunk`,(n,i)=>{e.callEvent(`devframe:streaming:upload-chunk`,t,r,n,i)}),o.events.on(`end`,a=>{e.callEvent(`devframe:streaming:upload-end`,t,r,a),n.delete(i)}),n.set(i,o),o}return{subscribe:r,upload:i}}var qi=`q`,Ji=`s`;function Yi(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var Xi=Math.random.bind(Math),Zi=`useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict`;function Qi(e=21){let t=``,n=e;for(;n--;)t+=Zi[Xi()*64|0];return t}var $i=6e4,ea=e=>e,ta=ea,{clearTimeout:na,setTimeout:ra}=globalThis;function ia(e,t){let{post:n,on:r,off:i=()=>{},eventNames:a=[],serialize:o=ea,deserialize:s=ta,resolver:c,bind:l=`rpc`,timeout:u=$i,proxify:d=!0}=t,f=!1,p=new Map,m,h;async function g(e,r,i,a){if(f)throw Error(`[birpc] rpc is closed, cannot call "${e}"`);let s={m:e,a:r,t:qi};a&&(s.o=!0);let c=async e=>n(o(e));if(i){await c(s);return}if(m)try{await m}finally{m=void 0}let{promise:l,resolve:d,reject:g}=Yi(),_=Qi();s.i=_;let v;async function y(n=s){return u>=0&&(v=ra(()=>{try{if(t.onTimeoutError?.call(h,e,r)!==!0)throw Error(`[birpc] timeout on calling "${e}"`)}catch(e){g(e)}p.delete(_)},u),typeof v==`object`&&(v=v.unref?.())),p.set(_,{resolve:d,reject:g,timeoutId:v,method:e}),await c(n),l}try{t.onRequest?await t.onRequest.call(h,s,y,d):await y()}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}finally{na(v),p.delete(_)}return l}let _={$call:(e,...t)=>g(e,t,!1),$callOptional:(e,...t)=>g(e,t,!1,!0),$callEvent:(e,...t)=>g(e,t,!0),$callRaw:e=>g(e.method,e.args,e.event,e.optional),$rejectPendingCalls:y,get $closed(){return f},get $meta(){return t.meta},$close:v,$functions:e};h=d?new Proxy({},{get(t,n){if(Object.prototype.hasOwnProperty.call(_,n))return _[n];if(n===`then`&&!a.includes(`then`)&&!(`then`in e))return;let r=(...e)=>g(n,e,!0);if(a.includes(n))return r.asEvent=r,r;let i=(...e)=>g(n,e,!1);return i.asEvent=r,i}}):_;function v(e){f=!0,p.forEach(({reject:t,method:n})=>{let r=Error(`[birpc] rpc is closed, cannot call "${n}"`);if(e)return e.cause??=r,t(e);t(r)}),p.clear(),i(b)}function y(e){let t=Array.from(p.values()).map(({method:t,reject:n})=>e?e({method:t,reject:n}):n(Error(`[birpc]: rejected pending call "${t}".`)));return p.clear(),t}async function b(r,...i){let a;try{a=s(r)}catch(e){if(t.onGeneralError?.call(h,e)!==!0)throw e;return}if(a.t===qi){let{m:r,a:s,o:u}=a,d,f,p=await(c?c.call(h,r,e[r]):e[r]);if(u&&(p||=()=>void 0),!p)f=Error(`[birpc] function "${r}" not found`);else try{d=await p.apply(l===`rpc`?h:e,s)}catch(e){f=e}if(a.i){if(f&&t.onFunctionError&&t.onFunctionError.call(h,f,r,s)===!0)return;if(!f)try{await n(o({t:Ji,i:a.i,r:d}),...i);return}catch(e){if(f=e,t.onGeneralError?.call(h,e,r,s)!==!0)throw e}try{await n(o({t:Ji,i:a.i,e:f}),...i)}catch(e){if(t.onGeneralError?.call(h,e,r,s)!==!0)throw e}}}else{let{i:e,r:t,e:n}=a,r=p.get(e);r&&(na(r.timeoutId),n?r.reject(n):r.resolve(t)),p.delete(e)}}return m=r(b),h}function aa(e,t){let{channel:n,rpcOptions:r={}}=t;return ia(e,{...n,timeout:-1,...r,proxify:!1})}function oa(){}var sa=new Map;function ca(e){let t=e.url;e.authToken&&(t=`${t}?devframe_auth_token=${encodeURIComponent(e.authToken)}`);let n=new WebSocket(t),{onConnected:r=oa,onError:i=oa,onDisconnected:a=oa,definitions:o=sa}=e;n.addEventListener(`open`,e=>{r(e)}),n.addEventListener(`error`,e=>{i(e instanceof Error?e:Error(e.type))}),n.addEventListener(`close`,e=>{a(e)});let s=new Map;return{on:e=>{n.addEventListener(`message`,t=>{e(t.data)})},post:e=>{if(n.readyState===WebSocket.OPEN)n.send(e);else{function t(){n.send(e),n.removeEventListener(`open`,t)}n.addEventListener(`open`,t)}},serialize:e=>{let t;return e.t===`q`?t=e.m:(t=s.get(e.i),s.delete(e.i)),!(e.t===`s`&&`e`in e)&&t&&o.get(t)?.jsonSerializable===!0?Tn(e,t??``):`s:${ki(e)}`},deserialize:e=>{let t=e.startsWith(`s:`)?Ai(e.slice(2)):JSON.parse(e);return t.t===`q`&&t.i&&t.m&&s.set(t.i,t.m),t}}}function la(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var ua=``,da=`?`,fa=`major`,W=`model`,G=`name`,K=`type`,q=`vendor`,J=`version`,Y=`architecture`,pa=`console`,X=`mobile`,Z=`tablet`,Q=`smarttv`,ma=`wearable`,ha=`embedded`,ga=500,_a=`Amazon`,va=`Apple`,ya=`ASUS`,ba=`BlackBerry`,$=`Browser`,xa=`Chrome`,Sa=`Edge`,Ca=`Firefox`,wa=`Google`,Ta=`Huawei`,Ea=`LG`,Da=`Microsoft`,Oa=`Motorola`,ka=`Opera`,Aa=`Samsung`,ja=`Sharp`,Ma=`Sony`,Na=`Xiaomi`,Pa=`Zebra`,Fa=`Facebook`,Ia=`Chromium OS`,La=`Mac OS`;function Ra(e,t={}){let n={};for(let r of Object.keys(e)){let i=t[r];i&&i.length%2==0?n[r]=[...i,...e[r]]:n[r]=e[r]}return n}function za(e){let t={};for(let n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t}function Ba(e){return e.toLowerCase()}function Va(e,t){return typeof e==`string`?Ba(t).includes(Ba(e)):!1}function Ha(e){return typeof e==`string`?e.replace(/[^\d.]/g,ua).split(`.`)[0]:void 0}function Ua(e,t){let n=e.replace(/^\s+/,ua);return t===void 0?n:n.substring(0,t)}function Wa(e,t,n){let r=n??{};for(let n=0;n<t.length;n+=2){let i=t[n],a=t[n+1];for(let t=0;t<i.length;t++){let n=i[t];if(!n)break;let o=n.exec(e);if(o){for(let e=0;e<a.length;e++){let t=o[e+1],n=a[e];if(Array.isArray(n)){let e=n[0],i=n.length;if(i===2){let i=n[1];typeof i==`function`?r[e]=i(t,void 0,r):r[e]=i}else if(i===3){let i=n[1],a=n[2];typeof i==`function`&&!(`exec`in i)&&!(`test`in i)?r[e]=t?i(t,a,r):void 0:r[e]=t?t.replace(i,a):void 0}else i===4&&(r[e]=t?n[3](t.replace(n[1],n[2]),void 0,r):void 0)}else r[n]=t||void 0}return r}}}return r}function Ga(e,t){for(let n in t){let r=t[n];if(Array.isArray(r)&&r.length>0){for(let t=0;t<r.length;t++)if(Va(r[t],e))return n===da?void 0:n}else if(Va(r,e))return n===da?void 0:n}return e}var Ka={"1.0":`/8`,"1.2":`/1`,"1.3":`/3`,"2.0":`/412`,"2.0.2":`/416`,"2.0.3":`/417`,"2.0.4":`/419`,"?":`/`},qa={ME:`4.90`,"NT 3.11":`NT3.51`,"NT 4.0":`NT4.0`,2e3:`NT 5.0`,XP:[`NT 5.1`,`NT 5.2`],Vista:`NT 6.0`,7:`NT 6.1`,8:`NT 6.2`,"8.1":`NT 6.3`,10:[`NT 6.4`,`NT 10.0`],RT:`ARM`},Ja={browser:[[/\b(?:crmo|crios)\/([\w.]+)/i],[J,[G,`Chrome`]],[/edg(?:e|ios|a)?\/([\w.]+)/i],[J,[G,`Edge`]],[/(opera mini)\/([-\w.]+)/i,/(opera [mobileta]{3,6})\b.+version\/([-\w.]+)/i,/(opera)(?:.+version\/|[/ ]+)([\w.]+)/i],[G,J],[/opios[/ ]+([\w.]+)/i],[J,[G,`${ka} Mini`]],[/\bop(?:rg)?x\/([\w.]+)/i],[J,[G,`${ka} GX`]],[/\bopr\/([\w.]+)/i],[J,[G,ka]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[/ ]?([\w.]+)/i],[J,[G,`Baidu`]],[/(kindle)\/([\w.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[/ ]?([\w.]*)/i,/(avant|iemobile|slim)\s?(?:browser)?[/ ]?([\w.]*)/i,/(?:ms|\()(ie) ([\w.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w.]+)/i,/(heytap|ovi)browser\/([\d.]+)/i,/(weibo)__([\d.]+)/i],[G,J],[/\bddg\/([\w.]+)/i],[J,[G,`DuckDuckGo`]],[/(?:\buc? ?browser|juc.+ucweb)[/ ]?([\w.]+)/i],[J,[G,`UC${$}`]],[/microm.+\bqbcore\/([\w.]+)/i,/\bqbcore\/([\w.]+).+microm/i,/micromessenger\/([\w.]+)/i],[J,[G,`WeChat`]],[/konqueror\/([\w.]+)/i],[J,[G,`Konqueror`]],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i],[J,[G,`IE`]],[/ya(?:search)?browser\/([\w.]+)/i],[J,[G,`Yandex`]],[/slbrowser\/([\w.]+)/i],[J,[G,`Smart Lenovo ${$}`]],[/(avast|avg)\/([\w.]+)/i],[[G,/(.+)/,`$1 Secure ${$}`],J],[/\bfocus\/([\w.]+)/i],[J,[G,`${Ca} Focus`]],[/\bopt\/([\w.]+)/i],[J,[G,`${ka} Touch`]],[/coc_coc\w+\/([\w.]+)/i],[J,[G,`Coc Coc`]],[/dolfin\/([\w.]+)/i],[J,[G,`Dolphin`]],[/coast\/([\w.]+)/i],[J,[G,`${ka} Coast`]],[/miuibrowser\/([\w.]+)/i],[J,[G,`MIUI ${$}`]],[/fxios\/([-\w.]+)/i],[J,[G,Ca]],[/\bqihu|(qi?ho{0,2}|360)browser/i],[[G,`360 ${$}`]],[/(oculus|sailfish|huawei|vivo)browser\/([\w.]+)/i],[[G,/(.+)/,`$1 ${$}`],J],[/samsungbrowser\/([\w.]+)/i],[J,[G,`${Aa} Internet`]],[/(comodo_dragon)\/([\w.]+)/i],[[G,/_/g,` `],J],[/metasr[/ ]?([\d.]+)/i],[J,[G,`Sogou Explorer`]],[/(sogou)mo\w+\/([\d.]+)/i],[[G,`Sogou Mobile`],J],[/(electron)\/([\w.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w.]+))/i,/m?(qqbrowser|2345Explorer)[/ ]?([\w.]+)/i],[G,J],[/(lbbrowser)/i,/\[(linkedin)app\]/i],[G],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w.]+);)/i],[[G,Fa],J],[/(Klarna)\/([\w.]+)/i,/(kakao(?:talk|story))[/ ]([\w.]+)/i,/(naver)\(.*?(\d+\.[\w.]+).*\)/i,/safari (line)\/([\w.]+)/i,/\b(line)\/([\w.]+)\/iab/i,/(alipay)client\/([\w.]+)/i,/(twitter)(?:and| f.+e\/([\w.]+))/i,/(chromium|instagram|snapchat)[/ ]([-\w.]+)/i],[G,J],[/\bgsa\/([\w.]+) .*safari\//i],[J,[G,`GSA`]],[/musical_ly(?:.+app_?version\/|_)([\w.]+)/i],[J,[G,`TikTok`]],[/headlesschrome(?:\/([\w.]+)| )/i],[J,[G,`${xa} Headless`]],[/ wv\).+(chrome)\/([\w.]+)/i],[[G,`${xa} WebView`],J],[/droid.+ version\/([\w.]+)\b.+(?:mobile safari|safari)/i],[J,[G,`Android ${$}`]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w.]+)/i],[G,J],[/version\/([\w.,]+) .*mobile\/\w+ (safari)/i],[J,[G,`Mobile Safari`]],[/version\/([\w(.|,)]+) .*(mobile ?safari|safari)/i],[J,G],[/webkit.+?(mobile ?safari|safari)(\/[\w.]+)/i],[G,[J,Ga,Ka]],[/(webkit|khtml)\/([\w.]+)/i],[G,J],[/(navigator|netscape\d?)\/([-\w.]+)/i],[[G,`Netscape`],J],[/mobile vr; rv:([\w.]+)\).+firefox/i],[J,[G,`${Ca} Reality`]],[/ekiohf.+(flow)\/([\w.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[/ ]?([\w.+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w.]+)$/i,/(firefox)\/([\w.]+)/i,/(mozilla)\/([\w.]+) .+rv:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[. ]?browser)[-/ ]?v?([\w.]+)/i,/(links) \(([\w.]+)/i,/panasonic;(viera)/i],[G,J],[/(cobalt)\/([\w.]+)/i],[G,[J,/master.|lts./,``]]],cpu:[[/(amd|x(?:(?:86|64)[-_])?|wow|win)64[;)]/i],[[Y,`amd64`]],[/(ia32(?=;))/i],[[Y,Ba]],[/((?:i[346]|x)86)[;)]/i],[[Y,`ia32`]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[Y,`arm64`]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[Y,`armhf`]],[/windows (ce|mobile); ppc;/i],[[Y,`arm`]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[Y,/ower/,ua,Ba]],[/(sun4\w)[;)]/i],[[Y,`sparc`]],[/(avr32|ia64(?=;)|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[Y,Ba]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[W,[q,Aa],[K,Z]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?\d+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[W,[q,Aa],[K,X]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[W,[q,va],[K,X]],[/\((ipad);[-\w),; ]+apple/i,/applecoremedia\/[\w.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[W,[q,va],[K,Z]],[/(macintosh);/i],[W,[q,va]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[W,[q,ja],[K,X]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[W,[q,Ta],[K,Z]],[/(?:huawei|honor)([-\w ]+)[;)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][0-359c][adn]?)\b(?!.+d\/s)/i],[W,[q,Ta],[K,X]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?[\w ]+)(?: bui|\))/i,/oid[^)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?\d?\w?[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[W,/_/g,` `],[q,Na],[K,X]],[/oid[^)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?pad[\w ]+)(?: bui|\))/i],[[W,/_/g,` `],[q,Na],[K,Z]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[W,[q,`OPPO`],[K,X]],[/\b(opd2\d{3}a?) bui/i],[W,[q,`OPPO`],[K,Z]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[W,[q,`Vivo`],[K,X]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[W,[q,`Realme`],[K,X]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w() ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[W,[q,Oa],[K,X]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[W,[q,Oa],[K,Z]],[/((?=lg)?[vl]k-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[W,[q,Ea],[K,Z]],[/(lm(?:-?f100[nv]?|-[\w.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?(\w+) bui/i],[W,[q,Ea],[K,X]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab[\w ]+|yt[-\w]{6}|tb[-\w]{6})/i],[W,[q,`Lenovo`],[K,Z]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w.]*)/i],[[W,/_/g,` `],[q,`Nokia`],[K,X]],[/(pixel c)\b/i],[W,[q,wa],[K,Z]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[W,[q,wa],[K,X]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]?\d\.))/i],[W,[q,Ma],[K,X]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[W,`Xperia Tablet`],[q,Ma],[K,Z]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[W,[q,`OnePlus`],[K,X]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[W,[q,_a],[K,Z]],[/((?:sd|kf)[0349hijor-uw]+)( bui|\)).+silk\//i],[[W,/(.+)/g,`Fire Phone $1`],[q,_a],[K,X]],[/(playbook);[-\w),; ]+(rim)/i],[W,q,[K,Z]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[W,[q,ba],[K,X]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[W,[q,ya],[K,Z]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[W,[q,ya],[K,X]],[/(nexus 9)/i],[W,[q,`HTC`],[K,Z]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!;|\.)|sony(?!-bra))[-_ ]?([-\w]*)/i],[q,[W,/_/g,` `],[K,X]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[W,[q,`Acer`],[K,Z]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[W,[q,`Meizu`],[K,X]],[/; ((?:power )?armor[\w ]{0,8})(?: bui|\))/i],[W,[q,`Ulefone`],[K,X]],[/(blackberry|benq|palm(?=-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[q,W,[K,X]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[q,W,[K,Z]],[/(surface duo)/i],[W,[q,Da],[K,Z]],[/droid [\d.]+; (fp\du?)(?: b|\))/i],[W,[q,`Fairphone`],[K,X]],[/(u304aa)/i],[W,[q,`AT&T`],[K,X]],[/\bsie-(\w*)/i],[W,[q,`Siemens`],[K,X]],[/\b(rct\w+) b/i],[W,[q,`RCA`],[K,Z]],[/\b(venue[\d ]{2,7}) b/i],[W,[q,`Dell`],[K,Z]],[/\b(q(?:mv|ta)\w+) b/i],[W,[q,`Verizon`],[K,Z]],[/\b(?:barnes[& ]+noble |bn[rt])([\w+ ]*) b/i],[W,[q,`Barnes & Noble`],[K,Z]],[/\b(tm\d{3}\w+) b/i],[W,[q,`NuVision`],[K,Z]],[/\b(k88) b/i],[W,[q,`ZTE`],[K,Z]],[/\b(nx\d{3}j) b/i],[W,[q,`ZTE`],[K,X]],[/\b(gen\d{3}) b.+49h/i],[W,[q,`Swiss`],[K,X]],[/\b(zur\d{3}) b/i],[W,[q,`Swiss`],[K,Z]],[/\b((zeki)?tb.*\b) b/i],[W,[q,`Zeki`],[K,Z]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[q,`Dragon Touch`],W,[K,Z]],[/\b(ns-?\w{0,9}) b/i],[W,[q,`Insignia`],[K,Z]],[/\b((nxa|next)-?\w{0,9}) b/i],[W,[q,`NextBook`],[K,Z]],[/\b(xtreme_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[q,`Voice`],W,[K,X]],[/\b(lvtel-)?(v1[12]) b/i],[[q,`LvTel`],W,[K,X]],[/\b(ph-1) /i],[W,[q,`Essential`],[K,X]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[W,[q,`Envizen`],[K,Z]],[/\b(trio[-\w. ]+) b/i],[W,[q,`MachSpeed`],[K,Z]],[/\btu_(1491) b/i],[W,[q,`Rotor`],[K,Z]],[/(shield[\w ]+) b/i],[W,[q,`Nvidia`],[K,Z]],[/(sprint) (\w+)/i],[q,W,[K,X]],[/(kin\.[onetw]{3})/i],[[W,/\./g,` `],[q,Da],[K,X]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[W,[q,Pa],[K,Z]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[W,[q,Pa],[K,X]],[/smart-tv.+(samsung)/i],[q,[K,Q]],[/hbbtv.+maple;(\d+)/i],[[W,/^/,`SmartTV`],[q,Aa],[K,Q]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[q,Ea],[K,Q]],[/(apple) ?tv/i],[q,[W,`${va} TV`],[K,Q]],[/crkey/i],[[W,`${xa}cast`],[q,wa],[K,Q]],[/droid.+aft(\w+)( bui|\))/i],[W,[q,_a],[K,Q]],[/\(dtv[);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[W,[q,ja],[K,Q]],[/(bravia[\w ]+)( bui|\))/i],[W,[q,Ma],[K,Q]],[/(mitv-\w{5}) bui/i],[W,[q,Na],[K,Q]],[/Hbbtv.*(technisat) (.*);/i],[q,W,[K,Q]],[/\b(roku)[\dx]*[)/]((?:dvp-)?[\d.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w+ ]*; *(\w[^;]*);([^;]*)/i],[[q,Ua],[W,Ua],[K,Q]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[K,Q]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[q,W,[K,pa]],[/droid.+; (shield) bui/i],[W,[q,`Nvidia`],[K,pa]],[/(playstation [345portablevi]+)/i],[W,[q,Ma],[K,pa]],[/\b(xbox(?: one)?(?!; xbox))[); ]/i],[W,[q,Da],[K,pa]],[/((pebble))app/i],[q,W,[K,ma]],[/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i],[W,[q,va],[K,ma]],[/droid.+; (glass) \d/i],[W,[q,wa],[K,ma]],[/droid.+; (wt63?0{2,3})\)/i],[W,[q,Pa],[K,ma]],[/(quest( \d| pro)?)/i],[W,[q,Fa],[K,ma]],[/(tesla)(?: qtcarbrowser|\/[-\w.]+)/i],[q,[K,ha]],[/(aeobc)\b/i],[W,[q,_a],[K,ha]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[W,[K,X]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[W,[K,Z]],[/\b((tablet|tab)[;/]|focus\/\d(?!.+mobile))/i],[[K,Z]],[/(phone|mobile(?:[;/]| [ \w/.]*safari)|pda(?=.+windows ce))/i],[[K,X]],[/(android[-\w. ]{0,9});.+buil/i],[W,[q,`Generic`]]],engine:[[/windows.+ edge\/([\w.]+)/i],[J,[G,`${Sa}HTML`]],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i],[J,[G,`Blink`]],[/(presto)\/([\w.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w.]+)/i,/ekioh(flow)\/([\w.]+)/i,/(khtml|tasman|links)[/ ]\(?([\w.]+)/i,/(icab)[/ ]([23]\.[\d.]+)/i,/\b(libweb)/i],[G,J],[/rv:([\w.]{1,9})\b.+(gecko)/i],[J,G]],os:[[/microsoft (windows) (vista|xp)/i],[G,J],[/(windows (?:phone(?: os)?|mobile))[/ ]?([.\w ]*)/i],[G,[J,Ga,qa]],[/windows nt 6\.2; (arm)/i,/windows[/ ]?([ntce\d. ]+\w)(?!.+xbox)/i,/(?:win(?=[39n])|win 9x )([nt\d.]+)/i],[[J,Ga,qa],[G,`Windows`]],[/ip[honead]{2,4}\b(?:.*os (\w+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[/ ])([\d.]+)/i,/cfnetwork\/.+darwin/i],[[J,/_/g,`.`],[G,`iOS`]],[/(mac os x) ?([\w. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[G,La],[J,/_/g,`.`]],[/droid ([\w.]+)\b.+(android[- ]x86|harmonyos)/i],[J,G],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-/ ]?([\w.]*)/i,/(blackberry)\w*\/([\w.]*)/i,/(tizen|kaios)[/ ]([\w.]+)/i,/\((series40);/i],[G,J],[/\(bb(10);/i],[J,[G,ba]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-/ ]?([\w.]*)/i],[J,[G,`Symbian`]],[/mozilla\/[\d.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w.]+)/i],[J,[G,`${Ca} OS`]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w.]+)/i],[J,[G,`webOS`]],[/watch(?: ?os[,/]|\d,\d\/)([\d.]+)/i],[J,[G,`watchOS`]],[/crkey\/([\d.]+)/i],[J,[G,`${xa}cast`]],[/(cros) \w+(?:\)| ([\w.]+)\b)/i],[[G,Ia],J],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w.]*)/i,/(mint)[/() ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-/ ]?(?!chrom|package)([-\w.]*)/i,/(hurd|linux) ?([\w.]*)/i,/(gnu) ?([\w.]*)/i,/\b([-e-hrntopcs]{0,5}bsd|dragonfly)[/ ]?(?!amd|[ix346]{1,2}86)([\w.]*)/i,/(haiku) (\w+)/i],[G,J],[/(sunos) ?([\w.]*)/i],[[G,`Solaris`],J],[/((?:open)?solaris)[-/ ]?([\w.]*)/i,/(aix) ((\d)(?=[.) ])[\w.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w.]*)/i],[G,J]]};function Ya(e){return typeof e==`object`&&!!e}Object.freeze(za([G,J,fa])),Object.freeze(za([Y])),Object.freeze(za([W,q,K,pa,X,Q,Z,ma,ha])),Object.freeze(za([G,J])),Object.freeze(za([G,J]));function Xa(){if(!(typeof window>`u`||!window.navigator))return window.navigator}function Za(e){return e.length>ga?Ua(e,ga):e}function Qa(e){if(typeof e==`string`)return{ua:Za(e),isSelfNavigator:!1,navigator:void 0,userAgentData:void 0,regexMap:Ja};let t=Xa(),n=Za(t&&t.userAgent?t.userAgent:ua);return{ua:n,isSelfNavigator:!!(t&&t.userAgent===n),navigator:t,userAgentData:t?.userAgentData,regexMap:Ja}}function $a(e,t){if(!t&&!Ya(e))return Qa(e);let n=Xa(),r=Ya(e)?void 0:e,i=Ya(e)?e:t,a=Za(r||(n&&n.userAgent?n.userAgent:ua)),o=n?.userAgentData;return{ua:a,isSelfNavigator:!!(n&&n.userAgent===a),navigator:n,userAgentData:o,regexMap:i?Ra(Ja,i):Ja}}function eo(e){let t={name:void 0,version:void 0,major:void 0};return Wa(e.ua,e.regexMap.browser,t),t.major=Ha(t.version),e.isSelfNavigator&&e.navigator?.brave&&typeof e.navigator.brave.isBrave==`function`&&(t.name=`Brave`),t}function to(e){let t={architecture:void 0};return Wa(e.ua,e.regexMap.cpu,t),t}function no(e){let t={vendor:void 0,model:void 0,type:void 0};return Wa(e.ua,e.regexMap.device,t),e.isSelfNavigator&&!t.type&&e.userAgentData?.mobile&&(t.type=X),e.isSelfNavigator&&t.model===`Macintosh`&&e.navigator&&e.navigator.standalone!==void 0&&e.navigator.maxTouchPoints&&e.navigator.maxTouchPoints>2&&(t.model=`iPad`,t.type=Z),t}function ro(e){let t={name:void 0,version:void 0};return Wa(e.ua,e.regexMap.engine,t),t}function io(e){let t={name:void 0,version:void 0};return Wa(e.ua,e.regexMap.os,t),e.isSelfNavigator&&!t.name&&e.userAgentData?.platform&&e.userAgentData.platform!==`Unknown`&&(t.name=e.userAgentData.platform.replace(/chrome os/i,Ia).replace(/macos/i,La)),t}function ao(e,t){let n,r,i,a,o,s,c=()=>n||=$a(e,t);return{get ua(){return c().ua},get browser(){return r||=eo(c()),r},get engine(){return i||=ro(c()),i},get os(){return a||=io(c()),a},get device(){return o||=no(c()),o},get cpu(){return s||=to(c()),s}}}function oo(e,t,n){let r=n.protocol===`https:`?`wss:`:`ws:`,i=(()=>{try{return new URL(t,n.href)}catch{return new URL(n.href)}})();if(e&&typeof e==`object`){if(e.host!=null||e.port!=null){let t=e.host??`${n.hostname}:${e.port}`,i=new URL(e.path??`/`,`${r}//${t}`);return i.protocol=r,i.href}let t=new URL(e.path??``,i);return t.protocol=r,t.href}if(typeof e==`number`)return`${r}//${n.hostname}:${e}`;let a=e??``;if(/^wss?:\/\//i.test(a))return a;if(/^https?:\/\//i.test(a))return Hn(a,/^https/i.test(a)?`wss://`:`ws://`);let o=new URL(a,i);return o.protocol=r,o.href}function so(e){let{authToken:t,connectionMeta:n,metaBaseUrl:r,events:i,clientRpc:a,rpcOptions:o={},wsOptions:s={}}=e,c=!1,l=la(),u=oo(n.websocket,r??`./`,location),d=new Map;for(let e of n.jsonSerializableMethods??[])d.set(e,{jsonSerializable:!0});let f=aa(a.functions,{channel:ca({url:u,authToken:t,definitions:d,...s}),rpcOptions:o});a.register({name:`devframe:auth:revoked`,type:`event`,handler:()=>{c=!1,i.emit(`rpc:is-trusted:updated`,!1)}});let p=t;function m(){let e=ao(navigator.userAgent);return[e.browser.name,e.browser.version,`|`,e.os.name,e.os.version,e.device.type].filter(e=>e).join(` `)}async function h(e){p=e;let t=await f.$call(`devframe:anonymous:auth`,{authToken:e,ua:m(),origin:location.origin});return c=t.isTrusted,c&&l.resolve(!0),i.emit(`rpc:is-trusted:updated`,c),t.isTrusted}async function g(e){let t=(await f.$call(`devframe:auth:exchange`,{code:e,ua:m(),origin:location.origin}))?.authToken??null;return t&&(p=t,c=!0,l.resolve(!0),i.emit(`rpc:is-trusted:updated`,!0)),t}async function _(){return c?!0:h(p??``)}async function v(e=6e4){if(c&&l.resolve(!0),e<=0)return l.promise;let t=()=>{};return await Promise.race([l.promise.then(t),new Promise((n,r)=>{let i=setTimeout(()=>{r(Error(`[devframe] Timeout waiting for rpc to be trusted`))},e);t=()=>clearTimeout(i)})]),c}return{get isTrusted(){return c},requestTrust:_,requestTrustWithToken:h,requestTrustWithCode:g,ensureTrusted:v,call:(...e)=>f.$call(...e),callEvent:(...e)=>f.$callEvent(...e),callOptional:(...e)=>f.$callOptional(...e)}}function co(e){return e.includes(`:`)}function lo(e,t){return co(t)?t:`${e}:${t}`}function uo(e,t,n){let r=`devframe:settings:${n}:${t}`,i;function a(){return i||=e.sharedState.get(r,{initialValue:{}}),i}return{async get(e){return(await a()).value()[e]},async set(e,t){(await a()).mutate(n=>{n[e]=t})},async delete(e){(await a()).mutate(t=>{delete t[e]})},async all(){return(await a()).value()},async onChange(e){return(await a()).on(`updated`,t=>e(t))}}}function fo(e,t){return{global:uo(e,t,`global`),project:uo(e,t,`project`)}}function po(e,t){return{namespace:t,base:e,rpc:{namespace:t,register(n){if(co(n.name))throw Error(`[devframe] Scoped client RPC registration for namespace "${t}" received an already-namespaced function name "${n.name}". Pass a bare name without a ":" separator.`);e.client.register({...n,name:`${t}:${n.name}`})},call:((n,...r)=>e.call(lo(t,n),...r)),callEvent:((n,...r)=>e.callEvent(lo(t,n),...r)),callOptional:((n,...r)=>e.callOptional(lo(t,n),...r)),sharedState:((n,r)=>e.sharedState.get(lo(t,n),r)),streaming:{subscribe:(n,r,i)=>e.streaming.subscribe(lo(t,n),r,i),upload:(n,r)=>e.streaming.upload(lo(t,n),r)}},settings:fo(e,t),scope:e.scope}}var mo=`__DEVFRAME_CONNECTION_META__`,ho=`__DEVFRAME_CONNECTION_AUTH_TOKEN__`;function go(e){let t=[()=>e,()=>localStorage.getItem(ho)??void 0,()=>window?.[ho],()=>globalThis?.[ho],()=>parent.window?.[ho]];for(let e of t)try{let t=e();if(t)return t}catch{}}function _o(e){try{localStorage.setItem(ho,e)}catch{}globalThis[ho]=e}function vo(){let e=[()=>window?.[mo],()=>globalThis?.[mo],()=>parent.window?.[mo]];for(let t of e)try{let e=t();if(e)return e}catch{}}async function yo(e={}){let{baseURL:t=`./`,rpcOptions:n={},cacheOptions:r=!1}=e,i=On(),a=Array.isArray(t)?t:[t],o=e.connectionMeta||vo(),s=a[0]??`./`;function c(){let e=Rn(Jt,s);try{return new URL(e,globalThis.location?.href).href}catch{return e}}if(!o){let e=[];for(let t of a)try{o=await fetch(Rn(Jt,t)).then(e=>e.json()),s=t,globalThis[mo]=o;break}catch(t){e.push(t)}if(!o)throw Error(`Failed to get connection meta from ${a.join(`, `)}`,{cause:e})}let l=new Sn({functions:[],...typeof e.cacheOptions==`object`?e.cacheOptions:{}}),u={rpc:void 0},d=go(e.authToken);d&&_o(d);let f=new Cn(u);async function p(e){let t=[s,...a.filter(e=>e!==s)].filter(e=>e!=null),n=[];for(let r of t)try{return await fetch(Rn(e,r)).then(t=>{if(!t.ok)throw Error(`Failed to fetch ${e} from ${r}: ${t.status}`);return t.json()})}catch(e){n.push(e)}throw Error(`Failed to load ${e} from ${t.join(`, `)}`,{cause:n})}let m=o.backend===`static`?await Ri({fetchJsonFromBases:p}):so({authToken:d,connectionMeta:o,metaBaseUrl:c(),events:i,clientRpc:f,rpcOptions:{...n,async onRequest(e,t,i){if(await n.onRequest?.call(this,e,t,i),r&&l?.validate(e.m)){let n=l.cached(e.m,e.a);if(n)return i(n);{let n=await t(e);l?.apply(e,n)}}else await t(e)}},wsOptions:e.wsOptions}),h;try{h=new BroadcastChannel(`devframe-auth`)}catch{}let g={events:i,get isTrusted(){return m.isTrusted},connectionMeta:o,ensureTrusted:m.ensureTrusted,requestTrust:m.requestTrust,requestTrustWithToken:async e=>(_o(e),m.requestTrustWithToken(e)),requestTrustWithCode:async e=>{let t=await m.requestTrustWithCode(e);if(!t)return!1;_o(t);try{h?.postMessage({type:`auth-update`,authToken:t})}catch{}return!0},call:m.call,callEvent:m.callEvent,callOptional:m.callOptional,client:f,sharedState:void 0,streaming:void 0,cacheManager:l,scope:void 0};g.sharedState=fi(g),g.streaming=Ki(g);let _=new Map;g.scope=(e=>{if(!e)return g;let t=_.get(e);return t||(t=po(g,e),_.set(e,t)),t}),u.rpc=g,m.requestTrust();let v=e.otpParam??`devframe_otp`;return v&&Kn(g,{param:v}),h&&(h.onmessage=e=>{e.data?.type===`auth-update`&&e.data.authToken&&g.requestTrustWithToken(e.data.authToken)}),g}var bo=yo;function xo(){let[e,t]=x(null),[n,r]=x(null);return bo().then(async e=>{t(e.connectionMeta.backend);try{await e.ensureTrusted(2e3)}catch{}let n=e.callOptional,i=await n(`devframe-a11y-inspector:get-config`);i&&r(i)}).catch(()=>{}),{backend:e,config:n}}var So=O(`<div class=state><p class=state__title>No page connected</p><p class=state__body>Load the inspector agent in the app you want to check, then this panel will list its accessibility issues live.</p><code class=state__code>&lt;script type="module" src="…/inject.js">&lt;/script>`),Co=O(`<div class=state><p class=state__title>Scanning the page…</p><p class=state__body>Running axe-core against the connected document.`),wo=O(`<div class="state state--clean"><p class=state__title>No WCAG A &amp; AA violations</p><p class=state__body>axe-core found nothing to flag on this page. Re-run after changes to keep it that way.`),To=O(`<div class=state><p class=state__title>No <!> issues</p><p class=state__body> <!> at other severities. Clear the filter to see them.`),Eo=O(`<div class=app><p class=visually-hidden aria-live=polite></p><div class=scroll>`);function Do(){let e=qt(),t=xo(),[n,r]=x(null),[i,a]=x(new Set),o=()=>e.report()?.counts??yt(),s=()=>e.report()?.violations??[],c=()=>s().length,l=C(()=>{let e=n();return e?s().filter(t=>t.impact===e):s()});function u(e){r(t=>t===e?null:e)}function d(e){a(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}let f=()=>e.report()?`${c()} accessibility ${c()===1?`issue`:`issues`} found`:e.scanning()?`Scanning the page`:``;return(()=>{var r=Eo(),a=r.firstChild,s=a.nextSibling;return A(r,D(At,{get agentReady(){return e.agentReady()},get scanning(){return e.scanning()},get onRescan(){return e.rescan}}),a),A(r,D(jt,{get report(){return e.report},get backend(){return t.backend}}),a),A(r,D(Ie,{get when(){return Ke(()=>!!e.report())()&&c()>0},get children(){return D(Mt,{get counts(){return o()},get active(){return n()},onToggle:u})}}),a),A(a,f),A(s,D(Le,{get children(){return[D(Re,{get when(){return Ke(()=>!e.report())()&&!e.agentReady()},get children(){var e=So(),t=e.firstChild;return A(e,D(Lt,{class:`state__glyph`}),t),e}}),D(Re,{get when(){return!e.report()},get children(){var e=Co(),t=e.firstChild;return A(e,D(Lt,{class:`state__glyph`}),t),e}}),D(Re,{get when(){return c()===0},get children(){var e=wo(),t=e.firstChild;return A(e,D(It,{class:`state__glyph`}),t),e}}),D(Re,{get when(){return l().length===0},get children(){var e=To(),t=e.firstChild,r=t.firstChild.nextSibling;r.nextSibling;var i=t.nextSibling,a=i.firstChild,o=a.nextSibling;return o.nextSibling,A(e,D(It,{class:`state__glyph`}),t),A(t,(()=>{var e=Ke(()=>!!n());return()=>e()?wt[n()]:``})(),r),A(i,c,a),A(i,()=>c()===1?`issue`:`issues`,o),e}}),D(Re,{get when(){return l().length>0},get children(){return D(Kt,{get violations(){return l()},get expanded(){return i()},onToggle:d,channel:e})}})]}})),r})()}var Oo=window.matchMedia(`(prefers-color-scheme: dark)`);function ko(e){document.documentElement.classList.toggle(`dark`,e),document.documentElement.classList.toggle(`light`,!e)}ko(Oo.matches),Oo.addEventListener(`change`,e=>ko(e.matches));var Ao=document.getElementById(`app`);if(!Ao)throw Error(`#app mount node missing from index.html`);Ye(()=>D(Do,{}),Ao);