返回 CodeWhale
pet-native.js
根目录 / crates / tui / src / tui / pet_watch / pet-native.js
1 /* Generated from pet/src/core. Run npm --prefix pet run sync. */
2 (function(global){
3 'use strict';
4 if(!global.structuredClone)global.structuredClone=value=>JSON.parse(JSON.stringify(value));
5 const factories={},cache={};
6 factories["pet-engine"]=function(exports,require){
7 "use strict";
8 Object.defineProperty(exports, "__esModule", { value: true });
9 exports.PetEngineTelemetry = exports.ENGINE_OWNER_STALE_MS = void 0;
10 const pet_sim_js_1 = require("./pet-sim.js");
11 const pet_telemetry_js_1 = require("./pet-telemetry.js");
12 // Engine emits a liveness pulse every 10 seconds for a running operation.
13 // Keep a small scheduling margin so one delayed pulse does not erase a valid
14 // long operation from the owner projection; after that, it becomes generic.
15 // The physics tape keeps its own, shorter coverage rule (see `pulse`).
16 exports.ENGINE_OWNER_STALE_MS = 12_000;
17 const ACTIVITY_KINDS = [
18 'reading', 'editing', 'searching', 'testing', 'executing', 'browsing', 'computer',
19 'memory', 'tool', 'thinking', 'responding', 'delegating',
20 ];
21 const TURN_OUTCOMES = ['completed', 'interrupted', 'failed'];
22 const OPERATION_OUTCOMES = ['succeeded', 'failed', 'cancelled', 'denied'];
23 const APPROVAL_OUTCOMES = ['approved', 'denied', 'cancelled'];
24 function categoryFor(kind) {
25 switch (kind) {
26 case 'reading':
27 case 'editing':
28 case 'searching': return 'filesystem';
29 case 'testing':
30 case 'executing': return 'code';
31 case 'browsing': return 'browser';
32 case 'computer':
33 case 'tool': return 'tool';
34 case 'memory': return 'memory';
35 case 'thinking': return 'reasoning';
36 case 'responding': return 'communication';
37 case 'delegating': return 'agent';
38 }
39 }
40 /** Read-only reducer for the Engine owner's typed metadata. It keeps using the
41 * existing pet telemetry tape and physics owner; it neither recognizes tool
42 * names from content nor accepts transcript text, arguments, commands, or results. */
43 class PetEngineTelemetry {
44 events = [];
45 active = new Map();
46 waiting;
47 sequence = 0;
48 lastTime = 0;
49 lastObservedAt;
50 turnId;
51 turnOutcome;
52 terminalAt;
53 lastFailedTool;
54 completedSpans = new Set();
55 completedTurns = new Set();
56 /** Ephemeral safe read projection. Span ids are retained only in this
57 * reducer to correlate trusted lifecycle events and never leave the owner. */
58 activity(at) {
59 const observed = this.lastObservedAt !== undefined;
60 const freshness = !observed ? 'missing'
61 : at - this.lastObservedAt <= exports.ENGINE_OWNER_STALE_MS ? 'fresh' : 'stale';
62 const fresh = freshness === 'fresh';
63 const active = fresh
64 ? [...this.active.values()]
65 .filter(span => at >= span.startedAtMs && at - span.event.endTime <= exports.ENGINE_OWNER_STALE_MS)
66 // The parent's own work leads; delegated agents are counted in
67 // `parallelAgentCount` and only lead when nothing else is active.
68 .sort((a, b) => Number(a.group === 'agent') - Number(b.group === 'agent')
69 || b.startedAtMs - a.startedAtMs || a.key.localeCompare(b.key))
70 : [];
71 const agents = active.filter(span => span.group === 'agent').length;
72 const terminalFresh = fresh && this.terminalAt !== undefined
73 && at >= this.terminalAt && at - this.terminalAt <= exports.ENGINE_OWNER_STALE_MS;
74 let authoritativePresence = 'unknown';
75 if (fresh) {
76 if (this.waiting)
77 authoritativePresence = 'needs_you';
78 else if (terminalFresh && this.turnOutcome === 'completed' && this.turnId)
79 authoritativePresence = 'done';
80 else if (terminalFresh)
81 authoritativePresence = 'idle';
82 else if (active.length > 0 || this.turnId)
83 authoritativePresence = 'working';
84 }
85 const activityKind = fresh && authoritativePresence !== 'needs_you'
86 && authoritativePresence !== 'done' && authoritativePresence !== 'idle'
87 ? active[0]?.activityKind
88 ?? (this.lastFailedTool && at >= this.lastFailedTool.failedAtMs
89 && at - this.lastFailedTool.failedAtMs <= exports.ENGINE_OWNER_STALE_MS
90 ? this.lastFailedTool.activityKind : null)
91 : null;
92 const failedAge = fresh && this.lastFailedTool
93 && at >= this.lastFailedTool.failedAtMs
94 && at - this.lastFailedTool.failedAtMs <= exports.ENGINE_OWNER_STALE_MS
95 ? { activityKind: this.lastFailedTool.activityKind,
96 ...(this.lastFailedTool.actionId ? { actionId: this.lastFailedTool.actionId } : {}),
97 ageMs: at - this.lastFailedTool.failedAtMs }
98 : null;
99 const actionId = activityKind ? (active.length ? active[0].actionId : failedAge?.actionId) : undefined;
100 const doneEffectId = authoritativePresence === 'done' && terminalFresh
101 && this.turnOutcome === 'completed' && this.turnId ? this.turnId : null;
102 return {
103 schemaVersion: 1,
104 sessionId: null,
105 cursor: 0,
106 observed,
107 freshness,
108 authoritativePresence,
109 activityKind: activityKind ?? null,
110 ...(actionId ? { actionId } : {}),
111 observedAtMs: this.lastObservedAt ?? null,
112 parallelAgentCount: fresh ? agents : 0,
113 activeSpans: active.slice(0, 4).map(span => ({
114 activityKind: span.activityKind,
115 ...(span.actionId ? { actionId: span.actionId } : {}),
116 startedAtMs: span.startedAtMs,
117 })),
118 turnId: this.turnId ?? null,
119 turnOutcome: this.turnOutcome ?? null,
120 doneEffectId,
121 failedToolAge: failedAge,
122 };
123 }
124 add(name, category, at, agentId = 'parent', continuation = false) {
125 if (this.events.length >= 8192)
126 throw new Error('Pet Engine observation window is full.');
127 const event = {
128 schemaVersion: 1,
129 id: `engine:${this.sequence++}`,
130 traceId: 'foreground',
131 startTime: at,
132 endTime: at,
133 name,
134 category,
135 agentId,
136 status: 'running',
137 attributes: continuation ? { 'whalesong.continuation': true } : {},
138 };
139 this.events.push(event);
140 return event;
141 }
142 start(key, kind, group, at, agentId = 'parent', actionId) {
143 if (this.active.has(key))
144 return;
145 if (this.active.size >= 256)
146 throw new Error('Too many active Engine pet spans.');
147 const event = this.add(group === 'agent' ? 'agent' : group === 'thinking' ? 'thinking'
148 : group === 'responding' ? 'assistant_message' : 'operation', categoryFor(kind), at, agentId);
149 this.active.set(key, { key, activityKind: kind, actionId, startedAtMs: at, event, group });
150 }
151 pulse(key, at) {
152 const span = this.active.get(key);
153 if (!span)
154 return;
155 // A resumed stream does not assert tape coverage across its silent
156 // interval; the span itself (and its start) stays active.
157 if (at - span.event.endTime > pet_telemetry_js_1.PET_BIN_MS * 2) {
158 const event = this.add(span.event.name, span.event.category, at, span.event.agentId, true);
159 this.active.set(key, { ...span, event });
160 }
161 else {
162 span.event.endTime = at;
163 }
164 }
165 finish(key, at, status = 'success') {
166 if (!this.active.has(key))
167 return undefined;
168 this.pulse(key, at);
169 const span = this.active.get(key);
170 if (!span)
171 return undefined;
172 span.event.endTime = at;
173 span.event.status = status;
174 this.active.delete(key);
175 return span;
176 }
177 addOnce(set, id, maximum) {
178 if (set.has(id))
179 return false;
180 set.add(id);
181 while (set.size > maximum)
182 set.delete(set.values().next().value);
183 return true;
184 }
185 /** Transactional batch copy; validation errors cannot accept half a batch. */
186 clone() {
187 const next = new PetEngineTelemetry();
188 const copy = (value) => JSON.parse(JSON.stringify(value));
189 next.events = copy(this.events);
190 const spans = new Map(next.events.map(event => [event.id, event]));
191 next.active = new Map(Array.from(this.active, ([key, span]) => [key, {
192 ...span,
193 event: spans.get(span.event.id) ?? copy(span.event),
194 }]));
195 next.waiting = this.waiting ? spans.get(this.waiting.id) ?? copy(this.waiting) : undefined;
196 next.sequence = this.sequence;
197 next.lastTime = this.lastTime;
198 next.lastObservedAt = this.lastObservedAt;
199 next.turnId = this.turnId;
200 next.turnOutcome = this.turnOutcome;
201 next.terminalAt = this.terminalAt;
202 next.lastFailedTool = this.lastFailedTool ? { ...this.lastFailedTool } : undefined;
203 next.completedSpans = new Set(this.completedSpans);
204 next.completedTurns = new Set(this.completedTurns);
205 return next;
206 }
207 /** Mutates in place: clock, freshness and the event window change before
208 * type-specific fields are checked. Callers that continue after a throw must
209 * observe on a clone() and swap it in on success, as the dot whale does. */
210 observe(value, at) {
211 if (!Number.isFinite(at) || at < this.lastTime || at > pet_sim_js_1.PET_MAX_SECONDS * 1000)
212 throw new Error('Invalid Engine pet clock.');
213 if (!value || typeof value !== 'object' || Array.isArray(value))
214 throw new Error('Invalid Engine pet metadata.');
215 const event = value;
216 const allowed = ['event', 'index', 'channel', 'span_id', 'activity_kind', 'action_id', 'outcome', 'id', 'worker_status', 'turn_id', 'turn_outcome'];
217 const stringFields = ['action_id', 'event', 'span_id', 'id', 'worker_status', 'turn_id', 'turn_outcome'];
218 if (Object.keys(event).some(key => !allowed.includes(key)) || typeof event.event !== 'string'
219 || Object.values(event).some(v => typeof v === 'string' && v.length > 256)
220 || stringFields.some(key => event[key] !== undefined && typeof event[key] !== 'string')
221 || event.action_id !== undefined && (typeof event.action_id !== 'string' || !event.action_id
222 || /[\u0000-\u001f\u007f-\u009f]/.test(event.action_id)
223 || [...event.action_id].reduce((bytes, char) => {
224 const cp = char.codePointAt(0);
225 return bytes + (cp <= 0x7f ? 1 : cp <= 0x7ff ? 2 : cp <= 0xffff ? 3 : 4);
226 }, 0) > 256)
227 || event.channel !== undefined && !['text', 'reasoning'].includes(event.channel)
228 || event.activity_kind !== undefined && !ACTIVITY_KINDS.includes(event.activity_kind)
229 || event.outcome !== undefined && (typeof event.outcome !== 'string'
230 || (event.event === 'approval_resolved'
231 ? !APPROVAL_OUTCOMES.includes(event.outcome)
232 : event.event === 'operation_activity_completed'
233 ? !OPERATION_OUTCOMES.includes(event.outcome)
234 : true))
235 || event.turn_outcome !== undefined && !TURN_OUTCOMES.includes(event.turn_outcome)
236 || event.index !== undefined && (!Number.isSafeInteger(event.index) || event.index < 0))
237 throw new Error('Invalid Engine pet metadata fields.');
238 this.lastTime = at;
239 this.lastObservedAt = at;
240 this.events = this.events.filter(item => item.endTime >= at - 12_800);
241 const required = (key) => {
242 const value = event[key];
243 if (typeof value !== 'string' || !value)
244 throw new Error(`Missing Engine ${key}.`);
245 return value;
246 };
247 const index = () => {
248 if (!Number.isSafeInteger(event.index))
249 throw new Error('Missing Engine index.');
250 return String(event.index);
251 };
252 const activityKind = () => {
253 if (!ACTIVITY_KINDS.includes(event.activity_kind))
254 throw new Error('Missing Engine activity kind.');
255 return event.activity_kind;
256 };
257 const startMessage = (key, kind, group) => {
258 this.start(key, kind, group, at);
259 this.waiting = undefined;
260 };
261 switch (event.event) {
262 case 'turn_started': {
263 const id = required('turn_id');
264 if (this.turnId !== id) {
265 this.active.clear();
266 this.waiting = undefined;
267 this.lastFailedTool = undefined;
268 this.turnId = id;
269 this.turnOutcome = undefined;
270 this.terminalAt = undefined;
271 }
272 break;
273 }
274 case 'message_started':
275 startMessage(`message:${index()}`, 'responding', 'responding');
276 break;
277 case 'thinking_started':
278 startMessage(`thinking:${index()}`, 'thinking', 'thinking');
279 break;
280 case 'response_delta': {
281 const reasoning = event.channel === 'reasoning';
282 const key = `${reasoning ? 'thinking' : 'message'}:${index()}`;
283 if (!this.active.has(key))
284 this.start(key, reasoning ? 'thinking' : 'responding', reasoning ? 'thinking' : 'responding', at);
285 else
286 this.pulse(key, at);
287 this.waiting = undefined;
288 break;
289 }
290 case 'message_complete':
291 this.finish(`message:${index()}`, at);
292 break;
293 case 'thinking_complete':
294 this.finish(`thinking:${index()}`, at);
295 break;
296 case 'operation_activity_started': {
297 const spanId = required('span_id');
298 const kind = activityKind();
299 if (!this.completedSpans.has(spanId))
300 this.start(`operation:${spanId}`, kind, 'operation', at, 'parent', event.action_id);
301 this.waiting = undefined;
302 break;
303 }
304 case 'operation_activity_completed': {
305 const spanId = required('span_id');
306 const kind = activityKind();
307 if (!OPERATION_OUTCOMES.includes(event.outcome))
308 throw new Error('Missing Engine operation outcome.');
309 const outcome = event.outcome;
310 // A failure is recorded once, as its own onset event below; marking
311 // the span `error` too would count it twice on the tape.
312 const completed = this.finish(`operation:${spanId}`, at, outcome === 'succeeded' ? 'success' : 'unknown');
313 if (completed && this.addOnce(this.completedSpans, spanId, 4096)) {
314 if (outcome === 'failed') {
315 this.add('operation_failed', 'error', at).status = 'error';
316 this.lastFailedTool = { activityKind: kind, actionId: completed.actionId, failedAtMs: at };
317 }
318 if (outcome === 'denied' || outcome === 'cancelled')
319 this.waiting = undefined;
320 }
321 break;
322 }
323 case 'tool_call_heartbeat':
324 for (const [key, span] of this.active)
325 if (span.group === 'operation')
326 this.pulse(key, at);
327 break;
328 case 'approval_resolved': {
329 required('id');
330 if (!APPROVAL_OUTCOMES.includes(event.outcome))
331 throw new Error('Invalid Engine approval outcome.');
332 this.waiting = undefined;
333 break;
334 }
335 case 'agent_spawned': {
336 const id = required('id');
337 this.start(`agent:${id}`, 'delegating', 'agent', at, id);
338 break;
339 }
340 case 'agent_progress': {
341 const id = required('id');
342 const key = `agent:${id}`;
343 if (['completed', 'failed', 'cancelled', 'interrupted', 'budget_exhausted'].includes(event.worker_status)) {
344 this.finish(key, at);
345 break;
346 }
347 if (!this.active.has(key))
348 this.start(key, 'delegating', 'agent', at, id);
349 else
350 this.pulse(key, at);
351 break;
352 }
353 case 'agent_complete':
354 this.finish(`agent:${required('id')}`, at);
355 break;
356 case 'approval_required':
357 case 'user_input_required': {
358 required('id');
359 if (!this.waiting) {
360 this.waiting = this.add('human_request', 'human', at);
361 this.waiting.status = 'pending';
362 }
363 break;
364 }
365 case 'turn_complete': {
366 const outcome = event.turn_outcome;
367 if (!TURN_OUTCOMES.includes(outcome))
368 throw new Error('Missing Engine turn outcome.');
369 const id = typeof event.turn_id === 'string' && event.turn_id.length ? event.turn_id : undefined;
370 this.active.clear();
371 this.waiting = undefined;
372 this.turnId = id;
373 // An outcome belongs to a turn. `/purge`, an edit rejection or a
374 // session switch mid-turn completes with no turn id; recording the
375 // outcome alone would break the projection invariant the Rust
376 // contract checks (`turn_outcome` requires `turn_id`).
377 this.turnOutcome = id ? outcome : undefined;
378 this.terminalAt = at;
379 if (outcome === 'completed' && id && this.addOnce(this.completedTurns, id, 256))
380 this.add('turn_completed', 'communication', at).status = 'success';
381 break;
382 }
383 default: throw new Error('Unsupported Engine pet event.');
384 }
385 }
386 /** The typed shell may extend a request already witnessed in Engine events,
387 * but a mid-turn attach cannot invent a NeedsYou state. */
388 confirmWaiting(at, waiting) {
389 if (!waiting) {
390 this.waiting = undefined;
391 return;
392 }
393 if (this.waiting && at >= this.waiting.endTime) {
394 this.waiting.endTime = at;
395 this.lastObservedAt = at;
396 this.lastTime = Math.max(this.lastTime, at);
397 }
398 }
399 bucket(sequence) {
400 const end = (sequence + 1) * pet_telemetry_js_1.PET_BIN_MS;
401 const input = this.events.filter(event => event.startTime < end && event.endTime >= end - 12_400)
402 .map(event => ({ ...event, endTime: Math.min(event.endTime, end) }));
403 return (0, pet_telemetry_js_1.compilePetTelemetry)(input, end, sequence)[0];
404 }
405 }
406 exports.PetEngineTelemetry = PetEngineTelemetry;
407
408 };
409 factories["pet-sim"]=function(exports,require){
410 "use strict";
411 // PetSim — the portable core of the Codewhale pet.
412 //
413 // This is a faithful, DOM-free port of the consort study's particle engine
414 // (grammar.js). The same code — same constants, same order of operations — is
415 // what the Rust core implements. Four rules keep the view
416 // identical on every surface:
417 //
418 // 1. The body is the same 980 points, loaded from whale-points.tsv — never
419 // re-sampled from the image on each platform.
420 // 2. Per-particle jitter phases come from mulberry32(0xC0FFEE), not from the
421 // platform's RNG.
422 // 3. All motion is a pure function of (sim clock, state): nothing accumulates
423 // noise. Two runs fed the same tape produce the same frame.
424 // 4. Colour, hollowness and brightness are computed here, once — renderers
425 // only place and stamp dots.
426 //
427 // Positions stay normalized in body space (roughly [-0.5, 0.5]²). A renderer
428 // maps them through layout() to its own medium.
429 Object.defineProperty(exports, "__esModule", { value: true });
430 exports.PetSim = exports.CHANNEL_INDEX = exports.CHANNELS = exports.ARCH_OF = exports.REST_STATE = exports.PET_MAX_SECONDS = void 0;
431 exports.validatePetState = validatePetState;
432 exports.mulberry32 = mulberry32;
433 exports.layout = layout;
434 exports.digest = digest;
435 exports.runTape = runTape;
436 exports.PET_MAX_SECONDS = 100 * 365 * 86_400;
437 exports.REST_STATE = {
438 activity: 0.35, coherence: 0.8, attention: 0, channel: 'reasoning',
439 observed: 1, roamX: 0, roamY: 0, flip: 1, lit: 1,
440 };
441 const lerp = (a, b, t) => a + (b - a) * t;
442 const clamp = (v, a = 0, b = 1) => Math.min(b, Math.max(a, v));
443 exports.ARCH_OF = {
444 reasoning: 'gyre', memory: 'gyre',
445 tool: 'strike', code: 'strike', filesystem: 'strike',
446 network: 'cross', communication: 'cross', browser: 'cross',
447 agent: 'pod', orchestration: 'pod',
448 error: 'tear', human: 'address', other: 'drift',
449 };
450 exports.CHANNELS = [
451 { key: 'reasoning', label: 'Model / reasoning', color: '#73c9b5', freq: 130.81, sustained: true, arch: 'gyre', form: 'gyre · rolling' },
452 { key: 'tool', label: 'Tool calls', color: '#74aadd', freq: 261.63, sustained: false, arch: 'strike', form: 'strike · reaching' },
453 { key: 'memory', label: 'Memory / RAG', color: '#b6a77f', freq: 195.99, sustained: true, arch: 'gyre', form: 'gyre · scanning' },
454 { key: 'code', label: 'Code execution', color: '#9b9ed7', freq: 164.81, sustained: false, arch: 'strike', form: 'strike · along the body' },
455 { key: 'filesystem', label: 'Filesystem', color: '#92b9c9', freq: 440.00, sustained: false, arch: 'strike', form: 'strike · fanning' },
456 { key: 'network', label: 'Network / API', color: '#d3ac74', freq: 523.25, sustained: false, arch: 'cross', form: 'crossing · one way' },
457 { key: 'browser', label: 'Browser / computer', color: '#9ea9df', freq: 349.23, sustained: false, arch: 'cross', form: 'crossing · a sweep' },
458 { key: 'communication', label: 'Agent messages', color: '#83c5c9', freq: 293.66, sustained: false, arch: 'cross', form: 'crossing · two ways' },
459 { key: 'agent', label: 'Subagent activity', color: '#b09acb', freq: 220.00, sustained: true, arch: 'pod', form: 'pod · peers' },
460 { key: 'orchestration', label: 'Orchestration', color: '#6c8798', freq: 98.00, sustained: true, arch: 'pod', form: 'pod · hub' },
461 { key: 'error', label: 'Errors / exceptions', color: '#e79186', freq: 185.00, sustained: false, arch: 'tear', form: 'torn · irregular' },
462 { key: 'human', label: 'Human interaction', color: '#c2b787', freq: 391.99, sustained: false, arch: 'address', form: 'decision · junction' },
463 { key: 'other', label: 'Unclassified', color: '#738492', freq: 146.83, sustained: false, arch: 'drift', form: 'drifting · unformed' },
464 ];
465 exports.CHANNEL_INDEX = Object.fromEntries(exports.CHANNELS.map((c, i) => [c.key, i]));
466 function validatePetState(value) {
467 const s = value;
468 if (!s || typeof s !== 'object' || !Object.hasOwn(exports.CHANNEL_INDEX, s.channel)
469 || ![s.activity, s.coherence, s.attention, s.observed, s.lit].every(n => Number.isFinite(n) && n >= 0 && n <= 1)
470 || ![s.roamX, s.roamY, s.flip].every(n => Number.isFinite(n) && Math.abs(n) <= 1))
471 throw new Error('Invalid pet state.');
472 }
473 const hex2rgb = (h) => [parseInt(h.slice(1, 3), 16), parseInt(h.slice(3, 5), 16), parseInt(h.slice(5, 7), 16)];
474 const RGB = exports.CHANNELS.map(c => hex2rgb(c.color));
475 const UNKNOWN_RGB = hex2rgb('#738492');
476 const REST_RGB = [122, 214, 240];
477 // mulberry32 — a 32-bit seeded PRNG tiny enough to port by hand correctly.
478 function mulberry32(seed) {
479 let a = seed >>> 0;
480 return Object.assign(() => {
481 a = (a + 0x6D2B79F5) >>> 0;
482 let t = a;
483 t = Math.imul(t ^ (t >>> 15), t | 1);
484 t ^= t + Math.imul(t ^ (t >>> 7), t | 61);
485 return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
486 }, { state: () => a, restore: (state) => {
487 if (!Number.isSafeInteger(state) || state < 0 || state > 0xffffffff)
488 throw new Error('Invalid pet random stream.');
489 a = state;
490 } });
491 }
492 /** Work reorganizes the same particles; no new random draws or invented facts.
493 * These are expressive fields, not diagrams of unobserved network/file topology. */
494 function fieldTarget(q, t, act, att, key) {
495 const u = q.s * 2 - 1, lane = q.pod - 2.5, a = q.s * Math.PI * 2;
496 const flow = t * (.35 + act * .65);
497 if (key === 'reasoning') {
498 const ring = .34 + .105 * Math.cos(a * 3 + flow + lane * .18);
499 return [ring * Math.cos(a * 2 + flow * .3), ring * Math.sin(a * 2 + flow * .3) * .7 + .10 * Math.sin(a * 3 + flow)];
500 }
501 if (key === 'memory')
502 return [.46 * Math.cos(a + lane * .1 + flow * .25), lane * .082 + .052 * Math.sin(a * 2 + flow)];
503 if (key === 'code')
504 return [u * .57, lane * .066 + .12 * Math.sin(u * 7 + flow * 2 + q.pod * Math.PI / 3)];
505 if (key === 'filesystem') {
506 const branch = Math.max(0, (u + .3) / 1.3);
507 return [u * .56, lane * .13 * branch + .025 * Math.sin(u * 8 - flow)];
508 }
509 if (key === 'tool') {
510 const reach = .14 + (u + 1) * .20 + .04 * Math.sin(flow * 3 - u * 4);
511 return [Math.cos(q.pod * Math.PI / 3) * reach, Math.sin(q.pod * Math.PI / 3) * reach * .8 + q.hy * .06];
512 }
513 if (key === 'browser')
514 return [u * .56, lane * .083 + .035 * Math.sin(u * 5 - flow * 2)];
515 if (key === 'network' || key === 'communication') {
516 const direction = key === 'communication' && q.pod % 2 === 1 ? -1 : 1;
517 const phase = a + flow * direction;
518 return [.54 * Math.cos(phase), Math.sin(phase) * (.12 + q.pod * .035) + lane * .024];
519 }
520 if (key === 'human') {
521 const gap = u < 0 ? -.075 : .075;
522 return [u * .47 + gap, lane * .10 * Math.abs(u) + .012 * Math.sin(flow + a) * (1 - att)];
523 }
524 return undefined;
525 }
526 // Version 1 retains the original authored gait for existing recordings.
527 function gaitTarget(q, t, act, coh, att, key, work, podSlots, expressionVersion = 1) {
528 const { hx, hy, ang, rad, tail, s, pod, jx, jy } = q;
529 const omega = lerp(4.6, 5.2 + act * 2.8, work);
530 const breath = 1 + Math.sin(t * 1.85) * lerp(0.048, 0.018, work);
531 const flex = Math.sin(ang * 2.05 + t * omega) * lerp(0.042, 0.016 + act * 0.028, work) * (0.18 + 0.82 * tail);
532 let px = Math.cos(ang + flex) * rad * breath;
533 let py = Math.sin(ang + flex) * rad * breath;
534 px += Math.sin(t * 0.33) * lerp(0.030, 0.014, work);
535 py += Math.cos(t * 0.21) * lerp(0.018, 0.010, work);
536 if (work < 0.02)
537 return [px, py];
538 const arch = exports.ARCH_OF[key] || 'drift';
539 let gx = px, gy = py;
540 if (arch === 'gyre') {
541 if (key === 'memory') {
542 const pulse = 1 + Math.sin(t * (2.4 + act * 1.6) - rad * 11) * (0.15 + act * 0.10);
543 gx *= pulse;
544 gy *= pulse;
545 }
546 else {
547 const roll = Math.sin(t * (1.05 + act * 0.35)) * (0.48 + act * 0.32);
548 const c = Math.cos(roll), sn = Math.sin(roll);
549 gx = px * c - py * sn * 0.88;
550 gy = px * sn * 0.88 + py * c;
551 }
552 }
553 else if (arch === 'strike') {
554 if (key === 'tool') {
555 const rate = 2.7 + act * 2.1;
556 const lunge = Math.pow(Math.max(0, Math.sin(t * rate)), 2);
557 gx += lunge * 0.11;
558 if (s > 0.60) {
559 const reach = Math.pow(Math.max(0, Math.sin(t * rate + pod * 0.92)), 4) * (0.30 + act * 0.24);
560 gx += Math.cos(ang) * reach;
561 gy += Math.sin(ang) * reach;
562 }
563 }
564 else if (key === 'code') {
565 const rate = 3.2 + act * 1.8;
566 const wave = Math.sin(t * rate - tail * 7.5);
567 const bump = 0.11 + act * 0.08;
568 gx += Math.cos(ang) * wave * bump;
569 gy += Math.sin(ang) * wave * bump * 1.2;
570 gx += Math.max(0, wave) * 0.07;
571 }
572 else {
573 const rate = 2.15 + act * 1.5;
574 const side = (pod % 2) * 2 - 1;
575 const w = Math.pow(Math.max(0, Math.sin(t * rate + pod * 0.72)), 2);
576 gx += w * 0.055;
577 gy += side * w * (0.17 + act * 0.13);
578 }
579 }
580 else if (arch === 'cross') {
581 if (key === 'browser') {
582 const band = ((t * (0.55 + act * 0.35)) % 1) * 1.28 - 0.64;
583 const inBand = Math.max(0, 1 - Math.abs(hy - band) / 0.08);
584 gx += inBand * (0.24 + act * 0.10);
585 gy += inBand * 0.02;
586 }
587 else {
588 const two = key === 'communication';
589 const courier = s < (two ? 0.44 : 0.32);
590 if (courier) {
591 const dir = two ? (s < 0.22 ? 1 : -1) : 1;
592 const u = (t * (0.38 + act * 0.36) + s * 5.2) % 1;
593 const going = u < 0.5 ? u * 2 : 2 - u * 2;
594 const e = going * going * (3 - 2 * going);
595 gx = lerp(hx, dir * 0.80, e);
596 gy = hy * (1 - e * 0.38) + Math.sin(going * Math.PI) * 0.11 * dir;
597 }
598 }
599 }
600 else if (arch === 'pod') {
601 const n = 6, member = podSlots?.length ? podSlots[pod % podSlots.length] : undefined;
602 const k = member ? member[0] : pod % n;
603 const hub = key === 'orchestration' && k === 0;
604 const spread = 0.30 + act * 0.11;
605 const orbit = t * (0.55 + act * 0.28);
606 if (hub) {
607 gx = px * 0.70;
608 gy = py * 0.70;
609 }
610 else {
611 const slots = key === 'orchestration' ? n - 1 : n;
612 const a = (key === 'orchestration' ? k - 1 : k) * (Math.PI * 2 / slots) + orbit + (member ? member[1] * .04 : 0);
613 const sc = 0.34;
614 gx = hx * sc + Math.cos(a) * spread * 1.28;
615 gy = hy * sc + Math.sin(a) * spread * 0.80;
616 }
617 }
618 else if (arch === 'tear') {
619 const side = hx + hy < 0 ? -1 : 1;
620 gx += side * (0.24 + (1 - coh) * 0.16);
621 gy += side * 0.15;
622 gx += Math.sin(t * 11.4 + s * 40) * (0.045 + act * 0.05);
623 gy += Math.cos(t * 9.2 + s * 31) * (0.040 + act * 0.045);
624 }
625 else if (arch === 'address') {
626 const face = 0.90 + att * 0.08;
627 const th = 0.70;
628 const z = (s - 0.5) * 0.42;
629 let ax = hx * Math.cos(th) + z * Math.sin(th);
630 let ay = hy;
631 const disc = 0.48 * face;
632 ax = lerp(ax, Math.cos(ang) * Math.min(0.36, rad + 0.06) * 0.95, disc);
633 ay = lerp(ay, Math.sin(ang) * Math.min(0.36, rad + 0.06) * 1.08, disc);
634 const grow = 1.20 + Math.sin(t * 1.65) * 0.055;
635 gx = ax * grow;
636 gy = ay * grow;
637 }
638 else {
639 const mill = 0.13 + (1 - coh) * 0.10;
640 gx = hx * 0.52 + Math.sin(t * 0.72 + jx) * mill;
641 gy = hy * 0.52 + Math.cos(t * 0.54 + jy) * mill;
642 }
643 if (expressionVersion === 2) {
644 const field = fieldTarget(q, t, act, att, key);
645 if (field)
646 [gx, gy] = field;
647 }
648 return [lerp(px, gx, work), lerp(py, gy, work)];
649 }
650 // Fixed reduced-motion clock per channel, so ticks still point along the gait.
651 const STILL_T = {
652 reasoning: 1.15, memory: 0.42, tool: 0.30, code: 0.18, filesystem: 0.48,
653 network: 0.72, browser: 0.95, communication: 0.58, agent: 1.25,
654 orchestration: 0.85, error: 0.35, human: 0.05, other: 0.90,
655 };
656 class PetSim {
657 expressionVersion;
658 p;
659 phase = 0;
660 clock = 0;
661 tear = 0;
662 prev;
663 col = [...REST_RGB];
664 cur;
665 frame = { r: REST_RGB[0], g: REST_RGB[1], b: REST_RGB[2], alpha: 0.3, hollow: false, channel: 'reasoning', arch: 'gyre', work: 0 };
666 constructor(points, seed = 0xC0FFEE, expressionVersion = 2) {
667 this.expressionVersion = expressionVersion;
668 if (expressionVersion !== 1 && expressionVersion !== 2)
669 throw new Error('Unsupported pet expression version.');
670 const rand = mulberry32(seed);
671 this.p = points.map(([hx, hy], i) => {
672 const q = {
673 x: hx, y: hy, vx: 0, vy: 0,
674 s: rand(), jx: rand() * 6.283, jy: rand() * 6.283, pod: i % 6,
675 hx, hy, ang: 0, rad: 0, tail: 0, tx: hx, ty: hy,
676 };
677 q.ang = Math.atan2(hy, hx);
678 q.rad = Math.hypot(hx, hy);
679 q.tail = clamp(((-hx - hy) * 0.5 + 0.22) / 0.62);
680 return q;
681 });
682 this.cur = this.prev = exports.CHANNEL_INDEX['reasoning'];
683 }
684 checkpoint() {
685 return { version: 1, expressionVersion: this.expressionVersion, body: this.p.map(p => [p.hx, p.hy, p.s]),
686 particles: this.p.map(p => [p.x, p.y, p.vx, p.vy, p.jx, p.jy, p.tx, p.ty]),
687 phase: this.phase, clock: this.clock, tear: this.tear, previous: this.prev, current: this.cur,
688 color: [...this.col], frame: { ...this.frame } };
689 }
690 /** Restore into a newly constructed sim. Authored body and seeded particle
691 * identity must match exactly; a checkpoint cannot replace the whale. */
692 restore(value) {
693 const c = value;
694 const inRange = (n, low, high) => Number.isFinite(n) && n >= low && n <= high;
695 if (!c || c.version !== 1 || c.expressionVersion !== undefined && ![1, 2].includes(c.expressionVersion) || (c.expressionVersion ?? 1) !== this.expressionVersion || !Array.isArray(c.body) || c.body.length !== this.p.length
696 || c.body.some((v, i) => !Array.isArray(v) || v.length !== 3 || v[0] !== this.p[i].hx || v[1] !== this.p[i].hy || v[2] !== this.p[i].s)
697 || !Array.isArray(c.particles) || c.particles.length !== this.p.length
698 || c.particles.some(v => !Array.isArray(v) || v.length !== 8 || v.some((n, i) => !inRange(n, i === 4 || i === 5 ? 0 : -8, i === 4 || i === 5 ? 2 * exports.PET_MAX_SECONDS : 8)))
699 || !inRange(c.phase, 0, exports.PET_MAX_SECONDS) || !inRange(c.clock, 0, exports.PET_MAX_SECONDS) || !inRange(c.tear, 0, 1)
700 || ![c.previous, c.current].every(n => Number.isInteger(n) && n >= 0 && n < exports.CHANNELS.length)
701 || !Array.isArray(c.color) || c.color.length !== 3 || c.color.some(n => !inRange(n, 0, 255))
702 || !c.frame || ![c.frame.r, c.frame.g, c.frame.b].every(n => inRange(n, 0, 255))
703 || !inRange(c.frame.alpha, 0, 1) || !inRange(c.frame.work, 0, 1) || typeof c.frame.hollow !== 'boolean'
704 || c.frame.channel !== exports.CHANNELS[c.current].key || c.frame.arch !== exports.CHANNELS[c.current].arch)
705 throw new Error('Invalid pet particle checkpoint.');
706 this.phase = c.phase;
707 this.clock = c.clock;
708 this.tear = c.tear;
709 this.prev = c.previous;
710 this.cur = c.current;
711 this.col = [...c.color];
712 this.frame = { ...c.frame };
713 this.p.forEach((p, i) => { [p.x, p.y, p.vx, p.vy, p.jx, p.jy, p.tx, p.ty] = c.particles[i]; });
714 }
715 /** Advance the sim by dt seconds under `state`. Identical math on every port. */
716 step(dt, state, opts) {
717 const S = (v) => lerp(0.5, v, opts.sensitivity);
718 const act = S(state.activity), coh = S(state.coherence), att = S(state.attention);
719 const seen = S(state.observed === undefined ? 1 : state.observed);
720 const motion = opts.motion ? 1 : 0;
721 this.phase += dt * (0.18 + act * 0.55) * motion;
722 this.clock += dt * (opts.motion ? 1 : 0);
723 if (exports.CHANNEL_INDEX[state.channel] !== undefined)
724 this.cur = exports.CHANNEL_INDEX[state.channel];
725 const shown = this.cur;
726 const ch = exports.CHANNELS[shown];
727 const work = clamp((act - 0.16) / 0.18);
728 const wander = lerp(0.32, 1, Math.pow(1 - coh, 1.15));
729 if (shown !== this.prev) {
730 if (shown === exports.CHANNEL_INDEX['error'])
731 this.tear = 1;
732 this.prev = shown;
733 }
734 this.tear = opts.motion ? Math.max(0, this.tear - dt * 1.6) : 0;
735 const split = Math.pow(1 - coh, 1.6) * 0.16 + this.tear * 0.10;
736 const blur = Math.pow(1 - coh, 1.45) * 0.22 + this.tear * 0.18;
737 const pull = opts.motion ? (2.2 + coh * 5.2) : 18;
738 const tGait = opts.motion ? this.clock : (STILL_T[ch.key] ?? 0.4);
739 for (const q of this.p) {
740 if (opts.motion) {
741 q.jx += dt * (0.40 + act * 1.1);
742 q.jy += dt * (0.34 + act * 0.9);
743 }
744 const [gx, gy] = gaitTarget(q, tGait, act, coh, att, ch.key, work, opts.podSlots, this.expressionVersion);
745 const podAng = q.pod * 1.047 + this.phase * 0.22;
746 const tx = gx + Math.sin(q.jx + q.s * 9) * blur * wander + Math.cos(podAng) * split;
747 const ty = gy + Math.cos(q.jy + q.s * 7) * blur * wander + Math.sin(podAng) * split * 0.55;
748 q.tx = tx;
749 q.ty = ty;
750 if (!opts.motion) {
751 q.x = tx;
752 q.y = ty;
753 q.vx = 0;
754 q.vy = 0;
755 continue;
756 }
757 q.vx += (tx - q.x) * pull * dt;
758 q.vy += (ty - q.y) * pull * dt;
759 q.vx *= 0.90;
760 q.vy *= 0.90;
761 q.x += q.vx * dt * (opts.motion ? 2.6 : 8);
762 q.y += q.vy * dt * (opts.motion ? 2.6 : 8);
763 }
764 // ---- visual encoding: the parts of "the same view" that are not motion
765 const want = work > 0.35 ? RGB[shown] : REST_RGB;
766 const k = opts.motion ? Math.min(1, dt * 2.6) : 1;
767 for (let c = 0; c < 3; c++)
768 this.col[c] += (lerp(UNKNOWN_RGB[c], want[c], seen) - this.col[c]) * k;
769 const lit = clamp(state.lit);
770 const alpha = (0.22 + act * 0.10) * lerp(0.50, 1, coh) * lerp(0.55, 1, seen) * lerp(0.35, 1, lit);
771 this.frame = {
772 r: this.col[0], g: this.col[1], b: this.col[2],
773 alpha: Math.min(0.92, alpha * 1.85),
774 hollow: seen < 0.92,
775 channel: ch.key, arch: ch.arch, work,
776 };
777 }
778 }
779 exports.PetSim = PetSim;
780 /** Body-space → renderer-space. Renderers place each dot at (lx,ly) in pixels/cells. */
781 function layout(w, h, state) {
782 const att = state.attention;
783 const scale = Math.min(w * 0.52, h * 0.92) * (1 + att * 0.07);
784 return {
785 scale,
786 flipX: state.flip,
787 ox: w / 2 + state.roamX * w * 0.30,
788 oy: h / 2 + state.roamY * h * 0.30 + h * att * 0.05,
789 dot: Math.max(1.6, Math.min(w, h) * 0.0092) * (1 + att * 0.18),
790 };
791 }
792 // ---------------------------------------------------------------------------
793 // Conformance. A tape is a list of [dt, state] rows; run it and digest the
794 // quantized field every `every` frames. 64×32 cells over [-0.66, 0.66]².
795 // Two implementations that produce the same digest lines drew the same whale.
796 function digest(sim) {
797 const W = 64, H = 32;
798 const grid = new Uint8Array(W * H);
799 for (const q of sim.p) {
800 const cx = Math.floor((q.x + 0.66) / 1.32 * W);
801 const cy = Math.floor((q.y + 0.66) / 1.32 * H);
802 if (cx >= 0 && cx < W && cy >= 0 && cy < H)
803 grid[cy * W + cx] = Math.min(255, grid[cy * W + cx] + 1);
804 }
805 // FNV-1a 64 over the grid plus the frame encoding (rgb, hollow, alpha byte)
806 // Two unsigned halves also work in embedded engines without BigInt.
807 // FNV's prime is (256 << 32) + 435; these products stay below 2^42,
808 // so every intermediate integer is exactly representable by a JS number.
809 let hi = 0xcbf29ce4, lo = 0x84222325;
810 const mix = (b) => {
811 lo = (lo ^ (b & 0xff)) >>> 0;
812 const product = lo * 435;
813 hi = (hi * 435 + lo * 256 + Math.floor(product / 4294967296)) >>> 0;
814 lo = product >>> 0;
815 };
816 for (const v of grid)
817 mix(v);
818 mix(Math.round(sim.frame.r));
819 mix(Math.round(sim.frame.g));
820 mix(Math.round(sim.frame.b));
821 mix(Math.round(sim.frame.alpha * 255));
822 mix(sim.frame.hollow ? 1 : 0);
823 return hi.toString(16).padStart(8, '0') + lo.toString(16).padStart(8, '0');
824 }
825 /** Shared tape runner. `rows` are parsed tape.tsv lines. */
826 function runTape(sim, rows, opts) {
827 const out = [];
828 let f = 0;
829 for (const row of rows) {
830 const c = row.split('\t');
831 if (c.length < 10 || c[0] === 'dt')
832 continue;
833 const st = {
834 activity: +c[1], coherence: +c[2], attention: +c[3], channel: c[4],
835 observed: +c[5], roamX: +c[6], roamY: +c[7], flip: +c[8], lit: +c[9],
836 };
837 sim.step(+c[0], st, opts);
838 if (f++ % 30 === 0)
839 out.push(`f${String(f - 1).padStart(4, '0')} ${digest(sim)} ${st.channel}`);
840 }
841 out.push(`final ${digest(sim)}`);
842 return out;
843 }
844
845 };
846 factories["pet-telemetry"]=function(exports,require){
847 "use strict";
848 Object.defineProperty(exports, "__esModule", { value: true });
849 exports.PET_BIN_MS = void 0;
850 exports.validatePetBucket = validatePetBucket;
851 exports.decodePetJSONL = decodePetJSONL;
852 exports.compilePetTelemetry = compilePetTelemetry;
853 exports.encodePetJSONL = encodePetJSONL;
854 exports.encodePetTSV = encodePetTSV;
855 const model_js_1 = require("./model.js");
856 const signal_js_1 = require("./signal.js");
857 const pet_sim_js_1 = require("./pet-sim.js");
858 /** One projection for imports, demos and recorded live snapshots. Times are ms.
859 * These are aesthetic encodings of measured events, never model confidence. */
860 exports.PET_BIN_MS = 400;
861 function validatePetBucket(value) {
862 (0, pet_sim_js_1.validatePetState)(value);
863 const b = value;
864 if (!b || typeof b !== 'object' || b.version !== 1 || !Number.isSafeInteger(b.sequence) || b.sequence < 0 || b.sequence > pet_sim_js_1.PET_MAX_SECONDS * 2.5
865 || b.simTimeMs !== b.sequence * exports.PET_BIN_MS || b.durationMs !== exports.PET_BIN_MS
866 || !model_js_1.CATEGORIES.includes(b.channel) || typeof b.waiting !== 'boolean'
867 || !Array.isArray(b.agentIds) || b.agentIds.length > 250_000 || b.agentIds.some(id => typeof id !== 'string' || !id || id.length > 4096)
868 || !Number.isSafeInteger(b.errors) || b.errors < 0 || b.errors > 250_000
869 || !Array.isArray(b.onsets) || b.onsets.length !== 13 || b.onsets.some(n => !Number.isSafeInteger(n) || n < 0 || n > 250_000)
870 || !Array.isArray(b.activeMs) || b.activeMs.length !== 13 || b.activeMs.some(n => !Number.isFinite(n) || n < 0 || n > 100_000_000))
871 throw new Error('Invalid version 1 pet bucket.');
872 }
873 function decodePetJSONL(text) {
874 if (text.length > 64 * 1024 * 1024)
875 throw new Error('Pet tape exceeds 64 MiB.');
876 const rows = text.split(/\r?\n/).filter(line => line.trim()).map(line => JSON.parse(line));
877 if (rows.length > 216_000)
878 throw new Error('Pet tape exceeds 24 hours.');
879 return rows.map((row, i) => { validatePetBucket(row); if (row.sequence !== i)
880 throw new Error('Non-contiguous pet tape.'); return row; });
881 }
882 const order = (a, b) => a < b ? -1 : a > b ? 1 : 0;
883 const keyOf = (e) => JSON.stringify([e.traceId, e.id]);
884 const isContainer = (e) => e.attributes['whalesong.container'] === true
885 || e.attributes['codewhale.container'] === true;
886 /** Compile a single trace. Unknown-duration spans provide onsets, not occupancy.
887 * Updates of the same trace/id replace earlier snapshots rather than double count.
888 * An endpoint onset gets its own bucket; intervals use [start, end). */
889 function compilePetTelemetry(input, durationMs = 0, firstSequence = 0, originMs = 0) {
890 if (input.length > 250_000)
891 throw new Error('Pet input exceeds 250000 events.');
892 if (!Number.isFinite(durationMs) || durationMs < 0)
893 throw new Error('Invalid pet duration.');
894 if (!Number.isSafeInteger(firstSequence) || firstSequence < 0)
895 throw new Error('Invalid first pet bucket.');
896 if (!Number.isFinite(originMs))
897 throw new Error('Invalid pet clock origin.');
898 durationMs = Math.max(0, durationMs - originMs);
899 const unique = new Map();
900 const traces = new Set();
901 for (const e of input) {
902 if (e.schemaVersion !== 1 || !e.id || !e.traceId || !model_js_1.CATEGORIES.includes(e.category)
903 || !Number.isFinite(e.startTime) || !Number.isFinite(e.endTime)
904 || e.startTime < 0 || e.endTime < e.startTime || !e.attributes)
905 throw new Error('Invalid event-v1 pet input. Import through importTrace first.');
906 traces.add(e.traceId);
907 unique.set(keyOf(e), e);
908 }
909 if (traces.size > 1)
910 throw new Error('Select one trace for the pet.');
911 const parents = new Set([...unique.values()].filter(e => e.parentId).map(e => e.parentId));
912 const events = [...unique.values()].filter(e => !isContainer(e)
913 && !(e.category === 'orchestration' && parents.has(e.id)))
914 .map(e => ({ ...e, startTime: e.startTime - originMs, endTime: (e.openEnded ? e.startTime : e.endTime) - originMs,
915 attributes: e.attributes['whalesong.error_onset_ms'] === undefined ? e.attributes
916 : { ...e.attributes, 'whalesong.error_onset_ms': (0, model_js_1.errorOnsetOf)(e) - originMs } }))
917 .sort((a, b) => a.startTime - b.startTime || order(a.id, b.id));
918 let lastOnset = 0;
919 for (const e of events) {
920 durationMs = Math.max(durationMs, e.endTime);
921 lastOnset = Math.max(lastOnset, e.startTime);
922 }
923 const failures = events.filter(e => e.category === 'error' || e.status === 'error').map(model_js_1.errorOnsetOf).sort((a, b) => a - b);
924 if (failures.length)
925 lastOnset = Math.max(lastOnset, failures[failures.length - 1]);
926 const count = Math.max(1, Math.ceil(durationMs / exports.PET_BIN_MS), Math.floor(lastOnset / exports.PET_BIN_MS) + 1);
927 if (count - firstSequence > 216_000 || count > pet_sim_js_1.PET_MAX_SECONDS * 2.5)
928 throw new Error('Pet replay exceeds 24 hours; select a shorter trace.');
929 const index = new signal_js_1.IntervalIndex(events), result = [];
930 const recent = [], names = new Map();
931 let next = 0, expired = 0, nextFailure = 0;
932 for (let sequence = firstSequence; sequence < count; sequence++) {
933 const start = sequence * exports.PET_BIN_MS, end = start + exports.PET_BIN_MS;
934 // A trailing window only: appending future events cannot rewrite earlier bins.
935 while (next < events.length && events[next].startTime < end) {
936 const e = events[next++];
937 // A liveness pulse continues an operation; it is not a repeated tool call.
938 if (e.attributes['whalesong.continuation'] === true)
939 continue;
940 recent.push(e);
941 names.set(e.name, (names.get(e.name) ?? 0) + 1);
942 }
943 while (expired < recent.length && recent[expired].startTime < end - 12_000) {
944 const name = recent[expired++].name, n = names.get(name) - 1;
945 if (n)
946 names.set(name, n);
947 else
948 names.delete(name);
949 }
950 const onsets = model_js_1.CATEGORIES.map(() => 0), activeMs = model_js_1.CATEGORIES.map(() => 0);
951 const agents = new Set();
952 while (nextFailure < failures.length && failures[nextFailure] < start)
953 nextFailure++;
954 let errors = 0, waiting = false, human = false;
955 while (nextFailure < failures.length && failures[nextFailure] < end) {
956 errors++;
957 nextFailure++;
958 }
959 for (const e of index.query(start, end)) {
960 if (e.startTime >= end)
961 continue;
962 const onset = e.startTime >= start, c = model_js_1.CATEGORIES.indexOf(e.category);
963 const overlap = Math.max(0, Math.min(end, e.endTime) - Math.max(start, e.startTime));
964 if (!onset && !overlap)
965 continue;
966 activeMs[c] += overlap;
967 if (onset)
968 onsets[c]++;
969 if (e.agentId && !['unknown', 'unattributed'].includes(e.agentId))
970 agents.add(e.agentId);
971 if (e.category === 'human') {
972 human = true;
973 waiting ||= e.status === 'pending' || e.status === 'running' || e.attributes['whalesong.waiting'] === true;
974 }
975 }
976 const total = activeMs.reduce((a, b) => a + b, 0), hits = onsets.reduce((a, b) => a + b, 0);
977 const observed = total > 0 || hits > 0 || errors > 0;
978 let dominant = model_js_1.CATEGORIES.indexOf('other');
979 for (let c = 0; c < model_js_1.CATEGORIES.length; c++) {
980 if (activeMs[c] > activeMs[dominant]
981 || activeMs[c] === activeMs[dominant] && onsets[c] > onsets[dominant])
982 dominant = c;
983 }
984 let repeated = 0;
985 for (const n of names.values())
986 if (n >= 4)
987 repeated += n;
988 const repeatDensity = repeated / Math.max(1, recent.length - expired);
989 const channel = errors ? 'error' : human ? 'human' : agents.size >= 3 ? 'agent' : model_js_1.CATEGORIES[dominant];
990 result.push({ version: 1, sequence, simTimeMs: start, durationMs: exports.PET_BIN_MS,
991 activity: observed ? (0, model_js_1.clamp)(.28 + .38 * total / exports.PET_BIN_MS + .08 * hits, 0, 1) : .12,
992 coherence: observed ? (0, model_js_1.clamp)(.92 - repeatDensity * .58 - Math.min(.55, errors * .18), .08, 1) : .25,
993 attention: waiting ? .8 : human ? .65 : errors ? .45 : 0,
994 channel, observed: observed ? 1 : 0, roamX: 0, roamY: 0, flip: 1, lit: 1,
995 onsets, activeMs, errors, agentIds: [...agents].sort(order), waiting });
996 }
997 return result;
998 }
999 /** Flat state remains compatible with native readers; metadata preserves audio
1000 * onsets and peer identities. No prompts, tool arguments, or event names escape. */
1001 function encodePetJSONL(buckets) {
1002 return buckets.map(b => JSON.stringify(b)).join('\n') + (buckets.length ? '\n' : '');
1003 }
1004 /** Legacy visual conformance interchange. Use JSONL to preserve audio metadata. */
1005 function encodePetTSV(buckets) {
1006 return 'dt\tactivity\tcoherence\tattention\tchannel\tobserved\troamX\troamY\tflip\tlit\n'
1007 + buckets.map(b => [b.durationMs / 1000, b.activity, b.coherence, b.attention, b.channel,
1008 b.observed, b.roamX, b.roamY, b.flip, b.lit].join('\t')).join('\n') + '\n';
1009 }
1010
1011 };
1012 factories["model"]=function(exports,require){
1013 "use strict";
1014 Object.defineProperty(exports, "__esModule", { value: true });
1015 exports.durationOf = exports.EMPTY_FILTERS = exports.CATEGORIES = void 0;
1016 exports.eventMatches = eventMatches;
1017 exports.errorOnsetOf = errorOnsetOf;
1018 exports.stableHash = stableHash;
1019 exports.quantile = quantile;
1020 exports.clamp = clamp;
1021 exports.formatTime = formatTime;
1022 /** Versioned, vendor-neutral trace and signal contracts. All internal time is ms. */
1023 exports.CATEGORIES = [
1024 'reasoning', 'tool', 'memory', 'code', 'filesystem', 'network', 'browser',
1025 'communication', 'agent', 'orchestration', 'error', 'human', 'other',
1026 ];
1027 exports.EMPTY_FILTERS = { query: '', category: '', agent: '', model: '', tool: '', status: '' };
1028 function eventMatches(e, f) {
1029 if (f.category && e.category !== f.category)
1030 return false;
1031 if (f.agent && e.agentId !== f.agent)
1032 return false;
1033 if (f.model && e.model !== f.model)
1034 return false;
1035 if (f.tool && e.tool !== f.tool)
1036 return false;
1037 if (f.status && e.status !== f.status)
1038 return false;
1039 if (f.query) {
1040 const q = f.query.toLowerCase();
1041 // Search is deliberately content-aware but runs only over locally retained fields.
1042 if (![e.name, e.id, e.agentId, e.model, e.tool, e.provider, e.category,
1043 JSON.stringify(e.attributes), JSON.stringify(e.payload), JSON.stringify(e.raw)].filter(Boolean).join(' ').toLowerCase().includes(q))
1044 return false;
1045 }
1046 return true;
1047 }
1048 const durationOf = (e) => Math.max(0, e.endTime - e.startTime);
1049 exports.durationOf = durationOf;
1050 /** An explicit failure receipt can arrive after a span began or ended. Keep
1051 * its timestamp distinct from the operation onset in every signal view. */
1052 function errorOnsetOf(e) {
1053 const time = e.attributes['whalesong.error_onset_ms'];
1054 if (time === undefined)
1055 return e.startTime;
1056 if (typeof time !== 'number' || !Number.isFinite(time) || time < e.startTime)
1057 throw new Error('Invalid failure observation time.');
1058 return time;
1059 }
1060 function stableHash(text, seed = 2166136261) {
1061 let h = seed;
1062 for (let i = 0; i < text.length; i++) {
1063 h ^= text.charCodeAt(i);
1064 h = Math.imul(h, 16777619);
1065 }
1066 return h >>> 0;
1067 }
1068 function quantile(a, q) {
1069 if (!a.length)
1070 return 0;
1071 const s = [...a].sort((a, b) => a - b), x = Math.min(1, Math.max(0, q)) * (s.length - 1);
1072 return s[Math.floor(x)] + (s[Math.ceil(x)] - s[Math.floor(x)]) * (x % 1);
1073 }
1074 function clamp(x, lo, hi) { return Math.max(lo, Math.min(hi, x)); }
1075 function formatTime(ms, precise = false) {
1076 const m = Math.floor(Math.max(0, ms) / 60000), s = Math.floor(Math.max(0, ms) / 1000) % 60;
1077 return `${String(m).padStart(2, '0')}:${String(s).padStart(2, '0')}${precise ? '.' + String(Math.floor(ms % 1000)).padStart(3, '0') : ''}`;
1078 }
1079
1080 };
1081 factories["signal"]=function(exports,require){
1082 "use strict";
1083 Object.defineProperty(exports, "__esModule", { value: true });
1084 exports.IntervalIndex = void 0;
1085 exports.buildPyramid = buildPyramid;
1086 exports.chooseLevel = chooseLevel;
1087 exports.binValue = binValue;
1088 exports.intensity = intensity;
1089 exports.totals = totals;
1090 exports.onsetSeries = onsetSeries;
1091 exports.autocorrelation = autocorrelation;
1092 exports.periodogram = periodogram;
1093 exports.unionDuration = unionDuration;
1094 const model_js_1 = require("./model.js");
1095 function emptyLevel(length, binMs) {
1096 const n = model_js_1.CATEGORIES.length * length;
1097 return { binMs, length, onsets: new Float64Array(n), activeMs: new Float64Array(n),
1098 outputTokens: new Float64Array(n), cost: new Float64Array(n), errors: new Float64Array(n), peak: new Float64Array(n) };
1099 }
1100 const FIELDS = ['onsets', 'activeMs', 'outputTokens', 'cost', 'errors'];
1101 /** O(events + channels × bins), including long intervals. No span-length inner loop. */
1102 function buildPyramid(events, requestedDuration, maxBins = 16_384) {
1103 if (!Number.isInteger(maxBins) || maxBins < 16 || maxBins > 1_048_576)
1104 throw new Error('maxBins must be an integer in [16, 1048576].');
1105 let duration = requestedDuration ?? 1;
1106 for (const e of events)
1107 duration = Math.max(duration, e.endTime, e.startTime, e.status === 'error' ? (0, model_js_1.errorOnsetOf)(e) : 0);
1108 if (!Number.isFinite(duration) || duration < 0)
1109 throw new Error('Signal duration must be finite and nonnegative.');
1110 duration = Math.max(1, duration);
1111 const binMs = 2 ** Math.ceil(Math.log2(Math.max(1, duration / (maxBins - 1))));
1112 const length = Math.floor(duration / binMs) + 1, fine = emptyLevel(length, binMs);
1113 const stride = length + 1;
1114 const activeDiff = new Float64Array(model_js_1.CATEGORIES.length * stride), tokenDiff = new Float64Array(model_js_1.CATEGORIES.length * stride);
1115 for (const e of events) {
1116 if (!Number.isFinite(e.startTime) || !Number.isFinite(e.endTime) || e.startTime < 0 || e.endTime < e.startTime)
1117 throw new Error(`Invalid interval for ${e.id}.`);
1118 const channel = model_js_1.CATEGORIES.indexOf(e.category);
1119 if (channel < 0)
1120 throw new Error(`Unknown category for ${e.id}.`);
1121 const a = Math.floor(e.startTime / binMs), b = Math.floor(e.endTime / binMs);
1122 const at = channel * length, diff = channel * stride;
1123 fine.onsets[at + a]++;
1124 fine.cost[at + a] += e.cost ?? 0;
1125 if (e.status === 'error')
1126 fine.errors[at + Math.floor((0, model_js_1.errorOnsetOf)(e) / binMs)]++;
1127 const d = e.endTime - e.startTime, tokens = e.outputTokens ?? 0;
1128 if (d === 0) {
1129 fine.outputTokens[at + a] += tokens;
1130 continue;
1131 }
1132 if (a === b) {
1133 fine.activeMs[at + a] += d;
1134 fine.outputTokens[at + a] += tokens;
1135 }
1136 else {
1137 const left = (a + 1) * binMs - e.startTime, right = e.endTime - b * binMs, tokenRate = tokens / d;
1138 fine.activeMs[at + a] += left;
1139 fine.activeMs[at + b] += right;
1140 fine.outputTokens[at + a] += left * tokenRate;
1141 fine.outputTokens[at + b] += right * tokenRate;
1142 if (b > a + 1) {
1143 activeDiff[diff + a + 1] += binMs;
1144 activeDiff[diff + b] -= binMs;
1145 tokenDiff[diff + a + 1] += binMs * tokenRate;
1146 tokenDiff[diff + b] -= binMs * tokenRate;
1147 }
1148 }
1149 }
1150 for (let c = 0; c < model_js_1.CATEGORIES.length; c++) {
1151 let active = 0, tokens = 0;
1152 for (let i = 0; i < length; i++) {
1153 active += activeDiff[c * stride + i];
1154 tokens += tokenDiff[c * stride + i];
1155 const at = c * length + i;
1156 fine.activeMs[at] = Math.max(0, fine.activeMs[at] + active);
1157 fine.outputTokens[at] = Math.max(0, fine.outputTokens[at] + tokens);
1158 fine.peak[at] = fine.activeMs[at] / binMs;
1159 }
1160 }
1161 const levels = [fine];
1162 while (levels.at(-1).length > 1) {
1163 const child = levels.at(-1), parent = emptyLevel(Math.ceil(child.length / 2), child.binMs * 2);
1164 for (let c = 0; c < model_js_1.CATEGORIES.length; c++)
1165 for (let i = 0; i < parent.length; i++) {
1166 const a = c * child.length + i * 2, b = a + 1, dst = c * parent.length + i, hasB = i * 2 + 1 < child.length;
1167 for (const key of FIELDS)
1168 parent[key][dst] = child[key][a] + (hasB ? child[key][b] : 0);
1169 parent.peak[dst] = Math.max(child.peak[a], hasB ? child.peak[b] : 0);
1170 }
1171 levels.push(parent);
1172 }
1173 const p = { duration, channels: model_js_1.CATEGORIES, levels, calibration: { activity: 1, onsets: 1, tokens: 1, cost: 1 } };
1174 const reference = chooseLevel(p, duration / 1200);
1175 for (const metric of ['activity', 'onsets', 'tokens', 'cost']) {
1176 const positives = [];
1177 for (let c = 0; c < model_js_1.CATEGORIES.length; c++)
1178 for (let i = 0; i < reference.length; i++) {
1179 const v = binValue(reference, c, i, metric);
1180 if (v > 0)
1181 positives.push(v);
1182 }
1183 p.calibration[metric] = Math.max(1e-9, (0, model_js_1.quantile)(positives, .95));
1184 }
1185 return p;
1186 }
1187 /** Choose the coarsest stored level no wider than one requested pixel interval. */
1188 function chooseLevel(p, targetBinMs) {
1189 let result = p.levels[0];
1190 for (const level of p.levels) {
1191 if (level.binMs > targetBinMs)
1192 break;
1193 result = level;
1194 }
1195 return result;
1196 }
1197 function binValue(level, channel, bin, metric) {
1198 if (bin < 0 || bin >= level.length)
1199 return 0;
1200 const at = channel * level.length + bin;
1201 if (metric === 'activity')
1202 return level.activeMs[at] / level.binMs;
1203 if (metric === 'onsets')
1204 return level.onsets[at] * 1000 / level.binMs;
1205 if (metric === 'tokens')
1206 return level.outputTokens[at] * 1000 / level.binMs;
1207 return level.cost[at] * 1000 / level.binMs;
1208 }
1209 function intensity(value, reference) {
1210 return (0, model_js_1.clamp)(Math.log1p(value / Math.max(1e-9, reference) * 8) / Math.log(9), 0, 1);
1211 }
1212 /** Conserved totals: useful for tests and alternate native backends. */
1213 function totals(level) {
1214 return Object.fromEntries(FIELDS.map(k => [k, level[k].reduce((s, x) => s + x, 0)]));
1215 }
1216 /** Sorted-start, max-end segment tree. Long root spans do not force a reverse
1217 * scan through every earlier event. Results are chronological and honor limits. */
1218 class IntervalIndex {
1219 events;
1220 maxEnd;
1221 leafCount;
1222 constructor(events) {
1223 this.events = [...events].sort((a, b) => a.startTime - b.startTime || a.id.localeCompare(b.id));
1224 this.leafCount = 2 ** Math.ceil(Math.log2(Math.max(1, this.events.length)));
1225 this.maxEnd = new Float64Array(this.leafCount * 2).fill(-Infinity);
1226 for (let i = 0; i < this.events.length; i++)
1227 this.maxEnd[this.leafCount + i] = this.events[i].endTime;
1228 for (let i = this.leafCount - 1; i; i--)
1229 this.maxEnd[i] = Math.max(this.maxEnd[i * 2], this.maxEnd[i * 2 + 1]);
1230 }
1231 query(start, end, limit = Infinity) {
1232 if (!Number.isFinite(start) || !Number.isFinite(end) || end < start || limit <= 0)
1233 return [];
1234 let lo = 0, hi = this.events.length;
1235 while (lo < hi) {
1236 const mid = (lo + hi) >>> 1;
1237 if (this.events[mid].startTime <= end)
1238 lo = mid + 1;
1239 else
1240 hi = mid;
1241 }
1242 const bound = lo, found = [];
1243 const visit = (node, left, right) => {
1244 if (left >= bound || this.maxEnd[node] < start || found.length >= limit)
1245 return;
1246 if (right - left === 1) {
1247 const e = this.events[left];
1248 if (e && (e.endTime > start || e.startTime === e.endTime && e.startTime >= start))
1249 found.push(e);
1250 return;
1251 }
1252 const mid = (left + right) >>> 1;
1253 visit(node * 2, left, mid);
1254 visit(node * 2 + 1, mid, right);
1255 };
1256 visit(1, 0, this.leafCount);
1257 return found;
1258 }
1259 }
1260 exports.IntervalIndex = IntervalIndex;
1261 /** Sample an onset train into equal-width bins; nothing is inferred between impulses. */
1262 function onsetSeries(events, start, end, n = 256, category) {
1263 const out = new Float64Array(n), span = Math.max(1e-6, end - start);
1264 for (const e of events)
1265 if ((!category || e.category === category) && e.startTime >= start && e.startTime < end) {
1266 const at = Math.floor((e.startTime - start) / span * n);
1267 if (at >= 0 && at < n)
1268 out[at]++;
1269 }
1270 return out;
1271 }
1272 /** Centered, variance-normalized autocorrelation; lag-zero is one unless constant. */
1273 function autocorrelation(input, maxLag = 64) {
1274 const n = input.length;
1275 if (!n)
1276 return [];
1277 let mean = 0;
1278 for (let i = 0; i < n; i++)
1279 mean += input[i];
1280 mean /= n;
1281 const centered = Array.from(input, x => x - mean), energy = centered.reduce((s, v) => s + v * v, 0);
1282 const result = [];
1283 for (let lag = 0; lag <= Math.min(maxLag, n - 1); lag++) {
1284 let sum = 0;
1285 for (let i = 0; i < n - lag; i++)
1286 sum += centered[i] * centered[i + lag];
1287 result.push(energy > 1e-12 ? sum / energy : 0);
1288 }
1289 return result;
1290 }
1291 /** Hann-window periodogram of an actual uniformly sampled onset signal, DC removed. */
1292 function periodogram(input, sampleHz) {
1293 const n = input.length, frequencies = [], power = [];
1294 if (n < 4 || sampleHz <= 0)
1295 return { frequencies, power, entropy: 0, peakHz: 0, sampleHz, resolutionHz: 0 };
1296 let mean = 0;
1297 for (let i = 0; i < n; i++)
1298 mean += input[i];
1299 mean /= n;
1300 const windowed = Array.from(input, (x, i) => (x - mean) * (.5 - .5 * Math.cos(2 * Math.PI * i / (n - 1))));
1301 const windowEnergy = Array.from({ length: n }, (_, i) => (.5 - .5 * Math.cos(2 * Math.PI * i / (n - 1))) ** 2).reduce((a, b) => a + b, 0);
1302 for (let k = 1; k <= Math.floor(n / 2); k++) {
1303 let re = 0, im = 0;
1304 for (let t = 0; t < n; t++) {
1305 const angle = 2 * Math.PI * k * t / n;
1306 re += windowed[t] * Math.cos(angle);
1307 im -= windowed[t] * Math.sin(angle);
1308 }
1309 frequencies.push(k * sampleHz / n);
1310 power.push((re * re + im * im) / (windowEnergy * sampleHz) * (n % 2 === 0 && k === n / 2 ? 1 : 2));
1311 }
1312 const sum = power.reduce((s, x) => s + x, 0);
1313 let entropy = 0;
1314 for (const x of power)
1315 if (x > 0 && sum > 0) {
1316 const p = x / sum;
1317 entropy -= p * Math.log2(p);
1318 }
1319 entropy = power.length > 1 ? entropy / Math.log2(power.length) : 0;
1320 const max = Math.max(...power);
1321 return { frequencies, power, entropy, peakHz: max > 1e-12 ? frequencies[power.indexOf(max)] : 0, sampleHz, resolutionHz: sampleHz / n };
1322 }
1323 function unionDuration(events, start = 0, end = Infinity) {
1324 const intervals = events.filter(e => e.endTime > e.startTime && e.endTime > start && e.startTime < end)
1325 .map(e => [Math.max(start, e.startTime), Math.min(end, e.endTime)]).sort((a, b) => a[0] - b[0]);
1326 let total = 0, left = 0, right = 0;
1327 for (const [a, b] of intervals) {
1328 if (a > right) {
1329 total += right - left;
1330 left = a;
1331 right = b;
1332 }
1333 else
1334 right = Math.max(right, b);
1335 }
1336 return total + right - left;
1337 }
1338
1339 };
1340 factories["dot-field"]=function(exports,require){
1341 "use strict";
1342 Object.defineProperty(exports, "__esModule", { value: true });
1343 exports.dotFieldKey = dotFieldKey;
1344 exports.projectDotField = projectDotField;
1345 exports.blendDotFields = blendDotFields;
1346 const model_js_1 = require("./model.js");
1347 const dot_body_js_1 = require("./dot-body.js");
1348 const dot_pixel_body_js_1 = require("./dot-pixel-body.js");
1349 const dot_forms_js_1 = require("./dot-forms.js");
1350 const clamp = (n, lo = 0, hi = 1) => Math.max(lo, Math.min(hi, n));
1351 const ease = (n) => {
1352 const u = clamp(n);
1353 return u * u * (3 - 2 * u);
1354 };
1355 function form(a, timeMs) {
1356 if (a.freshness !== 'fresh' || !a.observed)
1357 return null;
1358 if (a.authoritativePresence === 'needs_you')
1359 return 'waiting';
1360 if (a.authoritativePresence === 'done')
1361 return timeMs - (a.observedAtMs ?? timeMs) < 2600 ? 'done' : null;
1362 if (a.authoritativePresence === 'idle' || !a.activityKind)
1363 return null;
1364 return a.activityKind === 'tool' ? 'executing' : a.activityKind;
1365 }
1366 function dotFieldKey(a) {
1367 return [
1368 a.freshness,
1369 a.authoritativePresence,
1370 a.activityKind,
1371 a.actionId,
1372 a.parallelAgentCount,
1373 a.doneEffectId,
1374 a.activeSpans.length === 0 && !!a.failedToolAge,
1375 ].join(':');
1376 }
1377 function pigment(hue, light, satScale = 0.72) {
1378 const h = (((hue % 360) + 360) % 360) / 60;
1379 const c = (1 - Math.abs(2 * light - 1)) * satScale;
1380 const x = c * (1 - Math.abs((h % 2) - 1));
1381 const m = light - c / 2;
1382 const rgb = h < 1 ? [c, x, 0] : h < 2 ? [x, c, 0] : h < 3 ? [0, c, x] : h < 4 ? [0, x, c] : h < 5 ? [x, 0, c] : [c, 0, x];
1383 return rgb.map((v) => Math.round(clamp(v + m, 0, 1) * 255));
1384 }
1385 function projectDotField(activity, timeMs, still = false, expressionAtMs = 0, options = {}) {
1386 const kind = form(activity, timeMs);
1387 const identity = activity.actionId || activity.activityKind || 'whale';
1388 const variant = ((0, model_js_1.stableHash)(identity) % 997) / 997;
1389 const t = still ? 0 : timeMs / 1000;
1390 const bodyStyle = options.bodyStyle ?? 'smooth';
1391 const body = bodyStyle === 'pixel' ? dot_pixel_body_js_1.DOT_PIXEL_BODY : dot_body_js_1.DOT_BODY;
1392 const fresh = activity.freshness === 'fresh' && activity.observed;
1393 const failed = fresh && !activity.activeSpans.length && !!activity.failedToolAge;
1394 const elapsed = Math.max(0, timeMs - expressionAtMs) / 1000;
1395 const phase = (elapsed + 1.7) % 8.4;
1396 const formTime = still ? dot_forms_js_1.FORM_STILL_TIME : kind === 'done' ? (timeMs - (activity.observedAtMs ?? timeMs)) / 1000 : elapsed;
1397 const morph = !kind
1398 ? 0
1399 : still
1400 ? 1
1401 : kind === 'done'
1402 ? 1 - ease((timeMs - (activity.observedAtMs ?? timeMs) - 800) / 900)
1403 : ease(phase / 1.7) * (1 - ease((phase - 5.4) / 0.9));
1404 const agents = activity.parallelAgentCount >= 3 ? 3 : 2;
1405 const hue = failed ? 8 : kind ? dot_forms_js_1.FORM_HUE[kind] : 206;
1406 const points = [];
1407 const materials = [];
1408 for (let i = 0; i < body.length; i++) {
1409 const [hx, hy] = body[i];
1410 const tail = clamp((-hx - hy + 0.1) / 0.65);
1411 const homeX = hx * 1.9 + (still ? 0 : 0.008 * Math.sin(t * 0.75 + hy * 5));
1412 const homeY = hy * 1.9 +
1413 (still ? 0 : 0.009 * Math.sin(t * 1.1 + hx * 4) + tail * 0.012 * Math.sin(t * 1.55 + hx * 7));
1414 const inThroat = hy > 0.06 && hx > -0.18;
1415 let light = inThroat
1416 ? 0.80 + 0.08 * clamp((hx + hy) / 0.7)
1417 : 0.58 + 0.16 * clamp((hx + 0.45) / 0.9) + 0.03 * Math.cos(hy * 7);
1418 if (!still)
1419 light = clamp(light + 0.022 * Math.sin(hx * 9 - hy * 5 - t * 1.1), 0.52, 0.92);
1420 const baseHue = inThroat ? 196 : 208 + clamp((-hy - hx + 0.35) / 0.9) * 14;
1421 const base = bodyStyle === 'pixel' ? dot_pixel_body_js_1.DOT_PIXEL_BODY[i].slice(2) : pigment(baseHue, light, inThroat ? 0.82 : 0.74);
1422 let x = homeX;
1423 let y = homeY;
1424 let color = fresh ? base : [126, 178, 224];
1425 let alpha = fresh ? (inThroat ? 0.94 : 0.86) : (inThroat ? 0.72 : 0.56);
1426 if (kind && morph > 0) {
1427 const e = ease(morph * 1.25 - ((i % 97) / 97) * 0.25);
1428 const target = (0, dot_forms_js_1.formPoint)(kind, bodyStyle, i, formTime, agents);
1429 x += (target.x * dot_forms_js_1.FORM_SCALE - homeX) * e;
1430 y += (target.y * dot_forms_js_1.FORM_SCALE - homeY) * e;
1431 const accent = pigment(hue + (variant * 4 - 2), clamp(0.56 + target.lit * 0.38, 0.50, 0.93), 0.78);
1432 color = base.map((v, k) => v + (accent[k] - v) * e);
1433 alpha += (clamp(0.42 + 0.56 * target.fade) - alpha) * e;
1434 }
1435 points.push([clamp(x, -0.94, 0.94), clamp(y, -0.94, 0.94)]);
1436 materials.push([...color.map(Math.round), alpha]);
1437 }
1438 return { points, materials, morph, bodyStyle };
1439 }
1440 function blendDotFields(from, to, progress) {
1441 const m = ease(progress);
1442 if (m >= 1)
1443 return to;
1444 return {
1445 morph: from.morph + (to.morph - from.morph) * m,
1446 bodyStyle: to.bodyStyle,
1447 points: to.points.map((p, i) => p.map((v, k) => from.points[i][k] + (v - from.points[i][k]) * m)),
1448 materials: to.materials.map((p, i) => p.map((v, k) => from.materials[i][k] + (v - from.materials[i][k]) * m)),
1449 };
1450 }
1451
1452 };
1453 factories["dot-body"]=function(exports,require){
1454 "use strict";
1455 Object.defineProperty(exports, "__esModule", { value: true });
1456 exports.DOT_BODY = void 0;
1457 exports.DOT_BODY = [
1458 [-0.104699, -0.388947],
1459 [0.101025, 0.375171],
1460 [-0.424305, 0.103321],
1461 [0.424305, -0.050972],
1462 [0.042247, -0.006888],
1463 [-0.376548, -0.212612],
1464 [-0.207561, 0.345781],
1465 [0.189192, -0.256696],
1466 [0.339812, 0.220878],
1467 [-0.178172, 0.095974],
1468 [-0.001837, 0.198836],
1469 [0.240623, 0.037196],
1470 [-0.001837, -0.227306],
1471 [-0.314096, -0.043624],
1472 [-0.196540, -0.234654],
1473 [-0.343485, 0.250267],
1474 [0.174498, 0.228225],
1475 [-0.056941, 0.382518],
1476 [0.049594, -0.374252],
1477 [0.409611, 0.095974],
1478 [-0.134088, 0.228225],
1479 [0.108372, 0.110668],
1480 [-0.053268, 0.081279],
1481 [-0.299402, 0.132710],
1482 [-0.435326, -0.021583],
1483 [-0.292054, -0.308127],
1484 [0.299402, -0.065666],
1485 [0.156130, -0.043624],
1486 [-0.281033, -0.153834],
1487 [0.258992, 0.147405],
1488 [0.255318, 0.301698],
1489 [0.101025, -0.197917],
1490 [-0.240623, 0.220878],
1491 [-0.093678, -0.278737],
1492 [0.020205, 0.301698],
1493 [-0.200213, -0.359558],
1494 [-0.409611, -0.117097],
1495 [0.343485, 0.022501],
1496 [-0.350833, 0.044543],
1497 [0.082657, 0.235572],
1498 [0.071636, -0.286085],
1499 [-0.071636, 0.294350],
1500 [0.170824, 0.323740],
1501 [-0.031226, -0.344863],
1502 [-0.255318, 0.059237],
1503 [0.023879, 0.118016],
1504 [-0.108372, 0.147405],
1505 [-0.387569, 0.176794],
1506 [0.119393, 0.029848],
1507 [0.192866, 0.103321],
1508 [-0.277360, 0.294350],
1509 [0.332464, 0.118016],
1510 [-0.130414, 0.353129],
1511 [0.023879, 0.382518],
1512 [-0.277360, -0.234654],
1513 [0.431653, 0.022501],
1514 [-0.185519, 0.169447],
1515 [0.258992, 0.220878],
1516 [0.229603, -0.043624],
1517 [-0.119393, 0.051890],
1518 [-0.339812, -0.109750],
1519 [-0.192866, 0.272309],
1520 [-0.163477, -0.300779],
1521 [0.126741, 0.176794],
1522 [0.383895, 0.162099],
1523 [-0.067962, 0.213530],
1524 [-0.020205, 0.015154],
1525 [0.053268, 0.059237],
1526 [-0.380222, -0.058319],
1527 [-0.042247, 0.147405],
1528 [-0.303075, 0.198836],
1529 [-0.229603, -0.300779],
1530 [0.009184, -0.293432],
1531 [0.361854, -0.058319],
1532 [-0.361854, 0.110668],
1533 [-0.236950, 0.125363],
1534 [0.064289, 0.169447],
1535 [-0.413285, 0.037196],
1536 [-0.336138, -0.264043],
1537 [0.130414, -0.271390],
1538 [0.284707, -0.006888],
1539 [0.178172, 0.015154],
1540 [-0.023879, 0.257614],
1541 [-0.137762, 0.294350],
1542 [0.108372, 0.316392],
1543 [-0.339812, -0.168528],
1544 [-0.145109, -0.352210],
1545 [-0.086331, -0.337516],
1546 [0.053268, -0.234654],
1547 [0.101025, -0.021583],
1548 [0.299402, 0.257614],
1549 [0.214908, 0.264961],
1550 [-0.031226, 0.331087],
1551 [-0.042247, -0.264043],
1552 [0.152456, -0.212612],
1553 [-0.001837, 0.066585],
1554 [0.387569, -0.006888],
1555 [-0.306749, 0.015154],
1556 [-0.306749, 0.073932],
1557 [0.148782, 0.073932],
1558 [0.303075, 0.176794],
1559 [0.027552, 0.242919],
1560 [-0.369201, -0.006888],
1561 [0.295728, 0.044543],
1562 [0.130414, 0.257614],
1563 [-0.189192, 0.220878],
1564 [-0.244297, -0.197917],
1565 [0.159803, 0.140058],
1566 [0.225929, 0.184141],
1567 [-0.053268, -0.388947],
1568 [-0.141435, -0.256696],
1569 [-0.398590, -0.168528],
1570 [-0.431653, -0.073014],
1571 [-0.258992, 0.169447],
1572 [0.001837, -0.381599],
1573 [-0.130414, 0.103321],
1574 [-0.336138, 0.162099],
1575 [-0.229603, 0.301698],
1576 [-0.321444, -0.219959],
1577 [0.328791, -0.021583],
1578 [-0.075310, 0.037196],
1579 [-0.288381, 0.242919],
1580 [-0.086331, 0.338434],
1581 [0.060615, 0.279656],
1582 [0.023879, -0.337516],
1583 [-0.387569, 0.073932],
1584 [-0.093678, 0.250267],
1585 [0.145109, 0.360476],
1586 [-0.236950, -0.256696],
1587 [0.200213, 0.059237],
1588 [-0.141435, 0.184141],
1589 [-0.350833, 0.206183],
1590 [0.240623, 0.081279],
1591 [0.214908, 0.323740],
1592 [-0.056941, -0.308127],
1593 [0.101025, -0.242001],
1594 [-0.369201, -0.139139],
1595 [-0.207561, 0.066585],
1596 [-0.082657, 0.110668],
1597 [-0.156130, 0.140058],
1598 [-0.101025, 0.382518],
1599 [-0.247971, -0.337516],
1600 [-0.123067, -0.308127],
1601 [-0.299402, -0.117097],
1602 [0.222255, 0.000459],
1603 [0.071636, 0.022501],
1604 [0.023879, 0.029848],
1605 [0.093678, 0.066585],
1606 [0.067962, 0.103321],
1607 [-0.023879, 0.110668],
1608 [-0.405937, 0.140058],
1609 [-0.001837, 0.154752],
1610 [0.045921, 0.206183],
1611 [-0.247971, 0.264961],
1612 [-0.016531, 0.375171],
1613 [-0.196540, -0.278737],
1614 [-0.273686, 0.095974],
1615 [-0.075310, 0.169447],
1616 [-0.163477, 0.331087],
1617 [0.056941, 0.360476],
1618 [0.192866, -0.028930],
1619 [0.137762, -0.006888],
1620 [0.347159, 0.176794],
1621 [-0.222255, 0.184141],
1622 [-0.104699, 0.198836],
1623 [0.178172, 0.279656],
1624 [-0.288381, -0.197917],
1625 [0.042247, -0.197917],
1626 [0.420632, 0.059237],
1627 [-0.196540, 0.132710],
1628 [0.097351, 0.147405],
1629 [0.093678, 0.198836],
1630 [-0.196540, -0.322821],
1631 [-0.295728, -0.271390],
1632 [-0.376548, -0.095055],
1633 [-0.310423, -0.080361],
1634 [0.427979, -0.014235],
1635 [0.380222, 0.125363],
1636 [-0.038573, 0.184141],
1637 [-0.027552, 0.294350],
1638 [0.031226, -0.264043],
1639 [0.262665, -0.065666],
1640 [-0.156130, 0.066585],
1641 [-0.156130, 0.257614],
1642 [-0.310423, 0.272309],
1643 [-0.023879, -0.300779],
1644 [-0.262665, -0.278737],
1645 [0.156130, -0.249348],
1646 [-0.343485, -0.073014],
1647 [-0.347159, -0.036277],
1648 [-0.402264, -0.028930],
1649 [0.152456, 0.037196],
1650 [-0.042247, 0.044543],
1651 [-0.093678, 0.073932],
1652 [-0.339812, 0.081279],
1653 [-0.233276, 0.088627],
1654 [0.031226, 0.162099],
1655 [0.200213, 0.206183],
1656 [-0.034900, 0.220878],
1657 [-0.214908, 0.242919],
1658 [-0.060615, 0.257614],
1659 [0.266339, 0.264961],
1660 [-0.104699, 0.301698],
1661 [0.145109, 0.301698],
1662 [0.001837, 0.338434],
1663 [-0.005510, -0.264043],
1664 [-0.350833, -0.234654],
1665 [-0.314096, -0.146486],
1666 [0.391243, -0.043624],
1667 [0.258992, -0.028930],
1668 [-0.332464, -0.006888],
1669 [-0.398590, 0.007806],
1670 [0.255318, 0.007806],
1671 [0.314096, 0.007806],
1672 [-0.292054, 0.044543],
1673 [0.266339, 0.059237],
1674 [-0.427979, 0.066585],
1675 [0.027552, 0.081279],
1676 [0.347159, 0.088627],
1677 [-0.325117, 0.110668],
1678 [0.145109, 0.110668],
1679 [-0.372874, 0.147405],
1680 [0.317770, 0.147405],
1681 [-0.270013, 0.206183],
1682 [-0.317770, 0.228225],
1683 [-0.123067, 0.264961],
1684 [0.005510, 0.272309],
1685 [-0.178172, 0.301698],
1686 [-0.178172, 0.360476],
1687 [-0.137762, -0.381599],
1688 [-0.078983, -0.366905],
1689 [-0.112046, -0.359558],
1690 [-0.229603, -0.227306],
1691 [-0.347159, -0.197917],
1692 [0.292054, -0.036277],
1693 [0.380222, 0.022501],
1694 [0.207561, 0.029848],
1695 [-0.266339, 0.140058],
1696 [-0.229603, 0.154752],
1697 [-0.292054, 0.162099],
1698 [0.306749, 0.228225],
1699 [0.222255, 0.294350],
1700 [0.115720, 0.345781],
1701 [-0.262665, -0.308127],
1702 [-0.093678, -0.308127],
1703 [0.038573, -0.293432],
1704 [0.101025, -0.286085],
1705 [-0.170824, -0.256696],
1706 [0.071636, -0.197917],
1707 [-0.369201, -0.168528],
1708 [0.328791, -0.065666],
1709 [0.361854, -0.028930],
1710 [0.071636, -0.006888],
1711 [-0.435326, 0.007806],
1712 [-0.383895, 0.037196],
1713 [-0.321444, 0.044543],
1714 [-0.394916, 0.103321],
1715 [-0.053268, 0.110668],
1716 [-0.075310, 0.140058],
1717 [0.130414, 0.140058],
1718 [-0.001837, 0.228225],
1719 [-0.130414, 0.323740],
1720 [-0.056941, 0.353129],
1721 [-0.163477, -0.330168],
1722 [-0.005510, -0.322821],
1723 [-0.123067, -0.278737],
1724 [0.071636, -0.256696],
1725 [0.119393, -0.219959],
1726 [-0.306749, -0.175876],
1727 [-0.262665, -0.175876],
1728 [0.101025, 0.007806],
1729 [-0.350833, 0.015154],
1730 [-0.343485, 0.132710],
1731 [-0.170824, 0.198836],
1732 [0.277360, 0.198836],
1733 [0.233276, 0.242919],
1734 [-0.023879, -0.388947],
1735 [-0.163477, -0.374252],
1736 [-0.005510, -0.352210],
1737 [-0.060615, -0.344863],
1738 [0.049594, -0.344863],
1739 [-0.222255, -0.330168],
1740 [-0.067962, -0.271390],
1741 [-0.303075, -0.242001],
1742 [0.023879, -0.234654],
1743 [-0.339812, -0.139139],
1744 [-0.402264, -0.087708],
1745 [0.130414, -0.036277],
1746 [0.163477, -0.014235],
1747 [0.361854, 0.000459],
1748 [0.005510, 0.007806],
1749 [0.405937, 0.015154],
1750 [-0.001837, 0.037196],
1751 [0.119393, 0.059237],
1752 [0.174498, 0.066585],
1753 [-0.027552, 0.073932],
1754 [-0.207561, 0.095974],
1755 [-0.299402, 0.103321],
1756 [0.049594, 0.125363],
1757 [0.119393, 0.206183],
1758 [-0.214908, 0.213530],
1759 [-0.163477, 0.228225],
1760 [0.053268, 0.235572],
1761 [-0.222255, 0.272309],
1762 [0.034900, 0.272309],
1763 [-0.056941, 0.323740],
1764 [0.082657, 0.323740],
1765 [0.082657, 0.353129],
1766 [0.023879, -0.366905],
1767 [0.078983, -0.227306],
1768 [-0.409611, -0.058319],
1769 [0.277360, 0.022501],
1770 [0.093678, 0.037196],
1771 [0.321444, 0.037196],
1772 [0.126741, 0.088627],
1773 [0.214908, 0.088627],
1774 [-0.001837, 0.095974],
1775 [0.167151, 0.095974],
1776 [-0.156130, 0.110668],
1777 [-0.108372, 0.118016],
1778 [-0.001837, 0.125363],
1779 [-0.130414, 0.132710],
1780 [-0.358180, 0.176794],
1781 [-0.328791, 0.191488],
1782 [0.023879, 0.191488],
1783 [-0.262665, 0.235572],
1784 [0.152456, 0.242919],
1785 [-0.005510, 0.309045],
1786 [0.192866, 0.338434],
1787 [-0.152456, 0.367823],
1788 [-0.078983, 0.367823],
1789 [-0.042247, -0.366905],
1790 [-0.174498, -0.352210],
1791 [-0.123067, -0.337516],
1792 [-0.152456, -0.278737],
1793 [-0.207561, -0.256696],
1794 [0.130414, -0.242001],
1795 [0.178172, -0.234654],
1796 [-0.255318, -0.219959],
1797 [-0.387569, -0.190570],
1798 [-0.409611, -0.146486],
1799 [0.203887, -0.050972],
1800 [0.317770, -0.043624],
1801 [-0.064289, 0.059237],
1802 [0.229603, 0.059237],
1803 [-0.361854, 0.066585],
1804 [-0.281033, 0.066585],
1805 [-0.130414, 0.073932],
1806 [0.398590, 0.073932],
1807 [-0.383895, 0.125363],
1808 [0.078983, 0.125363],
1809 [0.181845, 0.125363],
1810 [0.270013, 0.125363],
1811 [-0.130414, 0.162099],
1812 [0.148782, 0.162099],
1813 [-0.012858, 0.176794],
1814 [-0.281033, 0.184141],
1815 [-0.247971, 0.191488],
1816 [-0.196540, 0.191488],
1817 [-0.376548, 0.198836],
1818 [0.328791, 0.198836],
1819 [0.358180, 0.198836],
1820 [0.071636, 0.213530],
1821 [-0.093678, 0.220878],
1822 [-0.361854, 0.228225],
1823 [-0.181845, 0.250267],
1824 [0.071636, 0.257614],
1825 [-0.277360, 0.264961],
1826 [-0.167151, 0.279656],
1827 [-0.049594, 0.279656],
1828 [0.244297, 0.279656],
1829 [-0.203887, 0.294350],
1830 [0.067962, 0.382518],
1831 [-0.034900, -0.322821],
1832 [-0.200213, -0.300779],
1833 [-0.045921, -0.286085],
1834 [-0.233276, -0.278737],
1835 [0.097351, -0.264043],
1836 [-0.273686, -0.256696],
1837 [0.020205, -0.212612],
1838 [-0.317770, -0.197917],
1839 [-0.380222, -0.117097],
1840 [0.387569, -0.065666],
1841 [-0.435326, -0.050972],
1842 [-0.376548, -0.036277],
1843 [-0.310423, -0.021583],
1844 [0.218582, -0.021583],
1845 [0.189192, -0.006888],
1846 [0.045921, 0.015154],
1847 [0.141435, 0.015154],
1848 [0.049594, 0.037196],
1849 [0.181845, 0.037196],
1850 [0.409611, 0.037196],
1851 [0.020205, 0.051890],
1852 [-0.181845, 0.073932],
1853 [0.056941, 0.081279],
1854 [-0.365527, 0.088627],
1855 [-0.152456, 0.088627],
1856 [0.090004, 0.088627],
1857 [-0.104699, 0.095974],
1858 [-0.277360, 0.118016],
1859 [0.405937, 0.118016],
1860 [0.020205, 0.140058],
1861 [-0.159803, 0.162099],
1862 [-0.104699, 0.169447],
1863 [0.093678, 0.169447],
1864 [-0.078983, 0.191488],
1865 [0.067962, 0.191488],
1866 [-0.145109, 0.206183],
1867 [0.020205, 0.213530],
1868 [-0.292054, 0.220878],
1869 [-0.071636, 0.235572],
1870 [-0.314096, 0.250267],
1871 [0.001837, 0.250267],
1872 [-0.097351, 0.272309],
1873 [-0.251644, 0.287003],
1874 [-0.082657, 0.316392],
1875 [0.141435, 0.338434],
1876 [0.167151, 0.345781],
1877 [-0.027552, 0.353129],
1878 [-0.104699, 0.360476],
1879 [0.027552, 0.360476],
1880 [-0.126741, 0.375171],
1881 [-0.082657, -0.388947],
1882 [-0.174498, -0.278737],
1883 [-0.325117, -0.242001],
1884 [-0.299402, -0.219959],
1885 [-0.266339, -0.197917],
1886 [0.123067, -0.197917],
1887 [-0.284707, -0.175876],
1888 [0.339812, -0.043624],
1889 [0.339812, 0.000459],
1890 [-0.372874, 0.015154],
1891 [-0.328791, 0.015154],
1892 [-0.435326, 0.037196],
1893 [-0.097351, 0.051890],
1894 [-0.229603, 0.066585],
1895 [0.045921, 0.103321],
1896 [-0.321444, 0.132710],
1897 [-0.207561, 0.154752],
1898 [-0.314096, 0.162099],
1899 [-0.339812, 0.228225],
1900 [-0.236950, 0.242919],
1901 [0.042247, 0.301698],
1902 [-0.108372, 0.323740],
1903 [0.045921, 0.382518],
1904 [-0.020205, -0.366905],
1905 [-0.137762, -0.322821],
1906 [-0.108372, -0.322821],
1907 [-0.071636, -0.322821],
1908 [-0.306749, -0.293432],
1909 [-0.277360, -0.293432],
1910 [-0.137762, -0.293432],
1911 [-0.108372, -0.293432],
1912 [-0.078983, -0.293432],
1913 [-0.321444, -0.278737],
1914 [-0.020205, -0.278737],
1915 [0.056941, -0.271390],
1916 [-0.108372, -0.264043],
1917 [-0.027552, -0.249348],
1918 [0.009184, -0.249348],
1919 [-0.251644, -0.242001],
1920 [0.056941, -0.212612],
1921 [-0.383895, -0.153834],
1922 [-0.354506, -0.153834],
1923 [-0.394916, -0.131792],
1924 [-0.354506, -0.124445],
1925 [-0.325117, -0.124445],
1926 [-0.424305, -0.102403],
1927 [-0.314096, -0.102403],
1928 [-0.354506, -0.095055],
1929 [-0.365527, -0.073014],
1930 [-0.328791, -0.058319],
1931 [0.277360, -0.050972],
1932 [0.178172, -0.043624],
1933 [0.405937, -0.028930],
1934 [0.306749, -0.021583],
1935 [0.244297, -0.014235],
1936 [-0.420632, -0.006888],
1937 [0.115720, -0.006888],
1938 [0.299402, 0.022501],
1939 [0.262665, 0.037196],
1940 [-0.398590, 0.051890],
1941 [-0.016531, 0.051890],
1942 [0.078983, 0.051890],
1943 [-0.336138, 0.059237],
1944 [-0.413285, 0.081279],
1945 [-0.258992, 0.081279],
1946 [0.189192, 0.081279],
1947 [-0.078983, 0.088627],
1948 [-0.038573, 0.095974],
1949 [-0.247971, 0.103321],
1950 [-0.222255, 0.110668],
1951 [-0.192866, 0.110668],
1952 [-0.409611, 0.118016],
1953 [-0.170824, 0.125363],
1954 [-0.038573, 0.125363],
1955 [-0.016531, 0.140058],
1956 [0.394916, 0.140058],
1957 [-0.181845, 0.147405],
1958 [0.369201, 0.147405],
1959 [-0.402264, 0.162099],
1960 [-0.027552, 0.162099],
1961 [0.244297, 0.162099],
1962 [-0.053268, 0.169447],
1963 [0.009184, 0.176794],
1964 [0.369201, 0.176794],
1965 [-0.119393, 0.184141],
1966 [-0.053268, 0.198836],
1967 [-0.023879, 0.198836],
1968 [-0.119393, 0.213530],
1969 [0.097351, 0.220878],
1970 [-0.108372, 0.235572],
1971 [-0.049594, 0.235572],
1972 [0.321444, 0.242919],
1973 [0.049594, 0.257614],
1974 [0.281033, 0.279656],
1975 [-0.042247, 0.309045],
1976 [0.200213, 0.309045],
1977 [0.016531, 0.323740],
1978 [-0.042247, 0.367823],
1979 [-0.031226, 0.389865],
1980 [-0.001837, 0.389865],
1981 [-0.218582, -0.352210],
1982 [-0.244297, -0.315474],
1983 [-0.178172, -0.315474],
1984 [0.012858, -0.315474],
1985 [-0.247971, -0.293432],
1986 [-0.214908, -0.286085],
1987 [0.012858, -0.271390],
1988 [0.170824, -0.264043],
1989 [0.115720, -0.256696],
1990 [0.038573, -0.219959],
1991 [0.097351, -0.219959],
1992 [-0.365527, -0.190570],
1993 [-0.295728, -0.139139],
1994 [-0.328791, -0.087708],
1995 [0.244297, -0.058319],
1996 [0.405937, -0.058319],
1997 [-0.361854, -0.050972],
1998 [-0.420632, -0.036277],
1999 [-0.328791, -0.028930],
2000 [-0.387569, -0.014235],
2001 [-0.350833, -0.014235],
2002 [0.409611, -0.006888],
2003 [0.023879, 0.000459],
2004 [0.159803, 0.007806],
2005 [0.203887, 0.007806],
2006 [-0.416958, 0.015154],
2007 [0.236950, 0.015154],
2008 [-0.038573, 0.022501],
2009 [-0.056941, 0.029848],
2010 [0.134088, 0.044543],
2011 [0.075310, 0.073932],
2012 [0.108372, 0.081279],
2013 [-0.321444, 0.088627],
2014 [-0.343485, 0.103321],
2015 [0.391243, 0.103321],
2016 [0.126741, 0.118016],
2017 [0.163477, 0.118016],
2018 [-0.218582, 0.132710],
2019 [-0.093678, 0.132710],
2020 [-0.056941, 0.132710],
2021 [0.112046, 0.132710],
2022 [-0.247971, 0.147405],
2023 [-0.354506, 0.154752],
2024 [-0.090004, 0.154752],
2025 [0.115720, 0.154752],
2026 [0.045921, 0.176794],
2027 [0.108372, 0.184141],
2028 [-0.020205, 0.235572],
2029 [-0.137762, 0.250267],
2030 [0.281033, 0.250267],
2031 [-0.328791, 0.264961],
2032 [-0.141435, 0.272309],
2033 [0.196540, 0.272309],
2034 [-0.292054, 0.279656],
2035 [-0.012858, 0.279656],
2036 [-0.119393, 0.287003],
2037 [0.163477, 0.294350],
2038 [0.126741, 0.309045],
2039 [0.236950, 0.309045],
2040 [-0.181845, 0.338434],
2041 [-0.145109, 0.338434],
2042 [0.001837, 0.367823],
2043 [0.119393, 0.367823],
2044 [-0.119393, -0.374252],
2045 [-0.097351, -0.374252],
2046 [-0.060615, -0.374252],
2047 [-0.181845, -0.366905],
2048 [0.042247, -0.359558],
2049 [-0.093678, -0.352210],
2050 [0.016531, -0.352210],
2051 [-0.192866, -0.344863],
2052 [-0.012858, -0.337516],
2053 [-0.053268, -0.330168],
2054 [-0.270013, -0.322821],
2055 [-0.214908, -0.315474],
2056 [-0.156130, -0.315474],
2057 [-0.181845, -0.293432],
2058 [0.078983, -0.271390],
2059 [-0.314096, -0.264043],
2060 [-0.255318, -0.264043],
2061 [-0.189192, -0.264043],
2062 [-0.086331, -0.264043],
2063 [0.148782, -0.264043],
2064 [0.049594, -0.256696],
2065 [-0.343485, -0.249348],
2066 [-0.222255, -0.242001],
2067 [-0.009184, -0.242001],
2068 [0.148782, -0.234654],
2069 [-0.358180, -0.219959],
2070 [-0.339812, -0.212612],
2071 [-0.281033, -0.212612],
2072 [-0.236950, -0.212612],
2073 [-0.332464, -0.183223],
2074 [-0.321444, -0.161181],
2075 [-0.299402, -0.161181],
2076 [-0.361854, -0.109750],
2077 [-0.394916, -0.102403],
2078 [-0.383895, -0.080361],
2079 [0.222255, -0.058319],
2080 [-0.394916, -0.043624],
2081 [0.251644, -0.043624],
2082 [0.369201, -0.043624],
2083 [0.211234, -0.036277],
2084 [0.431653, -0.036277],
2085 [0.148782, -0.028930],
2086 [0.170824, -0.028930],
2087 [0.236950, -0.028930],
2088 [0.383895, -0.028930],
2089 [0.123067, -0.021583],
2090 [0.277360, -0.021583],
2091 [0.347159, -0.014235],
2092 [0.369201, -0.014235],
2093 [0.093678, -0.006888],
2094 [0.262665, -0.006888],
2095 [0.321444, -0.006888],
2096 [-0.314096, 0.000459],
2097 [0.435326, 0.000459],
2098 [0.064289, 0.007806],
2099 [0.123067, 0.007806],
2100 [0.292054, 0.007806],
2101 [-0.391243, 0.022501],
2102 [-0.365527, 0.029848],
2103 [-0.343485, 0.029848],
2104 [-0.314096, 0.029848],
2105 [-0.023879, 0.037196],
2106 [0.112046, 0.044543],
2107 [0.214908, 0.044543],
2108 [0.427979, 0.044543],
2109 [-0.420632, 0.051890],
2110 [-0.376548, 0.051890],
2111 [-0.273686, 0.051890],
2112 [0.159803, 0.051890],
2113 [0.247971, 0.051890],
2114 [-0.314096, 0.059237],
2115 [-0.137762, 0.059237],
2116 [-0.034900, 0.059237],
2117 [0.141435, 0.059237],
2118 [-0.405937, 0.066585],
2119 [-0.112046, 0.066585],
2120 [0.034900, 0.066585],
2121 [-0.071636, 0.073932],
2122 [0.207561, 0.073932],
2123 [-0.288381, 0.081279],
2124 [-0.214908, 0.081279],
2125 [-0.009184, 0.081279],
2126 [0.416958, 0.081279],
2127 [-0.123067, 0.088627],
2128 [-0.060615, 0.095974],
2129 [0.020205, 0.095974],
2130 [0.339812, 0.103321],
2131 [0.005510, 0.110668],
2132 [0.086331, 0.110668],
2133 [-0.306749, 0.118016],
2134 [-0.255318, 0.118016],
2135 [-0.137762, 0.118016],
2136 [-0.365527, 0.132710],
2137 [0.325117, 0.132710],
2138 [0.042247, 0.140058],
2139 [-0.328791, 0.147405],
2140 [-0.306749, 0.147405],
2141 [-0.284707, 0.147405],
2142 [-0.137762, 0.147405],
2143 [-0.067962, 0.154752],
2144 [-0.380222, 0.162099],
2145 [0.310423, 0.162099],
2146 [0.354506, 0.162099],
2147 [-0.236950, 0.169447],
2148 [-0.214908, 0.169447],
2149 [-0.321444, 0.176794],
2150 [-0.299402, 0.176794],
2151 [-0.167151, 0.176794],
2152 [-0.097351, 0.184141],
2153 [-0.060615, 0.184141],
2154 [0.086331, 0.184141],
2155 [-0.229603, 0.198836],
2156 [-0.126741, 0.198836],
2157 [0.218582, 0.198836],
2158 [-0.321444, 0.206183],
2159 [-0.086331, 0.206183],
2160 [-0.369201, 0.213530],
2161 [-0.016531, 0.213530],
2162 [0.321444, 0.213530],
2163 [0.038573, 0.220878],
2164 [0.192866, 0.220878],
2165 [-0.222255, 0.228225],
2166 [-0.196540, 0.235572],
2167 [0.251644, 0.235572],
2168 [-0.270013, 0.250267],
2169 [-0.115720, 0.250267],
2170 [-0.042247, 0.250267],
2171 [-0.295728, 0.257614],
2172 [-0.229603, 0.257614],
2173 [-0.207561, 0.257614],
2174 [0.020205, 0.257614],
2175 [-0.174498, 0.264961],
2176 [-0.067962, 0.272309],
2177 [-0.031226, 0.272309],
2178 [-0.270013, 0.279656],
2179 [-0.185519, 0.287003],
2180 [0.012858, 0.287003],
2181 [0.262665, 0.287003],
2182 [-0.159803, 0.294350],
2183 [-0.064289, 0.309045],
2184 [-0.023879, 0.316392],
2185 [-0.123067, 0.338434],
2186 [-0.064289, 0.338434],
2187 [-0.159803, 0.353129],
2188 [0.075310, 0.367823],
2189 [-0.067962, -0.388947],
2190 [-0.038573, -0.388947],
2191 [0.016531, -0.381599],
2192 [-0.145109, -0.366905],
2193 [-0.005510, -0.366905],
2194 [0.009184, -0.366905],
2195 [-0.126741, -0.359558],
2196 [-0.060615, -0.359558],
2197 [0.056941, -0.359558],
2198 [-0.159803, -0.352210],
2199 [-0.078983, -0.352210],
2200 [-0.045921, -0.344863],
2201 [-0.145109, -0.337516],
2202 [-0.108372, -0.337516],
2203 [0.001837, -0.337516],
2204 [-0.178172, -0.330168],
2205 [-0.123067, -0.322821],
2206 [-0.093678, -0.322821],
2207 [-0.020205, -0.322821],
2208 [-0.229603, -0.315474],
2209 [-0.277360, -0.308127],
2210 [-0.137762, -0.308127],
2211 [-0.108372, -0.308127],
2212 [-0.078983, -0.308127],
2213 [-0.042247, -0.308127],
2214 [-0.005510, -0.308127],
2215 [-0.214908, -0.300779],
2216 [-0.292054, -0.293432],
2217 [-0.262665, -0.293432],
2218 [-0.123067, -0.293432],
2219 [-0.093678, -0.293432],
2220 [-0.064289, -0.293432],
2221 [-0.005510, -0.293432],
2222 [0.023879, -0.293432],
2223 [0.053268, -0.293432],
2224 [0.086331, -0.286085],
2225 [-0.277360, -0.278737],
2226 [-0.247971, -0.278737],
2227 [-0.137762, -0.278737],
2228 [-0.108372, -0.278737],
2229 [-0.005510, -0.278737],
2230 [0.031226, -0.278737],
2231 [-0.214908, -0.271390],
2232 [0.115720, -0.271390],
2233 [-0.123067, -0.264043],
2234 [-0.027552, -0.264043],
2235 [-0.295728, -0.256696],
2236 [-0.222255, -0.256696],
2237 [-0.156130, -0.256696],
2238 [0.130414, -0.256696],
2239 [-0.189192, -0.249348],
2240 [0.023879, -0.249348],
2241 [0.170824, -0.249348],
2242 [-0.236950, -0.242001],
2243 [0.071636, -0.242001],
2244 [0.086331, -0.242001],
2245 [0.115720, -0.242001],
2246 [0.038573, -0.234654],
2247 [0.163477, -0.234654],
2248 [-0.214908, -0.227306],
2249 [0.134088, -0.219959],
2250 [0.071636, -0.212612],
2251 [-0.332464, -0.197917],
2252 [-0.303075, -0.197917],
2253 [0.056941, -0.197917],
2254 [0.086331, -0.197917],
2255 [-0.347159, -0.183223],
2256 [-0.383895, -0.168528],
2257 [-0.354506, -0.168528],
2258 [-0.369201, -0.153834],
2259 [-0.339812, -0.153834],
2260 [-0.354506, -0.139139],
2261 [-0.409611, -0.131792],
2262 [-0.339812, -0.124445],
2263 [-0.394916, -0.117097],
2264 [-0.409611, -0.102403],
2265 [-0.424305, -0.087708],
2266 [-0.416958, -0.073014],
2267 [-0.402264, -0.073014],
2268 [-0.328791, -0.073014],
2269 [-0.310423, -0.065666],
2270 [0.277360, -0.065666],
2271 [0.314096, -0.065666],
2272 [0.343485, -0.065666],
2273 [-0.394916, -0.058319],
2274 [-0.343485, -0.058319],
2275 [0.292054, -0.050972],
2276 [-0.328791, -0.043624],
2277 [0.354506, -0.043624],
2278 [0.405937, -0.043624],
2279 [-0.435326, -0.036277],
2280 [-0.361854, -0.036277],
2281 [0.277360, -0.036277],
2282 [0.347159, -0.028930],
2283 [-0.420632, -0.021583],
2284 [-0.369201, -0.021583],
2285 [0.086331, -0.021583],
2286 [0.292054, -0.021583],
2287 [-0.402264, -0.014235],
2288 [-0.435326, -0.006888],
2289 [0.056941, -0.006888],
2290 [0.203887, -0.006888],
2291 [0.299402, -0.006888],
2292 [-0.350833, 0.000459],
2293 [0.236950, 0.000459],
2294 [0.078983, 0.007806],
2295 [0.270013, 0.007806],
2296 [0.380222, 0.007806],
2297 [0.023879, 0.015154],
2298 [0.222255, 0.015154],
2299 [0.361854, 0.015154],
2300 [-0.435326, 0.022501],
2301 [-0.001837, 0.022501],
2302 [0.086331, 0.022501],
2303 [0.101025, 0.022501],
2304 [0.159803, 0.022501],
2305 [0.255318, 0.022501],
2306 [0.314096, 0.022501],
2307 [0.328791, 0.022501],
2308 [-0.328791, 0.029848],
2309 [-0.299402, 0.029848],
2310 [0.134088, 0.029848],
2311 [0.222255, 0.029848],
2312 [-0.398590, 0.037196],
2313 [0.064289, 0.037196],
2314 [0.078983, 0.037196],
2315 [0.167151, 0.037196],
2316 [0.277360, 0.037196],
2317 [-0.336138, 0.044543],
2318 [-0.306749, 0.044543],
2319 [-0.056941, 0.044543],
2320 [0.200213, 0.044543],
2321 [-0.082657, 0.051890],
2322 [-0.001837, 0.051890],
2323 [0.034900, 0.051890],
2324 [0.093678, 0.051890],
2325 [0.174498, 0.051890],
2326 [-0.299402, 0.059237],
2327 [-0.049594, 0.059237],
2328 [0.214908, 0.059237],
2329 [0.405937, 0.059237],
2330 [0.012858, 0.066585],
2331 [0.247971, 0.066585],
2332 [-0.321444, 0.073932],
2333 [0.126741, 0.073932],
2334 [0.222255, 0.073932],
2335 [-0.427979, 0.081279],
2336 [-0.273686, 0.081279],
2337 [-0.200213, 0.081279],
2338 [0.005510, 0.081279],
2339 [0.042247, 0.081279],
2340 [0.167151, 0.081279],
2341 [-0.394916, 0.088627],
2342 [-0.380222, 0.088627],
2343 [-0.306749, 0.088627],
2344 [-0.137762, 0.088627],
2345 [0.075310, 0.088627],
2346 [0.141435, 0.088627],
2347 [-0.192866, 0.095974],
2348 [-0.023879, 0.095974],
2349 [0.108372, 0.095974],
2350 [-0.409611, 0.103321],
2351 [-0.380222, 0.103321],
2352 [0.126741, 0.103321],
2353 [0.207561, 0.103321],
2354 [-0.207561, 0.110668],
2355 [-0.178172, 0.110668],
2356 [-0.067962, 0.110668],
2357 [-0.038573, 0.110668],
2358 [-0.009184, 0.110668],
2359 [-0.343485, 0.118016],
2360 [-0.292054, 0.118016],
2361 [-0.123067, 0.118016],
2362 [-0.156130, 0.125363],
2363 [-0.075310, 0.125363],
2364 [-0.023879, 0.125363],
2365 [0.064289, 0.125363],
2366 [0.093678, 0.125363],
2367 [0.145109, 0.125363],
2368 [-0.284707, 0.132710],
2369 [-0.115720, 0.132710],
2370 [-0.391243, 0.140058],
2371 [-0.001837, 0.140058],
2372 [0.145109, 0.140058],
2373 [0.174498, 0.140058],
2374 [-0.123067, 0.147405],
2375 [-0.266339, 0.154752],
2376 [0.012858, 0.154752],
2377 [0.130414, 0.154752],
2378 [-0.145109, 0.162099],
2379 [0.045921, 0.162099],
2380 [0.369201, 0.162099],
2381 [-0.273686, 0.169447],
2382 [-0.200213, 0.169447],
2383 [-0.090004, 0.169447],
2384 [0.078983, 0.169447],
2385 [0.108372, 0.169447],
2386 [-0.372874, 0.176794],
2387 [-0.343485, 0.176794],
2388 [0.023879, 0.176794],
2389 [0.141435, 0.176794],
2390 [-0.266339, 0.184141],
2391 [-0.358180, 0.191488],
2392 [-0.343485, 0.191488],
2393 [0.038573, 0.191488],
2394 [0.053268, 0.191488],
2395 [0.126741, 0.191488],
2396 [-0.288381, 0.198836],
2397 [-0.214908, 0.198836],
2398 [-0.038573, 0.198836],
2399 [0.343485, 0.198836],
2400 [-0.336138, 0.206183],
2401 [-0.255318, 0.206183],
2402 [-0.196540, 0.206183],
2403 [-0.170824, 0.213530],
2404 [-0.053268, 0.213530],
2405 [-0.001837, 0.213530],
2406 [-0.277360, 0.220878],
2407 [-0.262665, 0.220878],
2408 [0.053268, 0.220878],
2409 [-0.148782, 0.228225],
2410 [0.012858, 0.228225],
2411 [0.321444, 0.228225],
2412 [-0.181845, 0.235572],
2413 [-0.093678, 0.235572],
2414 [-0.034900, 0.235572],
2415 [0.067962, 0.235572],
2416 [0.097351, 0.235572],
2417 [-0.163477, 0.242919],
2418 [0.167151, 0.242919],
2419 [0.299402, 0.242919],
2420 [-0.328791, 0.250267],
2421 [-0.255318, 0.250267],
2422 [-0.078983, 0.250267],
2423 [0.034900, 0.257614],
2424 [-0.262665, 0.264961],
2425 [0.281033, 0.264961],
2426 [-0.207561, 0.272309],
2427 [0.020205, 0.272309],
2428 [-0.236950, 0.287003],
2429 [-0.222255, 0.287003],
2430 [0.027552, 0.287003],
2431 [0.042247, 0.287003],
2432 [-0.086331, 0.294350],
2433 [-0.056941, 0.294350],
2434 [-0.042247, 0.294350],
2435 [-0.012858, 0.294350],
2436 [0.236950, 0.294350],
2437 [-0.251644, 0.301698],
2438 ];
2439
2440 };
2441 factories["dot-pixel-body"]=function(exports,require){
2442 "use strict";
2443 Object.defineProperty(exports, "__esModule", { value: true });
2444 exports.DOT_PIXEL_BODY = void 0;
2445 exports.DOT_PIXEL_BODY = [
2446 [-0.070881, -0.368120, 0, 215, 232],
2447 [0.057161, 0.363547, 11, 111, 255],
2448 [-0.404703, 0.066307, 56, 65, 255],
2449 [0.395557, -0.052589, 0, 215, 232],
2450 [0.034297, -0.002287, 11, 111, 255],
2451 [-0.331536, -0.221787, 11, 111, 255],
2452 [0.308672, 0.221786, 3, 167, 255],
2453 [-0.221787, 0.285807, 56, 65, 255],
2454 [0.185204, -0.240078, 41, 247, 187],
2455 [-0.180631, 0.066307, 56, 65, 255],
2456 [0.116610, 0.176057, 11, 111, 255],
2457 [0.221786, 0.020579, 3, 167, 255],
2458 [-0.061735, 0.203494, 56, 65, 255],
2459 [0.006860, -0.208068, 0, 215, 232],
2460 [-0.294953, -0.057162, 56, 65, 255],
2461 [-0.166911, -0.230932, 3, 167, 255],
2462 [-0.093745, 0.363547, 76, 25, 214],
2463 [0.390985, 0.098318, 3, 167, 255],
2464 [-0.345256, 0.203494, 76, 25, 214],
2465 [0.194348, 0.313244, 11, 111, 255],
2466 [0.057161, -0.336109, 0, 215, 232],
2467 [-0.057161, 0.080025, 11, 111, 255],
2468 [-0.390984, -0.121182, 11, 111, 255],
2469 [-0.230932, 0.171485, 56, 65, 255],
2470 [-0.253796, -0.304100, 3, 167, 255],
2471 [-0.294953, 0.080025, 56, 65, 255],
2472 [0.038869, 0.253797, 11, 111, 255],
2473 [0.121182, 0.066307, 11, 111, 255],
2474 [0.290380, -0.061734, 0, 215, 232],
2475 [0.249224, 0.134900, 3, 167, 255],
2476 [-0.249224, -0.162339, 11, 111, 255],
2477 [0.134902, -0.034296, 3, 167, 255],
2478 [0.020578, 0.144047, 11, 111, 255],
2479 [0.102890, -0.185203, 0, 215, 232],
2480 [-0.075453, -0.267515, 3, 167, 255],
2481 [0.322391, 0.029724, 3, 167, 255],
2482 [-0.162339, -0.336109, 3, 167, 255],
2483 [-0.125756, 0.272088, 56, 65, 255],
2484 [-0.409276, -0.029725, 56, 65, 255],
2485 [-0.139475, 0.153193, 56, 65, 255],
2486 [-0.038870, 0.294954, 56, 65, 255],
2487 [0.221786, 0.230932, 11, 111, 255],
2488 [0.112037, 0.299525, 11, 111, 255],
2489 [0.102891, -0.267515, 0, 215, 232],
2490 [-0.336110, 0.011432, 56, 65, 255],
2491 [-0.166912, 0.340682, 56, 65, 255],
2492 [0.413850, 0.025150, 0, 215, 232],
2493 [-0.363546, 0.130329, 76, 25, 214],
2494 [-0.002287, -0.290381, 0, 215, 232],
2495 [-0.294953, 0.258369, 76, 25, 214],
2496 [0.176057, 0.116610, 3, 167, 255],
2497 [0.340682, 0.153193, 0, 215, 232],
2498 [0.208068, -0.052589, 0, 215, 232],
2499 [-0.317818, -0.134901, 56, 65, 255],
2500 [0.043443, 0.070880, 11, 111, 255],
2501 [-0.016006, 0.368119, 76, 25, 214],
2502 [-0.171485, 0.217213, 56, 65, 255],
2503 [-0.240078, -0.235506, 3, 167, 255],
2504 [-0.294953, 0.148619, 56, 65, 255],
2505 [0.148619, 0.235505, 3, 167, 255],
2506 [-0.002286, -0.363546, 0, 215, 232],
2507 [-0.235506, 0.107463, 11, 111, 255],
2508 [-0.025151, 0.020579, 11, 111, 255],
2509 [-0.121183, 0.089172, 11, 111, 255],
2510 [0.084599, 0.121182, 11, 111, 255],
2511 [-0.075453, 0.139474, 11, 111, 255],
2512 [0.057161, 0.194349, 11, 111, 255],
2513 [-0.358975, -0.066307, 56, 65, 255],
2514 [0.093745, 0.011432, 3, 167, 255],
2515 [-0.002286, 0.208068, 11, 111, 255],
2516 [-0.134900, -0.281234, 3, 167, 255],
2517 [-0.194348, -0.285807, 3, 167, 255],
2518 [0.340682, -0.029725, 0, 215, 232],
2519 [0.162338, 0.020579, 3, 167, 255],
2520 [0.226359, 0.080025, 3, 167, 255],
2521 [0.267516, 0.267516, 11, 111, 255],
2522 [0.043443, -0.253796, 0, 215, 232],
2523 [0.016005, 0.313244, 56, 65, 255],
2524 [-0.276662, 0.025150, 56, 65, 255],
2525 [-0.240078, 0.230932, 56, 65, 255],
2526 [0.272088, -0.006859, 0, 215, 232],
2527 [-0.363546, -0.171484, 56, 65, 255],
2528 [0.262943, 0.189775, 3, 167, 255],
2529 [-0.116609, 0.212641, 56, 65, 255],
2530 [-0.294953, -0.267515, 11, 111, 255],
2531 [-0.349828, 0.070880, 56, 65, 255],
2532 [-0.290381, 0.203494, 76, 25, 214],
2533 [-0.093745, -0.317818, 3, 167, 255],
2534 [0.272089, 0.048016, 3, 167, 255],
2535 [0.322391, 0.102891, 3, 167, 255],
2536 [-0.189776, 0.134900, 11, 111, 255],
2537 [-0.006860, 0.098318, 11, 111, 255],
2538 [0.134901, -0.226359, 0, 215, 232],
2539 [-0.281234, -0.203495, 3, 167, 255],
2540 [-0.089172, 0.308672, 56, 65, 255],
2541 [-0.038870, -0.326964, 0, 215, 232],
2542 [0.148620, 0.336110, 11, 111, 255],
2543 [0.212641, 0.180630, 3, 167, 255],
2544 [-0.029724, 0.162338, 11, 111, 255],
2545 [-0.029725, -0.244651, 0, 215, 232],
2546 [-0.386411, 0.016005, 56, 65, 255],
2547 [0.052588, -0.185203, 3, 167, 255],
2548 [0.084600, 0.235505, 11, 111, 255],
2549 [-0.080026, 0.249224, 56, 65, 255],
2550 [-0.176057, 0.267516, 56, 65, 255],
2551 [-0.240078, 0.057161, 56, 65, 255],
2552 [-0.093745, 0.048016, 11, 111, 255],
2553 [0.180630, 0.066307, 3, 167, 255],
2554 [0.368120, 0.011432, 0, 215, 232],
2555 [0.102890, 0.349829, 56, 65, 255],
2556 [-0.121182, -0.358975, 3, 167, 255],
2557 [-0.025151, 0.249224, 56, 65, 255],
2558 [0.130329, 0.130329, 11, 111, 255],
2559 [0.157766, 0.281235, 11, 111, 255],
2560 [-0.208068, -0.331537, 3, 167, 255],
2561 [0.294954, 0.148619, 3, 167, 255],
2562 [-0.281234, -0.107464, 56, 65, 255],
2563 [-0.052589, 0.340682, 56, 65, 255],
2564 [0.080025, -0.226359, 0, 215, 232],
2565 [0.221786, 0.276661, 11, 111, 255],
2566 [-0.208068, -0.203495, 3, 167, 255],
2567 [0.176057, -0.020578, 0, 215, 232],
2568 [-0.317817, -0.180631, 11, 111, 255],
2569 [-0.299526, -0.011432, 11, 111, 255],
2570 [-0.326964, 0.107463, 56, 65, 255],
2571 [0.016005, 0.038869, 3, 167, 255],
2572 [0.180630, 0.208068, 11, 111, 255],
2573 [-0.400131, -0.080026, 56, 65, 255],
2574 [-0.130328, 0.317818, 56, 65, 255],
2575 [-0.326964, -0.093745, 11, 111, 255],
2576 [0.249224, -0.043443, 3, 167, 255],
2577 [-0.180631, 0.176057, 56, 65, 255],
2578 [-0.336109, 0.162338, 56, 65, 255],
2579 [-0.363546, -0.020578, 11, 111, 255],
2580 [0.386411, 0.057161, 3, 167, 255],
2581 [-0.162338, 0.102891, 56, 65, 255],
2582 [-0.102890, 0.171485, 56, 65, 255],
2583 [0.080027, 0.052588, 3, 167, 255],
2584 [0.016005, -0.326964, 0, 215, 232],
2585 [0.413848, -0.016006, 0, 215, 232],
2586 [-0.313244, 0.043443, 56, 65, 255],
2587 [0.043443, 0.112036, 11, 111, 255],
2588 [0.189775, 0.253797, 11, 111, 255],
2589 [-0.038870, 0.121182, 11, 111, 255],
2590 [-0.112036, -0.249225, 3, 167, 255],
2591 [0.080025, 0.162338, 11, 111, 255],
2592 [-0.258370, 0.272088, 76, 25, 214],
2593 [-0.020578, 0.061735, 11, 111, 255],
2594 [-0.390984, 0.102891, 76, 25, 214],
2595 [0.336110, 0.194349, 3, 167, 255],
2596 [-0.208068, 0.203494, 76, 25, 214],
2597 [0.002286, 0.276661, 56, 65, 255],
2598 [0.020578, 0.354400, 56, 65, 255],
2599 [-0.203495, -0.249225, 3, 167, 255],
2600 [-0.112037, 0.125755, 56, 65, 255],
2601 [-0.258370, 0.139474, 56, 65, 255],
2602 [-0.038870, -0.281234, 0, 215, 232],
2603 [-0.285807, -0.153193, 11, 111, 255],
2604 [-0.203495, 0.240079, 56, 65, 255],
2605 [0.217213, -0.016006, 0, 215, 232],
2606 [0.372692, 0.130329, 3, 167, 255],
2607 [-0.326964, -0.038870, 11, 111, 255],
2608 [-0.198921, 0.098318, 11, 111, 255],
2609 [0.308672, -0.011432, 0, 215, 232],
2610 [0.125755, 0.029724, 3, 167, 255],
2611 [-0.354401, -0.125756, 56, 65, 255],
2612 [0.006860, -0.249225, 3, 167, 255],
2613 [-0.235506, -0.272089, 11, 111, 255],
2614 [0.358974, -0.061734, 0, 215, 232],
2615 [-0.057161, 0.038869, 11, 111, 255],
2616 [-0.244650, -0.198921, 11, 111, 255],
2617 [-0.130329, -0.317818, 3, 167, 255],
2618 [-0.016005, 0.331536, 56, 65, 255],
2619 [-0.130328, 0.354400, 76, 25, 214],
2620 [-0.144046, 0.240079, 76, 25, 214],
2621 [0.148620, 0.089172, 3, 167, 255],
2622 [-0.144047, 0.189775, 56, 65, 255],
2623 [-0.267515, 0.176057, 56, 65, 255],
2624 [-0.317818, 0.226360, 56, 65, 255],
2625 [0.052588, 0.029724, 3, 167, 255],
2626 [0.070880, -0.016006, 3, 167, 255],
2627 [0.020579, 0.180630, 11, 111, 255],
2628 [-0.084600, 0.102891, 11, 111, 255],
2629 [-0.144047, 0.061735, 11, 111, 255],
2630 [-0.272089, 0.107463, 56, 65, 255],
2631 [0.116610, 0.249224, 11, 111, 255],
2632 [-0.368120, 0.171485, 76, 25, 214],
2633 [-0.358975, 0.038869, 56, 65, 255],
2634 [0.089172, 0.084599, 3, 167, 255],
2635 [0.043443, -0.217214, 0, 215, 232],
2636 [0.029724, 0.221786, 56, 65, 255],
2637 [0.276661, 0.230932, 11, 111, 255],
2638 [0.070881, -0.276662, 0, 215, 232],
2639 [0.093744, 0.203494, 11, 111, 255],
2640 [0.102891, -0.025151, 3, 167, 255],
2641 [0.377266, -0.020578, 0, 215, 232],
2642 [-0.162339, -0.299526, 3, 167, 255],
2643 [-0.299526, -0.230932, 3, 167, 255],
2644 [-0.066307, -0.299526, 0, 215, 232],
2645 [-0.070880, 0.281235, 56, 65, 255],
2646 [0.290380, 0.020579, 0, 215, 232],
2647 [-0.034297, -0.368120, 0, 215, 232],
2648 [-0.166912, -0.267515, 3, 167, 255],
2649 [0.322391, -0.057162, 0, 215, 232],
2650 [-0.221786, 0.139474, 56, 65, 255],
2651 [0.006860, 0.244650, 56, 65, 255],
2652 [0.038869, 0.290380, 11, 111, 255],
2653 [-0.272089, 0.235505, 56, 65, 255],
2654 [0.130328, -0.002287, 3, 167, 255],
2655 [-0.102891, -0.285807, 3, 167, 255],
2656 [-0.066307, 0.171485, 56, 65, 255],
2657 [0.139473, -0.194350, 0, 215, 232],
2658 [0.253797, 0.020579, 0, 215, 232],
2659 [0.011432, 0.070880, 3, 167, 255],
2660 [-0.272088, 0.057161, 56, 65, 255],
2661 [0.048016, 0.162338, 11, 111, 255],
2662 [-0.034296, 0.217213, 11, 111, 255],
2663 [0.235506, 0.048016, 3, 167, 255],
2664 [-0.272088, -0.244651, 11, 111, 255],
2665 [-0.011432, 0.134900, 11, 111, 255],
2666 [0.198921, 0.093744, 3, 167, 255],
2667 [-0.368120, -0.098318, 56, 65, 255],
2668 [-0.112036, 0.244650, 56, 65, 255],
2669 [0.194349, 0.038869, 3, 167, 255],
2670 [0.189776, 0.006860, 3, 167, 255],
2671 [-0.221787, -0.299526, 3, 167, 255],
2672 [0.336110, 0.002286, 0, 215, 232],
2673 [0.148619, 0.052588, 3, 167, 255],
2674 [-0.212640, 0.070880, 56, 65, 255],
2675 [0.116610, 0.098318, 11, 111, 255],
2676 [0.144047, 0.157766, 3, 167, 255],
2677 [-0.253796, 0.203494, 76, 25, 214],
2678 [-0.194350, 0.326963, 76, 25, 214],
2679 [0.070880, 0.336110, 56, 65, 255],
2680 [-0.308671, 0.176057, 76, 25, 214],
2681 [0.029723, -0.354401, 0, 215, 232],
2682 [-0.386411, -0.052589, 56, 65, 255],
2683 [-0.349828, -0.198921, 11, 111, 255],
2684 [0.025152, -0.276662, 0, 215, 232],
2685 [0.153192, -0.249225, 0, 215, 232],
2686 [-0.409276, 0.034297, 56, 65, 255],
2687 [0.102891, 0.144047, 3, 167, 255],
2688 [0.162339, -0.212640, 0, 215, 232],
2689 [-0.144047, -0.249225, 3, 167, 255],
2690 [-0.107463, 0.336110, 56, 65, 255],
2691 [-0.070881, -0.336109, 3, 167, 255],
2692 [-0.253797, 0.084599, 56, 65, 255],
2693 [-0.336109, -0.157765, 11, 111, 255],
2694 [0.230932, 0.157766, 11, 111, 255],
2695 [0.244650, 0.212641, 3, 167, 255],
2696 [-0.153193, 0.285807, 76, 25, 214],
2697 [-0.267515, -0.276662, 11, 111, 255],
2698 [0.107463, -0.235506, 0, 215, 232],
2699 [0.006860, 0.006860, 11, 111, 255],
2700 [-0.358975, 0.098318, 76, 25, 214],
2701 [0.281235, -0.034296, 0, 215, 232],
2702 [0.121182, 0.326963, 11, 111, 255],
2703 [-0.230932, 0.258369, 56, 65, 255],
2704 [-0.089171, 0.221786, 56, 65, 255],
2705 [-0.011432, -0.317818, 0, 215, 232],
2706 [-0.061734, 0.368119, 76, 25, 214],
2707 [-0.299525, 0.116610, 56, 65, 255],
2708 [-0.052588, 0.258369, 56, 65, 255],
2709 [-0.194348, 0.290380, 56, 65, 255],
2710 [0.057161, 0.230932, 56, 65, 255],
2711 [-0.322390, 0.134900, 76, 25, 214],
2712 [-0.299526, -0.084600, 11, 111, 255],
2713 [-0.322390, -0.066307, 56, 65, 255],
2714 [0.244650, -0.011432, 3, 167, 255],
2715 [-0.139475, 0.121182, 11, 111, 255],
2716 [-0.304100, 0.016005, 56, 65, 255],
2717 [-0.025151, 0.189775, 11, 111, 255],
2718 [0.162339, 0.308672, 11, 111, 255],
2719 [0.016005, 0.116610, 11, 111, 255],
2720 [-0.011432, 0.304099, 56, 65, 255],
2721 [0.066307, 0.258369, 56, 65, 255],
2722 [-0.061734, 0.313244, 56, 65, 255],
2723 [-0.377265, 0.061735, 56, 65, 255],
2724 [-0.089171, 0.075454, 56, 65, 255],
2725 [-0.322390, 0.075454, 56, 65, 255],
2726 [-0.409276, -0.002287, 56, 65, 255],
2727 [-0.002286, 0.162338, 11, 111, 255],
2728 [0.308672, 0.194349, 3, 167, 255],
2729 [-0.080025, 0.336110, 56, 65, 255],
2730 [0.075454, -0.198921, 3, 167, 255],
2731 [-0.116609, 0.061735, 11, 111, 255],
2732 [-0.034296, 0.093744, 56, 65, 255],
2733 [-0.203495, 0.162338, 56, 65, 255],
2734 [-0.057161, 0.230932, 56, 65, 255],
2735 [-0.098318, -0.345256, 3, 167, 255],
2736 [-0.166911, 0.148619, 56, 65, 255],
2737 [0.043443, 0.340682, 11, 111, 255],
2738 [-0.185204, -0.317818, 3, 167, 255],
2739 [0.038869, -0.313245, 0, 215, 232],
2740 [0.066307, 0.098318, 3, 167, 255],
2741 [-0.377265, -0.144046, 11, 111, 255],
2742 [-0.016006, -0.267515, 0, 215, 232],
2743 [-0.272088, -0.176057, 11, 111, 255],
2744 [-0.089172, 0.194349, 56, 65, 255],
2745 [0.125756, -0.253796, 0, 215, 232],
2746 [0.395557, 0.002286, 0, 215, 232],
2747 [0.208067, 0.061735, 3, 167, 255],
2748 [0.281235, 0.171485, 3, 167, 255],
2749 [-0.267516, -0.134901, 11, 111, 255],
2750 [0.116610, -0.208068, 0, 215, 232],
2751 [-0.020578, -0.345256, 0, 215, 232],
2752 [0.157766, 0.134900, 3, 167, 255],
2753 [-0.057162, -0.249225, 3, 167, 255],
2754 [-0.317818, 0.198922, 56, 65, 255],
2755 [0.244650, 0.258369, 11, 111, 255],
2756 [-0.048016, 0.144047, 11, 111, 255],
2757 [-0.194350, -0.226359, 3, 167, 255],
2758 [0.070880, -0.249225, 0, 215, 232],
2759 [0.166911, -0.043443, 3, 167, 255],
2760 [0.025150, 0.093744, 11, 111, 255],
2761 [0.029724, -0.194350, 0, 215, 232],
2762 [-0.157765, 0.317818, 76, 25, 214],
2763 [0.061735, 0.006860, 11, 111, 255],
2764 [0.313244, 0.125755, 0, 215, 232],
2765 [-0.112036, 0.299525, 56, 65, 255],
2766 [-0.363547, 0.006860, 56, 65, 255],
2767 [-0.386411, -0.011432, 56, 65, 255],
2768 [0.102891, 0.043443, 3, 167, 255],
2769 [-0.203495, 0.267516, 56, 65, 255],
2770 [-0.308672, -0.208068, 11, 111, 255],
2771 [-0.308672, -0.112037, 11, 111, 255],
2772 [-0.326964, -0.011432, 56, 65, 255],
2773 [0.134901, 0.290380, 11, 111, 255],
2774 [-0.061734, 0.112036, 56, 65, 255],
2775 [-0.262943, -0.221787, 3, 167, 255],
2776 [0.153193, -0.011432, 3, 167, 255],
2777 [0.409276, 0.048016, 0, 215, 232],
2778 [0.368119, 0.102891, 3, 167, 255],
2779 [-0.171484, 0.244650, 56, 65, 255],
2780 [-0.098318, 0.148619, 56, 65, 255],
2781 [-0.148619, 0.212641, 56, 65, 255],
2782 [-0.102890, 0.267516, 56, 65, 255],
2783 [-0.308672, -0.157765, 11, 111, 255],
2784 [0.390985, 0.029724, 0, 215, 232],
2785 [0.089172, 0.304099, 11, 111, 255],
2786 [-0.144047, -0.354401, 3, 167, 255],
2787 [-0.290381, -0.130328, 11, 111, 255],
2788 [-0.336109, 0.048016, 56, 65, 255],
2789 [-0.294953, 0.230932, 76, 25, 214],
2790 [0.171485, 0.093744, 3, 167, 255],
2791 [-0.354400, -0.043443, 56, 65, 255],
2792 [0.043442, 0.139474, 11, 111, 255],
2793 [-0.148620, 0.262943, 56, 65, 255],
2794 [-0.029725, 0.272088, 56, 65, 255],
2795 [0.171485, 0.043443, 3, 167, 255],
2796 [0.198922, 0.290380, 11, 111, 255],
2797 [0.080025, 0.358974, 11, 111, 255],
2798 [-0.043443, -0.304100, 0, 215, 232],
2799 [-0.230932, 0.208068, 56, 65, 255],
2800 [0.153193, 0.112036, 3, 167, 255],
2801 [0.313244, -0.034296, 3, 167, 255],
2802 [-0.304098, -0.034296, 56, 65, 255],
2803 [-0.386412, 0.125755, 76, 25, 214],
2804 [-0.038869, 0.363547, 56, 65, 255],
2805 [-0.294954, -0.185203, 11, 111, 255],
2806 [-0.212641, 0.116610, 56, 65, 255],
2807 [-0.070881, 0.057161, 56, 65, 255],
2808 [0.075454, 0.029724, 11, 111, 255],
2809 [0.363547, 0.153193, 3, 167, 255],
2810 [0.244650, 0.281235, 11, 111, 255],
2811 [-0.121183, 0.185204, 56, 65, 255],
2812 [-0.034297, 0.043443, 11, 111, 255],
2813 [0.363546, -0.038870, 0, 215, 232],
2814 [-0.166911, 0.194349, 56, 65, 255],
2815 [-0.052589, -0.349828, 0, 215, 232],
2816 [-0.313245, -0.249225, 11, 111, 255],
2817 [-0.011432, -0.230932, 3, 167, 255],
2818 [0.020579, -0.230932, 0, 215, 232],
2819 [-0.006859, 0.034297, 3, 167, 255],
2820 [-0.162339, 0.080025, 11, 111, 255],
2821 [-0.034297, 0.317818, 56, 65, 255],
2822 [-0.331537, -0.116609, 11, 111, 255],
2823 [0.230932, -0.057162, 0, 215, 232],
2824 [0.267516, -0.057162, 0, 215, 232],
2825 [0.189775, -0.038870, 3, 167, 255],
2826 [0.038869, 0.048016, 11, 111, 255],
2827 [0.400130, 0.075454, 0, 215, 232],
2828 [0.377266, 0.080025, 0, 215, 232],
2829 [0.326963, 0.171485, 3, 167, 255],
2830 [-0.253796, 0.249224, 76, 25, 214],
2831 [-0.011432, 0.230932, 11, 111, 255],
2832 [-0.217214, -0.230932, 3, 167, 255],
2833 [-0.230932, 0.084599, 56, 65, 255],
2834 [-0.212640, -0.272089, 3, 167, 255],
2835 [0.048016, -0.276662, 0, 215, 232],
2836 [0.253797, 0.061735, 3, 167, 255],
2837 [-0.048015, 0.185204, 11, 111, 255],
2838 [0.349828, 0.176057, 3, 167, 255],
2839 [-0.290380, 0.043443, 56, 65, 255],
2840 [0.034296, 0.198922, 11, 111, 255],
2841 [0.354401, -0.011432, 0, 215, 232],
2842 [-0.157766, 0.171485, 56, 65, 255],
2843 [-0.002287, 0.185204, 11, 111, 255],
2844 [-0.089172, -0.249225, 3, 167, 255],
2845 [-0.185203, -0.340682, 3, 167, 255],
2846 [-0.386412, 0.038869, 56, 65, 255],
2847 [0.066307, 0.075454, 11, 111, 255],
2848 [-0.166912, 0.125755, 56, 65, 255],
2849 [0.016005, -0.304100, 0, 215, 232],
2850 [0.107463, 0.121182, 3, 167, 255],
2851 [0.093744, 0.180630, 3, 167, 255],
2852 [0.221786, 0.299525, 11, 111, 255],
2853 [0.029724, 0.020579, 11, 111, 255],
2854 [-0.281234, 0.130329, 76, 25, 214],
2855 [-0.377265, 0.148619, 76, 25, 214],
2856 [0.070880, 0.212641, 11, 111, 255],
2857 [0.025150, 0.272088, 56, 65, 255],
2858 [-0.144046, 0.336110, 56, 65, 255],
2859 [-0.002287, 0.349829, 56, 65, 255],
2860 [-0.253796, -0.258370, 3, 167, 255],
2861 [-0.377265, 0.084599, 56, 65, 255],
2862 [-0.180630, -0.249225, 3, 167, 255],
2863 [-0.349828, -0.089171, 11, 111, 255],
2864 [-0.249225, 0.162338, 56, 65, 255],
2865 [-0.226359, -0.253796, 11, 111, 255],
2866 [-0.390984, -0.098318, 56, 65, 255],
2867 [0.230932, -0.034296, 3, 167, 255],
2868 [-0.144046, 0.089172, 11, 111, 255],
2869 [-0.345256, 0.180630, 56, 65, 255],
2870 [-0.272089, 0.212641, 76, 25, 214],
2871 [0.308672, 0.011432, 0, 215, 232],
2872 [0.294954, 0.240079, 11, 111, 255],
2873 [-0.340683, 0.125755, 56, 65, 255],
2874 [-0.121182, -0.299526, 3, 167, 255],
2875 [-0.340682, 0.089172, 56, 65, 255],
2876 [0.349829, 0.020579, 3, 167, 255],
2877 [0.176058, 0.272088, 11, 111, 255],
2878 [0.093744, 0.331536, 56, 65, 255],
2879 [-0.043443, 0.061735, 11, 111, 255],
2880 [0.061735, 0.121182, 11, 111, 255],
2881 [-0.308672, 0.098318, 56, 65, 255],
2882 [-0.354401, 0.153193, 56, 65, 255],
2883 [-0.121182, 0.162338, 56, 65, 255],
2884 [-0.230932, -0.317818, 3, 167, 255],
2885 [0.098318, 0.066307, 3, 167, 255],
2886 [0.157766, 0.070880, 3, 167, 255],
2887 [0.198922, 0.198922, 11, 111, 255],
2888 [0.212641, 0.249224, 11, 111, 255],
2889 [0.098318, -0.217214, 0, 215, 232],
2890 [0.262943, -0.025151, 0, 215, 232],
2891 [-0.285807, 0.166911, 56, 65, 255],
2892 [-0.189776, 0.194349, 56, 65, 255],
2893 [-0.194350, 0.221786, 56, 65, 255],
2894 [0.395557, -0.029725, 41, 247, 187],
2895 [-0.377265, -0.080026, 11, 111, 255],
2896 [-0.116609, -0.336109, 3, 167, 255],
2897 [-0.226359, -0.189776, 11, 111, 255],
2898 [-0.203494, -0.308671, 3, 167, 255],
2899 [-0.253796, 0.116610, 56, 65, 255],
2900 [-0.326964, -0.198921, 56, 65, 255],
2901 [0.006860, -0.345256, 0, 215, 232],
2902 [-0.212641, 0.180630, 56, 65, 255],
2903 [0.139473, 0.317818, 11, 111, 255],
2904 [-0.354400, -0.148620, 11, 111, 255],
2905 [0.048015, 0.272088, 11, 111, 255],
2906 [-0.340682, -0.180631, 11, 111, 255],
2907 [-0.153193, -0.317818, 3, 167, 255],
2908 [0.121182, 0.153193, 3, 167, 255],
2909 [0.171484, 0.326963, 11, 111, 255],
2910 [-0.285807, 0.006860, 56, 65, 255],
2911 [-0.304098, 0.061735, 56, 65, 255],
2912 [-0.093745, 0.285807, 56, 65, 255],
2913 [0.052588, -0.235506, 0, 215, 232],
2914 [-0.226359, -0.212640, 3, 167, 255],
2915 [-0.180631, 0.089172, 11, 111, 255],
2916 [-0.020578, -0.299526, 0, 215, 232],
2917 [0.070881, 0.180630, 11, 111, 255],
2918 [0.048016, 0.212641, 56, 65, 255],
2919 [-0.006860, 0.258369, 56, 65, 255],
2920 [-0.107464, 0.102891, 56, 65, 255],
2921 [-0.029724, 0.345255, 56, 65, 255],
2922 [-0.377266, -0.034296, 56, 65, 255],
2923 [-0.322391, 0.025150, 56, 65, 255],
2924 [-0.244651, 0.185204, 76, 25, 214],
2925 [-0.125756, -0.262943, 3, 167, 255],
2926 [-0.125756, 0.230932, 56, 65, 255],
2927 [0.235505, 0.006860, 3, 167, 255],
2928 [0.166911, 0.221786, 11, 111, 255],
2929 [-0.217214, 0.221786, 76, 25, 214],
2930 [-0.057162, -0.317818, 0, 215, 232],
2931 [0.093744, -0.249225, 0, 215, 232],
2932 [0.116609, 0.011432, 3, 167, 255],
2933 [0.144046, 0.011432, 3, 167, 255],
2934 [0.002286, 0.052588, 3, 167, 255],
2935 [0.057161, 0.057161, 11, 111, 255],
2936 [-0.372693, 0.112036, 76, 25, 214],
2937 [-0.185203, 0.112036, 56, 65, 255],
2938 [-0.020579, 0.112036, 11, 111, 255],
2939 [-0.089171, 0.125755, 11, 111, 255],
2940 [-0.272089, 0.153193, 56, 65, 255],
2941 [0.258369, 0.244650, 3, 167, 255],
2942 [0.016005, 0.290380, 56, 65, 255],
2943 [0.180630, 0.299525, 11, 111, 255],
2944 [0.006859, 0.368119, 56, 65, 255],
2945 [-0.349828, -0.006859, 56, 65, 255],
2946 [0.281234, 0.253797, 3, 167, 255],
2947 [-0.125755, 0.139474, 56, 65, 255],
2948 [-0.084600, 0.162338, 56, 65, 255],
2949 [-0.189775, 0.253797, 56, 65, 255],
2950 [-0.340682, -0.057162, 56, 65, 255],
2951 [-0.340682, -0.025151, 56, 65, 255],
2952 [-0.308671, 0.244650, 56, 65, 255],
2953 [-0.272088, 0.258369, 76, 25, 214],
2954 [0.322390, 0.208068, 3, 167, 255],
2955 [-0.240079, 0.130329, 56, 65, 255],
2956 [-0.313245, 0.153193, 56, 65, 255],
2957 [0.217213, 0.043443, 3, 167, 255],
2958 [-0.262943, -0.194350, 3, 167, 255],
2959 [0.166911, -0.235506, 0, 215, 232],
2960 [0.166912, 0.002286, 3, 167, 255],
2961 [0.112036, 0.194349, 11, 111, 255],
2962 [0.034297, -0.336109, 0, 215, 232],
2963 [-0.089172, -0.299526, 3, 167, 255],
2964 [-0.061734, -0.281234, 3, 167, 255],
2965 [-0.240078, 0.276661, 56, 65, 255],
2966 [0.002286, -0.272089, 3, 167, 255],
2967 [0.061735, -0.212640, 3, 167, 255],
2968 [0.089172, -0.011432, 3, 167, 255],
2969 [0.208068, 0.002286, 3, 167, 255],
2970 [0.304099, 0.034297, 0, 215, 232],
2971 [0.048016, 0.089172, 3, 167, 255],
2972 [0.098318, 0.102891, 3, 167, 255],
2973 [0.290380, 0.217213, 3, 167, 255],
2974 [-0.098318, -0.267515, 0, 215, 232],
2975 [-0.016005, 0.285807, 56, 65, 255],
2976 [0.125755, 0.345255, 56, 65, 255],
2977 [0.194349, -0.011432, 0, 215, 232],
2978 [-0.139475, -0.336109, 3, 167, 255],
2979 [0.043443, 0.180630, 11, 111, 255],
2980 [-0.176057, 0.322391, 56, 65, 255],
2981 [-0.240078, -0.290381, 3, 167, 255],
2982 [-0.189777, -0.267515, 3, 167, 255],
2983 [-0.404703, -0.061734, 56, 65, 255],
2984 [0.180630, 0.025150, 3, 167, 255],
2985 [0.290380, -0.002287, 3, 167, 255],
2986 [-0.011432, 0.080025, 11, 111, 255],
2987 [-0.400131, 0.084599, 76, 25, 214],
2988 [0.121183, -0.020578, 3, 167, 255],
2989 [0.107464, -0.006859, 3, 167, 255],
2990 [0.130329, 0.084599, 11, 111, 255],
2991 [-0.029725, 0.139474, 11, 111, 255],
2992 [-0.048016, 0.276661, 56, 65, 255],
2993 [-0.340682, 0.029724, 56, 65, 255],
2994 [-0.272089, 0.080025, 56, 65, 255],
2995 [0.121182, -0.189776, 3, 167, 255],
2996 [0.038870, 0.358974, 56, 65, 255],
2997 [0.354400, 0.134900, 3, 167, 255],
2998 [0.377266, -0.057162, 41, 247, 187],
2999 [0.340682, -0.052589, 0, 215, 232],
3000 [0.326963, -0.016006, 0, 215, 232],
3001 [0.134902, 0.107463, 3, 167, 255],
3002 [-0.038870, 0.235505, 56, 65, 255],
3003 [-0.281235, -0.226359, 11, 111, 255],
3004 [-0.185203, 0.153193, 56, 65, 255],
3005 [0.084599, -0.180631, 3, 167, 255],
3006 [0.130328, 0.048016, 3, 167, 255],
3007 [0.016005, 0.203494, 11, 111, 255],
3008 [-0.267516, -0.157765, 11, 111, 255],
3009 [0.025151, 0.162338, 11, 111, 255],
3010 [0.272088, 0.016005, 3, 167, 255],
3011 [-0.089171, -0.363546, 3, 167, 255],
3012 [-0.043443, -0.262943, 3, 167, 255],
3013 [-0.112037, 0.358974, 56, 65, 255],
3014 [-0.125756, 0.107463, 11, 111, 255],
3015 [-0.372693, -0.116609, 56, 65, 255],
3016 [-0.075453, 0.354400, 56, 65, 255],
3017 [0.144047, 0.034297, 3, 167, 255],
3018 [0.011432, 0.226360, 11, 111, 255],
3019 [0.025150, 0.240079, 11, 111, 255],
3020 [0.025150, -0.212640, 3, 167, 255],
3021 [-0.130328, 0.253797, 56, 65, 255],
3022 [-0.290381, -0.249225, 3, 167, 255],
3023 [-0.217214, 0.098318, 56, 65, 255],
3024 [-0.244651, -0.217214, 11, 111, 255],
3025 [-0.249225, -0.180631, 11, 111, 255],
3026 [0.208067, -0.034296, 3, 167, 255],
3027 [-0.107464, 0.317818, 56, 65, 255],
3028 [-0.221787, 0.240079, 56, 65, 255],
3029 [0.025152, -0.258370, 0, 215, 232],
3030 [-0.349828, -0.107464, 11, 111, 255],
3031 [0.153193, -0.029725, 3, 167, 255],
3032 [-0.139474, 0.171485, 56, 65, 255],
3033 [-0.326964, 0.180630, 56, 65, 255],
3034 [-0.409276, 0.016005, 56, 65, 255],
3035 [0.253797, 0.043443, 3, 167, 255],
3036 [0.098318, 0.162338, 11, 111, 255],
3037 [-0.048015, 0.166911, 11, 111, 255],
3038 [-0.285807, 0.185204, 56, 65, 255],
3039 [-0.011432, -0.249225, 3, 167, 255],
3040 [-0.180630, -0.299526, 3, 167, 255],
3041 [0.203494, 0.020579, 3, 167, 255],
3042 [-0.052589, -0.368120, 0, 215, 232],
3043 [-0.112037, -0.317818, 3, 167, 255],
3044 [-0.144047, -0.299526, 3, 167, 255],
3045 [-0.153192, -0.281234, 3, 167, 255],
3046 [-0.162339, -0.249225, 3, 167, 255],
3047 [-0.075453, 0.038869, 11, 111, 255],
3048 [-0.290380, 0.098318, 56, 65, 255],
3049 [-0.002286, 0.116610, 11, 111, 255],
3050 [-0.057162, 0.294954, 56, 65, 255],
3051 [0.413849, 0.002286, 0, 215, 232],
3052 [-0.125755, 0.336110, 56, 65, 255],
3053 [-0.336109, -0.139475, 11, 111, 255],
3054 [-0.176057, 0.285807, 56, 65, 255],
3055 [-0.075453, -0.317818, 0, 215, 232],
3056 [-0.157766, 0.230932, 56, 65, 255],
3057 [-0.336110, 0.144047, 56, 65, 255],
3058 [-0.107463, 0.080025, 11, 111, 255],
3059 [-0.070881, 0.089172, 11, 111, 255],
3060 [-0.130328, 0.203494, 56, 65, 255],
3061 [-0.075453, 0.299525, 56, 65, 255],
3062 [-0.331536, 0.212641, 76, 25, 214],
3063 [-0.253797, 0.066307, 56, 65, 255],
3064 [0.006860, 0.089172, 11, 111, 255],
3065 [0.084600, -0.267515, 0, 215, 232],
3066 [-0.276662, -0.262943, 3, 167, 255],
3067 [-0.304100, 0.134900, 76, 25, 214],
3068 [-0.317817, 0.002286, 56, 65, 255],
3069 [0.093744, 0.029724, 11, 111, 255],
3070 [0.226359, 0.061735, 3, 167, 255],
3071 [0.194348, 0.075454, 3, 167, 255],
3072 [-0.194350, 0.080025, 56, 65, 255],
3073 [0.107463, 0.084599, 3, 167, 255],
3074 [-0.016005, 0.171485, 11, 111, 255],
3075 [-0.304100, 0.212641, 56, 65, 255],
3076 [-0.006859, -0.336109, 3, 167, 255],
3077 [0.080025, 0.002286, 3, 167, 255],
3078 [0.253797, 0.002286, 0, 215, 232],
3079 [0.052588, -0.006859, 3, 167, 255],
3080 [-0.034296, 0.075454, 11, 111, 255],
3081 [-0.043443, 0.203494, 56, 65, 255],
3082 [-0.294953, -0.166912, 11, 111, 255],
3083 [-0.267516, 0.038869, 56, 65, 255],
3084 [-0.358975, 0.057161, 56, 65, 255],
3085 [0.299527, -0.048015, 0, 215, 232],
3086 [0.020578, 0.057161, 11, 111, 255],
3087 [0.144047, -0.212640, 0, 215, 232],
3088 [0.285807, 0.038869, 3, 167, 255],
3089 [0.185203, 0.102891, 3, 167, 255],
3090 [-0.203494, 0.144047, 56, 65, 255],
3091 [0.002287, 0.322391, 56, 65, 255],
3092 [-0.235506, 0.148619, 76, 25, 214],
3093 [-0.107464, 0.194349, 56, 65, 255],
3094 [-0.093745, 0.240079, 56, 65, 255],
3095 [0.235505, 0.029724, 3, 167, 255],
3096 [0.093744, -0.198921, 3, 167, 255],
3097 [-0.029723, -0.313245, 0, 215, 232],
3098 [-0.080026, -0.285807, 0, 215, 232],
3099 [-0.148620, 0.139474, 56, 65, 255],
3100 [-0.221786, 0.157766, 56, 65, 255],
3101 [-0.212641, 0.253797, 56, 65, 255],
3102 [0.048016, -0.349828, 0, 215, 232],
3103 [0.377266, -0.002287, 0, 215, 232],
3104 [0.381838, 0.116610, 3, 167, 255],
3105 [-0.057162, 0.130329, 11, 111, 255],
3106 [-0.070881, 0.189775, 11, 111, 255],
3107 [-0.070881, 0.217213, 11, 111, 255],
3108 [0.034296, 0.125755, 11, 111, 255],
3109 [0.006860, 0.134900, 11, 111, 255],
3110 [0.153193, -0.226359, 0, 215, 232],
3111 [0.057161, -0.262943, 3, 167, 255],
3112 [0.290380, -0.020578, 0, 215, 232],
3113 [0.043443, 0.011432, 3, 167, 255],
3114 [-0.372693, 0.025150, 56, 65, 255],
3115 [0.006860, 0.025150, 11, 111, 255],
3116 [0.066307, 0.043443, 3, 167, 255],
3117 [-0.253796, 0.048016, 56, 65, 255],
3118 [-0.322390, 0.057161, 56, 65, 255],
3119 [0.139474, 0.066307, 11, 111, 255],
3120 [0.240079, 0.070880, 0, 215, 232],
3121 [-0.345256, 0.107463, 56, 65, 255],
3122 [-0.226359, 0.189775, 56, 65, 255],
3123 [-0.272089, 0.194349, 76, 25, 214],
3124 [-0.098318, 0.208068, 11, 111, 255],
3125 [-0.020578, 0.208068, 56, 65, 255],
3126 [-0.258370, 0.221786, 56, 65, 255],
3127 [-0.185203, 0.235505, 56, 65, 255],
3128 [0.016005, 0.258369, 11, 111, 255],
3129 [-0.080026, -0.349828, 0, 215, 232],
3130 [-0.171484, -0.285807, 3, 167, 255],
3131 [0.034297, -0.240078, 3, 167, 255],
3132 [-0.322391, -0.235506, 11, 111, 255],
3133 [-0.299527, -0.144046, 11, 111, 255],
3134 [-0.340682, -0.075453, 56, 65, 255],
3135 [-0.313245, -0.052589, 11, 111, 255],
3136 [-0.400130, -0.043443, 56, 65, 255],
3137 [-0.317818, -0.025151, 56, 65, 255],
3138 [-0.354402, 0.020579, 56, 65, 255],
3139 [-0.043442, 0.029724, 11, 111, 255],
3140 [-0.400131, 0.048016, 76, 25, 214],
3141 [-0.285808, 0.066307, 56, 65, 255],
3142 [-0.134901, 0.075454, 56, 65, 255],
3143 [-0.066307, 0.153193, 56, 65, 255],
3144 [-0.285807, 0.244650, 76, 25, 214],
3145 [-0.006859, 0.016005, 3, 167, 255],
3146 [0.080025, 0.194349, 11, 111, 255],
3147 [0.093744, 0.221786, 56, 65, 255],
3148 [-0.368119, -0.052589, 56, 65, 255],
3149 [-0.144047, -0.267515, 3, 167, 255],
3150 [-0.052589, 0.098318, 11, 111, 255],
3151 [-0.107464, 0.226360, 56, 65, 255],
3152 [0.130328, 0.166911, 11, 111, 255],
3153 [-0.016006, 0.153193, 11, 111, 255],
3154 [-0.093745, 0.345255, 56, 65, 255],
3155 [-0.093745, 0.326963, 56, 65, 255],
3156 [-0.116609, -0.276662, 3, 167, 255],
3157 [0.381839, -0.038870, 0, 215, 232],
3158 [-0.020578, -0.363546, 0, 215, 232],
3159 [-0.171484, -0.313245, 3, 167, 255],
3160 [0.025152, 0.075454, 11, 111, 255],
3161 [-0.208068, -0.290381, 11, 111, 255],
3162 [-0.070881, 0.235505, 11, 111, 255],
3163 [0.038870, 0.235505, 11, 111, 255],
3164 [-0.139473, 0.281235, 56, 65, 255],
3165 [-0.294953, -0.212640, 11, 111, 255],
3166 [0.409277, -0.034296, 0, 215, 232],
3167 [0.212641, 0.089172, 3, 167, 255],
3168 [0.139474, -0.016006, 3, 167, 255],
3169 [-0.372692, -0.006859, 56, 65, 255],
3170 [0.107464, 0.025150, 3, 167, 255],
3171 [-0.075453, 0.116610, 11, 111, 255],
3172 [0.070880, 0.240079, 11, 111, 255],
3173 [0.002286, 0.294954, 56, 65, 255],
3174 [-0.400131, -0.016006, 76, 25, 214],
3175 [-0.294953, -0.102890, 11, 111, 255],
3176 [-0.336109, 0.066307, 76, 25, 214],
3177 [0.002287, -0.226359, 3, 167, 255],
3178 [-0.066307, 0.262943, 56, 65, 255],
3179 [-0.093745, 0.089172, 11, 111, 255],
3180 [-0.368120, -0.157765, 11, 111, 255],
3181 [-0.089171, -0.331537, 0, 215, 232],
3182 [0.331536, 0.016005, 0, 215, 232],
3183 [0.386411, 0.016005, 0, 215, 232],
3184 [0.304098, 0.208068, 3, 167, 255],
3185 [-0.313245, 0.121182, 56, 65, 255],
3186 [-0.034297, -0.349828, 0, 215, 232],
3187 [0.208068, 0.308672, 11, 111, 255],
3188 [0.308672, -0.061734, 0, 215, 232],
3189 [-0.226359, 0.066307, 56, 65, 255],
3190 [0.016005, -0.358975, 0, 215, 232],
3191 [-0.066307, -0.354401, 0, 215, 232],
3192 [-0.217213, -0.313245, 3, 167, 255],
3193 [-0.107464, -0.304100, 0, 215, 232],
3194 [-0.272089, -0.290381, 11, 111, 255],
3195 [-0.253796, -0.285807, 3, 167, 255],
3196 [-0.025151, -0.285807, 0, 215, 232],
3197 [-0.130328, -0.244651, 3, 167, 255],
3198 [0.139473, -0.244651, 0, 215, 232],
3199 [-0.258370, -0.235506, 3, 167, 255],
3200 [0.066307, -0.230932, 0, 215, 232],
3201 [0.121182, -0.230932, 0, 215, 232],
3202 [0.084599, -0.212640, 0, 215, 232],
3203 [-0.354402, -0.185203, 11, 111, 255],
3204 [-0.322391, -0.166912, 11, 111, 255],
3205 [-0.313245, -0.080026, 11, 111, 255],
3206 [0.326963, -0.038870, 0, 215, 232],
3207 [-0.299526, 0.029724, 56, 65, 255],
3208 [-0.066308, 0.326963, 56, 65, 255],
3209 [-0.052589, -0.331537, 0, 215, 232],
3210 [0.048016, -0.203495, 0, 215, 232],
3211 [-0.395557, 0.002286, 56, 65, 255],
3212 [0.020579, 0.002286, 11, 111, 255],
3213 [0.189775, 0.052588, 3, 167, 255],
3214 [0.166911, 0.057161, 11, 111, 255],
3215 [0.084599, 0.070880, 3, 167, 255],
3216 [0.084599, 0.098318, 3, 167, 255],
3217 [0.029724, 0.107463, 3, 167, 255],
3218 [0.358974, 0.121182, 3, 167, 255],
3219 [0.144047, 0.125755, 11, 111, 255],
3220 [0.089172, 0.134900, 11, 111, 255],
3221 [0.139474, 0.144047, 3, 167, 255],
3222 [0.061734, 0.166911, 11, 111, 255],
3223 [-0.358975, 0.185204, 76, 25, 214],
3224 [-0.304100, 0.194349, 56, 65, 255],
3225 [0.258369, 0.203494, 11, 111, 255],
3226 [0.134900, 0.240079, 11, 111, 255],
3227 [0.052588, 0.249224, 11, 111, 255],
3228 [-0.162339, 0.258369, 76, 25, 214],
3229 [-0.244651, 0.262943, 56, 65, 255],
3230 [0.057161, 0.345255, 11, 111, 255],
3231 [0.084599, 0.345255, 11, 111, 255],
3232 [-0.322390, 0.166911, 56, 65, 255],
3233 [-0.025151, 0.299525, 11, 111, 255],
3234 [0.230932, -0.006859, 3, 167, 255],
3235 [-0.025150, -0.331537, 0, 215, 232],
3236 [0.112036, -0.249225, 0, 215, 232],
3237 [0.267516, 0.034297, 0, 215, 232],
3238 [-0.098318, 0.061735, 11, 111, 255],
3239 [-0.208068, 0.130329, 56, 65, 255],
3240 [-0.084600, 0.180630, 56, 65, 255],
3241 [-0.258370, -0.208068, 11, 111, 255],
3242 [-0.313245, -0.098318, 11, 111, 255],
3243 [-0.267516, 0.093744, 56, 65, 255],
3244 [-0.267516, 0.121182, 56, 65, 255],
3245 [-0.390984, -0.066307, 11, 111, 255],
3246 [-0.354401, 0.084599, 76, 25, 214],
3247 [-0.249224, 0.098318, 56, 65, 255],
3248 [-0.226359, 0.125755, 56, 65, 255],
3249 [0.002286, 0.148619, 56, 65, 255],
3250 [-0.171484, 0.162338, 56, 65, 255],
3251 [-0.185203, 0.208068, 56, 65, 255],
3252 [-0.244650, 0.217213, 56, 65, 255],
3253 [-0.048016, 0.326963, 56, 65, 255],
3254 [0.116609, 0.052588, 3, 167, 255],
3255 [0.153193, 0.322391, 11, 111, 255],
3256 [0.107463, 0.336110, 56, 65, 255],
3257 [0.390984, -0.011432, 0, 215, 232],
3258 [0.267515, -0.038870, 0, 215, 232],
3259 [0.404703, 0.061735, 0, 215, 232],
3260 [0.011432, 0.102891, 11, 111, 255],
3261 [0.358973, -0.025151, 0, 215, 232],
3262 [0.176057, 0.080025, 3, 167, 255],
3263 [0.322391, 0.185204, 3, 167, 255],
3264 [-0.052589, 0.217213, 11, 111, 255],
3265 [-0.189776, 0.276661, 76, 25, 214],
3266 [-0.125756, 0.304099, 76, 25, 214],
3267 [-0.345256, -0.212640, 11, 111, 255],
3268 [-0.016005, 0.048016, 11, 111, 255],
3269 [-0.034296, 0.176057, 56, 65, 255],
3270 [-0.011432, 0.272088, 56, 65, 255],
3271 [-0.057161, 0.354400, 56, 65, 255],
3272 [-0.208068, 0.281235, 56, 65, 255],
3273 [0.322391, -0.002287, 0, 215, 232],
3274 [0.354402, 0.006860, 0, 215, 232],
3275 [0.034297, 0.034297, 11, 111, 255],
3276 [-0.006859, 0.066307, 11, 111, 255],
3277 [0.121182, 0.112036, 11, 111, 255],
3278 [-0.153193, 0.116610, 11, 111, 255],
3279 [0.116610, 0.134900, 11, 111, 255],
3280 [0.276661, 0.185204, 11, 111, 255],
3281 [-0.285807, 0.217213, 76, 25, 214],
3282 [0.235505, 0.226360, 11, 111, 255],
3283 [-0.048016, 0.308672, 56, 65, 255],
3284 [0.176058, 0.313244, 11, 111, 255],
3285 [-0.180631, 0.336110, 56, 65, 255],
3286 [-0.313244, -0.221787, 11, 111, 255],
3287 [-0.372693, 0.048016, 76, 25, 214],
3288 [-0.107464, -0.363546, 3, 167, 255],
3289 [-0.006859, -0.304100, 0, 215, 232],
3290 [-0.226359, -0.285807, 3, 167, 255],
3291 [-0.057162, -0.267515, 3, 167, 255],
3292 [-0.070881, -0.253796, 3, 167, 255],
3293 [-0.180631, -0.221787, 3, 167, 255],
3294 [-0.212640, -0.217214, 3, 167, 255],
3295 [-0.313245, -0.194350, 11, 111, 255],
3296 [-0.276662, -0.189776, 11, 111, 255],
3297 [0.070880, -0.185203, 3, 167, 255],
3298 [-0.322390, -0.148620, 11, 111, 255],
3299 [-0.368120, -0.130328, 56, 65, 255],
3300 [-0.304100, -0.125756, 11, 111, 255],
3301 [-0.276662, -0.121182, 11, 111, 255],
3302 [-0.363546, -0.084600, 11, 111, 255],
3303 [-0.390984, -0.029725, 56, 65, 255],
3304 [0.244650, -0.029725, 3, 167, 255],
3305 [-0.075453, 0.070880, 11, 111, 255],
3306 [-0.208068, 0.084599, 56, 65, 255],
3307 [-0.139475, 0.102891, 11, 111, 255],
3308 [-0.358975, 0.116610, 76, 25, 214],
3309 [-0.025150, 0.125755, 11, 111, 255],
3310 [-0.349828, 0.166911, 56, 65, 255],
3311 [-0.235506, 0.244650, 56, 65, 255],
3312 [-0.098317, 0.253797, 56, 65, 255],
3313 [-0.226359, 0.272088, 56, 65, 255],
3314 [0.020578, -0.340682, 0, 215, 232],
3315 [0.130328, 0.016005, 3, 167, 255],
3316 [0.395558, 0.043443, 0, 215, 232],
3317 [0.011433, 0.166911, 11, 111, 255],
3318 [-0.112037, 0.144047, 56, 65, 255],
3319 [-0.194349, 0.180630, 56, 65, 255],
3320 [-0.349828, -0.162339, 11, 111, 255],
3321 [-0.322390, 0.093744, 56, 65, 255],
3322 [-0.285807, 0.112036, 56, 65, 255],
3323 [-0.258370, 0.189775, 56, 65, 255],
3324 [-0.157765, -0.349828, 3, 167, 255],
3325 [0.002287, -0.322390, 0, 215, 232],
3326 [-0.235505, -0.304100, 3, 167, 255],
3327 [0.093745, -0.230932, 0, 215, 232],
3328 [0.180631, -0.006859, 3, 167, 255],
3329 [-0.299525, 0.162338, 56, 65, 255],
3330 [-0.144046, 0.313244, 76, 25, 214],
3331 [0.134900, 0.331536, 11, 111, 255],
3332 [0.157766, 0.038869, 3, 167, 255],
3333 [-0.038870, 0.253797, 56, 65, 255],
3334 [-0.153193, -0.235506, 11, 111, 255],
3335 [-0.157765, 0.066307, 11, 111, 255],
3336 [-0.116609, 0.258369, 56, 65, 255],
3337 [-0.153192, 0.157766, 56, 65, 255],
3338 [-0.390985, 0.070880, 56, 65, 255],
3339 [-0.349828, 0.139474, 56, 65, 255],
3340 [-0.331536, 0.194349, 76, 25, 214],
3341 [-0.198922, 0.066307, 56, 65, 255],
3342 [-0.134902, 0.217213, 56, 65, 255],
3343 [0.244652, -0.057162, 0, 215, 232],
3344 [0.048016, 0.125755, 3, 167, 255],
3345 [-0.198922, 0.116610, 56, 65, 255],
3346 [-0.020578, 0.317818, 56, 65, 255],
3347 [-0.057161, 0.057161, 11, 111, 255],
3348 [0.340683, -0.016006, 0, 215, 232],
3349 [0.212640, 0.075454, 3, 167, 255],
3350 [0.020579, 0.130329, 11, 111, 255],
3351 [-0.075454, 0.313244, 56, 65, 255],
3352 [-0.006859, -0.349828, 0, 215, 232],
3353 [0.075453, 0.016005, 3, 167, 255],
3354 [-0.034297, 0.107463, 11, 111, 255],
3355 [-0.052589, 0.244650, 11, 111, 255],
3356 [-0.162339, 0.272088, 56, 65, 255],
3357 [0.002286, 0.308672, 11, 111, 255],
3358 [-0.034296, 0.331536, 56, 65, 255],
3359 [-0.016005, 0.354400, 56, 65, 255],
3360 [-0.299525, 0.002286, 56, 65, 255],
3361 [-0.102890, -0.331537, 3, 167, 255],
3362 [-0.281234, -0.276662, 3, 167, 255],
3363 [-0.253796, -0.272089, 11, 111, 255],
3364 [-0.029725, -0.267515, 3, 167, 255],
3365 [-0.112037, -0.262943, 3, 167, 255],
3366 [0.070880, -0.262943, 0, 215, 232],
3367 [-0.240078, -0.258370, 11, 111, 255],
3368 [-0.043443, -0.249225, 0, 215, 232],
3369 [0.020579, -0.244651, 3, 167, 255],
3370 [-0.180631, -0.235506, 11, 111, 255],
3371 [0.130329, -0.212640, 0, 215, 232],
3372 [-0.294953, -0.198921, 11, 111, 255],
3373 [0.061735, -0.198921, 0, 215, 232],
3374 [-0.326964, -0.080026, 56, 65, 255],
3375 [-0.299526, -0.070881, 56, 65, 255],
3376 [-0.372693, -0.066307, 11, 111, 255],
3377 [-0.326964, -0.052589, 56, 65, 255],
3378 [0.281235, -0.048015, 0, 215, 232],
3379 [0.294954, -0.034296, 3, 167, 255],
3380 [0.189775, -0.025151, 0, 215, 232],
3381 [0.230932, -0.020578, 0, 215, 232],
3382 [0.276661, -0.020578, 0, 215, 232],
3383 [-0.313245, -0.011432, 56, 65, 255],
3384 [0.258369, -0.011432, 0, 215, 232],
3385 [-0.349828, 0.006860, 56, 65, 255],
3386 [0.221786, 0.006860, 0, 215, 232],
3387 [0.400130, 0.016005, 0, 215, 232],
3388 [-0.020578, 0.034297, 11, 111, 255],
3389 [0.052588, 0.043443, 11, 111, 255],
3390 [-0.130328, 0.061735, 11, 111, 255],
3391 [-0.363547, 0.070880, 56, 65, 255],
3392 [-0.240078, 0.070880, 56, 65, 255],
3393 [-0.308671, 0.075454, 76, 25, 214],
3394 [-0.121182, 0.075454, 11, 111, 255],
3395 [-0.377265, 0.098318, 76, 25, 214],
3396 [-0.020579, 0.098318, 11, 111, 255],
3397 [-0.326964, 0.121182, 76, 25, 214],
3398 [-0.125756, 0.121182, 56, 65, 255],
3399 [0.089172, 0.148619, 11, 111, 255],
3400 [0.057162, 0.180630, 11, 111, 255],
3401 [-0.084600, 0.208068, 56, 65, 255],
3402 [0.070880, 0.226360, 11, 111, 255],
3403 [-0.025151, 0.230932, 56, 65, 255],
3404 [-0.258370, 0.235505, 76, 25, 214],
3405 [-0.157766, 0.244650, 56, 65, 255],
3406 [-0.011432, 0.244650, 56, 65, 255],
3407 [-0.272089, 0.272088, 56, 65, 255],
3408 [-0.144046, 0.349829, 76, 25, 214],
3409 [0.020578, 0.368119, 56, 65, 255],
3410 [-0.340682, -0.038870, 56, 65, 255],
3411 [-0.331537, 0.226360, 76, 25, 214],
3412 [-0.317818, 0.212641, 76, 25, 214],
3413 [0.057162, -0.249225, 0, 215, 232],
3414 [-0.066307, 0.340682, 56, 65, 255],
3415 [-0.171484, 0.230932, 76, 25, 214],
3416 [-0.194348, -0.240078, 3, 167, 255],
3417 [-0.281234, -0.139475, 11, 111, 255],
3418 [-0.294953, -0.116609, 11, 111, 255],
3419 [0.107463, -0.198921, 0, 215, 232],
3420 [-0.043442, 0.349829, 56, 65, 255],
3421 [-0.386412, 0.052588, 56, 65, 255],
3422 [0.377266, 0.093744, 3, 167, 255],
3423 [0.240079, 0.148619, 11, 111, 255],
3424 [0.267516, 0.253797, 3, 167, 255],
3425 [0.253797, 0.267516, 3, 167, 255],
3426 ];
3427
3428 };
3429 factories["dot-forms"]=function(exports,require){
3430 "use strict";
3431 Object.defineProperty(exports, "__esModule", { value: true });
3432 exports.FORM_STILL_TIME = exports.FORM_SCALE = exports.FORM_HUE = void 0;
3433 exports.getFormLayout = getFormLayout;
3434 exports.formPoint = formPoint;
3435 const dot_body_js_1 = require("./dot-body.js");
3436 const dot_pixel_body_js_1 = require("./dot-pixel-body.js");
3437 const TAU = Math.PI * 2;
3438 const DEG = Math.PI / 180;
3439 const N = dot_body_js_1.DOT_BODY.length;
3440 const clamp = (v, lo = 0, hi = 1) => (v < lo ? lo : v > hi ? hi : v);
3441 const smoothstep = (e0, e1, x) => {
3442 const t = clamp((x - e0) / (e1 - e0));
3443 return t * t * (3 - 2 * t);
3444 };
3445 const mix = (a, b, t) => a + (b - a) * t;
3446 exports.FORM_HUE = {
3447 executing: 208,
3448 editing: 170,
3449 reading: 206,
3450 searching: 210,
3451 testing: 168,
3452 browsing: 212,
3453 computer: 214,
3454 memory: 264,
3455 thinking: 44,
3456 responding: 172,
3457 delegating: 172,
3458 waiting: 38,
3459 done: 166,
3460 };
3461 exports.FORM_SCALE = 1.0;
3462 exports.FORM_STILL_TIME = 1.25;
3463 function pointInPoly(x, y, poly) {
3464 let inside = false;
3465 for (let i = 0, j = poly.length - 1; i < poly.length; j = i++) {
3466 const xi = poly[i][0];
3467 const yi = poly[i][1];
3468 const xj = poly[j][0];
3469 const yj = poly[j][1];
3470 if ((yi > y) !== (yj > y) && x < ((xj - xi) * (y - yi)) / (yj - yi) + xi)
3471 inside = !inside;
3472 }
3473 return inside;
3474 }
3475 function polySdf(x, y, poly) {
3476 let best = Infinity;
3477 for (let i = 0; i < poly.length - 1; i++) {
3478 const ax = poly[i][0];
3479 const ay = poly[i][1];
3480 const bx = poly[i + 1][0];
3481 const by = poly[i + 1][1];
3482 const dx = bx - ax;
3483 const dy = by - ay;
3484 const len2 = dx * dx + dy * dy;
3485 const t = len2 > 1e-9 ? clamp(((x - ax) * dx + (y - ay) * dy) / len2) : 0;
3486 const px = ax + dx * t;
3487 const py = ay + dy * t;
3488 const d2 = (x - px) * (x - px) + (y - py) * (y - py);
3489 if (d2 < best)
3490 best = d2;
3491 }
3492 const d = Math.sqrt(best);
3493 return pointInPoly(x, y, poly) ? -d : d;
3494 }
3495 const sdCircle = (x, y, cx, cy, r) => Math.hypot(x - cx, y - cy) - r;
3496 const sdRing = (x, y, cx, cy, r, th) => Math.abs(Math.hypot(x - cx, y - cy) - r) - th;
3497 const sdEllipse = (x, y, cx, cy, rx, ry, rotRad = 0) => {
3498 const dx = x - cx;
3499 const dy = y - cy;
3500 const c = Math.cos(rotRad);
3501 const s = Math.sin(rotRad);
3502 const u = dx * c + dy * s;
3503 const v = -dx * s + dy * c;
3504 return (Math.hypot(u / rx, v / ry) - 1) * Math.min(rx, ry);
3505 };
3506 const sdBox = (x, y, cx, cy, hw, hh, r = 0, rotRad = 0) => {
3507 const dx = x - cx;
3508 const dy = y - cy;
3509 const c = Math.cos(rotRad);
3510 const s = Math.sin(rotRad);
3511 const qx = Math.abs(dx * c + dy * s) - (hw - r);
3512 const qy = Math.abs(-dx * s + dy * c) - (hh - r);
3513 return Math.hypot(Math.max(qx, 0), Math.max(qy, 0)) + Math.min(Math.max(qx, qy), 0) - r;
3514 };
3515 const sdSegment = (x, y, ax, ay, bx, by, r) => {
3516 const pax = x - ax;
3517 const pay = y - ay;
3518 const bax = bx - ax;
3519 const bay = by - ay;
3520 const h = clamp((pax * bax + pay * bay) / (bax * bax + bay * bay || 1));
3521 return Math.hypot(pax - bax * h, pay - bay * h) - r;
3522 };
3523 const sdArc = (x, y, cx, cy, r, halfTh, midDeg, spanDeg) => {
3524 const dx = x - cx;
3525 const dy = y - cy;
3526 const mid = midDeg * DEG;
3527 const halfSpan = spanDeg * 0.5 * DEG;
3528 let da = Math.atan2(dy, dx) - mid;
3529 while (da > Math.PI)
3530 da -= TAU;
3531 while (da < -Math.PI)
3532 da += TAU;
3533 if (Math.abs(da) <= halfSpan)
3534 return Math.abs(Math.hypot(dx, dy) - r) - halfTh;
3535 const a1 = mid - halfSpan;
3536 const a2 = mid + halfSpan;
3537 return Math.min(Math.hypot(dx - r * Math.cos(a1), dy - r * Math.sin(a1)), Math.hypot(dx - r * Math.cos(a2), dy - r * Math.sin(a2))) - halfTh;
3538 };
3539 const opUnion = (...ds) => Math.min(...ds);
3540 const opSmoothUnion = (d1, d2, k) => {
3541 const h = clamp(0.5 + (0.5 * (d2 - d1)) / k);
3542 return mix(d2, d1, h) - k * h * (1 - h);
3543 };
3544 const opSub = (d1, d2) => Math.max(d1, -d2);
3545 function sdMiniWhale(x, y, cx, cy, scale) {
3546 const lx = (x - cx) / scale;
3547 const ly = (y - cy) / scale;
3548 const head = sdEllipse(lx, ly, 0.25, 0.01, 0.38, 0.22, 0.05);
3549 const back = sdEllipse(lx, ly, -0.07, 0.0, 0.35, 0.165, -0.10);
3550 const dorsal = polySdf(lx, ly, [[-0.16, -0.14], [-0.03, -0.14], [-0.18, -0.29], [-0.16, -0.14]]);
3551 const peduncle = sdSegment(lx, ly, -0.20, -0.01, -0.49, -0.04, 0.076);
3552 const flukeUp = sdEllipse(lx, ly, -0.60, -0.19, 0.175, 0.062, -0.74);
3553 const flukeDn = sdEllipse(lx, ly, -0.59, 0.11, 0.165, 0.058, 0.66);
3554 const pectoral = sdEllipse(lx, ly, 0.10, 0.20, 0.15, 0.052, 0.50);
3555 const body = opSmoothUnion(opSmoothUnion(head, back, 0.09), peduncle, 0.07);
3556 const full = opUnion(body, dorsal, flukeUp, flukeDn, pectoral);
3557 const eye = sdCircle(lx, ly, 0.37, -0.02, 0.056);
3558 return {
3559 d: opSub(full, eye) * scale,
3560 zone: ly > 0.03 && lx > -0.05 ? 1 : 0,
3561 part: lx < -0.35 ? 1 : 0,
3562 };
3563 }
3564 function evalSdf(kind, x, y) {
3565 switch (kind) {
3566 case 'thinking': {
3567 const dome = sdCircle(x, y, 0, -0.14, 0.39);
3568 const neck = sdBox(x, y, 0, 0.18, 0.21, 0.13, 0.04);
3569 const cavity = opSmoothUnion(sdCircle(x, y, 0, -0.15, 0.255), sdBox(x, y, 0, 0.10, 0.105, 0.10, 0.03), 0.05);
3570 const shell = opSub(opSmoothUnion(dome, neck, 0.08), cavity);
3571 const filament = opUnion(sdSegment(x, y, 0, 0.09, 0, -0.13, 0.044), sdSegment(x, y, 0, -0.13, -0.09, -0.22, 0.038), sdSegment(x, y, 0, -0.13, 0.09, -0.22, 0.038));
3572 const base1 = sdBox(x, y, 0, 0.39, 0.19, 0.044, 0.03);
3573 const base2 = sdBox(x, y, 0, 0.52, 0.13, 0.042, 0.03);
3574 let rays = Infinity;
3575 let rayIdx = 0;
3576 const angles = [-155, -118, -90, -62, -25];
3577 for (let i = 0; i < angles.length; i++) {
3578 const a = angles[i] * DEG;
3579 const dr = sdSegment(x, y, Math.cos(a) * 0.51, -0.14 + Math.sin(a) * 0.51, Math.cos(a) * 0.67, -0.14 + Math.sin(a) * 0.67, 0.040);
3580 if (dr < rays) {
3581 rays = dr;
3582 rayIdx = i + 2;
3583 }
3584 }
3585 const d = opUnion(shell, filament, base1, base2, rays);
3586 if (filament <= shell && filament <= rays)
3587 return { d, zone: 2, part: 1 };
3588 if (rays <= shell && rays <= base1 && rays <= base2)
3589 return { d, zone: 2, part: rayIdx };
3590 return { d, zone: y > 0.3 ? 1 : 0, part: 0 };
3591 }
3592 case 'reading': {
3593 const gapX = 0.052;
3594 const left = polySdf(x, y, [[-0.78, -0.44], [-gapX, -0.34], [-gapX, 0.52], [-0.78, 0.42], [-0.78, -0.44]]);
3595 const right = polySdf(x, y, [[gapX, -0.34], [0.78, -0.44], [0.78, 0.42], [gapX, 0.52], [gapX, -0.34]]);
3596 let cuts = Infinity;
3597 for (const ry of [-0.20, 0.03, 0.26]) {
3598 cuts = Math.min(cuts, sdSegment(x, y, -0.63, ry - 0.04, -0.19, ry + 0.02, 0.036), sdSegment(x, y, 0.19, ry + 0.02, 0.63, ry - 0.04, 0.036));
3599 }
3600 const pages = opSub(opUnion(left, right), cuts);
3601 const cover = opUnion(sdSegment(x, y, -0.76, 0.54, 0, 0.62, 0.026), sdSegment(x, y, 0, 0.62, 0.76, 0.54, 0.026));
3602 return { d: opUnion(pages, cover), zone: Math.abs(x) < 0.18 ? 1 : 0, part: x > 0 ? 1 : 0 };
3603 }
3604 case 'searching': {
3605 const lcx = -0.10;
3606 const lcy = -0.10;
3607 const lr = 0.38;
3608 const rim = sdRing(x, y, lcx, lcy, lr, 0.072);
3609 const handle = sdSegment(x, y, lcx + lr * 0.73, lcy + lr * 0.73, 0.62, 0.62, 0.082);
3610 const glint = sdArc(x, y, lcx, lcy, lr * 0.62, 0.028, -132, 68);
3611 const glass = opUnion(rim, handle, glint);
3612 let lines = Infinity;
3613 for (const [x0, ly, x1] of [[-0.72, -0.58, -0.34], [-0.72, -0.34, -0.56], [-0.72, 0.16, -0.52], [-0.72, 0.40, -0.18]]) {
3614 lines = Math.min(lines, sdSegment(x, y, x0, ly, x1, ly, 0.026));
3615 }
3616 const cleanLines = opSub(lines, sdCircle(x, y, lcx, lcy, lr + 0.11));
3617 const d = opUnion(glass, cleanLines);
3618 if (glass <= cleanLines)
3619 return { d, zone: glint < rim ? 2 : 1, part: 1 };
3620 return { d, zone: 0, part: 0 };
3621 }
3622 case 'editing': {
3623 const ang = -45 * DEG;
3624 const dx = x - 0.04;
3625 const dy = y + 0.06;
3626 const u = dx * Math.cos(ang) + dy * Math.sin(ang);
3627 const v = -dx * Math.sin(ang) + dy * Math.cos(ang);
3628 const barrel = Math.max(Math.abs(u - 0.06) - 0.36, Math.abs(v) - 0.135);
3629 const eraser = sdBox(u, v, 0.52, 0, 0.085, 0.135, 0.04);
3630 const nib = polySdf(u, v, [[-0.34, -0.135], [-0.34, 0.135], [-0.63, 0], [-0.34, -0.135]]);
3631 const gaps = Math.min(sdBox(u, v, -0.32, 0, 0.026, 0.16), sdBox(u, v, 0.43, 0, 0.026, 0.16));
3632 const pencil = opSub(opUnion(barrel, eraser, nib), gaps);
3633 const line = sdSegment(x, y, -0.44, 0.58, 0.62, 0.58, 0.040);
3634 const d = opUnion(pencil, line);
3635 if (line < pencil)
3636 return { d, zone: 2, part: 2 };
3637 return { d, zone: u < -0.34 ? 2 : u > 0.43 ? 1 : 0, part: 1 };
3638 }
3639 case 'executing': {
3640 const jx = 0.25;
3641 const jy = -0.25;
3642 const jaw = opSub(sdCircle(x, y, jx, jy, 0.30), sdBox(x, y, jx + 0.16, jy - 0.16, 0.24, 0.135, 0.02, -45 * DEG));
3643 const shaft = sdSegment(x, y, 0.06, -0.06, -0.38, 0.38, 0.108);
3644 const tail = opSub(sdCircle(x, y, -0.44, 0.44, 0.19), sdCircle(x, y, -0.44, 0.44, 0.085));
3645 const wrench = opSub(opUnion(opSmoothUnion(jaw, shaft, 0.05), tail), sdCircle(x, y, jx + 0.03, jy - 0.03, 0.128));
3646 const nut = sdCircle(x, y, jx + 0.03, jy - 0.03, 0.066);
3647 const d = opUnion(wrench, nut);
3648 if (nut < wrench)
3649 return { d, zone: 2, part: 2 };
3650 return { d, zone: jaw < shaft ? 1 : 0, part: 1 };
3651 }
3652 case 'testing': {
3653 const lip = sdSegment(x, y, -0.18, -0.60, 0.18, -0.60, 0.046);
3654 const neckOuter = sdBox(x, y, 0, -0.40, 0.135, 0.20, 0.02);
3655 const coneOuter = polySdf(x, y, [[-0.135, -0.22], [0.135, -0.22], [0.58, 0.58], [-0.58, 0.58], [-0.135, -0.22]]);
3656 const outer = opSmoothUnion(opUnion(lip, neckOuter, coneOuter), sdBox(x, y, 0, 0.56, 0.56, 0.06, 0.05), 0.04);
3657 const inner = opUnion(sdBox(x, y, 0, -0.38, 0.074, 0.24), polySdf(x, y, [[-0.074, -0.20], [0.074, -0.20], [0.27, 0.16], [-0.27, 0.16], [-0.074, -0.20]]));
3658 const cuts = opUnion(sdCircle(x, y, -0.15, 0.39, 0.062), sdCircle(x, y, 0.16, 0.45, 0.070), sdCircle(x, y, 0.02, 0.28, 0.048));
3659 const flask = opSub(opSub(outer, inner), cuts);
3660 const b1 = sdCircle(x, y, -0.02, -0.75, 0.048);
3661 const b2 = sdCircle(x, y, 0.09, -0.44, 0.038);
3662 const d = opUnion(flask, b1, b2);
3663 if (b1 < flask || b2 < flask)
3664 return { d, zone: 2, part: 2 };
3665 const liq = y > 0.16 && y < 0.54 && Math.abs(x) < 0.48;
3666 return { d, zone: liq ? 1 : 0, part: liq ? 1 : 0 };
3667 }
3668 case 'browsing': {
3669 const R = 0.64;
3670 const outer = sdRing(x, y, 0, 0, R, 0.056);
3671 const clip = sdCircle(x, y, 0, 0, R + 0.02);
3672 const eq = Math.max(sdSegment(x, y, -R, 0, R, 0, 0.038), clip);
3673 const lat1 = Math.max(sdSegment(x, y, -R * 0.86, -0.32, R * 0.86, -0.32, 0.032), clip);
3674 const lat2 = Math.max(sdSegment(x, y, -R * 0.86, 0.32, R * 0.86, 0.32, 0.032), clip);
3675 const mer = opSub(sdEllipse(x, y, 0, 0, 0.33, R, 0), sdEllipse(x, y, 0, 0, 0.25, R - 0.06, 0));
3676 const d = opUnion(outer, eq, lat1, lat2, mer);
3677 const isMer = mer <= outer && mer <= eq && mer <= lat1 && mer <= lat2;
3678 return { d, zone: isMer ? 2 : 1, part: isMer ? (x >= 0 ? 1 : 2) : 0 };
3679 }
3680 case 'computer': {
3681 const arrow = polySdf(x, y, [[-0.24, -0.48], [-0.24, 0.34], [-0.04, 0.16], [0.10, 0.48], [0.23, 0.42], [0.09, 0.10], [0.34, 0.10], [-0.24, -0.48]]);
3682 const ripple = sdArc(x, y, -0.24, -0.48, 0.22, 0.034, -125, 105);
3683 const bar = sdBox(x, y, 0.38, 0.56, 0.26, 0.066, 0.034);
3684 const d = opUnion(arrow, ripple, bar);
3685 if (ripple < arrow && ripple < bar)
3686 return { d, zone: 2, part: 2 };
3687 if (bar < arrow)
3688 return { d, zone: 0, part: 0 };
3689 return { d, zone: 1, part: 1 };
3690 }
3691 case 'memory': {
3692 const dia = (cy) => polySdf(x, y, [[0, cy - 0.24], [0.64, cy], [0, cy + 0.24], [-0.64, cy], [0, cy - 0.24]]);
3693 const top = dia(-0.36);
3694 const mid = opSub(dia(0.04), dia(-0.11) - 0.058);
3695 const bot = opSub(dia(0.44), dia(0.29) - 0.058);
3696 const d = opUnion(top, mid, bot);
3697 if (top <= mid && top <= bot)
3698 return { d, zone: 2, part: 1 };
3699 if (mid <= bot)
3700 return { d, zone: 1, part: 2 };
3701 return { d, zone: 0, part: 3 };
3702 }
3703 case 'responding': {
3704 const bubble = opUnion(sdEllipse(x, y, 0, -0.06, 0.66, 0.46), polySdf(x, y, [[-0.36, 0.24], [-0.48, 0.62], [-0.08, 0.34], [-0.36, 0.24]]));
3705 let holes = Infinity;
3706 let cores = Infinity;
3707 let idx = 0;
3708 const xs = [-0.28, 0, 0.28];
3709 for (let i = 0; i < 3; i++) {
3710 holes = Math.min(holes, sdCircle(x, y, xs[i], -0.06, 0.115));
3711 const dc = sdCircle(x, y, xs[i], -0.06, 0.056);
3712 if (dc < cores) {
3713 cores = dc;
3714 idx = i + 1;
3715 }
3716 }
3717 const shell = opSub(bubble, holes);
3718 const d = opUnion(shell, cores);
3719 if (cores < shell)
3720 return { d, zone: 2, part: idx };
3721 return { d, zone: y < -0.2 ? 1 : 0, part: 0 };
3722 }
3723 case 'delegating2': {
3724 const w1 = sdMiniWhale(x, y, -0.10, -0.30, 0.72);
3725 const w2 = sdMiniWhale(x, y, 0.16, 0.30, 0.76);
3726 if (w1.d <= w2.d)
3727 return { d: w1.d, zone: w1.zone, part: 1 + w1.part };
3728 return { d: w2.d, zone: w2.zone === 1 ? 2 : 1, part: 3 + w2.part };
3729 }
3730 case 'delegating3': {
3731 const w1 = sdMiniWhale(x, y, -0.10, -0.46, 0.62);
3732 const w2 = sdMiniWhale(x, y, 0.22, 0.01, 0.70);
3733 const w3 = sdMiniWhale(x, y, -0.06, 0.48, 0.60);
3734 if (w1.d <= w2.d && w1.d <= w3.d)
3735 return { d: w1.d, zone: w1.zone, part: 1 + w1.part };
3736 if (w2.d <= w3.d)
3737 return { d: w2.d, zone: w2.zone === 1 ? 2 : 1, part: 3 + w2.part };
3738 return { d: w3.d, zone: w3.zone, part: 5 + w3.part };
3739 }
3740 case 'waiting': {
3741 const crown = sdCircle(x, y, 0, -0.58, 0.072);
3742 const dome = sdCircle(x, y, 0, -0.16, 0.34);
3743 const skirt = polySdf(x, y, [[-0.34, -0.16], [0.34, -0.16], [0.50, 0.32], [-0.50, 0.32], [-0.34, -0.16]]);
3744 const lip = sdBox(x, y, 0, 0.33, 0.56, 0.062, 0.04);
3745 const bell = opUnion(crown, opSmoothUnion(opSub(dome, sdBox(x, y, 0, 0.6, 1, 0.28)), skirt, 0.06), lip);
3746 const clapper = sdCircle(x, y, 0, 0.54, 0.098);
3747 const arcs = opUnion(sdArc(x, y, 0, -0.04, 0.66, 0.036, 180, 50), sdArc(x, y, 0, -0.04, 0.66, 0.036, 0, 50));
3748 const d = opUnion(bell, clapper, arcs);
3749 if (clapper < bell && clapper < arcs)
3750 return { d, zone: 2, part: 2 };
3751 if (arcs < bell)
3752 return { d, zone: 2, part: 3 };
3753 return { d, zone: Math.abs(y - 0.33) < 0.09 ? 2 : 1, part: 1 };
3754 }
3755 case 'done': {
3756 const s1 = sdSegment(x, y, -0.50, 0.04, -0.12, 0.42, 0.118);
3757 const s2 = sdSegment(x, y, -0.12, 0.42, 0.54, -0.34, 0.118);
3758 return { d: Math.min(s1, s2), zone: s2 < s1 ? 2 : 1, part: 1 };
3759 }
3760 }
3761 }
3762 function sampleHexLattice(kind, pitch) {
3763 const inset = 0.008;
3764 const G = 88;
3765 const step = 1.84 / G;
3766 const vals = new Float32Array((G + 1) * (G + 1));
3767 for (let j = 0; j <= G; j++) {
3768 const y = -0.92 + j * step;
3769 for (let i = 0; i <= G; i++) {
3770 vals[j * (G + 1) + i] = evalSdf(kind, -0.92 + i * step, y).d + inset;
3771 }
3772 }
3773 const raw = [];
3774 const interp = (x1, y1, v1, x2, y2, v2) => {
3775 const t = clamp(v1 / (v1 - v2 || 1e-9));
3776 return [x1 + (x2 - x1) * t, y1 + (y2 - y1) * t];
3777 };
3778 for (let j = 0; j < G; j++) {
3779 const y0 = -0.92 + j * step;
3780 const y1 = y0 + step;
3781 for (let i = 0; i < G; i++) {
3782 const x0 = -0.92 + i * step;
3783 const x1 = x0 + step;
3784 const v00 = vals[j * (G + 1) + i];
3785 const v10 = vals[j * (G + 1) + i + 1];
3786 const v01 = vals[(j + 1) * (G + 1) + i];
3787 const v11 = vals[(j + 1) * (G + 1) + i + 1];
3788 const mask = (v00 < 0 ? 1 : 0) | (v10 < 0 ? 2 : 0) | (v11 < 0 ? 4 : 0) | (v01 < 0 ? 8 : 0);
3789 if (mask === 0 || mask === 15)
3790 continue;
3791 const edges = [];
3792 if ((v00 < 0) !== (v10 < 0))
3793 edges.push(interp(x0, y0, v00, x1, y0, v10));
3794 if ((v10 < 0) !== (v11 < 0))
3795 edges.push(interp(x1, y0, v10, x1, y1, v11));
3796 if ((v11 < 0) !== (v01 < 0))
3797 edges.push(interp(x1, y1, v11, x0, y1, v01));
3798 if ((v01 < 0) !== (v00 < 0))
3799 edges.push(interp(x0, y1, v01, x0, y0, v00));
3800 if (edges.length >= 2)
3801 raw.push([(edges[0][0] + edges[1][0]) * 0.5, (edges[0][1] + edges[1][1]) * 0.5]);
3802 }
3803 }
3804 raw.sort((a, b) => Math.atan2(a[1], a[0]) - Math.atan2(b[1], b[0]));
3805 const rims = [];
3806 const minR2 = (pitch * 0.88) ** 2;
3807 for (const [px, py] of raw) {
3808 let ok = true;
3809 for (let k = 0; k < rims.length; k++) {
3810 const dx = px - rims[k].x;
3811 const dy = py - rims[k].y;
3812 if (dx * dx + dy * dy < minR2) {
3813 ok = false;
3814 break;
3815 }
3816 }
3817 if (!ok)
3818 continue;
3819 const s = evalSdf(kind, px, py);
3820 rims.push({ x: px, y: py, zone: s.zone, part: s.part, rim: 1, u: 0, priority: 2 });
3821 }
3822 const out = [...rims];
3823 const minI2 = (pitch * 0.74) ** 2;
3824 const dy = pitch * 0.8660254;
3825 let row = 0;
3826 for (let y = -0.90; y <= 0.90; y += dy, row++) {
3827 const xOff = (row & 1) ? pitch * 0.5 : 0;
3828 for (let x = -0.90 + xOff; x <= 0.90; x += pitch) {
3829 const s = evalSdf(kind, x, y);
3830 if (s.d > -inset)
3831 continue;
3832 let near = false;
3833 for (let k = 0; k < rims.length; k++) {
3834 const dx = x - rims[k].x;
3835 const ddy = y - rims[k].y;
3836 if (dx * dx + ddy * ddy < minI2) {
3837 near = true;
3838 break;
3839 }
3840 }
3841 if (near)
3842 continue;
3843 const rim = Math.exp(-Math.max(0, -s.d - inset) / 0.085);
3844 out.push({ x, y, zone: s.zone, part: s.part, rim, u: 0, priority: 1 + rim * 0.5 });
3845 }
3846 }
3847 return out;
3848 }
3849 const BODIES = { smooth: dot_body_js_1.DOT_BODY, pixel: dot_pixel_body_js_1.DOT_PIXEL_BODY };
3850 const HOME_RANKS = {
3851 smooth: dot_body_js_1.DOT_BODY.map((p, i) => [p[0] * 0.78 + p[1] * 0.62, i]).sort((a, b) => a[0] - b[0] || a[1] - b[1]).map((v) => v[1]),
3852 pixel: dot_pixel_body_js_1.DOT_PIXEL_BODY.map((p, i) => [p[0] * 0.78 + p[1] * 0.62, i]).sort((a, b) => a[0] - b[0] || a[1] - b[1]).map((v) => v[1]),
3853 };
3854 function compileKey(kind) {
3855 let lo = 0.015;
3856 let hi = 0.085;
3857 let best = [];
3858 let bestPitch = (lo + hi) * 0.5;
3859 for (let iter = 0; iter < 12; iter++) {
3860 const mid = (lo + hi) * 0.5;
3861 const pts = sampleHexLattice(kind, mid);
3862 if (!best.length || Math.abs(pts.length - N) < Math.abs(best.length - N)) {
3863 best = pts;
3864 bestPitch = mid;
3865 }
3866 if (pts.length > N)
3867 lo = mid;
3868 else
3869 hi = mid;
3870 }
3871 if (best.length > N) {
3872 const rims = best.filter((p) => p.priority >= 2);
3873 const ints = best.filter((p) => p.priority < 2);
3874 if (rims.length >= N) {
3875 const st = rims.length / N;
3876 best = Array.from({ length: N }, (_, i) => rims[Math.min(rims.length - 1, Math.floor(i * st))]);
3877 }
3878 else {
3879 const need = N - rims.length;
3880 const st = ints.length / need;
3881 best = [...rims, ...Array.from({ length: need }, (_, i) => ints[Math.min(ints.length - 1, Math.floor(i * st))])];
3882 }
3883 }
3884 else if (best.length > 0 && best.length < N) {
3885 const baseLen = best.length;
3886 for (let i = baseLen; i < N; i++)
3887 best.push({ ...best[(i * 73) % baseLen] });
3888 }
3889 best.sort((a, b) => (a.x * 0.78 + a.y * 0.62) - (b.x * 0.78 + b.y * 0.62));
3890 return {
3891 pitch: bestPitch,
3892 slots: best.map((p, idx) => ({ x: p.x, y: p.y, zone: p.zone, part: p.part, rim: p.rim, u: idx / (N - 1) })),
3893 };
3894 }
3895 const CACHE = new Map();
3896 function getFormLayout(kind, style, agents = 3) {
3897 const key = kind === 'delegating' ? (agents >= 3 ? 'delegating3' : 'delegating2') : kind;
3898 const cacheKey = `${style}:${key}`;
3899 const hit = CACHE.get(cacheKey);
3900 if (hit)
3901 return hit;
3902 const raw = compileKey(key);
3903 const rank = HOME_RANKS[style];
3904 const byHome = new Array(N);
3905 for (let r = 0; r < N; r++) {
3906 byHome[rank[r]] = raw.slots[r];
3907 }
3908 void BODIES;
3909 const layout = { pitch: raw.pitch, slots: byHome };
3910 CACHE.set(cacheKey, layout);
3911 return layout;
3912 }
3913 function formPoint(kind, style, i, t, agents = 3) {
3914 const s = getFormLayout(kind, style, agents).slots[i];
3915 const { x: px, y: py, zone, part, rim, u } = s;
3916 switch (kind) {
3917 case 'thinking': {
3918 if (part === 1)
3919 return { x: px, y: py + 0.004 * Math.sin(t * 4.2), lit: 0.92, fade: 0.95 };
3920 if (part >= 2) {
3921 const idx = part - 2;
3922 const w = 0.5 + 0.5 * Math.sin(t * 4.2 - idx * 0.65);
3923 const dx = px;
3924 const dy = py + 0.14;
3925 const len = Math.hypot(dx, dy) || 1;
3926 return { x: px + (dx / len) * 0.032 * w, y: py + (dy / len) * 0.032 * w, lit: 0.88, fade: 0.55 + 0.45 * w };
3927 }
3928 return { x: px, y: py + 0.004 * Math.sin(t * 2.1), lit: 0.35 + rim * 0.35, fade: 0.78 + rim * 0.22 };
3929 }
3930 case 'reading': {
3931 const scanY = -0.32 + ((t * 0.42) % 1) * 0.76;
3932 const beam = Math.exp(-(((py - scanY) * 7.5) ** 2));
3933 const leaf = (part === 1 ? -0.016 : 0.016) * Math.sin(t * 2.2);
3934 return { x: px, y: py + leaf * Math.abs(px), lit: 0.28 + rim * 0.32 + beam * 0.45, fade: 0.74 + rim * 0.24 };
3935 }
3936 case 'searching': {
3937 const ox = 0.10 * Math.sin(t * 1.6);
3938 const oy = 0.07 * Math.sin(t * 2.3 + 0.8);
3939 if (part === 1)
3940 return { x: px + ox, y: py + oy, lit: zone === 2 ? 0.92 : 0.45 + rim * 0.35, fade: 0.90 };
3941 const glow = Math.exp(-(((Math.hypot(px - (-0.10 + ox), py - (-0.10 + oy)) - 0.38) * 4.5) ** 2));
3942 return { x: px, y: py, lit: mix(0.22, 0.82, glow), fade: mix(0.55, 0.92, glow) };
3943 }
3944 case 'editing': {
3945 const cyc = (t * 0.45) % 1;
3946 if (part === 1) {
3947 return { x: px + (cyc - 0.5) * 0.18, y: py + 0.014 * Math.sin(t * 9), lit: zone === 2 ? 0.92 : 0.38 + rim * 0.36, fade: 0.86 + rim * 0.14 };
3948 }
3949 const normX = clamp((px + 0.44) / 1.06);
3950 const drawn = smoothstep(normX - 0.08, normX + 0.02, 0.35 + cyc * 0.85);
3951 return { x: px, y: py + 0.004 * Math.sin(t * 3), lit: 0.82, fade: 0.45 + 0.55 * drawn };
3952 }
3953 case 'executing': {
3954 if (part === 2)
3955 return { x: px, y: py + 0.004 * Math.sin(t * 3.1), lit: 0.94, fade: 0.98 };
3956 const cyc = (t * 0.62) % 1;
3957 const ang = (cyc < 0.68 ? smoothstep(0, 0.68, cyc) * 20 - 10 : mix(10, -10, smoothstep(0.68, 1, cyc))) * DEG;
3958 const dx = px - 0.28;
3959 const dy = py + 0.28;
3960 return {
3961 x: 0.28 + dx * Math.cos(ang) - dy * Math.sin(ang),
3962 y: -0.28 + dx * Math.sin(ang) + dy * Math.cos(ang),
3963 lit: zone === 1 ? 0.65 : 0.35 + rim * 0.35,
3964 fade: 0.80 + rim * 0.20,
3965 };
3966 }
3967 case 'testing': {
3968 if (part === 2) {
3969 const rise = (t * 0.65 + u * 2.1) % 1;
3970 return { x: (px - 0.02) * 0.6 + 0.03 * Math.sin(rise * 8 + u * 5), y: mix(0.24, -0.78, rise), lit: 0.94, fade: 0.95 * (1 - smoothstep(0.82, 1, rise)) };
3971 }
3972 const wave = part === 1 ? 0.018 * Math.sin(px * 7 + t * 3.4) : 0.004 * Math.sin(t * 2.2);
3973 return { x: px, y: py + wave, lit: part === 1 ? 0.68 + rim * 0.22 : 0.36 + rim * 0.38, fade: 0.80 + rim * 0.20 };
3974 }
3975 case 'browsing': {
3976 if (part === 1 || part === 2) {
3977 const R = Math.sqrt(Math.max(0.01, 0.64 * 0.64 - py * py));
3978 const lon = (part === 1 ? 0.50 : -0.50) + 0.20 * Math.sin(t * 1.45);
3979 return { x: R * Math.sin(lon), y: py, lit: 0.65, fade: 0.88 };
3980 }
3981 return { x: px, y: py + 0.004 * Math.sin(t * 1.8), lit: 0.45 + rim * 0.35, fade: 0.82 + rim * 0.18 };
3982 }
3983 case 'computer': {
3984 const cyc = (t * 0.55) % 1;
3985 const press = cyc > 0.46 && cyc < 0.62 ? 0.03 : 0;
3986 if (part === 2) {
3987 const rp = clamp((cyc - 0.46) / 0.44);
3988 const sc = 0.88 + rp * 0.58;
3989 return { x: -0.24 + (px + 0.24) * sc, y: -0.48 + (py + 0.48) * sc, lit: 0.92, fade: cyc >= 0.46 ? (1 - rp * 0.75) * 0.95 : 0.30 };
3990 }
3991 const glide = part === 1 ? 0.036 * Math.sin(cyc * TAU) : 0.004 * Math.sin(t * 2);
3992 return { x: px + glide + press * 0.5, y: py + glide * 0.6 + press, lit: 0.52 + rim * 0.35, fade: 0.84 + rim * 0.16 };
3993 }
3994 case 'memory': {
3995 const layer = Math.max(0, part - 1);
3996 const w = 0.5 + 0.5 * Math.sin(t * 2.4 - layer * 1.05);
3997 return { x: px, y: py + 0.022 * Math.sin(t * 2.4 - layer * 0.9), lit: 0.35 + w * 0.42 + rim * 0.20, fade: 0.72 + w * 0.26 };
3998 }
3999 case 'responding': {
4000 if (part >= 1 && part <= 3) {
4001 const k = part - 1;
4002 return { x: px, y: py - 0.08 * Math.max(0, Math.sin(t * 4.0 - k * 0.95)), lit: 0.94, fade: 0.98 };
4003 }
4004 return { x: px, y: py + 0.015 * Math.sin(t * 1.8), lit: 0.35 + rim * 0.38, fade: 0.76 + rim * 0.22 };
4005 }
4006 case 'delegating': {
4007 const wIdx = Math.floor((part - 1) / 2);
4008 const fluke = (part - 1) % 2 === 1;
4009 return {
4010 x: px + 0.032 * Math.sin(t * 1.7 + wIdx * 1.9),
4011 y: py + 0.022 * Math.cos(t * 2.1 + wIdx * 1.6) + (fluke ? 0.036 * Math.sin(t * 5.2 + wIdx * 1.8) : 0),
4012 lit: zone >= 1 ? 0.86 : 0.40 + rim * 0.38,
4013 fade: 0.82 + rim * 0.18,
4014 };
4015 }
4016 case 'waiting': {
4017 if (part === 3) {
4018 const sd = px < 0 ? -1 : 1;
4019 const beat = 0.45 + 0.55 * Math.max(0, Math.sin(t * 5.2 * sd));
4020 return { x: px + sd * 0.026 * beat, y: py, lit: 0.92, fade: 0.55 + 0.45 * beat };
4021 }
4022 const ang = (part === 2 ? 14 : 10) * DEG * Math.sin(t * 5.2 - (part === 2 ? 0.45 : 0)) * (0.65 + 0.35 * Math.sin(t * 1.3));
4023 const dy = py + 0.58;
4024 return {
4025 x: px * Math.cos(ang) - dy * Math.sin(ang),
4026 y: -0.58 + px * Math.sin(ang) + dy * Math.cos(ang),
4027 lit: part === 2 ? 0.95 : 0.46 + rim * 0.38,
4028 fade: 0.84 + rim * 0.16,
4029 };
4030 }
4031 case 'done': {
4032 const pop = 1 + 0.06 * Math.exp(-t * 2.2) * Math.cos(t * 11) + 0.008 * Math.sin(t * 5.5);
4033 return { x: px * pop, y: py * pop, lit: 0.56 + rim * 0.36, fade: 0.88 + rim * 0.12 };
4034 }
4035 }
4036 }
4037
4038 };
4039 function load(id){id=id.replace(/^\.\//,'').replace(/\.js$/,'');if(cache[id])return cache[id];if(!factories[id])throw Error('Missing core module');const e=cache[id]={};factories[id](e,load);return e;}
4040 global.PetDotField=load('dot-field');global.PetEngineTelemetry=load('pet-engine').PetEngineTelemetry;
4041 })(globalThis);
4042
4042 lines JAVASCRIPT