<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Ferret - The declarative data extraction language</title>
		<link>https://ferretlang.org/</link>
		<description>Recent content on Ferret - The declarative data extraction language</description>
		<generator>Hugo</generator>
		<language>en-us</language>
		
		
		
		
			<lastBuildDate>Tue, 17 Nov 2026 00:00:00 +0000</lastBuildDate>
		
			<atom:link href="https://ferretlang.org/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Overview</title>
				<link>https://ferretlang.org/docs/tools/cli/overview/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/tools/cli/overview/</guid>
				<description>&lt;h1 id=&#34;overview&#34;&gt;Overview&lt;/h1&gt;&#xA;&lt;p&gt;The Ferret CLI provides the local command-line workflow around FQL. It can run source scripts, open an interactive shell, check and format code, debug execution, build and inspect bytecode, manage browser processes, and work with Ferret modules.&lt;/p&gt;&#xA;&lt;p&gt;The &lt;a href=&#34;https://ferretlang.org/docs/tools/cli/installation/&#34;&gt;installation guide&lt;/a&gt; covers the published CLI prerelease used here, &lt;code&gt;v2.0.0-alpha.48&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Run an expression without creating a file:&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor terminal-shortcode&#34;&gt;&#xA;    &lt;textarea id=&#34;terminal-2-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;ferret run --eval &amp;#39;return 1 &amp;#43; 2&amp;#39;&lt;/textarea&gt;&#xA;&#xA;    &lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;terminal&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;button id=&#34;terminal-2-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;pre id=&#34;terminal-2-content&#34; class=&#34;terminal-body&#34;&gt;&lt;code&gt;&lt;span class=&#34;terminal-row&#34;&gt;&lt;span class=&#34;terminal-prompt&#34; aria-hidden=&#34;true&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;terminal-command&#34;&gt;ferret run --eval &amp;#39;return 1 &amp;#43; 2&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const copyBtn = document.querySelector(&#39;#terminal-2-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#terminal-2-copy-clipboard&#39;);&#xA;            const terminalContent = copyClipboardEl.value;&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy terminal commands to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(terminalContent)&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy terminal commands&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;The command prints the serialized result:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Basic Types</title>
				<link>https://ferretlang.org/docs/language/types/basic/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/language/types/basic/</guid>
				<description>&lt;h1 id=&#34;basic-types&#34;&gt;Basic types&lt;/h1&gt;&#xA;&lt;p&gt;FQL has nine built-in value types:&lt;/p&gt;&#xA;&lt;div class=&#34;table-scroll&#34; role=&#34;region&#34; aria-label=&#34;Scrollable table&#34; tabindex=&#34;0&#34;&gt;&#xA;    &lt;table&gt;&#xA;        &lt;thead&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;th&gt;Type&lt;/th&gt;&#xA;                        &lt;th&gt;Example&lt;/th&gt;&#xA;                        &lt;th&gt;Description&lt;/th&gt;&#xA;                &lt;/tr&gt;&#xA;        &lt;/thead&gt;&#xA;        &lt;tbody&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;none&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;none&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Represents an absent or undefined value.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;bool&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;true&lt;/code&gt;, &lt;code&gt;false&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Represents a truth value.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;number&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;42&lt;/code&gt;, &lt;code&gt;3.14&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Represents numeric values, both integer and floating-point.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;250ms&lt;/code&gt;, &lt;code&gt;1.5s&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Represents a signed length of time with nanosecond precision.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;&amp;quot;hello&amp;quot;&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Represents text.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;datetime&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;to_datetime(&amp;quot;2024-01-01T00:00:00Z&amp;quot;)&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Represents a point in time.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;array&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;[1, 2, 3]&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Represents an ordered sequence of values.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;object&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;{ name: &amp;quot;Ada&amp;quot; }&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Represents a set of named fields.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;binary&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;module-specific&lt;/td&gt;&#xA;                        &lt;td&gt;Represents raw bytes.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;        &lt;/tbody&gt;&#xA;    &lt;/table&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;Ferret hosts may also define additional value types — documents, elements, HTTP responses, files, handles, database connections, and other external resources. These are called host values and are covered separately in &lt;a href=&#34;#&#34;&gt;Host Values&lt;/a&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Comparison Operators</title>
				<link>https://ferretlang.org/docs/language/operators/comparison/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/language/operators/comparison/</guid>
				<description>&lt;h1 id=&#34;comparison-operators&#34;&gt;Comparison operators&lt;/h1&gt;&#xA;&lt;p&gt;Comparison operators test two values. A valid comparison returns a Boolean; a relational operator raises a runtime error when the operand pair has no defined comparison.&lt;/p&gt;&#xA;&lt;p&gt;FQL provides:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;==&lt;/code&gt; and &lt;code&gt;!=&lt;/code&gt; for equality&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;&amp;lt;&lt;/code&gt;, &lt;code&gt;&amp;lt;=&lt;/code&gt;, &lt;code&gt;&amp;gt;&lt;/code&gt;, and &lt;code&gt;&amp;gt;=&lt;/code&gt; for relational comparison&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;in&lt;/code&gt; and &lt;code&gt;not in&lt;/code&gt; for containment&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;like&lt;/code&gt; and &lt;code&gt;not like&lt;/code&gt; for wildcard matching&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;=~&lt;/code&gt; and &lt;code&gt;!~&lt;/code&gt; for regular expression matching&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;equality&#34;&gt;Equality&lt;/h2&gt;&#xA;&lt;p&gt;Equality and inequality are valid across all operand types. Incompatible values are unequal: &lt;code&gt;==&lt;/code&gt; returns false and &lt;code&gt;!=&lt;/code&gt; returns true. FQL does not implicitly convert strings, numbers, DateTime values, or Duration values before testing equality.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Extract data from static pages</title>
				<link>https://ferretlang.org/docs/guides/static-pages/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/guides/static-pages/</guid>
				<description>&lt;h1 id=&#34;extract-data-from-static-pages&#34;&gt;Extract data from static pages&lt;/h1&gt;&#xA;&lt;p&gt;This guide shows how to load an HTML page, find elements with CSS selectors, extract text and attributes, and return structured data.&lt;/p&gt;&#xA;&lt;p&gt;Static extraction does not need a browser. Ferret fetches the HTML over HTTP and parses it in memory, which is fast and lightweight. Use this approach whenever the page content is present in the initial HTML response. For pages that load content through JavaScript, see &lt;a href=&#34;https://ferretlang.org/docs/guides/browser-pages/&#34;&gt;Browser-driven pages&lt;/a&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>FQL language migration</title>
				<link>https://ferretlang.org/docs/migrations/v1-to-v2/language/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/migrations/v1-to-v2/language/</guid>
				<description>&lt;h1 id=&#34;fql-language-migration&#34;&gt;FQL language migration&lt;/h1&gt;&#xA;&lt;p&gt;Ferret v1 implicitly returned the value of a final top-level collecting &lt;code&gt;FOR&lt;/code&gt;.&#xA;In v2, return that value explicitly with &lt;code&gt;RETURN FOR&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Before, in v1:&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor is-readonly is-auto-height&#34;&gt;&#xA;    &lt;textarea id=&#34;code-4-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;&lt;/textarea&gt;&lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;example.fql&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-meta&#34;&gt;read-only&lt;/span&gt;&#xA;                &lt;button id=&#34;code-4-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;div class=&#34;code-editor-pane&#34;&gt;&#xA;            &lt;div id=&#34;code-4-text&#34; class=&#34;code-editor-text&#34; data-auto-height=&#34;true&#34;&gt;FOR item IN 1..3&#xA;    RETURN item&lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const editor = ace.edit(&#39;code-4-text&#39;);&#xA;            editor.setTheme(&#34;ace\/theme\/tomorrow_night&#34;);&#xA;            editor.session.setUseWorker(false);&#xA;            editor.session.setMode(&#34;ace/mode/&#34; + &#39;fql&#39;);&#xA;            editor.setOptions({&#xA;                readOnly: true,&#xA;                highlightActiveLine: false,&#xA;                highlightGutterLine: false,&#xA;                displayIndentGuides: false,&#xA;                printMargin: false&#xA;            });&#xA;            editor.renderer.$cursorLayer.element.style.display = &#34;none&#34;&#xA;            const copyBtn = document.querySelector(&#39;#code-4-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#code-4-copy-clipboard&#39;);&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy source to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(editor.getValue())&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy source&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;            function resizeAutoHeightEditor() {&#xA;                const lineHeight = editor.renderer.lineHeight || 21;&#xA;                const screenLines = Math.max(editor.session.getScreenLength(), 1);&#xA;                const nextHeight = Math.max(screenLines * lineHeight, 48);&#xA;&#xA;                editor.container.style.height = `${nextHeight}px`;&#xA;                editor.resize();&#xA;            }&#xA;&#xA;            editor.session.on(&#39;change&#39;, resizeAutoHeightEditor);&#xA;            window.addEventListener(&#39;resize&#39;, resizeAutoHeightEditor);&#xA;            resizeAutoHeightEditor();&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;After, in v2:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Getting Started</title>
				<link>https://ferretlang.org/docs/embedding/go/getting-started/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/embedding/go/getting-started/</guid>
				<description>&lt;h1 id=&#34;getting-started&#34;&gt;Getting Started&lt;/h1&gt;&#xA;&lt;p&gt;This page walks through installing Ferret as a Go dependency, running a query, and working with the result.&lt;/p&gt;&#xA;&lt;h2 id=&#34;installation&#34;&gt;Installation&lt;/h2&gt;&#xA;&lt;p&gt;From your Go application module, install Ferret Core v2.0.0-alpha.62. This release requires Go 1.26 or later. For a new application, run &lt;code&gt;go mod init example.com/myapp&lt;/code&gt; first.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor terminal-shortcode&#34;&gt;&#xA;    &lt;textarea id=&#34;terminal-1-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;go get github.com/MontFerret/ferret/v2@v2.0.0-alpha.62&lt;/textarea&gt;&#xA;&#xA;    &lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;terminal&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;button id=&#34;terminal-1-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;pre id=&#34;terminal-1-content&#34; class=&#34;terminal-body&#34;&gt;&lt;code&gt;&lt;span class=&#34;terminal-row&#34;&gt;&lt;span class=&#34;terminal-prompt&#34; aria-hidden=&#34;true&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;terminal-command&#34;&gt;go get github.com/MontFerret/ferret/v2@v2.0.0-alpha.62&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const copyBtn = document.querySelector(&#39;#terminal-1-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#terminal-1-copy-clipboard&#39;);&#xA;            const terminalContent = copyClipboardEl.value;&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy terminal commands to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(terminalContent)&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy terminal commands&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;For an existing integration, follow the &lt;a href=&#34;https://ferretlang.org/docs/migrations/consumable-output/&#34;&gt;consumable output migration&lt;/a&gt; and the &lt;a href=&#34;https://ferretlang.org/docs/migrations/encoding-api/&#34;&gt;Encoding API migration&lt;/a&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Getting Started</title>
				<link>https://ferretlang.org/docs/embedding/javascript/getting-started/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/embedding/javascript/getting-started/</guid>
				<description>&lt;h1 id=&#34;getting-started&#34;&gt;Getting Started&lt;/h1&gt;&#xA;&lt;p&gt;&lt;code&gt;@montferret/ferret&lt;/code&gt; runs Ferret inside Node.js and browser applications. The package loads the Ferret runtime as WebAssembly and exposes an asynchronous JavaScript API.&lt;/p&gt;&#xA;&lt;h2 id=&#34;requirements&#34;&gt;Requirements&lt;/h2&gt;&#xA;&lt;p&gt;Use one of these environments:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Node.js 22 or newer&lt;/li&gt;&#xA;&lt;li&gt;a modern browser with WebAssembly, &lt;code&gt;fetch&lt;/code&gt;, and &lt;code&gt;crypto.getRandomValues&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Building the package from source also requires Go 1.26.0 or newer. Applications that install the published package do not need Go.&lt;/p&gt;&#xA;&lt;h2 id=&#34;install-the-package&#34;&gt;Install the package&lt;/h2&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor terminal-shortcode&#34;&gt;&#xA;    &lt;textarea id=&#34;terminal-1-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;npm install --save-exact @montferret/ferret@2.0.0-alpha.12&lt;/textarea&gt;&#xA;&#xA;    &lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;terminal&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;button id=&#34;terminal-1-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;pre id=&#34;terminal-1-content&#34; class=&#34;terminal-body&#34;&gt;&lt;code&gt;&lt;span class=&#34;terminal-row&#34;&gt;&lt;span class=&#34;terminal-prompt&#34; aria-hidden=&#34;true&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;terminal-command&#34;&gt;npm install --save-exact @montferret/ferret@2.0.0-alpha.12&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const copyBtn = document.querySelector(&#39;#terminal-1-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#terminal-1-copy-clipboard&#39;);&#xA;            const terminalContent = copyClipboardEl.value;&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy terminal commands to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(terminalContent)&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy terminal commands&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;h2 id=&#34;run-a-program&#34;&gt;Run a program&lt;/h2&gt;&#xA;&lt;p&gt;Import &lt;code&gt;create&lt;/code&gt;, initialize an engine, and pass an FQL program to &lt;code&gt;engine.runJSON()&lt;/code&gt;:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Install a module</title>
				<link>https://ferretlang.org/docs/modules/install/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/modules/install/</guid>
				<description>&lt;h1 id=&#34;install-a-module&#34;&gt;Install a module&lt;/h1&gt;&#xA;&lt;p&gt;Use &lt;code&gt;ferret mod install&lt;/code&gt; to add a registered module to an existing Go application. The installer resolves a compatible release, adds its Go package, and registers it in the application&amp;rsquo;s Ferret engine composition.&lt;/p&gt;&#xA;&lt;p&gt;These instructions use Ferret CLI &lt;code&gt;v2.0.0-alpha.48&lt;/code&gt; and a Go project with an existing &lt;code&gt;go.mod&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;find-a-module&#34;&gt;Find a module&lt;/h2&gt;&#xA;&lt;p&gt;Search the public Registry by module identity or description:&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor terminal-shortcode is-command&#34;&gt;&#xA;    &lt;textarea id=&#34;terminal-1-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;ferret mod search archive&lt;/textarea&gt;&#xA;&#xA;    &lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;terminal&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;button id=&#34;terminal-1-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;pre id=&#34;terminal-1-content&#34; class=&#34;terminal-body&#34;&gt;&lt;code&gt;&lt;span class=&#34;terminal-row&#34;&gt;&lt;span class=&#34;terminal-prompt&#34; aria-hidden=&#34;true&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;terminal-command&#34;&gt;ferret mod search archive&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const copyBtn = document.querySelector(&#39;#terminal-1-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#terminal-1-copy-clipboard&#39;);&#xA;            const terminalContent = copyClipboardEl.value;&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy terminal commands to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(terminalContent)&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy terminal commands&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;Inspect a module before installing it:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Installation</title>
				<link>https://ferretlang.org/docs/tools/cli/installation/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/tools/cli/installation/</guid>
				<description>&lt;h1 id=&#34;installation&#34;&gt;Installation&lt;/h1&gt;&#xA;&lt;p&gt;The Ferret CLI runs on Linux, macOS, and Windows. This page covers CLI-specific setup. To compare the CLI with Go and JavaScript embedding, see the &lt;a href=&#34;https://ferretlang.org/docs/getting-started/installation/&#34;&gt;Installation chooser&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;These guides use the published v2 prerelease &lt;code&gt;v2.0.0-alpha.48&lt;/code&gt;. Choose this tag explicitly. GitHub’s latest stable release and the shell installer can select the v1 CLI.&lt;/p&gt;&#xA;&lt;h2 id=&#34;prebuilt-binary&#34;&gt;Prebuilt binary&lt;/h2&gt;&#xA;&lt;p&gt;Download &lt;code&gt;v2.0.0-alpha.48&lt;/code&gt; for your platform from the &lt;a href=&#34;https://github.com/MontFerret/cli/releases/tag/v2.0.0-alpha.48&#34;&gt;CLI release page&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Release archives use these names:&lt;/p&gt;&#xA;&lt;div class=&#34;table-scroll&#34; role=&#34;region&#34; aria-label=&#34;Scrollable table&#34; tabindex=&#34;0&#34;&gt;&#xA;    &lt;table&gt;&#xA;        &lt;thead&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;th&gt;Platform&lt;/th&gt;&#xA;                        &lt;th&gt;Archive&lt;/th&gt;&#xA;                &lt;/tr&gt;&#xA;        &lt;/thead&gt;&#xA;        &lt;tbody&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;Linux x86_64&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;cli_linux_x86_64.tar.gz&lt;/code&gt;&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;Linux arm64&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;cli_linux_arm64.tar.gz&lt;/code&gt;&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;macOS x86_64&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;cli_darwin_x86_64.tar.gz&lt;/code&gt;&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;macOS arm64&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;cli_darwin_arm64.tar.gz&lt;/code&gt;&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;Windows x86_64&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;cli_windows_x86_64.zip&lt;/code&gt;&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;Windows arm64&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;cli_windows_arm64.zip&lt;/code&gt;&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;        &lt;/tbody&gt;&#xA;    &lt;/table&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;Extract the archive and place the &lt;code&gt;ferret&lt;/code&gt; binary in a directory on your &lt;code&gt;PATH&lt;/code&gt;. For a user-local installation on Linux or macOS:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Match Expressions</title>
				<link>https://ferretlang.org/docs/language/control-flow/match/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/language/control-flow/match/</guid>
				<description>&lt;h1 id=&#34;match-expressions&#34;&gt;Match Expressions&lt;/h1&gt;&#xA;&lt;p&gt;A &lt;code&gt;match&lt;/code&gt; expression is FQL&amp;rsquo;s primary structured branching construct. It chooses a result from several branches. Each branch, called an &lt;strong&gt;arm&lt;/strong&gt;, pairs a pattern or a condition with a result expression after &lt;code&gt;=&amp;gt;&lt;/code&gt;. &lt;code&gt;match&lt;/code&gt; tries the arms from top to bottom, stops at the first one that applies, and produces its result.&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;match&lt;/code&gt; is an expression: it produces a value, so it can be returned, assigned, or nested inside another expression.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Overview</title>
				<link>https://ferretlang.org/docs/tools/lab/overview/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/tools/lab/overview/</guid>
				<description>&lt;h1 id=&#34;overview&#34;&gt;Overview&lt;/h1&gt;&#xA;&lt;p&gt;Lab is a test runner for Ferret scripts. It loads test files, prepares parameters, starts optional local services, runs each test through a Ferret runtime, and reports pass or fail.&lt;/p&gt;&#xA;&lt;p&gt;The runtime still owns FQL parsing, compilation, module behavior, browser behavior, and value semantics. Lab coordinates test execution around that runtime.&lt;/p&gt;&#xA;&lt;h2 id=&#34;execution-flow&#34;&gt;Execution flow&lt;/h2&gt;&#xA;&lt;p&gt;A Lab run follows this shape:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;locations -&amp;gt; sources -&amp;gt; test case -&amp;gt; runner -&amp;gt; runtime -&amp;gt; reporter&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                         |&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;                         +-&amp;gt; local services -&amp;gt; @lab.static / @lab.mock&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The main packages in Lab mirror that flow:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Overview</title>
				<link>https://ferretlang.org/docs/tools/worker/overview/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/tools/worker/overview/</guid>
				<description>&lt;h1 id=&#34;overview&#34;&gt;Overview&lt;/h1&gt;&#xA;&lt;p&gt;Worker is an HTTP runtime for Ferret. It receives a FQL script, compiles or reuses a cached plan, runs the script with optional parameters, and writes the serialized Ferret result back to the client.&lt;/p&gt;&#xA;&lt;p&gt;If your application already owns a configured Ferret engine and needs to expose it to another process, see &lt;a href=&#34;https://ferretlang.org/docs/embedding/wire/&#34;&gt;Wire&lt;/a&gt;. Wire is an integration library around that runtime; Worker is a deployable HTTP execution service.&lt;/p&gt;&#xA;&lt;p&gt;These pages document Worker &lt;code&gt;v2.0.0-rc.32&lt;/code&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Query Results</title>
				<link>https://ferretlang.org/docs/web-extraction/query-results/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/web-extraction/query-results/</guid>
				<description>&lt;h1 id=&#34;query-results&#34;&gt;Query results&lt;/h1&gt;&#xA;&lt;p&gt;&lt;code&gt;RETURN&lt;/code&gt; produces the value of its expression. For example, &lt;code&gt;RETURN 1&lt;/code&gt; produces the number &lt;code&gt;1&lt;/code&gt;. A &lt;code&gt;FOR&lt;/code&gt; expression collects the values returned by its iterations into an array:&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor is-horizontal is-auto-height&#34;&gt;&#xA;    &lt;textarea id=&#34;code-editor-1-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;&lt;/textarea&gt;&#xA;&#xA;    &lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div id=&#34;code-editor-1-header&#34; class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;example.fql&lt;/span&gt;&#xA;                &lt;small&gt;Ferret v2&lt;/small&gt;&#xA;            &lt;/div&gt;&#xA;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;button id=&#34;code-editor-1-result-toggle-button&#34; class=&#34;button is-outlined is-light code-editor-button&#34; type=&#34;button&#34; aria-expanded=&#34;false&#34; aria-controls=&#34;code-editor-1-result-pane&#34;&gt;Output&lt;/button&gt;&#xA;                &lt;button id=&#34;code-editor-1-params-toggle-button&#34; class=&#34;button is-outlined is-light code-editor-button&#34; type=&#34;button&#34; aria-expanded=&#34;false&#34; aria-controls=&#34;code-editor-1-params-drawer&#34;&gt;Params&lt;/button&gt;&#xA;                &lt;button id=&#34;code-editor-1-run-button&#34; class=&#34;run button is-outlined is-light code-editor-button&#34; type=&#34;button&#34; aria-label=&#34;Run query&#34;&gt;&#xA;                    &lt;span class=&#34;code-editor-run-label&#34;&gt;Run&lt;/span&gt;&#xA;                    &lt;span id=&#34;code-editor-1-run-button-spinner&#34; class=&#34;code-editor-run-spinner&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div id=&#34;code-editor-1-progress&#34; class=&#34;code-editor-progress&#34; role=&#34;progressbar&#34; aria-label=&#34;Running query&#34; hidden&gt;&lt;/div&gt;&#xA;            &lt;span id=&#34;code-editor-1-run-status&#34; class=&#34;code-editor-sr-only&#34; aria-live=&#34;polite&#34; aria-atomic=&#34;true&#34;&gt;&lt;/span&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;div class=&#34;code-editor-workspace&#34;&gt;&#xA;            &lt;div id=&#34;code-editor-1-grid&#34; class=&#34;code-editor-grid&#34; style=&#34;grid-template-columns: 1fr;&#34;&gt;&#xA;                &lt;div id=&#34;code-editor-1-source-pane&#34; class=&#34;code-editor-pane code-editor-pane-source&#34;&gt;&#xA;                    &lt;div class=&#34;code-editor-pane-header&#34;&gt;&#xA;                        &lt;span&gt;query.fql&lt;/span&gt;&#xA;                        &lt;div class=&#34;code-editor-pane-header-actions&#34;&gt;&#xA;                            &lt;span&gt;FQL&lt;/span&gt;&#xA;                            &lt;button id=&#34;code-editor-1-copy-button&#34; class=&#34;code-editor-pane-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;                        &lt;/div&gt;&#xA;                    &lt;/div&gt;&#xA;                    &lt;div id=&#34;code-editor-1-text&#34; class=&#34;code-editor-text&#34; data-auto-height=&#34;true&#34;&gt;RETURN FOR link IN [{ href: &amp;#34;/docs/&amp;#34; }, { href: &amp;#34;/try/&amp;#34; }]&#xA;    RETURN link.href&lt;/div&gt;&#xA;                &lt;/div&gt;&#xA;&#xA;                &lt;div id=&#34;code-editor-1-result-pane&#34; class=&#34;code-editor-pane code-editor-pane-result&#34; hidden&gt;&#xA;                    &lt;div class=&#34;code-editor-pane-header&#34;&gt;&#xA;                        &lt;span&gt;result.json&lt;/span&gt;&#xA;                        &lt;div class=&#34;code-editor-pane-header-actions&#34;&gt;&#xA;                            &lt;span&gt;output&lt;/span&gt;&#xA;                            &lt;button id=&#34;code-editor-1-result-close-button&#34; class=&#34;code-editor-pane-button&#34; type=&#34;button&#34; aria-controls=&#34;code-editor-1-result-pane&#34;&gt;Close&lt;/button&gt;&#xA;                        &lt;/div&gt;&#xA;                    &lt;/div&gt;&#xA;                    &lt;div id=&#34;code-editor-1-result&#34; class=&#34;code-editor-result&#34; data-auto-height=&#34;true&#34;&gt;&lt;/div&gt;&#xA;                &lt;/div&gt;&#xA;            &lt;/div&gt;&#xA;&#xA;            &lt;aside id=&#34;code-editor-1-params-drawer&#34; class=&#34;code-editor-params-drawer&#34; aria-labelledby=&#34;code-editor-1-params-title&#34; hidden&gt;&#xA;                &lt;div class=&#34;code-editor-params-header&#34;&gt;&#xA;                    &lt;div&gt;&#xA;                        &lt;span id=&#34;code-editor-1-params-title&#34; class=&#34;code-editor-params-title&#34;&gt;Query parameters&lt;/span&gt;&#xA;                        &lt;span class=&#34;code-editor-params-description&#34;&gt;Values are parsed as JSON when possible.&lt;/span&gt;&#xA;                    &lt;/div&gt;&#xA;                    &lt;button id=&#34;code-editor-1-params-close-button&#34; class=&#34;code-editor-pane-button&#34; type=&#34;button&#34;&gt;Close&lt;/button&gt;&#xA;                &lt;/div&gt;&#xA;                &lt;div class=&#34;code-editor-params-body&#34;&gt;&#xA;                    &lt;div id=&#34;code-editor-1-params-empty&#34; class=&#34;code-editor-params-empty&#34;&gt;No parameters added.&lt;/div&gt;&#xA;                    &lt;div id=&#34;code-editor-1-params-rows&#34; class=&#34;code-editor-params-rows&#34;&gt;&lt;/div&gt;&#xA;                &lt;/div&gt;&#xA;                &lt;div class=&#34;code-editor-params-footer&#34;&gt;&#xA;                    &lt;button id=&#34;code-editor-1-params-add-button&#34; class=&#34;code-editor-params-add-button&#34; type=&#34;button&#34;&gt;Add parameter&lt;/button&gt;&#xA;                &lt;/div&gt;&#xA;            &lt;/aside&gt;&#xA;        &lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            function createEditor(id, mode, useWorker) {&#xA;                const editor = ace.edit(id);&#xA;                editor.setTheme(&#34;ace\/theme\/tomorrow_night&#34;);&#xA;                editor.session.setUseWorker(useWorker);&#xA;                editor.session.setMode(&#34;ace/mode/&#34; + mode);&#xA;                editor.setOptions({&#xA;                    displayIndentGuides: false,&#xA;                    printMargin: false&#xA;                });&#xA;&#xA;                return editor;&#xA;            }&#xA;&#xA;            const btn = document.querySelector(&#39;#code-editor-1-run-button&#39;);&#xA;            const textEditor = createEditor(&#39;code-editor-1-text&#39;, &#39;fql&#39;, true);&#xA;            const resultEditor = createEditor(&#39;code-editor-1-result&#39;, &#39;json&#39;, false);&#xA;            resultEditor.setReadOnly(true);&#xA;            const resultExpandBtn = null;&#xA;            const editorHeader = document.querySelector(&#39;#code-editor-1-header&#39;);&#xA;            const editorWorkspace = document.querySelector(&#39;#code-editor-1-grid&#39;).parentElement;&#xA;            const editorGrid = document.querySelector(&#39;#code-editor-1-grid&#39;);&#xA;            const runProgress = document.querySelector(&#39;#code-editor-1-progress&#39;);&#xA;            const runStatus = document.querySelector(&#39;#code-editor-1-run-status&#39;);&#xA;            const resultPane = document.querySelector(&#39;#code-editor-1-result-pane&#39;);&#xA;            const resultToggleBtn = document.querySelector(&#39;#code-editor-1-result-toggle-button&#39;);&#xA;            const resultCloseBtn = document.querySelector(&#39;#code-editor-1-result-close-button&#39;);&#xA;            const paramsToggleBtn = document.querySelector(&#39;#code-editor-1-params-toggle-button&#39;);&#xA;            const paramsDrawer = document.querySelector(&#39;#code-editor-1-params-drawer&#39;);&#xA;            const paramsCloseBtn = document.querySelector(&#39;#code-editor-1-params-close-button&#39;);&#xA;            const paramsAddBtn = document.querySelector(&#39;#code-editor-1-params-add-button&#39;);&#xA;            const paramsRows = document.querySelector(&#39;#code-editor-1-params-rows&#39;);&#xA;            const paramsEmpty = document.querySelector(&#39;#code-editor-1-params-empty&#39;);&#xA;            let isResultVisible = !resultPane.hidden;&#xA;            let isParamsVisible = !paramsDrawer.hidden;&#xA;&#xA;            function resetResultExpansion() {&#xA;                if (!resultExpandBtn) {&#xA;                    return;&#xA;                }&#xA;&#xA;                isResultExpanded = false;&#xA;                resultExpandBtn.setAttribute(&#39;aria-expanded&#39;, &#39;false&#39;);&#xA;                resultExpandBtn.textContent = &#39;Expand&#39;;&#xA;            }&#xA;&#xA;            function syncEditorLayout() {&#xA;                const sourceHeight = getEditorContentHeight(textEditor);&#xA;                textEditor.container.style.height = `${sourceHeight}px`;&#xA;&#xA;                if (isResultVisible) {&#xA;                    const resultHeight = getEditorContentHeight(resultEditor);&#xA;                    applyResultHeight(resultHeight);&#xA;                }&#xA;&#xA;                textEditor.resize();&#xA;&#xA;                if (isResultVisible) {&#xA;                    resultEditor.resize();&#xA;                }&#xA;            }&#xA;&#xA;            function setResultVisible(nextVisible) {&#xA;                isResultVisible = nextVisible;&#xA;                resultPane.hidden = !nextVisible;&#xA;                resultToggleBtn.setAttribute(&#39;aria-expanded&#39;, nextVisible ? &#39;true&#39; : &#39;false&#39;);&#xA;                editorGrid.style.gridTemplateColumns = nextVisible ? &#39;&#39; : &#39;1fr&#39;;&#xA;&#xA;                if (!nextVisible) {&#xA;                    resetResultExpansion();&#xA;                    syncEditorLayout();&#xA;                    return;&#xA;                }&#xA;&#xA;                window.requestAnimationFrame(() =&gt; {&#xA;                    syncEditorLayout();&#xA;                    resultEditor.resize(true);&#xA;                });&#xA;            }&#xA;&#xA;            resultToggleBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setResultVisible(!isResultVisible);&#xA;            });&#xA;&#xA;            resultCloseBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setResultVisible(false);&#xA;            });&#xA;&#xA;            const collapsedResultHeightStyle = resultEditor.container.style.height;&#xA;            let isResultExpanded = false;&#xA;&#xA;            function getEditorContentHeight(editor) {&#xA;                const lineHeight = editor.renderer.lineHeight || 21;&#xA;                const screenLines = Math.max(editor.session.getScreenLength(), 1);&#xA;&#xA;                return Math.max(screenLines * lineHeight, 48);&#xA;            }&#xA;&#xA;            function getMaxResultHeight(fallbackHeight) {&#xA;                const viewportHeight = window.innerHeight || document.documentElement.clientHeight || fallbackHeight;&#xA;                const rootFontSize = parseFloat(window.getComputedStyle(document.documentElement).fontSize) || 16;&#xA;&#xA;                return Math.min(viewportHeight * 0.45, 32 * rootFontSize);&#xA;            }&#xA;&#xA;            function getCollapsedResultHeight() {&#xA;                return getEditorContentHeight(resultEditor);&#xA;            }&#xA;&#xA;            function getExpandedResultHeight(collapsedHeight) {&#xA;                const lineHeight = resultEditor.renderer.lineHeight || textEditor.renderer.lineHeight || 21;&#xA;                const maxAllowedHeight = getMaxResultHeight(collapsedHeight);&#xA;                const screenLines = Math.max(resultEditor.session.getScreenLength(), 1);&#xA;                const contentHeight = (screenLines * lineHeight) + (lineHeight * 2);&#xA;                const targetHeight = Math.min(contentHeight, maxAllowedHeight);&#xA;&#xA;                return Math.max(collapsedHeight, Math.round(targetHeight));&#xA;            }&#xA;&#xA;            function applyResultHeight(collapsedHeight) {&#xA;                if (resultExpandBtn &amp;&amp; isResultExpanded) {&#xA;                    resultEditor.container.style.height = `${getExpandedResultHeight(collapsedHeight)}px`;&#xA;                } else {&#xA;                    resultEditor.container.style.height = `${Math.min(collapsedHeight, getMaxResultHeight(collapsedHeight))}px`;&#xA;                }&#xA;&#xA;                resultEditor.resize();&#xA;            }&#xA;            textEditor.session.on(&#39;change&#39;, syncEditorLayout);&#xA;&#xA;            if (resultExpandBtn) {&#xA;                resultExpandBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                    isResultExpanded = !isResultExpanded;&#xA;                    resultExpandBtn.setAttribute(&#39;aria-expanded&#39;, isResultExpanded ? &#39;true&#39; : &#39;false&#39;);&#xA;                    resultExpandBtn.textContent = isResultExpanded ? &#39;Collapse&#39; : &#39;Expand&#39;;&#xA;                    syncEditorLayout();&#xA;                });&#xA;            }&#xA;&#xA;            function syncParamsEmptyState() {&#xA;                paramsEmpty.hidden = paramsRows.children.length &gt; 0;&#xA;            }&#xA;&#xA;            function formatParamValue(value) {&#xA;                return typeof value === &#39;string&#39; ? value : JSON.stringify(value);&#xA;            }&#xA;&#xA;            function createParamRow(name, value) {&#xA;                const row = document.createElement(&#39;div&#39;);&#xA;                row.className = &#39;code-editor-param-row&#39;;&#xA;&#xA;                const nameInput = document.createElement(&#39;input&#39;);&#xA;                nameInput.className = &#39;code-editor-param-input code-editor-param-name&#39;;&#xA;                nameInput.type = &#39;text&#39;;&#xA;                nameInput.placeholder = &#39;name&#39;;&#xA;                nameInput.setAttribute(&#39;aria-label&#39;, &#39;Parameter name&#39;);&#xA;                nameInput.value = name || &#39;&#39;;&#xA;&#xA;                const separator = document.createElement(&#39;span&#39;);&#xA;                separator.className = &#39;code-editor-param-separator&#39;;&#xA;                separator.setAttribute(&#39;aria-hidden&#39;, &#39;true&#39;);&#xA;                separator.textContent = &#39;:&#39;;&#xA;&#xA;                const valueInput = document.createElement(&#39;input&#39;);&#xA;                valueInput.className = &#39;code-editor-param-input code-editor-param-value&#39;;&#xA;                valueInput.type = &#39;text&#39;;&#xA;                valueInput.placeholder = &#39;value&#39;;&#xA;                valueInput.setAttribute(&#39;aria-label&#39;, &#39;Parameter value&#39;);&#xA;                valueInput.value = value === undefined ? &#39;&#39; : formatParamValue(value);&#xA;&#xA;                const removeBtn = document.createElement(&#39;button&#39;);&#xA;                removeBtn.className = &#39;code-editor-param-remove-button&#39;;&#xA;                removeBtn.type = &#39;button&#39;;&#xA;                removeBtn.setAttribute(&#39;aria-label&#39;, `Remove parameter ${name || &#39;row&#39;}`);&#xA;                removeBtn.textContent = &#39;Remove&#39;;&#xA;                removeBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                    row.remove();&#xA;                    syncParamsEmptyState();&#xA;                });&#xA;&#xA;                row.append(nameInput, separator, valueInput, removeBtn);&#xA;                paramsRows.appendChild(row);&#xA;                syncParamsEmptyState();&#xA;&#xA;                return nameInput;&#xA;            }&#xA;&#xA;            function setParamsVisible(nextVisible) {&#xA;                isParamsVisible = nextVisible;&#xA;                paramsDrawer.hidden = !nextVisible;&#xA;                paramsToggleBtn.setAttribute(&#39;aria-expanded&#39;, nextVisible ? &#39;true&#39; : &#39;false&#39;);&#xA;                editorWorkspace.classList.toggle(&#39;is-params-open&#39;, nextVisible);&#xA;&#xA;                if (nextVisible) {&#xA;                    paramsCloseBtn.focus();&#xA;                } else {&#xA;                    paramsToggleBtn.focus();&#xA;                }&#xA;            }&#xA;&#xA;            function setParamsControlsDisabled(disabled) {&#xA;                paramsToggleBtn.disabled = disabled;&#xA;                paramsDrawer.querySelectorAll(&#39;button, input&#39;).forEach((control) =&gt; {&#xA;                    control.disabled = disabled;&#xA;                });&#xA;            }&#xA;&#xA;            function parseParamValue(value) {&#xA;                try {&#xA;                    return JSON.parse(value);&#xA;                } catch (err) {&#xA;                    return value;&#xA;                }&#xA;            }&#xA;&#xA;            function getParams() {&#xA;                return Array.from(paramsRows.querySelectorAll(&#39;.code-editor-param-row&#39;)).reduce((params, row) =&gt; {&#xA;                    const name = row.querySelector(&#39;.code-editor-param-name&#39;).value.trim();&#xA;&#xA;                    if (name) {&#xA;                        const value = row.querySelector(&#39;.code-editor-param-value&#39;).value;&#xA;                        params[name] = parseParamValue(value);&#xA;                    }&#xA;&#xA;                    return params;&#xA;                }, {});&#xA;            }&#xA;&#xA;            const initialParams = JSON.parse(&#34;{}&#34;);&#xA;&#xA;            if (initialParams &amp;&amp; typeof initialParams === &#39;object&#39; &amp;&amp; !Array.isArray(initialParams)) {&#xA;                Object.entries(initialParams).forEach(([name, value]) =&gt; {&#xA;                    createParamRow(name, value);&#xA;                });&#xA;            }&#xA;&#xA;            syncParamsEmptyState();&#xA;&#xA;            paramsToggleBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setParamsVisible(!isParamsVisible);&#xA;            });&#xA;&#xA;            paramsCloseBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setParamsVisible(false);&#xA;            });&#xA;&#xA;            paramsAddBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                createParamRow(&#39;&#39;, &#39;&#39;).focus();&#xA;            });&#xA;&#xA;            window.addEventListener(&#39;resize&#39;, syncEditorLayout);&#xA;            syncEditorLayout();&#xA;&#xA;            function setContent(editor, content) {&#xA;                editor.setValue(content, -1);&#xA;            }&#xA;                const copyClipboardEl = document.querySelector(&#39;#code-editor-1-copy-clipboard&#39;);&#xA;                const copyBtn = document.querySelector(&#39;#code-editor-1-copy-button&#39;);&#xA;&#xA;                function copyTextWithFallback(content) {&#xA;                    copyClipboardEl.value = content;&#xA;                    copyClipboardEl.focus();&#xA;                    copyClipboardEl.select();&#xA;&#xA;                    if (!document.execCommand(&#39;copy&#39;)) {&#xA;                        throw new Error(&#39;Could not copy source to the clipboard&#39;);&#xA;                    }&#xA;                }&#xA;&#xA;                function copyTextToClipboard(content) {&#xA;                    if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                        return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                            copyTextWithFallback(content);&#xA;                        });&#xA;                    }&#xA;&#xA;                    copyTextWithFallback(content);&#xA;&#xA;                    return Promise.resolve();&#xA;                }&#xA;&#xA;                copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                    copyTextToClipboard(textEditor.getValue())&#xA;                        .then(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copied&#39;;&#xA;                            window.setTimeout(() =&gt; {&#xA;                                copyBtn.textContent = &#39;Copy&#39;;&#xA;                            }, 1200);&#xA;                        })&#xA;                        .catch((err) =&gt; {&#xA;                            console.error(&#39;Failed to copy source&#39;);&#xA;                            console.error(err);&#xA;                        });&#xA;                });&#xA;&#xA;            let isRunning = false;&#xA;&#xA;            function onStart() {&#xA;                isRunning = true;&#xA;                textEditor.setReadOnly(true);&#xA;                runProgress.hidden = false;&#xA;                runStatus.textContent = &#39;Running query&#39;;&#xA;                editorHeader.setAttribute(&#39;aria-busy&#39;, &#39;true&#39;);&#xA;                editorGrid.setAttribute(&#39;aria-busy&#39;, &#39;true&#39;);&#xA;                btn.classList.add(&#39;is-running&#39;);&#xA;                btn.setAttribute(&#39;aria-busy&#39;, &#39;true&#39;);&#xA;                btn.setAttribute(&#39;aria-label&#39;, &#39;Running query&#39;);&#xA;                btn.disabled = true;&#xA;                setParamsControlsDisabled(true);&#xA;            }&#xA;&#xA;            function onEnd(result) {&#xA;                isRunning = false;&#xA;                textEditor.setReadOnly(false);&#xA;                runProgress.hidden = true;&#xA;                runStatus.textContent = &#39;&#39;;&#xA;                editorHeader.setAttribute(&#39;aria-busy&#39;, &#39;false&#39;);&#xA;                editorGrid.setAttribute(&#39;aria-busy&#39;, &#39;false&#39;);&#xA;                btn.classList.remove(&#39;is-running&#39;);&#xA;                btn.setAttribute(&#39;aria-busy&#39;, &#39;false&#39;);&#xA;                btn.setAttribute(&#39;aria-label&#39;, &#39;Run query&#39;);&#xA;                btn.disabled = false;&#xA;                setParamsControlsDisabled(false);&#xA;&#xA;                setContent(resultEditor, result);&#xA;                setResultVisible(true);&#xA;            }&#xA;&#xA;            btn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                if (isRunning) {&#xA;                    return;&#xA;                }&#xA;&#xA;                const body = {&#xA;                        text: textEditor.getValue(),&#xA;                        params: getParams()&#xA;                };&#xA;                const url = &#34;https:\/\/worker-v2-811908774949.us-east1.run.app&#34;;&#xA;&#xA;                onStart();&#xA;                fetch(url, {&#xA;                    method: &#39;post&#39;,&#xA;                    cache: &#39;no-cache&#39;,&#xA;                    headers: {&#xA;                        &#39;Content-Type&#39;: &#39;application/json; charset=utf-8&#39;&#xA;                    },&#xA;                    signal: AbortSignal.timeout(1000 * 60), &#xA;                    body: JSON.stringify(body)&#xA;                })&#xA;                    .then(r =&gt; {&#xA;                        if (r.status === 200) {&#xA;                            return r.json()&#xA;                        }&#xA;                        &#xA;                        if (r.status === 426) {&#xA;                            throw new Error(`Too many requests. Try again later.`);&#xA;                        }&#xA;                        &#xA;                        if (r.status === 400) {&#xA;                            return r.json().then((data) =&gt; {&#xA;                                if (data.details) {&#xA;                                    throw new Error(data.details);&#xA;                                }&#xA;                                &#xA;                                throw new Error(data.error);&#xA;                            });&#xA;                        }&#xA;                        &#xA;                        throw new Error(`Unexpected error. Try again later.`);&#xA;                    })&#xA;                    .then((data) =&gt; {&#xA;                        onEnd(JSON.stringify(data, null, 4));&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        onEnd(err.message);&#xA;                    });&#xA;            });&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;The result is &lt;code&gt;[&amp;quot;/docs/&amp;quot;, &amp;quot;/try/&amp;quot;]&lt;/code&gt;. A loop with no matching iterations produces &lt;code&gt;[]&lt;/code&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>use Statement</title>
				<link>https://ferretlang.org/docs/language/script-structure/use/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/language/script-structure/use/</guid>
				<description>&lt;h1 id=&#34;the-use-statement&#34;&gt;The use statement&lt;/h1&gt;&#xA;&lt;p&gt;&lt;code&gt;use&lt;/code&gt; creates a local alias for a fully qualified namespace or namespaced function. Use it when repeating a long qualified name would make a script harder to read.&lt;/p&gt;&#xA;&lt;p&gt;Aliases are resolved when the script is compiled. &lt;code&gt;use&lt;/code&gt; does not import, load, or register a module.&lt;/p&gt;&#xA;&lt;h2 id=&#34;alias-a-namespace&#34;&gt;Alias a namespace&lt;/h2&gt;&#xA;&lt;p&gt;Use a namespace alias as the first segment of a qualified function name:&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor is-readonly is-auto-height&#34;&gt;&#xA;    &lt;textarea id=&#34;code-1-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;&lt;/textarea&gt;&lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;example.fql&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-meta&#34;&gt;read-only&lt;/span&gt;&#xA;                &lt;button id=&#34;code-1-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;div class=&#34;code-editor-pane&#34;&gt;&#xA;            &lt;div id=&#34;code-1-text&#34; class=&#34;code-editor-text&#34; data-auto-height=&#34;true&#34;&gt;use io::net::http as http&#xA;&#xA;return http::get(&amp;#34;https://api.example.com/data&amp;#34;)&lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const editor = ace.edit(&#39;code-1-text&#39;);&#xA;            editor.setTheme(&#34;ace\/theme\/tomorrow_night&#34;);&#xA;            editor.session.setUseWorker(false);&#xA;            editor.session.setMode(&#34;ace/mode/&#34; + &#39;fql&#39;);&#xA;            editor.setOptions({&#xA;                readOnly: true,&#xA;                highlightActiveLine: false,&#xA;                highlightGutterLine: false,&#xA;                displayIndentGuides: false,&#xA;                printMargin: false&#xA;            });&#xA;            editor.renderer.$cursorLayer.element.style.display = &#34;none&#34;&#xA;            const copyBtn = document.querySelector(&#39;#code-1-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#code-1-copy-clipboard&#39;);&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy source to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(editor.getValue())&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy source&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;            function resizeAutoHeightEditor() {&#xA;                const lineHeight = editor.renderer.lineHeight || 21;&#xA;                const screenLines = Math.max(editor.session.getScreenLength(), 1);&#xA;                const nextHeight = Math.max(screenLines * lineHeight, 48);&#xA;&#xA;                editor.container.style.height = `${nextHeight}px`;&#xA;                editor.resize();&#xA;            }&#xA;&#xA;            editor.session.on(&#39;change&#39;, resizeAutoHeightEditor);&#xA;            window.addEventListener(&#39;resize&#39;, resizeAutoHeightEditor);&#xA;            resizeAutoHeightEditor();&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;Here, &lt;code&gt;http::get(...)&lt;/code&gt; resolves to &lt;code&gt;io::net::http::get(...)&lt;/code&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>User-Defined Functions</title>
				<link>https://ferretlang.org/docs/language/functions/user-defined/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/language/functions/user-defined/</guid>
				<description>&lt;h1 id=&#34;user-defined-functions&#34;&gt;User-defined functions&lt;/h1&gt;&#xA;&lt;p&gt;A user-defined function is a reusable piece of logic declared within a script. Once declared, the function can be called like any built-in function.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor is-horizontal is-auto-height&#34;&gt;&#xA;    &lt;textarea id=&#34;code-editor-1-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;&lt;/textarea&gt;&#xA;&#xA;    &lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div id=&#34;code-editor-1-header&#34; class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;example.fql&lt;/span&gt;&#xA;                &lt;small&gt;Ferret v2&lt;/small&gt;&#xA;            &lt;/div&gt;&#xA;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;button id=&#34;code-editor-1-result-toggle-button&#34; class=&#34;button is-outlined is-light code-editor-button&#34; type=&#34;button&#34; aria-expanded=&#34;false&#34; aria-controls=&#34;code-editor-1-result-pane&#34;&gt;Output&lt;/button&gt;&#xA;                &lt;button id=&#34;code-editor-1-params-toggle-button&#34; class=&#34;button is-outlined is-light code-editor-button&#34; type=&#34;button&#34; aria-expanded=&#34;false&#34; aria-controls=&#34;code-editor-1-params-drawer&#34;&gt;Params&lt;/button&gt;&#xA;                &lt;button id=&#34;code-editor-1-run-button&#34; class=&#34;run button is-outlined is-light code-editor-button&#34; type=&#34;button&#34; aria-label=&#34;Run query&#34;&gt;&#xA;                    &lt;span class=&#34;code-editor-run-label&#34;&gt;Run&lt;/span&gt;&#xA;                    &lt;span id=&#34;code-editor-1-run-button-spinner&#34; class=&#34;code-editor-run-spinner&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div id=&#34;code-editor-1-progress&#34; class=&#34;code-editor-progress&#34; role=&#34;progressbar&#34; aria-label=&#34;Running query&#34; hidden&gt;&lt;/div&gt;&#xA;            &lt;span id=&#34;code-editor-1-run-status&#34; class=&#34;code-editor-sr-only&#34; aria-live=&#34;polite&#34; aria-atomic=&#34;true&#34;&gt;&lt;/span&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;div class=&#34;code-editor-workspace&#34;&gt;&#xA;            &lt;div id=&#34;code-editor-1-grid&#34; class=&#34;code-editor-grid&#34; style=&#34;grid-template-columns: 1fr;&#34;&gt;&#xA;                &lt;div id=&#34;code-editor-1-source-pane&#34; class=&#34;code-editor-pane code-editor-pane-source&#34;&gt;&#xA;                    &lt;div class=&#34;code-editor-pane-header&#34;&gt;&#xA;                        &lt;span&gt;query.fql&lt;/span&gt;&#xA;                        &lt;div class=&#34;code-editor-pane-header-actions&#34;&gt;&#xA;                            &lt;span&gt;FQL&lt;/span&gt;&#xA;                            &lt;button id=&#34;code-editor-1-copy-button&#34; class=&#34;code-editor-pane-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;                        &lt;/div&gt;&#xA;                    &lt;/div&gt;&#xA;                    &lt;div id=&#34;code-editor-1-text&#34; class=&#34;code-editor-text&#34; data-auto-height=&#34;true&#34;&gt;func double(x) =&amp;gt; x * 2&#xA;&#xA;return double(21)&lt;/div&gt;&#xA;                &lt;/div&gt;&#xA;&#xA;                &lt;div id=&#34;code-editor-1-result-pane&#34; class=&#34;code-editor-pane code-editor-pane-result&#34; hidden&gt;&#xA;                    &lt;div class=&#34;code-editor-pane-header&#34;&gt;&#xA;                        &lt;span&gt;result.json&lt;/span&gt;&#xA;                        &lt;div class=&#34;code-editor-pane-header-actions&#34;&gt;&#xA;                            &lt;span&gt;output&lt;/span&gt;&#xA;                            &lt;button id=&#34;code-editor-1-result-close-button&#34; class=&#34;code-editor-pane-button&#34; type=&#34;button&#34; aria-controls=&#34;code-editor-1-result-pane&#34;&gt;Close&lt;/button&gt;&#xA;                        &lt;/div&gt;&#xA;                    &lt;/div&gt;&#xA;                    &lt;div id=&#34;code-editor-1-result&#34; class=&#34;code-editor-result&#34; data-auto-height=&#34;true&#34;&gt;&lt;/div&gt;&#xA;                &lt;/div&gt;&#xA;            &lt;/div&gt;&#xA;&#xA;            &lt;aside id=&#34;code-editor-1-params-drawer&#34; class=&#34;code-editor-params-drawer&#34; aria-labelledby=&#34;code-editor-1-params-title&#34; hidden&gt;&#xA;                &lt;div class=&#34;code-editor-params-header&#34;&gt;&#xA;                    &lt;div&gt;&#xA;                        &lt;span id=&#34;code-editor-1-params-title&#34; class=&#34;code-editor-params-title&#34;&gt;Query parameters&lt;/span&gt;&#xA;                        &lt;span class=&#34;code-editor-params-description&#34;&gt;Values are parsed as JSON when possible.&lt;/span&gt;&#xA;                    &lt;/div&gt;&#xA;                    &lt;button id=&#34;code-editor-1-params-close-button&#34; class=&#34;code-editor-pane-button&#34; type=&#34;button&#34;&gt;Close&lt;/button&gt;&#xA;                &lt;/div&gt;&#xA;                &lt;div class=&#34;code-editor-params-body&#34;&gt;&#xA;                    &lt;div id=&#34;code-editor-1-params-empty&#34; class=&#34;code-editor-params-empty&#34;&gt;No parameters added.&lt;/div&gt;&#xA;                    &lt;div id=&#34;code-editor-1-params-rows&#34; class=&#34;code-editor-params-rows&#34;&gt;&lt;/div&gt;&#xA;                &lt;/div&gt;&#xA;                &lt;div class=&#34;code-editor-params-footer&#34;&gt;&#xA;                    &lt;button id=&#34;code-editor-1-params-add-button&#34; class=&#34;code-editor-params-add-button&#34; type=&#34;button&#34;&gt;Add parameter&lt;/button&gt;&#xA;                &lt;/div&gt;&#xA;            &lt;/aside&gt;&#xA;        &lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            function createEditor(id, mode, useWorker) {&#xA;                const editor = ace.edit(id);&#xA;                editor.setTheme(&#34;ace\/theme\/tomorrow_night&#34;);&#xA;                editor.session.setUseWorker(useWorker);&#xA;                editor.session.setMode(&#34;ace/mode/&#34; + mode);&#xA;                editor.setOptions({&#xA;                    displayIndentGuides: false,&#xA;                    printMargin: false&#xA;                });&#xA;&#xA;                return editor;&#xA;            }&#xA;&#xA;            const btn = document.querySelector(&#39;#code-editor-1-run-button&#39;);&#xA;            const textEditor = createEditor(&#39;code-editor-1-text&#39;, &#39;fql&#39;, true);&#xA;            const resultEditor = createEditor(&#39;code-editor-1-result&#39;, &#39;json&#39;, false);&#xA;            resultEditor.setReadOnly(true);&#xA;            const resultExpandBtn = null;&#xA;            const editorHeader = document.querySelector(&#39;#code-editor-1-header&#39;);&#xA;            const editorWorkspace = document.querySelector(&#39;#code-editor-1-grid&#39;).parentElement;&#xA;            const editorGrid = document.querySelector(&#39;#code-editor-1-grid&#39;);&#xA;            const runProgress = document.querySelector(&#39;#code-editor-1-progress&#39;);&#xA;            const runStatus = document.querySelector(&#39;#code-editor-1-run-status&#39;);&#xA;            const resultPane = document.querySelector(&#39;#code-editor-1-result-pane&#39;);&#xA;            const resultToggleBtn = document.querySelector(&#39;#code-editor-1-result-toggle-button&#39;);&#xA;            const resultCloseBtn = document.querySelector(&#39;#code-editor-1-result-close-button&#39;);&#xA;            const paramsToggleBtn = document.querySelector(&#39;#code-editor-1-params-toggle-button&#39;);&#xA;            const paramsDrawer = document.querySelector(&#39;#code-editor-1-params-drawer&#39;);&#xA;            const paramsCloseBtn = document.querySelector(&#39;#code-editor-1-params-close-button&#39;);&#xA;            const paramsAddBtn = document.querySelector(&#39;#code-editor-1-params-add-button&#39;);&#xA;            const paramsRows = document.querySelector(&#39;#code-editor-1-params-rows&#39;);&#xA;            const paramsEmpty = document.querySelector(&#39;#code-editor-1-params-empty&#39;);&#xA;            let isResultVisible = !resultPane.hidden;&#xA;            let isParamsVisible = !paramsDrawer.hidden;&#xA;&#xA;            function resetResultExpansion() {&#xA;                if (!resultExpandBtn) {&#xA;                    return;&#xA;                }&#xA;&#xA;                isResultExpanded = false;&#xA;                resultExpandBtn.setAttribute(&#39;aria-expanded&#39;, &#39;false&#39;);&#xA;                resultExpandBtn.textContent = &#39;Expand&#39;;&#xA;            }&#xA;&#xA;            function syncEditorLayout() {&#xA;                const sourceHeight = getEditorContentHeight(textEditor);&#xA;                textEditor.container.style.height = `${sourceHeight}px`;&#xA;&#xA;                if (isResultVisible) {&#xA;                    const resultHeight = getEditorContentHeight(resultEditor);&#xA;                    applyResultHeight(resultHeight);&#xA;                }&#xA;&#xA;                textEditor.resize();&#xA;&#xA;                if (isResultVisible) {&#xA;                    resultEditor.resize();&#xA;                }&#xA;            }&#xA;&#xA;            function setResultVisible(nextVisible) {&#xA;                isResultVisible = nextVisible;&#xA;                resultPane.hidden = !nextVisible;&#xA;                resultToggleBtn.setAttribute(&#39;aria-expanded&#39;, nextVisible ? &#39;true&#39; : &#39;false&#39;);&#xA;                editorGrid.style.gridTemplateColumns = nextVisible ? &#39;&#39; : &#39;1fr&#39;;&#xA;&#xA;                if (!nextVisible) {&#xA;                    resetResultExpansion();&#xA;                    syncEditorLayout();&#xA;                    return;&#xA;                }&#xA;&#xA;                window.requestAnimationFrame(() =&gt; {&#xA;                    syncEditorLayout();&#xA;                    resultEditor.resize(true);&#xA;                });&#xA;            }&#xA;&#xA;            resultToggleBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setResultVisible(!isResultVisible);&#xA;            });&#xA;&#xA;            resultCloseBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setResultVisible(false);&#xA;            });&#xA;&#xA;            const collapsedResultHeightStyle = resultEditor.container.style.height;&#xA;            let isResultExpanded = false;&#xA;&#xA;            function getEditorContentHeight(editor) {&#xA;                const lineHeight = editor.renderer.lineHeight || 21;&#xA;                const screenLines = Math.max(editor.session.getScreenLength(), 1);&#xA;&#xA;                return Math.max(screenLines * lineHeight, 48);&#xA;            }&#xA;&#xA;            function getMaxResultHeight(fallbackHeight) {&#xA;                const viewportHeight = window.innerHeight || document.documentElement.clientHeight || fallbackHeight;&#xA;                const rootFontSize = parseFloat(window.getComputedStyle(document.documentElement).fontSize) || 16;&#xA;&#xA;                return Math.min(viewportHeight * 0.45, 32 * rootFontSize);&#xA;            }&#xA;&#xA;            function getCollapsedResultHeight() {&#xA;                return getEditorContentHeight(resultEditor);&#xA;            }&#xA;&#xA;            function getExpandedResultHeight(collapsedHeight) {&#xA;                const lineHeight = resultEditor.renderer.lineHeight || textEditor.renderer.lineHeight || 21;&#xA;                const maxAllowedHeight = getMaxResultHeight(collapsedHeight);&#xA;                const screenLines = Math.max(resultEditor.session.getScreenLength(), 1);&#xA;                const contentHeight = (screenLines * lineHeight) + (lineHeight * 2);&#xA;                const targetHeight = Math.min(contentHeight, maxAllowedHeight);&#xA;&#xA;                return Math.max(collapsedHeight, Math.round(targetHeight));&#xA;            }&#xA;&#xA;            function applyResultHeight(collapsedHeight) {&#xA;                if (resultExpandBtn &amp;&amp; isResultExpanded) {&#xA;                    resultEditor.container.style.height = `${getExpandedResultHeight(collapsedHeight)}px`;&#xA;                } else {&#xA;                    resultEditor.container.style.height = `${Math.min(collapsedHeight, getMaxResultHeight(collapsedHeight))}px`;&#xA;                }&#xA;&#xA;                resultEditor.resize();&#xA;            }&#xA;            textEditor.session.on(&#39;change&#39;, syncEditorLayout);&#xA;&#xA;            if (resultExpandBtn) {&#xA;                resultExpandBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                    isResultExpanded = !isResultExpanded;&#xA;                    resultExpandBtn.setAttribute(&#39;aria-expanded&#39;, isResultExpanded ? &#39;true&#39; : &#39;false&#39;);&#xA;                    resultExpandBtn.textContent = isResultExpanded ? &#39;Collapse&#39; : &#39;Expand&#39;;&#xA;                    syncEditorLayout();&#xA;                });&#xA;            }&#xA;&#xA;            function syncParamsEmptyState() {&#xA;                paramsEmpty.hidden = paramsRows.children.length &gt; 0;&#xA;            }&#xA;&#xA;            function formatParamValue(value) {&#xA;                return typeof value === &#39;string&#39; ? value : JSON.stringify(value);&#xA;            }&#xA;&#xA;            function createParamRow(name, value) {&#xA;                const row = document.createElement(&#39;div&#39;);&#xA;                row.className = &#39;code-editor-param-row&#39;;&#xA;&#xA;                const nameInput = document.createElement(&#39;input&#39;);&#xA;                nameInput.className = &#39;code-editor-param-input code-editor-param-name&#39;;&#xA;                nameInput.type = &#39;text&#39;;&#xA;                nameInput.placeholder = &#39;name&#39;;&#xA;                nameInput.setAttribute(&#39;aria-label&#39;, &#39;Parameter name&#39;);&#xA;                nameInput.value = name || &#39;&#39;;&#xA;&#xA;                const separator = document.createElement(&#39;span&#39;);&#xA;                separator.className = &#39;code-editor-param-separator&#39;;&#xA;                separator.setAttribute(&#39;aria-hidden&#39;, &#39;true&#39;);&#xA;                separator.textContent = &#39;:&#39;;&#xA;&#xA;                const valueInput = document.createElement(&#39;input&#39;);&#xA;                valueInput.className = &#39;code-editor-param-input code-editor-param-value&#39;;&#xA;                valueInput.type = &#39;text&#39;;&#xA;                valueInput.placeholder = &#39;value&#39;;&#xA;                valueInput.setAttribute(&#39;aria-label&#39;, &#39;Parameter value&#39;);&#xA;                valueInput.value = value === undefined ? &#39;&#39; : formatParamValue(value);&#xA;&#xA;                const removeBtn = document.createElement(&#39;button&#39;);&#xA;                removeBtn.className = &#39;code-editor-param-remove-button&#39;;&#xA;                removeBtn.type = &#39;button&#39;;&#xA;                removeBtn.setAttribute(&#39;aria-label&#39;, `Remove parameter ${name || &#39;row&#39;}`);&#xA;                removeBtn.textContent = &#39;Remove&#39;;&#xA;                removeBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                    row.remove();&#xA;                    syncParamsEmptyState();&#xA;                });&#xA;&#xA;                row.append(nameInput, separator, valueInput, removeBtn);&#xA;                paramsRows.appendChild(row);&#xA;                syncParamsEmptyState();&#xA;&#xA;                return nameInput;&#xA;            }&#xA;&#xA;            function setParamsVisible(nextVisible) {&#xA;                isParamsVisible = nextVisible;&#xA;                paramsDrawer.hidden = !nextVisible;&#xA;                paramsToggleBtn.setAttribute(&#39;aria-expanded&#39;, nextVisible ? &#39;true&#39; : &#39;false&#39;);&#xA;                editorWorkspace.classList.toggle(&#39;is-params-open&#39;, nextVisible);&#xA;&#xA;                if (nextVisible) {&#xA;                    paramsCloseBtn.focus();&#xA;                } else {&#xA;                    paramsToggleBtn.focus();&#xA;                }&#xA;            }&#xA;&#xA;            function setParamsControlsDisabled(disabled) {&#xA;                paramsToggleBtn.disabled = disabled;&#xA;                paramsDrawer.querySelectorAll(&#39;button, input&#39;).forEach((control) =&gt; {&#xA;                    control.disabled = disabled;&#xA;                });&#xA;            }&#xA;&#xA;            function parseParamValue(value) {&#xA;                try {&#xA;                    return JSON.parse(value);&#xA;                } catch (err) {&#xA;                    return value;&#xA;                }&#xA;            }&#xA;&#xA;            function getParams() {&#xA;                return Array.from(paramsRows.querySelectorAll(&#39;.code-editor-param-row&#39;)).reduce((params, row) =&gt; {&#xA;                    const name = row.querySelector(&#39;.code-editor-param-name&#39;).value.trim();&#xA;&#xA;                    if (name) {&#xA;                        const value = row.querySelector(&#39;.code-editor-param-value&#39;).value;&#xA;                        params[name] = parseParamValue(value);&#xA;                    }&#xA;&#xA;                    return params;&#xA;                }, {});&#xA;            }&#xA;&#xA;            const initialParams = JSON.parse(&#34;{}&#34;);&#xA;&#xA;            if (initialParams &amp;&amp; typeof initialParams === &#39;object&#39; &amp;&amp; !Array.isArray(initialParams)) {&#xA;                Object.entries(initialParams).forEach(([name, value]) =&gt; {&#xA;                    createParamRow(name, value);&#xA;                });&#xA;            }&#xA;&#xA;            syncParamsEmptyState();&#xA;&#xA;            paramsToggleBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setParamsVisible(!isParamsVisible);&#xA;            });&#xA;&#xA;            paramsCloseBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setParamsVisible(false);&#xA;            });&#xA;&#xA;            paramsAddBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                createParamRow(&#39;&#39;, &#39;&#39;).focus();&#xA;            });&#xA;&#xA;            window.addEventListener(&#39;resize&#39;, syncEditorLayout);&#xA;            syncEditorLayout();&#xA;&#xA;            function setContent(editor, content) {&#xA;                editor.setValue(content, -1);&#xA;            }&#xA;                const copyClipboardEl = document.querySelector(&#39;#code-editor-1-copy-clipboard&#39;);&#xA;                const copyBtn = document.querySelector(&#39;#code-editor-1-copy-button&#39;);&#xA;&#xA;                function copyTextWithFallback(content) {&#xA;                    copyClipboardEl.value = content;&#xA;                    copyClipboardEl.focus();&#xA;                    copyClipboardEl.select();&#xA;&#xA;                    if (!document.execCommand(&#39;copy&#39;)) {&#xA;                        throw new Error(&#39;Could not copy source to the clipboard&#39;);&#xA;                    }&#xA;                }&#xA;&#xA;                function copyTextToClipboard(content) {&#xA;                    if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                        return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                            copyTextWithFallback(content);&#xA;                        });&#xA;                    }&#xA;&#xA;                    copyTextWithFallback(content);&#xA;&#xA;                    return Promise.resolve();&#xA;                }&#xA;&#xA;                copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                    copyTextToClipboard(textEditor.getValue())&#xA;                        .then(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copied&#39;;&#xA;                            window.setTimeout(() =&gt; {&#xA;                                copyBtn.textContent = &#39;Copy&#39;;&#xA;                            }, 1200);&#xA;                        })&#xA;                        .catch((err) =&gt; {&#xA;                            console.error(&#39;Failed to copy source&#39;);&#xA;                            console.error(err);&#xA;                        });&#xA;                });&#xA;&#xA;            let isRunning = false;&#xA;&#xA;            function onStart() {&#xA;                isRunning = true;&#xA;                textEditor.setReadOnly(true);&#xA;                runProgress.hidden = false;&#xA;                runStatus.textContent = &#39;Running query&#39;;&#xA;                editorHeader.setAttribute(&#39;aria-busy&#39;, &#39;true&#39;);&#xA;                editorGrid.setAttribute(&#39;aria-busy&#39;, &#39;true&#39;);&#xA;                btn.classList.add(&#39;is-running&#39;);&#xA;                btn.setAttribute(&#39;aria-busy&#39;, &#39;true&#39;);&#xA;                btn.setAttribute(&#39;aria-label&#39;, &#39;Running query&#39;);&#xA;                btn.disabled = true;&#xA;                setParamsControlsDisabled(true);&#xA;            }&#xA;&#xA;            function onEnd(result) {&#xA;                isRunning = false;&#xA;                textEditor.setReadOnly(false);&#xA;                runProgress.hidden = true;&#xA;                runStatus.textContent = &#39;&#39;;&#xA;                editorHeader.setAttribute(&#39;aria-busy&#39;, &#39;false&#39;);&#xA;                editorGrid.setAttribute(&#39;aria-busy&#39;, &#39;false&#39;);&#xA;                btn.classList.remove(&#39;is-running&#39;);&#xA;                btn.setAttribute(&#39;aria-busy&#39;, &#39;false&#39;);&#xA;                btn.setAttribute(&#39;aria-label&#39;, &#39;Run query&#39;);&#xA;                btn.disabled = false;&#xA;                setParamsControlsDisabled(false);&#xA;&#xA;                setContent(resultEditor, result);&#xA;                setResultVisible(true);&#xA;            }&#xA;&#xA;            btn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                if (isRunning) {&#xA;                    return;&#xA;                }&#xA;&#xA;                const body = {&#xA;                        text: textEditor.getValue(),&#xA;                        params: getParams()&#xA;                };&#xA;                const url = &#34;https:\/\/worker-v2-811908774949.us-east1.run.app&#34;;&#xA;&#xA;                onStart();&#xA;                fetch(url, {&#xA;                    method: &#39;post&#39;,&#xA;                    cache: &#39;no-cache&#39;,&#xA;                    headers: {&#xA;                        &#39;Content-Type&#39;: &#39;application/json; charset=utf-8&#39;&#xA;                    },&#xA;                    signal: AbortSignal.timeout(1000 * 60), &#xA;                    body: JSON.stringify(body)&#xA;                })&#xA;                    .then(r =&gt; {&#xA;                        if (r.status === 200) {&#xA;                            return r.json()&#xA;                        }&#xA;                        &#xA;                        if (r.status === 426) {&#xA;                            throw new Error(`Too many requests. Try again later.`);&#xA;                        }&#xA;                        &#xA;                        if (r.status === 400) {&#xA;                            return r.json().then((data) =&gt; {&#xA;                                if (data.details) {&#xA;                                    throw new Error(data.details);&#xA;                                }&#xA;                                &#xA;                                throw new Error(data.error);&#xA;                            });&#xA;                        }&#xA;                        &#xA;                        throw new Error(`Unexpected error. Try again later.`);&#xA;                    })&#xA;                    .then((data) =&gt; {&#xA;                        onEnd(JSON.stringify(data, null, 4));&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        onEnd(err.message);&#xA;                    });&#xA;            });&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;h2 id=&#34;declaration&#34;&gt;Declaration&lt;/h2&gt;&#xA;&lt;p&gt;A function declaration begins with the &lt;code&gt;func&lt;/code&gt; keyword, followed by a name, a parameter list in parentheses, and a body.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Process existing HTML</title>
				<link>https://ferretlang.org/docs/guides/existing-html/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/guides/existing-html/</guid>
				<description>&lt;h1 id=&#34;process-existing-html&#34;&gt;Process existing HTML&lt;/h1&gt;&#xA;&lt;p&gt;Use &lt;code&gt;web::html::parse&lt;/code&gt; when your Go application already has the HTML. The content might come from &lt;code&gt;os.ReadFile&lt;/code&gt;, a database, an HTTP response fetched by the host, or another service. Ferret can parse, query, and modify that content without fetching it again.&lt;/p&gt;&#xA;&lt;p&gt;This workflow does not require CDP. Configure the HTML module with the in-process &lt;code&gt;memory&lt;/code&gt; driver and pass the HTML through a session parameter.&lt;/p&gt;&#xA;&lt;h2 id=&#34;parse-supplied-html&#34;&gt;Parse supplied HTML&lt;/h2&gt;&#xA;&lt;p&gt;Keep the FQL source stable and reference the supplied content as &lt;code&gt;@html&lt;/code&gt;:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Consumable output</title>
				<link>https://ferretlang.org/docs/migrations/consumable-output/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/migrations/consumable-output/</guid>
				<description>&lt;h1 id=&#34;migrate-to-consumable-output&#34;&gt;Migrate to consumable output&lt;/h1&gt;&#xA;&lt;p&gt;In Core &lt;code&gt;v2.0.0-alpha.62&lt;/code&gt; and Universal API &lt;code&gt;v1.0.0-alpha.21&lt;/code&gt;, Run returns a consumable handle, and collected data lives in &lt;code&gt;Content&lt;/code&gt;. Use the &lt;a href=&#34;https://ferretlang.org/docs/embedding/go/getting-started/#installation&#34;&gt;Go installation instructions&lt;/a&gt; for these examples. For remote runtimes, use the published dependency set in the &lt;a href=&#34;https://ferretlang.org/docs/embedding/wire/#run-a-host-and-client&#34;&gt;Wire compatibility table&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;This migration changes the Go output contract, error timing, and ownership. It does not change FQL semantics or require rewriting queries. The &lt;a href=&#34;https://ferretlang.org/docs/embedding/go/output/&#34;&gt;Output reference&lt;/a&gt; owns the complete lifecycle rules.&lt;/p&gt;&#xA;&lt;h2 id=&#34;replace-buffered-field-access&#34;&gt;Replace buffered field access&lt;/h2&gt;&#xA;&lt;p&gt;Previously, Native and UAPI returned &lt;code&gt;*Output&lt;/code&gt; structs with &lt;code&gt;Content&lt;/code&gt; and &lt;code&gt;ContentType&lt;/code&gt; fields:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Deployment</title>
				<link>https://ferretlang.org/docs/tools/worker/deployment/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/tools/worker/deployment/</guid>
				<description>&lt;h1 id=&#34;deployment&#34;&gt;Deployment&lt;/h1&gt;&#xA;&lt;p&gt;Worker can run from a Docker image, a release binary, or a local source build. Docker is the usual deployment path when scripts need the CDP browser driver, because the Worker image includes a Chromium runtime.&lt;/p&gt;&#xA;&lt;h2 id=&#34;docker&#34;&gt;Docker&lt;/h2&gt;&#xA;&lt;p&gt;Worker images are published to Docker Hub and GitHub Container Registry.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor terminal-shortcode&#34;&gt;&#xA;    &lt;textarea id=&#34;terminal-12-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;docker run --rm -p 8080:8080 montferret/worker:2.0.0-rc.32&lt;/textarea&gt;&#xA;&#xA;    &lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;terminal&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;button id=&#34;terminal-12-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;pre id=&#34;terminal-12-content&#34; class=&#34;terminal-body&#34;&gt;&lt;code&gt;&lt;span class=&#34;terminal-row&#34;&gt;&lt;span class=&#34;terminal-prompt&#34; aria-hidden=&#34;true&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;terminal-command&#34;&gt;docker run --rm -p 8080:8080 montferret/worker:2.0.0-rc.32&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const copyBtn = document.querySelector(&#39;#terminal-12-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#terminal-12-copy-clipboard&#39;);&#xA;            const terminalContent = copyClipboardEl.value;&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy terminal commands to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(terminalContent)&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy terminal commands&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor terminal-shortcode&#34;&gt;&#xA;    &lt;textarea id=&#34;terminal-13-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;docker run --rm -p 8080:8080 ghcr.io/montferret/worker:2.0.0-rc.32&lt;/textarea&gt;&#xA;&#xA;    &lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;terminal&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;button id=&#34;terminal-13-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;pre id=&#34;terminal-13-content&#34; class=&#34;terminal-body&#34;&gt;&lt;code&gt;&lt;span class=&#34;terminal-row&#34;&gt;&lt;span class=&#34;terminal-prompt&#34; aria-hidden=&#34;true&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;terminal-command&#34;&gt;docker run --rm -p 8080:8080 ghcr.io/montferret/worker:2.0.0-rc.32&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const copyBtn = document.querySelector(&#39;#terminal-13-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#terminal-13-copy-clipboard&#39;);&#xA;            const terminalContent = copyClipboardEl.value;&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy terminal commands to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(terminalContent)&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy terminal commands&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;Both commands pin the documented release for repeatable deployments. The release image starts Chromium through the image entrypoint and then starts Worker on port &lt;code&gt;8080&lt;/code&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Develop a module</title>
				<link>https://ferretlang.org/docs/modules/develop/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/modules/develop/</guid>
				<description>&lt;h1 id=&#34;develop-a-module&#34;&gt;Develop a module&lt;/h1&gt;&#xA;&lt;p&gt;Use &lt;code&gt;ferret mod init&lt;/code&gt; to create a standalone Go project with a Ferret module manifest, starter registration code, and a small package layout. The command creates the project locally without downloading dependencies.&lt;/p&gt;&#xA;&lt;h2 id=&#34;use-the-guided-initializer&#34;&gt;Use the guided initializer&lt;/h2&gt;&#xA;&lt;p&gt;Run the command without arguments to start the interactive flow:&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor terminal-shortcode is-command&#34;&gt;&#xA;    &lt;textarea id=&#34;terminal-5-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;ferret mod init&lt;/textarea&gt;&#xA;&#xA;    &lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;terminal&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;button id=&#34;terminal-5-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;pre id=&#34;terminal-5-content&#34; class=&#34;terminal-body&#34;&gt;&lt;code&gt;&lt;span class=&#34;terminal-row&#34;&gt;&lt;span class=&#34;terminal-prompt&#34; aria-hidden=&#34;true&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;terminal-command&#34;&gt;ferret mod init&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const copyBtn = document.querySelector(&#39;#terminal-5-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#terminal-5-copy-clipboard&#39;);&#xA;            const terminalContent = copyClipboardEl.value;&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy terminal commands to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(terminalContent)&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy terminal commands&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;The initializer explains and prompts for:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Executing Ferret</title>
				<link>https://ferretlang.org/docs/embedding/go/executing/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/embedding/go/executing/</guid>
				<description>&lt;h1 id=&#34;executing-ferret&#34;&gt;Executing Ferret&lt;/h1&gt;&#xA;&lt;p&gt;Embedding Ferret means importing the &lt;code&gt;github.com/MontFerret/ferret/v2&lt;/code&gt; module and using its Go API to compile and execute FQL queries inside your own application.&lt;/p&gt;&#xA;&lt;p&gt;The host application stays in control: it decides which functions are available, which parameters are passed in, which standard library groups are loaded, and which modules extend the runtime. Scripts written in FQL describe the extraction, transformation, or automation logic without needing access to the rest of the application.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Executing Ferret</title>
				<link>https://ferretlang.org/docs/embedding/javascript/executing/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/embedding/javascript/executing/</guid>
				<description>&lt;h1 id=&#34;executing-ferret&#34;&gt;Executing Ferret&lt;/h1&gt;&#xA;&lt;p&gt;Engines and plans can run a program in a temporary session. Create a session explicitly to reuse its parameters.&lt;/p&gt;&#xA;&lt;div class=&#34;table-scroll&#34; role=&#34;region&#34; aria-label=&#34;Scrollable table&#34; tabindex=&#34;0&#34;&gt;&#xA;    &lt;table&gt;&#xA;        &lt;thead&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;th&gt;Object&lt;/th&gt;&#xA;                        &lt;th&gt;Responsibility&lt;/th&gt;&#xA;                &lt;/tr&gt;&#xA;        &lt;/thead&gt;&#xA;        &lt;tbody&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;Engine&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Owns one Ferret WASM runtime and its registered JavaScript functions and modules.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;Plan&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Holds a compiled FQL program that can be reused.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;Session&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Holds one execution context with captured parameters.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;Output&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Returned by &lt;code&gt;run()&lt;/code&gt;. Consume it once or close it to discard unread output.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;        &lt;/tbody&gt;&#xA;    &lt;/table&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;All creation and execution operations are asynchronous.&lt;/p&gt;</description>
			</item>
			<item>
				<title>For Loops</title>
				<link>https://ferretlang.org/docs/language/control-flow/for/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/language/control-flow/for/</guid>
				<description>&lt;h1 id=&#34;for-loops&#34;&gt;For Loops&lt;/h1&gt;&#xA;&lt;p&gt;A &lt;code&gt;for&lt;/code&gt; loop evaluates its body once for each item produced by a source. It can collect one returned value per iteration into an array, or run only for side effects. It is the primary iteration construct in FQL.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor is-horizontal is-auto-height&#34;&gt;&#xA;    &lt;textarea id=&#34;code-editor-1-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;&lt;/textarea&gt;&#xA;&#xA;    &lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div id=&#34;code-editor-1-header&#34; class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;example.fql&lt;/span&gt;&#xA;                &lt;small&gt;Ferret v2&lt;/small&gt;&#xA;            &lt;/div&gt;&#xA;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;button id=&#34;code-editor-1-result-toggle-button&#34; class=&#34;button is-outlined is-light code-editor-button&#34; type=&#34;button&#34; aria-expanded=&#34;false&#34; aria-controls=&#34;code-editor-1-result-pane&#34;&gt;Output&lt;/button&gt;&#xA;                &lt;button id=&#34;code-editor-1-params-toggle-button&#34; class=&#34;button is-outlined is-light code-editor-button&#34; type=&#34;button&#34; aria-expanded=&#34;false&#34; aria-controls=&#34;code-editor-1-params-drawer&#34;&gt;Params&lt;/button&gt;&#xA;                &lt;button id=&#34;code-editor-1-run-button&#34; class=&#34;run button is-outlined is-light code-editor-button&#34; type=&#34;button&#34; aria-label=&#34;Run query&#34;&gt;&#xA;                    &lt;span class=&#34;code-editor-run-label&#34;&gt;Run&lt;/span&gt;&#xA;                    &lt;span id=&#34;code-editor-1-run-button-spinner&#34; class=&#34;code-editor-run-spinner&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div id=&#34;code-editor-1-progress&#34; class=&#34;code-editor-progress&#34; role=&#34;progressbar&#34; aria-label=&#34;Running query&#34; hidden&gt;&lt;/div&gt;&#xA;            &lt;span id=&#34;code-editor-1-run-status&#34; class=&#34;code-editor-sr-only&#34; aria-live=&#34;polite&#34; aria-atomic=&#34;true&#34;&gt;&lt;/span&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;div class=&#34;code-editor-workspace&#34;&gt;&#xA;            &lt;div id=&#34;code-editor-1-grid&#34; class=&#34;code-editor-grid&#34; style=&#34;grid-template-columns: 1fr;&#34;&gt;&#xA;                &lt;div id=&#34;code-editor-1-source-pane&#34; class=&#34;code-editor-pane code-editor-pane-source&#34;&gt;&#xA;                    &lt;div class=&#34;code-editor-pane-header&#34;&gt;&#xA;                        &lt;span&gt;query.fql&lt;/span&gt;&#xA;                        &lt;div class=&#34;code-editor-pane-header-actions&#34;&gt;&#xA;                            &lt;span&gt;FQL&lt;/span&gt;&#xA;                            &lt;button id=&#34;code-editor-1-copy-button&#34; class=&#34;code-editor-pane-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;                        &lt;/div&gt;&#xA;                    &lt;/div&gt;&#xA;                    &lt;div id=&#34;code-editor-1-text&#34; class=&#34;code-editor-text&#34; data-auto-height=&#34;true&#34;&gt;return for n in [1, 2, 3, 4] {&#xA;    return n * 2&#xA;}&lt;/div&gt;&#xA;                &lt;/div&gt;&#xA;&#xA;                &lt;div id=&#34;code-editor-1-result-pane&#34; class=&#34;code-editor-pane code-editor-pane-result&#34; hidden&gt;&#xA;                    &lt;div class=&#34;code-editor-pane-header&#34;&gt;&#xA;                        &lt;span&gt;result.json&lt;/span&gt;&#xA;                        &lt;div class=&#34;code-editor-pane-header-actions&#34;&gt;&#xA;                            &lt;span&gt;output&lt;/span&gt;&#xA;                            &lt;button id=&#34;code-editor-1-result-close-button&#34; class=&#34;code-editor-pane-button&#34; type=&#34;button&#34; aria-controls=&#34;code-editor-1-result-pane&#34;&gt;Close&lt;/button&gt;&#xA;                        &lt;/div&gt;&#xA;                    &lt;/div&gt;&#xA;                    &lt;div id=&#34;code-editor-1-result&#34; class=&#34;code-editor-result&#34; data-auto-height=&#34;true&#34;&gt;&lt;/div&gt;&#xA;                &lt;/div&gt;&#xA;            &lt;/div&gt;&#xA;&#xA;            &lt;aside id=&#34;code-editor-1-params-drawer&#34; class=&#34;code-editor-params-drawer&#34; aria-labelledby=&#34;code-editor-1-params-title&#34; hidden&gt;&#xA;                &lt;div class=&#34;code-editor-params-header&#34;&gt;&#xA;                    &lt;div&gt;&#xA;                        &lt;span id=&#34;code-editor-1-params-title&#34; class=&#34;code-editor-params-title&#34;&gt;Query parameters&lt;/span&gt;&#xA;                        &lt;span class=&#34;code-editor-params-description&#34;&gt;Values are parsed as JSON when possible.&lt;/span&gt;&#xA;                    &lt;/div&gt;&#xA;                    &lt;button id=&#34;code-editor-1-params-close-button&#34; class=&#34;code-editor-pane-button&#34; type=&#34;button&#34;&gt;Close&lt;/button&gt;&#xA;                &lt;/div&gt;&#xA;                &lt;div class=&#34;code-editor-params-body&#34;&gt;&#xA;                    &lt;div id=&#34;code-editor-1-params-empty&#34; class=&#34;code-editor-params-empty&#34;&gt;No parameters added.&lt;/div&gt;&#xA;                    &lt;div id=&#34;code-editor-1-params-rows&#34; class=&#34;code-editor-params-rows&#34;&gt;&lt;/div&gt;&#xA;                &lt;/div&gt;&#xA;                &lt;div class=&#34;code-editor-params-footer&#34;&gt;&#xA;                    &lt;button id=&#34;code-editor-1-params-add-button&#34; class=&#34;code-editor-params-add-button&#34; type=&#34;button&#34;&gt;Add parameter&lt;/button&gt;&#xA;                &lt;/div&gt;&#xA;            &lt;/aside&gt;&#xA;        &lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            function createEditor(id, mode, useWorker) {&#xA;                const editor = ace.edit(id);&#xA;                editor.setTheme(&#34;ace\/theme\/tomorrow_night&#34;);&#xA;                editor.session.setUseWorker(useWorker);&#xA;                editor.session.setMode(&#34;ace/mode/&#34; + mode);&#xA;                editor.setOptions({&#xA;                    displayIndentGuides: false,&#xA;                    printMargin: false&#xA;                });&#xA;&#xA;                return editor;&#xA;            }&#xA;&#xA;            const btn = document.querySelector(&#39;#code-editor-1-run-button&#39;);&#xA;            const textEditor = createEditor(&#39;code-editor-1-text&#39;, &#39;fql&#39;, true);&#xA;            const resultEditor = createEditor(&#39;code-editor-1-result&#39;, &#39;json&#39;, false);&#xA;            resultEditor.setReadOnly(true);&#xA;            const resultExpandBtn = null;&#xA;            const editorHeader = document.querySelector(&#39;#code-editor-1-header&#39;);&#xA;            const editorWorkspace = document.querySelector(&#39;#code-editor-1-grid&#39;).parentElement;&#xA;            const editorGrid = document.querySelector(&#39;#code-editor-1-grid&#39;);&#xA;            const runProgress = document.querySelector(&#39;#code-editor-1-progress&#39;);&#xA;            const runStatus = document.querySelector(&#39;#code-editor-1-run-status&#39;);&#xA;            const resultPane = document.querySelector(&#39;#code-editor-1-result-pane&#39;);&#xA;            const resultToggleBtn = document.querySelector(&#39;#code-editor-1-result-toggle-button&#39;);&#xA;            const resultCloseBtn = document.querySelector(&#39;#code-editor-1-result-close-button&#39;);&#xA;            const paramsToggleBtn = document.querySelector(&#39;#code-editor-1-params-toggle-button&#39;);&#xA;            const paramsDrawer = document.querySelector(&#39;#code-editor-1-params-drawer&#39;);&#xA;            const paramsCloseBtn = document.querySelector(&#39;#code-editor-1-params-close-button&#39;);&#xA;            const paramsAddBtn = document.querySelector(&#39;#code-editor-1-params-add-button&#39;);&#xA;            const paramsRows = document.querySelector(&#39;#code-editor-1-params-rows&#39;);&#xA;            const paramsEmpty = document.querySelector(&#39;#code-editor-1-params-empty&#39;);&#xA;            let isResultVisible = !resultPane.hidden;&#xA;            let isParamsVisible = !paramsDrawer.hidden;&#xA;&#xA;            function resetResultExpansion() {&#xA;                if (!resultExpandBtn) {&#xA;                    return;&#xA;                }&#xA;&#xA;                isResultExpanded = false;&#xA;                resultExpandBtn.setAttribute(&#39;aria-expanded&#39;, &#39;false&#39;);&#xA;                resultExpandBtn.textContent = &#39;Expand&#39;;&#xA;            }&#xA;&#xA;            function syncEditorLayout() {&#xA;                const sourceHeight = getEditorContentHeight(textEditor);&#xA;                textEditor.container.style.height = `${sourceHeight}px`;&#xA;&#xA;                if (isResultVisible) {&#xA;                    const resultHeight = getEditorContentHeight(resultEditor);&#xA;                    applyResultHeight(resultHeight);&#xA;                }&#xA;&#xA;                textEditor.resize();&#xA;&#xA;                if (isResultVisible) {&#xA;                    resultEditor.resize();&#xA;                }&#xA;            }&#xA;&#xA;            function setResultVisible(nextVisible) {&#xA;                isResultVisible = nextVisible;&#xA;                resultPane.hidden = !nextVisible;&#xA;                resultToggleBtn.setAttribute(&#39;aria-expanded&#39;, nextVisible ? &#39;true&#39; : &#39;false&#39;);&#xA;                editorGrid.style.gridTemplateColumns = nextVisible ? &#39;&#39; : &#39;1fr&#39;;&#xA;&#xA;                if (!nextVisible) {&#xA;                    resetResultExpansion();&#xA;                    syncEditorLayout();&#xA;                    return;&#xA;                }&#xA;&#xA;                window.requestAnimationFrame(() =&gt; {&#xA;                    syncEditorLayout();&#xA;                    resultEditor.resize(true);&#xA;                });&#xA;            }&#xA;&#xA;            resultToggleBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setResultVisible(!isResultVisible);&#xA;            });&#xA;&#xA;            resultCloseBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setResultVisible(false);&#xA;            });&#xA;&#xA;            const collapsedResultHeightStyle = resultEditor.container.style.height;&#xA;            let isResultExpanded = false;&#xA;&#xA;            function getEditorContentHeight(editor) {&#xA;                const lineHeight = editor.renderer.lineHeight || 21;&#xA;                const screenLines = Math.max(editor.session.getScreenLength(), 1);&#xA;&#xA;                return Math.max(screenLines * lineHeight, 48);&#xA;            }&#xA;&#xA;            function getMaxResultHeight(fallbackHeight) {&#xA;                const viewportHeight = window.innerHeight || document.documentElement.clientHeight || fallbackHeight;&#xA;                const rootFontSize = parseFloat(window.getComputedStyle(document.documentElement).fontSize) || 16;&#xA;&#xA;                return Math.min(viewportHeight * 0.45, 32 * rootFontSize);&#xA;            }&#xA;&#xA;            function getCollapsedResultHeight() {&#xA;                return getEditorContentHeight(resultEditor);&#xA;            }&#xA;&#xA;            function getExpandedResultHeight(collapsedHeight) {&#xA;                const lineHeight = resultEditor.renderer.lineHeight || textEditor.renderer.lineHeight || 21;&#xA;                const maxAllowedHeight = getMaxResultHeight(collapsedHeight);&#xA;                const screenLines = Math.max(resultEditor.session.getScreenLength(), 1);&#xA;                const contentHeight = (screenLines * lineHeight) + (lineHeight * 2);&#xA;                const targetHeight = Math.min(contentHeight, maxAllowedHeight);&#xA;&#xA;                return Math.max(collapsedHeight, Math.round(targetHeight));&#xA;            }&#xA;&#xA;            function applyResultHeight(collapsedHeight) {&#xA;                if (resultExpandBtn &amp;&amp; isResultExpanded) {&#xA;                    resultEditor.container.style.height = `${getExpandedResultHeight(collapsedHeight)}px`;&#xA;                } else {&#xA;                    resultEditor.container.style.height = `${Math.min(collapsedHeight, getMaxResultHeight(collapsedHeight))}px`;&#xA;                }&#xA;&#xA;                resultEditor.resize();&#xA;            }&#xA;            textEditor.session.on(&#39;change&#39;, syncEditorLayout);&#xA;&#xA;            if (resultExpandBtn) {&#xA;                resultExpandBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                    isResultExpanded = !isResultExpanded;&#xA;                    resultExpandBtn.setAttribute(&#39;aria-expanded&#39;, isResultExpanded ? &#39;true&#39; : &#39;false&#39;);&#xA;                    resultExpandBtn.textContent = isResultExpanded ? &#39;Collapse&#39; : &#39;Expand&#39;;&#xA;                    syncEditorLayout();&#xA;                });&#xA;            }&#xA;&#xA;            function syncParamsEmptyState() {&#xA;                paramsEmpty.hidden = paramsRows.children.length &gt; 0;&#xA;            }&#xA;&#xA;            function formatParamValue(value) {&#xA;                return typeof value === &#39;string&#39; ? value : JSON.stringify(value);&#xA;            }&#xA;&#xA;            function createParamRow(name, value) {&#xA;                const row = document.createElement(&#39;div&#39;);&#xA;                row.className = &#39;code-editor-param-row&#39;;&#xA;&#xA;                const nameInput = document.createElement(&#39;input&#39;);&#xA;                nameInput.className = &#39;code-editor-param-input code-editor-param-name&#39;;&#xA;                nameInput.type = &#39;text&#39;;&#xA;                nameInput.placeholder = &#39;name&#39;;&#xA;                nameInput.setAttribute(&#39;aria-label&#39;, &#39;Parameter name&#39;);&#xA;                nameInput.value = name || &#39;&#39;;&#xA;&#xA;                const separator = document.createElement(&#39;span&#39;);&#xA;                separator.className = &#39;code-editor-param-separator&#39;;&#xA;                separator.setAttribute(&#39;aria-hidden&#39;, &#39;true&#39;);&#xA;                separator.textContent = &#39;:&#39;;&#xA;&#xA;                const valueInput = document.createElement(&#39;input&#39;);&#xA;                valueInput.className = &#39;code-editor-param-input code-editor-param-value&#39;;&#xA;                valueInput.type = &#39;text&#39;;&#xA;                valueInput.placeholder = &#39;value&#39;;&#xA;                valueInput.setAttribute(&#39;aria-label&#39;, &#39;Parameter value&#39;);&#xA;                valueInput.value = value === undefined ? &#39;&#39; : formatParamValue(value);&#xA;&#xA;                const removeBtn = document.createElement(&#39;button&#39;);&#xA;                removeBtn.className = &#39;code-editor-param-remove-button&#39;;&#xA;                removeBtn.type = &#39;button&#39;;&#xA;                removeBtn.setAttribute(&#39;aria-label&#39;, `Remove parameter ${name || &#39;row&#39;}`);&#xA;                removeBtn.textContent = &#39;Remove&#39;;&#xA;                removeBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                    row.remove();&#xA;                    syncParamsEmptyState();&#xA;                });&#xA;&#xA;                row.append(nameInput, separator, valueInput, removeBtn);&#xA;                paramsRows.appendChild(row);&#xA;                syncParamsEmptyState();&#xA;&#xA;                return nameInput;&#xA;            }&#xA;&#xA;            function setParamsVisible(nextVisible) {&#xA;                isParamsVisible = nextVisible;&#xA;                paramsDrawer.hidden = !nextVisible;&#xA;                paramsToggleBtn.setAttribute(&#39;aria-expanded&#39;, nextVisible ? &#39;true&#39; : &#39;false&#39;);&#xA;                editorWorkspace.classList.toggle(&#39;is-params-open&#39;, nextVisible);&#xA;&#xA;                if (nextVisible) {&#xA;                    paramsCloseBtn.focus();&#xA;                } else {&#xA;                    paramsToggleBtn.focus();&#xA;                }&#xA;            }&#xA;&#xA;            function setParamsControlsDisabled(disabled) {&#xA;                paramsToggleBtn.disabled = disabled;&#xA;                paramsDrawer.querySelectorAll(&#39;button, input&#39;).forEach((control) =&gt; {&#xA;                    control.disabled = disabled;&#xA;                });&#xA;            }&#xA;&#xA;            function parseParamValue(value) {&#xA;                try {&#xA;                    return JSON.parse(value);&#xA;                } catch (err) {&#xA;                    return value;&#xA;                }&#xA;            }&#xA;&#xA;            function getParams() {&#xA;                return Array.from(paramsRows.querySelectorAll(&#39;.code-editor-param-row&#39;)).reduce((params, row) =&gt; {&#xA;                    const name = row.querySelector(&#39;.code-editor-param-name&#39;).value.trim();&#xA;&#xA;                    if (name) {&#xA;                        const value = row.querySelector(&#39;.code-editor-param-value&#39;).value;&#xA;                        params[name] = parseParamValue(value);&#xA;                    }&#xA;&#xA;                    return params;&#xA;                }, {});&#xA;            }&#xA;&#xA;            const initialParams = JSON.parse(&#34;{}&#34;);&#xA;&#xA;            if (initialParams &amp;&amp; typeof initialParams === &#39;object&#39; &amp;&amp; !Array.isArray(initialParams)) {&#xA;                Object.entries(initialParams).forEach(([name, value]) =&gt; {&#xA;                    createParamRow(name, value);&#xA;                });&#xA;            }&#xA;&#xA;            syncParamsEmptyState();&#xA;&#xA;            paramsToggleBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setParamsVisible(!isParamsVisible);&#xA;            });&#xA;&#xA;            paramsCloseBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setParamsVisible(false);&#xA;            });&#xA;&#xA;            paramsAddBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                createParamRow(&#39;&#39;, &#39;&#39;).focus();&#xA;            });&#xA;&#xA;            window.addEventListener(&#39;resize&#39;, syncEditorLayout);&#xA;            syncEditorLayout();&#xA;&#xA;            function setContent(editor, content) {&#xA;                editor.setValue(content, -1);&#xA;            }&#xA;                const copyClipboardEl = document.querySelector(&#39;#code-editor-1-copy-clipboard&#39;);&#xA;                const copyBtn = document.querySelector(&#39;#code-editor-1-copy-button&#39;);&#xA;&#xA;                function copyTextWithFallback(content) {&#xA;                    copyClipboardEl.value = content;&#xA;                    copyClipboardEl.focus();&#xA;                    copyClipboardEl.select();&#xA;&#xA;                    if (!document.execCommand(&#39;copy&#39;)) {&#xA;                        throw new Error(&#39;Could not copy source to the clipboard&#39;);&#xA;                    }&#xA;                }&#xA;&#xA;                function copyTextToClipboard(content) {&#xA;                    if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                        return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                            copyTextWithFallback(content);&#xA;                        });&#xA;                    }&#xA;&#xA;                    copyTextWithFallback(content);&#xA;&#xA;                    return Promise.resolve();&#xA;                }&#xA;&#xA;                copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                    copyTextToClipboard(textEditor.getValue())&#xA;                        .then(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copied&#39;;&#xA;                            window.setTimeout(() =&gt; {&#xA;                                copyBtn.textContent = &#39;Copy&#39;;&#xA;                            }, 1200);&#xA;                        })&#xA;                        .catch((err) =&gt; {&#xA;                            console.error(&#39;Failed to copy source&#39;);&#xA;                            console.error(err);&#xA;                        });&#xA;                });&#xA;&#xA;            let isRunning = false;&#xA;&#xA;            function onStart() {&#xA;                isRunning = true;&#xA;                textEditor.setReadOnly(true);&#xA;                runProgress.hidden = false;&#xA;                runStatus.textContent = &#39;Running query&#39;;&#xA;                editorHeader.setAttribute(&#39;aria-busy&#39;, &#39;true&#39;);&#xA;                editorGrid.setAttribute(&#39;aria-busy&#39;, &#39;true&#39;);&#xA;                btn.classList.add(&#39;is-running&#39;);&#xA;                btn.setAttribute(&#39;aria-busy&#39;, &#39;true&#39;);&#xA;                btn.setAttribute(&#39;aria-label&#39;, &#39;Running query&#39;);&#xA;                btn.disabled = true;&#xA;                setParamsControlsDisabled(true);&#xA;            }&#xA;&#xA;            function onEnd(result) {&#xA;                isRunning = false;&#xA;                textEditor.setReadOnly(false);&#xA;                runProgress.hidden = true;&#xA;                runStatus.textContent = &#39;&#39;;&#xA;                editorHeader.setAttribute(&#39;aria-busy&#39;, &#39;false&#39;);&#xA;                editorGrid.setAttribute(&#39;aria-busy&#39;, &#39;false&#39;);&#xA;                btn.classList.remove(&#39;is-running&#39;);&#xA;                btn.setAttribute(&#39;aria-busy&#39;, &#39;false&#39;);&#xA;                btn.setAttribute(&#39;aria-label&#39;, &#39;Run query&#39;);&#xA;                btn.disabled = false;&#xA;                setParamsControlsDisabled(false);&#xA;&#xA;                setContent(resultEditor, result);&#xA;                setResultVisible(true);&#xA;            }&#xA;&#xA;            btn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                if (isRunning) {&#xA;                    return;&#xA;                }&#xA;&#xA;                const body = {&#xA;                        text: textEditor.getValue(),&#xA;                        params: getParams()&#xA;                };&#xA;                const url = &#34;https:\/\/worker-v2-811908774949.us-east1.run.app&#34;;&#xA;&#xA;                onStart();&#xA;                fetch(url, {&#xA;                    method: &#39;post&#39;,&#xA;                    cache: &#39;no-cache&#39;,&#xA;                    headers: {&#xA;                        &#39;Content-Type&#39;: &#39;application/json; charset=utf-8&#39;&#xA;                    },&#xA;                    signal: AbortSignal.timeout(1000 * 60), &#xA;                    body: JSON.stringify(body)&#xA;                })&#xA;                    .then(r =&gt; {&#xA;                        if (r.status === 200) {&#xA;                            return r.json()&#xA;                        }&#xA;                        &#xA;                        if (r.status === 426) {&#xA;                            throw new Error(`Too many requests. Try again later.`);&#xA;                        }&#xA;                        &#xA;                        if (r.status === 400) {&#xA;                            return r.json().then((data) =&gt; {&#xA;                                if (data.details) {&#xA;                                    throw new Error(data.details);&#xA;                                }&#xA;                                &#xA;                                throw new Error(data.error);&#xA;                            });&#xA;                        }&#xA;                        &#xA;                        throw new Error(`Unexpected error. Try again later.`);&#xA;                    })&#xA;                    .then((data) =&gt; {&#xA;                        onEnd(JSON.stringify(data, null, 4));&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        onEnd(err.message);&#xA;                    });&#xA;            });&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;The source is evaluated once. In this collecting form, the body — including the final loop-owned &lt;code&gt;return&lt;/code&gt; — is evaluated once per item, and the result is an array. An empty source produces &lt;code&gt;[]&lt;/code&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Host Values</title>
				<link>https://ferretlang.org/docs/language/types/host/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/language/types/host/</guid>
				<description>&lt;h1 id=&#34;host-values&#34;&gt;Host Values&lt;/h1&gt;&#xA;&lt;p&gt;Host values are values provided by a runtime, module, or embedded application.&lt;/p&gt;&#xA;&lt;p&gt;Unlike basic FQL values such as numbers, strings, arrays, and objects, a host value is backed by implementation-specific data outside the FQL value model. FQL can hold the value, pass it to functions, return it from expressions, and use it with operations supported by its capabilities.&lt;/p&gt;&#xA;&lt;p&gt;Common examples include database connections, browser pages, HTML documents, HTTP clients, files, streams, and other resources managed outside FQL.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Installation</title>
				<link>https://ferretlang.org/docs/tools/lab/installation/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/tools/lab/installation/</guid>
				<description>&lt;h1 id=&#34;installation&#34;&gt;Installation&lt;/h1&gt;&#xA;&lt;p&gt;Lab is distributed as release archives, Docker images, and Go source. After installing it, run &lt;code&gt;lab version&lt;/code&gt; to verify both Lab and the selected Ferret runtime.&lt;/p&gt;&#xA;&lt;h2 id=&#34;prebuilt-binary&#34;&gt;Prebuilt binary&lt;/h2&gt;&#xA;&lt;p&gt;Download &lt;code&gt;v2.0.0-alpha.38&lt;/code&gt; for your platform from the &lt;a href=&#34;https://github.com/MontFerret/lab/releases/tag/v2.0.0-alpha.38&#34;&gt;Lab release page&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Release archives follow this naming pattern:&lt;/p&gt;&#xA;&lt;div class=&#34;table-scroll&#34; role=&#34;region&#34; aria-label=&#34;Scrollable table&#34; tabindex=&#34;0&#34;&gt;&#xA;    &lt;table&gt;&#xA;        &lt;thead&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;th&gt;Platform&lt;/th&gt;&#xA;                        &lt;th&gt;Archive&lt;/th&gt;&#xA;                &lt;/tr&gt;&#xA;        &lt;/thead&gt;&#xA;        &lt;tbody&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;Linux x86_64&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;lab_linux_x86_64.tar.gz&lt;/code&gt;&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;Linux arm64&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;lab_linux_arm64.tar.gz&lt;/code&gt;&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;macOS x86_64&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;lab_darwin_x86_64.tar.gz&lt;/code&gt;&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;macOS arm64&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;lab_darwin_arm64.tar.gz&lt;/code&gt;&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;Windows x86_64&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;lab_windows_x86_64.zip&lt;/code&gt;&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;Windows arm64&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;lab_windows_arm64.zip&lt;/code&gt;&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;        &lt;/tbody&gt;&#xA;    &lt;/table&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;Extract the archive and place the &lt;code&gt;lab&lt;/code&gt; binary in a directory on your &lt;code&gt;PATH&lt;/code&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Language Overview</title>
				<link>https://ferretlang.org/docs/language/overview/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/language/overview/</guid>
				<description>&lt;h1 id=&#34;language-overview&#34;&gt;Language Overview&lt;/h1&gt;&#xA;&lt;p&gt;FQL is a small, declarative-first, expression-oriented language for data automation. It is designed to be embedded in tools and applications whose host runtime determines what a script can access.&lt;/p&gt;&#xA;&lt;p&gt;Keywords and registered host-function calls are case-insensitive, while documentation uses lowercase as the canonical spelling. Registered namespace segments and host-function names have one lowercase qualified identity; variables, user-defined functions, aliases, object properties, query dialects, strings, and comments retain their existing casing rules.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Logical Operators</title>
				<link>https://ferretlang.org/docs/language/operators/logical/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/language/operators/logical/</guid>
				<description>&lt;h1 id=&#34;logical-operators&#34;&gt;Logical operators&lt;/h1&gt;&#xA;&lt;p&gt;FQL supports symbolic and keyword forms of the logical operators:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt; or &lt;code&gt;and&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;||&lt;/code&gt; or &lt;code&gt;or&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;!&lt;/code&gt; or &lt;code&gt;not&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The paired forms have the same behavior.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor is-readonly is-auto-height&#34;&gt;&#xA;    &lt;textarea id=&#34;code-1-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;&lt;/textarea&gt;&lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;example.fql&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-meta&#34;&gt;read-only&lt;/span&gt;&#xA;                &lt;button id=&#34;code-1-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;div class=&#34;code-editor-pane&#34;&gt;&#xA;            &lt;div id=&#34;code-1-text&#34; class=&#34;code-editor-text&#34; data-auto-height=&#34;true&#34;&gt;return [true &amp;amp;&amp;amp; false, true or false, not false]&lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const editor = ace.edit(&#39;code-1-text&#39;);&#xA;            editor.setTheme(&#34;ace\/theme\/tomorrow_night&#34;);&#xA;            editor.session.setUseWorker(false);&#xA;            editor.session.setMode(&#34;ace/mode/&#34; + &#39;fql&#39;);&#xA;            editor.setOptions({&#xA;                readOnly: true,&#xA;                highlightActiveLine: false,&#xA;                highlightGutterLine: false,&#xA;                displayIndentGuides: false,&#xA;                printMargin: false&#xA;            });&#xA;            editor.renderer.$cursorLayer.element.style.display = &#34;none&#34;&#xA;            const copyBtn = document.querySelector(&#39;#code-1-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#code-1-copy-clipboard&#39;);&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy source to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(editor.getValue())&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy source&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;            function resizeAutoHeightEditor() {&#xA;                const lineHeight = editor.renderer.lineHeight || 21;&#xA;                const screenLines = Math.max(editor.session.getScreenLength(), 1);&#xA;                const nextHeight = Math.max(screenLines * lineHeight, 48);&#xA;&#xA;                editor.container.style.height = `${nextHeight}px`;&#xA;                editor.resize();&#xA;            }&#xA;&#xA;            editor.session.on(&#39;change&#39;, resizeAutoHeightEditor);&#xA;            window.addEventListener(&#39;resize&#39;, resizeAutoHeightEditor);&#xA;            resizeAutoHeightEditor();&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;h2 id=&#34;truth-values-for-and-and-or&#34;&gt;Truth values for and and or&lt;/h2&gt;&#xA;&lt;p&gt;Binary &lt;code&gt;and&lt;/code&gt; and &lt;code&gt;or&lt;/code&gt; evaluate each operand according to its Boolean representation:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Module Functions</title>
				<link>https://ferretlang.org/docs/language/functions/modules/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/language/functions/modules/</guid>
				<description>&lt;h1 id=&#34;module-functions&#34;&gt;Module functions&lt;/h1&gt;&#xA;&lt;p&gt;Namespaces organize related runtime-provided functions. The Standard Library, modules, and embedding applications can register namespaced functions. Once a provider is registered, its functions can be called by their qualified names without an import statement.&lt;/p&gt;&#xA;&lt;h2 id=&#34;namespaced-calls&#34;&gt;Namespaced calls&lt;/h2&gt;&#xA;&lt;p&gt;A namespaced function is called by prefixing the function name with the namespace and &lt;code&gt;::&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor is-readonly is-auto-height&#34;&gt;&#xA;    &lt;textarea id=&#34;code-1-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;&lt;/textarea&gt;&lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;example.fql&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-meta&#34;&gt;read-only&lt;/span&gt;&#xA;                &lt;button id=&#34;code-1-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;div class=&#34;code-editor-pane&#34;&gt;&#xA;            &lt;div id=&#34;code-1-text&#34; class=&#34;code-editor-text&#34; data-auto-height=&#34;true&#34;&gt;return io::fs::read(&amp;#34;data.json&amp;#34;)&lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const editor = ace.edit(&#39;code-1-text&#39;);&#xA;            editor.setTheme(&#34;ace\/theme\/tomorrow_night&#34;);&#xA;            editor.session.setUseWorker(false);&#xA;            editor.session.setMode(&#34;ace/mode/&#34; + &#39;fql&#39;);&#xA;            editor.setOptions({&#xA;                readOnly: true,&#xA;                highlightActiveLine: false,&#xA;                highlightGutterLine: false,&#xA;                displayIndentGuides: false,&#xA;                printMargin: false&#xA;            });&#xA;            editor.renderer.$cursorLayer.element.style.display = &#34;none&#34;&#xA;            const copyBtn = document.querySelector(&#39;#code-1-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#code-1-copy-clipboard&#39;);&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy source to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(editor.getValue())&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy source&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;            function resizeAutoHeightEditor() {&#xA;                const lineHeight = editor.renderer.lineHeight || 21;&#xA;                const screenLines = Math.max(editor.session.getScreenLength(), 1);&#xA;                const nextHeight = Math.max(screenLines * lineHeight, 48);&#xA;&#xA;                editor.container.style.height = `${nextHeight}px`;&#xA;                editor.resize();&#xA;            }&#xA;&#xA;            editor.session.on(&#39;change&#39;, resizeAutoHeightEditor);&#xA;            window.addEventListener(&#39;resize&#39;, resizeAutoHeightEditor);&#xA;            resizeAutoHeightEditor();&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;Namespaces can be nested. Each &lt;code&gt;::&lt;/code&gt; separator introduces another level.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Overview</title>
				<link>https://ferretlang.org/docs/getting-started/overview/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/getting-started/overview/</guid>
				<description>&lt;h1 id=&#34;overview&#34;&gt;Overview&lt;/h1&gt;&#xA;&lt;p&gt;Ferret is a declarative-first, expression-oriented embedded language and runtime for data automation. FQL scripts query and transform ordinary data, application-defined host values, documents, APIs, and browser-backed resources while the embedding application controls the available capabilities.&lt;/p&gt;&#xA;&lt;p&gt;Ferret is especially useful when data logic should be portable, reviewable, and change independently from the host application. At a high level, a script describes:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;where data comes from&lt;/li&gt;&#xA;&lt;li&gt;how to query it&lt;/li&gt;&#xA;&lt;li&gt;how to wait for it&lt;/li&gt;&#xA;&lt;li&gt;how to transform it&lt;/li&gt;&#xA;&lt;li&gt;how to return clean structured output&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Ferret can be used as a command-line tool, embedded into Go or JavaScript applications, extended with modules, or used as a small domain-specific language for configuration-driven systems.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Query Errors</title>
				<link>https://ferretlang.org/docs/web-extraction/query-errors/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/web-extraction/query-errors/</guid>
				<description>&lt;h1 id=&#34;query-errors&#34;&gt;Query errors&lt;/h1&gt;&#xA;&lt;p&gt;Compilation checks syntax and bindings before execution. Use &lt;a href=&#34;https://ferretlang.org/docs/tools/cli/check/&#34;&gt;&lt;code&gt;ferret check&lt;/code&gt;&lt;/a&gt; to locate a malformed expression or an undeclared variable.&lt;/p&gt;&#xA;&lt;p&gt;Errors that depend on input or a host operation can surface during execution. A divisor can be zero, a function can receive an unsupported type, or a browser operation can fail. For a missing element, &lt;code&gt;QUERY ONE&lt;/code&gt; returns &lt;code&gt;NONE&lt;/code&gt;; optional member access such as &lt;code&gt;title?.textContent&lt;/code&gt; lets the script return that absence.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Run</title>
				<link>https://ferretlang.org/docs/tools/cli/run/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/tools/cli/run/</guid>
				<description>&lt;h1 id=&#34;run&#34;&gt;Run&lt;/h1&gt;&#xA;&lt;p&gt;The &lt;code&gt;run&lt;/code&gt; command executes a FQL script and prints the encoded result to stdout. It is also available as &lt;code&gt;ferret exec&lt;/code&gt;. Builtin execution is the default; use &lt;a href=&#34;https://ferretlang.org/docs/tools/cli/wire/&#34;&gt;Wire&lt;/a&gt; to execute source against an application-configured host.&lt;/p&gt;&#xA;&lt;p&gt;Errors and source diagnostics go to stderr. Available output is preserved even when execution also returns an error; successfully produced empty output prints nothing.&lt;/p&gt;&#xA;&lt;h2 id=&#34;run-a-script-file&#34;&gt;Run a script file&lt;/h2&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor terminal-shortcode&#34;&gt;&#xA;    &lt;textarea id=&#34;terminal-10-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;ferret run script.fql&lt;/textarea&gt;&#xA;&#xA;    &lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;terminal&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;button id=&#34;terminal-10-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;pre id=&#34;terminal-10-content&#34; class=&#34;terminal-body&#34;&gt;&lt;code&gt;&lt;span class=&#34;terminal-row&#34;&gt;&lt;span class=&#34;terminal-prompt&#34; aria-hidden=&#34;true&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;terminal-command&#34;&gt;ferret run script.fql&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const copyBtn = document.querySelector(&#39;#terminal-10-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#terminal-10-copy-clipboard&#39;);&#xA;            const terminalContent = copyClipboardEl.value;&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy terminal commands to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(terminalContent)&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy terminal commands&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;h2 id=&#34;evaluate-an-inline-expression&#34;&gt;Evaluate an inline expression&lt;/h2&gt;&#xA;&lt;p&gt;Use &lt;code&gt;--eval&lt;/code&gt; (or &lt;code&gt;-e&lt;/code&gt;) to run a FQL expression directly:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Standard library migration</title>
				<link>https://ferretlang.org/docs/migrations/v1-to-v2/standard-library/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/migrations/v1-to-v2/standard-library/</guid>
				<description>&lt;h1 id=&#34;standard-library-migration&#34;&gt;Standard library migration&lt;/h1&gt;&#xA;&lt;p&gt;Review legacy calls by area after the &lt;a href=&#34;https://ferretlang.org/docs/migrations/v1-to-v2/&#34;&gt;initial compatibility check&lt;/a&gt;.&#xA;The tables describe Core &lt;code&gt;v2.0.0-alpha.62&lt;/code&gt;. The automatic rewrites described here are available in CLI &lt;code&gt;v2.0.0-alpha.48&lt;/code&gt;. For current signatures, see the &lt;a href=&#34;https://ferretlang.org/docs/standard-library/&#34;&gt;Standard Library reference&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Preview replacements with &lt;code&gt;ferret migrate run --print path/to/project&lt;/code&gt;.&#xA;Automatic replacements target immutable operations, never &lt;code&gt;arrays::mut::&lt;/code&gt; or&#xA;&lt;code&gt;object::mut::&lt;/code&gt;. Calls shadowed by declarations or aliases need manual review;&#xA;already-qualified targets are preserved. Other safe calls in the same file can&#xA;still migrate. See the &lt;a href=&#34;https://ferretlang.org/docs/tools/cli/migrate/&#34;&gt;CLI reference&lt;/a&gt; for&#xA;supported rules, discovery boundaries, diagnostics, and file-level failures.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Work with browser-driven pages</title>
				<link>https://ferretlang.org/docs/guides/browser-pages/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/guides/browser-pages/</guid>
				<description>&lt;h1 id=&#34;work-with-browser-driven-pages&#34;&gt;Work with browser-driven pages&lt;/h1&gt;&#xA;&lt;p&gt;Some pages load content through JavaScript — single-page applications, lazy-loaded lists, content behind client-side rendering. For these, Ferret can drive a real browser through the Chrome DevTools Protocol (CDP).&lt;/p&gt;&#xA;&lt;p&gt;This guide covers when to use a browser, how to set one up, and how to wait for dynamic content.&lt;/p&gt;&#xA;&lt;h2 id=&#34;when-to-use-a-browser&#34;&gt;When to use a browser&lt;/h2&gt;&#xA;&lt;p&gt;Use static extraction (&lt;code&gt;web::html::open&lt;/code&gt; without a driver) when the data is in the initial HTML response. Use the &lt;code&gt;cdp&lt;/code&gt; driver when the page:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Document module APIs</title>
				<link>https://ferretlang.org/docs/modules/api-comments/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/modules/api-comments/</guid>
				<description>&lt;h1 id=&#34;document-module-apis&#34;&gt;Document module APIs&lt;/h1&gt;&#xA;&lt;p&gt;Ferret modules implemented in Go can expose APIs whose FQL signatures are not clear from their Go declarations. A variadic Go function such as:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-go&#34; data-lang=&#34;go&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;func&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;Decode&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;ctx&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;context&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;Context&lt;/span&gt;, &lt;span style=&#34;color:#a6e22e&#34;&gt;args&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;...&lt;/span&gt;&lt;span style=&#34;color:#a6e22e&#34;&gt;runtime&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;Value&lt;/span&gt;) (&lt;span style=&#34;color:#a6e22e&#34;&gt;runtime&lt;/span&gt;.&lt;span style=&#34;color:#a6e22e&#34;&gt;Value&lt;/span&gt;, &lt;span style=&#34;color:#66d9ef&#34;&gt;error&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;may expose this Ferret API:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;xml::decode(data: String | Binary) -&amp;gt; Object&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Use ordinary Go documentation comments for human-readable documentation and structured tags for the Ferret-facing parameters, result, failures, and deprecation state. Barn derives the public function name and namespace from module registration rather than from the Go identifier.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Encoding API</title>
				<link>https://ferretlang.org/docs/migrations/encoding-api/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/migrations/encoding-api/</guid>
				<description>&lt;h1 id=&#34;migrate-the-encoding-api&#34;&gt;Migrate the Encoding API&lt;/h1&gt;&#xA;&lt;p&gt;Ferret codecs accept a caller context and borrowed &lt;code&gt;io.Writer&lt;/code&gt; or &lt;code&gt;io.Reader&lt;/code&gt;.&#xA;Use the &lt;a href=&#34;https://ferretlang.org/docs/embedding/go/getting-started/#installation&#34;&gt;documented Core release&lt;/a&gt;&#xA;for these examples. The &lt;a href=&#34;https://ferretlang.org/docs/embedding/go/value-encoders/&#34;&gt;Value Encoders guide&lt;/a&gt;&#xA;describes the current contract and provides a complete custom codec.&lt;/p&gt;&#xA;&lt;p&gt;This changes Go codec implementations and direct callers. FQL queries do not&#xA;need rewriting. SDK host-value codecs and bytecode serialization have separate&#xA;contracts. Applications using the earlier buffered Run result should also&#xA;follow the &lt;a href=&#34;https://ferretlang.org/docs/migrations/consumable-output/&#34;&gt;consumable output migration&lt;/a&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>none-Coalescing Operator</title>
				<link>https://ferretlang.org/docs/language/operators/coalescing/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/language/operators/coalescing/</guid>
				<description>&lt;h1 id=&#34;none-coalescing-operator&#34;&gt;none-coalescing operator&lt;/h1&gt;&#xA;&lt;p&gt;The none-coalescing operator (&lt;code&gt;??&lt;/code&gt;) selects a fallback only when its left operand evaluates to &lt;code&gt;none&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor is-readonly is-auto-height&#34;&gt;&#xA;    &lt;textarea id=&#34;code-6-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;&lt;/textarea&gt;&lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;example.fql&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-meta&#34;&gt;read-only&lt;/span&gt;&#xA;                &lt;button id=&#34;code-6-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;div class=&#34;code-editor-pane&#34;&gt;&#xA;            &lt;div id=&#34;code-6-text&#34; class=&#34;code-editor-text&#34; data-auto-height=&#34;true&#34;&gt;let user = {&#xA;    profile: {}&#xA;}&#xA;&#xA;return user?.profile?.displayName ?? &amp;#34;Anonymous&amp;#34;&lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const editor = ace.edit(&#39;code-6-text&#39;);&#xA;            editor.setTheme(&#34;ace\/theme\/tomorrow_night&#34;);&#xA;            editor.session.setUseWorker(false);&#xA;            editor.session.setMode(&#34;ace/mode/&#34; + &#39;fql&#39;);&#xA;            editor.setOptions({&#xA;                readOnly: true,&#xA;                highlightActiveLine: false,&#xA;                highlightGutterLine: false,&#xA;                displayIndentGuides: false,&#xA;                printMargin: false&#xA;            });&#xA;            editor.renderer.$cursorLayer.element.style.display = &#34;none&#34;&#xA;            const copyBtn = document.querySelector(&#39;#code-6-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#code-6-copy-clipboard&#39;);&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy source to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(editor.getValue())&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy source&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;            function resizeAutoHeightEditor() {&#xA;                const lineHeight = editor.renderer.lineHeight || 21;&#xA;                const screenLines = Math.max(editor.session.getScreenLength(), 1);&#xA;                const nextHeight = Math.max(screenLines * lineHeight, 48);&#xA;&#xA;                editor.container.style.height = `${nextHeight}px`;&#xA;                editor.resize();&#xA;            }&#xA;&#xA;            editor.session.on(&#39;change&#39;, resizeAutoHeightEditor);&#xA;            window.addEventListener(&#39;resize&#39;, resizeAutoHeightEditor);&#xA;            resizeAutoHeightEditor();&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;If &lt;code&gt;displayName&lt;/code&gt; is missing, optional chaining produces &lt;code&gt;none&lt;/code&gt; and the expression returns &lt;code&gt;&amp;quot;Anonymous&amp;quot;&lt;/code&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Output</title>
				<link>https://ferretlang.org/docs/embedding/go/output/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/embedding/go/output/</guid>
				<description>&lt;h1 id=&#34;output&#34;&gt;Output&lt;/h1&gt;&#xA;&lt;p&gt;&lt;code&gt;Engine.Run&lt;/code&gt; and &lt;code&gt;Session.Run&lt;/code&gt; return &lt;code&gt;(ferret.Output, error)&lt;/code&gt;. Output is a caller-owned, one-shot handle: use &lt;code&gt;Collect&lt;/code&gt; when you need owned bytes, or &lt;code&gt;Consume&lt;/code&gt; when you want to forward or discard them. Both report terminal failures and finalize the handle.&lt;/p&gt;&#xA;&lt;p&gt;These contracts target the &lt;a href=&#34;https://ferretlang.org/docs/embedding/go/getting-started/#installation&#34;&gt;published Core release&lt;/a&gt; and Universal API &lt;code&gt;v1.0.0-alpha.21&lt;/code&gt;. See the &lt;a href=&#34;https://ferretlang.org/docs/migrations/consumable-output/&#34;&gt;migration guide&lt;/a&gt; for buffered-output applications. For remote runtimes, use the dependency set in the &lt;a href=&#34;https://ferretlang.org/docs/embedding/wire/#run-a-host-and-client&#34;&gt;Wire compatibility table&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;output-methods&#34;&gt;Output methods&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;ferret.Output&lt;/code&gt; is an interface. Choose one terminal consumption method per handle:&lt;/p&gt;</description>
			</item>
			<item>
				<title>REPL</title>
				<link>https://ferretlang.org/docs/tools/cli/repl/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/tools/cli/repl/</guid>
				<description>&lt;h1 id=&#34;repl&#34;&gt;REPL&lt;/h1&gt;&#xA;&lt;p&gt;The &lt;code&gt;repl&lt;/code&gt; command starts an interactive FQL shell where you can type expressions and see results immediately.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor terminal-shortcode&#34;&gt;&#xA;    &lt;textarea id=&#34;terminal-5-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;ferret repl&lt;/textarea&gt;&#xA;&#xA;    &lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;terminal&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;button id=&#34;terminal-5-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;pre id=&#34;terminal-5-content&#34; class=&#34;terminal-body&#34;&gt;&lt;code&gt;&lt;span class=&#34;terminal-row&#34;&gt;&lt;span class=&#34;terminal-prompt&#34; aria-hidden=&#34;true&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;terminal-command&#34;&gt;ferret repl&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const copyBtn = document.querySelector(&#39;#terminal-5-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#terminal-5-copy-clipboard&#39;);&#xA;            const terminalContent = copyClipboardEl.value;&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy terminal commands to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(terminalContent)&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy terminal commands&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;The shell prints a version banner and presents a &lt;code&gt;&amp;gt;&lt;/code&gt; prompt:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Wire runtime</title>
				<link>https://ferretlang.org/docs/tools/cli/wire/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/tools/cli/wire/</guid>
				<description>&lt;h1 id=&#34;use-a-wire-runtime&#34;&gt;Use a Wire runtime&lt;/h1&gt;&#xA;&lt;p&gt;Use Wire when a separate application owns the Ferret engine, custom functions, modules, and runtime configuration that your script needs. The CLI sends source and parameters to that host:&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor terminal-shortcode&#34;&gt;&#xA;    &lt;textarea id=&#34;terminal-11-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;ferret run --runtime wire --runtime-endpoint tcp://127.0.0.1:54321 --eval &amp;#39;RETURN 42&amp;#39;&lt;/textarea&gt;&#xA;&#xA;    &lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;terminal&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;button id=&#34;terminal-11-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;pre id=&#34;terminal-11-content&#34; class=&#34;terminal-body&#34;&gt;&lt;code&gt;&lt;span class=&#34;terminal-row&#34;&gt;&lt;span class=&#34;terminal-prompt&#34; aria-hidden=&#34;true&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;terminal-command&#34;&gt;ferret run --runtime wire --runtime-endpoint tcp://127.0.0.1:54321 --eval &amp;#39;RETURN 42&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const copyBtn = document.querySelector(&#39;#terminal-11-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#terminal-11-copy-clipboard&#39;);&#xA;            const terminalContent = copyClipboardEl.value;&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy terminal commands to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(terminalContent)&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy terminal commands&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;Replace the endpoint with the one printed by your host. Use &lt;code&gt;run&lt;/code&gt;, its &lt;code&gt;exec&lt;/code&gt; alias, or &lt;code&gt;repl&lt;/code&gt; for source execution. Use &lt;a href=&#34;https://ferretlang.org/docs/tools/cli/debug/#debug-on-a-wire-host&#34;&gt;Debug&lt;/a&gt; for an interactive session with a local source file. Builtin execution is the default.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Arithmetic Operators</title>
				<link>https://ferretlang.org/docs/language/operators/arithmetic/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/language/operators/arithmetic/</guid>
				<description>&lt;h1 id=&#34;arithmetic-operators&#34;&gt;Arithmetic operators&lt;/h1&gt;&#xA;&lt;p&gt;FQL defines native arithmetic directly over numbers and temporal values. Host values can add their own binary operator behavior through Go runtime capabilities. Operators do not implicitly route arbitrary values through &lt;code&gt;to_number&lt;/code&gt;, &lt;code&gt;to_duration&lt;/code&gt;, or &lt;code&gt;to_datetime&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;FQL supports:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;+&lt;/code&gt; addition or String-triggered concatenation&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;-&lt;/code&gt; subtraction&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;*&lt;/code&gt; multiplication&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;/&lt;/code&gt; division&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;%&lt;/code&gt; modulus&lt;/li&gt;&#xA;&lt;li&gt;unary &lt;code&gt;+&lt;/code&gt; and &lt;code&gt;-&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;For exponentiation, use &lt;code&gt;math::pow()&lt;/code&gt;. The syntax &lt;code&gt;base ** exponent&lt;/code&gt; is not supported.&lt;/p&gt;&#xA;&lt;h2 id=&#34;native-numeric-arithmetic&#34;&gt;Native numeric arithmetic&lt;/h2&gt;&#xA;&lt;p&gt;Numeric arithmetic accepts only &lt;code&gt;Int&lt;/code&gt; and &lt;code&gt;Float&lt;/code&gt; values.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Capability Types</title>
				<link>https://ferretlang.org/docs/language/types/capabilities/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/language/types/capabilities/</guid>
				<description>&lt;h1 id=&#34;capability-types&#34;&gt;Capability types&lt;/h1&gt;&#xA;&lt;p&gt;Capability types describe behavior that a value supports.&lt;/p&gt;&#xA;&lt;p&gt;Unlike basic types, capability types are not about a value&amp;rsquo;s storage shape. They are about the operations that can be performed on the value. A capability type represents an operation-oriented contract: a value has a capability when the runtime can perform a specific class of operation on it.&lt;/p&gt;&#xA;&lt;p&gt;This is especially important for host values, because host values may expose behavior that does not correspond to any built-in FQL type. A database connection may be queryable. A file handle may be closable. A cursor may be iterable. A browser element may accept dispatched commands.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Configuration</title>
				<link>https://ferretlang.org/docs/tools/worker/configuration/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/tools/worker/configuration/</guid>
				<description>&lt;h1 id=&#34;configuration&#34;&gt;Configuration&lt;/h1&gt;&#xA;&lt;p&gt;Worker is configured with command-line flags and environment variables. Command-line flags take precedence over environment variables.&lt;/p&gt;&#xA;&lt;p&gt;Environment variable names are the uppercase flag name with dashes changed to underscores. For example, &lt;code&gt;-body-limit&lt;/code&gt; maps to &lt;code&gt;BODY_LIMIT&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;flags-and-environment-variables&#34;&gt;Flags and environment variables&lt;/h2&gt;&#xA;&lt;div class=&#34;table-scroll&#34; role=&#34;region&#34; aria-label=&#34;Scrollable table&#34; tabindex=&#34;0&#34;&gt;&#xA;    &lt;table&gt;&#xA;        &lt;thead&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;th&gt;Flag&lt;/th&gt;&#xA;                        &lt;th&gt;Env var&lt;/th&gt;&#xA;                        &lt;th&gt;Default&lt;/th&gt;&#xA;                        &lt;th&gt;Meaning&lt;/th&gt;&#xA;                &lt;/tr&gt;&#xA;        &lt;/thead&gt;&#xA;        &lt;tbody&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;-port&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;PORT&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;8080&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;TCP port Worker listens on.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;-log-level&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;LOG_LEVEL&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;debug&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Log level. Valid values follow zerolog levels such as &lt;code&gt;trace&lt;/code&gt;, &lt;code&gt;debug&lt;/code&gt;, &lt;code&gt;info&lt;/code&gt;, &lt;code&gt;warn&lt;/code&gt;, and &lt;code&gt;error&lt;/code&gt;.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;-body-limit&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;BODY_LIMIT&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;1M&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Maximum request body size. Accepts values such as &lt;code&gt;4K&lt;/code&gt;, &lt;code&gt;4KB&lt;/code&gt;, &lt;code&gt;10M&lt;/code&gt;, or &lt;code&gt;1G&lt;/code&gt;. Empty string disables the limit.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;-request-limit&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;REQUEST_LIMIT&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;0&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Request rate for each IP. &lt;code&gt;0&lt;/code&gt; disables rate limiting.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;-request-limit-time-window&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;REQUEST_LIMIT_TIME_WINDOW&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;180&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Rate-limit window in seconds.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;-cache-size&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;CACHE_SIZE&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;100&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Number of compiled query plans to keep in the in-memory LRU cache.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;-policy-fs-root&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;POLICY_FS_ROOT&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Current working directory&lt;/td&gt;&#xA;                        &lt;td&gt;Filesystem root for FQL &lt;code&gt;io::fs&lt;/code&gt; functions.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;-policy-http-allowed-hosts&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;POLICY_HTTP_ALLOWED_HOSTS&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Empty&lt;/td&gt;&#xA;                        &lt;td&gt;Comma-separated exact hosts or &lt;code&gt;host:port&lt;/code&gt; values allowed for outbound Ferret HTTP requests.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;-http-allow-all-hosts&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;HTTP_ALLOW_ALL_HOSTS&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Allow outbound Ferret HTTP requests to any host while retaining the other HTTP policy checks.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;-policy-http-blocked-hosts&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;POLICY_HTTP_BLOCKED_HOSTS&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Empty&lt;/td&gt;&#xA;                        &lt;td&gt;Comma-separated exact hosts or &lt;code&gt;host:port&lt;/code&gt; values blocked for outbound Ferret HTTP requests.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;-policy-http-timeout&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;POLICY_HTTP_TIMEOUT&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;10s&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Overall timeout for outbound Ferret HTTP requests.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;-policy-http-max-request-size&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;POLICY_HTTP_MAX_REQUEST_SIZE&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;1048576&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Maximum outbound HTTP request body size in bytes. &lt;code&gt;0&lt;/code&gt; disables the limit.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;-policy-http-max-response-size&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;POLICY_HTTP_MAX_RESPONSE_SIZE&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;10485760&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Maximum outbound HTTP response body size in bytes. &lt;code&gt;0&lt;/code&gt; disables the limit.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;-policy-http-max-redirects&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;POLICY_HTTP_MAX_REDIRECTS&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;3&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Maximum redirects to follow. &lt;code&gt;0&lt;/code&gt; uses the Go standard library default.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;-policy-http-follow-redirects&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;POLICY_HTTP_FOLLOW_REDIRECTS&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Follow outbound HTTP redirects.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;-policy-http-allow-localhost&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;POLICY_HTTP_ALLOW_LOCALHOST&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Allow localhost and loopback literal addresses.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;-policy-http-allow-private-networks&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;POLICY_HTTP_ALLOW_PRIVATE_NETWORKS&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Allow private-network literal IP addresses.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;-policy-http-blocked-request-headers&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;POLICY_HTTP_BLOCKED_REQUEST_HEADERS&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;Authorization,Cookie,Proxy-Authorization&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Comma-separated request headers removed from outbound Ferret HTTP requests.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;-chrome-ip&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;CHROME_IP&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;127.0.0.1&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Chrome remote debugging host.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;-chrome-port&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;CHROME_PORT&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;9222&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Chrome remote debugging port.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;-no-chrome&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;NO_CHROME&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Skip Chrome readiness and version checks.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;-version&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;VERSION&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Print Worker and Ferret version metadata, then exit.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;-help&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;HELP&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Print flag help, then exit.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;        &lt;/tbody&gt;&#xA;    &lt;/table&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;The current &lt;code&gt;v2.0.0-rc.32&lt;/code&gt; source rejects &lt;code&gt;-cache-size=0&lt;/code&gt; during startup with &lt;code&gt;must provide a positive size&lt;/code&gt;, even though the generated flag help still says &lt;code&gt;0&lt;/code&gt; disables caching. Use a positive cache size.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Debug</title>
				<link>https://ferretlang.org/docs/tools/cli/debug/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/tools/cli/debug/</guid>
				<description>&lt;h1 id=&#34;debug&#34;&gt;Debug&lt;/h1&gt;&#xA;&lt;p&gt;The &lt;code&gt;debug&lt;/code&gt; command starts an interactive debugger for a FQL script:&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor terminal-shortcode&#34;&gt;&#xA;    &lt;textarea id=&#34;terminal-3-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;ferret debug script.fql&lt;/textarea&gt;&#xA;&#xA;    &lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;terminal&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;button id=&#34;terminal-3-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;pre id=&#34;terminal-3-content&#34; class=&#34;terminal-body&#34;&gt;&lt;code&gt;&lt;span class=&#34;terminal-row&#34;&gt;&lt;span class=&#34;terminal-prompt&#34; aria-hidden=&#34;true&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;terminal-command&#34;&gt;ferret debug script.fql&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const copyBtn = document.querySelector(&#39;#terminal-3-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#terminal-3-copy-clipboard&#39;);&#xA;            const terminalContent = copyClipboardEl.value;&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy terminal commands to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(terminalContent)&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy terminal commands&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;The debugger compiles the script, pauses at the first executable location, and presents a &lt;code&gt;(fdb)&lt;/code&gt; prompt:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Go embedding migration</title>
				<link>https://ferretlang.org/docs/migrations/v1-to-v2/go-embedding/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/migrations/v1-to-v2/go-embedding/</guid>
				<description>&lt;h1 id=&#34;migrate-a-go-application-from-ferret-v1&#34;&gt;Migrate a Go application from Ferret v1&lt;/h1&gt;&#xA;&lt;p&gt;Start with the &lt;a href=&#34;https://ferretlang.org/docs/migrations/v1-to-v2/&#34;&gt;v1 → v2 migration overview&lt;/a&gt;&#xA;for the project-wide check, preview, and validation workflow.&lt;/p&gt;&#xA;&lt;p&gt;Moving an embedded Go application to Ferret v2 has three separate parts:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Use &lt;code&gt;ferret migrate&lt;/code&gt; for supported source and import changes.&lt;/li&gt;&#xA;&lt;li&gt;Use the v2 compatibility packages temporarily where they cover your application.&lt;/li&gt;&#xA;&lt;li&gt;Replace the v1 compiler, runtime, and driver composition with the native v2 Engine, Plan, Session, and module APIs.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;The migration command is a compatibility aid, not a general application translator. Plan to review every change and migrate application-specific composition manually.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Installation</title>
				<link>https://ferretlang.org/docs/getting-started/installation/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/getting-started/installation/</guid>
				<description>&lt;h1 id=&#34;installation&#34;&gt;Installation&lt;/h1&gt;&#xA;&lt;p&gt;Choose how you will work with Ferret. Use Visual Studio Code for an editor-based workflow, the CLI for terminal and shell workflows, or embed the runtime when a Go or JavaScript application needs to execute FQL directly.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;Alpha status&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Ferret v2 is currently in alpha. The language, runtime, CLI, modules, and embedding APIs may change before beta. Pin versions for scripts, CI, and application integrations.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;Looking for Ferret v1?&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Ferret v1 remains available for existing projects, but new users should start with Ferret v2. See the &lt;a href=&#34;https://ferretlang.org/docs/migrations/v1-to-v2/&#34;&gt;v1 → v2 migration overview&lt;/a&gt; for automated changes and manual follow-up.&lt;/p&gt;&#xA;&lt;/blockquote&gt;</description>
			</item>
			<item>
				<title>Interact with pages</title>
				<link>https://ferretlang.org/docs/guides/interactions/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/guides/interactions/</guid>
				<description>&lt;h1 id=&#34;interact-with-pages&#34;&gt;Interact with pages&lt;/h1&gt;&#xA;&lt;p&gt;Many extraction tasks require interaction first — submitting a search form, clicking a filter, dismissing a popup, or logging in. This guide shows how to dispatch events to browser elements and wait for the results.&lt;/p&gt;&#xA;&lt;p&gt;Page interactions require the &lt;code&gt;cdp&lt;/code&gt; driver. See &lt;a href=&#34;https://ferretlang.org/docs/guides/browser-pages/&#34;&gt;Browser-driven pages&lt;/a&gt; for setup.&lt;/p&gt;&#xA;&lt;h2 id=&#34;click-an-element&#34;&gt;Click an element&lt;/h2&gt;&#xA;&lt;p&gt;Use &lt;code&gt;dispatch &amp;quot;click&amp;quot;&lt;/code&gt; or the arrow shorthand &lt;code&gt;&amp;lt;-&lt;/code&gt; to click:&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor is-horizontal is-auto-height&#34;&gt;&#xA;    &lt;textarea id=&#34;code-editor-1-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;&lt;/textarea&gt;&#xA;&#xA;    &lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div id=&#34;code-editor-1-header&#34; class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;example.fql&lt;/span&gt;&#xA;                &lt;small&gt;Ferret v2&lt;/small&gt;&#xA;            &lt;/div&gt;&#xA;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;button id=&#34;code-editor-1-result-toggle-button&#34; class=&#34;button is-outlined is-light code-editor-button&#34; type=&#34;button&#34; aria-expanded=&#34;false&#34; aria-controls=&#34;code-editor-1-result-pane&#34;&gt;Output&lt;/button&gt;&#xA;                &lt;button id=&#34;code-editor-1-params-toggle-button&#34; class=&#34;button is-outlined is-light code-editor-button&#34; type=&#34;button&#34; aria-expanded=&#34;false&#34; aria-controls=&#34;code-editor-1-params-drawer&#34;&gt;Params&lt;/button&gt;&#xA;                &lt;button id=&#34;code-editor-1-run-button&#34; class=&#34;run button is-outlined is-light code-editor-button&#34; type=&#34;button&#34; aria-label=&#34;Run query&#34;&gt;&#xA;                    &lt;span class=&#34;code-editor-run-label&#34;&gt;Run&lt;/span&gt;&#xA;                    &lt;span id=&#34;code-editor-1-run-button-spinner&#34; class=&#34;code-editor-run-spinner&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div id=&#34;code-editor-1-progress&#34; class=&#34;code-editor-progress&#34; role=&#34;progressbar&#34; aria-label=&#34;Running query&#34; hidden&gt;&lt;/div&gt;&#xA;            &lt;span id=&#34;code-editor-1-run-status&#34; class=&#34;code-editor-sr-only&#34; aria-live=&#34;polite&#34; aria-atomic=&#34;true&#34;&gt;&lt;/span&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;div class=&#34;code-editor-workspace&#34;&gt;&#xA;            &lt;div id=&#34;code-editor-1-grid&#34; class=&#34;code-editor-grid&#34; style=&#34;grid-template-columns: 1fr;&#34;&gt;&#xA;                &lt;div id=&#34;code-editor-1-source-pane&#34; class=&#34;code-editor-pane code-editor-pane-source&#34;&gt;&#xA;                    &lt;div class=&#34;code-editor-pane-header&#34;&gt;&#xA;                        &lt;span&gt;query.fql&lt;/span&gt;&#xA;                        &lt;div class=&#34;code-editor-pane-header-actions&#34;&gt;&#xA;                            &lt;span&gt;FQL&lt;/span&gt;&#xA;                            &lt;button id=&#34;code-editor-1-copy-button&#34; class=&#34;code-editor-pane-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;                        &lt;/div&gt;&#xA;                    &lt;/div&gt;&#xA;                    &lt;div id=&#34;code-editor-1-text&#34; class=&#34;code-editor-text&#34; data-auto-height=&#34;true&#34;&gt;let page = web::html::open(&amp;#34;https://mockery.ferretlang.org/scenarios/dynamic-products/load-more/&amp;#34;, { driver: &amp;#34;cdp&amp;#34; })&#xA;let button = query one &amp;#39;[data-testid=&amp;#34;load-more-products&amp;#34;]&amp;#39; in page using css&#xA;waitfor exists query one &amp;#34;.product-card&amp;#34; in page using css timeout 5s on timeout fail&#xA;let before = query count &amp;#34;.product-card&amp;#34; in page using css&#xA;&#xA;dispatch &amp;#34;click&amp;#34; in button&#xA;return waitfor value (query count &amp;#34;.product-card&amp;#34; in page using css)&#xA;    when . &amp;gt; before&#xA;    timeout 5s on timeout fail&lt;/div&gt;&#xA;                &lt;/div&gt;&#xA;&#xA;                &lt;div id=&#34;code-editor-1-result-pane&#34; class=&#34;code-editor-pane code-editor-pane-result&#34; hidden&gt;&#xA;                    &lt;div class=&#34;code-editor-pane-header&#34;&gt;&#xA;                        &lt;span&gt;result.json&lt;/span&gt;&#xA;                        &lt;div class=&#34;code-editor-pane-header-actions&#34;&gt;&#xA;                            &lt;span&gt;output&lt;/span&gt;&#xA;                            &lt;button id=&#34;code-editor-1-result-close-button&#34; class=&#34;code-editor-pane-button&#34; type=&#34;button&#34; aria-controls=&#34;code-editor-1-result-pane&#34;&gt;Close&lt;/button&gt;&#xA;                        &lt;/div&gt;&#xA;                    &lt;/div&gt;&#xA;                    &lt;div id=&#34;code-editor-1-result&#34; class=&#34;code-editor-result&#34; data-auto-height=&#34;true&#34;&gt;&lt;/div&gt;&#xA;                &lt;/div&gt;&#xA;            &lt;/div&gt;&#xA;&#xA;            &lt;aside id=&#34;code-editor-1-params-drawer&#34; class=&#34;code-editor-params-drawer&#34; aria-labelledby=&#34;code-editor-1-params-title&#34; hidden&gt;&#xA;                &lt;div class=&#34;code-editor-params-header&#34;&gt;&#xA;                    &lt;div&gt;&#xA;                        &lt;span id=&#34;code-editor-1-params-title&#34; class=&#34;code-editor-params-title&#34;&gt;Query parameters&lt;/span&gt;&#xA;                        &lt;span class=&#34;code-editor-params-description&#34;&gt;Values are parsed as JSON when possible.&lt;/span&gt;&#xA;                    &lt;/div&gt;&#xA;                    &lt;button id=&#34;code-editor-1-params-close-button&#34; class=&#34;code-editor-pane-button&#34; type=&#34;button&#34;&gt;Close&lt;/button&gt;&#xA;                &lt;/div&gt;&#xA;                &lt;div class=&#34;code-editor-params-body&#34;&gt;&#xA;                    &lt;div id=&#34;code-editor-1-params-empty&#34; class=&#34;code-editor-params-empty&#34;&gt;No parameters added.&lt;/div&gt;&#xA;                    &lt;div id=&#34;code-editor-1-params-rows&#34; class=&#34;code-editor-params-rows&#34;&gt;&lt;/div&gt;&#xA;                &lt;/div&gt;&#xA;                &lt;div class=&#34;code-editor-params-footer&#34;&gt;&#xA;                    &lt;button id=&#34;code-editor-1-params-add-button&#34; class=&#34;code-editor-params-add-button&#34; type=&#34;button&#34;&gt;Add parameter&lt;/button&gt;&#xA;                &lt;/div&gt;&#xA;            &lt;/aside&gt;&#xA;        &lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            function createEditor(id, mode, useWorker) {&#xA;                const editor = ace.edit(id);&#xA;                editor.setTheme(&#34;ace\/theme\/tomorrow_night&#34;);&#xA;                editor.session.setUseWorker(useWorker);&#xA;                editor.session.setMode(&#34;ace/mode/&#34; + mode);&#xA;                editor.setOptions({&#xA;                    displayIndentGuides: false,&#xA;                    printMargin: false&#xA;                });&#xA;&#xA;                return editor;&#xA;            }&#xA;&#xA;            const btn = document.querySelector(&#39;#code-editor-1-run-button&#39;);&#xA;            const textEditor = createEditor(&#39;code-editor-1-text&#39;, &#39;fql&#39;, true);&#xA;            const resultEditor = createEditor(&#39;code-editor-1-result&#39;, &#39;json&#39;, false);&#xA;            resultEditor.setReadOnly(true);&#xA;            const resultExpandBtn = null;&#xA;            const editorHeader = document.querySelector(&#39;#code-editor-1-header&#39;);&#xA;            const editorWorkspace = document.querySelector(&#39;#code-editor-1-grid&#39;).parentElement;&#xA;            const editorGrid = document.querySelector(&#39;#code-editor-1-grid&#39;);&#xA;            const runProgress = document.querySelector(&#39;#code-editor-1-progress&#39;);&#xA;            const runStatus = document.querySelector(&#39;#code-editor-1-run-status&#39;);&#xA;            const resultPane = document.querySelector(&#39;#code-editor-1-result-pane&#39;);&#xA;            const resultToggleBtn = document.querySelector(&#39;#code-editor-1-result-toggle-button&#39;);&#xA;            const resultCloseBtn = document.querySelector(&#39;#code-editor-1-result-close-button&#39;);&#xA;            const paramsToggleBtn = document.querySelector(&#39;#code-editor-1-params-toggle-button&#39;);&#xA;            const paramsDrawer = document.querySelector(&#39;#code-editor-1-params-drawer&#39;);&#xA;            const paramsCloseBtn = document.querySelector(&#39;#code-editor-1-params-close-button&#39;);&#xA;            const paramsAddBtn = document.querySelector(&#39;#code-editor-1-params-add-button&#39;);&#xA;            const paramsRows = document.querySelector(&#39;#code-editor-1-params-rows&#39;);&#xA;            const paramsEmpty = document.querySelector(&#39;#code-editor-1-params-empty&#39;);&#xA;            let isResultVisible = !resultPane.hidden;&#xA;            let isParamsVisible = !paramsDrawer.hidden;&#xA;&#xA;            function resetResultExpansion() {&#xA;                if (!resultExpandBtn) {&#xA;                    return;&#xA;                }&#xA;&#xA;                isResultExpanded = false;&#xA;                resultExpandBtn.setAttribute(&#39;aria-expanded&#39;, &#39;false&#39;);&#xA;                resultExpandBtn.textContent = &#39;Expand&#39;;&#xA;            }&#xA;&#xA;            function syncEditorLayout() {&#xA;                const sourceHeight = getEditorContentHeight(textEditor);&#xA;                textEditor.container.style.height = `${sourceHeight}px`;&#xA;&#xA;                if (isResultVisible) {&#xA;                    const resultHeight = getEditorContentHeight(resultEditor);&#xA;                    applyResultHeight(resultHeight);&#xA;                }&#xA;&#xA;                textEditor.resize();&#xA;&#xA;                if (isResultVisible) {&#xA;                    resultEditor.resize();&#xA;                }&#xA;            }&#xA;&#xA;            function setResultVisible(nextVisible) {&#xA;                isResultVisible = nextVisible;&#xA;                resultPane.hidden = !nextVisible;&#xA;                resultToggleBtn.setAttribute(&#39;aria-expanded&#39;, nextVisible ? &#39;true&#39; : &#39;false&#39;);&#xA;                editorGrid.style.gridTemplateColumns = nextVisible ? &#39;&#39; : &#39;1fr&#39;;&#xA;&#xA;                if (!nextVisible) {&#xA;                    resetResultExpansion();&#xA;                    syncEditorLayout();&#xA;                    return;&#xA;                }&#xA;&#xA;                window.requestAnimationFrame(() =&gt; {&#xA;                    syncEditorLayout();&#xA;                    resultEditor.resize(true);&#xA;                });&#xA;            }&#xA;&#xA;            resultToggleBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setResultVisible(!isResultVisible);&#xA;            });&#xA;&#xA;            resultCloseBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setResultVisible(false);&#xA;            });&#xA;&#xA;            const collapsedResultHeightStyle = resultEditor.container.style.height;&#xA;            let isResultExpanded = false;&#xA;&#xA;            function getEditorContentHeight(editor) {&#xA;                const lineHeight = editor.renderer.lineHeight || 21;&#xA;                const screenLines = Math.max(editor.session.getScreenLength(), 1);&#xA;&#xA;                return Math.max(screenLines * lineHeight, 48);&#xA;            }&#xA;&#xA;            function getMaxResultHeight(fallbackHeight) {&#xA;                const viewportHeight = window.innerHeight || document.documentElement.clientHeight || fallbackHeight;&#xA;                const rootFontSize = parseFloat(window.getComputedStyle(document.documentElement).fontSize) || 16;&#xA;&#xA;                return Math.min(viewportHeight * 0.45, 32 * rootFontSize);&#xA;            }&#xA;&#xA;            function getCollapsedResultHeight() {&#xA;                return getEditorContentHeight(resultEditor);&#xA;            }&#xA;&#xA;            function getExpandedResultHeight(collapsedHeight) {&#xA;                const lineHeight = resultEditor.renderer.lineHeight || textEditor.renderer.lineHeight || 21;&#xA;                const maxAllowedHeight = getMaxResultHeight(collapsedHeight);&#xA;                const screenLines = Math.max(resultEditor.session.getScreenLength(), 1);&#xA;                const contentHeight = (screenLines * lineHeight) + (lineHeight * 2);&#xA;                const targetHeight = Math.min(contentHeight, maxAllowedHeight);&#xA;&#xA;                return Math.max(collapsedHeight, Math.round(targetHeight));&#xA;            }&#xA;&#xA;            function applyResultHeight(collapsedHeight) {&#xA;                if (resultExpandBtn &amp;&amp; isResultExpanded) {&#xA;                    resultEditor.container.style.height = `${getExpandedResultHeight(collapsedHeight)}px`;&#xA;                } else {&#xA;                    resultEditor.container.style.height = `${Math.min(collapsedHeight, getMaxResultHeight(collapsedHeight))}px`;&#xA;                }&#xA;&#xA;                resultEditor.resize();&#xA;            }&#xA;            textEditor.session.on(&#39;change&#39;, syncEditorLayout);&#xA;&#xA;            if (resultExpandBtn) {&#xA;                resultExpandBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                    isResultExpanded = !isResultExpanded;&#xA;                    resultExpandBtn.setAttribute(&#39;aria-expanded&#39;, isResultExpanded ? &#39;true&#39; : &#39;false&#39;);&#xA;                    resultExpandBtn.textContent = isResultExpanded ? &#39;Collapse&#39; : &#39;Expand&#39;;&#xA;                    syncEditorLayout();&#xA;                });&#xA;            }&#xA;&#xA;            function syncParamsEmptyState() {&#xA;                paramsEmpty.hidden = paramsRows.children.length &gt; 0;&#xA;            }&#xA;&#xA;            function formatParamValue(value) {&#xA;                return typeof value === &#39;string&#39; ? value : JSON.stringify(value);&#xA;            }&#xA;&#xA;            function createParamRow(name, value) {&#xA;                const row = document.createElement(&#39;div&#39;);&#xA;                row.className = &#39;code-editor-param-row&#39;;&#xA;&#xA;                const nameInput = document.createElement(&#39;input&#39;);&#xA;                nameInput.className = &#39;code-editor-param-input code-editor-param-name&#39;;&#xA;                nameInput.type = &#39;text&#39;;&#xA;                nameInput.placeholder = &#39;name&#39;;&#xA;                nameInput.setAttribute(&#39;aria-label&#39;, &#39;Parameter name&#39;);&#xA;                nameInput.value = name || &#39;&#39;;&#xA;&#xA;                const separator = document.createElement(&#39;span&#39;);&#xA;                separator.className = &#39;code-editor-param-separator&#39;;&#xA;                separator.setAttribute(&#39;aria-hidden&#39;, &#39;true&#39;);&#xA;                separator.textContent = &#39;:&#39;;&#xA;&#xA;                const valueInput = document.createElement(&#39;input&#39;);&#xA;                valueInput.className = &#39;code-editor-param-input code-editor-param-value&#39;;&#xA;                valueInput.type = &#39;text&#39;;&#xA;                valueInput.placeholder = &#39;value&#39;;&#xA;                valueInput.setAttribute(&#39;aria-label&#39;, &#39;Parameter value&#39;);&#xA;                valueInput.value = value === undefined ? &#39;&#39; : formatParamValue(value);&#xA;&#xA;                const removeBtn = document.createElement(&#39;button&#39;);&#xA;                removeBtn.className = &#39;code-editor-param-remove-button&#39;;&#xA;                removeBtn.type = &#39;button&#39;;&#xA;                removeBtn.setAttribute(&#39;aria-label&#39;, `Remove parameter ${name || &#39;row&#39;}`);&#xA;                removeBtn.textContent = &#39;Remove&#39;;&#xA;                removeBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                    row.remove();&#xA;                    syncParamsEmptyState();&#xA;                });&#xA;&#xA;                row.append(nameInput, separator, valueInput, removeBtn);&#xA;                paramsRows.appendChild(row);&#xA;                syncParamsEmptyState();&#xA;&#xA;                return nameInput;&#xA;            }&#xA;&#xA;            function setParamsVisible(nextVisible) {&#xA;                isParamsVisible = nextVisible;&#xA;                paramsDrawer.hidden = !nextVisible;&#xA;                paramsToggleBtn.setAttribute(&#39;aria-expanded&#39;, nextVisible ? &#39;true&#39; : &#39;false&#39;);&#xA;                editorWorkspace.classList.toggle(&#39;is-params-open&#39;, nextVisible);&#xA;&#xA;                if (nextVisible) {&#xA;                    paramsCloseBtn.focus();&#xA;                } else {&#xA;                    paramsToggleBtn.focus();&#xA;                }&#xA;            }&#xA;&#xA;            function setParamsControlsDisabled(disabled) {&#xA;                paramsToggleBtn.disabled = disabled;&#xA;                paramsDrawer.querySelectorAll(&#39;button, input&#39;).forEach((control) =&gt; {&#xA;                    control.disabled = disabled;&#xA;                });&#xA;            }&#xA;&#xA;            function parseParamValue(value) {&#xA;                try {&#xA;                    return JSON.parse(value);&#xA;                } catch (err) {&#xA;                    return value;&#xA;                }&#xA;            }&#xA;&#xA;            function getParams() {&#xA;                return Array.from(paramsRows.querySelectorAll(&#39;.code-editor-param-row&#39;)).reduce((params, row) =&gt; {&#xA;                    const name = row.querySelector(&#39;.code-editor-param-name&#39;).value.trim();&#xA;&#xA;                    if (name) {&#xA;                        const value = row.querySelector(&#39;.code-editor-param-value&#39;).value;&#xA;                        params[name] = parseParamValue(value);&#xA;                    }&#xA;&#xA;                    return params;&#xA;                }, {});&#xA;            }&#xA;&#xA;            const initialParams = JSON.parse(&#34;{}&#34;);&#xA;&#xA;            if (initialParams &amp;&amp; typeof initialParams === &#39;object&#39; &amp;&amp; !Array.isArray(initialParams)) {&#xA;                Object.entries(initialParams).forEach(([name, value]) =&gt; {&#xA;                    createParamRow(name, value);&#xA;                });&#xA;            }&#xA;&#xA;            syncParamsEmptyState();&#xA;&#xA;            paramsToggleBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setParamsVisible(!isParamsVisible);&#xA;            });&#xA;&#xA;            paramsCloseBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setParamsVisible(false);&#xA;            });&#xA;&#xA;            paramsAddBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                createParamRow(&#39;&#39;, &#39;&#39;).focus();&#xA;            });&#xA;&#xA;            window.addEventListener(&#39;resize&#39;, syncEditorLayout);&#xA;            syncEditorLayout();&#xA;&#xA;            function setContent(editor, content) {&#xA;                editor.setValue(content, -1);&#xA;            }&#xA;                const copyClipboardEl = document.querySelector(&#39;#code-editor-1-copy-clipboard&#39;);&#xA;                const copyBtn = document.querySelector(&#39;#code-editor-1-copy-button&#39;);&#xA;&#xA;                function copyTextWithFallback(content) {&#xA;                    copyClipboardEl.value = content;&#xA;                    copyClipboardEl.focus();&#xA;                    copyClipboardEl.select();&#xA;&#xA;                    if (!document.execCommand(&#39;copy&#39;)) {&#xA;                        throw new Error(&#39;Could not copy source to the clipboard&#39;);&#xA;                    }&#xA;                }&#xA;&#xA;                function copyTextToClipboard(content) {&#xA;                    if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                        return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                            copyTextWithFallback(content);&#xA;                        });&#xA;                    }&#xA;&#xA;                    copyTextWithFallback(content);&#xA;&#xA;                    return Promise.resolve();&#xA;                }&#xA;&#xA;                copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                    copyTextToClipboard(textEditor.getValue())&#xA;                        .then(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copied&#39;;&#xA;                            window.setTimeout(() =&gt; {&#xA;                                copyBtn.textContent = &#39;Copy&#39;;&#xA;                            }, 1200);&#xA;                        })&#xA;                        .catch((err) =&gt; {&#xA;                            console.error(&#39;Failed to copy source&#39;);&#xA;                            console.error(err);&#xA;                        });&#xA;                });&#xA;&#xA;            let isRunning = false;&#xA;&#xA;            function onStart() {&#xA;                isRunning = true;&#xA;                textEditor.setReadOnly(true);&#xA;                runProgress.hidden = false;&#xA;                runStatus.textContent = &#39;Running query&#39;;&#xA;                editorHeader.setAttribute(&#39;aria-busy&#39;, &#39;true&#39;);&#xA;                editorGrid.setAttribute(&#39;aria-busy&#39;, &#39;true&#39;);&#xA;                btn.classList.add(&#39;is-running&#39;);&#xA;                btn.setAttribute(&#39;aria-busy&#39;, &#39;true&#39;);&#xA;                btn.setAttribute(&#39;aria-label&#39;, &#39;Running query&#39;);&#xA;                btn.disabled = true;&#xA;                setParamsControlsDisabled(true);&#xA;            }&#xA;&#xA;            function onEnd(result) {&#xA;                isRunning = false;&#xA;                textEditor.setReadOnly(false);&#xA;                runProgress.hidden = true;&#xA;                runStatus.textContent = &#39;&#39;;&#xA;                editorHeader.setAttribute(&#39;aria-busy&#39;, &#39;false&#39;);&#xA;                editorGrid.setAttribute(&#39;aria-busy&#39;, &#39;false&#39;);&#xA;                btn.classList.remove(&#39;is-running&#39;);&#xA;                btn.setAttribute(&#39;aria-busy&#39;, &#39;false&#39;);&#xA;                btn.setAttribute(&#39;aria-label&#39;, &#39;Run query&#39;);&#xA;                btn.disabled = false;&#xA;                setParamsControlsDisabled(false);&#xA;&#xA;                setContent(resultEditor, result);&#xA;                setResultVisible(true);&#xA;            }&#xA;&#xA;            btn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                if (isRunning) {&#xA;                    return;&#xA;                }&#xA;&#xA;                const body = {&#xA;                        text: textEditor.getValue(),&#xA;                        params: getParams()&#xA;                };&#xA;                const url = &#34;https:\/\/worker-v2-811908774949.us-east1.run.app&#34;;&#xA;&#xA;                onStart();&#xA;                fetch(url, {&#xA;                    method: &#39;post&#39;,&#xA;                    cache: &#39;no-cache&#39;,&#xA;                    headers: {&#xA;                        &#39;Content-Type&#39;: &#39;application/json; charset=utf-8&#39;&#xA;                    },&#xA;                    signal: AbortSignal.timeout(1000 * 60), &#xA;                    body: JSON.stringify(body)&#xA;                })&#xA;                    .then(r =&gt; {&#xA;                        if (r.status === 200) {&#xA;                            return r.json()&#xA;                        }&#xA;                        &#xA;                        if (r.status === 426) {&#xA;                            throw new Error(`Too many requests. Try again later.`);&#xA;                        }&#xA;                        &#xA;                        if (r.status === 400) {&#xA;                            return r.json().then((data) =&gt; {&#xA;                                if (data.details) {&#xA;                                    throw new Error(data.details);&#xA;                                }&#xA;                                &#xA;                                throw new Error(data.error);&#xA;                            });&#xA;                        }&#xA;                        &#xA;                        throw new Error(`Unexpected error. Try again later.`);&#xA;                    })&#xA;                    .then((data) =&gt; {&#xA;                        onEnd(JSON.stringify(data, null, 4));&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        onEnd(err.message);&#xA;                    });&#xA;            });&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;The query waits for the card count to increase after the click. To use the arrow form, replace the dispatch statement with &lt;code&gt;button &amp;lt;- &amp;quot;click&amp;quot;&lt;/code&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Lab runtime configuration</title>
				<link>https://ferretlang.org/docs/migrations/lab-runtime-configuration/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/migrations/lab-runtime-configuration/</guid>
				<description>&lt;h1 id=&#34;migrate-lab-runtime-configuration&#34;&gt;Migrate Lab runtime configuration&lt;/h1&gt;&#xA;&lt;p&gt;Lab&amp;rsquo;s runtime target identifies the complete adapter endpoint. Adapter settings use &lt;code&gt;--runtime-option&lt;/code&gt;; FQL inputs use the existing parameter facilities. This intentionally breaks the superseded v2 runtime flags.&lt;/p&gt;&#xA;&lt;div class=&#34;table-scroll&#34; role=&#34;region&#34; aria-label=&#34;Scrollable table&#34; tabindex=&#34;0&#34;&gt;&#xA;    &lt;table&gt;&#xA;        &lt;thead&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;th&gt;Previous usage&lt;/th&gt;&#xA;                        &lt;th&gt;Replacement&lt;/th&gt;&#xA;                &lt;/tr&gt;&#xA;        &lt;/thead&gt;&#xA;        &lt;tbody&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;--runtime=wire --runtime-endpoint=tcp://127.0.0.1:50051&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;--runtime=wire+tcp://127.0.0.1:50051&lt;/code&gt;&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;--runtime-connect-timeout=10s&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;--runtime-option=&#39;connect-timeout:&amp;quot;10s&amp;quot;&#39;&lt;/code&gt;&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;--runtime-param=&#39;headers:{...}&#39;&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;--runtime-option=&#39;headers:{...}&#39;&lt;/code&gt;&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;--runtime-param=&#39;path:&amp;quot;/v1/execute&amp;quot;&#39;&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;--runtime-option=&#39;path:&amp;quot;/v1/execute&amp;quot;&#39;&lt;/code&gt;&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;FQL input through &lt;code&gt;--runtime-param&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Existing &lt;code&gt;--param&lt;/code&gt;, bindings, or suite/query parameter facilities&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;LAB_RUNTIME_PARAM&lt;/code&gt; containing adapter settings&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;LAB_RUNTIME_OPTION&lt;/code&gt;&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;LAB_RUNTIME_ENDPOINT&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Include the endpoint in &lt;code&gt;LAB_RUNTIME=wire+tcp://127.0.0.1:&amp;lt;port&amp;gt;&lt;/code&gt;&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;LAB_RUNTIME_CONNECT_TIMEOUT=10s&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;LAB_RUNTIME_OPTION=&#39;connect-timeout:&amp;quot;10s&amp;quot;&#39;&lt;/code&gt;&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;--rp&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Removed; use &lt;code&gt;--runtime-option&lt;/code&gt; for adapter configuration&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;        &lt;/tbody&gt;&#xA;    &lt;/table&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;The separate runtime FQL defaults layer has been removed. A configuration combining runtime defaults and per-run values may need to be expressed using existing CLI, binding, or query/assertion parameter facilities; there is no guaranteed lossless one-for-one migration of that layer. No new defaults layer is introduced. If an older setup launched a binary with &lt;code&gt;bin:&lt;/code&gt; or &lt;code&gt;bin://&lt;/code&gt;, expose its configured runtime through a Wire host or use a Worker-compatible HTTP service. Lab rejects both binary selectors.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Parameters</title>
				<link>https://ferretlang.org/docs/embedding/go/parameters/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/embedding/go/parameters/</guid>
				<description>&lt;h1 id=&#34;parameters&#34;&gt;Parameters&lt;/h1&gt;&#xA;&lt;p&gt;Parameters let the host application inject values into FQL queries. They are the primary way to pass dynamic data — user IDs, URLs, configuration values, thresholds — from Go into a script without string interpolation or query rewriting.&lt;/p&gt;&#xA;&lt;div class=&#34;notification is-warning&#34;&gt;&#xA;&lt;p&gt;FQL source is code. Do not insert runtime data with &lt;code&gt;fmt.Sprintf&lt;/code&gt; or string concatenation. See &lt;a href=&#34;https://ferretlang.org/docs/embedding/go/safe-fql-construction/&#34;&gt;Construct FQL safely&lt;/a&gt; for URL, selector, HTML, and source-composition examples.&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;h2 id=&#34;fql-parameter-syntax&#34;&gt;FQL parameter syntax&lt;/h2&gt;&#xA;&lt;p&gt;In FQL, parameters are referenced with the &lt;code&gt;@&lt;/code&gt; prefix:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Parameters</title>
				<link>https://ferretlang.org/docs/embedding/javascript/parameters/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/embedding/javascript/parameters/</guid>
				<description>&lt;h1 id=&#34;parameters&#34;&gt;Parameters&lt;/h1&gt;&#xA;&lt;p&gt;Bind parameters pass application data into an FQL program without generating source code. FQL reads each value through its &lt;code&gt;@name&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;pass-parameters-to-a-run&#34;&gt;Pass parameters to a run&lt;/h2&gt;&#xA;&lt;p&gt;Provide a plain JavaScript object as &lt;code&gt;params&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor is-readonly is-auto-height&#34;&gt;&#xA;    &lt;textarea id=&#34;code-4-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;&lt;/textarea&gt;&lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;example.javascript&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-meta&#34;&gt;read-only&lt;/span&gt;&#xA;                &lt;button id=&#34;code-4-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;div class=&#34;code-editor-pane&#34;&gt;&#xA;            &lt;div id=&#34;code-4-text&#34; class=&#34;code-editor-text&#34; data-auto-height=&#34;true&#34;&gt;const orders = [&#xA;    { id: &amp;#34;A-100&amp;#34;, customer: &amp;#34;Ada&amp;#34;, total: 125 },&#xA;    { id: &amp;#34;A-101&amp;#34;, customer: &amp;#34;Lin&amp;#34;, total: 48 },&#xA;];&#xA;&#xA;const result = await engine.runJSON(`&#xA;    return for order in @orders {&#xA;        filter order.total &amp;gt;= @minimum&#xA;        return {&#xA;            id: order.id,&#xA;            customer: order.customer,&#xA;        }&#xA;    }&#xA;`, {&#xA;    params: {&#xA;        orders,&#xA;        minimum: 100,&#xA;    },&#xA;});&#xA;&#xA;console.log(result); // [{ id: &amp;#34;A-100&amp;#34;, customer: &amp;#34;Ada&amp;#34; }]&lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const editor = ace.edit(&#39;code-4-text&#39;);&#xA;            editor.setTheme(&#34;ace\/theme\/tomorrow_night&#34;);&#xA;            editor.session.setUseWorker(false);&#xA;            editor.session.setMode(&#34;ace/mode/&#34; + &#39;javascript&#39;);&#xA;            editor.setOptions({&#xA;                readOnly: true,&#xA;                highlightActiveLine: false,&#xA;                highlightGutterLine: false,&#xA;                displayIndentGuides: false,&#xA;                printMargin: false&#xA;            });&#xA;            editor.renderer.$cursorLayer.element.style.display = &#34;none&#34;&#xA;            const copyBtn = document.querySelector(&#39;#code-4-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#code-4-copy-clipboard&#39;);&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy source to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(editor.getValue())&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy source&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;            function resizeAutoHeightEditor() {&#xA;                const lineHeight = editor.renderer.lineHeight || 21;&#xA;                const screenLines = Math.max(editor.session.getScreenLength(), 1);&#xA;                const nextHeight = Math.max(screenLines * lineHeight, 48);&#xA;&#xA;                editor.container.style.height = `${nextHeight}px`;&#xA;                editor.resize();&#xA;            }&#xA;&#xA;            editor.session.on(&#39;change&#39;, resizeAutoHeightEditor);&#xA;            window.addEventListener(&#39;resize&#39;, resizeAutoHeightEditor);&#xA;            resizeAutoHeightEditor();&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;Use the same &lt;code&gt;params&lt;/code&gt; option with &lt;code&gt;plan.runJSON()&lt;/code&gt;. Use &lt;code&gt;plan.createSession({ params })&lt;/code&gt; when a reusable session should capture one parameter set.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Publish a module</title>
				<link>https://ferretlang.org/docs/modules/publish/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/modules/publish/</guid>
				<description>&lt;h1 id=&#34;publish-a-module&#34;&gt;Publish a module&lt;/h1&gt;&#xA;&lt;p&gt;Publishing registers a tagged module release in &lt;a href=&#34;https://github.com/MontFerret/barn&#34;&gt;Barn&lt;/a&gt;, the Git-backed source of the Ferret Registry. The CLI validates the public release, prepares its immutable records, and uses the GitHub API to open the Barn pull request. Publication completes after that pull request passes review and is merged.&lt;/p&gt;&#xA;&lt;h2 id=&#34;complete-the-module-manifest&#34;&gt;Complete the module manifest&lt;/h2&gt;&#xA;&lt;p&gt;Replace the scaffold placeholders with release metadata before tagging the repository. A standalone &lt;code&gt;ziflex/kvplugin&lt;/code&gt; module can use:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Remote runtimes (Wire)</title>
				<link>https://ferretlang.org/docs/embedding/wire/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/embedding/wire/</guid>
				<description>&lt;h1 id=&#34;remote-runtimes-wire&#34;&gt;Remote runtimes (Wire)&lt;/h1&gt;&#xA;&lt;p&gt;Your application embeds Ferret and registers an &lt;code&gt;app::greet&lt;/code&gt; function. A separate client needs to run a script that calls it, using the application&amp;rsquo;s existing runtime setup:&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor is-readonly is-auto-height&#34;&gt;&#xA;    &lt;textarea id=&#34;code-6-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;&lt;/textarea&gt;&lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;greeting.fql&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-meta&#34;&gt;read-only&lt;/span&gt;&#xA;                &lt;button id=&#34;code-6-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;div class=&#34;code-editor-pane&#34;&gt;&#xA;            &lt;div id=&#34;code-6-text&#34; class=&#34;code-editor-text&#34; data-auto-height=&#34;true&#34;&gt;RETURN app::greet(@name)&lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const editor = ace.edit(&#39;code-6-text&#39;);&#xA;            editor.setTheme(&#34;ace\/theme\/tomorrow_night&#34;);&#xA;            editor.session.setUseWorker(false);&#xA;            editor.session.setMode(&#34;ace/mode/&#34; + &#39;fql&#39;);&#xA;            editor.setOptions({&#xA;                readOnly: true,&#xA;                highlightActiveLine: false,&#xA;                highlightGutterLine: false,&#xA;                displayIndentGuides: false,&#xA;                printMargin: false&#xA;            });&#xA;            editor.renderer.$cursorLayer.element.style.display = &#34;none&#34;&#xA;            const copyBtn = document.querySelector(&#39;#code-6-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#code-6-copy-clipboard&#39;);&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy source to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(editor.getValue())&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy source&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;            function resizeAutoHeightEditor() {&#xA;                const lineHeight = editor.renderer.lineHeight || 21;&#xA;                const screenLines = Math.max(editor.session.getScreenLength(), 1);&#xA;                const nextHeight = Math.max(screenLines * lineHeight, 48);&#xA;&#xA;                editor.container.style.height = `${nextHeight}px`;&#xA;                editor.resize();&#xA;            }&#xA;&#xA;            editor.session.on(&#39;change&#39;, resizeAutoHeightEditor);&#xA;            window.addEventListener(&#39;resize&#39;, resizeAutoHeightEditor);&#xA;            resizeAutoHeightEditor();&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;Wire lets the client compile and execute this script against the hosted runtime. With &lt;code&gt;name&lt;/code&gt; set to &lt;code&gt;&amp;quot;Ada&amp;quot;&lt;/code&gt;, it returns the JSON string &lt;code&gt;&amp;quot;Hello, Ada!&amp;quot;&lt;/code&gt;. The custom function is registered on the host; the client sends source and parameters.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Subquery Expressions</title>
				<link>https://ferretlang.org/docs/language/control-flow/subqueries/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/language/control-flow/subqueries/</guid>
				<description>&lt;h1 id=&#34;subquery-expressions&#34;&gt;Subquery Expressions&lt;/h1&gt;&#xA;&lt;p&gt;A subquery is a collecting query block wrapped in parentheses and used as a value. Most often it is a &lt;a href=&#34;https://ferretlang.org/docs/language/control-flow/for/&#34;&gt;&lt;code&gt;for&lt;/code&gt;&lt;/a&gt; loop whose array result is assigned, returned, or passed to another expression. Because a subquery is a value, the loop must have its own &lt;code&gt;return&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor is-horizontal is-auto-height&#34;&gt;&#xA;    &lt;textarea id=&#34;code-editor-1-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;&lt;/textarea&gt;&#xA;&#xA;    &lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div id=&#34;code-editor-1-header&#34; class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;example.fql&lt;/span&gt;&#xA;                &lt;small&gt;Ferret v2&lt;/small&gt;&#xA;            &lt;/div&gt;&#xA;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;button id=&#34;code-editor-1-result-toggle-button&#34; class=&#34;button is-outlined is-light code-editor-button&#34; type=&#34;button&#34; aria-expanded=&#34;false&#34; aria-controls=&#34;code-editor-1-result-pane&#34;&gt;Output&lt;/button&gt;&#xA;                &lt;button id=&#34;code-editor-1-params-toggle-button&#34; class=&#34;button is-outlined is-light code-editor-button&#34; type=&#34;button&#34; aria-expanded=&#34;false&#34; aria-controls=&#34;code-editor-1-params-drawer&#34;&gt;Params&lt;/button&gt;&#xA;                &lt;button id=&#34;code-editor-1-run-button&#34; class=&#34;run button is-outlined is-light code-editor-button&#34; type=&#34;button&#34; aria-label=&#34;Run query&#34;&gt;&#xA;                    &lt;span class=&#34;code-editor-run-label&#34;&gt;Run&lt;/span&gt;&#xA;                    &lt;span id=&#34;code-editor-1-run-button-spinner&#34; class=&#34;code-editor-run-spinner&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div id=&#34;code-editor-1-progress&#34; class=&#34;code-editor-progress&#34; role=&#34;progressbar&#34; aria-label=&#34;Running query&#34; hidden&gt;&lt;/div&gt;&#xA;            &lt;span id=&#34;code-editor-1-run-status&#34; class=&#34;code-editor-sr-only&#34; aria-live=&#34;polite&#34; aria-atomic=&#34;true&#34;&gt;&lt;/span&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;div class=&#34;code-editor-workspace&#34;&gt;&#xA;            &lt;div id=&#34;code-editor-1-grid&#34; class=&#34;code-editor-grid&#34; style=&#34;grid-template-columns: 1fr;&#34;&gt;&#xA;                &lt;div id=&#34;code-editor-1-source-pane&#34; class=&#34;code-editor-pane code-editor-pane-source&#34;&gt;&#xA;                    &lt;div class=&#34;code-editor-pane-header&#34;&gt;&#xA;                        &lt;span&gt;query.fql&lt;/span&gt;&#xA;                        &lt;div class=&#34;code-editor-pane-header-actions&#34;&gt;&#xA;                            &lt;span&gt;FQL&lt;/span&gt;&#xA;                            &lt;button id=&#34;code-editor-1-copy-button&#34; class=&#34;code-editor-pane-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;                        &lt;/div&gt;&#xA;                    &lt;/div&gt;&#xA;                    &lt;div id=&#34;code-editor-1-text&#34; class=&#34;code-editor-text&#34; data-auto-height=&#34;true&#34;&gt;let users = [&#xA;    { name: &amp;#34;Ada&amp;#34;, active: true },&#xA;    { name: &amp;#34;Grace&amp;#34;, active: false },&#xA;    { name: &amp;#34;Linus&amp;#34;, active: true }&#xA;]&#xA;&#xA;let activeUsers = (&#xA;    for u in users {&#xA;        filter u.active&#xA;        return u.name&#xA;    }&#xA;)&#xA;&#xA;return activeUsers&lt;/div&gt;&#xA;                &lt;/div&gt;&#xA;&#xA;                &lt;div id=&#34;code-editor-1-result-pane&#34; class=&#34;code-editor-pane code-editor-pane-result&#34; hidden&gt;&#xA;                    &lt;div class=&#34;code-editor-pane-header&#34;&gt;&#xA;                        &lt;span&gt;result.json&lt;/span&gt;&#xA;                        &lt;div class=&#34;code-editor-pane-header-actions&#34;&gt;&#xA;                            &lt;span&gt;output&lt;/span&gt;&#xA;                            &lt;button id=&#34;code-editor-1-result-close-button&#34; class=&#34;code-editor-pane-button&#34; type=&#34;button&#34; aria-controls=&#34;code-editor-1-result-pane&#34;&gt;Close&lt;/button&gt;&#xA;                        &lt;/div&gt;&#xA;                    &lt;/div&gt;&#xA;                    &lt;div id=&#34;code-editor-1-result&#34; class=&#34;code-editor-result&#34; data-auto-height=&#34;true&#34;&gt;&lt;/div&gt;&#xA;                &lt;/div&gt;&#xA;            &lt;/div&gt;&#xA;&#xA;            &lt;aside id=&#34;code-editor-1-params-drawer&#34; class=&#34;code-editor-params-drawer&#34; aria-labelledby=&#34;code-editor-1-params-title&#34; hidden&gt;&#xA;                &lt;div class=&#34;code-editor-params-header&#34;&gt;&#xA;                    &lt;div&gt;&#xA;                        &lt;span id=&#34;code-editor-1-params-title&#34; class=&#34;code-editor-params-title&#34;&gt;Query parameters&lt;/span&gt;&#xA;                        &lt;span class=&#34;code-editor-params-description&#34;&gt;Values are parsed as JSON when possible.&lt;/span&gt;&#xA;                    &lt;/div&gt;&#xA;                    &lt;button id=&#34;code-editor-1-params-close-button&#34; class=&#34;code-editor-pane-button&#34; type=&#34;button&#34;&gt;Close&lt;/button&gt;&#xA;                &lt;/div&gt;&#xA;                &lt;div class=&#34;code-editor-params-body&#34;&gt;&#xA;                    &lt;div id=&#34;code-editor-1-params-empty&#34; class=&#34;code-editor-params-empty&#34;&gt;No parameters added.&lt;/div&gt;&#xA;                    &lt;div id=&#34;code-editor-1-params-rows&#34; class=&#34;code-editor-params-rows&#34;&gt;&lt;/div&gt;&#xA;                &lt;/div&gt;&#xA;                &lt;div class=&#34;code-editor-params-footer&#34;&gt;&#xA;                    &lt;button id=&#34;code-editor-1-params-add-button&#34; class=&#34;code-editor-params-add-button&#34; type=&#34;button&#34;&gt;Add parameter&lt;/button&gt;&#xA;                &lt;/div&gt;&#xA;            &lt;/aside&gt;&#xA;        &lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            function createEditor(id, mode, useWorker) {&#xA;                const editor = ace.edit(id);&#xA;                editor.setTheme(&#34;ace\/theme\/tomorrow_night&#34;);&#xA;                editor.session.setUseWorker(useWorker);&#xA;                editor.session.setMode(&#34;ace/mode/&#34; + mode);&#xA;                editor.setOptions({&#xA;                    displayIndentGuides: false,&#xA;                    printMargin: false&#xA;                });&#xA;&#xA;                return editor;&#xA;            }&#xA;&#xA;            const btn = document.querySelector(&#39;#code-editor-1-run-button&#39;);&#xA;            const textEditor = createEditor(&#39;code-editor-1-text&#39;, &#39;fql&#39;, true);&#xA;            const resultEditor = createEditor(&#39;code-editor-1-result&#39;, &#39;json&#39;, false);&#xA;            resultEditor.setReadOnly(true);&#xA;            const resultExpandBtn = null;&#xA;            const editorHeader = document.querySelector(&#39;#code-editor-1-header&#39;);&#xA;            const editorWorkspace = document.querySelector(&#39;#code-editor-1-grid&#39;).parentElement;&#xA;            const editorGrid = document.querySelector(&#39;#code-editor-1-grid&#39;);&#xA;            const runProgress = document.querySelector(&#39;#code-editor-1-progress&#39;);&#xA;            const runStatus = document.querySelector(&#39;#code-editor-1-run-status&#39;);&#xA;            const resultPane = document.querySelector(&#39;#code-editor-1-result-pane&#39;);&#xA;            const resultToggleBtn = document.querySelector(&#39;#code-editor-1-result-toggle-button&#39;);&#xA;            const resultCloseBtn = document.querySelector(&#39;#code-editor-1-result-close-button&#39;);&#xA;            const paramsToggleBtn = document.querySelector(&#39;#code-editor-1-params-toggle-button&#39;);&#xA;            const paramsDrawer = document.querySelector(&#39;#code-editor-1-params-drawer&#39;);&#xA;            const paramsCloseBtn = document.querySelector(&#39;#code-editor-1-params-close-button&#39;);&#xA;            const paramsAddBtn = document.querySelector(&#39;#code-editor-1-params-add-button&#39;);&#xA;            const paramsRows = document.querySelector(&#39;#code-editor-1-params-rows&#39;);&#xA;            const paramsEmpty = document.querySelector(&#39;#code-editor-1-params-empty&#39;);&#xA;            let isResultVisible = !resultPane.hidden;&#xA;            let isParamsVisible = !paramsDrawer.hidden;&#xA;&#xA;            function resetResultExpansion() {&#xA;                if (!resultExpandBtn) {&#xA;                    return;&#xA;                }&#xA;&#xA;                isResultExpanded = false;&#xA;                resultExpandBtn.setAttribute(&#39;aria-expanded&#39;, &#39;false&#39;);&#xA;                resultExpandBtn.textContent = &#39;Expand&#39;;&#xA;            }&#xA;&#xA;            function syncEditorLayout() {&#xA;                const sourceHeight = getEditorContentHeight(textEditor);&#xA;                textEditor.container.style.height = `${sourceHeight}px`;&#xA;&#xA;                if (isResultVisible) {&#xA;                    const resultHeight = getEditorContentHeight(resultEditor);&#xA;                    applyResultHeight(resultHeight);&#xA;                }&#xA;&#xA;                textEditor.resize();&#xA;&#xA;                if (isResultVisible) {&#xA;                    resultEditor.resize();&#xA;                }&#xA;            }&#xA;&#xA;            function setResultVisible(nextVisible) {&#xA;                isResultVisible = nextVisible;&#xA;                resultPane.hidden = !nextVisible;&#xA;                resultToggleBtn.setAttribute(&#39;aria-expanded&#39;, nextVisible ? &#39;true&#39; : &#39;false&#39;);&#xA;                editorGrid.style.gridTemplateColumns = nextVisible ? &#39;&#39; : &#39;1fr&#39;;&#xA;&#xA;                if (!nextVisible) {&#xA;                    resetResultExpansion();&#xA;                    syncEditorLayout();&#xA;                    return;&#xA;                }&#xA;&#xA;                window.requestAnimationFrame(() =&gt; {&#xA;                    syncEditorLayout();&#xA;                    resultEditor.resize(true);&#xA;                });&#xA;            }&#xA;&#xA;            resultToggleBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setResultVisible(!isResultVisible);&#xA;            });&#xA;&#xA;            resultCloseBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setResultVisible(false);&#xA;            });&#xA;&#xA;            const collapsedResultHeightStyle = resultEditor.container.style.height;&#xA;            let isResultExpanded = false;&#xA;&#xA;            function getEditorContentHeight(editor) {&#xA;                const lineHeight = editor.renderer.lineHeight || 21;&#xA;                const screenLines = Math.max(editor.session.getScreenLength(), 1);&#xA;&#xA;                return Math.max(screenLines * lineHeight, 48);&#xA;            }&#xA;&#xA;            function getMaxResultHeight(fallbackHeight) {&#xA;                const viewportHeight = window.innerHeight || document.documentElement.clientHeight || fallbackHeight;&#xA;                const rootFontSize = parseFloat(window.getComputedStyle(document.documentElement).fontSize) || 16;&#xA;&#xA;                return Math.min(viewportHeight * 0.45, 32 * rootFontSize);&#xA;            }&#xA;&#xA;            function getCollapsedResultHeight() {&#xA;                return getEditorContentHeight(resultEditor);&#xA;            }&#xA;&#xA;            function getExpandedResultHeight(collapsedHeight) {&#xA;                const lineHeight = resultEditor.renderer.lineHeight || textEditor.renderer.lineHeight || 21;&#xA;                const maxAllowedHeight = getMaxResultHeight(collapsedHeight);&#xA;                const screenLines = Math.max(resultEditor.session.getScreenLength(), 1);&#xA;                const contentHeight = (screenLines * lineHeight) + (lineHeight * 2);&#xA;                const targetHeight = Math.min(contentHeight, maxAllowedHeight);&#xA;&#xA;                return Math.max(collapsedHeight, Math.round(targetHeight));&#xA;            }&#xA;&#xA;            function applyResultHeight(collapsedHeight) {&#xA;                if (resultExpandBtn &amp;&amp; isResultExpanded) {&#xA;                    resultEditor.container.style.height = `${getExpandedResultHeight(collapsedHeight)}px`;&#xA;                } else {&#xA;                    resultEditor.container.style.height = `${Math.min(collapsedHeight, getMaxResultHeight(collapsedHeight))}px`;&#xA;                }&#xA;&#xA;                resultEditor.resize();&#xA;            }&#xA;            textEditor.session.on(&#39;change&#39;, syncEditorLayout);&#xA;&#xA;            if (resultExpandBtn) {&#xA;                resultExpandBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                    isResultExpanded = !isResultExpanded;&#xA;                    resultExpandBtn.setAttribute(&#39;aria-expanded&#39;, isResultExpanded ? &#39;true&#39; : &#39;false&#39;);&#xA;                    resultExpandBtn.textContent = isResultExpanded ? &#39;Collapse&#39; : &#39;Expand&#39;;&#xA;                    syncEditorLayout();&#xA;                });&#xA;            }&#xA;&#xA;            function syncParamsEmptyState() {&#xA;                paramsEmpty.hidden = paramsRows.children.length &gt; 0;&#xA;            }&#xA;&#xA;            function formatParamValue(value) {&#xA;                return typeof value === &#39;string&#39; ? value : JSON.stringify(value);&#xA;            }&#xA;&#xA;            function createParamRow(name, value) {&#xA;                const row = document.createElement(&#39;div&#39;);&#xA;                row.className = &#39;code-editor-param-row&#39;;&#xA;&#xA;                const nameInput = document.createElement(&#39;input&#39;);&#xA;                nameInput.className = &#39;code-editor-param-input code-editor-param-name&#39;;&#xA;                nameInput.type = &#39;text&#39;;&#xA;                nameInput.placeholder = &#39;name&#39;;&#xA;                nameInput.setAttribute(&#39;aria-label&#39;, &#39;Parameter name&#39;);&#xA;                nameInput.value = name || &#39;&#39;;&#xA;&#xA;                const separator = document.createElement(&#39;span&#39;);&#xA;                separator.className = &#39;code-editor-param-separator&#39;;&#xA;                separator.setAttribute(&#39;aria-hidden&#39;, &#39;true&#39;);&#xA;                separator.textContent = &#39;:&#39;;&#xA;&#xA;                const valueInput = document.createElement(&#39;input&#39;);&#xA;                valueInput.className = &#39;code-editor-param-input code-editor-param-value&#39;;&#xA;                valueInput.type = &#39;text&#39;;&#xA;                valueInput.placeholder = &#39;value&#39;;&#xA;                valueInput.setAttribute(&#39;aria-label&#39;, &#39;Parameter value&#39;);&#xA;                valueInput.value = value === undefined ? &#39;&#39; : formatParamValue(value);&#xA;&#xA;                const removeBtn = document.createElement(&#39;button&#39;);&#xA;                removeBtn.className = &#39;code-editor-param-remove-button&#39;;&#xA;                removeBtn.type = &#39;button&#39;;&#xA;                removeBtn.setAttribute(&#39;aria-label&#39;, `Remove parameter ${name || &#39;row&#39;}`);&#xA;                removeBtn.textContent = &#39;Remove&#39;;&#xA;                removeBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                    row.remove();&#xA;                    syncParamsEmptyState();&#xA;                });&#xA;&#xA;                row.append(nameInput, separator, valueInput, removeBtn);&#xA;                paramsRows.appendChild(row);&#xA;                syncParamsEmptyState();&#xA;&#xA;                return nameInput;&#xA;            }&#xA;&#xA;            function setParamsVisible(nextVisible) {&#xA;                isParamsVisible = nextVisible;&#xA;                paramsDrawer.hidden = !nextVisible;&#xA;                paramsToggleBtn.setAttribute(&#39;aria-expanded&#39;, nextVisible ? &#39;true&#39; : &#39;false&#39;);&#xA;                editorWorkspace.classList.toggle(&#39;is-params-open&#39;, nextVisible);&#xA;&#xA;                if (nextVisible) {&#xA;                    paramsCloseBtn.focus();&#xA;                } else {&#xA;                    paramsToggleBtn.focus();&#xA;                }&#xA;            }&#xA;&#xA;            function setParamsControlsDisabled(disabled) {&#xA;                paramsToggleBtn.disabled = disabled;&#xA;                paramsDrawer.querySelectorAll(&#39;button, input&#39;).forEach((control) =&gt; {&#xA;                    control.disabled = disabled;&#xA;                });&#xA;            }&#xA;&#xA;            function parseParamValue(value) {&#xA;                try {&#xA;                    return JSON.parse(value);&#xA;                } catch (err) {&#xA;                    return value;&#xA;                }&#xA;            }&#xA;&#xA;            function getParams() {&#xA;                return Array.from(paramsRows.querySelectorAll(&#39;.code-editor-param-row&#39;)).reduce((params, row) =&gt; {&#xA;                    const name = row.querySelector(&#39;.code-editor-param-name&#39;).value.trim();&#xA;&#xA;                    if (name) {&#xA;                        const value = row.querySelector(&#39;.code-editor-param-value&#39;).value;&#xA;                        params[name] = parseParamValue(value);&#xA;                    }&#xA;&#xA;                    return params;&#xA;                }, {});&#xA;            }&#xA;&#xA;            const initialParams = JSON.parse(&#34;{}&#34;);&#xA;&#xA;            if (initialParams &amp;&amp; typeof initialParams === &#39;object&#39; &amp;&amp; !Array.isArray(initialParams)) {&#xA;                Object.entries(initialParams).forEach(([name, value]) =&gt; {&#xA;                    createParamRow(name, value);&#xA;                });&#xA;            }&#xA;&#xA;            syncParamsEmptyState();&#xA;&#xA;            paramsToggleBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setParamsVisible(!isParamsVisible);&#xA;            });&#xA;&#xA;            paramsCloseBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setParamsVisible(false);&#xA;            });&#xA;&#xA;            paramsAddBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                createParamRow(&#39;&#39;, &#39;&#39;).focus();&#xA;            });&#xA;&#xA;            window.addEventListener(&#39;resize&#39;, syncEditorLayout);&#xA;            syncEditorLayout();&#xA;&#xA;            function setContent(editor, content) {&#xA;                editor.setValue(content, -1);&#xA;            }&#xA;                const copyClipboardEl = document.querySelector(&#39;#code-editor-1-copy-clipboard&#39;);&#xA;                const copyBtn = document.querySelector(&#39;#code-editor-1-copy-button&#39;);&#xA;&#xA;                function copyTextWithFallback(content) {&#xA;                    copyClipboardEl.value = content;&#xA;                    copyClipboardEl.focus();&#xA;                    copyClipboardEl.select();&#xA;&#xA;                    if (!document.execCommand(&#39;copy&#39;)) {&#xA;                        throw new Error(&#39;Could not copy source to the clipboard&#39;);&#xA;                    }&#xA;                }&#xA;&#xA;                function copyTextToClipboard(content) {&#xA;                    if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                        return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                            copyTextWithFallback(content);&#xA;                        });&#xA;                    }&#xA;&#xA;                    copyTextWithFallback(content);&#xA;&#xA;                    return Promise.resolve();&#xA;                }&#xA;&#xA;                copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                    copyTextToClipboard(textEditor.getValue())&#xA;                        .then(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copied&#39;;&#xA;                            window.setTimeout(() =&gt; {&#xA;                                copyBtn.textContent = &#39;Copy&#39;;&#xA;                            }, 1200);&#xA;                        })&#xA;                        .catch((err) =&gt; {&#xA;                            console.error(&#39;Failed to copy source&#39;);&#xA;                            console.error(err);&#xA;                        });&#xA;                });&#xA;&#xA;            let isRunning = false;&#xA;&#xA;            function onStart() {&#xA;                isRunning = true;&#xA;                textEditor.setReadOnly(true);&#xA;                runProgress.hidden = false;&#xA;                runStatus.textContent = &#39;Running query&#39;;&#xA;                editorHeader.setAttribute(&#39;aria-busy&#39;, &#39;true&#39;);&#xA;                editorGrid.setAttribute(&#39;aria-busy&#39;, &#39;true&#39;);&#xA;                btn.classList.add(&#39;is-running&#39;);&#xA;                btn.setAttribute(&#39;aria-busy&#39;, &#39;true&#39;);&#xA;                btn.setAttribute(&#39;aria-label&#39;, &#39;Running query&#39;);&#xA;                btn.disabled = true;&#xA;                setParamsControlsDisabled(true);&#xA;            }&#xA;&#xA;            function onEnd(result) {&#xA;                isRunning = false;&#xA;                textEditor.setReadOnly(false);&#xA;                runProgress.hidden = true;&#xA;                runStatus.textContent = &#39;&#39;;&#xA;                editorHeader.setAttribute(&#39;aria-busy&#39;, &#39;false&#39;);&#xA;                editorGrid.setAttribute(&#39;aria-busy&#39;, &#39;false&#39;);&#xA;                btn.classList.remove(&#39;is-running&#39;);&#xA;                btn.setAttribute(&#39;aria-busy&#39;, &#39;false&#39;);&#xA;                btn.setAttribute(&#39;aria-label&#39;, &#39;Run query&#39;);&#xA;                btn.disabled = false;&#xA;                setParamsControlsDisabled(false);&#xA;&#xA;                setContent(resultEditor, result);&#xA;                setResultVisible(true);&#xA;            }&#xA;&#xA;            btn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                if (isRunning) {&#xA;                    return;&#xA;                }&#xA;&#xA;                const body = {&#xA;                        text: textEditor.getValue(),&#xA;                        params: getParams()&#xA;                };&#xA;                const url = &#34;https:\/\/worker-v2-811908774949.us-east1.run.app&#34;;&#xA;&#xA;                onStart();&#xA;                fetch(url, {&#xA;                    method: &#39;post&#39;,&#xA;                    cache: &#39;no-cache&#39;,&#xA;                    headers: {&#xA;                        &#39;Content-Type&#39;: &#39;application/json; charset=utf-8&#39;&#xA;                    },&#xA;                    signal: AbortSignal.timeout(1000 * 60), &#xA;                    body: JSON.stringify(body)&#xA;                })&#xA;                    .then(r =&gt; {&#xA;                        if (r.status === 200) {&#xA;                            return r.json()&#xA;                        }&#xA;                        &#xA;                        if (r.status === 426) {&#xA;                            throw new Error(`Too many requests. Try again later.`);&#xA;                        }&#xA;                        &#xA;                        if (r.status === 400) {&#xA;                            return r.json().then((data) =&gt; {&#xA;                                if (data.details) {&#xA;                                    throw new Error(data.details);&#xA;                                }&#xA;                                &#xA;                                throw new Error(data.error);&#xA;                            });&#xA;                        }&#xA;                        &#xA;                        throw new Error(`Unexpected error. Try again later.`);&#xA;                    })&#xA;                    .then((data) =&gt; {&#xA;                        onEnd(JSON.stringify(data, null, 4));&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        onEnd(err.message);&#xA;                    });&#xA;            });&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;The parentheses are required when a &lt;code&gt;for&lt;/code&gt; is embedded in another expression. Without them, a top-level &lt;code&gt;for&lt;/code&gt; is a statement and any collected array is discarded.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Writing Tests</title>
				<link>https://ferretlang.org/docs/tools/lab/writing-tests/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/tools/lab/writing-tests/</guid>
				<description>&lt;h1 id=&#34;writing-tests&#34;&gt;Writing Tests&lt;/h1&gt;&#xA;&lt;p&gt;Lab runs two kinds of tests: FQL unit tests and YAML suites. Use a plain &lt;code&gt;.fql&lt;/code&gt; file when the script itself is the test. Use a YAML suite when you want to separate the query from an assertion or require a runtime error.&lt;/p&gt;&#xA;&lt;h2 id=&#34;write-a-fql-unit-test&#34;&gt;Write a FQL unit test&lt;/h2&gt;&#xA;&lt;p&gt;A &lt;code&gt;.fql&lt;/code&gt; test passes when Ferret executes the script without returning an error.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor is-readonly is-auto-height&#34;&gt;&#xA;    &lt;textarea id=&#34;code-3-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;&lt;/textarea&gt;&lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;example.fql&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-meta&#34;&gt;read-only&lt;/span&gt;&#xA;                &lt;button id=&#34;code-3-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;div class=&#34;code-editor-pane&#34;&gt;&#xA;            &lt;div id=&#34;code-3-text&#34; class=&#34;code-editor-text&#34; data-auto-height=&#34;true&#34;&gt;let users = [&#xA;  { name: &amp;#34;Ada&amp;#34; },&#xA;  { name: &amp;#34;Grace&amp;#34; }&#xA;]&#xA;&#xA;return t::eq(length(users), 2)&lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const editor = ace.edit(&#39;code-3-text&#39;);&#xA;            editor.setTheme(&#34;ace\/theme\/tomorrow_night&#34;);&#xA;            editor.session.setUseWorker(false);&#xA;            editor.session.setMode(&#34;ace/mode/&#34; + &#39;fql&#39;);&#xA;            editor.setOptions({&#xA;                readOnly: true,&#xA;                highlightActiveLine: false,&#xA;                highlightGutterLine: false,&#xA;                displayIndentGuides: false,&#xA;                printMargin: false&#xA;            });&#xA;            editor.renderer.$cursorLayer.element.style.display = &#34;none&#34;&#xA;            const copyBtn = document.querySelector(&#39;#code-3-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#code-3-copy-clipboard&#39;);&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy source to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(editor.getValue())&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy source&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;            function resizeAutoHeightEditor() {&#xA;                const lineHeight = editor.renderer.lineHeight || 21;&#xA;                const screenLines = Math.max(editor.session.getScreenLength(), 1);&#xA;                const nextHeight = Math.max(screenLines * lineHeight, 48);&#xA;&#xA;                editor.container.style.height = `${nextHeight}px`;&#xA;                editor.resize();&#xA;            }&#xA;&#xA;            editor.session.on(&#39;change&#39;, resizeAutoHeightEditor);&#xA;            window.addEventListener(&#39;resize&#39;, resizeAutoHeightEditor);&#xA;            resizeAutoHeightEditor();&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;Save the file as &lt;code&gt;users.fql&lt;/code&gt; and run it:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Wire security</title>
				<link>https://ferretlang.org/docs/embedding/wire-security/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/embedding/wire-security/</guid>
				<description>&lt;h1 id=&#34;secure-a-wire-endpoint&#34;&gt;Secure a Wire endpoint&lt;/h1&gt;&#xA;&lt;p&gt;Wire exposes the host&amp;rsquo;s configured runtime. Protect that endpoint with verified transport identities and host-defined access policy. The examples below are compiled and tested in the &lt;a href=&#34;https://github.com/MontFerret/montferret.github.io/tree/main/examples/wire&#34;&gt;Wire demo module&lt;/a&gt;; follow the &lt;a href=&#34;https://ferretlang.org/docs/embedding/wire/#run-a-host-and-client&#34;&gt;setup instructions&lt;/a&gt; first. They use the same published Wire &lt;code&gt;v1.0.0-alpha.4&lt;/code&gt; and API &lt;code&gt;v1.0.0-alpha.21&lt;/code&gt; consumable-output contract as the greeting demo.&lt;/p&gt;&#xA;&lt;p&gt;Each host function accepts an existing &lt;code&gt;api.Runtime&lt;/code&gt; and returns a configured &lt;code&gt;*server.Server&lt;/code&gt;. Start it with blocking &lt;code&gt;srv.Run(ctx, address)&lt;/code&gt;, or use &lt;code&gt;srv.Serve(ctx, listener)&lt;/code&gt; for a caller-created listener. Both paths apply the same security policy. The tests use ephemeral loopback listeners; production addresses, certificate loading and renewal, trust stores, and token validation are host inputs. Wire provides no certificate-management or built-in authentication service.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Check</title>
				<link>https://ferretlang.org/docs/tools/cli/check/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/tools/cli/check/</guid>
				<description>&lt;h1 id=&#34;check&#34;&gt;Check&lt;/h1&gt;&#xA;&lt;p&gt;The &lt;code&gt;check&lt;/code&gt; command compiles FQL scripts without executing them, reporting any syntax or semantic errors.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor terminal-shortcode&#34;&gt;&#xA;    &lt;textarea id=&#34;terminal-5-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;ferret check script.fql&lt;/textarea&gt;&#xA;&#xA;    &lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;terminal&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;button id=&#34;terminal-5-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;pre id=&#34;terminal-5-content&#34; class=&#34;terminal-body&#34;&gt;&lt;code&gt;&lt;span class=&#34;terminal-row&#34;&gt;&lt;span class=&#34;terminal-prompt&#34; aria-hidden=&#34;true&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;terminal-command&#34;&gt;ferret check script.fql&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const copyBtn = document.querySelector(&#39;#terminal-5-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#terminal-5-copy-clipboard&#39;);&#xA;            const terminalContent = copyClipboardEl.value;&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy terminal commands to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(terminalContent)&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy terminal commands&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;If the script is valid, the command exits silently with code 0.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Construct FQL Safely</title>
				<link>https://ferretlang.org/docs/embedding/go/safe-fql-construction/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/embedding/go/safe-fql-construction/</guid>
				<description>&lt;h1 id=&#34;construct-fql-safely&#34;&gt;Construct FQL safely&lt;/h1&gt;&#xA;&lt;p&gt;An embedding application provides two different inputs to Ferret: FQL source to compile and runtime values for that source to consume. Keep that boundary explicit.&lt;/p&gt;&#xA;&lt;div class=&#34;notification is-warning&#34;&gt;&#xA;&lt;p&gt;&lt;strong&gt;FQL source is code.&lt;/strong&gt; Do not insert runtime data with &lt;code&gt;fmt.Sprintf&lt;/code&gt; or string concatenation. URLs, CSS selectors, HTML, credentials, identifiers, request bodies, and configuration values should normally be passed as engine or session parameters.&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;h2 id=&#34;parameterize-runtime-values&#34;&gt;Parameterize runtime values&lt;/h2&gt;&#xA;&lt;p&gt;Interpolating a value into FQL makes the value part of the source text. Quotes or other FQL syntax in that value can change the program or make it fail to compile.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Ferret daemon</title>
				<link>https://ferretlang.org/docs/tools/ferretd/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/tools/ferretd/</guid>
				<description>&lt;h1 id=&#34;ferret-daemon&#34;&gt;Ferret daemon&lt;/h1&gt;&#xA;&lt;p&gt;&lt;code&gt;ferretd&lt;/code&gt; provides developer services for FQL editors and other clients. Use it to analyze an open document, run a saved workspace script, or debug FQL from an editor. An editor integration can supply the executable. Standalone clients can download the &lt;a href=&#34;https://github.com/MontFerret/ferretd/releases/tag/v1.0.0-alpha.13&#34;&gt;daemon prerelease&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;div class=&#34;table-scroll&#34; role=&#34;region&#34; aria-label=&#34;Scrollable table&#34; tabindex=&#34;0&#34;&gt;&#xA;    &lt;table&gt;&#xA;        &lt;thead&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;th&gt;Command&lt;/th&gt;&#xA;                        &lt;th&gt;Use&lt;/th&gt;&#xA;                &lt;/tr&gt;&#xA;        &lt;/thead&gt;&#xA;        &lt;tbody&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;ferretd lsp&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Start the experimental language server over stdio for diagnostics, completion, navigation, semantic highlighting, and formatting. It can analyze unsaved text.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;ferretd serve&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Start the local gRPC service. Clients open a workspace, create a session from a saved FQL file, run it, and read its result.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;ferretd dap&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Start a single-session debug adapter over stdio. The editor controls source breakpoints, stepping, variables, and evaluation.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;        &lt;/tbody&gt;&#xA;    &lt;/table&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;An editor starts each service it uses. The debug adapter runs independently of &lt;code&gt;serve&lt;/code&gt;. Both can use the builtin &lt;code&gt;local&lt;/code&gt; runtime or connect to a configured &lt;a href=&#34;https://ferretlang.org/docs/embedding/wire/&#34;&gt;Wire host&lt;/a&gt;. The host supplies the functions, modules, and runtime policies used by the script. The &lt;a href=&#34;https://ferretlang.org/docs/tools/cli/wire/&#34;&gt;CLI&lt;/a&gt; and &lt;a href=&#34;https://ferretlang.org/docs/tools/lab/wire-runtime/&#34;&gt;Lab&lt;/a&gt; have their own Wire connections.&lt;/p&gt;</description>
			</item>
			<item>
				<title>API</title>
				<link>https://ferretlang.org/docs/tools/worker/api/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/tools/worker/api/</guid>
				<description>&lt;h1 id=&#34;api&#34;&gt;API&lt;/h1&gt;&#xA;&lt;p&gt;Worker exposes a small HTTP API:&lt;/p&gt;&#xA;&lt;div class=&#34;table-scroll&#34; role=&#34;region&#34; aria-label=&#34;Scrollable table&#34; tabindex=&#34;0&#34;&gt;&#xA;    &lt;table&gt;&#xA;        &lt;thead&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;th&gt;Endpoint&lt;/th&gt;&#xA;                        &lt;th&gt;Purpose&lt;/th&gt;&#xA;                &lt;/tr&gt;&#xA;        &lt;/thead&gt;&#xA;        &lt;tbody&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;POST /&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Execute a FQL script.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;GET /health&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Check Worker and dependency health.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;GET /info&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Return public IP and version metadata.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;        &lt;/tbody&gt;&#xA;    &lt;/table&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;All successful query responses are the serialized Ferret result body. Worker does not return a &lt;code&gt;{ &amp;quot;data&amp;quot;: ... }&lt;/code&gt; wrapper.&lt;/p&gt;&#xA;&lt;h2 id=&#34;post-&#34;&gt;&lt;code&gt;POST /&lt;/code&gt;&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;POST /&lt;/code&gt; executes a FQL script.&lt;/p&gt;&#xA;&lt;p&gt;Request body:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;{&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;text&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;return @name&amp;#34;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;params&amp;#34;&lt;/span&gt;: {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#f92672&#34;&gt;&amp;#34;name&amp;#34;&lt;/span&gt;: &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;Ada&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Fields:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Custom Functions</title>
				<link>https://ferretlang.org/docs/embedding/go/custom-functions/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/embedding/go/custom-functions/</guid>
				<description>&lt;h1 id=&#34;custom-functions&#34;&gt;Custom Functions&lt;/h1&gt;&#xA;&lt;p&gt;Custom functions let the host application expose Go logic to FQL scripts. Functions can be registered individually or organized into namespaces.&lt;/p&gt;&#xA;&lt;p&gt;Registered namespace segments and host-function names are case-insensitive in FQL and have one canonical lowercase qualified spelling in registries, documentation, and tooling. Register each symbol once; uppercase and mixed-case registrations are normalized for compatibility.&lt;/p&gt;&#xA;&lt;h2 id=&#34;registering-functions&#34;&gt;Registering functions&lt;/h2&gt;&#xA;&lt;p&gt;The most direct way to add functions is &lt;code&gt;WithFunctionsRegistrar&lt;/code&gt;. The callback receives a &lt;code&gt;runtime.Namespace&lt;/code&gt; where you register functions by arity:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Custom Functions</title>
				<link>https://ferretlang.org/docs/embedding/javascript/custom-functions/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/embedding/javascript/custom-functions/</guid>
				<description>&lt;h1 id=&#34;custom-functions&#34;&gt;Custom Functions&lt;/h1&gt;&#xA;&lt;p&gt;Register JavaScript functions when creating an engine to make application behavior callable from FQL. The &lt;code&gt;functions&lt;/code&gt; option is the simple shorthand when those functions do not need lifecycle callbacks.&lt;/p&gt;&#xA;&lt;h2 id=&#34;register-functions&#34;&gt;Register functions&lt;/h2&gt;&#xA;&lt;p&gt;Pass a plain object through the &lt;code&gt;functions&lt;/code&gt; option:&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor is-readonly is-auto-height&#34;&gt;&#xA;    &lt;textarea id=&#34;code-1-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;&lt;/textarea&gt;&lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;example.javascript&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-meta&#34;&gt;read-only&lt;/span&gt;&#xA;                &lt;button id=&#34;code-1-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;div class=&#34;code-editor-pane&#34;&gt;&#xA;            &lt;div id=&#34;code-1-text&#34; class=&#34;code-editor-text&#34; data-auto-height=&#34;true&#34;&gt;const engine = await create({&#xA;    functions: {&#xA;        full_name: (first, last) =&amp;gt; `${first} ${last}`,&#xA;        &amp;#34;inventory::total&amp;#34;: (price, quantity) =&amp;gt; price * quantity,&#xA;    },&#xA;});&#xA;&#xA;try {&#xA;    const result = await engine.runJSON(`&#xA;        return {&#xA;            name: full_name(&amp;#34;Ada&amp;#34;, &amp;#34;Lovelace&amp;#34;),&#xA;            total: inventory::total(12.5, 4),&#xA;        }&#xA;    `);&#xA;    console.log(result); // { name: &amp;#34;Ada Lovelace&amp;#34;, total: 50 }&#xA;} finally {&#xA;    await engine.close();&#xA;}&lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const editor = ace.edit(&#39;code-1-text&#39;);&#xA;            editor.setTheme(&#34;ace\/theme\/tomorrow_night&#34;);&#xA;            editor.session.setUseWorker(false);&#xA;            editor.session.setMode(&#34;ace/mode/&#34; + &#39;javascript&#39;);&#xA;            editor.setOptions({&#xA;                readOnly: true,&#xA;                highlightActiveLine: false,&#xA;                highlightGutterLine: false,&#xA;                displayIndentGuides: false,&#xA;                printMargin: false&#xA;            });&#xA;            editor.renderer.$cursorLayer.element.style.display = &#34;none&#34;&#xA;            const copyBtn = document.querySelector(&#39;#code-1-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#code-1-copy-clipboard&#39;);&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy source to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(editor.getValue())&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy source&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;            function resizeAutoHeightEditor() {&#xA;                const lineHeight = editor.renderer.lineHeight || 21;&#xA;                const screenLines = Math.max(editor.session.getScreenLength(), 1);&#xA;                const nextHeight = Math.max(screenLines * lineHeight, 48);&#xA;&#xA;                editor.container.style.height = `${nextHeight}px`;&#xA;                editor.resize();&#xA;            }&#xA;&#xA;            editor.session.on(&#39;change&#39;, resizeAutoHeightEditor);&#xA;            window.addEventListener(&#39;resize&#39;, resizeAutoHeightEditor);&#xA;            resizeAutoHeightEditor();&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;Function names are trimmed and canonicalized, including namespace segments. FQL resolution is case-insensitive. Names that normalize to the same function, such as &lt;code&gt;total&lt;/code&gt; and &lt;code&gt;TOTAL&lt;/code&gt;, are rejected as duplicates.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Fmt</title>
				<link>https://ferretlang.org/docs/tools/cli/fmt/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/tools/cli/fmt/</guid>
				<description>&lt;h1 id=&#34;fmt&#34;&gt;Fmt&lt;/h1&gt;&#xA;&lt;p&gt;The &lt;code&gt;fmt&lt;/code&gt; command formats FQL scripts to a consistent style. By default, it writes language keywords and literals in their canonical lowercase form.&lt;/p&gt;&#xA;&lt;h2 id=&#34;format-files-in-place&#34;&gt;Format files in place&lt;/h2&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor terminal-shortcode&#34;&gt;&#xA;    &lt;textarea id=&#34;terminal-9-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;ferret fmt script.fql&lt;/textarea&gt;&#xA;&#xA;    &lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;terminal&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;button id=&#34;terminal-9-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;pre id=&#34;terminal-9-content&#34; class=&#34;terminal-body&#34;&gt;&lt;code&gt;&lt;span class=&#34;terminal-row&#34;&gt;&lt;span class=&#34;terminal-prompt&#34; aria-hidden=&#34;true&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;terminal-command&#34;&gt;ferret fmt script.fql&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const copyBtn = document.querySelector(&#39;#terminal-9-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#terminal-9-copy-clipboard&#39;);&#xA;            const terminalContent = copyClipboardEl.value;&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy terminal commands to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(terminalContent)&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy terminal commands&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;This overwrites the file with the formatted output.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Pagination patterns</title>
				<link>https://ferretlang.org/docs/guides/pagination/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/guides/pagination/</guid>
				<description>&lt;h1 id=&#34;pagination-patterns&#34;&gt;Pagination patterns&lt;/h1&gt;&#xA;&lt;p&gt;Most websites split data across multiple pages. This guide shows how to handle the most common pagination patterns: clicking a &amp;ldquo;next&amp;rdquo; button, iterating numbered pages by URL, and collecting results across all pages.&lt;/p&gt;&#xA;&lt;p&gt;Clicking a link or scrolling to load more content requires the &lt;code&gt;cdp&lt;/code&gt; driver. Numbered pages with server-rendered HTML can be fetched using the memory driver. See &lt;a href=&#34;https://ferretlang.org/docs/guides/browser-pages/&#34;&gt;Browser-driven pages&lt;/a&gt; for setup.&lt;/p&gt;&#xA;&lt;h2 id=&#34;click-a-next-button&#34;&gt;Click a &amp;ldquo;next&amp;rdquo; button&lt;/h2&gt;&#xA;&lt;p&gt;The most common pagination pattern is to click a Next link until it disappears.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Query Expressions</title>
				<link>https://ferretlang.org/docs/language/control-flow/query/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/language/control-flow/query/</guid>
				<description>&lt;h1 id=&#34;query-expressions&#34;&gt;Query Expressions&lt;/h1&gt;&#xA;&lt;p&gt;A &lt;code&gt;query&lt;/code&gt; expression delegates work to a value that knows how to run queries. Instead of expressing the logic in FQL, you provide a query payload and pass it to a host value, such as an HTML document, database connection, API client, or JSON document.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor is-readonly is-auto-height&#34;&gt;&#xA;    &lt;textarea id=&#34;code-10-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;&lt;/textarea&gt;&lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;example.fql&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-meta&#34;&gt;read-only&lt;/span&gt;&#xA;                &lt;button id=&#34;code-10-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;div class=&#34;code-editor-pane&#34;&gt;&#xA;            &lt;div id=&#34;code-10-text&#34; class=&#34;code-editor-text&#34; data-auto-height=&#34;true&#34;&gt;query `.product .title` in doc using css&lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const editor = ace.edit(&#39;code-10-text&#39;);&#xA;            editor.setTheme(&#34;ace\/theme\/tomorrow_night&#34;);&#xA;            editor.session.setUseWorker(false);&#xA;            editor.session.setMode(&#34;ace/mode/&#34; + &#39;fql&#39;);&#xA;            editor.setOptions({&#xA;                readOnly: true,&#xA;                highlightActiveLine: false,&#xA;                highlightGutterLine: false,&#xA;                displayIndentGuides: false,&#xA;                printMargin: false&#xA;            });&#xA;            editor.renderer.$cursorLayer.element.style.display = &#34;none&#34;&#xA;            const copyBtn = document.querySelector(&#39;#code-10-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#code-10-copy-clipboard&#39;);&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy source to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(editor.getValue())&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy source&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;            function resizeAutoHeightEditor() {&#xA;                const lineHeight = editor.renderer.lineHeight || 21;&#xA;                const screenLines = Math.max(editor.session.getScreenLength(), 1);&#xA;                const nextHeight = Math.max(screenLines * lineHeight, 48);&#xA;&#xA;                editor.container.style.height = `${nextHeight}px`;&#xA;                editor.resize();&#xA;            }&#xA;&#xA;            editor.session.on(&#39;change&#39;, resizeAutoHeightEditor);&#xA;            window.addEventListener(&#39;resize&#39;, resizeAutoHeightEditor);&#xA;            resizeAutoHeightEditor();&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;This runs the CSS selector &lt;code&gt;.product .title&lt;/code&gt; against &lt;code&gt;doc&lt;/code&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Quick Start</title>
				<link>https://ferretlang.org/docs/getting-started/quick-start/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/getting-started/quick-start/</guid>
				<description>&lt;h1 id=&#34;quick-start&#34;&gt;Quick Start&lt;/h1&gt;&#xA;&lt;p&gt;In this guide, you will run your first Ferret queries and learn the basic shape of an FQL script.&lt;/p&gt;&#xA;&lt;p&gt;Ferret scripts are written in FQL (Ferret Query Language). A script can define values, work with structured data, query documents, interact with web pages, and return a result. The examples below start with the smallest possible script and gradually introduce the pieces you will use in real-world extraction workflows.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Range Operator</title>
				<link>https://ferretlang.org/docs/language/operators/range/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/language/operators/range/</guid>
				<description>&lt;h1 id=&#34;range-operator&#34;&gt;Range operator&lt;/h1&gt;&#xA;&lt;p&gt;FQL supports expressing simple numeric ranges with the &lt;code&gt;..&lt;/code&gt; operator. This operator can be used to easily iterate over a sequence of numeric values.&lt;/p&gt;&#xA;&lt;p&gt;The &lt;code&gt;..&lt;/code&gt; operator produces an iterable range that includes both integer bounds. Use it in a loop, or return it directly to serialize its values as a JSON array. A range can also count down, as in &lt;code&gt;3..1&lt;/code&gt;.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor is-horizontal is-auto-height&#34;&gt;&#xA;    &lt;textarea id=&#34;code-editor-1-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;&lt;/textarea&gt;&#xA;&#xA;    &lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div id=&#34;code-editor-1-header&#34; class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;example.fql&lt;/span&gt;&#xA;                &lt;small&gt;Ferret v2&lt;/small&gt;&#xA;            &lt;/div&gt;&#xA;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;button id=&#34;code-editor-1-result-toggle-button&#34; class=&#34;button is-outlined is-light code-editor-button&#34; type=&#34;button&#34; aria-expanded=&#34;false&#34; aria-controls=&#34;code-editor-1-result-pane&#34;&gt;Output&lt;/button&gt;&#xA;                &lt;button id=&#34;code-editor-1-params-toggle-button&#34; class=&#34;button is-outlined is-light code-editor-button&#34; type=&#34;button&#34; aria-expanded=&#34;false&#34; aria-controls=&#34;code-editor-1-params-drawer&#34;&gt;Params&lt;/button&gt;&#xA;                &lt;button id=&#34;code-editor-1-run-button&#34; class=&#34;run button is-outlined is-light code-editor-button&#34; type=&#34;button&#34; aria-label=&#34;Run query&#34;&gt;&#xA;                    &lt;span class=&#34;code-editor-run-label&#34;&gt;Run&lt;/span&gt;&#xA;                    &lt;span id=&#34;code-editor-1-run-button-spinner&#34; class=&#34;code-editor-run-spinner&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div id=&#34;code-editor-1-progress&#34; class=&#34;code-editor-progress&#34; role=&#34;progressbar&#34; aria-label=&#34;Running query&#34; hidden&gt;&lt;/div&gt;&#xA;            &lt;span id=&#34;code-editor-1-run-status&#34; class=&#34;code-editor-sr-only&#34; aria-live=&#34;polite&#34; aria-atomic=&#34;true&#34;&gt;&lt;/span&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;div class=&#34;code-editor-workspace&#34;&gt;&#xA;            &lt;div id=&#34;code-editor-1-grid&#34; class=&#34;code-editor-grid&#34; style=&#34;grid-template-columns: 1fr;&#34;&gt;&#xA;                &lt;div id=&#34;code-editor-1-source-pane&#34; class=&#34;code-editor-pane code-editor-pane-source&#34;&gt;&#xA;                    &lt;div class=&#34;code-editor-pane-header&#34;&gt;&#xA;                        &lt;span&gt;query.fql&lt;/span&gt;&#xA;                        &lt;div class=&#34;code-editor-pane-header-actions&#34;&gt;&#xA;                            &lt;span&gt;FQL&lt;/span&gt;&#xA;                            &lt;button id=&#34;code-editor-1-copy-button&#34; class=&#34;code-editor-pane-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;                        &lt;/div&gt;&#xA;                    &lt;/div&gt;&#xA;                    &lt;div id=&#34;code-editor-1-text&#34; class=&#34;code-editor-text&#34; data-auto-height=&#34;true&#34;&gt;return 2010..2013&lt;/div&gt;&#xA;                &lt;/div&gt;&#xA;&#xA;                &lt;div id=&#34;code-editor-1-result-pane&#34; class=&#34;code-editor-pane code-editor-pane-result&#34; hidden&gt;&#xA;                    &lt;div class=&#34;code-editor-pane-header&#34;&gt;&#xA;                        &lt;span&gt;result.json&lt;/span&gt;&#xA;                        &lt;div class=&#34;code-editor-pane-header-actions&#34;&gt;&#xA;                            &lt;span&gt;output&lt;/span&gt;&#xA;                            &lt;button id=&#34;code-editor-1-result-close-button&#34; class=&#34;code-editor-pane-button&#34; type=&#34;button&#34; aria-controls=&#34;code-editor-1-result-pane&#34;&gt;Close&lt;/button&gt;&#xA;                        &lt;/div&gt;&#xA;                    &lt;/div&gt;&#xA;                    &lt;div id=&#34;code-editor-1-result&#34; class=&#34;code-editor-result&#34; data-auto-height=&#34;true&#34;&gt;&lt;/div&gt;&#xA;                &lt;/div&gt;&#xA;            &lt;/div&gt;&#xA;&#xA;            &lt;aside id=&#34;code-editor-1-params-drawer&#34; class=&#34;code-editor-params-drawer&#34; aria-labelledby=&#34;code-editor-1-params-title&#34; hidden&gt;&#xA;                &lt;div class=&#34;code-editor-params-header&#34;&gt;&#xA;                    &lt;div&gt;&#xA;                        &lt;span id=&#34;code-editor-1-params-title&#34; class=&#34;code-editor-params-title&#34;&gt;Query parameters&lt;/span&gt;&#xA;                        &lt;span class=&#34;code-editor-params-description&#34;&gt;Values are parsed as JSON when possible.&lt;/span&gt;&#xA;                    &lt;/div&gt;&#xA;                    &lt;button id=&#34;code-editor-1-params-close-button&#34; class=&#34;code-editor-pane-button&#34; type=&#34;button&#34;&gt;Close&lt;/button&gt;&#xA;                &lt;/div&gt;&#xA;                &lt;div class=&#34;code-editor-params-body&#34;&gt;&#xA;                    &lt;div id=&#34;code-editor-1-params-empty&#34; class=&#34;code-editor-params-empty&#34;&gt;No parameters added.&lt;/div&gt;&#xA;                    &lt;div id=&#34;code-editor-1-params-rows&#34; class=&#34;code-editor-params-rows&#34;&gt;&lt;/div&gt;&#xA;                &lt;/div&gt;&#xA;                &lt;div class=&#34;code-editor-params-footer&#34;&gt;&#xA;                    &lt;button id=&#34;code-editor-1-params-add-button&#34; class=&#34;code-editor-params-add-button&#34; type=&#34;button&#34;&gt;Add parameter&lt;/button&gt;&#xA;                &lt;/div&gt;&#xA;            &lt;/aside&gt;&#xA;        &lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            function createEditor(id, mode, useWorker) {&#xA;                const editor = ace.edit(id);&#xA;                editor.setTheme(&#34;ace\/theme\/tomorrow_night&#34;);&#xA;                editor.session.setUseWorker(useWorker);&#xA;                editor.session.setMode(&#34;ace/mode/&#34; + mode);&#xA;                editor.setOptions({&#xA;                    displayIndentGuides: false,&#xA;                    printMargin: false&#xA;                });&#xA;&#xA;                return editor;&#xA;            }&#xA;&#xA;            const btn = document.querySelector(&#39;#code-editor-1-run-button&#39;);&#xA;            const textEditor = createEditor(&#39;code-editor-1-text&#39;, &#39;fql&#39;, true);&#xA;            const resultEditor = createEditor(&#39;code-editor-1-result&#39;, &#39;json&#39;, false);&#xA;            resultEditor.setReadOnly(true);&#xA;            const resultExpandBtn = null;&#xA;            const editorHeader = document.querySelector(&#39;#code-editor-1-header&#39;);&#xA;            const editorWorkspace = document.querySelector(&#39;#code-editor-1-grid&#39;).parentElement;&#xA;            const editorGrid = document.querySelector(&#39;#code-editor-1-grid&#39;);&#xA;            const runProgress = document.querySelector(&#39;#code-editor-1-progress&#39;);&#xA;            const runStatus = document.querySelector(&#39;#code-editor-1-run-status&#39;);&#xA;            const resultPane = document.querySelector(&#39;#code-editor-1-result-pane&#39;);&#xA;            const resultToggleBtn = document.querySelector(&#39;#code-editor-1-result-toggle-button&#39;);&#xA;            const resultCloseBtn = document.querySelector(&#39;#code-editor-1-result-close-button&#39;);&#xA;            const paramsToggleBtn = document.querySelector(&#39;#code-editor-1-params-toggle-button&#39;);&#xA;            const paramsDrawer = document.querySelector(&#39;#code-editor-1-params-drawer&#39;);&#xA;            const paramsCloseBtn = document.querySelector(&#39;#code-editor-1-params-close-button&#39;);&#xA;            const paramsAddBtn = document.querySelector(&#39;#code-editor-1-params-add-button&#39;);&#xA;            const paramsRows = document.querySelector(&#39;#code-editor-1-params-rows&#39;);&#xA;            const paramsEmpty = document.querySelector(&#39;#code-editor-1-params-empty&#39;);&#xA;            let isResultVisible = !resultPane.hidden;&#xA;            let isParamsVisible = !paramsDrawer.hidden;&#xA;&#xA;            function resetResultExpansion() {&#xA;                if (!resultExpandBtn) {&#xA;                    return;&#xA;                }&#xA;&#xA;                isResultExpanded = false;&#xA;                resultExpandBtn.setAttribute(&#39;aria-expanded&#39;, &#39;false&#39;);&#xA;                resultExpandBtn.textContent = &#39;Expand&#39;;&#xA;            }&#xA;&#xA;            function syncEditorLayout() {&#xA;                const sourceHeight = getEditorContentHeight(textEditor);&#xA;                textEditor.container.style.height = `${sourceHeight}px`;&#xA;&#xA;                if (isResultVisible) {&#xA;                    const resultHeight = getEditorContentHeight(resultEditor);&#xA;                    applyResultHeight(resultHeight);&#xA;                }&#xA;&#xA;                textEditor.resize();&#xA;&#xA;                if (isResultVisible) {&#xA;                    resultEditor.resize();&#xA;                }&#xA;            }&#xA;&#xA;            function setResultVisible(nextVisible) {&#xA;                isResultVisible = nextVisible;&#xA;                resultPane.hidden = !nextVisible;&#xA;                resultToggleBtn.setAttribute(&#39;aria-expanded&#39;, nextVisible ? &#39;true&#39; : &#39;false&#39;);&#xA;                editorGrid.style.gridTemplateColumns = nextVisible ? &#39;&#39; : &#39;1fr&#39;;&#xA;&#xA;                if (!nextVisible) {&#xA;                    resetResultExpansion();&#xA;                    syncEditorLayout();&#xA;                    return;&#xA;                }&#xA;&#xA;                window.requestAnimationFrame(() =&gt; {&#xA;                    syncEditorLayout();&#xA;                    resultEditor.resize(true);&#xA;                });&#xA;            }&#xA;&#xA;            resultToggleBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setResultVisible(!isResultVisible);&#xA;            });&#xA;&#xA;            resultCloseBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setResultVisible(false);&#xA;            });&#xA;&#xA;            const collapsedResultHeightStyle = resultEditor.container.style.height;&#xA;            let isResultExpanded = false;&#xA;&#xA;            function getEditorContentHeight(editor) {&#xA;                const lineHeight = editor.renderer.lineHeight || 21;&#xA;                const screenLines = Math.max(editor.session.getScreenLength(), 1);&#xA;&#xA;                return Math.max(screenLines * lineHeight, 48);&#xA;            }&#xA;&#xA;            function getMaxResultHeight(fallbackHeight) {&#xA;                const viewportHeight = window.innerHeight || document.documentElement.clientHeight || fallbackHeight;&#xA;                const rootFontSize = parseFloat(window.getComputedStyle(document.documentElement).fontSize) || 16;&#xA;&#xA;                return Math.min(viewportHeight * 0.45, 32 * rootFontSize);&#xA;            }&#xA;&#xA;            function getCollapsedResultHeight() {&#xA;                return getEditorContentHeight(resultEditor);&#xA;            }&#xA;&#xA;            function getExpandedResultHeight(collapsedHeight) {&#xA;                const lineHeight = resultEditor.renderer.lineHeight || textEditor.renderer.lineHeight || 21;&#xA;                const maxAllowedHeight = getMaxResultHeight(collapsedHeight);&#xA;                const screenLines = Math.max(resultEditor.session.getScreenLength(), 1);&#xA;                const contentHeight = (screenLines * lineHeight) + (lineHeight * 2);&#xA;                const targetHeight = Math.min(contentHeight, maxAllowedHeight);&#xA;&#xA;                return Math.max(collapsedHeight, Math.round(targetHeight));&#xA;            }&#xA;&#xA;            function applyResultHeight(collapsedHeight) {&#xA;                if (resultExpandBtn &amp;&amp; isResultExpanded) {&#xA;                    resultEditor.container.style.height = `${getExpandedResultHeight(collapsedHeight)}px`;&#xA;                } else {&#xA;                    resultEditor.container.style.height = `${Math.min(collapsedHeight, getMaxResultHeight(collapsedHeight))}px`;&#xA;                }&#xA;&#xA;                resultEditor.resize();&#xA;            }&#xA;            textEditor.session.on(&#39;change&#39;, syncEditorLayout);&#xA;&#xA;            if (resultExpandBtn) {&#xA;                resultExpandBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                    isResultExpanded = !isResultExpanded;&#xA;                    resultExpandBtn.setAttribute(&#39;aria-expanded&#39;, isResultExpanded ? &#39;true&#39; : &#39;false&#39;);&#xA;                    resultExpandBtn.textContent = isResultExpanded ? &#39;Collapse&#39; : &#39;Expand&#39;;&#xA;                    syncEditorLayout();&#xA;                });&#xA;            }&#xA;&#xA;            function syncParamsEmptyState() {&#xA;                paramsEmpty.hidden = paramsRows.children.length &gt; 0;&#xA;            }&#xA;&#xA;            function formatParamValue(value) {&#xA;                return typeof value === &#39;string&#39; ? value : JSON.stringify(value);&#xA;            }&#xA;&#xA;            function createParamRow(name, value) {&#xA;                const row = document.createElement(&#39;div&#39;);&#xA;                row.className = &#39;code-editor-param-row&#39;;&#xA;&#xA;                const nameInput = document.createElement(&#39;input&#39;);&#xA;                nameInput.className = &#39;code-editor-param-input code-editor-param-name&#39;;&#xA;                nameInput.type = &#39;text&#39;;&#xA;                nameInput.placeholder = &#39;name&#39;;&#xA;                nameInput.setAttribute(&#39;aria-label&#39;, &#39;Parameter name&#39;);&#xA;                nameInput.value = name || &#39;&#39;;&#xA;&#xA;                const separator = document.createElement(&#39;span&#39;);&#xA;                separator.className = &#39;code-editor-param-separator&#39;;&#xA;                separator.setAttribute(&#39;aria-hidden&#39;, &#39;true&#39;);&#xA;                separator.textContent = &#39;:&#39;;&#xA;&#xA;                const valueInput = document.createElement(&#39;input&#39;);&#xA;                valueInput.className = &#39;code-editor-param-input code-editor-param-value&#39;;&#xA;                valueInput.type = &#39;text&#39;;&#xA;                valueInput.placeholder = &#39;value&#39;;&#xA;                valueInput.setAttribute(&#39;aria-label&#39;, &#39;Parameter value&#39;);&#xA;                valueInput.value = value === undefined ? &#39;&#39; : formatParamValue(value);&#xA;&#xA;                const removeBtn = document.createElement(&#39;button&#39;);&#xA;                removeBtn.className = &#39;code-editor-param-remove-button&#39;;&#xA;                removeBtn.type = &#39;button&#39;;&#xA;                removeBtn.setAttribute(&#39;aria-label&#39;, `Remove parameter ${name || &#39;row&#39;}`);&#xA;                removeBtn.textContent = &#39;Remove&#39;;&#xA;                removeBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                    row.remove();&#xA;                    syncParamsEmptyState();&#xA;                });&#xA;&#xA;                row.append(nameInput, separator, valueInput, removeBtn);&#xA;                paramsRows.appendChild(row);&#xA;                syncParamsEmptyState();&#xA;&#xA;                return nameInput;&#xA;            }&#xA;&#xA;            function setParamsVisible(nextVisible) {&#xA;                isParamsVisible = nextVisible;&#xA;                paramsDrawer.hidden = !nextVisible;&#xA;                paramsToggleBtn.setAttribute(&#39;aria-expanded&#39;, nextVisible ? &#39;true&#39; : &#39;false&#39;);&#xA;                editorWorkspace.classList.toggle(&#39;is-params-open&#39;, nextVisible);&#xA;&#xA;                if (nextVisible) {&#xA;                    paramsCloseBtn.focus();&#xA;                } else {&#xA;                    paramsToggleBtn.focus();&#xA;                }&#xA;            }&#xA;&#xA;            function setParamsControlsDisabled(disabled) {&#xA;                paramsToggleBtn.disabled = disabled;&#xA;                paramsDrawer.querySelectorAll(&#39;button, input&#39;).forEach((control) =&gt; {&#xA;                    control.disabled = disabled;&#xA;                });&#xA;            }&#xA;&#xA;            function parseParamValue(value) {&#xA;                try {&#xA;                    return JSON.parse(value);&#xA;                } catch (err) {&#xA;                    return value;&#xA;                }&#xA;            }&#xA;&#xA;            function getParams() {&#xA;                return Array.from(paramsRows.querySelectorAll(&#39;.code-editor-param-row&#39;)).reduce((params, row) =&gt; {&#xA;                    const name = row.querySelector(&#39;.code-editor-param-name&#39;).value.trim();&#xA;&#xA;                    if (name) {&#xA;                        const value = row.querySelector(&#39;.code-editor-param-value&#39;).value;&#xA;                        params[name] = parseParamValue(value);&#xA;                    }&#xA;&#xA;                    return params;&#xA;                }, {});&#xA;            }&#xA;&#xA;            const initialParams = JSON.parse(&#34;{}&#34;);&#xA;&#xA;            if (initialParams &amp;&amp; typeof initialParams === &#39;object&#39; &amp;&amp; !Array.isArray(initialParams)) {&#xA;                Object.entries(initialParams).forEach(([name, value]) =&gt; {&#xA;                    createParamRow(name, value);&#xA;                });&#xA;            }&#xA;&#xA;            syncParamsEmptyState();&#xA;&#xA;            paramsToggleBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setParamsVisible(!isParamsVisible);&#xA;            });&#xA;&#xA;            paramsCloseBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setParamsVisible(false);&#xA;            });&#xA;&#xA;            paramsAddBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                createParamRow(&#39;&#39;, &#39;&#39;).focus();&#xA;            });&#xA;&#xA;            window.addEventListener(&#39;resize&#39;, syncEditorLayout);&#xA;            syncEditorLayout();&#xA;&#xA;            function setContent(editor, content) {&#xA;                editor.setValue(content, -1);&#xA;            }&#xA;                const copyClipboardEl = document.querySelector(&#39;#code-editor-1-copy-clipboard&#39;);&#xA;                const copyBtn = document.querySelector(&#39;#code-editor-1-copy-button&#39;);&#xA;&#xA;                function copyTextWithFallback(content) {&#xA;                    copyClipboardEl.value = content;&#xA;                    copyClipboardEl.focus();&#xA;                    copyClipboardEl.select();&#xA;&#xA;                    if (!document.execCommand(&#39;copy&#39;)) {&#xA;                        throw new Error(&#39;Could not copy source to the clipboard&#39;);&#xA;                    }&#xA;                }&#xA;&#xA;                function copyTextToClipboard(content) {&#xA;                    if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                        return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                            copyTextWithFallback(content);&#xA;                        });&#xA;                    }&#xA;&#xA;                    copyTextWithFallback(content);&#xA;&#xA;                    return Promise.resolve();&#xA;                }&#xA;&#xA;                copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                    copyTextToClipboard(textEditor.getValue())&#xA;                        .then(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copied&#39;;&#xA;                            window.setTimeout(() =&gt; {&#xA;                                copyBtn.textContent = &#39;Copy&#39;;&#xA;                            }, 1200);&#xA;                        })&#xA;                        .catch((err) =&gt; {&#xA;                            console.error(&#39;Failed to copy source&#39;);&#xA;                            console.error(err);&#xA;                        });&#xA;                });&#xA;&#xA;            let isRunning = false;&#xA;&#xA;            function onStart() {&#xA;                isRunning = true;&#xA;                textEditor.setReadOnly(true);&#xA;                runProgress.hidden = false;&#xA;                runStatus.textContent = &#39;Running query&#39;;&#xA;                editorHeader.setAttribute(&#39;aria-busy&#39;, &#39;true&#39;);&#xA;                editorGrid.setAttribute(&#39;aria-busy&#39;, &#39;true&#39;);&#xA;                btn.classList.add(&#39;is-running&#39;);&#xA;                btn.setAttribute(&#39;aria-busy&#39;, &#39;true&#39;);&#xA;                btn.setAttribute(&#39;aria-label&#39;, &#39;Running query&#39;);&#xA;                btn.disabled = true;&#xA;                setParamsControlsDisabled(true);&#xA;            }&#xA;&#xA;            function onEnd(result) {&#xA;                isRunning = false;&#xA;                textEditor.setReadOnly(false);&#xA;                runProgress.hidden = true;&#xA;                runStatus.textContent = &#39;&#39;;&#xA;                editorHeader.setAttribute(&#39;aria-busy&#39;, &#39;false&#39;);&#xA;                editorGrid.setAttribute(&#39;aria-busy&#39;, &#39;false&#39;);&#xA;                btn.classList.remove(&#39;is-running&#39;);&#xA;                btn.setAttribute(&#39;aria-busy&#39;, &#39;false&#39;);&#xA;                btn.setAttribute(&#39;aria-label&#39;, &#39;Run query&#39;);&#xA;                btn.disabled = false;&#xA;                setParamsControlsDisabled(false);&#xA;&#xA;                setContent(resultEditor, result);&#xA;                setResultVisible(true);&#xA;            }&#xA;&#xA;            btn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                if (isRunning) {&#xA;                    return;&#xA;                }&#xA;&#xA;                const body = {&#xA;                        text: textEditor.getValue(),&#xA;                        params: getParams()&#xA;                };&#xA;                const url = &#34;https:\/\/worker-v2-811908774949.us-east1.run.app&#34;;&#xA;&#xA;                onStart();&#xA;                fetch(url, {&#xA;                    method: &#39;post&#39;,&#xA;                    cache: &#39;no-cache&#39;,&#xA;                    headers: {&#xA;                        &#39;Content-Type&#39;: &#39;application/json; charset=utf-8&#39;&#xA;                    },&#xA;                    signal: AbortSignal.timeout(1000 * 60), &#xA;                    body: JSON.stringify(body)&#xA;                })&#xA;                    .then(r =&gt; {&#xA;                        if (r.status === 200) {&#xA;                            return r.json()&#xA;                        }&#xA;                        &#xA;                        if (r.status === 426) {&#xA;                            throw new Error(`Too many requests. Try again later.`);&#xA;                        }&#xA;                        &#xA;                        if (r.status === 400) {&#xA;                            return r.json().then((data) =&gt; {&#xA;                                if (data.details) {&#xA;                                    throw new Error(data.details);&#xA;                                }&#xA;                                &#xA;                                throw new Error(data.error);&#xA;                            });&#xA;                        }&#xA;                        &#xA;                        throw new Error(`Unexpected error. Try again later.`);&#xA;                    })&#xA;                    .then((data) =&gt; {&#xA;                        onEnd(JSON.stringify(data, null, 4));&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        onEnd(err.message);&#xA;                    });&#xA;            });&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;Inside an array expansion, &lt;code&gt;.&lt;/code&gt; refers to the current item. When a dot touches the range operator, the formatter adds spaces on both sides of &lt;code&gt;..&lt;/code&gt; to keep the tokens separate. Here the current item is the lower bound, so the result is &lt;code&gt;[[1, 2, 3]]&lt;/code&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Running Tests</title>
				<link>https://ferretlang.org/docs/tools/lab/running-tests/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/tools/lab/running-tests/</guid>
				<description>&lt;h1 id=&#34;running-tests&#34;&gt;Running Tests&lt;/h1&gt;&#xA;&lt;p&gt;Use &lt;code&gt;lab run&lt;/code&gt; to execute FQL unit tests and YAML suites.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor terminal-shortcode&#34;&gt;&#xA;    &lt;textarea id=&#34;terminal-1-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;lab run tests/&lt;/textarea&gt;&#xA;&#xA;    &lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;terminal&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;button id=&#34;terminal-1-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;pre id=&#34;terminal-1-content&#34; class=&#34;terminal-body&#34;&gt;&lt;code&gt;&lt;span class=&#34;terminal-row&#34;&gt;&lt;span class=&#34;terminal-prompt&#34; aria-hidden=&#34;true&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;terminal-command&#34;&gt;lab run tests/&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const copyBtn = document.querySelector(&#39;#terminal-1-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#terminal-1-copy-clipboard&#39;);&#xA;            const terminalContent = copyClipboardEl.value;&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy terminal commands to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(terminalContent)&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy terminal commands&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;If no files are provided, Lab prints command help and exits with status &lt;code&gt;1&lt;/code&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Type Ordering</title>
				<link>https://ferretlang.org/docs/language/types/ordering/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/language/types/ordering/</guid>
				<description>&lt;h1 id=&#34;type-ordering&#34;&gt;Type ordering&lt;/h1&gt;&#xA;&lt;p&gt;FQL defines a relational order for the scalar and collection types listed below. It is used by &lt;code&gt;&amp;lt;&lt;/code&gt;, &lt;code&gt;&amp;lt;=&lt;/code&gt;, &lt;code&gt;&amp;gt;&lt;/code&gt;, and &lt;code&gt;&amp;gt;=&lt;/code&gt;, sorting, and recursive array and object comparison.&lt;/p&gt;&#xA;&lt;p&gt;When two values in this sequence have different types, their type decides the result:&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor is-readonly is-auto-height&#34;&gt;&#xA;    &lt;textarea id=&#34;code-1-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;&lt;/textarea&gt;&lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;example.fql&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-meta&#34;&gt;read-only&lt;/span&gt;&#xA;                &lt;button id=&#34;code-1-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;div class=&#34;code-editor-pane&#34;&gt;&#xA;            &lt;div id=&#34;code-1-text&#34; class=&#34;code-editor-text&#34; data-auto-height=&#34;true&#34;&gt;none &amp;lt; bool &amp;lt; number &amp;lt; string &amp;lt; datetime &amp;lt; binary &amp;lt; array &amp;lt; object&lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const editor = ace.edit(&#39;code-1-text&#39;);&#xA;            editor.setTheme(&#34;ace\/theme\/tomorrow_night&#34;);&#xA;            editor.session.setUseWorker(false);&#xA;            editor.session.setMode(&#34;ace/mode/&#34; + &#39;fql&#39;);&#xA;            editor.setOptions({&#xA;                readOnly: true,&#xA;                highlightActiveLine: false,&#xA;                highlightGutterLine: false,&#xA;                displayIndentGuides: false,&#xA;                printMargin: false&#xA;            });&#xA;            editor.renderer.$cursorLayer.element.style.display = &#34;none&#34;&#xA;            const copyBtn = document.querySelector(&#39;#code-1-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#code-1-copy-clipboard&#39;);&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy source to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(editor.getValue())&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy source&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;            function resizeAutoHeightEditor() {&#xA;                const lineHeight = editor.renderer.lineHeight || 21;&#xA;                const screenLines = Math.max(editor.session.getScreenLength(), 1);&#xA;                const nextHeight = Math.max(screenLines * lineHeight, 48);&#xA;&#xA;                editor.container.style.height = `${nextHeight}px`;&#xA;                editor.resize();&#xA;            }&#xA;&#xA;            editor.session.on(&#39;change&#39;, resizeAutoHeightEditor);&#xA;            window.addEventListener(&#39;resize&#39;, resizeAutoHeightEditor);&#xA;            resizeAutoHeightEditor();&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;Values are compared within their type only after the types match. &lt;code&gt;Int&lt;/code&gt; and &lt;code&gt;Float&lt;/code&gt; share the numeric comparison domain and compare by numeric value.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Visual Studio Code</title>
				<link>https://ferretlang.org/docs/tools/visual-studio-code/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/tools/visual-studio-code/</guid>
				<description>&lt;h1 id=&#34;visual-studio-code&#34;&gt;Visual Studio Code&lt;/h1&gt;&#xA;&lt;p&gt;The official Ferret integration for Visual Studio Code provides language intelligence, formatting, execution, and debugging for &lt;code&gt;.fql&lt;/code&gt; files. It is backed by the Ferret daemon and includes the matching daemon executable for supported platforms.&lt;/p&gt;&#xA;&lt;p&gt;Use Visual Studio Code when you want to write and run Ferret programs from an editor. The &lt;a href=&#34;https://ferretlang.org/docs/tools/cli/&#34;&gt;CLI&lt;/a&gt; remains available for terminal, shell, and CI workflows.&lt;/p&gt;&#xA;&lt;h2 id=&#34;installation&#34;&gt;Installation&lt;/h2&gt;&#xA;&lt;p&gt;Install &lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=ferretlang.ferret-lang&#34;&gt;Ferret Lang from the Visual Studio Marketplace&lt;/a&gt;. The official extension is published by &lt;code&gt;ferretlang&lt;/code&gt; and requires Visual Studio Code 1.95 or later.&lt;/p&gt;</description>
			</item>
			<item>
				<title>JetBrains IDEs</title>
				<link>https://ferretlang.org/docs/tools/jetbrains/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/tools/jetbrains/</guid>
				<description>&lt;h1 id=&#34;jetbrains-ides&#34;&gt;JetBrains IDEs&lt;/h1&gt;&#xA;&lt;p&gt;The Ferret plugin for IntelliJ IDEA and GoLand is in development. It has no published JetBrains Marketplace listing or tagged plugin release. The development build includes language assistance, Run, and Debug through the Ferret daemon. See the &lt;a href=&#34;https://github.com/MontFerret/editorium/tree/main/extensions/jetbrains&#34;&gt;Editorium JetBrains guide&lt;/a&gt; for tested IDE versions, source builds, and current limitations.&lt;/p&gt;&#xA;&lt;p&gt;For a released editor integration, see &lt;a href=&#34;https://ferretlang.org/docs/tools/visual-studio-code/&#34;&gt;Visual Studio Code&lt;/a&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Build</title>
				<link>https://ferretlang.org/docs/tools/cli/build/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/tools/cli/build/</guid>
				<description>&lt;h1 id=&#34;build&#34;&gt;Build&lt;/h1&gt;&#xA;&lt;p&gt;The &lt;code&gt;build&lt;/code&gt; command compiles FQL scripts into bytecode artifacts. Compiled artifacts skip the parsing and compilation steps at execution time.&lt;/p&gt;&#xA;&lt;h2 id=&#34;compile-a-script&#34;&gt;Compile a script&lt;/h2&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor terminal-shortcode&#34;&gt;&#xA;    &lt;textarea id=&#34;terminal-1-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;ferret build script.fql&lt;/textarea&gt;&#xA;&#xA;    &lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;terminal&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;button id=&#34;terminal-1-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;pre id=&#34;terminal-1-content&#34; class=&#34;terminal-body&#34;&gt;&lt;code&gt;&lt;span class=&#34;terminal-row&#34;&gt;&lt;span class=&#34;terminal-prompt&#34; aria-hidden=&#34;true&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;terminal-command&#34;&gt;ferret build script.fql&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const copyBtn = document.querySelector(&#39;#terminal-1-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#terminal-1-copy-clipboard&#39;);&#xA;            const terminalContent = copyClipboardEl.value;&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy terminal commands to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(terminalContent)&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy terminal commands&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;This produces &lt;code&gt;script.fqlc&lt;/code&gt; alongside the source file.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Dispatch Expressions</title>
				<link>https://ferretlang.org/docs/language/control-flow/dispatch/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/language/control-flow/dispatch/</guid>
				<description>&lt;h1 id=&#34;dispatch-expressions&#34;&gt;Dispatch Expressions&lt;/h1&gt;&#xA;&lt;p&gt;A &lt;code&gt;dispatch&lt;/code&gt; expression emits an event to a value. It is used to drive the outside world — for example, to fire a &lt;code&gt;click&lt;/code&gt; or &lt;code&gt;input&lt;/code&gt; event on a browser element.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor is-readonly is-auto-height&#34;&gt;&#xA;    &lt;textarea id=&#34;code-1-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;&lt;/textarea&gt;&lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;example.fql&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-meta&#34;&gt;read-only&lt;/span&gt;&#xA;                &lt;button id=&#34;code-1-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;div class=&#34;code-editor-pane&#34;&gt;&#xA;            &lt;div id=&#34;code-1-text&#34; class=&#34;code-editor-text&#34; data-auto-height=&#34;true&#34;&gt;dispatch &amp;#34;click&amp;#34; in element&lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const editor = ace.edit(&#39;code-1-text&#39;);&#xA;            editor.setTheme(&#34;ace\/theme\/tomorrow_night&#34;);&#xA;            editor.session.setUseWorker(false);&#xA;            editor.session.setMode(&#34;ace/mode/&#34; + &#39;fql&#39;);&#xA;            editor.setOptions({&#xA;                readOnly: true,&#xA;                highlightActiveLine: false,&#xA;                highlightGutterLine: false,&#xA;                displayIndentGuides: false,&#xA;                printMargin: false&#xA;            });&#xA;            editor.renderer.$cursorLayer.element.style.display = &#34;none&#34;&#xA;            const copyBtn = document.querySelector(&#39;#code-1-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#code-1-copy-clipboard&#39;);&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy source to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(editor.getValue())&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy source&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;            function resizeAutoHeightEditor() {&#xA;                const lineHeight = editor.renderer.lineHeight || 21;&#xA;                const screenLines = Math.max(editor.session.getScreenLength(), 1);&#xA;                const nextHeight = Math.max(screenLines * lineHeight, 48);&#xA;&#xA;                editor.container.style.height = `${nextHeight}px`;&#xA;                editor.resize();&#xA;            }&#xA;&#xA;            editor.session.on(&#39;change&#39;, resizeAutoHeightEditor);&#xA;            window.addEventListener(&#39;resize&#39;, resizeAutoHeightEditor);&#xA;            resizeAutoHeightEditor();&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;dispatch&lt;/code&gt; is performed for its effect, not its value: it runs synchronously and always evaluates to &lt;code&gt;none&lt;/code&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Error handling and resilience</title>
				<link>https://ferretlang.org/docs/guides/error-handling/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/guides/error-handling/</guid>
				<description>&lt;h1 id=&#34;error-handling-and-resilience&#34;&gt;Error handling and resilience&lt;/h1&gt;&#xA;&lt;p&gt;Real-world pages are unpredictable. Elements may be missing, networks may be slow, and page structures may change. This guide shows practical patterns for writing extraction scripts that handle these failures gracefully.&lt;/p&gt;&#xA;&lt;p&gt;For the full syntax reference, see &lt;a href=&#34;https://ferretlang.org/docs/language/control-flow/error-handling/&#34;&gt;Error Handling&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;return-a-fallback-value&#34;&gt;Return a fallback value&lt;/h2&gt;&#xA;&lt;p&gt;The most common pattern: attach &lt;code&gt;on error return&lt;/code&gt; to provide a default when an expression fails.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div id=&#34;docs-tabs-1&#34; class=&#34;docs-tabs&#34; data-tabs&gt;&#xA;    &lt;div class=&#34;docs-tabs-list&#34; role=&#34;tablist&#34;&gt;&#xA;        &lt;button id=&#34;docs-tabs-1-tab-0&#34; class=&#34;docs-tabs-tab&#34; type=&#34;button&#34; role=&#34;tab&#34; aria-selected=&#34;true&#34; aria-controls=&#34;docs-tabs-1-panel-0&#34; tabindex=&#34;0&#34;&gt;Terminal&lt;/button&gt;&#xA;        &lt;button id=&#34;docs-tabs-1-tab-1&#34; class=&#34;docs-tabs-tab&#34; type=&#34;button&#34; role=&#34;tab&#34; aria-selected=&#34;false&#34; aria-controls=&#34;docs-tabs-1-panel-1&#34; tabindex=&#34;-1&#34;&gt;Try in browser&lt;/button&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;div id=&#34;docs-tabs-1-panel-0&#34; class=&#34;docs-tabs-panel&#34; role=&#34;tabpanel&#34; aria-labelledby=&#34;docs-tabs-1-tab-0&#34;&gt;&#xA;        &#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor terminal-shortcode is-command&#34;&gt;&#xA;    &lt;textarea id=&#34;terminal-2-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;ferret run -e &amp;#39;&#xA;let page = web::html::open(&amp;#34;https://mockery.ferretlang.org&amp;#34;)&#xA;let title = query one &amp;#34;.nonexistent&amp;#34; in page using css on error return none&#xA;return title?.textContent&#xA;&amp;#39;&lt;/textarea&gt;&#xA;&#xA;    &lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;terminal&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;button id=&#34;terminal-2-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;pre id=&#34;terminal-2-content&#34; class=&#34;terminal-body&#34;&gt;&lt;code&gt;&lt;span class=&#34;terminal-row&#34;&gt;&lt;span class=&#34;terminal-prompt&#34; aria-hidden=&#34;true&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;terminal-command&#34;&gt;ferret run -e &amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;terminal-row&#34;&gt;&lt;span class=&#34;terminal-prompt terminal-prompt-spacer&#34; aria-hidden=&#34;true&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;terminal-command&#34;&gt;let page = web::html::open(&amp;#34;https://mockery.ferretlang.org&amp;#34;)&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;terminal-row&#34;&gt;&lt;span class=&#34;terminal-prompt terminal-prompt-spacer&#34; aria-hidden=&#34;true&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;terminal-command&#34;&gt;let title = query one &amp;#34;.nonexistent&amp;#34; in page using css on error return none&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;terminal-row&#34;&gt;&lt;span class=&#34;terminal-prompt terminal-prompt-spacer&#34; aria-hidden=&#34;true&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;terminal-command&#34;&gt;return title?.textContent&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;terminal-row&#34;&gt;&lt;span class=&#34;terminal-prompt terminal-prompt-spacer&#34; aria-hidden=&#34;true&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;terminal-command&#34;&gt;&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const copyBtn = document.querySelector(&#39;#terminal-2-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#terminal-2-copy-clipboard&#39;);&#xA;            const terminalContent = copyClipboardEl.value;&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy terminal commands to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(terminalContent)&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy terminal commands&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&#xA;    &lt;/div&gt;&#xA;    &lt;div id=&#34;docs-tabs-1-panel-1&#34; class=&#34;docs-tabs-panel&#34; role=&#34;tabpanel&#34; aria-labelledby=&#34;docs-tabs-1-tab-1&#34; hidden&gt;&#xA;        &#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor is-horizontal is-auto-height&#34;&gt;&#xA;    &lt;textarea id=&#34;code-editor-2-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;&lt;/textarea&gt;&#xA;&#xA;    &lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div id=&#34;code-editor-2-header&#34; class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;example.fql&lt;/span&gt;&#xA;                &lt;small&gt;Ferret v2&lt;/small&gt;&#xA;            &lt;/div&gt;&#xA;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;button id=&#34;code-editor-2-result-toggle-button&#34; class=&#34;button is-outlined is-light code-editor-button&#34; type=&#34;button&#34; aria-expanded=&#34;false&#34; aria-controls=&#34;code-editor-2-result-pane&#34;&gt;Output&lt;/button&gt;&#xA;                &lt;button id=&#34;code-editor-2-params-toggle-button&#34; class=&#34;button is-outlined is-light code-editor-button&#34; type=&#34;button&#34; aria-expanded=&#34;false&#34; aria-controls=&#34;code-editor-2-params-drawer&#34;&gt;Params&lt;/button&gt;&#xA;                &lt;button id=&#34;code-editor-2-run-button&#34; class=&#34;run button is-outlined is-light code-editor-button&#34; type=&#34;button&#34; aria-label=&#34;Run query&#34;&gt;&#xA;                    &lt;span class=&#34;code-editor-run-label&#34;&gt;Run&lt;/span&gt;&#xA;                    &lt;span id=&#34;code-editor-2-run-button-spinner&#34; class=&#34;code-editor-run-spinner&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div id=&#34;code-editor-2-progress&#34; class=&#34;code-editor-progress&#34; role=&#34;progressbar&#34; aria-label=&#34;Running query&#34; hidden&gt;&lt;/div&gt;&#xA;            &lt;span id=&#34;code-editor-2-run-status&#34; class=&#34;code-editor-sr-only&#34; aria-live=&#34;polite&#34; aria-atomic=&#34;true&#34;&gt;&lt;/span&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;div class=&#34;code-editor-workspace&#34;&gt;&#xA;            &lt;div id=&#34;code-editor-2-grid&#34; class=&#34;code-editor-grid&#34; style=&#34;grid-template-columns: 1fr;&#34;&gt;&#xA;                &lt;div id=&#34;code-editor-2-source-pane&#34; class=&#34;code-editor-pane code-editor-pane-source&#34;&gt;&#xA;                    &lt;div class=&#34;code-editor-pane-header&#34;&gt;&#xA;                        &lt;span&gt;query.fql&lt;/span&gt;&#xA;                        &lt;div class=&#34;code-editor-pane-header-actions&#34;&gt;&#xA;                            &lt;span&gt;FQL&lt;/span&gt;&#xA;                            &lt;button id=&#34;code-editor-2-copy-button&#34; class=&#34;code-editor-pane-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;                        &lt;/div&gt;&#xA;                    &lt;/div&gt;&#xA;                    &lt;div id=&#34;code-editor-2-text&#34; class=&#34;code-editor-text&#34; data-auto-height=&#34;true&#34;&gt;let page = web::html::open(&amp;#34;https://mockery.ferretlang.org&amp;#34;)&#xA;let title = query one &amp;#34;.nonexistent&amp;#34; in page using css on error return none&#xA;return title?.textContent&lt;/div&gt;&#xA;                &lt;/div&gt;&#xA;&#xA;                &lt;div id=&#34;code-editor-2-result-pane&#34; class=&#34;code-editor-pane code-editor-pane-result&#34; hidden&gt;&#xA;                    &lt;div class=&#34;code-editor-pane-header&#34;&gt;&#xA;                        &lt;span&gt;result.json&lt;/span&gt;&#xA;                        &lt;div class=&#34;code-editor-pane-header-actions&#34;&gt;&#xA;                            &lt;span&gt;output&lt;/span&gt;&#xA;                            &lt;button id=&#34;code-editor-2-result-close-button&#34; class=&#34;code-editor-pane-button&#34; type=&#34;button&#34; aria-controls=&#34;code-editor-2-result-pane&#34;&gt;Close&lt;/button&gt;&#xA;                        &lt;/div&gt;&#xA;                    &lt;/div&gt;&#xA;                    &lt;div id=&#34;code-editor-2-result&#34; class=&#34;code-editor-result&#34; data-auto-height=&#34;true&#34;&gt;&lt;/div&gt;&#xA;                &lt;/div&gt;&#xA;            &lt;/div&gt;&#xA;&#xA;            &lt;aside id=&#34;code-editor-2-params-drawer&#34; class=&#34;code-editor-params-drawer&#34; aria-labelledby=&#34;code-editor-2-params-title&#34; hidden&gt;&#xA;                &lt;div class=&#34;code-editor-params-header&#34;&gt;&#xA;                    &lt;div&gt;&#xA;                        &lt;span id=&#34;code-editor-2-params-title&#34; class=&#34;code-editor-params-title&#34;&gt;Query parameters&lt;/span&gt;&#xA;                        &lt;span class=&#34;code-editor-params-description&#34;&gt;Values are parsed as JSON when possible.&lt;/span&gt;&#xA;                    &lt;/div&gt;&#xA;                    &lt;button id=&#34;code-editor-2-params-close-button&#34; class=&#34;code-editor-pane-button&#34; type=&#34;button&#34;&gt;Close&lt;/button&gt;&#xA;                &lt;/div&gt;&#xA;                &lt;div class=&#34;code-editor-params-body&#34;&gt;&#xA;                    &lt;div id=&#34;code-editor-2-params-empty&#34; class=&#34;code-editor-params-empty&#34;&gt;No parameters added.&lt;/div&gt;&#xA;                    &lt;div id=&#34;code-editor-2-params-rows&#34; class=&#34;code-editor-params-rows&#34;&gt;&lt;/div&gt;&#xA;                &lt;/div&gt;&#xA;                &lt;div class=&#34;code-editor-params-footer&#34;&gt;&#xA;                    &lt;button id=&#34;code-editor-2-params-add-button&#34; class=&#34;code-editor-params-add-button&#34; type=&#34;button&#34;&gt;Add parameter&lt;/button&gt;&#xA;                &lt;/div&gt;&#xA;            &lt;/aside&gt;&#xA;        &lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            function createEditor(id, mode, useWorker) {&#xA;                const editor = ace.edit(id);&#xA;                editor.setTheme(&#34;ace\/theme\/tomorrow_night&#34;);&#xA;                editor.session.setUseWorker(useWorker);&#xA;                editor.session.setMode(&#34;ace/mode/&#34; + mode);&#xA;                editor.setOptions({&#xA;                    displayIndentGuides: false,&#xA;                    printMargin: false&#xA;                });&#xA;&#xA;                return editor;&#xA;            }&#xA;&#xA;            const btn = document.querySelector(&#39;#code-editor-2-run-button&#39;);&#xA;            const textEditor = createEditor(&#39;code-editor-2-text&#39;, &#39;fql&#39;, true);&#xA;            const resultEditor = createEditor(&#39;code-editor-2-result&#39;, &#39;json&#39;, false);&#xA;            resultEditor.setReadOnly(true);&#xA;            const resultExpandBtn = null;&#xA;            const editorHeader = document.querySelector(&#39;#code-editor-2-header&#39;);&#xA;            const editorWorkspace = document.querySelector(&#39;#code-editor-2-grid&#39;).parentElement;&#xA;            const editorGrid = document.querySelector(&#39;#code-editor-2-grid&#39;);&#xA;            const runProgress = document.querySelector(&#39;#code-editor-2-progress&#39;);&#xA;            const runStatus = document.querySelector(&#39;#code-editor-2-run-status&#39;);&#xA;            const resultPane = document.querySelector(&#39;#code-editor-2-result-pane&#39;);&#xA;            const resultToggleBtn = document.querySelector(&#39;#code-editor-2-result-toggle-button&#39;);&#xA;            const resultCloseBtn = document.querySelector(&#39;#code-editor-2-result-close-button&#39;);&#xA;            const paramsToggleBtn = document.querySelector(&#39;#code-editor-2-params-toggle-button&#39;);&#xA;            const paramsDrawer = document.querySelector(&#39;#code-editor-2-params-drawer&#39;);&#xA;            const paramsCloseBtn = document.querySelector(&#39;#code-editor-2-params-close-button&#39;);&#xA;            const paramsAddBtn = document.querySelector(&#39;#code-editor-2-params-add-button&#39;);&#xA;            const paramsRows = document.querySelector(&#39;#code-editor-2-params-rows&#39;);&#xA;            const paramsEmpty = document.querySelector(&#39;#code-editor-2-params-empty&#39;);&#xA;            let isResultVisible = !resultPane.hidden;&#xA;            let isParamsVisible = !paramsDrawer.hidden;&#xA;&#xA;            function resetResultExpansion() {&#xA;                if (!resultExpandBtn) {&#xA;                    return;&#xA;                }&#xA;&#xA;                isResultExpanded = false;&#xA;                resultExpandBtn.setAttribute(&#39;aria-expanded&#39;, &#39;false&#39;);&#xA;                resultExpandBtn.textContent = &#39;Expand&#39;;&#xA;            }&#xA;&#xA;            function syncEditorLayout() {&#xA;                const sourceHeight = getEditorContentHeight(textEditor);&#xA;                textEditor.container.style.height = `${sourceHeight}px`;&#xA;&#xA;                if (isResultVisible) {&#xA;                    const resultHeight = getEditorContentHeight(resultEditor);&#xA;                    applyResultHeight(resultHeight);&#xA;                }&#xA;&#xA;                textEditor.resize();&#xA;&#xA;                if (isResultVisible) {&#xA;                    resultEditor.resize();&#xA;                }&#xA;            }&#xA;&#xA;            function setResultVisible(nextVisible) {&#xA;                isResultVisible = nextVisible;&#xA;                resultPane.hidden = !nextVisible;&#xA;                resultToggleBtn.setAttribute(&#39;aria-expanded&#39;, nextVisible ? &#39;true&#39; : &#39;false&#39;);&#xA;                editorGrid.style.gridTemplateColumns = nextVisible ? &#39;&#39; : &#39;1fr&#39;;&#xA;&#xA;                if (!nextVisible) {&#xA;                    resetResultExpansion();&#xA;                    syncEditorLayout();&#xA;                    return;&#xA;                }&#xA;&#xA;                window.requestAnimationFrame(() =&gt; {&#xA;                    syncEditorLayout();&#xA;                    resultEditor.resize(true);&#xA;                });&#xA;            }&#xA;&#xA;            resultToggleBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setResultVisible(!isResultVisible);&#xA;            });&#xA;&#xA;            resultCloseBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setResultVisible(false);&#xA;            });&#xA;&#xA;            const collapsedResultHeightStyle = resultEditor.container.style.height;&#xA;            let isResultExpanded = false;&#xA;&#xA;            function getEditorContentHeight(editor) {&#xA;                const lineHeight = editor.renderer.lineHeight || 21;&#xA;                const screenLines = Math.max(editor.session.getScreenLength(), 1);&#xA;&#xA;                return Math.max(screenLines * lineHeight, 48);&#xA;            }&#xA;&#xA;            function getMaxResultHeight(fallbackHeight) {&#xA;                const viewportHeight = window.innerHeight || document.documentElement.clientHeight || fallbackHeight;&#xA;                const rootFontSize = parseFloat(window.getComputedStyle(document.documentElement).fontSize) || 16;&#xA;&#xA;                return Math.min(viewportHeight * 0.45, 32 * rootFontSize);&#xA;            }&#xA;&#xA;            function getCollapsedResultHeight() {&#xA;                return getEditorContentHeight(resultEditor);&#xA;            }&#xA;&#xA;            function getExpandedResultHeight(collapsedHeight) {&#xA;                const lineHeight = resultEditor.renderer.lineHeight || textEditor.renderer.lineHeight || 21;&#xA;                const maxAllowedHeight = getMaxResultHeight(collapsedHeight);&#xA;                const screenLines = Math.max(resultEditor.session.getScreenLength(), 1);&#xA;                const contentHeight = (screenLines * lineHeight) + (lineHeight * 2);&#xA;                const targetHeight = Math.min(contentHeight, maxAllowedHeight);&#xA;&#xA;                return Math.max(collapsedHeight, Math.round(targetHeight));&#xA;            }&#xA;&#xA;            function applyResultHeight(collapsedHeight) {&#xA;                if (resultExpandBtn &amp;&amp; isResultExpanded) {&#xA;                    resultEditor.container.style.height = `${getExpandedResultHeight(collapsedHeight)}px`;&#xA;                } else {&#xA;                    resultEditor.container.style.height = `${Math.min(collapsedHeight, getMaxResultHeight(collapsedHeight))}px`;&#xA;                }&#xA;&#xA;                resultEditor.resize();&#xA;            }&#xA;            textEditor.session.on(&#39;change&#39;, syncEditorLayout);&#xA;&#xA;            if (resultExpandBtn) {&#xA;                resultExpandBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                    isResultExpanded = !isResultExpanded;&#xA;                    resultExpandBtn.setAttribute(&#39;aria-expanded&#39;, isResultExpanded ? &#39;true&#39; : &#39;false&#39;);&#xA;                    resultExpandBtn.textContent = isResultExpanded ? &#39;Collapse&#39; : &#39;Expand&#39;;&#xA;                    syncEditorLayout();&#xA;                });&#xA;            }&#xA;&#xA;            function syncParamsEmptyState() {&#xA;                paramsEmpty.hidden = paramsRows.children.length &gt; 0;&#xA;            }&#xA;&#xA;            function formatParamValue(value) {&#xA;                return typeof value === &#39;string&#39; ? value : JSON.stringify(value);&#xA;            }&#xA;&#xA;            function createParamRow(name, value) {&#xA;                const row = document.createElement(&#39;div&#39;);&#xA;                row.className = &#39;code-editor-param-row&#39;;&#xA;&#xA;                const nameInput = document.createElement(&#39;input&#39;);&#xA;                nameInput.className = &#39;code-editor-param-input code-editor-param-name&#39;;&#xA;                nameInput.type = &#39;text&#39;;&#xA;                nameInput.placeholder = &#39;name&#39;;&#xA;                nameInput.setAttribute(&#39;aria-label&#39;, &#39;Parameter name&#39;);&#xA;                nameInput.value = name || &#39;&#39;;&#xA;&#xA;                const separator = document.createElement(&#39;span&#39;);&#xA;                separator.className = &#39;code-editor-param-separator&#39;;&#xA;                separator.setAttribute(&#39;aria-hidden&#39;, &#39;true&#39;);&#xA;                separator.textContent = &#39;:&#39;;&#xA;&#xA;                const valueInput = document.createElement(&#39;input&#39;);&#xA;                valueInput.className = &#39;code-editor-param-input code-editor-param-value&#39;;&#xA;                valueInput.type = &#39;text&#39;;&#xA;                valueInput.placeholder = &#39;value&#39;;&#xA;                valueInput.setAttribute(&#39;aria-label&#39;, &#39;Parameter value&#39;);&#xA;                valueInput.value = value === undefined ? &#39;&#39; : formatParamValue(value);&#xA;&#xA;                const removeBtn = document.createElement(&#39;button&#39;);&#xA;                removeBtn.className = &#39;code-editor-param-remove-button&#39;;&#xA;                removeBtn.type = &#39;button&#39;;&#xA;                removeBtn.setAttribute(&#39;aria-label&#39;, `Remove parameter ${name || &#39;row&#39;}`);&#xA;                removeBtn.textContent = &#39;Remove&#39;;&#xA;                removeBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                    row.remove();&#xA;                    syncParamsEmptyState();&#xA;                });&#xA;&#xA;                row.append(nameInput, separator, valueInput, removeBtn);&#xA;                paramsRows.appendChild(row);&#xA;                syncParamsEmptyState();&#xA;&#xA;                return nameInput;&#xA;            }&#xA;&#xA;            function setParamsVisible(nextVisible) {&#xA;                isParamsVisible = nextVisible;&#xA;                paramsDrawer.hidden = !nextVisible;&#xA;                paramsToggleBtn.setAttribute(&#39;aria-expanded&#39;, nextVisible ? &#39;true&#39; : &#39;false&#39;);&#xA;                editorWorkspace.classList.toggle(&#39;is-params-open&#39;, nextVisible);&#xA;&#xA;                if (nextVisible) {&#xA;                    paramsCloseBtn.focus();&#xA;                } else {&#xA;                    paramsToggleBtn.focus();&#xA;                }&#xA;            }&#xA;&#xA;            function setParamsControlsDisabled(disabled) {&#xA;                paramsToggleBtn.disabled = disabled;&#xA;                paramsDrawer.querySelectorAll(&#39;button, input&#39;).forEach((control) =&gt; {&#xA;                    control.disabled = disabled;&#xA;                });&#xA;            }&#xA;&#xA;            function parseParamValue(value) {&#xA;                try {&#xA;                    return JSON.parse(value);&#xA;                } catch (err) {&#xA;                    return value;&#xA;                }&#xA;            }&#xA;&#xA;            function getParams() {&#xA;                return Array.from(paramsRows.querySelectorAll(&#39;.code-editor-param-row&#39;)).reduce((params, row) =&gt; {&#xA;                    const name = row.querySelector(&#39;.code-editor-param-name&#39;).value.trim();&#xA;&#xA;                    if (name) {&#xA;                        const value = row.querySelector(&#39;.code-editor-param-value&#39;).value;&#xA;                        params[name] = parseParamValue(value);&#xA;                    }&#xA;&#xA;                    return params;&#xA;                }, {});&#xA;            }&#xA;&#xA;            const initialParams = JSON.parse(&#34;{}&#34;);&#xA;&#xA;            if (initialParams &amp;&amp; typeof initialParams === &#39;object&#39; &amp;&amp; !Array.isArray(initialParams)) {&#xA;                Object.entries(initialParams).forEach(([name, value]) =&gt; {&#xA;                    createParamRow(name, value);&#xA;                });&#xA;            }&#xA;&#xA;            syncParamsEmptyState();&#xA;&#xA;            paramsToggleBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setParamsVisible(!isParamsVisible);&#xA;            });&#xA;&#xA;            paramsCloseBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setParamsVisible(false);&#xA;            });&#xA;&#xA;            paramsAddBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                createParamRow(&#39;&#39;, &#39;&#39;).focus();&#xA;            });&#xA;&#xA;            window.addEventListener(&#39;resize&#39;, syncEditorLayout);&#xA;            syncEditorLayout();&#xA;&#xA;            function setContent(editor, content) {&#xA;                editor.setValue(content, -1);&#xA;            }&#xA;                const copyClipboardEl = document.querySelector(&#39;#code-editor-2-copy-clipboard&#39;);&#xA;                const copyBtn = document.querySelector(&#39;#code-editor-2-copy-button&#39;);&#xA;&#xA;                function copyTextWithFallback(content) {&#xA;                    copyClipboardEl.value = content;&#xA;                    copyClipboardEl.focus();&#xA;                    copyClipboardEl.select();&#xA;&#xA;                    if (!document.execCommand(&#39;copy&#39;)) {&#xA;                        throw new Error(&#39;Could not copy source to the clipboard&#39;);&#xA;                    }&#xA;                }&#xA;&#xA;                function copyTextToClipboard(content) {&#xA;                    if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                        return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                            copyTextWithFallback(content);&#xA;                        });&#xA;                    }&#xA;&#xA;                    copyTextWithFallback(content);&#xA;&#xA;                    return Promise.resolve();&#xA;                }&#xA;&#xA;                copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                    copyTextToClipboard(textEditor.getValue())&#xA;                        .then(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copied&#39;;&#xA;                            window.setTimeout(() =&gt; {&#xA;                                copyBtn.textContent = &#39;Copy&#39;;&#xA;                            }, 1200);&#xA;                        })&#xA;                        .catch((err) =&gt; {&#xA;                            console.error(&#39;Failed to copy source&#39;);&#xA;                            console.error(err);&#xA;                        });&#xA;                });&#xA;&#xA;            let isRunning = false;&#xA;&#xA;            function onStart() {&#xA;                isRunning = true;&#xA;                textEditor.setReadOnly(true);&#xA;                runProgress.hidden = false;&#xA;                runStatus.textContent = &#39;Running query&#39;;&#xA;                editorHeader.setAttribute(&#39;aria-busy&#39;, &#39;true&#39;);&#xA;                editorGrid.setAttribute(&#39;aria-busy&#39;, &#39;true&#39;);&#xA;                btn.classList.add(&#39;is-running&#39;);&#xA;                btn.setAttribute(&#39;aria-busy&#39;, &#39;true&#39;);&#xA;                btn.setAttribute(&#39;aria-label&#39;, &#39;Running query&#39;);&#xA;                btn.disabled = true;&#xA;                setParamsControlsDisabled(true);&#xA;            }&#xA;&#xA;            function onEnd(result) {&#xA;                isRunning = false;&#xA;                textEditor.setReadOnly(false);&#xA;                runProgress.hidden = true;&#xA;                runStatus.textContent = &#39;&#39;;&#xA;                editorHeader.setAttribute(&#39;aria-busy&#39;, &#39;false&#39;);&#xA;                editorGrid.setAttribute(&#39;aria-busy&#39;, &#39;false&#39;);&#xA;                btn.classList.remove(&#39;is-running&#39;);&#xA;                btn.setAttribute(&#39;aria-busy&#39;, &#39;false&#39;);&#xA;                btn.setAttribute(&#39;aria-label&#39;, &#39;Run query&#39;);&#xA;                btn.disabled = false;&#xA;                setParamsControlsDisabled(false);&#xA;&#xA;                setContent(resultEditor, result);&#xA;                setResultVisible(true);&#xA;            }&#xA;&#xA;            btn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                if (isRunning) {&#xA;                    return;&#xA;                }&#xA;&#xA;                const body = {&#xA;                        text: textEditor.getValue(),&#xA;                        params: getParams()&#xA;                };&#xA;                const url = &#34;https:\/\/worker-v2-811908774949.us-east1.run.app&#34;;&#xA;&#xA;                onStart();&#xA;                fetch(url, {&#xA;                    method: &#39;post&#39;,&#xA;                    cache: &#39;no-cache&#39;,&#xA;                    headers: {&#xA;                        &#39;Content-Type&#39;: &#39;application/json; charset=utf-8&#39;&#xA;                    },&#xA;                    signal: AbortSignal.timeout(1000 * 60), &#xA;                    body: JSON.stringify(body)&#xA;                })&#xA;                    .then(r =&gt; {&#xA;                        if (r.status === 200) {&#xA;                            return r.json()&#xA;                        }&#xA;                        &#xA;                        if (r.status === 426) {&#xA;                            throw new Error(`Too many requests. Try again later.`);&#xA;                        }&#xA;                        &#xA;                        if (r.status === 400) {&#xA;                            return r.json().then((data) =&gt; {&#xA;                                if (data.details) {&#xA;                                    throw new Error(data.details);&#xA;                                }&#xA;                                &#xA;                                throw new Error(data.error);&#xA;                            });&#xA;                        }&#xA;                        &#xA;                        throw new Error(`Unexpected error. Try again later.`);&#xA;                    })&#xA;                    .then((data) =&gt; {&#xA;                        onEnd(JSON.stringify(data, null, 4));&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        onEnd(err.message);&#xA;                    });&#xA;            });&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&#xA;    &lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;Common fallback values:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Modules and Lifecycle</title>
				<link>https://ferretlang.org/docs/embedding/javascript/modules/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/embedding/javascript/modules/</guid>
				<description>&lt;h1 id=&#34;modules-and-lifecycle&#34;&gt;Modules and Lifecycle&lt;/h1&gt;&#xA;&lt;p&gt;JavaScript modules group host functions with callbacks for engine initialization, compilation, execution, and cleanup. Use them when an integration needs to acquire resources, observe work, or release state along with exposing functions to FQL.&lt;/p&gt;&#xA;&lt;h2 id=&#34;define-a-module&#34;&gt;Define a module&lt;/h2&gt;&#xA;&lt;p&gt;Use &lt;code&gt;defineModule()&lt;/code&gt; to validate a definition while preserving its inferred TypeScript type:&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor is-readonly is-auto-height&#34;&gt;&#xA;    &lt;textarea id=&#34;code-6-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;&lt;/textarea&gt;&lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;example.javascript&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-meta&#34;&gt;read-only&lt;/span&gt;&#xA;                &lt;button id=&#34;code-6-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;div class=&#34;code-editor-pane&#34;&gt;&#xA;            &lt;div id=&#34;code-6-text&#34; class=&#34;code-editor-text&#34; data-auto-height=&#34;true&#34;&gt;import { create, defineModule } from &amp;#34;@montferret/ferret&amp;#34;;&#xA;&#xA;const events = [];&#xA;&#xA;const telemetry = defineModule({&#xA;    name: &amp;#34;telemetry&amp;#34;,&#xA;    namespace: &amp;#34;OBSERVABILITY::TELEMETRY&amp;#34;,&#xA;    functions: {&#xA;        track: (event) =&amp;gt; {&#xA;            events.push(event);&#xA;            return event;&#xA;        },&#xA;    },&#xA;    lifecycle: {&#xA;        async onInit() {&#xA;            await Promise.resolve();&#xA;            events.push({ type: &amp;#34;engine:init&amp;#34; });&#xA;        },&#xA;        async onClose() {&#xA;            events.push({ type: &amp;#34;engine:close&amp;#34; });&#xA;        },&#xA;    },&#xA;});&#xA;&#xA;const engine = await create({&#xA;    modules: [telemetry],&#xA;});&#xA;&#xA;try {&#xA;    await engine.runJSON(`&#xA;        return OBSERVABILITY::TELEMETRY::track({ type: &amp;#34;query:run&amp;#34; })&#xA;    `);&#xA;} finally {&#xA;    await engine.close();&#xA;}&lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const editor = ace.edit(&#39;code-6-text&#39;);&#xA;            editor.setTheme(&#34;ace\/theme\/tomorrow_night&#34;);&#xA;            editor.session.setUseWorker(false);&#xA;            editor.session.setMode(&#34;ace/mode/&#34; + &#39;javascript&#39;);&#xA;            editor.setOptions({&#xA;                readOnly: true,&#xA;                highlightActiveLine: false,&#xA;                highlightGutterLine: false,&#xA;                displayIndentGuides: false,&#xA;                printMargin: false&#xA;            });&#xA;            editor.renderer.$cursorLayer.element.style.display = &#34;none&#34;&#xA;            const copyBtn = document.querySelector(&#39;#code-6-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#code-6-copy-clipboard&#39;);&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy source to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(editor.getValue())&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy source&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;            function resizeAutoHeightEditor() {&#xA;                const lineHeight = editor.renderer.lineHeight || 21;&#xA;                const screenLines = Math.max(editor.session.getScreenLength(), 1);&#xA;                const nextHeight = Math.max(screenLines * lineHeight, 48);&#xA;&#xA;                editor.container.style.height = `${nextHeight}px`;&#xA;                editor.resize();&#xA;            }&#xA;&#xA;            editor.session.on(&#39;change&#39;, resizeAutoHeightEditor);&#xA;            window.addEventListener(&#39;resize&#39;, resizeAutoHeightEditor);&#xA;            resizeAutoHeightEditor();&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;The module &lt;code&gt;name&lt;/code&gt; identifies its registration, lifecycle callbacks, and module-level diagnostics. The optional &lt;code&gt;namespace&lt;/code&gt; independently places its functions under an FQL namespace. It is not inferred from &lt;code&gt;name&lt;/code&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Playground</title>
				<link>https://ferretlang.org/docs/tools/playground/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/tools/playground/</guid>
				<description>&lt;h1 id=&#34;playground&#34;&gt;Playground&lt;/h1&gt;&#xA;&lt;p&gt;Open &lt;a href=&#34;https://ferretlang.org/try/&#34;&gt;Try Ferret&lt;/a&gt;, edit the query, and select &lt;strong&gt;Run&lt;/strong&gt;. Try &lt;code&gt;RETURN 1 + 2&lt;/code&gt; to get &lt;code&gt;3&lt;/code&gt;. The v2 editor sends source and bind parameters to a hosted &lt;a href=&#34;https://ferretlang.org/docs/tools/worker/&#34;&gt;Worker&lt;/a&gt; and displays the JSON response. Its modules, browser access and filesystem belong to that host. Use your own runtime for private inputs.&lt;/p&gt;&#xA;&lt;p&gt;The separate &lt;a href=&#34;https://github.com/MontFerret/playground&#34;&gt;Playground service&lt;/a&gt; exposes an HTTP API for environment discovery, analysis, formatting, compilation and execution. Its &lt;a href=&#34;https://github.com/MontFerret/playground/blob/v1.0.0-alpha.3/api/openapi.yaml&#34;&gt;published API contract&lt;/a&gt; describes the endpoints and response shapes for applications integrating that service.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Runtime Configuration</title>
				<link>https://ferretlang.org/docs/embedding/go/configuration/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/embedding/go/configuration/</guid>
				<description>&lt;h1 id=&#34;runtime-configuration&#34;&gt;Runtime Configuration&lt;/h1&gt;&#xA;&lt;p&gt;The engine accepts functional options that control which capabilities are available to scripts, how results are encoded, how execution is logged, and how concurrency is managed.&lt;/p&gt;&#xA;&lt;h2 id=&#34;configuration-errors&#34;&gt;Configuration errors&lt;/h2&gt;&#xA;&lt;p&gt;Engine and session options are applied in order. Ferret ignores nil options,&#xA;applies every other option, and joins multiple failures into the returned error.&#xA;Construction returns no engine or session when option application fails, and&#xA;releases any engine-owned services created by those options.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Serialization</title>
				<link>https://ferretlang.org/docs/language/types/serialization/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/language/types/serialization/</guid>
				<description>&lt;h1 id=&#34;serialization&#34;&gt;Serialization&lt;/h1&gt;&#xA;&lt;p&gt;Serialization is the process of converting Ferret runtime values into an external representation that can be returned to the host application, CLI, API client, or embedding environment.&lt;/p&gt;&#xA;&lt;p&gt;Ferret programs operate on runtime values. When a program finishes, the final result is passed back to the host. Before that result can cross the host boundary, it is serialized into the encoding format selected by the host runtime. The default encoding is JSON, but embedders may choose a different representation.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Static File Server</title>
				<link>https://ferretlang.org/docs/tools/lab/static-serving/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/tools/lab/static-serving/</guid>
				<description>&lt;h1 id=&#34;static-file-server&#34;&gt;Static File Server&lt;/h1&gt;&#xA;&lt;p&gt;Lab can serve local directories over HTTP for tests. Use the static file server for fixture files, generated pages, built frontend assets, or other files that a Ferret script should read through a URL.&lt;/p&gt;&#xA;&lt;p&gt;During &lt;code&gt;lab run&lt;/code&gt;, static service URLs are passed to FQL under &lt;code&gt;@lab.static&lt;/code&gt;. Use &lt;code&gt;--param-bind&lt;/code&gt; when the script should consume one through an ordinary production parameter instead.&lt;/p&gt;&#xA;&lt;h2 id=&#34;serve-static-files-during-a-test-run&#34;&gt;Serve static files during a test run&lt;/h2&gt;&#xA;&lt;p&gt;Use &lt;code&gt;run --serve&lt;/code&gt; to serve a directory while tests run.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Ternary Operator</title>
				<link>https://ferretlang.org/docs/language/operators/ternary/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/language/operators/ternary/</guid>
				<description>&lt;h1 id=&#34;ternary-operator&#34;&gt;Ternary operator&lt;/h1&gt;&#xA;&lt;p&gt;The ternary operator provides compact two-way value selection. It expects a boolean condition as its first operand and returns the second operand when the condition is true, or the third operand otherwise. For structured branching, patterns, or condition chains, use &lt;a href=&#34;https://ferretlang.org/docs/language/control-flow/match/&#34;&gt;&lt;code&gt;match&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor is-readonly is-auto-height&#34;&gt;&#xA;    &lt;textarea id=&#34;code-1-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;&lt;/textarea&gt;&lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;example.fql&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-meta&#34;&gt;read-only&lt;/span&gt;&#xA;                &lt;button id=&#34;code-1-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;div class=&#34;code-editor-pane&#34;&gt;&#xA;            &lt;div id=&#34;code-1-text&#34; class=&#34;code-editor-text&#34; data-auto-height=&#34;true&#34;&gt;u.age &amp;gt; 15 || u.active == true ? u.userId : none&lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const editor = ace.edit(&#39;code-1-text&#39;);&#xA;            editor.setTheme(&#34;ace\/theme\/tomorrow_night&#34;);&#xA;            editor.session.setUseWorker(false);&#xA;            editor.session.setMode(&#34;ace/mode/&#34; + &#39;fql&#39;);&#xA;            editor.setOptions({&#xA;                readOnly: true,&#xA;                highlightActiveLine: false,&#xA;                highlightGutterLine: false,&#xA;                displayIndentGuides: false,&#xA;                printMargin: false&#xA;            });&#xA;            editor.renderer.$cursorLayer.element.style.display = &#34;none&#34;&#xA;            const copyBtn = document.querySelector(&#39;#code-1-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#code-1-copy-clipboard&#39;);&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy source to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(editor.getValue())&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy source&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;            function resizeAutoHeightEditor() {&#xA;                const lineHeight = editor.renderer.lineHeight || 21;&#xA;                const screenLines = Math.max(editor.session.getScreenLength(), 1);&#xA;                const nextHeight = Math.max(screenLines * lineHeight, 48);&#xA;&#xA;                editor.container.style.height = `${nextHeight}px`;&#xA;                editor.resize();&#xA;            }&#xA;&#xA;            editor.session.on(&#39;change&#39;, resizeAutoHeightEditor);&#xA;            window.addEventListener(&#39;resize&#39;, resizeAutoHeightEditor);&#xA;            resizeAutoHeightEditor();&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;There is also a shortcut variant of the ternary operator with just two operands. This variant can be used when the expression for the boolean condition and the return value should be the same:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Variables</title>
				<link>https://ferretlang.org/docs/language/variables/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/language/variables/</guid>
				<description>&lt;h1 id=&#34;variables&#34;&gt;Variables&lt;/h1&gt;&#xA;&lt;p&gt;FQL supports two kinds of variable declarations:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;let&lt;/code&gt; declares an immutable variable.&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;var&lt;/code&gt; declares a mutable variable that can be reassigned later.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;let&#34;&gt;let&lt;/h2&gt;&#xA;&lt;p&gt;The &lt;code&gt;let&lt;/code&gt; statement assigns the result of an expression to a variable.&lt;/p&gt;&#xA;&lt;p&gt;The variable is introduced into the scope where the &lt;code&gt;let&lt;/code&gt; statement appears.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor is-readonly is-auto-height&#34;&gt;&#xA;    &lt;textarea id=&#34;code-4-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;&lt;/textarea&gt;&lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;example.fql&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-meta&#34;&gt;read-only&lt;/span&gt;&#xA;                &lt;button id=&#34;code-4-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;div class=&#34;code-editor-pane&#34;&gt;&#xA;            &lt;div id=&#34;code-4-text&#34; class=&#34;code-editor-text&#34; data-auto-height=&#34;true&#34;&gt;let variableName = expression&lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const editor = ace.edit(&#39;code-4-text&#39;);&#xA;            editor.setTheme(&#34;ace\/theme\/tomorrow_night&#34;);&#xA;            editor.session.setUseWorker(false);&#xA;            editor.session.setMode(&#34;ace/mode/&#34; + &#39;fql&#39;);&#xA;            editor.setOptions({&#xA;                readOnly: true,&#xA;                highlightActiveLine: false,&#xA;                highlightGutterLine: false,&#xA;                displayIndentGuides: false,&#xA;                printMargin: false&#xA;            });&#xA;            editor.renderer.$cursorLayer.element.style.display = &#34;none&#34;&#xA;            const copyBtn = document.querySelector(&#39;#code-4-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#code-4-copy-clipboard&#39;);&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy source to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(editor.getValue())&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy source&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;            function resizeAutoHeightEditor() {&#xA;                const lineHeight = editor.renderer.lineHeight || 21;&#xA;                const screenLines = Math.max(editor.session.getScreenLength(), 1);&#xA;                const nextHeight = Math.max(screenLines * lineHeight, 48);&#xA;&#xA;                editor.container.style.height = `${nextHeight}px`;&#xA;                editor.resize();&#xA;            }&#xA;&#xA;            editor.session.on(&#39;change&#39;, resizeAutoHeightEditor);&#xA;            window.addEventListener(&#39;resize&#39;, resizeAutoHeightEditor);&#xA;            resizeAutoHeightEditor();&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;After a variable is declared with &lt;code&gt;let&lt;/code&gt;, it cannot be reassigned.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Mock API Server</title>
				<link>https://ferretlang.org/docs/tools/lab/mock-api/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/tools/lab/mock-api/</guid>
				<description>&lt;h1 id=&#34;mock-api-server&#34;&gt;Mock API Server&lt;/h1&gt;&#xA;&lt;p&gt;Lab can serve OpenAPI-described mock APIs over HTTP. Use mock APIs when a test needs stable REST responses without depending on an external service.&lt;/p&gt;&#xA;&lt;p&gt;During &lt;code&gt;lab run&lt;/code&gt;, mock service URLs are passed to FQL under &lt;code&gt;@lab.mock&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;serve-a-mock-api-during-a-test-run&#34;&gt;Serve a mock API during a test run&lt;/h2&gt;&#xA;&lt;p&gt;Use &lt;code&gt;run --mock&lt;/code&gt; to serve an OpenAPI-compatible mock API while tests run.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor terminal-shortcode&#34;&gt;&#xA;    &lt;textarea id=&#34;terminal-6-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;lab run --mock ./users.yaml@api tests/&lt;/textarea&gt;&#xA;&#xA;    &lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;terminal&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;button id=&#34;terminal-6-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;pre id=&#34;terminal-6-content&#34; class=&#34;terminal-body&#34;&gt;&lt;code&gt;&lt;span class=&#34;terminal-row&#34;&gt;&lt;span class=&#34;terminal-prompt&#34; aria-hidden=&#34;true&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;terminal-command&#34;&gt;lab run --mock ./users.yaml@api tests/&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const copyBtn = document.querySelector(&#39;#terminal-6-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#terminal-6-copy-clipboard&#39;);&#xA;            const terminalContent = copyClipboardEl.value;&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy terminal commands to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(terminalContent)&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy terminal commands&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;The service URL is available as &lt;code&gt;@lab.mock.api&lt;/code&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Expressions</title>
				<link>https://ferretlang.org/docs/language/expressions/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/language/expressions/</guid>
				<description>&lt;h1 id=&#34;expressions&#34;&gt;Expressions&lt;/h1&gt;&#xA;&lt;p&gt;An expression is a piece of FQL code that produces a value.&lt;/p&gt;&#xA;&lt;p&gt;Expressions appear throughout a query: on the right side of &lt;code&gt;let&lt;/code&gt; and &lt;code&gt;var&lt;/code&gt;, inside &lt;code&gt;return&lt;/code&gt;, in function arguments, conditions, filters, object fields, array items, and other places where a value is expected.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor is-horizontal is-auto-height&#34;&gt;&#xA;    &lt;textarea id=&#34;code-editor-1-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;&lt;/textarea&gt;&#xA;&#xA;    &lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div id=&#34;code-editor-1-header&#34; class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;example.fql&lt;/span&gt;&#xA;                &lt;small&gt;Ferret v2&lt;/small&gt;&#xA;            &lt;/div&gt;&#xA;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;button id=&#34;code-editor-1-result-toggle-button&#34; class=&#34;button is-outlined is-light code-editor-button&#34; type=&#34;button&#34; aria-expanded=&#34;false&#34; aria-controls=&#34;code-editor-1-result-pane&#34;&gt;Output&lt;/button&gt;&#xA;                &lt;button id=&#34;code-editor-1-params-toggle-button&#34; class=&#34;button is-outlined is-light code-editor-button&#34; type=&#34;button&#34; aria-expanded=&#34;false&#34; aria-controls=&#34;code-editor-1-params-drawer&#34;&gt;Params&lt;/button&gt;&#xA;                &lt;button id=&#34;code-editor-1-run-button&#34; class=&#34;run button is-outlined is-light code-editor-button&#34; type=&#34;button&#34; aria-label=&#34;Run query&#34;&gt;&#xA;                    &lt;span class=&#34;code-editor-run-label&#34;&gt;Run&lt;/span&gt;&#xA;                    &lt;span id=&#34;code-editor-1-run-button-spinner&#34; class=&#34;code-editor-run-spinner&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div id=&#34;code-editor-1-progress&#34; class=&#34;code-editor-progress&#34; role=&#34;progressbar&#34; aria-label=&#34;Running query&#34; hidden&gt;&lt;/div&gt;&#xA;            &lt;span id=&#34;code-editor-1-run-status&#34; class=&#34;code-editor-sr-only&#34; aria-live=&#34;polite&#34; aria-atomic=&#34;true&#34;&gt;&lt;/span&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;div class=&#34;code-editor-workspace&#34;&gt;&#xA;            &lt;div id=&#34;code-editor-1-grid&#34; class=&#34;code-editor-grid&#34; style=&#34;grid-template-columns: 1fr;&#34;&gt;&#xA;                &lt;div id=&#34;code-editor-1-source-pane&#34; class=&#34;code-editor-pane code-editor-pane-source&#34;&gt;&#xA;                    &lt;div class=&#34;code-editor-pane-header&#34;&gt;&#xA;                        &lt;span&gt;query.fql&lt;/span&gt;&#xA;                        &lt;div class=&#34;code-editor-pane-header-actions&#34;&gt;&#xA;                            &lt;span&gt;FQL&lt;/span&gt;&#xA;                            &lt;button id=&#34;code-editor-1-copy-button&#34; class=&#34;code-editor-pane-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;                        &lt;/div&gt;&#xA;                    &lt;/div&gt;&#xA;                    &lt;div id=&#34;code-editor-1-text&#34; class=&#34;code-editor-text&#34; data-auto-height=&#34;true&#34;&gt;let name = &amp;#34;Ada&amp;#34;&#xA;let active = true&#xA;let roles = [&amp;#34;admin&amp;#34;, &amp;#34;editor&amp;#34;]&#xA;&#xA;return {&#xA;    name: name,&#xA;    active: active,&#xA;    roleCount: length(roles)&#xA;}&lt;/div&gt;&#xA;                &lt;/div&gt;&#xA;&#xA;                &lt;div id=&#34;code-editor-1-result-pane&#34; class=&#34;code-editor-pane code-editor-pane-result&#34; hidden&gt;&#xA;                    &lt;div class=&#34;code-editor-pane-header&#34;&gt;&#xA;                        &lt;span&gt;result.json&lt;/span&gt;&#xA;                        &lt;div class=&#34;code-editor-pane-header-actions&#34;&gt;&#xA;                            &lt;span&gt;output&lt;/span&gt;&#xA;                            &lt;button id=&#34;code-editor-1-result-close-button&#34; class=&#34;code-editor-pane-button&#34; type=&#34;button&#34; aria-controls=&#34;code-editor-1-result-pane&#34;&gt;Close&lt;/button&gt;&#xA;                        &lt;/div&gt;&#xA;                    &lt;/div&gt;&#xA;                    &lt;div id=&#34;code-editor-1-result&#34; class=&#34;code-editor-result&#34; data-auto-height=&#34;true&#34;&gt;&lt;/div&gt;&#xA;                &lt;/div&gt;&#xA;            &lt;/div&gt;&#xA;&#xA;            &lt;aside id=&#34;code-editor-1-params-drawer&#34; class=&#34;code-editor-params-drawer&#34; aria-labelledby=&#34;code-editor-1-params-title&#34; hidden&gt;&#xA;                &lt;div class=&#34;code-editor-params-header&#34;&gt;&#xA;                    &lt;div&gt;&#xA;                        &lt;span id=&#34;code-editor-1-params-title&#34; class=&#34;code-editor-params-title&#34;&gt;Query parameters&lt;/span&gt;&#xA;                        &lt;span class=&#34;code-editor-params-description&#34;&gt;Values are parsed as JSON when possible.&lt;/span&gt;&#xA;                    &lt;/div&gt;&#xA;                    &lt;button id=&#34;code-editor-1-params-close-button&#34; class=&#34;code-editor-pane-button&#34; type=&#34;button&#34;&gt;Close&lt;/button&gt;&#xA;                &lt;/div&gt;&#xA;                &lt;div class=&#34;code-editor-params-body&#34;&gt;&#xA;                    &lt;div id=&#34;code-editor-1-params-empty&#34; class=&#34;code-editor-params-empty&#34;&gt;No parameters added.&lt;/div&gt;&#xA;                    &lt;div id=&#34;code-editor-1-params-rows&#34; class=&#34;code-editor-params-rows&#34;&gt;&lt;/div&gt;&#xA;                &lt;/div&gt;&#xA;                &lt;div class=&#34;code-editor-params-footer&#34;&gt;&#xA;                    &lt;button id=&#34;code-editor-1-params-add-button&#34; class=&#34;code-editor-params-add-button&#34; type=&#34;button&#34;&gt;Add parameter&lt;/button&gt;&#xA;                &lt;/div&gt;&#xA;            &lt;/aside&gt;&#xA;        &lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            function createEditor(id, mode, useWorker) {&#xA;                const editor = ace.edit(id);&#xA;                editor.setTheme(&#34;ace\/theme\/tomorrow_night&#34;);&#xA;                editor.session.setUseWorker(useWorker);&#xA;                editor.session.setMode(&#34;ace/mode/&#34; + mode);&#xA;                editor.setOptions({&#xA;                    displayIndentGuides: false,&#xA;                    printMargin: false&#xA;                });&#xA;&#xA;                return editor;&#xA;            }&#xA;&#xA;            const btn = document.querySelector(&#39;#code-editor-1-run-button&#39;);&#xA;            const textEditor = createEditor(&#39;code-editor-1-text&#39;, &#39;fql&#39;, true);&#xA;            const resultEditor = createEditor(&#39;code-editor-1-result&#39;, &#39;json&#39;, false);&#xA;            resultEditor.setReadOnly(true);&#xA;            const resultExpandBtn = null;&#xA;            const editorHeader = document.querySelector(&#39;#code-editor-1-header&#39;);&#xA;            const editorWorkspace = document.querySelector(&#39;#code-editor-1-grid&#39;).parentElement;&#xA;            const editorGrid = document.querySelector(&#39;#code-editor-1-grid&#39;);&#xA;            const runProgress = document.querySelector(&#39;#code-editor-1-progress&#39;);&#xA;            const runStatus = document.querySelector(&#39;#code-editor-1-run-status&#39;);&#xA;            const resultPane = document.querySelector(&#39;#code-editor-1-result-pane&#39;);&#xA;            const resultToggleBtn = document.querySelector(&#39;#code-editor-1-result-toggle-button&#39;);&#xA;            const resultCloseBtn = document.querySelector(&#39;#code-editor-1-result-close-button&#39;);&#xA;            const paramsToggleBtn = document.querySelector(&#39;#code-editor-1-params-toggle-button&#39;);&#xA;            const paramsDrawer = document.querySelector(&#39;#code-editor-1-params-drawer&#39;);&#xA;            const paramsCloseBtn = document.querySelector(&#39;#code-editor-1-params-close-button&#39;);&#xA;            const paramsAddBtn = document.querySelector(&#39;#code-editor-1-params-add-button&#39;);&#xA;            const paramsRows = document.querySelector(&#39;#code-editor-1-params-rows&#39;);&#xA;            const paramsEmpty = document.querySelector(&#39;#code-editor-1-params-empty&#39;);&#xA;            let isResultVisible = !resultPane.hidden;&#xA;            let isParamsVisible = !paramsDrawer.hidden;&#xA;&#xA;            function resetResultExpansion() {&#xA;                if (!resultExpandBtn) {&#xA;                    return;&#xA;                }&#xA;&#xA;                isResultExpanded = false;&#xA;                resultExpandBtn.setAttribute(&#39;aria-expanded&#39;, &#39;false&#39;);&#xA;                resultExpandBtn.textContent = &#39;Expand&#39;;&#xA;            }&#xA;&#xA;            function syncEditorLayout() {&#xA;                const sourceHeight = getEditorContentHeight(textEditor);&#xA;                textEditor.container.style.height = `${sourceHeight}px`;&#xA;&#xA;                if (isResultVisible) {&#xA;                    const resultHeight = getEditorContentHeight(resultEditor);&#xA;                    applyResultHeight(resultHeight);&#xA;                }&#xA;&#xA;                textEditor.resize();&#xA;&#xA;                if (isResultVisible) {&#xA;                    resultEditor.resize();&#xA;                }&#xA;            }&#xA;&#xA;            function setResultVisible(nextVisible) {&#xA;                isResultVisible = nextVisible;&#xA;                resultPane.hidden = !nextVisible;&#xA;                resultToggleBtn.setAttribute(&#39;aria-expanded&#39;, nextVisible ? &#39;true&#39; : &#39;false&#39;);&#xA;                editorGrid.style.gridTemplateColumns = nextVisible ? &#39;&#39; : &#39;1fr&#39;;&#xA;&#xA;                if (!nextVisible) {&#xA;                    resetResultExpansion();&#xA;                    syncEditorLayout();&#xA;                    return;&#xA;                }&#xA;&#xA;                window.requestAnimationFrame(() =&gt; {&#xA;                    syncEditorLayout();&#xA;                    resultEditor.resize(true);&#xA;                });&#xA;            }&#xA;&#xA;            resultToggleBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setResultVisible(!isResultVisible);&#xA;            });&#xA;&#xA;            resultCloseBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setResultVisible(false);&#xA;            });&#xA;&#xA;            const collapsedResultHeightStyle = resultEditor.container.style.height;&#xA;            let isResultExpanded = false;&#xA;&#xA;            function getEditorContentHeight(editor) {&#xA;                const lineHeight = editor.renderer.lineHeight || 21;&#xA;                const screenLines = Math.max(editor.session.getScreenLength(), 1);&#xA;&#xA;                return Math.max(screenLines * lineHeight, 48);&#xA;            }&#xA;&#xA;            function getMaxResultHeight(fallbackHeight) {&#xA;                const viewportHeight = window.innerHeight || document.documentElement.clientHeight || fallbackHeight;&#xA;                const rootFontSize = parseFloat(window.getComputedStyle(document.documentElement).fontSize) || 16;&#xA;&#xA;                return Math.min(viewportHeight * 0.45, 32 * rootFontSize);&#xA;            }&#xA;&#xA;            function getCollapsedResultHeight() {&#xA;                return getEditorContentHeight(resultEditor);&#xA;            }&#xA;&#xA;            function getExpandedResultHeight(collapsedHeight) {&#xA;                const lineHeight = resultEditor.renderer.lineHeight || textEditor.renderer.lineHeight || 21;&#xA;                const maxAllowedHeight = getMaxResultHeight(collapsedHeight);&#xA;                const screenLines = Math.max(resultEditor.session.getScreenLength(), 1);&#xA;                const contentHeight = (screenLines * lineHeight) + (lineHeight * 2);&#xA;                const targetHeight = Math.min(contentHeight, maxAllowedHeight);&#xA;&#xA;                return Math.max(collapsedHeight, Math.round(targetHeight));&#xA;            }&#xA;&#xA;            function applyResultHeight(collapsedHeight) {&#xA;                if (resultExpandBtn &amp;&amp; isResultExpanded) {&#xA;                    resultEditor.container.style.height = `${getExpandedResultHeight(collapsedHeight)}px`;&#xA;                } else {&#xA;                    resultEditor.container.style.height = `${Math.min(collapsedHeight, getMaxResultHeight(collapsedHeight))}px`;&#xA;                }&#xA;&#xA;                resultEditor.resize();&#xA;            }&#xA;            textEditor.session.on(&#39;change&#39;, syncEditorLayout);&#xA;&#xA;            if (resultExpandBtn) {&#xA;                resultExpandBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                    isResultExpanded = !isResultExpanded;&#xA;                    resultExpandBtn.setAttribute(&#39;aria-expanded&#39;, isResultExpanded ? &#39;true&#39; : &#39;false&#39;);&#xA;                    resultExpandBtn.textContent = isResultExpanded ? &#39;Collapse&#39; : &#39;Expand&#39;;&#xA;                    syncEditorLayout();&#xA;                });&#xA;            }&#xA;&#xA;            function syncParamsEmptyState() {&#xA;                paramsEmpty.hidden = paramsRows.children.length &gt; 0;&#xA;            }&#xA;&#xA;            function formatParamValue(value) {&#xA;                return typeof value === &#39;string&#39; ? value : JSON.stringify(value);&#xA;            }&#xA;&#xA;            function createParamRow(name, value) {&#xA;                const row = document.createElement(&#39;div&#39;);&#xA;                row.className = &#39;code-editor-param-row&#39;;&#xA;&#xA;                const nameInput = document.createElement(&#39;input&#39;);&#xA;                nameInput.className = &#39;code-editor-param-input code-editor-param-name&#39;;&#xA;                nameInput.type = &#39;text&#39;;&#xA;                nameInput.placeholder = &#39;name&#39;;&#xA;                nameInput.setAttribute(&#39;aria-label&#39;, &#39;Parameter name&#39;);&#xA;                nameInput.value = name || &#39;&#39;;&#xA;&#xA;                const separator = document.createElement(&#39;span&#39;);&#xA;                separator.className = &#39;code-editor-param-separator&#39;;&#xA;                separator.setAttribute(&#39;aria-hidden&#39;, &#39;true&#39;);&#xA;                separator.textContent = &#39;:&#39;;&#xA;&#xA;                const valueInput = document.createElement(&#39;input&#39;);&#xA;                valueInput.className = &#39;code-editor-param-input code-editor-param-value&#39;;&#xA;                valueInput.type = &#39;text&#39;;&#xA;                valueInput.placeholder = &#39;value&#39;;&#xA;                valueInput.setAttribute(&#39;aria-label&#39;, &#39;Parameter value&#39;);&#xA;                valueInput.value = value === undefined ? &#39;&#39; : formatParamValue(value);&#xA;&#xA;                const removeBtn = document.createElement(&#39;button&#39;);&#xA;                removeBtn.className = &#39;code-editor-param-remove-button&#39;;&#xA;                removeBtn.type = &#39;button&#39;;&#xA;                removeBtn.setAttribute(&#39;aria-label&#39;, `Remove parameter ${name || &#39;row&#39;}`);&#xA;                removeBtn.textContent = &#39;Remove&#39;;&#xA;                removeBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                    row.remove();&#xA;                    syncParamsEmptyState();&#xA;                });&#xA;&#xA;                row.append(nameInput, separator, valueInput, removeBtn);&#xA;                paramsRows.appendChild(row);&#xA;                syncParamsEmptyState();&#xA;&#xA;                return nameInput;&#xA;            }&#xA;&#xA;            function setParamsVisible(nextVisible) {&#xA;                isParamsVisible = nextVisible;&#xA;                paramsDrawer.hidden = !nextVisible;&#xA;                paramsToggleBtn.setAttribute(&#39;aria-expanded&#39;, nextVisible ? &#39;true&#39; : &#39;false&#39;);&#xA;                editorWorkspace.classList.toggle(&#39;is-params-open&#39;, nextVisible);&#xA;&#xA;                if (nextVisible) {&#xA;                    paramsCloseBtn.focus();&#xA;                } else {&#xA;                    paramsToggleBtn.focus();&#xA;                }&#xA;            }&#xA;&#xA;            function setParamsControlsDisabled(disabled) {&#xA;                paramsToggleBtn.disabled = disabled;&#xA;                paramsDrawer.querySelectorAll(&#39;button, input&#39;).forEach((control) =&gt; {&#xA;                    control.disabled = disabled;&#xA;                });&#xA;            }&#xA;&#xA;            function parseParamValue(value) {&#xA;                try {&#xA;                    return JSON.parse(value);&#xA;                } catch (err) {&#xA;                    return value;&#xA;                }&#xA;            }&#xA;&#xA;            function getParams() {&#xA;                return Array.from(paramsRows.querySelectorAll(&#39;.code-editor-param-row&#39;)).reduce((params, row) =&gt; {&#xA;                    const name = row.querySelector(&#39;.code-editor-param-name&#39;).value.trim();&#xA;&#xA;                    if (name) {&#xA;                        const value = row.querySelector(&#39;.code-editor-param-value&#39;).value;&#xA;                        params[name] = parseParamValue(value);&#xA;                    }&#xA;&#xA;                    return params;&#xA;                }, {});&#xA;            }&#xA;&#xA;            const initialParams = JSON.parse(&#34;{}&#34;);&#xA;&#xA;            if (initialParams &amp;&amp; typeof initialParams === &#39;object&#39; &amp;&amp; !Array.isArray(initialParams)) {&#xA;                Object.entries(initialParams).forEach(([name, value]) =&gt; {&#xA;                    createParamRow(name, value);&#xA;                });&#xA;            }&#xA;&#xA;            syncParamsEmptyState();&#xA;&#xA;            paramsToggleBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setParamsVisible(!isParamsVisible);&#xA;            });&#xA;&#xA;            paramsCloseBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setParamsVisible(false);&#xA;            });&#xA;&#xA;            paramsAddBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                createParamRow(&#39;&#39;, &#39;&#39;).focus();&#xA;            });&#xA;&#xA;            window.addEventListener(&#39;resize&#39;, syncEditorLayout);&#xA;            syncEditorLayout();&#xA;&#xA;            function setContent(editor, content) {&#xA;                editor.setValue(content, -1);&#xA;            }&#xA;                const copyClipboardEl = document.querySelector(&#39;#code-editor-1-copy-clipboard&#39;);&#xA;                const copyBtn = document.querySelector(&#39;#code-editor-1-copy-button&#39;);&#xA;&#xA;                function copyTextWithFallback(content) {&#xA;                    copyClipboardEl.value = content;&#xA;                    copyClipboardEl.focus();&#xA;                    copyClipboardEl.select();&#xA;&#xA;                    if (!document.execCommand(&#39;copy&#39;)) {&#xA;                        throw new Error(&#39;Could not copy source to the clipboard&#39;);&#xA;                    }&#xA;                }&#xA;&#xA;                function copyTextToClipboard(content) {&#xA;                    if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                        return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                            copyTextWithFallback(content);&#xA;                        });&#xA;                    }&#xA;&#xA;                    copyTextWithFallback(content);&#xA;&#xA;                    return Promise.resolve();&#xA;                }&#xA;&#xA;                copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                    copyTextToClipboard(textEditor.getValue())&#xA;                        .then(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copied&#39;;&#xA;                            window.setTimeout(() =&gt; {&#xA;                                copyBtn.textContent = &#39;Copy&#39;;&#xA;                            }, 1200);&#xA;                        })&#xA;                        .catch((err) =&gt; {&#xA;                            console.error(&#39;Failed to copy source&#39;);&#xA;                            console.error(err);&#xA;                        });&#xA;                });&#xA;&#xA;            let isRunning = false;&#xA;&#xA;            function onStart() {&#xA;                isRunning = true;&#xA;                textEditor.setReadOnly(true);&#xA;                runProgress.hidden = false;&#xA;                runStatus.textContent = &#39;Running query&#39;;&#xA;                editorHeader.setAttribute(&#39;aria-busy&#39;, &#39;true&#39;);&#xA;                editorGrid.setAttribute(&#39;aria-busy&#39;, &#39;true&#39;);&#xA;                btn.classList.add(&#39;is-running&#39;);&#xA;                btn.setAttribute(&#39;aria-busy&#39;, &#39;true&#39;);&#xA;                btn.setAttribute(&#39;aria-label&#39;, &#39;Running query&#39;);&#xA;                btn.disabled = true;&#xA;                setParamsControlsDisabled(true);&#xA;            }&#xA;&#xA;            function onEnd(result) {&#xA;                isRunning = false;&#xA;                textEditor.setReadOnly(false);&#xA;                runProgress.hidden = true;&#xA;                runStatus.textContent = &#39;&#39;;&#xA;                editorHeader.setAttribute(&#39;aria-busy&#39;, &#39;false&#39;);&#xA;                editorGrid.setAttribute(&#39;aria-busy&#39;, &#39;false&#39;);&#xA;                btn.classList.remove(&#39;is-running&#39;);&#xA;                btn.setAttribute(&#39;aria-busy&#39;, &#39;false&#39;);&#xA;                btn.setAttribute(&#39;aria-label&#39;, &#39;Run query&#39;);&#xA;                btn.disabled = false;&#xA;                setParamsControlsDisabled(false);&#xA;&#xA;                setContent(resultEditor, result);&#xA;                setResultVisible(true);&#xA;            }&#xA;&#xA;            btn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                if (isRunning) {&#xA;                    return;&#xA;                }&#xA;&#xA;                const body = {&#xA;                        text: textEditor.getValue(),&#xA;                        params: getParams()&#xA;                };&#xA;                const url = &#34;https:\/\/worker-v2-811908774949.us-east1.run.app&#34;;&#xA;&#xA;                onStart();&#xA;                fetch(url, {&#xA;                    method: &#39;post&#39;,&#xA;                    cache: &#39;no-cache&#39;,&#xA;                    headers: {&#xA;                        &#39;Content-Type&#39;: &#39;application/json; charset=utf-8&#39;&#xA;                    },&#xA;                    signal: AbortSignal.timeout(1000 * 60), &#xA;                    body: JSON.stringify(body)&#xA;                })&#xA;                    .then(r =&gt; {&#xA;                        if (r.status === 200) {&#xA;                            return r.json()&#xA;                        }&#xA;                        &#xA;                        if (r.status === 426) {&#xA;                            throw new Error(`Too many requests. Try again later.`);&#xA;                        }&#xA;                        &#xA;                        if (r.status === 400) {&#xA;                            return r.json().then((data) =&gt; {&#xA;                                if (data.details) {&#xA;                                    throw new Error(data.details);&#xA;                                }&#xA;                                &#xA;                                throw new Error(data.error);&#xA;                            });&#xA;                        }&#xA;                        &#xA;                        throw new Error(`Unexpected error. Try again later.`);&#xA;                    })&#xA;                    .then((data) =&gt; {&#xA;                        onEnd(JSON.stringify(data, null, 4));&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        onEnd(err.message);&#xA;                    });&#xA;            });&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;In this example, &lt;code&gt;&amp;quot;Ada&amp;quot;&lt;/code&gt;, &lt;code&gt;true&lt;/code&gt;, &lt;code&gt;[&amp;quot;admin&amp;quot;, &amp;quot;editor&amp;quot;]&lt;/code&gt;, &lt;code&gt;name&lt;/code&gt;, &lt;code&gt;active&lt;/code&gt;, and &lt;code&gt;length(roles)&lt;/code&gt; are all expressions.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Host Values</title>
				<link>https://ferretlang.org/docs/embedding/go/host-values/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/embedding/go/host-values/</guid>
				<description>&lt;h1 id=&#34;host-values&#34;&gt;Host Values&lt;/h1&gt;&#xA;&lt;p&gt;Host values let an embedding application expose Go-managed resources and objects to FQL scripts. This page covers how to implement them in Go. For the FQL perspective — what host values look like inside a script and which operations they support — see &lt;a href=&#34;https://ferretlang.org/docs/language/types/host/&#34;&gt;Host Values&lt;/a&gt; and &lt;a href=&#34;https://ferretlang.org/docs/language/types/capabilities/&#34;&gt;Capability Types&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;when-to-implement-a-host-value&#34;&gt;When to implement a host value&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Resource handle&lt;/strong&gt; — the Go object owns an external resource (database connection, file handle, HTTP client) whose lifecycle outlives a single function call.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Lazy value&lt;/strong&gt; — the value materializes data only when accessed, avoiding upfront cost (cursor, paginated result set).&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Domain object&lt;/strong&gt; — the value has rich behavior (property access, iteration, dispatch) that cannot be expressed as a plain array or object.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;External client&lt;/strong&gt; — the value wraps a Go client library and exposes its operations through FQL capabilities (query, dispatch, subscribe).&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Controlled capabilities&lt;/strong&gt; — you want to expose only certain operations (read-only properties, no iteration) rather than giving scripts full access to the underlying data.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;choosing-the-right-mechanism&#34;&gt;Choosing the right mechanism&lt;/h2&gt;&#xA;&lt;div class=&#34;table-scroll&#34; role=&#34;region&#34; aria-label=&#34;Scrollable table&#34; tabindex=&#34;0&#34;&gt;&#xA;    &lt;table&gt;&#xA;        &lt;thead&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;th&gt;Mechanism&lt;/th&gt;&#xA;                        &lt;th&gt;Best for&lt;/th&gt;&#xA;                        &lt;th&gt;Script sees&lt;/th&gt;&#xA;                        &lt;th&gt;Lifecycle&lt;/th&gt;&#xA;                &lt;/tr&gt;&#xA;        &lt;/thead&gt;&#xA;        &lt;tbody&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;Parameter&lt;/td&gt;&#xA;                        &lt;td&gt;Static data: strings, numbers, config, JSON-like structures&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;@name&lt;/code&gt; — a plain value&lt;/td&gt;&#xA;                        &lt;td&gt;Host sets before execution&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;Function&lt;/td&gt;&#xA;                        &lt;td&gt;Stateless computation: hash, format, fetch&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;fn(args)&lt;/code&gt; → result&lt;/td&gt;&#xA;                        &lt;td&gt;No state between calls&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;Host value&lt;/td&gt;&#xA;                        &lt;td&gt;Stateful resource or behavioral object&lt;/td&gt;&#xA;                        &lt;td&gt;Variable with capabilities: &lt;code&gt;val.prop&lt;/code&gt;, &lt;code&gt;for x in val&lt;/code&gt;, &lt;code&gt;query ... in val&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;See &lt;a href=&#34;#cleanup-and-finalization&#34;&gt;cleanup and finalization&lt;/a&gt;&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;Module&lt;/td&gt;&#xA;                        &lt;td&gt;Self-contained extension bundling functions + hooks&lt;/td&gt;&#xA;                        &lt;td&gt;Namespaced functions and values&lt;/td&gt;&#xA;                        &lt;td&gt;Module &lt;code&gt;Register&lt;/code&gt; + engine lifecycle hooks&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;        &lt;/tbody&gt;&#xA;    &lt;/table&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;When in doubt, walk through these questions:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Inspect</title>
				<link>https://ferretlang.org/docs/tools/cli/inspect/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/tools/cli/inspect/</guid>
				<description>&lt;h1 id=&#34;inspect&#34;&gt;Inspect&lt;/h1&gt;&#xA;&lt;p&gt;The &lt;code&gt;inspect&lt;/code&gt; command compiles a FQL script and prints a disassembly of the resulting program. This is useful for understanding how the compiler translates FQL into bytecode.&lt;/p&gt;&#xA;&lt;h2 id=&#34;inspect-a-script&#34;&gt;Inspect a script&lt;/h2&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor terminal-shortcode&#34;&gt;&#xA;    &lt;textarea id=&#34;terminal-6-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;ferret inspect script.fql&lt;/textarea&gt;&#xA;&#xA;    &lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;terminal&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;button id=&#34;terminal-6-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;pre id=&#34;terminal-6-content&#34; class=&#34;terminal-body&#34;&gt;&lt;code&gt;&lt;span class=&#34;terminal-row&#34;&gt;&lt;span class=&#34;terminal-prompt&#34; aria-hidden=&#34;true&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;terminal-command&#34;&gt;ferret inspect script.fql&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const copyBtn = document.querySelector(&#39;#terminal-6-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#terminal-6-copy-clipboard&#39;);&#xA;            const terminalContent = copyClipboardEl.value;&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy terminal commands to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(terminalContent)&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy terminal commands&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;Without any filter flags, the full disassembly is printed: summary, bytecode instructions, constant pool, function definitions, and source spans.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Operator Precedence</title>
				<link>https://ferretlang.org/docs/language/operators/precedence/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/language/operators/precedence/</guid>
				<description>&lt;h1 id=&#34;operator-precedence&#34;&gt;Operator precedence&lt;/h1&gt;&#xA;&lt;p&gt;The operator precedence in FQL is listed below from lowest to highest. This order follows the FQL grammar; do not assume unary and comparison operators have the same relative order as another language.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;? :&lt;/code&gt; ternary operator&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;??&lt;/code&gt; none-coalescing operator&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;||&lt;/code&gt; logical or&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt; logical and&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;!&lt;/code&gt;, &lt;code&gt;+&lt;/code&gt;, &lt;code&gt;-&lt;/code&gt; logical negation, unary plus, unary minus&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;like&lt;/code&gt;, &lt;code&gt;not like&lt;/code&gt; pattern matching&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;in&lt;/code&gt;, &lt;code&gt;not in&lt;/code&gt; containment&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;all&lt;/code&gt;, &lt;code&gt;any&lt;/code&gt;, &lt;code&gt;none&lt;/code&gt; array comparison operators&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;==&lt;/code&gt;, &lt;code&gt;!=&lt;/code&gt;, &lt;code&gt;&amp;lt;&lt;/code&gt;, &lt;code&gt;&amp;lt;=&lt;/code&gt;, &lt;code&gt;&amp;gt;=&lt;/code&gt;, &lt;code&gt;&amp;gt;&lt;/code&gt; comparison operators&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;=~&lt;/code&gt;, &lt;code&gt;!~&lt;/code&gt; regular expression matching&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;+&lt;/code&gt;, &lt;code&gt;-&lt;/code&gt; addition, subtraction&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;*&lt;/code&gt;, &lt;code&gt;/&lt;/code&gt;, &lt;code&gt;%&lt;/code&gt; multiplication, division, modulus&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;..&lt;/code&gt; range and primary expressions&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;()&lt;/code&gt; function call&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;?.&lt;/code&gt; optional chaining&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;.&lt;/code&gt; member access&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;[]&lt;/code&gt; indexed value access&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Operators nearer the bottom bind more tightly. Assignment is a statement and cannot be nested in an expression. For example, multiplication is evaluated before addition, logical and before logical or, and comparisons before unary and logical operators.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Runners</title>
				<link>https://ferretlang.org/docs/tools/lab/runners/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/tools/lab/runners/</guid>
				<description>&lt;h1 id=&#34;runners&#34;&gt;Runners&lt;/h1&gt;&#xA;&lt;p&gt;The Lab runner coordinates source files, test cases, runtime execution, and reporting. Its main controls are concurrency, attempts, repeated successful runs, intervals, and per-test timeouts.&lt;/p&gt;&#xA;&lt;h2 id=&#34;run-tests-concurrently&#34;&gt;Run tests concurrently&lt;/h2&gt;&#xA;&lt;p&gt;Use &lt;code&gt;--concurrency&lt;/code&gt; to control how many test files Lab can execute at once.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor terminal-shortcode&#34;&gt;&#xA;    &lt;textarea id=&#34;terminal-7-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;lab run --concurrency=4 tests/&lt;/textarea&gt;&#xA;&#xA;    &lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;terminal&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;button id=&#34;terminal-7-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;pre id=&#34;terminal-7-content&#34; class=&#34;terminal-body&#34;&gt;&lt;code&gt;&lt;span class=&#34;terminal-row&#34;&gt;&lt;span class=&#34;terminal-prompt&#34; aria-hidden=&#34;true&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;terminal-command&#34;&gt;lab run --concurrency=4 tests/&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const copyBtn = document.querySelector(&#39;#terminal-7-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#terminal-7-copy-clipboard&#39;);&#xA;            const terminalContent = copyClipboardEl.value;&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy terminal commands to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(terminalContent)&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy terminal commands&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;The default is &lt;code&gt;1&lt;/code&gt;. If &lt;code&gt;0&lt;/code&gt; is provided, Lab falls back to &lt;code&gt;1&lt;/code&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Runtime and WASM Limitations</title>
				<link>https://ferretlang.org/docs/embedding/javascript/limitations/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/embedding/javascript/limitations/</guid>
				<description>&lt;h1 id=&#34;runtime-and-wasm-limitations&#34;&gt;Runtime and WASM Limitations&lt;/h1&gt;&#xA;&lt;p&gt;&lt;code&gt;@montferret/ferret&lt;/code&gt; runs the Ferret v2 runtime through its WebAssembly build. The language and virtual machine are Ferret; the boundaries below come from the host environment or from features the current JavaScript API does not expose.&lt;/p&gt;&#xA;&lt;h2 id=&#34;runtime-initialization&#34;&gt;Runtime initialization&lt;/h2&gt;&#xA;&lt;p&gt;Each &lt;code&gt;create()&lt;/code&gt; call loads and instantiates a separate WASM runtime. Initialization is asynchronous and has a meaningful startup and memory cost, so applications should normally reuse an engine instead of creating one for every query.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Waitfor Expressions</title>
				<link>https://ferretlang.org/docs/language/control-flow/waitfor/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/language/control-flow/waitfor/</guid>
				<description>&lt;h1 id=&#34;waitfor-expressions&#34;&gt;Waitfor Expressions&lt;/h1&gt;&#xA;&lt;p&gt;A &lt;code&gt;waitfor&lt;/code&gt; expression pauses a query until something happens, then resumes and produces a value. It can wait for one condition or event, or synchronize a group with &lt;code&gt;any { ... }&lt;/code&gt; or &lt;code&gt;all { ... }&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;waiting-for-a-condition&#34;&gt;Waiting for a condition&lt;/h2&gt;&#xA;&lt;p&gt;In its condition (predicate) mode, &lt;code&gt;waitfor&lt;/code&gt; re-checks an ordinary expression until it is satisfied or a timeout is reached. This mode is a pure language construct — it needs no special capability.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Work with APIs</title>
				<link>https://ferretlang.org/docs/guides/apis/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/guides/apis/</guid>
				<description>&lt;h1 id=&#34;work-with-apis&#34;&gt;Work with APIs&lt;/h1&gt;&#xA;&lt;p&gt;Use the CLI or an embedded runtime with outbound HTTP enabled to fetch JSON from a REST API. The website editor’s Worker disables these HTTP calls. A self-hosted Worker can &lt;a href=&#34;https://ferretlang.org/docs/tools/worker/configuration/#outbound-http-access&#34;&gt;allow specific API hosts&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;make-a-get-request&#34;&gt;Make a GET request&lt;/h2&gt;&#xA;&lt;p&gt;Use &lt;code&gt;io::net::http::get&lt;/code&gt; to fetch data from an API:&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor terminal-shortcode is-command&#34;&gt;&#xA;    &lt;textarea id=&#34;terminal-1-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;ferret run -e &amp;#39;&#xA;let response = io::net::http::get(&amp;#34;https://jsonplaceholder.typicode.com/posts/1&amp;#34;)&#xA;let data = encoding::json_parse(to_string(response))&#xA;return data&#xA;&amp;#39;&lt;/textarea&gt;&#xA;&#xA;    &lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;terminal&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;button id=&#34;terminal-1-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;pre id=&#34;terminal-1-content&#34; class=&#34;terminal-body&#34;&gt;&lt;code&gt;&lt;span class=&#34;terminal-row&#34;&gt;&lt;span class=&#34;terminal-prompt&#34; aria-hidden=&#34;true&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;terminal-command&#34;&gt;ferret run -e &amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;terminal-row&#34;&gt;&lt;span class=&#34;terminal-prompt terminal-prompt-spacer&#34; aria-hidden=&#34;true&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;terminal-command&#34;&gt;let response = io::net::http::get(&amp;#34;https://jsonplaceholder.typicode.com/posts/1&amp;#34;)&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;terminal-row&#34;&gt;&lt;span class=&#34;terminal-prompt terminal-prompt-spacer&#34; aria-hidden=&#34;true&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;terminal-command&#34;&gt;let data = encoding::json_parse(to_string(response))&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;terminal-row&#34;&gt;&lt;span class=&#34;terminal-prompt terminal-prompt-spacer&#34; aria-hidden=&#34;true&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;terminal-command&#34;&gt;return data&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;terminal-row&#34;&gt;&lt;span class=&#34;terminal-prompt terminal-prompt-spacer&#34; aria-hidden=&#34;true&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;terminal-command&#34;&gt;&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const copyBtn = document.querySelector(&#39;#terminal-1-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#terminal-1-copy-clipboard&#39;);&#xA;            const terminalContent = copyClipboardEl.value;&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy terminal commands to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(terminalContent)&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy terminal commands&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;&lt;code&gt;io::net::http::get&lt;/code&gt; returns raw bytes. Use &lt;code&gt;to_string&lt;/code&gt; to convert to a string, then &lt;code&gt;encoding::json_parse&lt;/code&gt; to decode JSON.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Error Handling</title>
				<link>https://ferretlang.org/docs/language/control-flow/error-handling/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/language/control-flow/error-handling/</guid>
				<description>&lt;h1 id=&#34;error-handling&#34;&gt;Error Handling&lt;/h1&gt;&#xA;&lt;p&gt;FQL does not use try/catch blocks. Instead, a &lt;strong&gt;recovery tail&lt;/strong&gt; attaches directly to the expression that might fail. The tail tells the runtime what to do when a failure occurs — return a fallback value, retry the operation, or propagate the error.&lt;/p&gt;&#xA;&lt;p&gt;For member access on values that may be &lt;code&gt;none&lt;/code&gt;, FQL provides the &lt;strong&gt;optional chaining operator&lt;/strong&gt; (&lt;code&gt;?.&lt;/code&gt;), which returns &lt;code&gt;none&lt;/code&gt; instead of failing.&lt;/p&gt;&#xA;&lt;h2 id=&#34;returning-a-fallback-value&#34;&gt;Returning a fallback value&lt;/h2&gt;&#xA;&lt;p&gt;The most common recovery is &lt;code&gt;on error return&lt;/code&gt;, which catches a runtime failure and produces a fallback value instead.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Array Operators</title>
				<link>https://ferretlang.org/docs/language/operators/array/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/language/operators/array/</guid>
				<description>&lt;h1 id=&#34;array-operators&#34;&gt;Array operators&lt;/h1&gt;&#xA;&lt;p&gt;FQL provides several operators for working with arrays and nested array structures.&lt;/p&gt;&#xA;&lt;p&gt;Array operators can access individual items, expand arrays into derived values, flatten nested arrays, or search through nested array structures.&lt;/p&gt;&#xA;&lt;p&gt;The most common forms are:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;[]&lt;/code&gt; indexed value access operator&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;[*]&lt;/code&gt; array expansion operator&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;[**]&lt;/code&gt; array flattening operator&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;[* filter condition]&lt;/code&gt; array expansion with filtering&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;[* return projection]&lt;/code&gt; array expansion with projection&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;[** limit n]&lt;/code&gt; array flattening with limit&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;[? condition]&lt;/code&gt; array search operator&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;array-expansion&#34;&gt;Array expansion&lt;/h2&gt;&#xA;&lt;p&gt;Array expansion applies an expression to each item in an array and returns the produced values as a new array.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Browser</title>
				<link>https://ferretlang.org/docs/tools/cli/browser/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/tools/cli/browser/</guid>
				<description>&lt;h1 id=&#34;browser&#34;&gt;Browser&lt;/h1&gt;&#xA;&lt;p&gt;The &lt;code&gt;browser&lt;/code&gt; command manages Chrome or Chromium instances for scripts that need a browser through the Chrome DevTools Protocol.&lt;/p&gt;&#xA;&lt;p&gt;Most users do not need this command directly. When you pass &lt;code&gt;--browser-open&lt;/code&gt; or &lt;code&gt;--browser-headless&lt;/code&gt; to &lt;code&gt;ferret run&lt;/code&gt;, the CLI starts and stops a browser automatically. The &lt;code&gt;browser&lt;/code&gt; command is useful when you want a long-lived browser that multiple script runs can share.&lt;/p&gt;&#xA;&lt;h2 id=&#34;select-cdp-in-the-script&#34;&gt;Select CDP in the script&lt;/h2&gt;&#xA;&lt;p&gt;The HTML module defaults to a memory driver for static HTML. Select the CDP driver when the script needs Chrome or Chromium:&lt;/p&gt;</description>
			</item>
			<item>
				<title>HTTP Runtime</title>
				<link>https://ferretlang.org/docs/tools/lab/http-runtime/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/tools/lab/http-runtime/</guid>
				<description>&lt;h1 id=&#34;http-runtime&#34;&gt;HTTP Runtime&lt;/h1&gt;&#xA;&lt;p&gt;By default, Lab runs tests with its builtin Ferret runtime. Use an HTTP runtime when you want Lab to send each query to a remote Ferret-compatible service.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor terminal-shortcode&#34;&gt;&#xA;    &lt;textarea id=&#34;terminal-7-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;lab run --runtime=http://localhost:8080 tests/&lt;/textarea&gt;&#xA;&#xA;    &lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;terminal&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;button id=&#34;terminal-7-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;pre id=&#34;terminal-7-content&#34; class=&#34;terminal-body&#34;&gt;&lt;code&gt;&lt;span class=&#34;terminal-row&#34;&gt;&lt;span class=&#34;terminal-prompt&#34; aria-hidden=&#34;true&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;terminal-command&#34;&gt;lab run --runtime=http://localhost:8080 tests/&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const copyBtn = document.querySelector(&#39;#terminal-7-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#terminal-7-copy-clipboard&#39;);&#xA;            const terminalContent = copyClipboardEl.value;&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy terminal commands to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(terminalContent)&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy terminal commands&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;Lab uses the Universal Ferret API&amp;rsquo;s one-shot &lt;code&gt;api.Runtime.Run&lt;/code&gt; for HTTP execution, including repetitions and retries. Its case executor remembers that HTTP compilation is unsupported and falls back without issuing a compilation request. HTTP keeps the request protocol described below. Runtime selection is per Lab run. The runner, sources, local services, parameters, and reporters still run in the Lab process.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Modules</title>
				<link>https://ferretlang.org/docs/embedding/go/modules/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/embedding/go/modules/</guid>
				<description>&lt;h1 id=&#34;modules&#34;&gt;Modules&lt;/h1&gt;&#xA;&lt;h2 id=&#34;overview&#34;&gt;Overview&lt;/h2&gt;&#xA;&lt;p&gt;Modules add capabilities to an embedded Ferret runtime. Official, contributed, third-party, and application-defined modules all use the same registration model:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Import the module as a Go package.&lt;/li&gt;&#xA;&lt;li&gt;Construct and configure it in the host application.&lt;/li&gt;&#xA;&lt;li&gt;Pass it to the engine with &lt;code&gt;ferret.WithModules&lt;/code&gt;.&lt;/li&gt;&#xA;&lt;li&gt;Let &lt;code&gt;ferret.New&lt;/code&gt; register it and run its initialization hooks.&lt;/li&gt;&#xA;&lt;li&gt;Close module-owned resources through the engine lifecycle.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;The host application chooses which modules are available. Importing a package alone does not add its functions or runtime capabilities to Ferret.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Test extraction scripts</title>
				<link>https://ferretlang.org/docs/guides/testing/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/guides/testing/</guid>
				<description>&lt;h1 id=&#34;test-extraction-scripts&#34;&gt;Test extraction scripts&lt;/h1&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://ferretlang.org/docs/tools/lab/&#34;&gt;Lab&lt;/a&gt; runs FQL test files, applies timeouts and retries, and reports whether each file passed or failed. Assertions come from Ferret&amp;rsquo;s &lt;a href=&#34;https://ferretlang.org/docs/standard-library/testing/&#34;&gt;&lt;code&gt;t&lt;/code&gt; standard-library namespace&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;The selected Ferret runtime still owns FQL execution and module availability. Lab&amp;rsquo;s builtin runtime provides Ferret core; Lab does not add runtime-specific modules such as &lt;code&gt;web::html&lt;/code&gt;. To test a script that uses one, select an &lt;a href=&#34;https://ferretlang.org/docs/tools/lab/http-runtime/&#34;&gt;HTTP&lt;/a&gt; or &lt;a href=&#34;https://ferretlang.org/docs/tools/lab/wire-runtime/&#34;&gt;Wire&lt;/a&gt; runtime that includes it.&lt;/p&gt;&#xA;&lt;h2 id=&#34;install-lab&#34;&gt;Install Lab&lt;/h2&gt;&#xA;&lt;p&gt;Download the documented Lab release for your platform. On Linux x86_64:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Mod</title>
				<link>https://ferretlang.org/docs/tools/cli/mod/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/tools/cli/mod/</guid>
				<description>&lt;h1 id=&#34;mod&#34;&gt;Mod&lt;/h1&gt;&#xA;&lt;p&gt;The &lt;code&gt;ferret mod&lt;/code&gt; command groups Registry discovery, project installation, module initialization, and publication.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ferret mod search [query]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ferret mod info &amp;lt;name&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ferret mod install &amp;lt;module&amp;gt;[@version]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ferret mod init [name]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;ferret mod publish [--tag &amp;lt;tag&amp;gt;] [--dry-run | --print]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;search-and-inspect&#34;&gt;Search and inspect&lt;/h2&gt;&#xA;&lt;p&gt;Search module identities and descriptions:&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor terminal-shortcode is-command&#34;&gt;&#xA;    &lt;textarea id=&#34;terminal-7-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;ferret mod search sqlite&lt;/textarea&gt;&#xA;&#xA;    &lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;terminal&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;button id=&#34;terminal-7-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;pre id=&#34;terminal-7-content&#34; class=&#34;terminal-body&#34;&gt;&lt;code&gt;&lt;span class=&#34;terminal-row&#34;&gt;&lt;span class=&#34;terminal-prompt&#34; aria-hidden=&#34;true&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;terminal-command&#34;&gt;ferret mod search sqlite&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const copyBtn = document.querySelector(&#39;#terminal-7-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#terminal-7-copy-clipboard&#39;);&#xA;            const terminalContent = copyClipboardEl.value;&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy terminal commands to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(terminalContent)&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy terminal commands&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;Show one module&amp;rsquo;s available versions, selected version, namespace, source, compatibility, and documentation:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Wire Runtime</title>
				<link>https://ferretlang.org/docs/tools/lab/wire-runtime/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/tools/lab/wire-runtime/</guid>
				<description>&lt;h1 id=&#34;wire-runtime&#34;&gt;Wire Runtime&lt;/h1&gt;&#xA;&lt;p&gt;Use Wire to test functions supplied by an application. Start the &lt;a href=&#34;https://ferretlang.org/docs/embedding/wire/#host-the-configured-engine&#34;&gt;example host&lt;/a&gt; and save this as &lt;code&gt;tests/greeting.fql&lt;/code&gt;:&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor is-readonly is-auto-height&#34;&gt;&#xA;    &lt;textarea id=&#34;code-1-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;&lt;/textarea&gt;&lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;example.fql&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-meta&#34;&gt;read-only&lt;/span&gt;&#xA;                &lt;button id=&#34;code-1-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;div class=&#34;code-editor-pane&#34;&gt;&#xA;            &lt;div id=&#34;code-1-text&#34; class=&#34;code-editor-text&#34; data-auto-height=&#34;true&#34;&gt;RETURN T::EQ(app::greet(&amp;#34;Ada&amp;#34;), &amp;#34;Hello, Ada!&amp;#34;)&lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const editor = ace.edit(&#39;code-1-text&#39;);&#xA;            editor.setTheme(&#34;ace\/theme\/tomorrow_night&#34;);&#xA;            editor.session.setUseWorker(false);&#xA;            editor.session.setMode(&#34;ace/mode/&#34; + &#39;fql&#39;);&#xA;            editor.setOptions({&#xA;                readOnly: true,&#xA;                highlightActiveLine: false,&#xA;                highlightGutterLine: false,&#xA;                displayIndentGuides: false,&#xA;                printMargin: false&#xA;            });&#xA;            editor.renderer.$cursorLayer.element.style.display = &#34;none&#34;&#xA;            const copyBtn = document.querySelector(&#39;#code-1-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#code-1-copy-clipboard&#39;);&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy source to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(editor.getValue())&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy source&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;            function resizeAutoHeightEditor() {&#xA;                const lineHeight = editor.renderer.lineHeight || 21;&#xA;                const screenLines = Math.max(editor.session.getScreenLength(), 1);&#xA;                const nextHeight = Math.max(screenLines * lineHeight, 48);&#xA;&#xA;                editor.container.style.height = `${nextHeight}px`;&#xA;                editor.resize();&#xA;            }&#xA;&#xA;            editor.session.on(&#39;change&#39;, resizeAutoHeightEditor);&#xA;            window.addEventListener(&#39;resize&#39;, resizeAutoHeightEditor);&#xA;            resizeAutoHeightEditor();&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;Run the test against the host that provides &lt;code&gt;app::greet&lt;/code&gt;:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Migrate</title>
				<link>https://ferretlang.org/docs/tools/cli/migrate/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/tools/cli/migrate/</guid>
				<description>&lt;h1 id=&#34;migrate&#34;&gt;Migrate&lt;/h1&gt;&#xA;&lt;p&gt;The &lt;code&gt;ferret migrate&lt;/code&gt; command groups the compatibility checker and the supported mechanical Ferret v1 to v2 migration. Running &lt;code&gt;ferret migrate&lt;/code&gt; without a subcommand displays help and does not modify files.&lt;/p&gt;&#xA;&lt;p&gt;For the complete project workflow, start with &lt;a href=&#34;https://ferretlang.org/docs/migrations/v1-to-v2/&#34;&gt;Ferret v1 → v2&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;check-compatibility&#34;&gt;Check compatibility&lt;/h2&gt;&#xA;&lt;p&gt;Use &lt;code&gt;check&lt;/code&gt; to inspect a standalone lowercase &lt;code&gt;.fql&lt;/code&gt; file or recursively scan a directory without modifying source:&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor terminal-shortcode is-command&#34;&gt;&#xA;    &lt;textarea id=&#34;terminal-6-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;ferret migrate check --from v1 .&lt;/textarea&gt;&#xA;&#xA;    &lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;terminal&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;button id=&#34;terminal-6-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;pre id=&#34;terminal-6-content&#34; class=&#34;terminal-body&#34;&gt;&lt;code&gt;&lt;span class=&#34;terminal-row&#34;&gt;&lt;span class=&#34;terminal-prompt&#34; aria-hidden=&#34;true&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;terminal-command&#34;&gt;ferret migrate check --from v1 .&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const copyBtn = document.querySelector(&#39;#terminal-6-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#terminal-6-copy-clipboard&#39;);&#xA;            const terminalContent = copyClipboardEl.value;&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy terminal commands to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(terminalContent)&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy terminal commands&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor terminal-shortcode is-command&#34;&gt;&#xA;    &lt;textarea id=&#34;terminal-7-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;ferret migrate check scripts/query.fql&lt;/textarea&gt;&#xA;&#xA;    &lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;terminal&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;button id=&#34;terminal-7-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;pre id=&#34;terminal-7-content&#34; class=&#34;terminal-body&#34;&gt;&lt;code&gt;&lt;span class=&#34;terminal-row&#34;&gt;&lt;span class=&#34;terminal-prompt&#34; aria-hidden=&#34;true&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;terminal-command&#34;&gt;ferret migrate check scripts/query.fql&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const copyBtn = document.querySelector(&#39;#terminal-7-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#terminal-7-copy-clipboard&#39;);&#xA;            const terminalContent = copyClipboardEl.value;&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy terminal commands to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(terminalContent)&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy terminal commands&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;The path defaults to the current directory. &lt;code&gt;--from&lt;/code&gt; currently defaults to and accepts only &lt;code&gt;v1&lt;/code&gt;. The check does not require a Go module, run Go tooling, resolve dependencies, or format source.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Configuration</title>
				<link>https://ferretlang.org/docs/tools/cli/configuration/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/tools/cli/configuration/</guid>
				<description>&lt;h1 id=&#34;configuration&#34;&gt;Configuration&lt;/h1&gt;&#xA;&lt;p&gt;The &lt;code&gt;config&lt;/code&gt; command reads and writes persistent settings that apply to all CLI commands.&lt;/p&gt;&#xA;&lt;h2 id=&#34;config-file&#34;&gt;Config file&lt;/h2&gt;&#xA;&lt;p&gt;Settings are stored in &lt;code&gt;~/.ferret/config.yaml&lt;/code&gt;, inside the resolved user home directory on every supported platform. The file is created automatically the first time you run any &lt;code&gt;ferret&lt;/code&gt; command.&lt;/p&gt;&#xA;&lt;h2 id=&#34;configuration-priority&#34;&gt;Configuration priority&lt;/h2&gt;&#xA;&lt;p&gt;When the same setting is specified in multiple places, the highest priority wins:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Command-line flags (highest)&lt;/li&gt;&#xA;&lt;li&gt;Environment variables&lt;/li&gt;&#xA;&lt;li&gt;Config file&lt;/li&gt;&#xA;&lt;li&gt;Built-in defaults (lowest)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2 id=&#34;environment-variables&#34;&gt;Environment variables&lt;/h2&gt;&#xA;&lt;p&gt;Every config key maps to an environment variable with the &lt;code&gt;FERRET_&lt;/code&gt; prefix. Dashes become underscores:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Deploy Ferret as a service</title>
				<link>https://ferretlang.org/docs/guides/deploying/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/guides/deploying/</guid>
				<description>&lt;h1 id=&#34;deploy-ferret-as-a-service&#34;&gt;Deploy Ferret as a service&lt;/h1&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://ferretlang.org/docs/tools/worker/&#34;&gt;Ferret Worker&lt;/a&gt; is an HTTP service that accepts FQL scripts and returns results. This guide walks through deploying Worker with Docker for remote or shared use.&lt;/p&gt;&#xA;&lt;h2 id=&#34;start-worker-with-docker&#34;&gt;Start Worker with Docker&lt;/h2&gt;&#xA;&lt;p&gt;The release image includes Chromium. Start the service on your machine:&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor terminal-shortcode is-command&#34;&gt;&#xA;    &lt;textarea id=&#34;terminal-1-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;docker run --rm -d --name ferret-worker -p 127.0.0.1:8080:8080 montferret/worker:2.0.0-rc.32&lt;/textarea&gt;&#xA;&#xA;    &lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;terminal&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;button id=&#34;terminal-1-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;pre id=&#34;terminal-1-content&#34; class=&#34;terminal-body&#34;&gt;&lt;code&gt;&lt;span class=&#34;terminal-row&#34;&gt;&lt;span class=&#34;terminal-prompt&#34; aria-hidden=&#34;true&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;terminal-command&#34;&gt;docker run --rm -d --name ferret-worker -p 127.0.0.1:8080:8080 montferret/worker:2.0.0-rc.32&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const copyBtn = document.querySelector(&#39;#terminal-1-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#terminal-1-copy-clipboard&#39;);&#xA;            const terminalContent = copyClipboardEl.value;&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy terminal commands to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(terminalContent)&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy terminal commands&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;Once Worker is ready, its health check returns HTTP 200 with an empty body:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Value Encoders</title>
				<link>https://ferretlang.org/docs/embedding/go/value-encoders/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/embedding/go/value-encoders/</guid>
				<description>&lt;h1 id=&#34;value-encoders&#34;&gt;Value Encoders&lt;/h1&gt;&#xA;&lt;p&gt;When a session finishes, Ferret encodes the result value into bytes using a codec selected by content type. &lt;code&gt;Run&lt;/code&gt; returns a consumable &lt;code&gt;Output&lt;/code&gt; handle. Collect it to read the encoded bytes and their MIME type:&lt;/p&gt;&#xA;&lt;p&gt;These examples use the &lt;a href=&#34;https://ferretlang.org/docs/embedding/go/getting-started/#installation&#34;&gt;documented Core release&lt;/a&gt;. For an existing byte-slice codec, follow the &lt;a href=&#34;https://ferretlang.org/docs/migrations/encoding-api/&#34;&gt;Encoding API migration&lt;/a&gt;.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor is-readonly is-auto-height&#34;&gt;&#xA;    &lt;textarea id=&#34;code-12-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;&lt;/textarea&gt;&lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;example.go&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-meta&#34;&gt;read-only&lt;/span&gt;&#xA;                &lt;button id=&#34;code-12-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;div class=&#34;code-editor-pane&#34;&gt;&#xA;            &lt;div id=&#34;code-12-text&#34; class=&#34;code-editor-text&#34; data-auto-height=&#34;true&#34;&gt;output, err := session.Run(ctx)&#xA;if err != nil {&#xA;    return err&#xA;}&#xA;defer output.Close()&#xA;&#xA;content, err := output.Collect(ctx)&#xA;if err != nil {&#xA;    return err&#xA;}&#xA;&#xA;fmt.Println(content.Metadata.ContentType) // &amp;#34;application/json&amp;#34;&#xA;fmt.Println(string(content.Data))&lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const editor = ace.edit(&#39;code-12-text&#39;);&#xA;            editor.setTheme(&#34;ace\/theme\/tomorrow_night&#34;);&#xA;            editor.session.setUseWorker(false);&#xA;            editor.session.setMode(&#34;ace/mode/&#34; + &#39;golang&#39;);&#xA;            editor.setOptions({&#xA;                readOnly: true,&#xA;                highlightActiveLine: false,&#xA;                highlightGutterLine: false,&#xA;                displayIndentGuides: false,&#xA;                printMargin: false&#xA;            });&#xA;            editor.renderer.$cursorLayer.element.style.display = &#34;none&#34;&#xA;            const copyBtn = document.querySelector(&#39;#code-12-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#code-12-copy-clipboard&#39;);&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy source to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(editor.getValue())&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy source&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;            function resizeAutoHeightEditor() {&#xA;                const lineHeight = editor.renderer.lineHeight || 21;&#xA;                const screenLines = Math.max(editor.session.getScreenLength(), 1);&#xA;                const nextHeight = Math.max(screenLines * lineHeight, 48);&#xA;&#xA;                editor.container.style.height = `${nextHeight}px`;&#xA;                editor.resize();&#xA;            }&#xA;&#xA;            editor.session.on(&#39;change&#39;, resizeAutoHeightEditor);&#xA;            window.addEventListener(&#39;resize&#39;, resizeAutoHeightEditor);&#xA;            resizeAutoHeightEditor();&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;h2 id=&#34;built-in-codecs&#34;&gt;Built-in codecs&lt;/h2&gt;&#xA;&lt;p&gt;Two codecs are registered by default:&lt;/p&gt;</description>
			</item>
			<item>
				<title>CDP</title>
				<link>https://ferretlang.org/docs/tools/lab/cdp/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/tools/lab/cdp/</guid>
				<description>&lt;h1 id=&#34;cdp&#34;&gt;CDP&lt;/h1&gt;&#xA;&lt;p&gt;Lab can run tests that use browser-backed FQL, but Lab does not own browser execution or Chrome DevTools Protocol behavior. That belongs to the selected Ferret runtime.&lt;/p&gt;&#xA;&lt;p&gt;In current Lab v2, there is no &lt;code&gt;--cdp&lt;/code&gt; flag and no &lt;code&gt;LAB_CDP&lt;/code&gt; environment variable. Configure browser access through the Ferret runtime and FQL options you are using.&lt;/p&gt;&#xA;&lt;h2 id=&#34;browser-backed-tests&#34;&gt;Browser-backed tests&lt;/h2&gt;&#xA;&lt;p&gt;A browser-backed test is still a normal Lab test file. The external host must register the &lt;code&gt;web::html&lt;/code&gt; module and the CDP driver used by this example:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Programs</title>
				<link>https://ferretlang.org/docs/embedding/go/programs/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/embedding/go/programs/</guid>
				<description>&lt;h1 id=&#34;programs&#34;&gt;Programs&lt;/h1&gt;&#xA;&lt;p&gt;A compiled Ferret query can be serialized into a binary artifact and loaded later without compiling its source again. This is useful for distributing pre-compiled queries, skipping source compilation at runtime, or caching build output on disk. &lt;code&gt;Engine.Load&lt;/code&gt; bypasses compilation, but the engine itself is still constructed with its compiler.&lt;/p&gt;&#xA;&lt;p&gt;Artifacts contain bytecode, referenced host-function signatures, and the original FQL source name and text used for diagnostics. They do not contain host-function or module implementations. The engine that loads an artifact must still be configured with the modules and host functions the program uses. Artifacts are not an obfuscation or source-protection mechanism.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Screenshots and PDFs</title>
				<link>https://ferretlang.org/docs/guides/screenshots/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/guides/screenshots/</guid>
				<description>&lt;h1 id=&#34;screenshots-and-pdfs&#34;&gt;Screenshots and PDFs&lt;/h1&gt;&#xA;&lt;p&gt;Ferret can capture screenshots and generate PDFs from browser-backed pages. Start a &lt;a href=&#34;https://ferretlang.org/docs/guides/browser-pages/&#34;&gt;CDP browser&lt;/a&gt; for the CLI examples. Screenshot options below use the Web HTML module bundled with the documented CLI. Worker’s older module supports default JPEG capture but rejects the lowercase screenshot option keys.&lt;/p&gt;&#xA;&lt;h2 id=&#34;take-a-screenshot&#34;&gt;Take a screenshot&lt;/h2&gt;&#xA;&lt;p&gt;Use &lt;code&gt;web::html::screenshot&lt;/code&gt; to capture the visible page:&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div id=&#34;docs-tabs-1&#34; class=&#34;docs-tabs&#34; data-tabs&gt;&#xA;    &lt;div class=&#34;docs-tabs-list&#34; role=&#34;tablist&#34;&gt;&#xA;        &lt;button id=&#34;docs-tabs-1-tab-0&#34; class=&#34;docs-tabs-tab&#34; type=&#34;button&#34; role=&#34;tab&#34; aria-selected=&#34;true&#34; aria-controls=&#34;docs-tabs-1-panel-0&#34; tabindex=&#34;0&#34;&gt;Terminal&lt;/button&gt;&#xA;        &lt;button id=&#34;docs-tabs-1-tab-1&#34; class=&#34;docs-tabs-tab&#34; type=&#34;button&#34; role=&#34;tab&#34; aria-selected=&#34;false&#34; aria-controls=&#34;docs-tabs-1-panel-1&#34; tabindex=&#34;-1&#34;&gt;Try in browser&lt;/button&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;div id=&#34;docs-tabs-1-panel-0&#34; class=&#34;docs-tabs-panel&#34; role=&#34;tabpanel&#34; aria-labelledby=&#34;docs-tabs-1-tab-0&#34;&gt;&#xA;        &#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor terminal-shortcode is-command&#34;&gt;&#xA;    &lt;textarea id=&#34;terminal-2-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;ferret run -e &amp;#39;&#xA;let page = web::html::open(&amp;#34;https://mockery.ferretlang.org&amp;#34;, { driver: &amp;#34;cdp&amp;#34; })&#xA;let data = web::html::screenshot(page)&#xA;return data&#xA;&amp;#39;&lt;/textarea&gt;&#xA;&#xA;    &lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;terminal&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;button id=&#34;terminal-2-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;pre id=&#34;terminal-2-content&#34; class=&#34;terminal-body&#34;&gt;&lt;code&gt;&lt;span class=&#34;terminal-row&#34;&gt;&lt;span class=&#34;terminal-prompt&#34; aria-hidden=&#34;true&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;terminal-command&#34;&gt;ferret run -e &amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;terminal-row&#34;&gt;&lt;span class=&#34;terminal-prompt terminal-prompt-spacer&#34; aria-hidden=&#34;true&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;terminal-command&#34;&gt;let page = web::html::open(&amp;#34;https://mockery.ferretlang.org&amp;#34;, { driver: &amp;#34;cdp&amp;#34; })&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;terminal-row&#34;&gt;&lt;span class=&#34;terminal-prompt terminal-prompt-spacer&#34; aria-hidden=&#34;true&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;terminal-command&#34;&gt;let data = web::html::screenshot(page)&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;terminal-row&#34;&gt;&lt;span class=&#34;terminal-prompt terminal-prompt-spacer&#34; aria-hidden=&#34;true&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;terminal-command&#34;&gt;return data&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;terminal-row&#34;&gt;&lt;span class=&#34;terminal-prompt terminal-prompt-spacer&#34; aria-hidden=&#34;true&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;terminal-command&#34;&gt;&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const copyBtn = document.querySelector(&#39;#terminal-2-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#terminal-2-copy-clipboard&#39;);&#xA;            const terminalContent = copyClipboardEl.value;&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy terminal commands to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(terminalContent)&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy terminal commands&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&#xA;    &lt;/div&gt;&#xA;    &lt;div id=&#34;docs-tabs-1-panel-1&#34; class=&#34;docs-tabs-panel&#34; role=&#34;tabpanel&#34; aria-labelledby=&#34;docs-tabs-1-tab-1&#34; hidden&gt;&#xA;        &#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor is-horizontal is-auto-height&#34;&gt;&#xA;    &lt;textarea id=&#34;code-editor-2-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;&lt;/textarea&gt;&#xA;&#xA;    &lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div id=&#34;code-editor-2-header&#34; class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;example.fql&lt;/span&gt;&#xA;                &lt;small&gt;Ferret v2&lt;/small&gt;&#xA;            &lt;/div&gt;&#xA;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;button id=&#34;code-editor-2-result-toggle-button&#34; class=&#34;button is-outlined is-light code-editor-button&#34; type=&#34;button&#34; aria-expanded=&#34;false&#34; aria-controls=&#34;code-editor-2-result-pane&#34;&gt;Output&lt;/button&gt;&#xA;                &lt;button id=&#34;code-editor-2-params-toggle-button&#34; class=&#34;button is-outlined is-light code-editor-button&#34; type=&#34;button&#34; aria-expanded=&#34;false&#34; aria-controls=&#34;code-editor-2-params-drawer&#34;&gt;Params&lt;/button&gt;&#xA;                &lt;button id=&#34;code-editor-2-run-button&#34; class=&#34;run button is-outlined is-light code-editor-button&#34; type=&#34;button&#34; aria-label=&#34;Run query&#34;&gt;&#xA;                    &lt;span class=&#34;code-editor-run-label&#34;&gt;Run&lt;/span&gt;&#xA;                    &lt;span id=&#34;code-editor-2-run-button-spinner&#34; class=&#34;code-editor-run-spinner&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div id=&#34;code-editor-2-progress&#34; class=&#34;code-editor-progress&#34; role=&#34;progressbar&#34; aria-label=&#34;Running query&#34; hidden&gt;&lt;/div&gt;&#xA;            &lt;span id=&#34;code-editor-2-run-status&#34; class=&#34;code-editor-sr-only&#34; aria-live=&#34;polite&#34; aria-atomic=&#34;true&#34;&gt;&lt;/span&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;div class=&#34;code-editor-workspace&#34;&gt;&#xA;            &lt;div id=&#34;code-editor-2-grid&#34; class=&#34;code-editor-grid&#34; style=&#34;grid-template-columns: 1fr;&#34;&gt;&#xA;                &lt;div id=&#34;code-editor-2-source-pane&#34; class=&#34;code-editor-pane code-editor-pane-source&#34;&gt;&#xA;                    &lt;div class=&#34;code-editor-pane-header&#34;&gt;&#xA;                        &lt;span&gt;query.fql&lt;/span&gt;&#xA;                        &lt;div class=&#34;code-editor-pane-header-actions&#34;&gt;&#xA;                            &lt;span&gt;FQL&lt;/span&gt;&#xA;                            &lt;button id=&#34;code-editor-2-copy-button&#34; class=&#34;code-editor-pane-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;                        &lt;/div&gt;&#xA;                    &lt;/div&gt;&#xA;                    &lt;div id=&#34;code-editor-2-text&#34; class=&#34;code-editor-text&#34; data-auto-height=&#34;true&#34;&gt;let page = web::html::open(&amp;#34;https://mockery.ferretlang.org&amp;#34;, { driver: &amp;#34;cdp&amp;#34; })&#xA;let data = web::html::screenshot(page)&#xA;return data&lt;/div&gt;&#xA;                &lt;/div&gt;&#xA;&#xA;                &lt;div id=&#34;code-editor-2-result-pane&#34; class=&#34;code-editor-pane code-editor-pane-result&#34; hidden&gt;&#xA;                    &lt;div class=&#34;code-editor-pane-header&#34;&gt;&#xA;                        &lt;span&gt;result.json&lt;/span&gt;&#xA;                        &lt;div class=&#34;code-editor-pane-header-actions&#34;&gt;&#xA;                            &lt;span&gt;output&lt;/span&gt;&#xA;                            &lt;button id=&#34;code-editor-2-result-close-button&#34; class=&#34;code-editor-pane-button&#34; type=&#34;button&#34; aria-controls=&#34;code-editor-2-result-pane&#34;&gt;Close&lt;/button&gt;&#xA;                        &lt;/div&gt;&#xA;                    &lt;/div&gt;&#xA;                    &lt;div id=&#34;code-editor-2-result&#34; class=&#34;code-editor-result&#34; data-auto-height=&#34;true&#34;&gt;&lt;/div&gt;&#xA;                &lt;/div&gt;&#xA;            &lt;/div&gt;&#xA;&#xA;            &lt;aside id=&#34;code-editor-2-params-drawer&#34; class=&#34;code-editor-params-drawer&#34; aria-labelledby=&#34;code-editor-2-params-title&#34; hidden&gt;&#xA;                &lt;div class=&#34;code-editor-params-header&#34;&gt;&#xA;                    &lt;div&gt;&#xA;                        &lt;span id=&#34;code-editor-2-params-title&#34; class=&#34;code-editor-params-title&#34;&gt;Query parameters&lt;/span&gt;&#xA;                        &lt;span class=&#34;code-editor-params-description&#34;&gt;Values are parsed as JSON when possible.&lt;/span&gt;&#xA;                    &lt;/div&gt;&#xA;                    &lt;button id=&#34;code-editor-2-params-close-button&#34; class=&#34;code-editor-pane-button&#34; type=&#34;button&#34;&gt;Close&lt;/button&gt;&#xA;                &lt;/div&gt;&#xA;                &lt;div class=&#34;code-editor-params-body&#34;&gt;&#xA;                    &lt;div id=&#34;code-editor-2-params-empty&#34; class=&#34;code-editor-params-empty&#34;&gt;No parameters added.&lt;/div&gt;&#xA;                    &lt;div id=&#34;code-editor-2-params-rows&#34; class=&#34;code-editor-params-rows&#34;&gt;&lt;/div&gt;&#xA;                &lt;/div&gt;&#xA;                &lt;div class=&#34;code-editor-params-footer&#34;&gt;&#xA;                    &lt;button id=&#34;code-editor-2-params-add-button&#34; class=&#34;code-editor-params-add-button&#34; type=&#34;button&#34;&gt;Add parameter&lt;/button&gt;&#xA;                &lt;/div&gt;&#xA;            &lt;/aside&gt;&#xA;        &lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            function createEditor(id, mode, useWorker) {&#xA;                const editor = ace.edit(id);&#xA;                editor.setTheme(&#34;ace\/theme\/tomorrow_night&#34;);&#xA;                editor.session.setUseWorker(useWorker);&#xA;                editor.session.setMode(&#34;ace/mode/&#34; + mode);&#xA;                editor.setOptions({&#xA;                    displayIndentGuides: false,&#xA;                    printMargin: false&#xA;                });&#xA;&#xA;                return editor;&#xA;            }&#xA;&#xA;            const btn = document.querySelector(&#39;#code-editor-2-run-button&#39;);&#xA;            const textEditor = createEditor(&#39;code-editor-2-text&#39;, &#39;fql&#39;, true);&#xA;            const resultEditor = createEditor(&#39;code-editor-2-result&#39;, &#39;json&#39;, false);&#xA;            resultEditor.setReadOnly(true);&#xA;            const resultExpandBtn = null;&#xA;            const editorHeader = document.querySelector(&#39;#code-editor-2-header&#39;);&#xA;            const editorWorkspace = document.querySelector(&#39;#code-editor-2-grid&#39;).parentElement;&#xA;            const editorGrid = document.querySelector(&#39;#code-editor-2-grid&#39;);&#xA;            const runProgress = document.querySelector(&#39;#code-editor-2-progress&#39;);&#xA;            const runStatus = document.querySelector(&#39;#code-editor-2-run-status&#39;);&#xA;            const resultPane = document.querySelector(&#39;#code-editor-2-result-pane&#39;);&#xA;            const resultToggleBtn = document.querySelector(&#39;#code-editor-2-result-toggle-button&#39;);&#xA;            const resultCloseBtn = document.querySelector(&#39;#code-editor-2-result-close-button&#39;);&#xA;            const paramsToggleBtn = document.querySelector(&#39;#code-editor-2-params-toggle-button&#39;);&#xA;            const paramsDrawer = document.querySelector(&#39;#code-editor-2-params-drawer&#39;);&#xA;            const paramsCloseBtn = document.querySelector(&#39;#code-editor-2-params-close-button&#39;);&#xA;            const paramsAddBtn = document.querySelector(&#39;#code-editor-2-params-add-button&#39;);&#xA;            const paramsRows = document.querySelector(&#39;#code-editor-2-params-rows&#39;);&#xA;            const paramsEmpty = document.querySelector(&#39;#code-editor-2-params-empty&#39;);&#xA;            let isResultVisible = !resultPane.hidden;&#xA;            let isParamsVisible = !paramsDrawer.hidden;&#xA;&#xA;            function resetResultExpansion() {&#xA;                if (!resultExpandBtn) {&#xA;                    return;&#xA;                }&#xA;&#xA;                isResultExpanded = false;&#xA;                resultExpandBtn.setAttribute(&#39;aria-expanded&#39;, &#39;false&#39;);&#xA;                resultExpandBtn.textContent = &#39;Expand&#39;;&#xA;            }&#xA;&#xA;            function syncEditorLayout() {&#xA;                const sourceHeight = getEditorContentHeight(textEditor);&#xA;                textEditor.container.style.height = `${sourceHeight}px`;&#xA;&#xA;                if (isResultVisible) {&#xA;                    const resultHeight = getEditorContentHeight(resultEditor);&#xA;                    applyResultHeight(resultHeight);&#xA;                }&#xA;&#xA;                textEditor.resize();&#xA;&#xA;                if (isResultVisible) {&#xA;                    resultEditor.resize();&#xA;                }&#xA;            }&#xA;&#xA;            function setResultVisible(nextVisible) {&#xA;                isResultVisible = nextVisible;&#xA;                resultPane.hidden = !nextVisible;&#xA;                resultToggleBtn.setAttribute(&#39;aria-expanded&#39;, nextVisible ? &#39;true&#39; : &#39;false&#39;);&#xA;                editorGrid.style.gridTemplateColumns = nextVisible ? &#39;&#39; : &#39;1fr&#39;;&#xA;&#xA;                if (!nextVisible) {&#xA;                    resetResultExpansion();&#xA;                    syncEditorLayout();&#xA;                    return;&#xA;                }&#xA;&#xA;                window.requestAnimationFrame(() =&gt; {&#xA;                    syncEditorLayout();&#xA;                    resultEditor.resize(true);&#xA;                });&#xA;            }&#xA;&#xA;            resultToggleBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setResultVisible(!isResultVisible);&#xA;            });&#xA;&#xA;            resultCloseBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setResultVisible(false);&#xA;            });&#xA;&#xA;            const collapsedResultHeightStyle = resultEditor.container.style.height;&#xA;            let isResultExpanded = false;&#xA;&#xA;            function getEditorContentHeight(editor) {&#xA;                const lineHeight = editor.renderer.lineHeight || 21;&#xA;                const screenLines = Math.max(editor.session.getScreenLength(), 1);&#xA;&#xA;                return Math.max(screenLines * lineHeight, 48);&#xA;            }&#xA;&#xA;            function getMaxResultHeight(fallbackHeight) {&#xA;                const viewportHeight = window.innerHeight || document.documentElement.clientHeight || fallbackHeight;&#xA;                const rootFontSize = parseFloat(window.getComputedStyle(document.documentElement).fontSize) || 16;&#xA;&#xA;                return Math.min(viewportHeight * 0.45, 32 * rootFontSize);&#xA;            }&#xA;&#xA;            function getCollapsedResultHeight() {&#xA;                return getEditorContentHeight(resultEditor);&#xA;            }&#xA;&#xA;            function getExpandedResultHeight(collapsedHeight) {&#xA;                const lineHeight = resultEditor.renderer.lineHeight || textEditor.renderer.lineHeight || 21;&#xA;                const maxAllowedHeight = getMaxResultHeight(collapsedHeight);&#xA;                const screenLines = Math.max(resultEditor.session.getScreenLength(), 1);&#xA;                const contentHeight = (screenLines * lineHeight) + (lineHeight * 2);&#xA;                const targetHeight = Math.min(contentHeight, maxAllowedHeight);&#xA;&#xA;                return Math.max(collapsedHeight, Math.round(targetHeight));&#xA;            }&#xA;&#xA;            function applyResultHeight(collapsedHeight) {&#xA;                if (resultExpandBtn &amp;&amp; isResultExpanded) {&#xA;                    resultEditor.container.style.height = `${getExpandedResultHeight(collapsedHeight)}px`;&#xA;                } else {&#xA;                    resultEditor.container.style.height = `${Math.min(collapsedHeight, getMaxResultHeight(collapsedHeight))}px`;&#xA;                }&#xA;&#xA;                resultEditor.resize();&#xA;            }&#xA;            textEditor.session.on(&#39;change&#39;, syncEditorLayout);&#xA;&#xA;            if (resultExpandBtn) {&#xA;                resultExpandBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                    isResultExpanded = !isResultExpanded;&#xA;                    resultExpandBtn.setAttribute(&#39;aria-expanded&#39;, isResultExpanded ? &#39;true&#39; : &#39;false&#39;);&#xA;                    resultExpandBtn.textContent = isResultExpanded ? &#39;Collapse&#39; : &#39;Expand&#39;;&#xA;                    syncEditorLayout();&#xA;                });&#xA;            }&#xA;&#xA;            function syncParamsEmptyState() {&#xA;                paramsEmpty.hidden = paramsRows.children.length &gt; 0;&#xA;            }&#xA;&#xA;            function formatParamValue(value) {&#xA;                return typeof value === &#39;string&#39; ? value : JSON.stringify(value);&#xA;            }&#xA;&#xA;            function createParamRow(name, value) {&#xA;                const row = document.createElement(&#39;div&#39;);&#xA;                row.className = &#39;code-editor-param-row&#39;;&#xA;&#xA;                const nameInput = document.createElement(&#39;input&#39;);&#xA;                nameInput.className = &#39;code-editor-param-input code-editor-param-name&#39;;&#xA;                nameInput.type = &#39;text&#39;;&#xA;                nameInput.placeholder = &#39;name&#39;;&#xA;                nameInput.setAttribute(&#39;aria-label&#39;, &#39;Parameter name&#39;);&#xA;                nameInput.value = name || &#39;&#39;;&#xA;&#xA;                const separator = document.createElement(&#39;span&#39;);&#xA;                separator.className = &#39;code-editor-param-separator&#39;;&#xA;                separator.setAttribute(&#39;aria-hidden&#39;, &#39;true&#39;);&#xA;                separator.textContent = &#39;:&#39;;&#xA;&#xA;                const valueInput = document.createElement(&#39;input&#39;);&#xA;                valueInput.className = &#39;code-editor-param-input code-editor-param-value&#39;;&#xA;                valueInput.type = &#39;text&#39;;&#xA;                valueInput.placeholder = &#39;value&#39;;&#xA;                valueInput.setAttribute(&#39;aria-label&#39;, &#39;Parameter value&#39;);&#xA;                valueInput.value = value === undefined ? &#39;&#39; : formatParamValue(value);&#xA;&#xA;                const removeBtn = document.createElement(&#39;button&#39;);&#xA;                removeBtn.className = &#39;code-editor-param-remove-button&#39;;&#xA;                removeBtn.type = &#39;button&#39;;&#xA;                removeBtn.setAttribute(&#39;aria-label&#39;, `Remove parameter ${name || &#39;row&#39;}`);&#xA;                removeBtn.textContent = &#39;Remove&#39;;&#xA;                removeBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                    row.remove();&#xA;                    syncParamsEmptyState();&#xA;                });&#xA;&#xA;                row.append(nameInput, separator, valueInput, removeBtn);&#xA;                paramsRows.appendChild(row);&#xA;                syncParamsEmptyState();&#xA;&#xA;                return nameInput;&#xA;            }&#xA;&#xA;            function setParamsVisible(nextVisible) {&#xA;                isParamsVisible = nextVisible;&#xA;                paramsDrawer.hidden = !nextVisible;&#xA;                paramsToggleBtn.setAttribute(&#39;aria-expanded&#39;, nextVisible ? &#39;true&#39; : &#39;false&#39;);&#xA;                editorWorkspace.classList.toggle(&#39;is-params-open&#39;, nextVisible);&#xA;&#xA;                if (nextVisible) {&#xA;                    paramsCloseBtn.focus();&#xA;                } else {&#xA;                    paramsToggleBtn.focus();&#xA;                }&#xA;            }&#xA;&#xA;            function setParamsControlsDisabled(disabled) {&#xA;                paramsToggleBtn.disabled = disabled;&#xA;                paramsDrawer.querySelectorAll(&#39;button, input&#39;).forEach((control) =&gt; {&#xA;                    control.disabled = disabled;&#xA;                });&#xA;            }&#xA;&#xA;            function parseParamValue(value) {&#xA;                try {&#xA;                    return JSON.parse(value);&#xA;                } catch (err) {&#xA;                    return value;&#xA;                }&#xA;            }&#xA;&#xA;            function getParams() {&#xA;                return Array.from(paramsRows.querySelectorAll(&#39;.code-editor-param-row&#39;)).reduce((params, row) =&gt; {&#xA;                    const name = row.querySelector(&#39;.code-editor-param-name&#39;).value.trim();&#xA;&#xA;                    if (name) {&#xA;                        const value = row.querySelector(&#39;.code-editor-param-value&#39;).value;&#xA;                        params[name] = parseParamValue(value);&#xA;                    }&#xA;&#xA;                    return params;&#xA;                }, {});&#xA;            }&#xA;&#xA;            const initialParams = JSON.parse(&#34;{}&#34;);&#xA;&#xA;            if (initialParams &amp;&amp; typeof initialParams === &#39;object&#39; &amp;&amp; !Array.isArray(initialParams)) {&#xA;                Object.entries(initialParams).forEach(([name, value]) =&gt; {&#xA;                    createParamRow(name, value);&#xA;                });&#xA;            }&#xA;&#xA;            syncParamsEmptyState();&#xA;&#xA;            paramsToggleBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setParamsVisible(!isParamsVisible);&#xA;            });&#xA;&#xA;            paramsCloseBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setParamsVisible(false);&#xA;            });&#xA;&#xA;            paramsAddBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                createParamRow(&#39;&#39;, &#39;&#39;).focus();&#xA;            });&#xA;&#xA;            window.addEventListener(&#39;resize&#39;, syncEditorLayout);&#xA;            syncEditorLayout();&#xA;&#xA;            function setContent(editor, content) {&#xA;                editor.setValue(content, -1);&#xA;            }&#xA;                const copyClipboardEl = document.querySelector(&#39;#code-editor-2-copy-clipboard&#39;);&#xA;                const copyBtn = document.querySelector(&#39;#code-editor-2-copy-button&#39;);&#xA;&#xA;                function copyTextWithFallback(content) {&#xA;                    copyClipboardEl.value = content;&#xA;                    copyClipboardEl.focus();&#xA;                    copyClipboardEl.select();&#xA;&#xA;                    if (!document.execCommand(&#39;copy&#39;)) {&#xA;                        throw new Error(&#39;Could not copy source to the clipboard&#39;);&#xA;                    }&#xA;                }&#xA;&#xA;                function copyTextToClipboard(content) {&#xA;                    if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                        return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                            copyTextWithFallback(content);&#xA;                        });&#xA;                    }&#xA;&#xA;                    copyTextWithFallback(content);&#xA;&#xA;                    return Promise.resolve();&#xA;                }&#xA;&#xA;                copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                    copyTextToClipboard(textEditor.getValue())&#xA;                        .then(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copied&#39;;&#xA;                            window.setTimeout(() =&gt; {&#xA;                                copyBtn.textContent = &#39;Copy&#39;;&#xA;                            }, 1200);&#xA;                        })&#xA;                        .catch((err) =&gt; {&#xA;                            console.error(&#39;Failed to copy source&#39;);&#xA;                            console.error(err);&#xA;                        });&#xA;                });&#xA;&#xA;            let isRunning = false;&#xA;&#xA;            function onStart() {&#xA;                isRunning = true;&#xA;                textEditor.setReadOnly(true);&#xA;                runProgress.hidden = false;&#xA;                runStatus.textContent = &#39;Running query&#39;;&#xA;                editorHeader.setAttribute(&#39;aria-busy&#39;, &#39;true&#39;);&#xA;                editorGrid.setAttribute(&#39;aria-busy&#39;, &#39;true&#39;);&#xA;                btn.classList.add(&#39;is-running&#39;);&#xA;                btn.setAttribute(&#39;aria-busy&#39;, &#39;true&#39;);&#xA;                btn.setAttribute(&#39;aria-label&#39;, &#39;Running query&#39;);&#xA;                btn.disabled = true;&#xA;                setParamsControlsDisabled(true);&#xA;            }&#xA;&#xA;            function onEnd(result) {&#xA;                isRunning = false;&#xA;                textEditor.setReadOnly(false);&#xA;                runProgress.hidden = true;&#xA;                runStatus.textContent = &#39;&#39;;&#xA;                editorHeader.setAttribute(&#39;aria-busy&#39;, &#39;false&#39;);&#xA;                editorGrid.setAttribute(&#39;aria-busy&#39;, &#39;false&#39;);&#xA;                btn.classList.remove(&#39;is-running&#39;);&#xA;                btn.setAttribute(&#39;aria-busy&#39;, &#39;false&#39;);&#xA;                btn.setAttribute(&#39;aria-label&#39;, &#39;Run query&#39;);&#xA;                btn.disabled = false;&#xA;                setParamsControlsDisabled(false);&#xA;&#xA;                setContent(resultEditor, result);&#xA;                setResultVisible(true);&#xA;            }&#xA;&#xA;            btn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                if (isRunning) {&#xA;                    return;&#xA;                }&#xA;&#xA;                const body = {&#xA;                        text: textEditor.getValue(),&#xA;                        params: getParams()&#xA;                };&#xA;                const url = &#34;https:\/\/worker-v2-811908774949.us-east1.run.app&#34;;&#xA;&#xA;                onStart();&#xA;                fetch(url, {&#xA;                    method: &#39;post&#39;,&#xA;                    cache: &#39;no-cache&#39;,&#xA;                    headers: {&#xA;                        &#39;Content-Type&#39;: &#39;application/json; charset=utf-8&#39;&#xA;                    },&#xA;                    signal: AbortSignal.timeout(1000 * 60), &#xA;                    body: JSON.stringify(body)&#xA;                })&#xA;                    .then(r =&gt; {&#xA;                        if (r.status === 200) {&#xA;                            return r.json()&#xA;                        }&#xA;                        &#xA;                        if (r.status === 426) {&#xA;                            throw new Error(`Too many requests. Try again later.`);&#xA;                        }&#xA;                        &#xA;                        if (r.status === 400) {&#xA;                            return r.json().then((data) =&gt; {&#xA;                                if (data.details) {&#xA;                                    throw new Error(data.details);&#xA;                                }&#xA;                                &#xA;                                throw new Error(data.error);&#xA;                            });&#xA;                        }&#xA;                        &#xA;                        throw new Error(`Unexpected error. Try again later.`);&#xA;                    })&#xA;                    .then((data) =&gt; {&#xA;                        onEnd(JSON.stringify(data, null, 4));&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        onEnd(err.message);&#xA;                    });&#xA;            });&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&#xA;    &lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;&lt;code&gt;web::html::screenshot&lt;/code&gt; returns binary image data. The default format is JPEG. JSON output displays the bytes as a base64 string. To save it to a file, use &lt;code&gt;io::fs::write&lt;/code&gt;:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Bind Parameters</title>
				<link>https://ferretlang.org/docs/language/parameters/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/language/parameters/</guid>
				<description>&lt;h1 id=&#34;bind-parameters&#34;&gt;Bind Parameters&lt;/h1&gt;&#xA;&lt;p&gt;Bind parameters allow a query to receive values from the execution context instead of embedding those values directly in the query text.&lt;/p&gt;&#xA;&lt;p&gt;A bind parameter is written as &lt;code&gt;@name&lt;/code&gt;, where name is the parameter identifier.&lt;/p&gt;&#xA;&lt;div class=&#34;is-info notification&#34;&gt;&#xA;Click on &lt;b&gt;PARAMS&lt;/b&gt; to open the parameter editor and provide values for the parameters used in the query.&#xA;&lt;/div&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor is-horizontal is-auto-height&#34;&gt;&#xA;    &lt;textarea id=&#34;code-editor-1-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;&lt;/textarea&gt;&#xA;&#xA;    &lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div id=&#34;code-editor-1-header&#34; class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;example.fql&lt;/span&gt;&#xA;                &lt;small&gt;Ferret v2&lt;/small&gt;&#xA;            &lt;/div&gt;&#xA;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;button id=&#34;code-editor-1-result-toggle-button&#34; class=&#34;button is-outlined is-light code-editor-button&#34; type=&#34;button&#34; aria-expanded=&#34;false&#34; aria-controls=&#34;code-editor-1-result-pane&#34;&gt;Output&lt;/button&gt;&#xA;                &lt;button id=&#34;code-editor-1-params-toggle-button&#34; class=&#34;button is-outlined is-light code-editor-button&#34; type=&#34;button&#34; aria-expanded=&#34;false&#34; aria-controls=&#34;code-editor-1-params-drawer&#34;&gt;Params&lt;/button&gt;&#xA;                &lt;button id=&#34;code-editor-1-run-button&#34; class=&#34;run button is-outlined is-light code-editor-button&#34; type=&#34;button&#34; aria-label=&#34;Run query&#34;&gt;&#xA;                    &lt;span class=&#34;code-editor-run-label&#34;&gt;Run&lt;/span&gt;&#xA;                    &lt;span id=&#34;code-editor-1-run-button-spinner&#34; class=&#34;code-editor-run-spinner&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div id=&#34;code-editor-1-progress&#34; class=&#34;code-editor-progress&#34; role=&#34;progressbar&#34; aria-label=&#34;Running query&#34; hidden&gt;&lt;/div&gt;&#xA;            &lt;span id=&#34;code-editor-1-run-status&#34; class=&#34;code-editor-sr-only&#34; aria-live=&#34;polite&#34; aria-atomic=&#34;true&#34;&gt;&lt;/span&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;div class=&#34;code-editor-workspace&#34;&gt;&#xA;            &lt;div id=&#34;code-editor-1-grid&#34; class=&#34;code-editor-grid&#34; style=&#34;grid-template-columns: 1fr;&#34;&gt;&#xA;                &lt;div id=&#34;code-editor-1-source-pane&#34; class=&#34;code-editor-pane code-editor-pane-source&#34;&gt;&#xA;                    &lt;div class=&#34;code-editor-pane-header&#34;&gt;&#xA;                        &lt;span&gt;query.fql&lt;/span&gt;&#xA;                        &lt;div class=&#34;code-editor-pane-header-actions&#34;&gt;&#xA;                            &lt;span&gt;FQL&lt;/span&gt;&#xA;                            &lt;button id=&#34;code-editor-1-copy-button&#34; class=&#34;code-editor-pane-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;                        &lt;/div&gt;&#xA;                    &lt;/div&gt;&#xA;                    &lt;div id=&#34;code-editor-1-text&#34; class=&#34;code-editor-text&#34; data-auto-height=&#34;true&#34;&gt;let users = [&#xA;    { name: &amp;#34;Ada&amp;#34;, active: true },&#xA;    { name: &amp;#34;Grace&amp;#34;, active: false },&#xA;    { name: &amp;#34;Linus&amp;#34;, active: true }&#xA;]&#xA;&#xA;return for user in users {&#xA;    filter user.active == @active&#xA;    return user.name&#xA;}&lt;/div&gt;&#xA;                &lt;/div&gt;&#xA;&#xA;                &lt;div id=&#34;code-editor-1-result-pane&#34; class=&#34;code-editor-pane code-editor-pane-result&#34; hidden&gt;&#xA;                    &lt;div class=&#34;code-editor-pane-header&#34;&gt;&#xA;                        &lt;span&gt;result.json&lt;/span&gt;&#xA;                        &lt;div class=&#34;code-editor-pane-header-actions&#34;&gt;&#xA;                            &lt;span&gt;output&lt;/span&gt;&#xA;                            &lt;button id=&#34;code-editor-1-result-close-button&#34; class=&#34;code-editor-pane-button&#34; type=&#34;button&#34; aria-controls=&#34;code-editor-1-result-pane&#34;&gt;Close&lt;/button&gt;&#xA;                        &lt;/div&gt;&#xA;                    &lt;/div&gt;&#xA;                    &lt;div id=&#34;code-editor-1-result&#34; class=&#34;code-editor-result&#34; data-auto-height=&#34;true&#34;&gt;&lt;/div&gt;&#xA;                &lt;/div&gt;&#xA;            &lt;/div&gt;&#xA;&#xA;            &lt;aside id=&#34;code-editor-1-params-drawer&#34; class=&#34;code-editor-params-drawer&#34; aria-labelledby=&#34;code-editor-1-params-title&#34; hidden&gt;&#xA;                &lt;div class=&#34;code-editor-params-header&#34;&gt;&#xA;                    &lt;div&gt;&#xA;                        &lt;span id=&#34;code-editor-1-params-title&#34; class=&#34;code-editor-params-title&#34;&gt;Query parameters&lt;/span&gt;&#xA;                        &lt;span class=&#34;code-editor-params-description&#34;&gt;Values are parsed as JSON when possible.&lt;/span&gt;&#xA;                    &lt;/div&gt;&#xA;                    &lt;button id=&#34;code-editor-1-params-close-button&#34; class=&#34;code-editor-pane-button&#34; type=&#34;button&#34;&gt;Close&lt;/button&gt;&#xA;                &lt;/div&gt;&#xA;                &lt;div class=&#34;code-editor-params-body&#34;&gt;&#xA;                    &lt;div id=&#34;code-editor-1-params-empty&#34; class=&#34;code-editor-params-empty&#34;&gt;No parameters added.&lt;/div&gt;&#xA;                    &lt;div id=&#34;code-editor-1-params-rows&#34; class=&#34;code-editor-params-rows&#34;&gt;&lt;/div&gt;&#xA;                &lt;/div&gt;&#xA;                &lt;div class=&#34;code-editor-params-footer&#34;&gt;&#xA;                    &lt;button id=&#34;code-editor-1-params-add-button&#34; class=&#34;code-editor-params-add-button&#34; type=&#34;button&#34;&gt;Add parameter&lt;/button&gt;&#xA;                &lt;/div&gt;&#xA;            &lt;/aside&gt;&#xA;        &lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            function createEditor(id, mode, useWorker) {&#xA;                const editor = ace.edit(id);&#xA;                editor.setTheme(&#34;ace\/theme\/tomorrow_night&#34;);&#xA;                editor.session.setUseWorker(useWorker);&#xA;                editor.session.setMode(&#34;ace/mode/&#34; + mode);&#xA;                editor.setOptions({&#xA;                    displayIndentGuides: false,&#xA;                    printMargin: false&#xA;                });&#xA;&#xA;                return editor;&#xA;            }&#xA;&#xA;            const btn = document.querySelector(&#39;#code-editor-1-run-button&#39;);&#xA;            const textEditor = createEditor(&#39;code-editor-1-text&#39;, &#39;fql&#39;, true);&#xA;            const resultEditor = createEditor(&#39;code-editor-1-result&#39;, &#39;json&#39;, false);&#xA;            resultEditor.setReadOnly(true);&#xA;            const resultExpandBtn = null;&#xA;            const editorHeader = document.querySelector(&#39;#code-editor-1-header&#39;);&#xA;            const editorWorkspace = document.querySelector(&#39;#code-editor-1-grid&#39;).parentElement;&#xA;            const editorGrid = document.querySelector(&#39;#code-editor-1-grid&#39;);&#xA;            const runProgress = document.querySelector(&#39;#code-editor-1-progress&#39;);&#xA;            const runStatus = document.querySelector(&#39;#code-editor-1-run-status&#39;);&#xA;            const resultPane = document.querySelector(&#39;#code-editor-1-result-pane&#39;);&#xA;            const resultToggleBtn = document.querySelector(&#39;#code-editor-1-result-toggle-button&#39;);&#xA;            const resultCloseBtn = document.querySelector(&#39;#code-editor-1-result-close-button&#39;);&#xA;            const paramsToggleBtn = document.querySelector(&#39;#code-editor-1-params-toggle-button&#39;);&#xA;            const paramsDrawer = document.querySelector(&#39;#code-editor-1-params-drawer&#39;);&#xA;            const paramsCloseBtn = document.querySelector(&#39;#code-editor-1-params-close-button&#39;);&#xA;            const paramsAddBtn = document.querySelector(&#39;#code-editor-1-params-add-button&#39;);&#xA;            const paramsRows = document.querySelector(&#39;#code-editor-1-params-rows&#39;);&#xA;            const paramsEmpty = document.querySelector(&#39;#code-editor-1-params-empty&#39;);&#xA;            let isResultVisible = !resultPane.hidden;&#xA;            let isParamsVisible = !paramsDrawer.hidden;&#xA;&#xA;            function resetResultExpansion() {&#xA;                if (!resultExpandBtn) {&#xA;                    return;&#xA;                }&#xA;&#xA;                isResultExpanded = false;&#xA;                resultExpandBtn.setAttribute(&#39;aria-expanded&#39;, &#39;false&#39;);&#xA;                resultExpandBtn.textContent = &#39;Expand&#39;;&#xA;            }&#xA;&#xA;            function syncEditorLayout() {&#xA;                const sourceHeight = getEditorContentHeight(textEditor);&#xA;                textEditor.container.style.height = `${sourceHeight}px`;&#xA;&#xA;                if (isResultVisible) {&#xA;                    const resultHeight = getEditorContentHeight(resultEditor);&#xA;                    applyResultHeight(resultHeight);&#xA;                }&#xA;&#xA;                textEditor.resize();&#xA;&#xA;                if (isResultVisible) {&#xA;                    resultEditor.resize();&#xA;                }&#xA;            }&#xA;&#xA;            function setResultVisible(nextVisible) {&#xA;                isResultVisible = nextVisible;&#xA;                resultPane.hidden = !nextVisible;&#xA;                resultToggleBtn.setAttribute(&#39;aria-expanded&#39;, nextVisible ? &#39;true&#39; : &#39;false&#39;);&#xA;                editorGrid.style.gridTemplateColumns = nextVisible ? &#39;&#39; : &#39;1fr&#39;;&#xA;&#xA;                if (!nextVisible) {&#xA;                    resetResultExpansion();&#xA;                    syncEditorLayout();&#xA;                    return;&#xA;                }&#xA;&#xA;                window.requestAnimationFrame(() =&gt; {&#xA;                    syncEditorLayout();&#xA;                    resultEditor.resize(true);&#xA;                });&#xA;            }&#xA;&#xA;            resultToggleBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setResultVisible(!isResultVisible);&#xA;            });&#xA;&#xA;            resultCloseBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setResultVisible(false);&#xA;            });&#xA;&#xA;            const collapsedResultHeightStyle = resultEditor.container.style.height;&#xA;            let isResultExpanded = false;&#xA;&#xA;            function getEditorContentHeight(editor) {&#xA;                const lineHeight = editor.renderer.lineHeight || 21;&#xA;                const screenLines = Math.max(editor.session.getScreenLength(), 1);&#xA;&#xA;                return Math.max(screenLines * lineHeight, 48);&#xA;            }&#xA;&#xA;            function getMaxResultHeight(fallbackHeight) {&#xA;                const viewportHeight = window.innerHeight || document.documentElement.clientHeight || fallbackHeight;&#xA;                const rootFontSize = parseFloat(window.getComputedStyle(document.documentElement).fontSize) || 16;&#xA;&#xA;                return Math.min(viewportHeight * 0.45, 32 * rootFontSize);&#xA;            }&#xA;&#xA;            function getCollapsedResultHeight() {&#xA;                return getEditorContentHeight(resultEditor);&#xA;            }&#xA;&#xA;            function getExpandedResultHeight(collapsedHeight) {&#xA;                const lineHeight = resultEditor.renderer.lineHeight || textEditor.renderer.lineHeight || 21;&#xA;                const maxAllowedHeight = getMaxResultHeight(collapsedHeight);&#xA;                const screenLines = Math.max(resultEditor.session.getScreenLength(), 1);&#xA;                const contentHeight = (screenLines * lineHeight) + (lineHeight * 2);&#xA;                const targetHeight = Math.min(contentHeight, maxAllowedHeight);&#xA;&#xA;                return Math.max(collapsedHeight, Math.round(targetHeight));&#xA;            }&#xA;&#xA;            function applyResultHeight(collapsedHeight) {&#xA;                if (resultExpandBtn &amp;&amp; isResultExpanded) {&#xA;                    resultEditor.container.style.height = `${getExpandedResultHeight(collapsedHeight)}px`;&#xA;                } else {&#xA;                    resultEditor.container.style.height = `${Math.min(collapsedHeight, getMaxResultHeight(collapsedHeight))}px`;&#xA;                }&#xA;&#xA;                resultEditor.resize();&#xA;            }&#xA;            textEditor.session.on(&#39;change&#39;, syncEditorLayout);&#xA;&#xA;            if (resultExpandBtn) {&#xA;                resultExpandBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                    isResultExpanded = !isResultExpanded;&#xA;                    resultExpandBtn.setAttribute(&#39;aria-expanded&#39;, isResultExpanded ? &#39;true&#39; : &#39;false&#39;);&#xA;                    resultExpandBtn.textContent = isResultExpanded ? &#39;Collapse&#39; : &#39;Expand&#39;;&#xA;                    syncEditorLayout();&#xA;                });&#xA;            }&#xA;&#xA;            function syncParamsEmptyState() {&#xA;                paramsEmpty.hidden = paramsRows.children.length &gt; 0;&#xA;            }&#xA;&#xA;            function formatParamValue(value) {&#xA;                return typeof value === &#39;string&#39; ? value : JSON.stringify(value);&#xA;            }&#xA;&#xA;            function createParamRow(name, value) {&#xA;                const row = document.createElement(&#39;div&#39;);&#xA;                row.className = &#39;code-editor-param-row&#39;;&#xA;&#xA;                const nameInput = document.createElement(&#39;input&#39;);&#xA;                nameInput.className = &#39;code-editor-param-input code-editor-param-name&#39;;&#xA;                nameInput.type = &#39;text&#39;;&#xA;                nameInput.placeholder = &#39;name&#39;;&#xA;                nameInput.setAttribute(&#39;aria-label&#39;, &#39;Parameter name&#39;);&#xA;                nameInput.value = name || &#39;&#39;;&#xA;&#xA;                const separator = document.createElement(&#39;span&#39;);&#xA;                separator.className = &#39;code-editor-param-separator&#39;;&#xA;                separator.setAttribute(&#39;aria-hidden&#39;, &#39;true&#39;);&#xA;                separator.textContent = &#39;:&#39;;&#xA;&#xA;                const valueInput = document.createElement(&#39;input&#39;);&#xA;                valueInput.className = &#39;code-editor-param-input code-editor-param-value&#39;;&#xA;                valueInput.type = &#39;text&#39;;&#xA;                valueInput.placeholder = &#39;value&#39;;&#xA;                valueInput.setAttribute(&#39;aria-label&#39;, &#39;Parameter value&#39;);&#xA;                valueInput.value = value === undefined ? &#39;&#39; : formatParamValue(value);&#xA;&#xA;                const removeBtn = document.createElement(&#39;button&#39;);&#xA;                removeBtn.className = &#39;code-editor-param-remove-button&#39;;&#xA;                removeBtn.type = &#39;button&#39;;&#xA;                removeBtn.setAttribute(&#39;aria-label&#39;, `Remove parameter ${name || &#39;row&#39;}`);&#xA;                removeBtn.textContent = &#39;Remove&#39;;&#xA;                removeBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                    row.remove();&#xA;                    syncParamsEmptyState();&#xA;                });&#xA;&#xA;                row.append(nameInput, separator, valueInput, removeBtn);&#xA;                paramsRows.appendChild(row);&#xA;                syncParamsEmptyState();&#xA;&#xA;                return nameInput;&#xA;            }&#xA;&#xA;            function setParamsVisible(nextVisible) {&#xA;                isParamsVisible = nextVisible;&#xA;                paramsDrawer.hidden = !nextVisible;&#xA;                paramsToggleBtn.setAttribute(&#39;aria-expanded&#39;, nextVisible ? &#39;true&#39; : &#39;false&#39;);&#xA;                editorWorkspace.classList.toggle(&#39;is-params-open&#39;, nextVisible);&#xA;&#xA;                if (nextVisible) {&#xA;                    paramsCloseBtn.focus();&#xA;                } else {&#xA;                    paramsToggleBtn.focus();&#xA;                }&#xA;            }&#xA;&#xA;            function setParamsControlsDisabled(disabled) {&#xA;                paramsToggleBtn.disabled = disabled;&#xA;                paramsDrawer.querySelectorAll(&#39;button, input&#39;).forEach((control) =&gt; {&#xA;                    control.disabled = disabled;&#xA;                });&#xA;            }&#xA;&#xA;            function parseParamValue(value) {&#xA;                try {&#xA;                    return JSON.parse(value);&#xA;                } catch (err) {&#xA;                    return value;&#xA;                }&#xA;            }&#xA;&#xA;            function getParams() {&#xA;                return Array.from(paramsRows.querySelectorAll(&#39;.code-editor-param-row&#39;)).reduce((params, row) =&gt; {&#xA;                    const name = row.querySelector(&#39;.code-editor-param-name&#39;).value.trim();&#xA;&#xA;                    if (name) {&#xA;                        const value = row.querySelector(&#39;.code-editor-param-value&#39;).value;&#xA;                        params[name] = parseParamValue(value);&#xA;                    }&#xA;&#xA;                    return params;&#xA;                }, {});&#xA;            }&#xA;&#xA;            const initialParams = JSON.parse(&#34;{\&#34;active\&#34;: true}&#34;);&#xA;&#xA;            if (initialParams &amp;&amp; typeof initialParams === &#39;object&#39; &amp;&amp; !Array.isArray(initialParams)) {&#xA;                Object.entries(initialParams).forEach(([name, value]) =&gt; {&#xA;                    createParamRow(name, value);&#xA;                });&#xA;            }&#xA;&#xA;            syncParamsEmptyState();&#xA;&#xA;            paramsToggleBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setParamsVisible(!isParamsVisible);&#xA;            });&#xA;&#xA;            paramsCloseBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setParamsVisible(false);&#xA;            });&#xA;&#xA;            paramsAddBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                createParamRow(&#39;&#39;, &#39;&#39;).focus();&#xA;            });&#xA;&#xA;            window.addEventListener(&#39;resize&#39;, syncEditorLayout);&#xA;            syncEditorLayout();&#xA;&#xA;            function setContent(editor, content) {&#xA;                editor.setValue(content, -1);&#xA;            }&#xA;                const copyClipboardEl = document.querySelector(&#39;#code-editor-1-copy-clipboard&#39;);&#xA;                const copyBtn = document.querySelector(&#39;#code-editor-1-copy-button&#39;);&#xA;&#xA;                function copyTextWithFallback(content) {&#xA;                    copyClipboardEl.value = content;&#xA;                    copyClipboardEl.focus();&#xA;                    copyClipboardEl.select();&#xA;&#xA;                    if (!document.execCommand(&#39;copy&#39;)) {&#xA;                        throw new Error(&#39;Could not copy source to the clipboard&#39;);&#xA;                    }&#xA;                }&#xA;&#xA;                function copyTextToClipboard(content) {&#xA;                    if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                        return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                            copyTextWithFallback(content);&#xA;                        });&#xA;                    }&#xA;&#xA;                    copyTextWithFallback(content);&#xA;&#xA;                    return Promise.resolve();&#xA;                }&#xA;&#xA;                copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                    copyTextToClipboard(textEditor.getValue())&#xA;                        .then(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copied&#39;;&#xA;                            window.setTimeout(() =&gt; {&#xA;                                copyBtn.textContent = &#39;Copy&#39;;&#xA;                            }, 1200);&#xA;                        })&#xA;                        .catch((err) =&gt; {&#xA;                            console.error(&#39;Failed to copy source&#39;);&#xA;                            console.error(err);&#xA;                        });&#xA;                });&#xA;&#xA;            let isRunning = false;&#xA;&#xA;            function onStart() {&#xA;                isRunning = true;&#xA;                textEditor.setReadOnly(true);&#xA;                runProgress.hidden = false;&#xA;                runStatus.textContent = &#39;Running query&#39;;&#xA;                editorHeader.setAttribute(&#39;aria-busy&#39;, &#39;true&#39;);&#xA;                editorGrid.setAttribute(&#39;aria-busy&#39;, &#39;true&#39;);&#xA;                btn.classList.add(&#39;is-running&#39;);&#xA;                btn.setAttribute(&#39;aria-busy&#39;, &#39;true&#39;);&#xA;                btn.setAttribute(&#39;aria-label&#39;, &#39;Running query&#39;);&#xA;                btn.disabled = true;&#xA;                setParamsControlsDisabled(true);&#xA;            }&#xA;&#xA;            function onEnd(result) {&#xA;                isRunning = false;&#xA;                textEditor.setReadOnly(false);&#xA;                runProgress.hidden = true;&#xA;                runStatus.textContent = &#39;&#39;;&#xA;                editorHeader.setAttribute(&#39;aria-busy&#39;, &#39;false&#39;);&#xA;                editorGrid.setAttribute(&#39;aria-busy&#39;, &#39;false&#39;);&#xA;                btn.classList.remove(&#39;is-running&#39;);&#xA;                btn.setAttribute(&#39;aria-busy&#39;, &#39;false&#39;);&#xA;                btn.setAttribute(&#39;aria-label&#39;, &#39;Run query&#39;);&#xA;                btn.disabled = false;&#xA;                setParamsControlsDisabled(false);&#xA;&#xA;                setContent(resultEditor, result);&#xA;                setResultVisible(true);&#xA;            }&#xA;&#xA;            btn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                if (isRunning) {&#xA;                    return;&#xA;                }&#xA;&#xA;                const body = {&#xA;                        text: textEditor.getValue(),&#xA;                        params: getParams()&#xA;                };&#xA;                const url = &#34;https:\/\/worker-v2-811908774949.us-east1.run.app&#34;;&#xA;&#xA;                onStart();&#xA;                fetch(url, {&#xA;                    method: &#39;post&#39;,&#xA;                    cache: &#39;no-cache&#39;,&#xA;                    headers: {&#xA;                        &#39;Content-Type&#39;: &#39;application/json; charset=utf-8&#39;&#xA;                    },&#xA;                    signal: AbortSignal.timeout(1000 * 60), &#xA;                    body: JSON.stringify(body)&#xA;                })&#xA;                    .then(r =&gt; {&#xA;                        if (r.status === 200) {&#xA;                            return r.json()&#xA;                        }&#xA;                        &#xA;                        if (r.status === 426) {&#xA;                            throw new Error(`Too many requests. Try again later.`);&#xA;                        }&#xA;                        &#xA;                        if (r.status === 400) {&#xA;                            return r.json().then((data) =&gt; {&#xA;                                if (data.details) {&#xA;                                    throw new Error(data.details);&#xA;                                }&#xA;                                &#xA;                                throw new Error(data.error);&#xA;                            });&#xA;                        }&#xA;                        &#xA;                        throw new Error(`Unexpected error. Try again later.`);&#xA;                    })&#xA;                    .then((data) =&gt; {&#xA;                        onEnd(JSON.stringify(data, null, 4));&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        onEnd(err.message);&#xA;                    });&#xA;            });&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;In this example, &lt;code&gt;@active&lt;/code&gt; is not a boolean literal written in the query. It is a parameter whose value is provided when the query is executed.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Compiler Analysis</title>
				<link>https://ferretlang.org/docs/embedding/go/compiler-analysis/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/embedding/go/compiler-analysis/</guid>
				<description>&lt;h1 id=&#34;compiler-analysis&#34;&gt;Compiler Analysis&lt;/h1&gt;&#xA;&lt;p&gt;Use &lt;code&gt;compiler.Analyze&lt;/code&gt; when an embedding application needs semantic information about FQL source without executing it. The result is a protocol-independent snapshot suitable for editor integrations, source navigation, validation UIs, and other developer tools.&lt;/p&gt;&#xA;&lt;p&gt;Analysis uses the same parser, name resolution, scopes, captures, call resolution, diagnostics, and type facts as normal compilation. It does not maintain a separate language model.&lt;/p&gt;&#xA;&lt;h2 id=&#34;analyze-a-source&#34;&gt;Analyze a source&lt;/h2&gt;&#xA;&lt;p&gt;Create a compiler and pass it a &lt;code&gt;source.Source&lt;/code&gt;:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Configuration</title>
				<link>https://ferretlang.org/docs/tools/lab/configuration/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/tools/lab/configuration/</guid>
				<description>&lt;h1 id=&#34;configuration&#34;&gt;Configuration&lt;/h1&gt;&#xA;&lt;p&gt;Lab configuration is primarily command-line flags. Most flags also have &lt;code&gt;LAB_*&lt;/code&gt; environment variable bindings.&lt;/p&gt;&#xA;&lt;p&gt;The current Lab v2 command surface does not include &lt;code&gt;--cdp&lt;/code&gt; or &lt;code&gt;LAB_CDP&lt;/code&gt;. Browser/CDP behavior belongs to the selected Ferret runtime, not to Lab&amp;rsquo;s CLI flags.&lt;/p&gt;&#xA;&lt;h2 id=&#34;lab-run&#34;&gt;&lt;code&gt;lab run&lt;/code&gt;&lt;/h2&gt;&#xA;&lt;p&gt;&lt;code&gt;lab run&lt;/code&gt; executes FQL unit tests and YAML suites.&lt;/p&gt;&#xA;&lt;div class=&#34;table-scroll&#34; role=&#34;region&#34; aria-label=&#34;Scrollable table&#34; tabindex=&#34;0&#34;&gt;&#xA;    &lt;table&gt;&#xA;        &lt;thead&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;th&gt;Flag&lt;/th&gt;&#xA;                        &lt;th&gt;Alias&lt;/th&gt;&#xA;                        &lt;th&gt;Env var&lt;/th&gt;&#xA;                        &lt;th&gt;Default&lt;/th&gt;&#xA;                        &lt;th&gt;Meaning&lt;/th&gt;&#xA;                &lt;/tr&gt;&#xA;        &lt;/thead&gt;&#xA;        &lt;tbody&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;--files&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;-f&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;LAB_FILES&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Location of test files to run. Can be repeated.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;--timeout&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;-t&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;LAB_TIMEOUT&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;30&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Timeout in seconds for each attempt.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;--reporter&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;LAB_REPORTER&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;console&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Reporter: &lt;code&gt;console&lt;/code&gt; or &lt;code&gt;simple&lt;/code&gt;.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;--runtime&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;-r&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;LAB_RUNTIME&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Builtin&lt;/td&gt;&#xA;                        &lt;td&gt;Complete target: &lt;code&gt;builtin&lt;/code&gt;, HTTP/HTTPS URL, or &lt;code&gt;wire+tcp://127.0.0.1:&amp;lt;port&amp;gt;&lt;/code&gt;.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;--runtime-option&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;LAB_RUNTIME_OPTION&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Repeatable adapter setting: &lt;code&gt;name:&amp;lt;JSON value&amp;gt;&lt;/code&gt;.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;--concurrency&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;-c&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;LAB_CONCURRENCY&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;1&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Number of tests to run at once.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;--times&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;LAB_TIMES&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;1&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Required successful runs per test.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;--attempts&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;-a&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;LAB_ATTEMPTS&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;1&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Maximum attempts for a single required pass. See the &lt;a href=&#34;../runners/#repeat-successful-runs&#34;&gt;repeat and retry behavior&lt;/a&gt; when using &lt;code&gt;--times&lt;/code&gt;.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;--times-interval&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;LAB_TIMES_INTERVAL&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;0&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Seconds to wait between repeated runs or retry attempts.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;--serve&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;LAB_SERVE&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Static directory mapping for test execution. Can be repeated.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;--mock&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;LAB_MOCK&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;OpenAPI mock API spec mapping for test execution. Can be repeated.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;--serve-bind&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;LAB_SERVE_BIND&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Host to bind local services to. Must not include a port.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;--serve-host&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;LAB_SERVE_HOST&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Host to advertise in local service URLs. Must not include a port.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;--param&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;-p&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;LAB_PARAM&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;User parameter for FQL. Can be repeated.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;--param-bind&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;LAB_PARAM_BIND&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Bind a user parameter path to an existing parameter reference. Can be repeated.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;--wait&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;-w&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;LAB_WAIT&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;HTTP resource to wait for before tests run. Can be repeated.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;--wait-timeout&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;--wt&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;LAB_WAIT_TIMEOUT&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;5&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Wait interval in seconds.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;                &lt;tr&gt;&#xA;                        &lt;td&gt;&lt;code&gt;--wait-attempts&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;LAB_WAIT_ATTEMPTS&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;&lt;code&gt;5&lt;/code&gt;&lt;/td&gt;&#xA;                        &lt;td&gt;Number of wait attempts.&lt;/td&gt;&#xA;                &lt;/tr&gt;&#xA;        &lt;/tbody&gt;&#xA;    &lt;/table&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;Example:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Work with iframes</title>
				<link>https://ferretlang.org/docs/guides/iframes/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/guides/iframes/</guid>
				<description>&lt;h1 id=&#34;work-with-iframes&#34;&gt;Work with iframes&lt;/h1&gt;&#xA;&lt;p&gt;Some pages embed content in iframes — login forms, embedded widgets, third-party content. This guide shows how to access iframe content with Ferret.&lt;/p&gt;&#xA;&lt;p&gt;Iframe access requires the &lt;code&gt;cdp&lt;/code&gt; driver. See &lt;a href=&#34;https://ferretlang.org/docs/guides/browser-pages/&#34;&gt;Browser-driven pages&lt;/a&gt; for setup.&lt;/p&gt;&#xA;&lt;h2 id=&#34;list-frames-on-a-page&#34;&gt;List frames on a page&lt;/h2&gt;&#xA;&lt;p&gt;Open the &lt;a href=&#34;https://mockery.ferretlang.org/scenarios/iframes/&#34;&gt;Mockery iframe scenario&lt;/a&gt; with the browser driver. The page’s &lt;code&gt;frames&lt;/code&gt; collection exposes documents, including the main document. Use their URLs to identify them; frame ordering can vary.&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor is-readonly is-auto-height&#34;&gt;&#xA;    &lt;textarea id=&#34;code-1-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;&lt;/textarea&gt;&lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;example.fql&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-meta&#34;&gt;read-only&lt;/span&gt;&#xA;                &lt;button id=&#34;code-1-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;div class=&#34;code-editor-pane&#34;&gt;&#xA;            &lt;div id=&#34;code-1-text&#34; class=&#34;code-editor-text&#34; data-auto-height=&#34;true&#34;&gt;let page = web::html::open(&amp;#34;https://mockery.ferretlang.org/scenarios/iframes/&amp;#34;, { driver: &amp;#34;cdp&amp;#34; })&#xA;return for frame in page.frames&#xA;    return { url: frame.URL, title: frame.title }&lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const editor = ace.edit(&#39;code-1-text&#39;);&#xA;            editor.setTheme(&#34;ace\/theme\/tomorrow_night&#34;);&#xA;            editor.session.setUseWorker(false);&#xA;            editor.session.setMode(&#34;ace/mode/&#34; + &#39;fql&#39;);&#xA;            editor.setOptions({&#xA;                readOnly: true,&#xA;                highlightActiveLine: false,&#xA;                highlightGutterLine: false,&#xA;                displayIndentGuides: false,&#xA;                printMargin: false&#xA;            });&#xA;            editor.renderer.$cursorLayer.element.style.display = &#34;none&#34;&#xA;            const copyBtn = document.querySelector(&#39;#code-1-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#code-1-copy-clipboard&#39;);&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy source to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(editor.getValue())&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy source&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;            function resizeAutoHeightEditor() {&#xA;                const lineHeight = editor.renderer.lineHeight || 21;&#xA;                const screenLines = Math.max(editor.session.getScreenLength(), 1);&#xA;                const nextHeight = Math.max(screenLines * lineHeight, 48);&#xA;&#xA;                editor.container.style.height = `${nextHeight}px`;&#xA;                editor.resize();&#xA;            }&#xA;&#xA;            editor.session.on(&#39;change&#39;, resizeAutoHeightEditor);&#xA;            window.addEventListener(&#39;resize&#39;, resizeAutoHeightEditor);&#xA;            resizeAutoHeightEditor();&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;h2 id=&#34;extract-content-from-a-frame&#34;&gt;Extract content from a frame&lt;/h2&gt;&#xA;&lt;p&gt;Frame A contains a product card. Find its document by URL and run the CSS query against that document. Polling allows time for the browser to load it:&lt;/p&gt;</description>
			</item>
			<item>
				<title>CI</title>
				<link>https://ferretlang.org/docs/tools/lab/ci/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/tools/lab/ci/</guid>
				<description>&lt;h1 id=&#34;ci&#34;&gt;CI&lt;/h1&gt;&#xA;&lt;p&gt;Lab fits CI best when test dependencies are explicit and output is easy to scan. Use &lt;code&gt;--reporter=simple&lt;/code&gt;, wait for external services, and keep local fixture URLs reachable from the selected runtime.&lt;/p&gt;&#xA;&lt;h2 id=&#34;basic-ci-command&#34;&gt;Basic CI command&lt;/h2&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor terminal-shortcode&#34;&gt;&#xA;    &lt;textarea id=&#34;terminal-1-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;lab run tests/ --reporter=simple&lt;/textarea&gt;&#xA;&#xA;    &lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;terminal&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;button id=&#34;terminal-1-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;pre id=&#34;terminal-1-content&#34; class=&#34;terminal-body&#34;&gt;&lt;code&gt;&lt;span class=&#34;terminal-row&#34;&gt;&lt;span class=&#34;terminal-prompt&#34; aria-hidden=&#34;true&#34;&gt;$&lt;/span&gt;&lt;span class=&#34;terminal-command&#34;&gt;lab run tests/ --reporter=simple&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&#xA;    &lt;/div&gt;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const copyBtn = document.querySelector(&#39;#terminal-1-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#terminal-1-copy-clipboard&#39;);&#xA;            const terminalContent = copyClipboardEl.value;&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy terminal commands to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(terminalContent)&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy terminal commands&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;The process exits with status &lt;code&gt;0&lt;/code&gt; when all tests pass and status &lt;code&gt;1&lt;/code&gt; when any test fails.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Embed Ferret in a Go application</title>
				<link>https://ferretlang.org/docs/embedding/go/application-guide/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/embedding/go/application-guide/</guid>
				<description>&lt;h1 id=&#34;embed-ferret-in-a-go-application&#34;&gt;Embed Ferret in a Go application&lt;/h1&gt;&#xA;&lt;p&gt;Embedding Ferret lets you run FQL queries inside your Go application — useful for user-defined extraction rules, dynamic data pipelines, or sandboxed scripting. This guide walks through building a Go service that accepts queries over HTTP.&lt;/p&gt;&#xA;&lt;p&gt;For the full native API reference, see &lt;a href=&#34;https://ferretlang.org/docs/embedding/go/&#34;&gt;Go embedding&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;div class=&#34;notification is-warning&#34;&gt;&#xA;&lt;p&gt;FQL source is code. Do not insert URLs, selectors, HTML, credentials, request bodies, or other runtime values with &lt;code&gt;fmt.Sprintf&lt;/code&gt; or string concatenation. Pass them as parameters instead. See &lt;a href=&#34;https://ferretlang.org/docs/embedding/go/safe-fql-construction/&#34;&gt;Construct FQL safely&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;/div&gt;</description>
			</item>
			<item>
				<title>Develop a Ferret module</title>
				<link>https://ferretlang.org/docs/guides/writing-plugins/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/guides/writing-plugins/</guid>
				<description>&lt;h1 id=&#34;develop-a-ferret-module&#34;&gt;Develop a Ferret module&lt;/h1&gt;&#xA;&lt;p&gt;A Ferret module bundles namespaced functions, host values, and lifecycle hooks into a single registerable Go package. This guide builds a complete module — a key-value cache that FQL scripts can create, populate, read, and iterate.&lt;/p&gt;&#xA;&lt;p&gt;For the registration and lifecycle model, see &lt;a href=&#34;https://ferretlang.org/docs/embedding/go/modules/&#34;&gt;Modules&lt;/a&gt;. For the underlying extension APIs, see &lt;a href=&#34;https://ferretlang.org/docs/embedding/go/custom-functions/&#34;&gt;Custom Functions&lt;/a&gt; and &lt;a href=&#34;https://ferretlang.org/docs/embedding/go/host-values/&#34;&gt;Host Values&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-the-module-will-do&#34;&gt;What the module will do&lt;/h2&gt;&#xA;&lt;p&gt;The &lt;code&gt;kv&lt;/code&gt; module exposes three functions and a host value:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Pre-compile and distribute programs</title>
				<link>https://ferretlang.org/docs/guides/precompiled-programs/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/guides/precompiled-programs/</guid>
				<description>&lt;h1 id=&#34;pre-compile-and-distribute-programs&#34;&gt;Pre-compile and distribute programs&lt;/h1&gt;&#xA;&lt;p&gt;Ferret can compile FQL scripts into binary artifacts. Loading a pre-compiled artifact skips parsing and source compilation — useful for faster startup, distributing scripts without separate &lt;code&gt;.fql&lt;/code&gt; files, or caching build output. The loading engine still owns a compiler and must register every module or host function used by the program.&lt;/p&gt;&#xA;&lt;p&gt;The Go examples target the &lt;a href=&#34;https://ferretlang.org/docs/embedding/go/getting-started/#installation&#34;&gt;published Core release&lt;/a&gt; and collect consumable output.&lt;/p&gt;&#xA;&lt;p&gt;For the artifact format specification and full API, see &lt;a href=&#34;https://ferretlang.org/docs/embedding/go/programs/&#34;&gt;Programs&lt;/a&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Universal API</title>
				<link>https://ferretlang.org/docs/embedding/go/universal-api/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/docs/embedding/go/universal-api/</guid>
				<description>&lt;h1 id=&#34;use-the-universal-api&#34;&gt;Use the Universal API&lt;/h1&gt;&#xA;&lt;p&gt;This page targets the adapter shipped with Core &lt;code&gt;v2.0.0-alpha.62&lt;/code&gt; and Universal API &lt;code&gt;v1.0.0-alpha.21&lt;/code&gt;. See &lt;a href=&#34;../getting-started/#installation&#34;&gt;Go installation&lt;/a&gt;. &lt;a href=&#34;https://ferretlang.org/docs/embedding/wire/&#34;&gt;Wire&amp;rsquo;s remote client&lt;/a&gt; uses the same portable runtime and consumable-output interfaces. Use the published dependency set in its &lt;a href=&#34;https://ferretlang.org/docs/embedding/wire/#run-a-host-and-client&#34;&gt;compatibility table&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Use &lt;code&gt;github.com/MontFerret/ferret/v2/uapi&lt;/code&gt;, Ferret&amp;rsquo;s official adapter, when&#xA;your integration accepts &lt;code&gt;github.com/MontFerret/api&lt;/code&gt; interfaces. For Native&#xA;embedding, use the root &lt;code&gt;github.com/MontFerret/ferret/v2&lt;/code&gt; package and&#xA;&lt;code&gt;ferret.New&lt;/code&gt;. Use &lt;code&gt;uapi.New&lt;/code&gt; to create and own a Native engine:&lt;/p&gt;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&#xA;&lt;div class=&#34;code-editor is-readonly is-auto-height&#34;&gt;&#xA;    &lt;textarea id=&#34;code-7-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;&lt;/textarea&gt;&lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;example.go&lt;/span&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-meta&#34;&gt;read-only&lt;/span&gt;&#xA;                &lt;button id=&#34;code-7-copy-button&#34; class=&#34;copy button is-outlined is-light code-editor-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;div class=&#34;code-editor-pane&#34;&gt;&#xA;            &lt;div id=&#34;code-7-text&#34; class=&#34;code-editor-text&#34; data-auto-height=&#34;true&#34;&gt;package example&#xA;&#xA;import (&#xA;    &amp;#34;context&amp;#34;&#xA;    &amp;#34;errors&amp;#34;&#xA;&#xA;    &amp;#34;github.com/MontFerret/api&amp;#34;&#xA;    &amp;#34;github.com/MontFerret/ferret/v2&amp;#34;&#xA;    &amp;#34;github.com/MontFerret/ferret/v2/uapi&amp;#34;&#xA;)&#xA;&#xA;func Run(ctx context.Context) (content *api.Content, err error) {&#xA;    portable, err := uapi.New(&amp;#34;dev&amp;#34;, ferret.WithParam(&amp;#34;value&amp;#34;, 41))&#xA;    if err != nil {&#xA;        return nil, err&#xA;    }&#xA;    defer func() { err = errors.Join(err, portable.Close()) }()&#xA;&#xA;    output, err := portable.Run(ctx, api.NewAnonymousSource(&amp;#34;RETURN @value &amp;#43; 1&amp;#34;))&#xA;    if err != nil {&#xA;        return nil, err&#xA;    }&#xA;    defer func() { err = errors.Join(err, output.Close()) }()&#xA;&#xA;    return output.Collect(ctx)&#xA;}&lt;/div&gt;&#xA;        &lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            const editor = ace.edit(&#39;code-7-text&#39;);&#xA;            editor.setTheme(&#34;ace\/theme\/tomorrow_night&#34;);&#xA;            editor.session.setUseWorker(false);&#xA;            editor.session.setMode(&#34;ace/mode/&#34; + &#39;golang&#39;);&#xA;            editor.setOptions({&#xA;                readOnly: true,&#xA;                highlightActiveLine: false,&#xA;                highlightGutterLine: false,&#xA;                displayIndentGuides: false,&#xA;                printMargin: false&#xA;            });&#xA;            editor.renderer.$cursorLayer.element.style.display = &#34;none&#34;&#xA;            const copyBtn = document.querySelector(&#39;#code-7-copy-button&#39;);&#xA;            const copyClipboardEl = document.querySelector(&#39;#code-7-copy-clipboard&#39;);&#xA;&#xA;            function copyTextWithFallback(content) {&#xA;                copyClipboardEl.value = content;&#xA;                copyClipboardEl.focus();&#xA;                copyClipboardEl.select();&#xA;&#xA;                if (!document.execCommand(&#39;copy&#39;)) {&#xA;                    throw new Error(&#39;Could not copy source to the clipboard&#39;);&#xA;                }&#xA;            }&#xA;&#xA;            function copyTextToClipboard(content) {&#xA;                if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                    return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                        copyTextWithFallback(content);&#xA;                    });&#xA;                }&#xA;&#xA;                copyTextWithFallback(content);&#xA;&#xA;                return Promise.resolve();&#xA;            }&#xA;&#xA;            copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                copyTextToClipboard(editor.getValue())&#xA;                    .then(() =&gt; {&#xA;                        copyBtn.textContent = &#39;Copied&#39;;&#xA;                        window.setTimeout(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copy&#39;;&#xA;                        }, 1200);&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        console.error(&#39;Failed to copy source&#39;);&#xA;                        console.error(err);&#xA;                    });&#xA;            });&#xA;            function resizeAutoHeightEditor() {&#xA;                const lineHeight = editor.renderer.lineHeight || 21;&#xA;                const screenLines = Math.max(editor.session.getScreenLength(), 1);&#xA;                const nextHeight = Math.max(screenLines * lineHeight, 48);&#xA;&#xA;                editor.container.style.height = `${nextHeight}px`;&#xA;                editor.resize();&#xA;            }&#xA;&#xA;            editor.session.on(&#39;change&#39;, resizeAutoHeightEditor);&#xA;            window.addEventListener(&#39;resize&#39;, resizeAutoHeightEditor);&#xA;            resizeAutoHeightEditor();&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;&#xA;&#xA;&lt;p&gt;The runtime owns the engine created by &lt;code&gt;New&lt;/code&gt;; closing the runtime closes that&#xA;engine. Pass Native options to configure modules, host services, codecs, and&#xA;defaults. Construction failures return a nil runtime and a projected Native&#xA;error; Native handles rollback. Nil options, including &lt;code&gt;uapi.New(version, nil)&lt;/code&gt;,&#xA;are skipped by Native. Call &lt;code&gt;uapi.New(version)&lt;/code&gt; to use Native defaults.&lt;/p&gt;</description>
			</item>
			<item>
				<title>One Interface, Many Runtimes: Introducing Ferret&#39;s Universal API</title>
				<link>https://ferretlang.org/blog/ferret-v2-uapi/</link>
				<pubDate>Tue, 17 Nov 2026 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/blog/ferret-v2-uapi/</guid>
				<description>&lt;p&gt;Hello, friends!&lt;/p&gt;&#xA;&lt;p&gt;One of the ideas I&amp;rsquo;ve emphasized throughout Ferret&amp;rsquo;s development is that &lt;a href=&#34;https://ferretlang.org/blog/ferret-v2-lib-first/&#34;&gt;Ferret is a library first&lt;/a&gt;. Applications embed the engine, configure its capabilities, register their own functions and modules, and define how queries interact with the surrounding environment.&lt;/p&gt;&#xA;&lt;p&gt;That model worked well while Ferret was primarily an execution engine, but the surrounding ecosystem gradually became much broader. The project expanded to include a CLI, a test runner, a debugger, IDE integrations, and support for executing queries against runtimes hosted by other applications.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Introducing Ferret Wire: Your Runtime, Connected</title>
				<link>https://ferretlang.org/blog/wire-introduction/</link>
				<pubDate>Fri, 02 Oct 2026 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/blog/wire-introduction/</guid>
				<description>&lt;p&gt;Hello, friends!&lt;/p&gt;&#xA;&lt;p&gt;In an earlier post, I talked about why Ferret was built as a library first. Your application embeds the engine, decides which modules and custom functions are available, and defines the environment in which queries run. The CLI is one way to use Ferret, but it is not the center of the architecture.&lt;/p&gt;&#xA;&lt;p&gt;That approach creates an interesting question:&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;How do development tools work with the runtime inside your application, rather than a separate runtime that merely resembles it?&lt;/em&gt;&lt;/p&gt;</description>
			</item>
			<item>
				<title>Ferret Comes to Visual Studio Code</title>
				<link>https://ferretlang.org/blog/new-vscode-extension/</link>
				<pubDate>Tue, 25 Aug 2026 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/blog/new-vscode-extension/</guid>
				<description>&lt;p&gt;Hello, friends!&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;m excited to finally share something we’ve been working toward for a while: the new official Ferret extension for Visual Studio Code is now available on the Visual Studio Marketplace.&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;Ferret for Visual Studio Code&lt;/code&gt; brings the Ferret development experience directly into the editor, backed by Ferret Daemon (&lt;code&gt;ferretd&lt;/code&gt;) and the same language tooling we’ve been building for Ferret v2.&lt;/p&gt;&#xA;&lt;h3 id=&#34;more-than-syntax-highlighting&#34;&gt;More than syntax highlighting&lt;/h3&gt;&#xA;&lt;p&gt;The old FQL extension provided the basics: syntax highlighting and language configuration. The new extension is a rather different beast.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Ferret v2: Moving Beyond AQL</title>
				<link>https://ferretlang.org/blog/ferret-v2-language-evolution/</link>
				<pubDate>Thu, 13 Aug 2026 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/blog/ferret-v2-language-evolution/</guid>
				<description>&lt;p&gt;One of the fun (and sometimes dangerous) parts of working on a language for a long time is that, at some point, it starts developing a personality of its own.&lt;/p&gt;&#xA;&lt;p&gt;You add a feature because you need it, another one because the previous feature made something else possible, and then one day you look at the language and realize that some of the conventions you started with don&amp;rsquo;t quite fit anymore.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Introducing the Ferret Module Registry</title>
				<link>https://ferretlang.org/blog/ferret-module-registry/</link>
				<pubDate>Mon, 10 Aug 2026 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/blog/ferret-module-registry/</guid>
				<description>&lt;p&gt;Ferret now has a module Registry.&lt;/p&gt;&#xA;&lt;p&gt;Until now, modules could be published as Go packages, but there was no shared place to discover them, compare versions, check compatibility, or find their documentation. You needed to know that a module existed and where its source lived before you could use it.&lt;/p&gt;&#xA;&lt;p&gt;The &lt;a href=&#34;https://ferretlang.org/registry/&#34;&gt;Ferret Registry&lt;/a&gt; gives modules a common home. It is the public catalog that people browse and that the Ferret CLI reads when searching for or installing modules.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Why Ferret Was Built as a Library First</title>
				<link>https://ferretlang.org/blog/ferret-v2-lib-first/</link>
				<pubDate>Wed, 05 Aug 2026 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/blog/ferret-v2-lib-first/</guid>
				<description>&lt;p&gt;When people first discover Ferret, they usually encounter the command-line interface.&lt;/p&gt;&#xA;&lt;p&gt;They write a query, run it against a website or an API, inspect the results, and move on, and for many use cases, that’s all they need.&lt;/p&gt;&#xA;&lt;p&gt;But in reality, the CLI was never the center of the project. Ferret was built around a much simpler idea: make a declarative-first, expression-oriented language an embeddable library first, then build applications around it.&lt;/p&gt;</description>
			</item>
			<item>
				<title>New Website, New Docs, and the Road to Ferret v2</title>
				<link>https://ferretlang.org/blog/new-website/</link>
				<pubDate>Thu, 25 Jun 2026 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/blog/new-website/</guid>
				<description>&lt;h2 id=&#34;new-website-new-docs-and-the-road-to-ferret-v2&#34;&gt;New Website, New Docs, and the Road to Ferret v2&lt;/h2&gt;&#xA;&lt;p&gt;Hello friends,&lt;/p&gt;&#xA;&lt;p&gt;You might have noticed that Ferret has a refreshed website and a new domain name. This is part of the ongoing work around Ferret v2, and the website is gradually becoming the main home for documentation, guides, and project updates.&lt;/p&gt;&#xA;&lt;p&gt;One of the main focuses right now is improving the docs. Ferret v2 brings a cleaner language model, new runtime concepts, better tooling, and a more structured ecosystem, so the documentation needs to explain not only the syntax, but also how the pieces fit together.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Inside Ferret v2: New Language Capabilities</title>
				<link>https://ferretlang.org/blog/ferret-v2-new-syntax/</link>
				<pubDate>Mon, 25 May 2026 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/blog/ferret-v2-new-syntax/</guid>
				<description>&lt;p&gt;Hello friends,&lt;/p&gt;&#xA;&lt;p&gt;Today I want to talk about one of the most exciting parts of Ferret v2: new language capabilities that are now available directly in the syntax.&lt;/p&gt;&#xA;&lt;p&gt;Ferret v2 is not meant to be a completely different language. The goal is to preserve the original spirit of Ferret while making it a clearer declarative-first, expression-oriented embedded language for data automation: more expressive, more consistent, and easier to extend.&lt;/p&gt;&#xA;&lt;p&gt;The familiar Ferret style remains: small scripts, readable data flow, structured values, and extraction-focused operations. The new syntax is there to make those scripts clearer, not to make Ferret feel like a large general-purpose programming language.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Inside Ferret v2: The New Execution Model</title>
				<link>https://ferretlang.org/blog/ferret-v2-execution-model/</link>
				<pubDate>Wed, 08 Apr 2026 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/blog/ferret-v2-execution-model/</guid>
				<description>&lt;p&gt;Hello friends!&lt;/p&gt;&#xA;&lt;p&gt;The &lt;a href=&#34;https://ferretlang.org/blog/ferret-v2-announcement/&#34;&gt;previous post&lt;/a&gt; covered why Ferret v2 exists - why a rewrite made sense, what changed philosophically, and why I decided it was time to move the project into a new chapter.&lt;/p&gt;&#xA;&lt;p&gt;This time I want to talk about something more concrete: execution.&lt;/p&gt;&#xA;&lt;p&gt;The new runtime isn&amp;rsquo;t just a faster version of the old one. It is the execution foundation for Ferret&amp;rsquo;s declarative-first, expression-oriented embedded language, and that change touches almost everything: performance, embeddability, tooling, future language features, and the kinds of optimizations Ferret can support.&lt;/p&gt;</description>
			</item>
			<item>
				<title>On the Road to Ferret v2</title>
				<link>https://ferretlang.org/blog/ferret-v2-announcement/</link>
				<pubDate>Thu, 26 Mar 2026 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/blog/ferret-v2-announcement/</guid>
				<description>&lt;p&gt;Hello friends!&lt;/p&gt;&#xA;&lt;p&gt;Long time no see! I hope you all have been doing well, it&amp;rsquo;s been a while since my last post.&lt;/p&gt;&#xA;&lt;p&gt;Given the Ferret v2 alpha release, I thought it was a good time to share the journey toward a declarative-first, expression-oriented embedded language for data automation, the design choices we made, and what you can expect from this new version.&lt;/p&gt;&#xA;&lt;h2 id=&#34;how-we-got-here&#34;&gt;How We Got Here&lt;/h2&gt;&#xA;&lt;p&gt;When I first started working on Ferret, I didn’t have some grand plan. I also didn’t know much about parsers, compilers, or runtimes.&#xA;I just needed a solution to a very specific pain.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Ferret v0.18.1</title>
				<link>https://ferretlang.org/blog/ferret-v0.18.1/</link>
				<pubDate>Wed, 07 May 2025 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/blog/ferret-v0.18.1/</guid>
				<description>&lt;p&gt;Hello Ferret users!&lt;/p&gt;&#xA;&lt;p&gt;This is a small cleanup-focused release that modernizes the codebase and keeps things aligned with current Go best practices.&lt;/p&gt;&#xA;&lt;h1 id=&#34;whats-changed&#34;&gt;What’s changed&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Simplified formatting code by using fmt.Printf instead of nested fmt.Println(fmt.Sprintf(&amp;hellip;)) (#789)&lt;/li&gt;&#xA;&lt;li&gt;Updated ANTLR and other dependencies, and upgraded the Go version (#796)&lt;/li&gt;&#xA;&lt;li&gt;Removed deprecated io/ioutil usage as part of an internal refactor (#792)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;No functional changes in behavior, but the internals are now cleaner, more idiomatic, and future-proofed.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Ferret v0.18.0</title>
				<link>https://ferretlang.org/blog/ferret-v0.18.0/</link>
				<pubDate>Tue, 28 Mar 2023 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/blog/ferret-v0.18.0/</guid>
				<description>&lt;p&gt;Hello Ferret users!&lt;/p&gt;&#xA;&lt;p&gt;We are happy to announce the release of Ferret v0.18.0.&lt;/p&gt;&#xA;&lt;p&gt;A small but useful update with a mix of maintenance and a new utility function.&lt;/p&gt;&#xA;&lt;h1 id=&#34;whats-new&#34;&gt;What’s new&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Updated project dependencies&lt;/li&gt;&#xA;&lt;li&gt;Added the TO_BINARY function (#775)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;This release keeps things fresh under the hood while introducing a handy new helper for working with binary data.&lt;/p&gt;&#xA;&lt;p&gt;As always, thanks to everyone contributing and reporting issues.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Ferret v0.17.0</title>
				<link>https://ferretlang.org/blog/ferret-v0.17.0/</link>
				<pubDate>Tue, 07 Feb 2023 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/blog/ferret-v0.17.0/</guid>
				<description>&lt;p&gt;Hello Ferret users!&lt;/p&gt;&#xA;&lt;p&gt;We are happy to announce the release of Ferret v0.17.0.&lt;/p&gt;&#xA;&lt;p&gt;This release focuses on housekeeping and tooling improvements, tightening up the build and modernizing the dependency stack.&lt;/p&gt;&#xA;&lt;h1 id=&#34;changes&#34;&gt;Changes&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Updated project dependencies (#769)&lt;/li&gt;&#xA;&lt;li&gt;Dropped support for pre-generics versions of Go&lt;/li&gt;&#xA;&lt;li&gt;Updated ANTLR and removed the legacy SDK&lt;/li&gt;&#xA;&lt;li&gt;Added staticcheck and goimports to the toolchain&lt;/li&gt;&#xA;&lt;li&gt;Updated build steps to reflect the new setup&lt;/li&gt;&#xA;&lt;li&gt;Fixed unit tests for HTTP helper functions&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;While there are no user-facing features in this release, 0.17.0 lays important groundwork for future development by improving correctness, maintainability, and build consistency.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Ferret v0.16.0</title>
				<link>https://ferretlang.org/blog/ferret-v0.16.0/</link>
				<pubDate>Mon, 22 Nov 2021 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/blog/ferret-v0.16.0/</guid>
				<description>&lt;p&gt;Hello friends,&lt;/p&gt;&#xA;&lt;p&gt;We hope everyone is healthy, happy, and ready for winter :)&lt;/p&gt;&#xA;&lt;p&gt;Our team is back from the break and excited to announce a new Ferret release!&lt;/p&gt;&#xA;&lt;p&gt;Ferret v0.16.0 is here and now it&amp;rsquo;s more stable, flexible, and faster!&lt;/p&gt;&#xA;&lt;p&gt;As always, CLI can be found &lt;a href=&#34;https://github.com/MontFerret/cli/releases/tag/v1.2.0&#34;&gt;here&lt;/a&gt; and the runtime itself &lt;a href=&#34;https://github.com/MontFerret/ferret/releases/tag/v0.16.0&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s dive in and see what we&amp;rsquo;ve got!&lt;/p&gt;&#xA;&lt;h1 id=&#34;whats-new&#34;&gt;What&amp;rsquo;s new&lt;/h1&gt;&#xA;&lt;p&gt;In this release, besides internal optimizations, we&amp;rsquo;ve focused on new language syntax and order to&lt;/p&gt;</description>
			</item>
			<item>
				<title>Ferret v0.15.0</title>
				<link>https://ferretlang.org/blog/ferret-v0.15.0/</link>
				<pubDate>Sun, 25 Apr 2021 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/blog/ferret-v0.15.0/</guid>
				<description>&lt;p&gt;Hello friends,&lt;/p&gt;&#xA;&lt;p&gt;Ferret v0.15.0 is out. This release is more focused on bug fixes and API improvements.&lt;/p&gt;&#xA;&lt;p&gt;Since the runtime and CLI have been splitted into 2 different repositories, you can find CLI binaries &lt;a href=&#34;https://github.com/MontFerret/cli/releases/tag/v1.1.0&#34;&gt;here&lt;/a&gt; which was upgraded to v1.1.0.&lt;/p&gt;&#xA;&lt;h1 id=&#34;whats-added&#34;&gt;What&amp;rsquo;s added&lt;/h1&gt;&#xA;&lt;h2 id=&#34;support-of-document-charset-in-http-driver&#34;&gt;Support of document charset in HTTP driver&lt;/h2&gt;&#xA;&lt;p&gt;If your target page does not contain information if its content encoding and it is other than &lt;code&gt;utf-8&lt;/code&gt;, you can help &lt;code&gt;http&lt;/code&gt; driver to properly convert the page content into &lt;code&gt;utf-8&lt;/code&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Say &#39;Hello&#39; to new CLI</title>
				<link>https://ferretlang.org/blog/say-hello-to-new-cli/</link>
				<pubDate>Thu, 22 Apr 2021 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/blog/say-hello-to-new-cli/</guid>
				<description>&lt;p&gt;Hello fellas,&lt;/p&gt;&#xA;&lt;p&gt;We are happy to announce that we finally have a brand &lt;a href=&#34;https://github.com/MontFerret/cli&#34;&gt;new Ferret CLI&lt;/a&gt;!&lt;/p&gt;&#xA;&lt;figure class=&#34;image&#34;&gt;&lt;img src=&#34;https://ferretlang.org/blog/say-hello-to-new-cli/images/cli-logo.svg&#34; style=&#34;width: 256px; height: 256px&#34;&gt;&lt;/figure&gt;&#xA;&lt;p&gt;As the project grows, it became clear that we need to separate Ferret Runtime and CLI, to let the projects evolve on their own.&lt;/p&gt;&#xA;&lt;p&gt;The separation allowed us to review what we need from CLI and rebuild it from the ground up.&lt;/p&gt;&#xA;&lt;p&gt;Thus, let&amp;rsquo;s dive in and see what&amp;rsquo;s in there.&lt;/p&gt;&#xA;&lt;h1 id=&#34;get-started&#34;&gt;Get started&lt;/h1&gt;&#xA;&lt;p&gt;First of all, we need to install it:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Ferret v0.14.0</title>
				<link>https://ferretlang.org/blog/ferret-v0.14.0/</link>
				<pubDate>Sat, 06 Mar 2021 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/blog/ferret-v0.14.0/</guid>
				<description>&lt;p&gt;Hello friends,&lt;/p&gt;&#xA;&lt;p&gt;Belated happy new 2021 year! Hope things will be better and we can finally get back to normal life.&lt;/p&gt;&#xA;&lt;p&gt;Meanwhile, in between of work, personal lives and anxiety, we&amp;rsquo;ve managed to bring you some great features with a new release of Ferret - &lt;strong&gt;&lt;a href=&#34;https://github.com/MontFerret/ferret/releases/tag/v0.14.0&#34;&gt;Ferret v0.14.0&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;This release contains some syntax updates, DOM API fixes and extra flexibility. Let&amp;rsquo;s dive in!&lt;/p&gt;&#xA;&lt;h1 id=&#34;whats-added&#34;&gt;What&amp;rsquo;s added&lt;/h1&gt;&#xA;&lt;h2 id=&#34;support-of-history-api&#34;&gt;Support of History API&lt;/h2&gt;&#xA;&lt;p&gt;Before v0.14.0, Page object from the CDP driver, would only return the url that was set during &lt;strong&gt;full&lt;/strong&gt; page load or redirect but ignored all &lt;strong&gt;in page&lt;/strong&gt; navigation using History API (e.g. using &lt;code&gt;react-router&lt;/code&gt;).&lt;/p&gt;</description>
			</item>
			<item>
				<title>Ferret v0.13.0</title>
				<link>https://ferretlang.org/blog/ferret-v0.13.0/</link>
				<pubDate>Tue, 24 Nov 2020 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/blog/ferret-v0.13.0/</guid>
				<description>&lt;p&gt;Hello friends,&lt;/p&gt;&#xA;&lt;p&gt;We are excited to announce a new Ferret release - &lt;strong&gt;&lt;a href=&#34;https://github.com/MontFerret/ferret/releases/tag/v0.13.0&#34;&gt;Ferret v0.13.0&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;This release brings new syntax, DOM API updates and some bug fixes. Let&amp;rsquo;s dive in!&lt;/p&gt;&#xA;&lt;h1 id=&#34;whats-added&#34;&gt;What&amp;rsquo;s added&lt;/h1&gt;&#xA;&lt;h2 id=&#34;while-loop&#34;&gt;While loop&lt;/h2&gt;&#xA;&lt;p&gt;Finally! While loops have landed FQL!&lt;/p&gt;&#xA;&lt;p&gt;Ferret query language inherently lacked while loops due to its origin from ArangoDB query language. But over time, it&amp;rsquo;s become obvious that this kind of looping is essential for data scraping.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Say &#39;Hello&#39; to Lab</title>
				<link>https://ferretlang.org/blog/say-hello-to-lab/</link>
				<pubDate>Mon, 09 Nov 2020 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/blog/say-hello-to-lab/</guid>
				<description>&lt;figure class=&#34;image&#34;&gt;&lt;img src=&#34;https://ferretlang.org/blog/say-hello-to-lab/images/lab-logo.png&#34; style=&#34;width: 256px; height: 256px&#34;&gt;&lt;/figure&gt;&#xA;&lt;p&gt;Hello friends,&lt;/p&gt;&#xA;&lt;p&gt;Our team is excited to announce a new tool in our ecosystem - &lt;a href=&#34;https://github.com/MontFerret/lab&#34;&gt;The Lab&lt;/a&gt;!&lt;/p&gt;&#xA;&lt;p&gt;The Lab is a test runner for Ferret that helps you to test how your scripts retrieve data or validate web UI.&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s see how it works!&lt;/p&gt;&#xA;&lt;h2 id=&#34;get-started&#34;&gt;Get started&lt;/h2&gt;&#xA;&lt;p&gt;The Lab can be installed either by downloading a &lt;a href=&#34;https://github.com/MontFerret/lab/releases&#34;&gt;binary&lt;/a&gt; or pulling a Docker image:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ docker pull montferret/lab&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you are macOS/Linux user, you can install the latest binary with the shell script:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Ferret v0.12.0</title>
				<link>https://ferretlang.org/blog/ferret-v0.12.0/</link>
				<pubDate>Mon, 14 Sep 2020 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/blog/ferret-v0.12.0/</guid>
				<description>&lt;p&gt;Hello fellow miners,&lt;/p&gt;&#xA;&lt;p&gt;We are happy to announce a new Ferret release - &lt;strong&gt;&lt;a href=&#34;https://github.com/MontFerret/ferret/releases/tag/v0.12.0&#34;&gt;Ferret v0.12.0&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;This release has a new useful module in the standard library - testing!&lt;br&gt;&#xA;Let&amp;rsquo;s dig in. The full changelog you can find &lt;a href=&#34;https://github.com/MontFerret/ferret/blob/master/CHANGELOG.md#0120&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h1 id=&#34;whats-added&#34;&gt;What&amp;rsquo;s added&lt;/h1&gt;&#xA;&lt;h2 id=&#34;assertion-library&#34;&gt;Assertion library&lt;/h2&gt;&#xA;&lt;p&gt;A new &lt;code&gt;T&lt;/code&gt; namespace has been added to the standard library that provides some helpful methods for making assertions.  &lt;br&gt;&#xA;The functions can be used to test UI, validate data and ensure the correctnes of a script.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Ferret v0.11.1</title>
				<link>https://ferretlang.org/blog/ferret-v0.11.1/</link>
				<pubDate>Wed, 27 May 2020 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/blog/ferret-v0.11.1/</guid>
				<description>&lt;p&gt;Hello fellow miners,&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;&lt;a href=&#34;https://github.com/MontFerret/ferret/releases/tag/v0.11.1&#34;&gt;Ferret v0.11.1&lt;/a&gt;&lt;/strong&gt; has been released with a hotfix that solves an error in some functions that do screen positioning using scrolling.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Ferret v0.11.0</title>
				<link>https://ferretlang.org/blog/ferret-v0.11.0/</link>
				<pubDate>Thu, 21 May 2020 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/blog/ferret-v0.11.0/</guid>
				<description>&lt;p&gt;Hello fellow miners,&lt;/p&gt;&#xA;&lt;p&gt;Today, we are living in unprecedented times. There are almost 5 million people infected by COVID-19 and thousands die every day in the world.&lt;/p&gt;&#xA;&lt;p&gt;During this time, the highest priority is to stay safe and healthy, take care of family.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;p&gt;Ferret team has been locked down in their homes with their families as everyone around the globe, but &lt;strong&gt;still&lt;/strong&gt; has managed to make new &lt;strong&gt;&lt;a href=&#34;https://github.com/MontFerret/ferret/releases/tag/v0.11.0&#34;&gt;Ferret v0.11.0&lt;/a&gt;&lt;/strong&gt; release!&lt;/p&gt;</description>
			</item>
			<item>
				<title>New release strategy</title>
				<link>https://ferretlang.org/blog/new-release-strategy/</link>
				<pubDate>Sun, 23 Feb 2020 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/blog/new-release-strategy/</guid>
				<description>&lt;p&gt;Working on an open source project while you have a full time job sometimes is challenging. &lt;br&gt;&#xA;Especially, when you try to make every release full of new features and bug fixes.&lt;/p&gt;&#xA;&lt;p&gt;Recent Ferret releases have showed, that trying to bring many features at one time is very time consuming and frustrating for end users. Therefore, our team has decided to change our release strategy.&lt;/p&gt;&#xA;&lt;p&gt;In order to ship new releases more frequently, we are going to decrease amount of features and bug fixes per release. Ferret is more or less stable and featureful now, there are no reasons to wait too long.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Ferret v0.10.0</title>
				<link>https://ferretlang.org/blog/ferret-v0.10.0/</link>
				<pubDate>Fri, 21 Feb 2020 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/blog/ferret-v0.10.0/</guid>
				<description>&lt;p&gt;Hello fellow miners, &lt;strong&gt;&lt;a href=&#34;https://github.com/MontFerret/ferret/releases/tag/v0.10.0&#34;&gt;Ferret v0.10.0&lt;/a&gt;&lt;/strong&gt; has been &lt;strong&gt;finally&lt;/strong&gt; released!&lt;/p&gt;&#xA;&lt;p&gt;It&amp;rsquo;s been long and busy 6 months since the last release and many of you might thought that the project got abandoned. &lt;br&gt;&#xA;We assure you it&amp;rsquo;s not! But sometimes life happens and slows you down.&lt;/p&gt;&#xA;&lt;p&gt;But we are back and ready to rock!&lt;/p&gt;&#xA;&lt;p&gt;This release has many great features and improvements thank to all our contributors. &lt;br&gt;&#xA;Let&amp;rsquo;s take a look at the most important ones. The full changelog you can find &lt;a href=&#34;https://github.com/MontFerret/ferret/blob/master/CHANGELOG.md#0100&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Ferret v0.9</title>
				<link>https://ferretlang.org/blog/ferret-v0.9/</link>
				<pubDate>Sun, 08 Sep 2019 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/blog/ferret-v0.9/</guid>
				<description>&lt;p&gt;Hello fellow miners, &lt;strong&gt;&lt;a href=&#34;https://github.com/MontFerret/ferret/releases/tag/v0.9.0&#34;&gt;Ferret v0.9&lt;/a&gt;&lt;/strong&gt; has been released!&lt;/p&gt;&#xA;&lt;p&gt;In this release, we mostly focused on bug fixes and filling gaps in user interaction functionality.&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s see what we&amp;rsquo;ve got.&lt;/p&gt;&#xA;&lt;h1 id=&#34;whats-added&#34;&gt;What&amp;rsquo;s added&lt;/h1&gt;&#xA;&lt;h2 id=&#34;clearing-input-values&#34;&gt;Clearing input values&lt;/h2&gt;&#xA;&lt;p&gt;Since early versions, Ferret has &lt;code&gt;INPUT&lt;/code&gt; HTML function that allowed to type any value to input HTML element.&#xA;This works by appending the function parameter to any pre-existing &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; value. While it works fine in many cases, there are some scenarios when a target input field has a preset value which needs to be erased. With this release, Ferret has a new method &lt;code&gt;INPUT_CLEAR&lt;/code&gt; that erases any data from a target input.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Ferret v0.8.2</title>
				<link>https://ferretlang.org/blog/ferret-v0.8.2/</link>
				<pubDate>Mon, 05 Aug 2019 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/blog/ferret-v0.8.2/</guid>
				<description>&lt;p&gt;Another portion of hot fixes has arrived!&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;&lt;a href=&#34;https://github.com/MontFerret/ferret/releases/tag/v0.8.2&#34;&gt;v0.8.2&lt;/a&gt;&lt;/strong&gt; release brings some critical fixes.&lt;/p&gt;&#xA;&lt;h2 id=&#34;scrolling-position-is-not-centered&#34;&gt;Scrolling position is not centered&lt;/h2&gt;&#xA;&lt;p&gt;In 0.8, we introduced a new behavior for all user interactions. Before any actions like clicking ot typing, we scroll into a target element making it visible in a viewport. But the logic behind it, positioned elements on the top of the viewport, which led to some issues on some websites due to their markup - the elements were still invisible because they were under other elements.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Ferret v0.8.1</title>
				<link>https://ferretlang.org/blog/ferret-v0.8.1/</link>
				<pubDate>Fri, 26 Jul 2019 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/blog/ferret-v0.8.1/</guid>
				<description>&lt;p&gt;With all big features, come small bugs. :)&lt;/p&gt;&#xA;&lt;p&gt;With this new &lt;strong&gt;&lt;a href=&#34;https://github.com/MontFerret/ferret/releases/tag/v0.8.1&#34;&gt;v0.8.1&lt;/a&gt;&lt;/strong&gt; release we are providing hot fixes for some of these small ones.&lt;/p&gt;&#xA;&lt;h2 id=&#34;broken-click-function&#34;&gt;Broken CLICK function&lt;/h2&gt;&#xA;&lt;p&gt;In 0.7 &lt;code&gt;CLICK&lt;/code&gt; and &lt;code&gt;CLICK_ALL&lt;/code&gt; functions were doing a check before clicking and was returning a boolean value indicating whether a target element was clicked.&#xA;In 0.8 this logic got broken due to internal refactorings and the check was not performed which led to broken scripts using this returned value.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Ferret v0.8</title>
				<link>https://ferretlang.org/blog/ferret-v0.8/</link>
				<pubDate>Tue, 23 Jul 2019 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/blog/ferret-v0.8/</guid>
				<description>&lt;p&gt;Hooray, &lt;strong&gt;&lt;a href=&#34;https://github.com/MontFerret/ferret/releases/tag/v0.8.0&#34;&gt;Ferret v0.8&lt;/a&gt;&lt;/strong&gt; has been released!&lt;/p&gt;&#xA;&lt;p&gt;It&amp;rsquo;s been a while since the last release, but we worked hard to bring new and better Ferret. This release has many new exciting features, but unfortunately, there are also some breaking changes.&lt;/p&gt;&#xA;&lt;p&gt;You can find the full changelog &lt;strong&gt;&lt;a href=&#34;https://github.com/MontFerret/ferret/blob/master/CHANGELOG.md#080&#34;&gt;here&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s go!&lt;/p&gt;&#xA;&lt;h1 id=&#34;whats-added&#34;&gt;What&amp;rsquo;s added&lt;/h1&gt;&#xA;&lt;h2 id=&#34;iframe&#34;&gt;iframe&lt;/h2&gt;&#xA;&lt;p&gt;Ferret &lt;em&gt;finally&lt;/em&gt; supports &lt;code&gt;iframe&lt;/code&gt; elements. &lt;br&gt;&#xA;When a page gets loaded, Ferret finds all available elements and provieds an access to them via the &lt;code&gt;.frames&lt;/code&gt; property of a page object.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Say &#39;Hello&#39; to Ferret</title>
				<link>https://ferretlang.org/blog/say-hello-to-ferret/</link>
				<pubDate>Fri, 08 Feb 2019 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/blog/say-hello-to-ferret/</guid>
				<description>&lt;p&gt;As a developer, you have probably written a web scraper at least once.&lt;/p&gt;&#xA;&lt;p&gt;Maybe you needed product prices from a few websites. Maybe you wanted to collect images for an AI experiment. Maybe you needed public data from a website that did not provide an API. Or maybe you just needed to turn a messy web page into a clean JSON file.&lt;/p&gt;&#xA;&lt;p&gt;At first, this usually feels simple.&lt;/p&gt;&#xA;&lt;p&gt;You pick a language, install a library, make an HTTP request, parse some HTML, extract a few fields, and move on.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Contact</title>
				<link>https://ferretlang.org/contact/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/contact/</guid>
				<description>&lt;p&gt;Need help using Ferret or want to get in touch? Choose the channel that best matches what you need.&lt;/p&gt;&#xA;&lt;div class=&#34;notification is-info&#34;&gt;&#xA;&lt;p&gt;&lt;strong&gt;Before opening an issue:&lt;/strong&gt; Make sure you’re using the &lt;a href=&#34;https://github.com/MontFerret/ferret/releases/tag/v2.0.0-alpha.62&#34;&gt;documented v2 release&lt;/a&gt; and check whether your question is already answered in the &lt;a href=&#34;https://ferretlang.org/docs/&#34;&gt;documentation&lt;/a&gt; or &lt;a href=&#34;https://github.com/MontFerret/ferret/discussions&#34;&gt;existing discussions&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;&lt;h2 id=&#34;documentation&#34;&gt;Documentation&lt;/h2&gt;&#xA;&lt;p&gt;The documentation is the best place to start. It covers the language, standard library, embedding, guides, and examples.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://ferretlang.org/docs/&#34;&gt;→ Browse the Documentation&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;github-discussions&#34;&gt;GitHub Discussions&lt;/h2&gt;&#xA;&lt;p&gt;Have a question about using Ferret? Looking for advice on language features or best practices?&lt;/p&gt;</description>
			</item>
			<item>
				<title>Search</title>
				<link>https://ferretlang.org/search/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/search/</guid>
				<description></description>
			</item>
			<item>
				<title>Sponsor Ferret</title>
				<link>https://ferretlang.org/sponsor/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/sponsor/</guid>
				<description>&lt;p&gt;Ferret is an independent open source project focused on making data automation simpler, more expressive, and easier to maintain.&lt;/p&gt;&#xA;&lt;p&gt;If Ferret has become part of your workflow, or your organization relies on it, sponsoring the project is one of the most direct ways to support its continued development.&lt;/p&gt;&#xA;&lt;p&gt;Sponsorship helps fund the work that often goes unnoticed: implementing new features, fixing bugs, improving documentation, maintaining infrastructure, publishing releases, and investing time in the long-term quality of the language and ecosystem.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Try it!</title>
				<link>https://ferretlang.org/try/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://ferretlang.org/try/</guid>
				<description>&lt;div class=&#34;code-editor is-horizontal is-auto-height&#34;&gt;&#xA;    &lt;input id=&#34;code-editor-1-share-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;&lt;/input&gt;&#xA;    &lt;textarea id=&#34;code-editor-1-copy-clipboard&#34; class=&#34;code-editor-clipboard&#34; tabindex=&#34;-1&#34; aria-hidden=&#34;true&#34;&gt;&lt;/textarea&gt;&#xA;&#xA;    &lt;div class=&#34;code-editor-shell&#34;&gt;&#xA;        &lt;div id=&#34;code-editor-1-header&#34; class=&#34;code-editor-header&#34;&gt;&#xA;            &lt;div class=&#34;code-editor-title&#34;&gt;&#xA;                &lt;span class=&#34;code-editor-dot&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;span&gt;example.fql&lt;/span&gt;&#xA;                &lt;small&gt;Ferret v2&lt;/small&gt;&#xA;            &lt;/div&gt;&#xA;&#xA;            &lt;div class=&#34;code-editor-actions&#34;&gt;&#xA;                &lt;button id=&#34;code-editor-1-share-button&#34; class=&#34;share button is-outlined is-light code-editor-button&#34;&gt;Share&lt;/button&gt;&#xA;                &lt;button id=&#34;code-editor-1-result-toggle-button&#34; class=&#34;button is-outlined is-light code-editor-button&#34; type=&#34;button&#34; aria-expanded=&#34;false&#34; aria-controls=&#34;code-editor-1-result-pane&#34;&gt;Output&lt;/button&gt;&#xA;                &lt;button id=&#34;code-editor-1-params-toggle-button&#34; class=&#34;button is-outlined is-light code-editor-button&#34; type=&#34;button&#34; aria-expanded=&#34;false&#34; aria-controls=&#34;code-editor-1-params-drawer&#34;&gt;Params&lt;/button&gt;&#xA;                &lt;button id=&#34;code-editor-1-run-button&#34; class=&#34;run button is-outlined is-light code-editor-button&#34; type=&#34;button&#34; aria-label=&#34;Run query&#34;&gt;&#xA;                    &lt;span class=&#34;code-editor-run-label&#34;&gt;Run&lt;/span&gt;&#xA;                    &lt;span id=&#34;code-editor-1-run-button-spinner&#34; class=&#34;code-editor-run-spinner&#34; aria-hidden=&#34;true&#34;&gt;&lt;/span&gt;&#xA;                &lt;/button&gt;&#xA;            &lt;/div&gt;&#xA;            &lt;div id=&#34;code-editor-1-progress&#34; class=&#34;code-editor-progress&#34; role=&#34;progressbar&#34; aria-label=&#34;Running query&#34; hidden&gt;&lt;/div&gt;&#xA;            &lt;span id=&#34;code-editor-1-run-status&#34; class=&#34;code-editor-sr-only&#34; aria-live=&#34;polite&#34; aria-atomic=&#34;true&#34;&gt;&lt;/span&gt;&#xA;        &lt;/div&gt;&#xA;&#xA;        &lt;div class=&#34;code-editor-workspace&#34;&gt;&#xA;            &lt;div id=&#34;code-editor-1-grid&#34; class=&#34;code-editor-grid&#34; style=&#34;grid-template-columns: 1fr;&#34;&gt;&#xA;                &lt;div id=&#34;code-editor-1-source-pane&#34; class=&#34;code-editor-pane code-editor-pane-source&#34;&gt;&#xA;                    &lt;div class=&#34;code-editor-pane-header&#34;&gt;&#xA;                        &lt;span&gt;query.fql&lt;/span&gt;&#xA;                        &lt;div class=&#34;code-editor-pane-header-actions&#34;&gt;&#xA;                            &lt;span&gt;FQL&lt;/span&gt;&#xA;                            &lt;button id=&#34;code-editor-1-copy-button&#34; class=&#34;code-editor-pane-button&#34; type=&#34;button&#34;&gt;Copy&lt;/button&gt;&#xA;                        &lt;/div&gt;&#xA;                    &lt;/div&gt;&#xA;                    &lt;div id=&#34;code-editor-1-text&#34; class=&#34;code-editor-text&#34; data-auto-height=&#34;true&#34;&gt;// Open the product listing page using a browser-based driver (CDP)&#xA;// This allows Ferret to execute JavaScript and work with dynamic content&#xA;let doc = web::html::open(&amp;#39;https://mockery.ferretlang.org/scenarios/dynamic-products/basic/&amp;#39;, {&#xA;    driver: &amp;#39;cdp&amp;#39;&#xA;})&#xA;&#xA;// Wait until at least one product card is present on the page&#xA;// This is important because the page loads content asynchronously&#xA;// WAITFOR VALUE accepts any non-NONE candidate; WHEN keeps polling until this list is non-empty&#xA;let products = waitfor value doc[~ css`.product-card`]&#xA;    when LENGTH(.) &amp;gt; 0&#xA;    timeout 5000&#xA;&#xA;// Iterate over each product card and extract useful data&#xA;return for product in products&#xA;    return {&#xA;        brand: product[~? css`.product-brand`].textContent,&#xA;        title: product[~? css`.product-title`].textContent,&#xA;        price: TO_FLOAT(REPLACE(product[~? css`.product-price`].textContent, &amp;#39;$&amp;#39;, &amp;#39;&amp;#39;)) on error return 0&#xA;    }&lt;/div&gt;&#xA;                &lt;/div&gt;&#xA;&#xA;                &lt;div id=&#34;code-editor-1-result-pane&#34; class=&#34;code-editor-pane code-editor-pane-result&#34; hidden&gt;&#xA;                    &lt;div class=&#34;code-editor-pane-header&#34;&gt;&#xA;                        &lt;span&gt;result.json&lt;/span&gt;&#xA;                        &lt;div class=&#34;code-editor-pane-header-actions&#34;&gt;&#xA;                            &lt;span&gt;output&lt;/span&gt;&#xA;                            &lt;button id=&#34;code-editor-1-result-close-button&#34; class=&#34;code-editor-pane-button&#34; type=&#34;button&#34; aria-controls=&#34;code-editor-1-result-pane&#34;&gt;Close&lt;/button&gt;&#xA;                        &lt;/div&gt;&#xA;                    &lt;/div&gt;&#xA;                    &lt;div id=&#34;code-editor-1-result&#34; class=&#34;code-editor-result&#34; data-auto-height=&#34;true&#34;&gt;&lt;/div&gt;&#xA;                &lt;/div&gt;&#xA;            &lt;/div&gt;&#xA;&#xA;            &lt;aside id=&#34;code-editor-1-params-drawer&#34; class=&#34;code-editor-params-drawer&#34; aria-labelledby=&#34;code-editor-1-params-title&#34; hidden&gt;&#xA;                &lt;div class=&#34;code-editor-params-header&#34;&gt;&#xA;                    &lt;div&gt;&#xA;                        &lt;span id=&#34;code-editor-1-params-title&#34; class=&#34;code-editor-params-title&#34;&gt;Query parameters&lt;/span&gt;&#xA;                        &lt;span class=&#34;code-editor-params-description&#34;&gt;Values are parsed as JSON when possible.&lt;/span&gt;&#xA;                    &lt;/div&gt;&#xA;                    &lt;button id=&#34;code-editor-1-params-close-button&#34; class=&#34;code-editor-pane-button&#34; type=&#34;button&#34;&gt;Close&lt;/button&gt;&#xA;                &lt;/div&gt;&#xA;                &lt;div class=&#34;code-editor-params-body&#34;&gt;&#xA;                    &lt;div id=&#34;code-editor-1-params-empty&#34; class=&#34;code-editor-params-empty&#34;&gt;No parameters added.&lt;/div&gt;&#xA;                    &lt;div id=&#34;code-editor-1-params-rows&#34; class=&#34;code-editor-params-rows&#34;&gt;&lt;/div&gt;&#xA;                &lt;/div&gt;&#xA;                &lt;div class=&#34;code-editor-params-footer&#34;&gt;&#xA;                    &lt;button id=&#34;code-editor-1-params-add-button&#34; class=&#34;code-editor-params-add-button&#34; type=&#34;button&#34;&gt;Add parameter&lt;/button&gt;&#xA;                &lt;/div&gt;&#xA;            &lt;/aside&gt;&#xA;        &lt;/div&gt;&#xA;    &lt;/div&gt;&#xA;&#xA;    &lt;script&gt;&#xA;        document.addEventListener(&#39;DOMContentLoaded&#39;, function () {&#xA;            function createEditor(id, mode, useWorker) {&#xA;                const editor = ace.edit(id);&#xA;                editor.setTheme(&#34;ace\/theme\/tomorrow_night&#34;);&#xA;                editor.session.setUseWorker(useWorker);&#xA;                editor.session.setMode(&#34;ace/mode/&#34; + mode);&#xA;                editor.setOptions({&#xA;                    displayIndentGuides: false,&#xA;                    printMargin: false&#xA;                });&#xA;&#xA;                return editor;&#xA;            }&#xA;&#xA;            const btn = document.querySelector(&#39;#code-editor-1-run-button&#39;);&#xA;            const textEditor = createEditor(&#39;code-editor-1-text&#39;, &#39;fql&#39;, true);&#xA;            const resultEditor = createEditor(&#39;code-editor-1-result&#39;, &#39;json&#39;, false);&#xA;            resultEditor.setReadOnly(true);&#xA;            const resultExpandBtn = null;&#xA;            const editorHeader = document.querySelector(&#39;#code-editor-1-header&#39;);&#xA;            const editorWorkspace = document.querySelector(&#39;#code-editor-1-grid&#39;).parentElement;&#xA;            const editorGrid = document.querySelector(&#39;#code-editor-1-grid&#39;);&#xA;            const runProgress = document.querySelector(&#39;#code-editor-1-progress&#39;);&#xA;            const runStatus = document.querySelector(&#39;#code-editor-1-run-status&#39;);&#xA;            const resultPane = document.querySelector(&#39;#code-editor-1-result-pane&#39;);&#xA;            const resultToggleBtn = document.querySelector(&#39;#code-editor-1-result-toggle-button&#39;);&#xA;            const resultCloseBtn = document.querySelector(&#39;#code-editor-1-result-close-button&#39;);&#xA;            const paramsToggleBtn = document.querySelector(&#39;#code-editor-1-params-toggle-button&#39;);&#xA;            const paramsDrawer = document.querySelector(&#39;#code-editor-1-params-drawer&#39;);&#xA;            const paramsCloseBtn = document.querySelector(&#39;#code-editor-1-params-close-button&#39;);&#xA;            const paramsAddBtn = document.querySelector(&#39;#code-editor-1-params-add-button&#39;);&#xA;            const paramsRows = document.querySelector(&#39;#code-editor-1-params-rows&#39;);&#xA;            const paramsEmpty = document.querySelector(&#39;#code-editor-1-params-empty&#39;);&#xA;            let isResultVisible = !resultPane.hidden;&#xA;            let isParamsVisible = !paramsDrawer.hidden;&#xA;&#xA;            function resetResultExpansion() {&#xA;                if (!resultExpandBtn) {&#xA;                    return;&#xA;                }&#xA;&#xA;                isResultExpanded = false;&#xA;                resultExpandBtn.setAttribute(&#39;aria-expanded&#39;, &#39;false&#39;);&#xA;                resultExpandBtn.textContent = &#39;Expand&#39;;&#xA;            }&#xA;&#xA;            function syncEditorLayout() {&#xA;                const sourceHeight = getEditorContentHeight(textEditor);&#xA;                textEditor.container.style.height = `${sourceHeight}px`;&#xA;&#xA;                if (isResultVisible) {&#xA;                    const resultHeight = getEditorContentHeight(resultEditor);&#xA;                    applyResultHeight(resultHeight);&#xA;                }&#xA;&#xA;                textEditor.resize();&#xA;&#xA;                if (isResultVisible) {&#xA;                    resultEditor.resize();&#xA;                }&#xA;            }&#xA;&#xA;            function setResultVisible(nextVisible) {&#xA;                isResultVisible = nextVisible;&#xA;                resultPane.hidden = !nextVisible;&#xA;                resultToggleBtn.setAttribute(&#39;aria-expanded&#39;, nextVisible ? &#39;true&#39; : &#39;false&#39;);&#xA;                editorGrid.style.gridTemplateColumns = nextVisible ? &#39;&#39; : &#39;1fr&#39;;&#xA;&#xA;                if (!nextVisible) {&#xA;                    resetResultExpansion();&#xA;                    syncEditorLayout();&#xA;                    return;&#xA;                }&#xA;&#xA;                window.requestAnimationFrame(() =&gt; {&#xA;                    syncEditorLayout();&#xA;                    resultEditor.resize(true);&#xA;                });&#xA;            }&#xA;&#xA;            resultToggleBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setResultVisible(!isResultVisible);&#xA;            });&#xA;&#xA;            resultCloseBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setResultVisible(false);&#xA;            });&#xA;&#xA;            const collapsedResultHeightStyle = resultEditor.container.style.height;&#xA;            let isResultExpanded = false;&#xA;&#xA;            function getEditorContentHeight(editor) {&#xA;                const lineHeight = editor.renderer.lineHeight || 21;&#xA;                const screenLines = Math.max(editor.session.getScreenLength(), 1);&#xA;&#xA;                return Math.max(screenLines * lineHeight, 48);&#xA;            }&#xA;&#xA;            function getMaxResultHeight(fallbackHeight) {&#xA;                const viewportHeight = window.innerHeight || document.documentElement.clientHeight || fallbackHeight;&#xA;                const rootFontSize = parseFloat(window.getComputedStyle(document.documentElement).fontSize) || 16;&#xA;&#xA;                return Math.min(viewportHeight * 0.45, 32 * rootFontSize);&#xA;            }&#xA;&#xA;            function getCollapsedResultHeight() {&#xA;                return getEditorContentHeight(resultEditor);&#xA;            }&#xA;&#xA;            function getExpandedResultHeight(collapsedHeight) {&#xA;                const lineHeight = resultEditor.renderer.lineHeight || textEditor.renderer.lineHeight || 21;&#xA;                const maxAllowedHeight = getMaxResultHeight(collapsedHeight);&#xA;                const screenLines = Math.max(resultEditor.session.getScreenLength(), 1);&#xA;                const contentHeight = (screenLines * lineHeight) + (lineHeight * 2);&#xA;                const targetHeight = Math.min(contentHeight, maxAllowedHeight);&#xA;&#xA;                return Math.max(collapsedHeight, Math.round(targetHeight));&#xA;            }&#xA;&#xA;            function applyResultHeight(collapsedHeight) {&#xA;                if (resultExpandBtn &amp;&amp; isResultExpanded) {&#xA;                    resultEditor.container.style.height = `${getExpandedResultHeight(collapsedHeight)}px`;&#xA;                } else {&#xA;                    resultEditor.container.style.height = `${Math.min(collapsedHeight, getMaxResultHeight(collapsedHeight))}px`;&#xA;                }&#xA;&#xA;                resultEditor.resize();&#xA;            }&#xA;            textEditor.session.on(&#39;change&#39;, syncEditorLayout);&#xA;&#xA;            if (resultExpandBtn) {&#xA;                resultExpandBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                    isResultExpanded = !isResultExpanded;&#xA;                    resultExpandBtn.setAttribute(&#39;aria-expanded&#39;, isResultExpanded ? &#39;true&#39; : &#39;false&#39;);&#xA;                    resultExpandBtn.textContent = isResultExpanded ? &#39;Collapse&#39; : &#39;Expand&#39;;&#xA;                    syncEditorLayout();&#xA;                });&#xA;            }&#xA;&#xA;            function syncParamsEmptyState() {&#xA;                paramsEmpty.hidden = paramsRows.children.length &gt; 0;&#xA;            }&#xA;&#xA;            function formatParamValue(value) {&#xA;                return typeof value === &#39;string&#39; ? value : JSON.stringify(value);&#xA;            }&#xA;&#xA;            function createParamRow(name, value) {&#xA;                const row = document.createElement(&#39;div&#39;);&#xA;                row.className = &#39;code-editor-param-row&#39;;&#xA;&#xA;                const nameInput = document.createElement(&#39;input&#39;);&#xA;                nameInput.className = &#39;code-editor-param-input code-editor-param-name&#39;;&#xA;                nameInput.type = &#39;text&#39;;&#xA;                nameInput.placeholder = &#39;name&#39;;&#xA;                nameInput.setAttribute(&#39;aria-label&#39;, &#39;Parameter name&#39;);&#xA;                nameInput.value = name || &#39;&#39;;&#xA;&#xA;                const separator = document.createElement(&#39;span&#39;);&#xA;                separator.className = &#39;code-editor-param-separator&#39;;&#xA;                separator.setAttribute(&#39;aria-hidden&#39;, &#39;true&#39;);&#xA;                separator.textContent = &#39;:&#39;;&#xA;&#xA;                const valueInput = document.createElement(&#39;input&#39;);&#xA;                valueInput.className = &#39;code-editor-param-input code-editor-param-value&#39;;&#xA;                valueInput.type = &#39;text&#39;;&#xA;                valueInput.placeholder = &#39;value&#39;;&#xA;                valueInput.setAttribute(&#39;aria-label&#39;, &#39;Parameter value&#39;);&#xA;                valueInput.value = value === undefined ? &#39;&#39; : formatParamValue(value);&#xA;&#xA;                const removeBtn = document.createElement(&#39;button&#39;);&#xA;                removeBtn.className = &#39;code-editor-param-remove-button&#39;;&#xA;                removeBtn.type = &#39;button&#39;;&#xA;                removeBtn.setAttribute(&#39;aria-label&#39;, `Remove parameter ${name || &#39;row&#39;}`);&#xA;                removeBtn.textContent = &#39;Remove&#39;;&#xA;                removeBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                    row.remove();&#xA;                    syncParamsEmptyState();&#xA;                });&#xA;&#xA;                row.append(nameInput, separator, valueInput, removeBtn);&#xA;                paramsRows.appendChild(row);&#xA;                syncParamsEmptyState();&#xA;&#xA;                return nameInput;&#xA;            }&#xA;&#xA;            function setParamsVisible(nextVisible) {&#xA;                isParamsVisible = nextVisible;&#xA;                paramsDrawer.hidden = !nextVisible;&#xA;                paramsToggleBtn.setAttribute(&#39;aria-expanded&#39;, nextVisible ? &#39;true&#39; : &#39;false&#39;);&#xA;                editorWorkspace.classList.toggle(&#39;is-params-open&#39;, nextVisible);&#xA;&#xA;                if (nextVisible) {&#xA;                    paramsCloseBtn.focus();&#xA;                } else {&#xA;                    paramsToggleBtn.focus();&#xA;                }&#xA;            }&#xA;&#xA;            function setParamsControlsDisabled(disabled) {&#xA;                paramsToggleBtn.disabled = disabled;&#xA;                paramsDrawer.querySelectorAll(&#39;button, input&#39;).forEach((control) =&gt; {&#xA;                    control.disabled = disabled;&#xA;                });&#xA;            }&#xA;&#xA;            function parseParamValue(value) {&#xA;                try {&#xA;                    return JSON.parse(value);&#xA;                } catch (err) {&#xA;                    return value;&#xA;                }&#xA;            }&#xA;&#xA;            function getParams() {&#xA;                return Array.from(paramsRows.querySelectorAll(&#39;.code-editor-param-row&#39;)).reduce((params, row) =&gt; {&#xA;                    const name = row.querySelector(&#39;.code-editor-param-name&#39;).value.trim();&#xA;&#xA;                    if (name) {&#xA;                        const value = row.querySelector(&#39;.code-editor-param-value&#39;).value;&#xA;                        params[name] = parseParamValue(value);&#xA;                    }&#xA;&#xA;                    return params;&#xA;                }, {});&#xA;            }&#xA;&#xA;            const initialParams = JSON.parse(&#34;{}&#34;);&#xA;&#xA;            if (initialParams &amp;&amp; typeof initialParams === &#39;object&#39; &amp;&amp; !Array.isArray(initialParams)) {&#xA;                Object.entries(initialParams).forEach(([name, value]) =&gt; {&#xA;                    createParamRow(name, value);&#xA;                });&#xA;            }&#xA;&#xA;            syncParamsEmptyState();&#xA;&#xA;            paramsToggleBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setParamsVisible(!isParamsVisible);&#xA;            });&#xA;&#xA;            paramsCloseBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                setParamsVisible(false);&#xA;            });&#xA;&#xA;            paramsAddBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                createParamRow(&#39;&#39;, &#39;&#39;).focus();&#xA;            });&#xA;&#xA;            window.addEventListener(&#39;resize&#39;, syncEditorLayout);&#xA;            syncEditorLayout();&#xA;&#xA;            function setContent(editor, content) {&#xA;                editor.setValue(content, -1);&#xA;            }&#xA;                const copyClipboardEl = document.querySelector(&#39;#code-editor-1-copy-clipboard&#39;);&#xA;                const copyBtn = document.querySelector(&#39;#code-editor-1-copy-button&#39;);&#xA;&#xA;                function copyTextWithFallback(content) {&#xA;                    copyClipboardEl.value = content;&#xA;                    copyClipboardEl.focus();&#xA;                    copyClipboardEl.select();&#xA;&#xA;                    if (!document.execCommand(&#39;copy&#39;)) {&#xA;                        throw new Error(&#39;Could not copy source to the clipboard&#39;);&#xA;                    }&#xA;                }&#xA;&#xA;                function copyTextToClipboard(content) {&#xA;                    if (navigator.clipboard &amp;&amp; navigator.clipboard.writeText) {&#xA;                        return navigator.clipboard.writeText(content).catch(() =&gt; {&#xA;                            copyTextWithFallback(content);&#xA;                        });&#xA;                    }&#xA;&#xA;                    copyTextWithFallback(content);&#xA;&#xA;                    return Promise.resolve();&#xA;                }&#xA;&#xA;                copyBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                    copyTextToClipboard(textEditor.getValue())&#xA;                        .then(() =&gt; {&#xA;                            copyBtn.textContent = &#39;Copied&#39;;&#xA;                            window.setTimeout(() =&gt; {&#xA;                                copyBtn.textContent = &#39;Copy&#39;;&#xA;                            }, 1200);&#xA;                        })&#xA;                        .catch((err) =&gt; {&#xA;                            console.error(&#39;Failed to copy source&#39;);&#xA;                            console.error(err);&#xA;                        });&#xA;                });&#xA;                const clibboardEl = document.querySelector(&#39;#code-editor-1-share-clipboard&#39;);&#xA;                const shareBtn = document.querySelector(&#39;#code-editor-1-share-button&#39;);&#xA;&#xA;                shareBtn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                    try {&#xA;                        const script = btoa(textEditor.getValue());&#xA;&#xA;                        const url = `${location.protocol}\/\/${location.host}${location.pathname}?script=${script}`;&#xA;                        clibboardEl.value = url;&#xA;                        clibboardEl.focus();&#xA;                        clibboardEl.select();&#xA;                        &#xA;                        if (!document.execCommand(&#34;copy&#34;)) {&#xA;                            console.info(url);&#xA;&#xA;                            throw new Error(&#39;Could not copy url to the clipboard&#39;)&#xA;                        }&#xA;                    } catch(err) {&#xA;                        console.error(&#39;Failed to share&#39;);&#xA;                        console.error(err);&#xA;                    }&#xA;                });&#xA;&#xA;                const q = new URLSearchParams(location.search);&#xA;                const encodedScript = q.get(&#34;script&#34;);&#xA;&#xA;                if (encodedScript) {&#xA;                    try {&#xA;                        const script = atob(encodedScript);&#xA;&#xA;                        setContent(textEditor, script);&#xA;                    } catch(err) {&#xA;                        console.error(&#39;Failed to decode script&#39;);&#xA;                        console.error(err);&#xA;                    }&#xA;                }&#xA;&#xA;            let isRunning = false;&#xA;&#xA;            function onStart() {&#xA;                isRunning = true;&#xA;                textEditor.setReadOnly(true);&#xA;                runProgress.hidden = false;&#xA;                runStatus.textContent = &#39;Running query&#39;;&#xA;                editorHeader.setAttribute(&#39;aria-busy&#39;, &#39;true&#39;);&#xA;                editorGrid.setAttribute(&#39;aria-busy&#39;, &#39;true&#39;);&#xA;                btn.classList.add(&#39;is-running&#39;);&#xA;                btn.setAttribute(&#39;aria-busy&#39;, &#39;true&#39;);&#xA;                btn.setAttribute(&#39;aria-label&#39;, &#39;Running query&#39;);&#xA;                btn.disabled = true;&#xA;                setParamsControlsDisabled(true);&#xA;            }&#xA;&#xA;            function onEnd(result) {&#xA;                isRunning = false;&#xA;                textEditor.setReadOnly(false);&#xA;                runProgress.hidden = true;&#xA;                runStatus.textContent = &#39;&#39;;&#xA;                editorHeader.setAttribute(&#39;aria-busy&#39;, &#39;false&#39;);&#xA;                editorGrid.setAttribute(&#39;aria-busy&#39;, &#39;false&#39;);&#xA;                btn.classList.remove(&#39;is-running&#39;);&#xA;                btn.setAttribute(&#39;aria-busy&#39;, &#39;false&#39;);&#xA;                btn.setAttribute(&#39;aria-label&#39;, &#39;Run query&#39;);&#xA;                btn.disabled = false;&#xA;                setParamsControlsDisabled(false);&#xA;&#xA;                setContent(resultEditor, result);&#xA;                setResultVisible(true);&#xA;            }&#xA;&#xA;            btn.addEventListener(&#39;click&#39;, () =&gt; {&#xA;                if (isRunning) {&#xA;                    return;&#xA;                }&#xA;&#xA;                const body = {&#xA;                        text: textEditor.getValue(),&#xA;                        params: getParams()&#xA;                };&#xA;                const url = &#34;https:\/\/worker-v2-811908774949.us-east1.run.app&#34;;&#xA;&#xA;                onStart();&#xA;                fetch(url, {&#xA;                    method: &#39;post&#39;,&#xA;                    cache: &#39;no-cache&#39;,&#xA;                    headers: {&#xA;                        &#39;Content-Type&#39;: &#39;application/json; charset=utf-8&#39;&#xA;                    },&#xA;                    signal: AbortSignal.timeout(1000 * 60), &#xA;                    body: JSON.stringify(body)&#xA;                })&#xA;                    .then(r =&gt; {&#xA;                        if (r.status === 200) {&#xA;                            return r.json()&#xA;                        }&#xA;                        &#xA;                        if (r.status === 426) {&#xA;                            throw new Error(`Too many requests. Try again later.`);&#xA;                        }&#xA;                        &#xA;                        if (r.status === 400) {&#xA;                            return r.json().then((data) =&gt; {&#xA;                                if (data.details) {&#xA;                                    throw new Error(data.details);&#xA;                                }&#xA;                                &#xA;                                throw new Error(data.error);&#xA;                            });&#xA;                        }&#xA;                        &#xA;                        throw new Error(`Unexpected error. Try again later.`);&#xA;                    })&#xA;                    .then((data) =&gt; {&#xA;                        onEnd(JSON.stringify(data, null, 4));&#xA;                    })&#xA;                    .catch((err) =&gt; {&#xA;                        onEnd(err.message);&#xA;                    });&#xA;            });&#xA;        }, false);&#xA;    &lt;/script&gt;&#xA;&lt;/div&gt;</description>
			</item>
	</channel>
</rss>
