From 13eb701518cc8d4a68b3843a7866736f08620543 Mon Sep 17 00:00:00 2001 From: giles Date: Wed, 1 Apr 2026 22:14:48 +0000 Subject: [PATCH] Fix 3 handler examples: put-patch names, value-select keys, active-search primitive MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Rename ex-pp-* handlers to ex-putpatch-* to match URL slugs (putpatch-edit-all, putpatch, putpatch-cancel) 2. Fix value-select-data: keyword keys (:Languages) → string keys ("Languages") so request-arg string lookup matches 3. Fix dom-value → element-value in orchestration.sx bind-event changed modifier (dom-value was never defined, element-value is) Co-Authored-By: Claude Opus 4.6 (1M context) --- shared/static/wasm/sx/orchestration.sx | 2 +- shared/static/wasm/sx/orchestration.sxbc | 4 +- sx/sx/handlers/examples.sx | 988 ++++++++++++----------- web/orchestration.sx | 2 +- 4 files changed, 536 insertions(+), 460 deletions(-) diff --git a/shared/static/wasm/sx/orchestration.sx b/shared/static/wasm/sx/orchestration.sx index adbb0481..63df142e 100644 --- a/shared/static/wasm/sx/orchestration.sx +++ b/shared/static/wasm/sx/orchestration.sx @@ -466,7 +466,7 @@ (when (get mods "changed") (let - ((val (dom-value el))) + ((val element-value)) (if (= val last-val) (set! should-fire false) diff --git a/shared/static/wasm/sx/orchestration.sxbc b/shared/static/wasm/sx/orchestration.sxbc index 6fa771a7..e113adda 100644 --- a/shared/static/wasm/sx/orchestration.sxbc +++ b/shared/static/wasm/sx/orchestration.sxbc @@ -1,3 +1,3 @@ -(sxbc 1 "39c0fb1706a57831" +(sxbc 1 "00794659183c2c78" (code - :constants ("_preload-cache" "dict" "_css-hash" "" "dispatch-trigger-events" {:upvalue-count 0 :arity 2 :constants ("try-parse-json" "for-each" {:upvalue-count 2 :arity 1 :constants ("dom-dispatch" "get") :bytecode (20 0 0 18 0 16 0 18 1 16 0 52 1 0 2 49 3 50)} "keys" {:upvalue-count 1 :arity 1 :constants ("trim" "not" "empty?" "dom-dispatch" "dict") :bytecode (16 0 52 0 0 1 17 1 16 1 52 2 0 1 52 1 0 1 33 16 0 20 3 0 18 0 16 1 52 4 0 0 49 3 32 1 0 2 50)} "split" ",") :bytecode (16 1 33 55 0 20 0 0 16 1 48 1 17 2 16 2 33 20 0 51 2 0 1 0 1 2 16 2 52 3 0 1 52 1 0 2 32 18 0 51 4 0 1 0 16 1 1 6 0 52 5 0 2 52 1 0 2 32 1 0 2 50)} "init-css-tracking" {:upvalue-count 0 :arity 0 :constants ("dom-query" "meta[name=\"sx-css-classes\"]" "dom-get-attr" "content" "_css-hash") :bytecode (20 0 0 1 1 0 48 1 17 0 16 0 33 29 0 20 2 0 16 0 1 3 0 48 2 17 1 16 1 33 8 0 16 1 21 4 0 32 1 0 2 32 1 0 2 50)} "execute-request" {:upvalue-count 0 :arity 3 :constants ("get-verb-info" "nil?" "promise-resolve" "get" "method" "url" "dom-get-attr" "sx-media" "not" "browser-media-matches?" "sx-confirm" "browser-confirm" "sx-prompt" "browser-prompt" "validate-for-request" "do-fetch" "assoc" "dict" "SX-Prompt") :bytecode (20 0 0 16 0 48 1 6 34 3 0 5 16 1 17 3 16 3 52 1 0 1 33 9 0 20 2 0 2 49 1 32 249 0 16 3 1 4 0 52 3 0 2 17 4 16 3 1 5 0 52 3 0 2 17 5 20 6 0 16 0 1 7 0 48 2 17 6 16 6 6 33 12 0 5 20 9 0 16 6 48 1 52 8 0 1 33 9 0 20 2 0 2 49 1 32 185 0 20 6 0 16 0 1 10 0 48 2 17 6 16 6 6 33 12 0 5 20 11 0 16 6 48 1 52 8 0 1 33 9 0 20 2 0 2 49 1 32 143 0 20 6 0 16 0 1 12 0 48 2 17 6 16 6 33 10 0 20 13 0 16 6 48 1 32 1 0 2 17 7 16 6 6 33 7 0 5 16 7 52 1 0 1 33 9 0 20 2 0 2 49 1 32 88 0 16 4 52 1 0 1 6 34 23 0 5 16 5 52 1 0 1 6 34 12 0 5 20 14 0 16 0 48 1 52 8 0 1 33 9 0 20 2 0 2 49 1 32 43 0 20 15 0 16 0 16 4 16 4 16 5 16 7 33 23 0 16 2 6 34 5 0 5 52 17 0 0 1 18 0 16 7 52 16 0 3 32 2 0 16 2 49 5 50)} "do-fetch" {:upvalue-count 0 :arity 5 :constants ("dom-get-attr" "sx-sync" "=" "replace" "abort-previous" "resolve-target" "not" "identical?" "abort-previous-target" "new-abort-controller" "track-controller" "track-controller-target" "build-request-body" "get" "url" "body" "content-type" "build-request-headers" "loaded-component-names" "_css-hash" "csrf-token" "for-each" {:upvalue-count 2 :arity 1 :constants ("dict-set!" "get") :bytecode (18 0 16 0 18 1 16 0 52 1 0 2 52 0 0 3 50)} "keys" "dict-set!" "Content-Type" "X-CSRFToken" "preload-cache-get" "_preload-cache" "apply-optimistic" "show-indicator" "disable-elements" "dom-add-class" "sx-request" "dom-set-attr" "aria-busy" "true" "dom-dispatch" "sx:beforeRequest" "dict" "method" "fetch-request" "headers" "signal" "controller-signal" "cross-origin" "cross-origin?" "preloaded" {:upvalue-count 8 :arity 4 :constants ("clear-loading-state" "revert-optimistic" "not" "dom-dispatch" "sx:responseError" "dict" "status" "text" ">" "len" 0 "handle-fetch-success" "handle-retry" "sx:afterRequest") :bytecode (20 0 0 18 0 18 1 18 2 48 3 5 20 1 0 18 3 48 1 5 16 0 52 2 0 1 33 86 0 20 3 0 18 0 1 4 0 1 6 0 16 1 1 7 0 16 3 52 5 0 4 48 3 5 16 3 6 33 14 0 5 16 3 52 9 0 1 1 10 0 52 8 0 2 33 20 0 20 11 0 18 0 18 4 18 5 18 6 16 2 16 3 49 6 32 15 0 20 12 0 18 0 18 5 18 7 18 4 18 6 49 5 32 37 0 20 3 0 18 0 1 13 0 1 6 0 16 1 52 5 0 2 48 3 5 20 11 0 18 0 18 4 18 5 18 6 16 2 16 3 49 6 50)} {:upvalue-count 6 :arity 1 :constants ("clear-loading-state" "revert-optimistic" "not" "abort-error?" "log-warn" "str" "sx:fetch error " " " " — " "dom-dispatch" "sx:requestError" "dict" "error") :bytecode (20 0 0 18 0 18 1 18 2 48 3 5 20 1 0 18 3 48 1 5 20 3 0 16 0 48 1 52 2 0 1 33 47 0 20 4 0 1 6 0 18 4 1 7 0 18 5 1 8 0 16 0 52 5 0 6 48 1 5 20 9 0 18 0 1 10 0 1 12 0 16 0 52 11 0 2 49 3 32 1 0 2 50)}) :bytecode (20 0 0 16 0 1 1 0 48 2 17 5 16 5 1 3 0 52 2 0 2 33 10 0 20 4 0 16 0 48 1 32 1 0 2 5 20 5 0 16 0 48 1 17 6 16 6 6 33 13 0 5 16 0 16 6 52 7 0 2 52 6 0 1 33 10 0 20 8 0 16 6 48 1 32 1 0 2 5 20 9 0 48 0 17 6 20 10 0 16 0 16 6 48 2 5 20 5 0 16 0 48 1 17 7 16 7 33 12 0 20 11 0 16 7 16 6 48 2 32 1 0 2 5 20 12 0 16 0 16 2 16 3 48 3 17 7 16 7 1 14 0 52 13 0 2 17 8 16 7 1 15 0 52 13 0 2 17 9 16 7 1 16 0 52 13 0 2 17 10 20 17 0 16 0 20 18 0 48 0 20 19 0 48 3 17 11 20 20 0 48 0 17 12 16 4 33 20 0 51 22 0 1 11 1 4 16 4 52 23 0 1 52 21 0 2 32 1 0 2 5 16 10 33 14 0 16 11 1 25 0 16 10 52 24 0 3 32 1 0 2 5 16 12 33 14 0 16 11 1 26 0 16 12 52 24 0 3 32 1 0 2 5 20 27 0 20 28 0 16 8 48 2 17 13 20 29 0 16 0 48 1 17 14 20 30 0 16 0 48 1 17 15 20 31 0 16 0 48 1 17 16 20 32 0 16 0 1 33 0 48 2 5 20 34 0 16 0 1 35 0 1 36 0 48 3 5 20 37 0 16 0 1 38 0 1 14 0 16 8 1 40 0 16 2 52 39 0 4 48 3 5 20 41 0 1 14 0 16 8 1 40 0 16 2 1 42 0 16 11 1 15 0 16 9 1 43 0 20 44 0 16 6 48 1 1 45 0 20 46 0 16 8 48 1 1 47 0 16 13 52 39 0 14 51 48 0 1 0 1 15 1 16 1 14 1 8 1 1 1 4 1 2 51 49 0 1 0 1 15 1 16 1 14 1 2 1 8 49 3 50)} "handle-fetch-success" {:upvalue-count 0 :arity 6 :constants ("process-response-headers" "get" "css-hash" "_css-hash" "dispatch-trigger-events" "trigger" "process-cache-directives" "redirect" "browser-navigate" "refresh" "browser-reload" "location" "fetch-location" "retarget" "dom-query" "resolve-target" "parse-swap-spec" "reswap" "dom-get-attr" "sx-swap" "dom-has-class?" "dom-body" "sx-transitions" "style" "transition" "content-type" "" "contains?" "text/sx" "handle-sx-response" "handle-html-response" "trigger-swap" "handle-history" "set-timeout" {:upvalue-count 2 :arity 0 :constants ("get" "trigger-settle" "dispatch-trigger-events" "process-settle-hooks") :bytecode (18 0 1 1 0 52 0 0 2 33 19 0 20 2 0 18 1 18 0 1 1 0 52 0 0 2 48 2 32 1 0 2 5 20 3 0 18 1 49 1 50)} 20 "dom-dispatch" "sx:afterSwap" "dict" "target" "swap") :bytecode (20 0 0 16 4 48 1 17 6 16 6 1 2 0 52 1 0 2 17 7 16 7 33 8 0 16 7 21 3 0 32 1 0 2 5 20 4 0 16 0 16 6 1 5 0 52 1 0 2 48 2 5 20 6 0 16 0 16 6 16 5 48 3 5 16 6 1 7 0 52 1 0 2 33 17 0 20 8 0 16 6 1 7 0 52 1 0 2 49 1 32 31 1 16 6 1 9 0 52 1 0 2 33 8 0 20 10 0 49 0 32 11 1 16 6 1 11 0 52 1 0 2 33 17 0 20 12 0 16 6 1 11 0 52 1 0 2 49 1 32 238 0 16 6 1 13 0 52 1 0 2 33 17 0 20 14 0 16 6 1 13 0 52 1 0 2 48 1 32 7 0 20 15 0 16 0 48 1 17 7 20 16 0 16 6 1 17 0 52 1 0 2 6 34 11 0 5 20 18 0 16 0 1 19 0 48 2 20 20 0 20 21 0 48 0 1 22 0 48 2 48 2 17 8 16 8 1 23 0 52 1 0 2 17 9 16 8 1 24 0 52 1 0 2 17 10 16 6 1 25 0 52 1 0 2 6 34 4 0 5 1 26 0 17 11 16 11 1 28 0 52 27 0 2 33 18 0 20 29 0 16 0 16 7 16 5 16 9 16 10 48 5 32 15 0 20 30 0 16 0 16 7 16 5 16 9 16 10 48 5 5 20 4 0 16 0 16 6 1 31 0 52 1 0 2 48 2 5 20 32 0 16 0 16 1 16 6 48 3 5 20 33 0 51 34 0 1 6 1 0 1 35 0 48 2 5 20 36 0 16 0 1 37 0 1 39 0 16 7 1 40 0 16 9 52 38 0 4 49 3 50)} "handle-sx-response" {:upvalue-count 0 :arity 5 :constants ("strip-component-scripts" "extract-response-css" "trim" "not" "empty?" "sx-render" "dom-create-element" "div" "dom-append" "process-oob-swaps" {:upvalue-count 0 :arity 3 :constants ("dispose-islands-in" "swap-dom-nodes" "=" "innerHTML" "children-to-fragment" "post-swap") :bytecode (20 0 0 16 0 48 1 5 20 1 0 16 0 16 2 1 3 0 52 2 0 2 33 10 0 20 4 0 16 1 48 1 32 2 0 16 1 16 2 48 3 5 20 5 0 16 0 49 1 50)} "dom-get-attr" "sx-select" "select-from-container" "children-to-fragment" "dispose-islands-in" "with-transition" {:upvalue-count 3 :arity 0 :constants ("swap-dom-nodes" "post-swap" "=" "outerHTML" "dom-parent") :bytecode (20 0 0 18 0 18 1 18 2 48 3 17 0 20 1 0 18 2 1 3 0 52 2 0 2 33 17 0 20 4 0 16 0 6 34 3 0 5 18 0 48 1 32 9 0 16 0 6 34 3 0 5 18 0 49 1 50)}) :bytecode (20 0 0 16 2 48 1 17 5 20 1 0 16 5 48 1 17 6 16 6 52 2 0 1 17 7 16 7 52 4 0 1 52 3 0 1 33 106 0 20 5 0 16 7 48 1 17 8 20 6 0 1 7 0 2 48 2 17 9 20 8 0 16 9 16 8 48 2 5 20 9 0 16 9 51 10 0 48 2 5 20 11 0 16 0 1 12 0 48 2 17 10 16 10 33 12 0 20 13 0 16 9 16 10 48 2 32 7 0 20 14 0 16 9 48 1 17 11 20 15 0 16 1 48 1 5 20 16 0 16 4 51 17 0 1 1 1 11 1 3 49 2 32 1 0 2 50)} "handle-html-response" {:upvalue-count 0 :arity 5 :constants ("dom-parse-html-document" "dom-get-attr" "sx-select" "dispose-islands-in" "dom-create-element" "div" "dom-set-inner-html" "dom-body-inner-html" "process-oob-swaps" {:upvalue-count 0 :arity 3 :constants ("dispose-islands-in" "swap-dom-nodes" "post-swap") :bytecode (20 0 0 16 0 48 1 5 20 1 0 16 0 16 1 16 2 48 3 5 20 2 0 16 0 49 1 50)} "hoist-head-elements" "select-from-container" "with-transition" {:upvalue-count 3 :arity 0 :constants ("swap-dom-nodes" "log-info" "str" "swap-root: " "dom-tag-name" "nil" " target: " "post-swap") :bytecode (20 0 0 18 0 18 1 18 2 48 3 17 0 20 1 0 1 3 0 16 0 33 10 0 20 4 0 16 0 48 1 32 3 0 1 5 0 1 6 0 20 4 0 18 0 48 1 52 2 0 4 48 1 5 20 7 0 16 0 6 34 3 0 5 18 0 49 1 50)} {:upvalue-count 3 :arity 0 :constants ("swap-dom-nodes" "children-to-fragment" "post-swap") :bytecode (20 0 0 18 0 20 1 0 18 1 48 1 18 2 48 3 5 20 2 0 18 0 49 1 50)}) :bytecode (20 0 0 16 2 48 1 17 5 16 5 33 164 0 20 1 0 16 0 1 2 0 48 2 17 6 20 3 0 16 1 48 1 5 16 6 33 75 0 20 4 0 1 5 0 2 48 2 17 7 20 6 0 16 7 20 7 0 16 5 48 1 48 2 5 20 8 0 16 7 51 9 0 48 2 5 20 10 0 16 7 48 1 5 20 11 0 16 7 16 6 48 2 17 8 20 12 0 16 4 51 13 0 1 1 1 8 1 3 49 2 32 61 0 20 4 0 1 5 0 2 48 2 17 7 20 6 0 16 7 20 7 0 16 5 48 1 48 2 5 20 8 0 16 7 51 9 0 48 2 5 20 10 0 16 7 48 1 5 20 12 0 16 4 51 14 0 1 1 1 7 1 3 49 2 32 1 0 2 50)} "handle-retry" {:upvalue-count 0 :arity 5 :constants ("dom-get-attr" "sx-retry" "parse-retry-spec" "data-sx-retry-ms" "get" "start-ms" "parse-int" "dom-set-attr" "str" "next-retry-ms" "cap-ms" "set-timeout" {:upvalue-count 5 :arity 0 :constants ("do-fetch") :bytecode (20 0 0 18 0 18 1 18 2 18 3 18 4 49 5 50)}) :bytecode (20 0 0 16 0 1 1 0 48 2 17 5 20 2 0 16 5 48 1 17 6 16 6 33 97 0 20 0 0 16 0 1 3 0 48 2 6 34 10 0 5 16 6 1 5 0 52 4 0 2 17 7 16 7 16 6 1 5 0 52 4 0 2 52 6 0 2 17 8 20 7 0 16 0 1 3 0 20 9 0 16 8 16 6 1 10 0 52 4 0 2 48 2 52 8 0 1 48 3 5 20 11 0 51 12 0 1 0 1 1 1 2 1 3 1 4 16 8 49 2 32 1 0 2 50)} "bind-triggers" {:upvalue-count 0 :arity 2 :constants ("parse-trigger-spec" "dom-get-attr" "sx-trigger" "default-trigger" "dom-tag-name" "for-each" {:upvalue-count 2 :arity 1 :constants ("classify-trigger" "get" "modifiers" "=" "poll" "set-interval" {:upvalue-count 2 :arity 0 :constants ("host-get" "isConnected" "execute-request" "clear-interval" "log-info" "poll stopped: element removed") :bytecode (20 0 0 18 0 1 1 0 48 2 33 12 0 20 2 0 18 0 2 2 49 3 32 16 0 20 3 0 18 1 48 1 5 20 4 0 1 5 0 49 1 50)} "interval" "intersect" "observe-intersection" {:upvalue-count 1 :arity 0 :constants ("execute-request") :bytecode (20 0 0 18 0 2 2 49 3 50)} "delay" "load" "set-timeout" 0 "revealed" "event" "bind-event") :bytecode (20 0 0 16 0 48 1 17 1 16 0 1 2 0 52 1 0 2 17 2 16 1 1 4 0 52 3 0 2 33 29 0 2 17 3 20 5 0 51 6 0 0 0 1 3 16 2 1 7 0 52 1 0 2 48 2 17 3 32 152 0 16 1 1 8 0 52 3 0 2 33 25 0 20 9 0 18 0 51 10 0 0 0 4 16 2 1 11 0 52 1 0 2 49 4 32 115 0 16 1 1 12 0 52 3 0 2 33 30 0 20 13 0 51 10 0 0 0 16 2 1 11 0 52 1 0 2 6 34 4 0 5 1 14 0 49 2 32 73 0 16 1 1 15 0 52 3 0 2 33 25 0 20 9 0 18 0 51 10 0 0 0 3 16 2 1 11 0 52 1 0 2 49 4 32 36 0 16 1 1 16 0 52 3 0 2 33 23 0 20 17 0 18 0 16 0 1 16 0 52 1 0 2 16 2 18 1 49 4 32 1 0 2 50)}) :bytecode (20 0 0 20 1 0 16 0 1 2 0 48 2 48 1 6 34 13 0 5 20 3 0 20 4 0 16 0 48 1 48 1 17 2 51 6 0 1 0 1 1 16 2 52 5 0 2 50)} "bind-event" {:upvalue-count 0 :arity 4 :constants ("get" "from" "dom-query" "dom-add-listener" {:upvalue-count 5 :arity 1 :constants ("get" "changed" "dom-value" "=" "not" "click" "event-modifier-key?" "submit" "dom-has-attr?" "href" "prevent-default" "get-verb-info" "method" "GET" "delay" "try-client-route" "url-pathname" "url" "dom-get-attr" "sx-target" "browser-push-state" "browser-scroll-to" 0 "log-info" "str" "sx:route server fetch " "clear-timeout" "set-timeout" {:upvalue-count 1 :arity 0 :constants ("execute-request") :bytecode (20 0 0 18 0 2 2 49 3 50)} "execute-request") :bytecode (3 17 1 18 0 1 1 0 52 0 0 2 33 33 0 20 2 0 18 1 48 1 17 2 16 2 18 2 52 3 0 2 33 6 0 4 17 1 32 4 0 16 2 19 2 32 1 0 2 5 16 1 6 33 26 0 5 18 3 1 5 0 52 3 0 2 6 33 8 0 5 20 6 0 16 0 48 1 52 4 0 1 33 36 1 18 3 1 7 0 52 3 0 2 6 34 25 0 5 18 3 1 5 0 52 3 0 2 6 33 11 0 5 20 8 0 18 1 1 9 0 48 2 33 10 0 20 10 0 16 0 48 1 32 1 0 2 5 20 11 0 18 1 48 1 17 2 18 3 1 5 0 52 3 0 2 6 33 50 0 5 16 2 1 12 0 52 0 0 2 1 13 0 52 3 0 2 6 33 29 0 5 20 8 0 18 1 1 9 0 48 2 6 33 14 0 5 18 0 1 14 0 52 0 0 2 52 4 0 1 17 3 4 17 4 16 3 33 34 0 20 15 0 20 16 0 16 2 1 17 0 52 0 0 2 48 1 20 18 0 18 1 1 19 0 48 2 48 2 17 4 32 1 0 2 5 16 4 33 29 0 20 20 0 16 2 1 17 0 52 0 0 2 48 1 5 20 21 0 1 22 0 1 22 0 49 2 32 84 0 16 3 33 24 0 20 23 0 1 25 0 16 2 1 17 0 52 0 0 2 52 24 0 2 48 1 32 1 0 2 5 18 0 1 14 0 52 0 0 2 33 32 0 20 26 0 18 4 48 1 5 20 27 0 51 28 0 0 1 18 0 1 14 0 52 0 0 2 48 2 19 4 32 9 0 20 29 0 18 1 2 2 49 3 32 1 0 2 50)} "once" "dict") :bytecode (2 17 4 2 17 5 16 2 1 1 0 52 0 0 2 33 17 0 20 2 0 16 2 1 1 0 52 0 0 2 48 1 32 2 0 16 0 17 6 16 6 33 49 0 20 3 0 16 6 16 1 51 4 0 1 2 1 0 1 5 1 1 1 4 16 2 1 5 0 52 0 0 2 33 11 0 1 5 0 3 52 6 0 2 32 1 0 2 49 4 32 1 0 2 50)} "post-swap" {:upvalue-count 0 :arity 1 :constants ("log-info" "str" "post-swap: root=" "dom-tag-name" "nil" "activate-scripts" "sx-process-scripts" "sx-hydrate" "sx-hydrate-islands" "run-post-render-hooks" "process-elements") :bytecode (20 0 0 1 2 0 16 0 33 10 0 20 3 0 16 0 48 1 32 3 0 1 4 0 52 1 0 2 48 1 5 20 5 0 16 0 48 1 5 20 6 0 16 0 48 1 5 20 7 0 16 0 48 1 5 20 8 0 16 0 48 1 5 20 9 0 48 0 5 20 10 0 16 0 49 1 50)} "process-settle-hooks" {:upvalue-count 0 :arity 1 :constants ("dom-get-attr" "sx-on-settle" "not" "empty?" "sx-parse" "for-each" {:upvalue-count 0 :arity 1 :constants ("eval-expr" "env-extend" "dict") :bytecode (20 0 0 16 0 20 1 0 52 2 0 0 48 1 49 2 50)}) :bytecode (20 0 0 16 0 1 1 0 48 2 17 1 16 1 6 33 11 0 5 16 1 52 3 0 1 52 2 0 1 33 21 0 20 4 0 16 1 48 1 17 2 51 6 0 16 2 52 5 0 2 32 1 0 2 50)} "activate-scripts" {:upvalue-count 0 :arity 1 :constants ("dom-query-all" "script" "for-each" {:upvalue-count 0 :arity 1 :constants ("not" "dom-has-attr?" "data-components" "data-sx-activated" "create-script-clone" "dom-set-attr" "true" "dom-replace-child" "dom-parent") :bytecode (20 1 0 16 0 1 2 0 48 2 52 0 0 1 6 33 15 0 5 20 1 0 16 0 1 3 0 48 2 52 0 0 1 33 42 0 20 4 0 16 0 48 1 17 1 20 5 0 16 1 1 3 0 1 6 0 48 3 5 20 7 0 20 8 0 16 0 48 1 16 1 16 0 49 3 32 1 0 2 50)}) :bytecode (16 0 33 24 0 20 0 0 16 0 1 1 0 48 2 17 1 51 3 0 16 1 52 2 0 2 32 1 0 2 50)} "process-oob-swaps" {:upvalue-count 0 :arity 2 :constants ("find-oob-swaps" "for-each" {:upvalue-count 1 :arity 1 :constants ("get" "target-id" "dom-query-by-id" "element" "swap-type" "dom-parent" "dom-remove-child") :bytecode (16 0 1 1 0 52 0 0 2 17 1 20 2 0 16 1 48 1 17 2 16 0 1 3 0 52 0 0 2 17 3 16 0 1 4 0 52 0 0 2 17 4 20 5 0 16 3 48 1 33 17 0 20 6 0 20 5 0 16 3 48 1 16 3 48 2 32 1 0 2 5 16 2 33 13 0 18 0 16 2 16 3 16 4 49 3 32 1 0 2 50)}) :bytecode (20 0 0 16 0 48 1 17 2 51 2 0 1 1 16 2 52 1 0 2 50)} "hoist-head-elements" {:upvalue-count 0 :arity 1 :constants ("for-each" {:upvalue-count 0 :arity 1 :constants ("dom-parent" "dom-remove-child" "dom-append-to-head") :bytecode (20 0 0 16 0 48 1 33 17 0 20 1 0 20 0 0 16 0 48 1 16 0 48 2 32 1 0 2 5 20 2 0 16 0 49 1 50)} "dom-query-all" "style[data-sx-css]" "link[rel=\"stylesheet\"]") :bytecode (51 1 0 20 2 0 16 0 1 3 0 48 2 52 0 0 2 5 51 1 0 20 2 0 16 0 1 4 0 48 2 52 0 0 2 50)} "process-boosted" {:upvalue-count 0 :arity 1 :constants ("for-each" {:upvalue-count 0 :arity 1 :constants ("boost-descendants") :bytecode (20 0 0 16 0 49 1 50)} "dom-query-all" "dom-body" "[sx-boost]") :bytecode (51 1 0 20 2 0 16 0 6 34 6 0 5 20 3 0 48 0 1 4 0 48 2 52 0 0 2 50)} "boost-descendants" {:upvalue-count 0 :arity 1 :constants ("dom-get-attr" "sx-boost" "for-each" {:upvalue-count 1 :arity 1 :constants ("not" "is-processed?" "boost" "should-boost-link?" "mark-processed!" "dom-has-attr?" "sx-target" "=" "true" "dom-set-attr" "sx-swap" "innerHTML" "sx-push-url" "bind-client-route-link" "dom-get-attr" "href") :bytecode (20 1 0 16 0 1 2 0 48 2 52 0 0 1 6 33 8 0 5 20 3 0 16 0 48 1 33 160 0 20 4 0 16 0 1 2 0 48 2 5 20 5 0 16 0 1 6 0 48 2 52 0 0 1 6 33 21 0 5 18 0 6 33 14 0 5 18 0 1 8 0 52 7 0 2 52 0 0 1 33 15 0 20 9 0 16 0 1 6 0 18 0 48 3 32 1 0 2 5 20 5 0 16 0 1 10 0 48 2 52 0 0 1 33 16 0 20 9 0 16 0 1 10 0 1 11 0 48 3 32 1 0 2 5 20 5 0 16 0 1 12 0 48 2 52 0 0 1 33 16 0 20 9 0 16 0 1 12 0 1 8 0 48 3 32 1 0 2 5 20 13 0 16 0 20 14 0 16 0 1 15 0 48 2 49 2 32 1 0 2 50)} "dom-query-all" "a[href]" {:upvalue-count 1 :arity 1 :constants ("not" "is-processed?" "boost" "should-boost-form?" "mark-processed!" "upper" "dom-get-attr" "method" "GET" "action" "browser-location-href" "dom-has-attr?" "sx-target" "=" "true" "dom-set-attr" "sx-swap" "innerHTML" "bind-boost-form") :bytecode (20 1 0 16 0 1 2 0 48 2 52 0 0 1 6 33 8 0 5 20 3 0 16 0 48 1 33 165 0 20 4 0 16 0 1 2 0 48 2 5 20 6 0 16 0 1 7 0 48 2 6 34 4 0 5 1 8 0 52 5 0 1 17 1 20 6 0 16 0 1 9 0 48 2 6 34 6 0 5 20 10 0 48 0 17 2 20 11 0 16 0 1 12 0 48 2 52 0 0 1 6 33 21 0 5 18 0 6 33 14 0 5 18 0 1 14 0 52 13 0 2 52 0 0 1 33 15 0 20 15 0 16 0 1 12 0 18 0 48 3 32 1 0 2 5 20 11 0 16 0 1 16 0 48 2 52 0 0 1 33 16 0 20 15 0 16 0 1 16 0 1 17 0 48 3 32 1 0 2 5 20 18 0 16 0 16 1 16 2 49 3 32 1 0 2 50)} "form") :bytecode (20 0 0 16 0 1 1 0 48 2 17 1 51 3 0 1 1 20 4 0 16 0 1 5 0 48 2 52 2 0 2 5 51 6 0 1 1 20 4 0 16 0 1 7 0 48 2 52 2 0 2 50)} "_page-data-cache" "_page-data-cache-ttl" 30000 "page-data-cache-key" {:upvalue-count 0 :arity 2 :constants ("nil?" "empty?" "keys" "list" "for-each" {:upvalue-count 2 :arity 1 :constants ("append!" "str" "=" "get") :bytecode (20 0 0 18 0 16 0 1 2 0 18 1 16 0 52 3 0 2 52 1 0 3 49 2 50)} "str" ":" "join" "&") :bytecode (16 0 17 2 16 1 52 0 0 1 6 34 11 0 5 16 1 52 2 0 1 52 1 0 1 33 5 0 16 2 32 42 0 52 3 0 0 17 3 51 5 0 1 3 1 1 16 1 52 2 0 1 52 4 0 2 5 16 2 1 7 0 1 9 0 16 3 52 8 0 2 52 6 0 3 50)} "page-data-cache-get" {:upvalue-count 0 :arity 1 :constants ("get" "_page-data-cache" "nil?" ">" "-" "now-ms" "ts" "_page-data-cache-ttl" "dict-set!" "data") :bytecode (20 1 0 16 0 52 0 0 2 17 1 16 1 52 2 0 1 33 4 0 2 32 52 0 20 5 0 48 0 16 1 1 6 0 52 0 0 2 52 4 0 2 20 7 0 52 3 0 2 33 15 0 20 1 0 16 0 2 52 8 0 3 5 2 32 9 0 16 1 1 9 0 52 0 0 2 50)} "page-data-cache-set" {:upvalue-count 0 :arity 2 :constants ("dict-set!" "_page-data-cache" "data" "ts" "now-ms") :bytecode (20 1 0 16 0 1 2 0 16 1 1 3 0 20 4 0 48 0 65 2 0 52 0 0 3 50)} "invalidate-page-cache" {:upvalue-count 0 :arity 1 :constants ("for-each" {:upvalue-count 1 :arity 1 :constants ("=" "starts-with?" "str" ":" "dict-set!" "_page-data-cache") :bytecode (16 0 18 0 52 0 0 2 6 34 16 0 5 16 0 18 0 1 3 0 52 2 0 2 52 1 0 2 33 13 0 20 5 0 16 0 2 52 4 0 3 32 1 0 2 50)} "keys" "_page-data-cache" "sw-post-message" "type" "invalidate" "page" "log-info" "str" "sx:cache invalidate ") :bytecode (51 1 0 1 0 20 3 0 52 2 0 1 52 0 0 2 5 20 4 0 1 5 0 1 6 0 1 7 0 16 0 65 2 0 48 1 5 20 8 0 1 10 0 16 0 52 9 0 2 49 1 50)} "invalidate-all-page-cache" {:upvalue-count 0 :arity 0 :constants ("dict" "_page-data-cache" "sw-post-message" "type" "invalidate" "page" "*" "log-info" "sx:cache invalidate *") :bytecode (52 0 0 0 21 1 0 5 20 2 0 1 3 0 1 4 0 1 5 0 1 6 0 65 2 0 48 1 5 20 7 0 1 8 0 49 1 50)} "update-page-cache" {:upvalue-count 0 :arity 2 :constants ("page-data-cache-key" "dict" "page-data-cache-set" "log-info" "str" "sx:cache update ") :bytecode (20 0 0 16 0 52 1 0 0 48 2 17 2 20 2 0 16 2 16 1 48 2 5 20 3 0 1 5 0 16 0 52 4 0 2 49 1 50)} "process-cache-directives" {:upvalue-count 0 :arity 3 :constants ("dom-get-attr" "sx-cache-invalidate" "=" "*" "invalidate-all-page-cache" "invalidate-page-cache" "get" "cache-invalidate" "cache-update" "parse-sx-data" "update-page-cache") :bytecode (20 0 0 16 0 1 1 0 48 2 17 3 16 3 33 30 0 16 3 1 3 0 52 2 0 2 33 8 0 20 4 0 48 0 32 7 0 20 5 0 16 3 48 1 32 1 0 2 5 16 1 1 7 0 52 6 0 2 17 3 16 3 33 30 0 16 3 1 3 0 52 2 0 2 33 8 0 20 4 0 48 0 32 7 0 20 5 0 16 3 48 1 32 1 0 2 5 16 1 1 8 0 52 6 0 2 17 3 16 3 33 30 0 20 9 0 16 2 48 1 17 4 16 4 33 12 0 20 10 0 16 3 16 4 49 2 32 1 0 2 32 1 0 2 50)} "_optimistic-snapshots" "optimistic-cache-update" {:upvalue-count 0 :arity 2 :constants ("page-data-cache-get" "dict-set!" "_optimistic-snapshots" "page-data-cache-set") :bytecode (20 0 0 16 0 48 1 17 2 16 2 33 35 0 16 1 16 2 48 1 17 3 20 2 0 16 0 16 2 52 1 0 3 5 20 3 0 16 0 16 3 48 2 5 16 3 32 1 0 2 50)} "optimistic-cache-revert" {:upvalue-count 0 :arity 1 :constants ("get" "_optimistic-snapshots" "page-data-cache-set" "dict-delete!") :bytecode (20 1 0 16 0 52 0 0 2 17 1 16 1 33 25 0 20 2 0 16 0 16 1 48 2 5 20 1 0 16 0 52 3 0 2 5 16 1 32 1 0 2 50)} "optimistic-cache-confirm" {:upvalue-count 0 :arity 1 :constants ("dict-delete!" "_optimistic-snapshots") :bytecode (20 1 0 16 0 52 0 0 2 50)} "submit-mutation" {:upvalue-count 0 :arity 6 :constants ("page-data-cache-key" "optimistic-cache-update" "try-rerender-page" "execute-action" {:upvalue-count 4 :arity 1 :constants ("page-data-cache-set" "optimistic-cache-confirm" "try-rerender-page" "log-info" "str" "sx:optimistic confirmed " "confirmed") :bytecode (16 0 33 12 0 20 0 0 18 0 16 0 48 2 32 1 0 2 5 20 1 0 18 0 48 1 5 16 0 33 14 0 20 2 0 18 1 18 2 16 0 48 3 32 1 0 2 5 20 3 0 1 5 0 18 1 52 4 0 2 48 1 5 18 3 33 10 0 18 3 1 6 0 49 1 32 1 0 2 50)} {:upvalue-count 4 :arity 1 :constants ("optimistic-cache-revert" "try-rerender-page" "log-warn" "str" "sx:optimistic reverted " ": " "reverted") :bytecode (20 0 0 18 0 48 1 17 1 16 1 33 14 0 20 1 0 18 1 18 2 16 1 48 3 32 1 0 2 5 20 2 0 1 4 0 18 1 1 5 0 16 0 52 3 0 4 48 1 5 18 3 33 10 0 18 3 1 6 0 49 1 32 1 0 2 50)}) :bytecode (20 0 0 16 0 16 1 48 2 17 6 20 1 0 16 6 16 4 48 2 17 7 16 7 33 14 0 20 2 0 16 0 16 1 16 7 48 3 32 1 0 2 5 20 3 0 16 2 16 3 51 4 0 1 6 1 0 1 1 1 5 51 5 0 1 6 1 0 1 1 1 5 49 4 50)} "_is-online" "_offline-queue" "list" "offline-is-online?" {:upvalue-count 0 :arity 0 :constants ("_is-online") :bytecode (20 0 0 50)} "offline-set-online!" {:upvalue-count 0 :arity 1 :constants ("_is-online") :bytecode (16 0 21 0 0 50)} "offline-queue-mutation" {:upvalue-count 0 :arity 5 :constants ("page-data-cache-key" "dict" "action" "payload" "page" "params" "timestamp" "now-ms" "status" "pending" "append!" "_offline-queue" "optimistic-cache-update" "try-rerender-page" "log-info" "str" "sx:offline queued " " (" "len" " pending)") :bytecode (20 0 0 16 2 16 3 48 2 17 5 1 2 0 16 0 1 3 0 16 1 1 4 0 16 2 1 5 0 16 3 1 6 0 20 7 0 48 0 1 8 0 1 9 0 52 1 0 12 17 6 20 10 0 20 11 0 16 6 48 2 5 20 12 0 16 5 16 4 48 2 17 7 16 7 33 14 0 20 13 0 16 2 16 3 16 7 48 3 32 1 0 2 5 20 14 0 1 16 0 16 0 1 17 0 20 11 0 52 18 0 1 1 19 0 52 15 0 5 48 1 5 16 6 50)} "offline-sync" {:upvalue-count 0 :arity 0 :constants ("filter" {:upvalue-count 0 :arity 1 :constants ("=" "get" "status" "pending") :bytecode (16 0 1 2 0 52 1 0 2 1 3 0 52 0 0 2 50)} "_offline-queue" "not" "empty?" "log-info" "str" "sx:offline syncing " "len" " mutations" "for-each" {:upvalue-count 0 :arity 1 :constants ("execute-action" "get" "action" "payload" {:upvalue-count 1 :arity 1 :constants ("dict-set!" "status" "synced" "log-info" "str" "sx:offline synced " "get" "action") :bytecode (18 0 1 1 0 1 2 0 52 0 0 3 5 20 3 0 1 5 0 18 0 1 7 0 52 6 0 2 52 4 0 2 49 1 50)} {:upvalue-count 1 :arity 1 :constants ("dict-set!" "status" "failed" "log-warn" "str" "sx:offline sync failed " "get" "action" ": ") :bytecode (18 0 1 1 0 1 2 0 52 0 0 3 5 20 3 0 1 5 0 18 0 1 7 0 52 6 0 2 1 8 0 16 0 52 4 0 4 49 1 50)}) :bytecode (20 0 0 16 0 1 2 0 52 1 0 2 16 0 1 3 0 52 1 0 2 51 4 0 1 0 51 5 0 1 0 49 4 50)}) :bytecode (51 1 0 20 2 0 52 0 0 2 17 0 16 0 52 4 0 1 52 3 0 1 33 34 0 20 5 0 1 7 0 16 0 52 8 0 1 1 9 0 52 6 0 3 48 1 5 51 11 0 16 0 52 10 0 2 32 1 0 2 50)} "offline-pending-count" {:upvalue-count 0 :arity 0 :constants ("len" "filter" {:upvalue-count 0 :arity 1 :constants ("=" "get" "status" "pending") :bytecode (16 0 1 2 0 52 1 0 2 1 3 0 52 0 0 2 50)} "_offline-queue") :bytecode (51 2 0 20 3 0 52 1 0 2 52 0 0 1 50)} "offline-aware-mutation" {:upvalue-count 0 :arity 6 :constants ("_is-online" "submit-mutation" "offline-queue-mutation" "queued") :bytecode (20 0 0 33 20 0 20 1 0 16 0 16 1 16 2 16 3 16 4 16 5 49 6 32 32 0 20 2 0 16 2 16 3 16 0 16 1 16 4 48 5 5 16 5 33 10 0 16 5 1 3 0 49 1 32 1 0 2 50)} "current-page-layout" {:upvalue-count 0 :arity 0 :constants ("url-pathname" "browser-location-href" "find-matching-route" "_page-routes" "nil?" "" "get" "layout") :bytecode (20 0 0 20 1 0 48 0 48 1 17 0 20 2 0 16 0 20 3 0 48 2 17 1 16 1 52 4 0 1 33 6 0 1 5 0 32 17 0 16 1 1 7 0 52 6 0 2 6 34 4 0 5 1 5 0 50)} "swap-rendered-content" {:upvalue-count 0 :arity 3 :constants ("dom-create-element" "div" "dom-append" "process-oob-swaps" {:upvalue-count 0 :arity 3 :constants ("dispose-islands-in" "swap-dom-nodes" "=" "innerHTML" "children-to-fragment" "post-swap") :bytecode (20 0 0 16 0 48 1 5 20 1 0 16 0 16 2 1 3 0 52 2 0 2 33 10 0 20 4 0 16 1 48 1 32 2 0 16 1 16 2 48 3 5 20 5 0 16 0 49 1 50)} "dom-get-attr" "id" "dom-query" "str" "#" "children-to-fragment" "dispose-islands-in" "dom-set-text-content" "" "hoist-head-elements-full" "process-elements" "sx-hydrate-elements" "sx-hydrate-islands" "run-post-render-hooks" "dom-dispatch" "sx:clientRoute" "dict" "pathname" "log-info" "sx:route client ") :bytecode (20 0 0 1 1 0 2 48 2 17 3 20 2 0 16 3 16 1 48 2 5 20 3 0 16 3 51 4 0 48 2 5 20 5 0 16 0 1 6 0 48 2 17 4 16 4 33 19 0 20 7 0 16 3 1 9 0 16 4 52 8 0 2 48 2 32 1 0 2 17 5 16 5 33 10 0 20 10 0 16 5 48 1 32 7 0 20 10 0 16 3 48 1 17 6 20 11 0 16 0 48 1 5 20 12 0 16 0 1 13 0 48 2 5 20 2 0 16 0 16 6 48 2 5 20 14 0 16 0 48 1 5 20 15 0 16 0 48 1 5 20 16 0 16 0 48 1 5 20 17 0 16 0 48 1 5 20 18 0 48 0 5 20 19 0 16 0 1 20 0 1 22 0 16 2 52 21 0 2 48 3 5 20 23 0 1 24 0 16 2 52 8 0 2 49 1 50)} "resolve-route-target" {:upvalue-count 0 :arity 1 :constants ("not" "=" "true" "dom-query") :bytecode (16 0 6 33 14 0 5 16 0 1 2 0 52 1 0 2 52 0 0 1 33 10 0 20 3 0 16 0 49 1 32 1 0 2 50)} "deps-satisfied?" {:upvalue-count 0 :arity 1 :constants ("get" "deps" "loaded-component-names" "nil?" "empty?" "every?" {:upvalue-count 1 :arity 1 :constants ("contains?") :bytecode (18 0 16 0 52 0 0 2 50)}) :bytecode (16 0 1 1 0 52 0 0 2 17 1 20 2 0 48 0 17 2 16 1 52 3 0 1 6 34 7 0 5 16 1 52 4 0 1 33 4 0 3 32 11 0 51 6 0 1 2 16 1 52 5 0 2 50)} "try-client-route" {:upvalue-count 0 :arity 2 :constants ("find-matching-route" "_page-routes" "nil?" "log-info" "str" "sx:route no match (" "len" " routes) " "get" "layout" "" "current-page-layout" "not" "=" "sx:route server (layout: " " -> " ") " "content" "closure" "params" "name" "empty?" "log-warn" "sx:route no content for " "resolve-route-target" "sx:route target not found: " "deps-satisfied?" "sx:route deps miss for " "io-deps" "render-plan" "server" "list" "client" "sx:route plan " " — " " server, " " client" "register-io-deps" "stream" "sx:route streaming " "fetch-streaming" "build-request-headers" "loaded-component-names" "_css-hash" "has-data" "page-data-cache-key" "page-data-cache-get" "merge" "sx:route client+cache+async " "try-async-eval-content" {:upvalue-count 2 :arity 1 :constants ("nil?" "log-warn" "str" "sx:route cache+async eval failed for " " — server fallback" "fetch-and-restore" "build-request-headers" "loaded-component-names" "_css-hash" 0 "swap-rendered-content") :bytecode (16 0 52 0 0 1 33 48 0 20 1 0 1 3 0 18 0 1 4 0 52 2 0 3 48 1 5 20 5 0 18 1 18 0 20 6 0 18 1 20 7 0 48 0 20 8 0 48 3 1 9 0 49 4 32 11 0 20 10 0 18 1 16 0 18 0 49 3 50)} "try-eval-content" "sx:route cached eval failed for " "sx:route client+cache " "swap-rendered-content" "sx:route client+data " "resolve-page-data" {:upvalue-count 7 :arity 1 :constants ("page-data-cache-set" "merge" "try-async-eval-content" {:upvalue-count 2 :arity 1 :constants ("nil?" "log-warn" "str" "sx:route data+async eval failed for " " — server fallback" "fetch-and-restore" "build-request-headers" "loaded-component-names" "_css-hash" 0 "swap-rendered-content") :bytecode (16 0 52 0 0 1 33 48 0 20 1 0 1 3 0 18 0 1 4 0 52 2 0 3 48 1 5 20 5 0 18 1 18 0 20 6 0 18 1 20 7 0 48 0 20 8 0 48 3 1 9 0 49 4 32 11 0 20 10 0 18 1 16 0 18 0 49 3 50)} "try-eval-content" "nil?" "log-warn" "str" "sx:route data eval failed for " " — server fallback" "fetch-and-restore" "build-request-headers" "loaded-component-names" "_css-hash" 0 "swap-rendered-content") :bytecode (20 0 0 18 0 16 0 48 2 5 18 1 18 2 16 0 52 1 0 3 17 1 18 3 33 19 0 20 2 0 18 4 16 1 51 3 0 0 5 0 6 49 3 32 79 0 20 4 0 18 4 16 1 48 2 17 2 16 2 52 5 0 1 33 48 0 20 6 0 1 8 0 18 5 1 9 0 52 7 0 3 48 1 5 20 10 0 18 6 18 5 20 11 0 18 6 20 12 0 48 0 20 13 0 48 3 1 14 0 49 4 32 11 0 20 15 0 18 6 16 2 18 5 49 3 50)} "sx:route client+async " {:upvalue-count 2 :arity 1 :constants ("nil?" "log-warn" "str" "sx:route async eval failed for " " — server fallback" "fetch-and-restore" "build-request-headers" "loaded-component-names" "_css-hash" 0 "swap-rendered-content") :bytecode (16 0 52 0 0 1 33 48 0 20 1 0 1 3 0 18 0 1 4 0 52 2 0 3 48 1 5 20 5 0 18 1 18 0 20 6 0 18 1 20 7 0 48 0 20 8 0 48 3 1 9 0 49 4 32 11 0 20 10 0 18 1 16 0 18 0 49 3 50)} "sx:route server (eval failed) ") :bytecode (20 0 0 16 0 20 1 0 48 2 17 2 16 2 52 2 0 1 33 29 0 20 3 0 1 5 0 20 1 0 52 6 0 1 1 7 0 16 0 52 4 0 4 48 1 5 4 32 233 2 16 2 1 9 0 52 8 0 2 6 34 4 0 5 1 10 0 17 3 20 11 0 48 0 17 4 16 3 16 4 52 13 0 2 52 12 0 1 33 29 0 20 3 0 1 14 0 16 4 1 15 0 16 3 1 16 0 16 0 52 4 0 6 48 1 5 4 32 163 2 16 2 1 17 0 52 8 0 2 17 5 16 2 1 18 0 52 8 0 2 6 34 4 0 5 65 0 0 17 6 16 2 1 19 0 52 8 0 2 17 7 16 2 1 20 0 52 8 0 2 17 8 16 5 52 2 0 1 6 34 7 0 5 16 5 52 21 0 1 33 19 0 20 22 0 1 23 0 16 0 52 4 0 2 48 1 5 4 32 72 2 20 24 0 16 1 48 1 17 9 16 9 52 2 0 1 33 19 0 20 22 0 1 25 0 16 1 52 4 0 2 48 1 5 4 32 35 2 20 26 0 16 2 48 1 52 12 0 1 33 19 0 20 3 0 1 27 0 16 8 52 4 0 2 48 1 5 4 32 2 2 16 2 1 28 0 52 8 0 2 17 10 16 10 6 33 11 0 5 16 10 52 21 0 1 52 12 0 1 17 11 16 2 1 29 0 52 8 0 2 17 12 16 12 33 78 0 16 12 1 30 0 52 8 0 2 6 34 5 0 5 52 31 0 0 17 13 16 12 1 32 0 52 8 0 2 6 34 5 0 5 52 31 0 0 17 14 20 3 0 1 33 0 16 8 1 34 0 16 13 52 6 0 1 1 35 0 16 14 52 6 0 1 1 36 0 52 4 0 7 48 1 32 1 0 2 5 16 11 33 10 0 20 37 0 16 10 48 1 32 1 0 2 5 16 2 1 38 0 52 8 0 2 33 44 0 20 3 0 1 39 0 16 0 52 4 0 2 48 1 5 20 40 0 16 9 16 0 20 41 0 16 9 20 42 0 48 0 20 43 0 48 3 48 3 5 3 32 59 1 16 2 1 44 0 52 8 0 2 33 194 0 20 45 0 16 8 16 7 48 2 17 13 20 46 0 16 13 48 1 17 14 16 14 33 123 0 16 6 16 7 16 14 52 47 0 3 17 15 16 11 33 36 0 20 3 0 1 48 0 16 0 52 4 0 2 48 1 5 20 49 0 16 5 16 15 51 50 0 1 0 1 9 48 3 5 3 32 67 0 20 51 0 16 5 16 15 48 2 17 16 16 16 52 2 0 1 33 19 0 20 22 0 1 52 0 16 0 52 4 0 2 48 1 5 4 32 28 0 20 3 0 1 53 0 16 0 52 4 0 2 48 1 5 20 54 0 16 9 16 16 16 0 48 3 5 3 32 43 0 20 3 0 1 55 0 16 0 52 4 0 2 48 1 5 20 56 0 16 8 16 7 51 57 0 1 13 1 6 1 7 1 11 1 5 1 0 1 9 48 3 5 3 32 109 0 16 11 33 42 0 20 3 0 1 58 0 16 0 52 4 0 2 48 1 5 20 49 0 16 5 16 6 16 7 52 47 0 2 51 59 0 1 0 1 9 48 3 5 3 32 62 0 16 6 16 7 52 47 0 2 17 13 20 51 0 16 5 16 13 48 2 17 14 16 14 52 2 0 1 33 19 0 20 3 0 1 60 0 16 0 52 4 0 2 48 1 5 4 32 13 0 20 54 0 16 9 16 14 16 0 48 3 5 3 50)} "bind-client-route-link" {:upvalue-count 0 :arity 2 :constants ("bind-client-route-click" {:upvalue-count 2 :arity 0 :constants ("bind-boost-link") :bytecode (20 0 0 18 0 18 1 49 2 50)}) :bytecode (20 0 0 16 0 16 1 51 1 0 1 0 1 1 49 3 50)} "process-sse" {:upvalue-count 0 :arity 1 :constants ("for-each" {:upvalue-count 0 :arity 1 :constants ("not" "is-processed?" "sse" "mark-processed!" "bind-sse") :bytecode (20 1 0 16 0 1 2 0 48 2 52 0 0 1 33 21 0 20 3 0 16 0 1 2 0 48 2 5 20 4 0 16 0 49 1 32 1 0 2 50)} "dom-query-all" "dom-body" "[sx-sse]") :bytecode (51 1 0 20 2 0 16 0 6 34 6 0 5 20 3 0 48 0 1 4 0 48 2 52 0 0 2 50)} "bind-sse" {:upvalue-count 0 :arity 1 :constants ("dom-get-attr" "sx-sse" "event-source-connect" "parse-sse-swap" "event-source-listen" {:upvalue-count 1 :arity 1 :constants ("bind-sse-swap") :bytecode (20 0 0 18 0 16 0 49 2 50)}) :bytecode (20 0 0 16 0 1 1 0 48 2 17 1 16 1 33 37 0 20 2 0 16 1 16 0 48 2 17 2 20 3 0 16 0 48 1 17 3 20 4 0 16 2 16 3 51 5 0 1 0 49 3 32 1 0 2 50)} "bind-sse-swap" {:upvalue-count 0 :arity 2 :constants ("resolve-target" "parse-swap-spec" "dom-get-attr" "sx-swap" "dom-has-class?" "dom-body" "sx-transitions" "get" "style" "transition" "trim" "not" "empty?" "dispose-islands-in" "starts-with?" "(" "sx-render" "dom-create-element" "div" "dom-append" "with-transition" {:upvalue-count 3 :arity 0 :constants ("swap-dom-nodes" "children-to-fragment" "post-swap") :bytecode (20 0 0 18 0 20 1 0 18 1 48 1 18 2 48 3 5 20 2 0 18 0 49 1 50)} {:upvalue-count 3 :arity 0 :constants ("swap-html-string" "post-swap") :bytecode (20 0 0 18 0 18 1 18 2 48 3 5 20 1 0 18 0 49 1 50)}) :bytecode (20 0 0 16 0 48 1 17 2 20 1 0 20 2 0 16 0 1 3 0 48 2 20 4 0 20 5 0 48 0 1 6 0 48 2 48 2 17 3 16 3 1 8 0 52 7 0 2 17 4 16 3 1 9 0 52 7 0 2 17 5 16 1 52 10 0 1 17 6 16 6 52 12 0 1 52 11 0 1 33 88 0 20 13 0 16 2 48 1 5 16 6 1 15 0 52 14 0 2 33 49 0 20 16 0 16 6 48 1 17 7 20 17 0 1 18 0 2 48 2 17 8 20 19 0 16 8 16 7 48 2 5 20 20 0 16 5 51 21 0 1 2 1 8 1 4 49 2 32 16 0 20 20 0 16 5 51 22 0 1 2 1 6 1 4 49 2 32 1 0 2 50)} "bind-inline-handlers" {:upvalue-count 0 :arity 1 :constants ("for-each" {:upvalue-count 0 :arity 1 :constants ("for-each" {:upvalue-count 1 :arity 1 :constants ("first" "nth" 1 "starts-with?" "sx-on:" "slice" 6 "not" "is-processed?" "str" "on:" "mark-processed!" "sx-parse" "dom-on" {:upvalue-count 2 :arity 1 :constants ("env-extend" "dict" "env-bind!" "event" "this" "detail" "event-detail" "for-each" {:upvalue-count 1 :arity 1 :constants ("eval-expr") :bytecode (20 0 0 16 0 18 0 49 2 50)}) :bytecode (20 0 0 52 1 0 0 48 1 17 1 20 2 0 16 1 1 3 0 16 0 48 3 5 20 2 0 16 1 1 4 0 18 0 48 3 5 20 2 0 16 1 1 5 0 20 6 0 16 0 48 1 48 3 5 51 8 0 1 1 18 1 52 7 0 2 50)}) :bytecode (16 0 52 0 0 1 17 1 16 0 1 2 0 52 1 0 2 17 2 16 1 1 4 0 52 3 0 2 33 83 0 16 1 1 6 0 52 5 0 2 17 3 20 8 0 18 0 1 10 0 16 3 52 9 0 2 48 2 52 7 0 1 33 45 0 20 11 0 18 0 1 10 0 16 3 52 9 0 2 48 2 5 20 12 0 16 2 48 1 17 4 20 13 0 18 0 16 3 51 14 0 0 0 1 4 49 3 32 1 0 2 32 1 0 2 50)} "dom-attr-list") :bytecode (51 1 0 1 0 20 2 0 16 0 48 1 52 0 0 2 50)} "dom-query-all" "dom-body" "[sx-on\\:]") :bytecode (51 1 0 20 2 0 16 0 6 34 6 0 5 20 3 0 48 0 1 4 0 48 2 52 0 0 2 50)} "bind-preload-for" {:upvalue-count 0 :arity 1 :constants ("dom-get-attr" "sx-preload" "=" "mousedown" "list" "touchstart" "mouseover" 0 100 "bind-preload" {:upvalue-count 1 :arity 0 :constants ("get-verb-info" "do-preload" "get" "url" "build-request-headers" "loaded-component-names" "_css-hash") :bytecode (20 0 0 18 0 48 1 17 0 16 0 33 32 0 20 1 0 16 0 1 3 0 52 2 0 2 20 4 0 18 0 20 5 0 48 0 20 6 0 48 3 49 2 32 1 0 2 50)}) :bytecode (20 0 0 16 0 1 1 0 48 2 17 1 16 1 33 76 0 16 1 1 3 0 52 2 0 2 33 13 0 1 3 0 1 5 0 52 4 0 2 32 7 0 1 6 0 52 4 0 1 17 2 16 1 1 3 0 52 2 0 2 33 6 0 1 7 0 32 3 0 1 8 0 17 3 20 9 0 16 0 16 2 16 3 51 10 0 1 0 49 4 32 1 0 2 50)} "do-preload" {:upvalue-count 0 :arity 2 :constants ("nil?" "preload-cache-get" "_preload-cache" "fetch-preload") :bytecode (20 1 0 20 2 0 16 0 48 2 52 0 0 1 33 15 0 20 3 0 16 0 16 1 20 2 0 49 3 32 1 0 2 50)} "VERB_SELECTOR" "str" "[sx-get],[sx-post],[sx-put],[sx-delete],[sx-patch]" "process-elements" {:upvalue-count 0 :arity 1 :constants ("dom-query-all" "dom-body" "VERB_SELECTOR" "for-each" {:upvalue-count 0 :arity 1 :constants ("not" "is-processed?" "verb" "mark-processed!" "process-one") :bytecode (20 1 0 16 0 1 2 0 48 2 52 0 0 1 33 21 0 20 3 0 16 0 1 2 0 48 2 5 20 4 0 16 0 49 1 32 1 0 2 50)} "process-boosted" "process-sse" "bind-inline-handlers" "process-emit-elements") :bytecode (20 0 0 16 0 6 34 6 0 5 20 1 0 48 0 20 2 0 48 2 17 1 51 4 0 16 1 52 3 0 2 5 20 5 0 16 0 48 1 5 20 6 0 16 0 48 1 5 20 7 0 16 0 48 1 5 20 8 0 16 0 49 1 50)} "process-one" {:upvalue-count 0 :arity 1 :constants ("get-verb-info" "not" "dom-has-attr?" "sx-disable" "bind-triggers" "bind-preload-for") :bytecode (20 0 0 16 0 48 1 17 1 16 1 33 41 0 20 2 0 16 0 1 3 0 48 2 52 1 0 1 33 20 0 20 4 0 16 0 16 1 48 2 5 20 5 0 16 0 49 1 32 1 0 2 32 1 0 2 50)} "process-emit-elements" {:upvalue-count 0 :arity 1 :constants ("dom-query-all" "dom-body" "[data-sx-emit]" "for-each" {:upvalue-count 0 :arity 1 :constants ("not" "is-processed?" "emit" "mark-processed!" "dom-get-attr" "data-sx-emit" "dom-on" "click" {:upvalue-count 2 :arity 1 :constants ("dom-get-attr" "data-sx-emit-detail" "json-parse" "dict" "dom-dispatch") :bytecode (20 0 0 18 0 1 1 0 48 2 17 1 16 1 33 10 0 20 2 0 16 1 48 1 32 4 0 52 3 0 0 17 2 20 4 0 18 0 18 1 16 2 49 3 50)}) :bytecode (20 1 0 16 0 1 2 0 48 2 52 0 0 1 33 52 0 20 3 0 16 0 1 2 0 48 2 5 20 4 0 16 0 1 5 0 48 2 17 1 16 1 33 20 0 20 6 0 16 0 1 7 0 51 8 0 1 0 1 1 49 3 32 1 0 2 32 1 0 2 50)}) :bytecode (20 0 0 16 0 6 34 6 0 5 20 1 0 48 0 1 2 0 48 2 17 1 51 4 0 16 1 52 3 0 2 50)} "handle-popstate" {:upvalue-count 0 :arity 1 :constants ("browser-location-href" "dom-query" "[sx-boost]" "dom-get-attr" "sx-boost" "not" "=" "true" "#main-panel" "url-pathname" "try-client-route" "browser-scroll-to" 0 "build-request-headers" "loaded-component-names" "_css-hash" "fetch-and-restore") :bytecode (20 0 0 48 0 17 1 20 1 0 1 2 0 48 1 17 2 16 2 33 44 0 20 3 0 16 2 1 4 0 48 2 17 4 16 4 6 33 14 0 5 16 4 1 7 0 52 6 0 2 52 5 0 1 33 5 0 16 4 32 1 0 2 32 1 0 2 17 3 16 3 6 34 4 0 5 1 8 0 17 3 20 1 0 16 3 48 1 17 4 20 9 0 16 1 48 1 17 5 16 4 33 58 0 20 10 0 16 5 16 3 48 2 33 13 0 20 11 0 1 12 0 16 0 49 2 32 30 0 20 13 0 16 4 20 14 0 48 0 20 15 0 48 3 17 6 20 16 0 16 4 16 1 16 6 16 0 49 4 32 1 0 2 50)} "engine-init" {:upvalue-count 0 :arity 0 :constants ("init-css-tracking" "sx-process-scripts" "sx-hydrate" "process-elements") :bytecode (20 0 0 48 0 5 20 1 0 2 48 1 5 20 2 0 2 48 1 5 20 3 0 2 49 1 50)}) :bytecode (52 1 0 0 128 0 0 5 1 3 0 128 2 0 5 51 5 0 128 4 0 5 51 7 0 128 6 0 5 51 9 0 128 8 0 5 51 11 0 128 10 0 5 51 13 0 128 12 0 5 51 15 0 128 14 0 5 51 17 0 128 16 0 5 51 19 0 128 18 0 5 51 21 0 128 20 0 5 51 23 0 128 22 0 5 51 25 0 128 24 0 5 51 27 0 128 26 0 5 51 29 0 128 28 0 5 51 31 0 128 30 0 5 51 33 0 128 32 0 5 51 35 0 128 34 0 5 51 37 0 128 36 0 5 52 1 0 0 128 38 0 5 1 40 0 128 39 0 5 51 42 0 128 41 0 5 51 44 0 128 43 0 5 51 46 0 128 45 0 5 51 48 0 128 47 0 5 51 50 0 128 49 0 5 51 52 0 128 51 0 5 51 54 0 128 53 0 5 52 1 0 0 128 55 0 5 51 57 0 128 56 0 5 51 59 0 128 58 0 5 51 61 0 128 60 0 5 51 63 0 128 62 0 5 3 128 64 0 5 52 66 0 0 128 65 0 5 51 68 0 128 67 0 5 51 70 0 128 69 0 5 51 72 0 128 71 0 5 51 74 0 128 73 0 5 51 76 0 128 75 0 5 51 78 0 128 77 0 5 51 80 0 128 79 0 5 51 82 0 128 81 0 5 51 84 0 128 83 0 5 51 86 0 128 85 0 5 51 88 0 128 87 0 5 51 90 0 128 89 0 5 51 92 0 128 91 0 5 51 94 0 128 93 0 5 51 96 0 128 95 0 5 51 98 0 128 97 0 5 51 100 0 128 99 0 5 51 102 0 128 101 0 5 1 105 0 52 104 0 1 128 103 0 5 51 107 0 128 106 0 5 51 109 0 128 108 0 5 51 111 0 128 110 0 5 51 113 0 128 112 0 5 51 115 0 128 114 0 50))) + :constants ("_preload-cache" "dict" "_css-hash" "" "dispatch-trigger-events" {:upvalue-count 0 :arity 2 :constants ("try-parse-json" "for-each" {:upvalue-count 2 :arity 1 :constants ("dom-dispatch" "get") :bytecode (20 0 0 18 0 16 0 18 1 16 0 52 1 0 2 49 3 50)} "keys" {:upvalue-count 1 :arity 1 :constants ("trim" "not" "empty?" "dom-dispatch" "dict") :bytecode (16 0 52 0 0 1 17 1 16 1 52 2 0 1 52 1 0 1 33 16 0 20 3 0 18 0 16 1 52 4 0 0 49 3 32 1 0 2 50)} "split" ",") :bytecode (16 1 33 55 0 20 0 0 16 1 48 1 17 2 16 2 33 20 0 51 2 0 1 0 1 2 16 2 52 3 0 1 52 1 0 2 32 18 0 51 4 0 1 0 16 1 1 6 0 52 5 0 2 52 1 0 2 32 1 0 2 50)} "init-css-tracking" {:upvalue-count 0 :arity 0 :constants ("dom-query" "meta[name=\"sx-css-classes\"]" "dom-get-attr" "content" "_css-hash") :bytecode (20 0 0 1 1 0 48 1 17 0 16 0 33 29 0 20 2 0 16 0 1 3 0 48 2 17 1 16 1 33 8 0 16 1 21 4 0 32 1 0 2 32 1 0 2 50)} "execute-request" {:upvalue-count 0 :arity 3 :constants ("get-verb-info" "nil?" "promise-resolve" "get" "method" "url" "dom-get-attr" "sx-media" "not" "browser-media-matches?" "sx-confirm" "browser-confirm" "sx-prompt" "browser-prompt" "validate-for-request" "do-fetch" "assoc" "dict" "SX-Prompt") :bytecode (20 0 0 16 0 48 1 6 34 3 0 5 16 1 17 3 16 3 52 1 0 1 33 9 0 20 2 0 2 49 1 32 249 0 16 3 1 4 0 52 3 0 2 17 4 16 3 1 5 0 52 3 0 2 17 5 20 6 0 16 0 1 7 0 48 2 17 6 16 6 6 33 12 0 5 20 9 0 16 6 48 1 52 8 0 1 33 9 0 20 2 0 2 49 1 32 185 0 20 6 0 16 0 1 10 0 48 2 17 6 16 6 6 33 12 0 5 20 11 0 16 6 48 1 52 8 0 1 33 9 0 20 2 0 2 49 1 32 143 0 20 6 0 16 0 1 12 0 48 2 17 6 16 6 33 10 0 20 13 0 16 6 48 1 32 1 0 2 17 7 16 6 6 33 7 0 5 16 7 52 1 0 1 33 9 0 20 2 0 2 49 1 32 88 0 16 4 52 1 0 1 6 34 23 0 5 16 5 52 1 0 1 6 34 12 0 5 20 14 0 16 0 48 1 52 8 0 1 33 9 0 20 2 0 2 49 1 32 43 0 20 15 0 16 0 16 4 16 4 16 5 16 7 33 23 0 16 2 6 34 5 0 5 52 17 0 0 1 18 0 16 7 52 16 0 3 32 2 0 16 2 49 5 50)} "do-fetch" {:upvalue-count 0 :arity 5 :constants ("dom-get-attr" "sx-sync" "=" "replace" "abort-previous" "resolve-target" "not" "identical?" "abort-previous-target" "new-abort-controller" "track-controller" "track-controller-target" "build-request-body" "get" "url" "body" "content-type" "build-request-headers" "loaded-component-names" "_css-hash" "csrf-token" "for-each" {:upvalue-count 2 :arity 1 :constants ("dict-set!" "get") :bytecode (18 0 16 0 18 1 16 0 52 1 0 2 52 0 0 3 50)} "keys" "dict-set!" "Content-Type" "X-CSRFToken" "preload-cache-get" "_preload-cache" "apply-optimistic" "show-indicator" "disable-elements" "dom-add-class" "sx-request" "dom-set-attr" "aria-busy" "true" "dom-dispatch" "sx:beforeRequest" "dict" "method" "fetch-request" "headers" "signal" "controller-signal" "cross-origin" "cross-origin?" "preloaded" {:upvalue-count 8 :arity 4 :constants ("clear-loading-state" "revert-optimistic" "not" "dom-dispatch" "sx:responseError" "dict" "status" "text" ">" "len" 0 "handle-fetch-success" "handle-retry" "sx:afterRequest") :bytecode (20 0 0 18 0 18 1 18 2 48 3 5 20 1 0 18 3 48 1 5 16 0 52 2 0 1 33 86 0 20 3 0 18 0 1 4 0 1 6 0 16 1 1 7 0 16 3 52 5 0 4 48 3 5 16 3 6 33 14 0 5 16 3 52 9 0 1 1 10 0 52 8 0 2 33 20 0 20 11 0 18 0 18 4 18 5 18 6 16 2 16 3 49 6 32 15 0 20 12 0 18 0 18 5 18 7 18 4 18 6 49 5 32 37 0 20 3 0 18 0 1 13 0 1 6 0 16 1 52 5 0 2 48 3 5 20 11 0 18 0 18 4 18 5 18 6 16 2 16 3 49 6 50)} {:upvalue-count 6 :arity 1 :constants ("clear-loading-state" "revert-optimistic" "not" "abort-error?" "log-warn" "str" "sx:fetch error " " " " — " "dom-dispatch" "sx:requestError" "dict" "error") :bytecode (20 0 0 18 0 18 1 18 2 48 3 5 20 1 0 18 3 48 1 5 20 3 0 16 0 48 1 52 2 0 1 33 47 0 20 4 0 1 6 0 18 4 1 7 0 18 5 1 8 0 16 0 52 5 0 6 48 1 5 20 9 0 18 0 1 10 0 1 12 0 16 0 52 11 0 2 49 3 32 1 0 2 50)}) :bytecode (20 0 0 16 0 1 1 0 48 2 17 5 16 5 1 3 0 52 2 0 2 33 10 0 20 4 0 16 0 48 1 32 1 0 2 5 20 5 0 16 0 48 1 17 6 16 6 6 33 13 0 5 16 0 16 6 52 7 0 2 52 6 0 1 33 10 0 20 8 0 16 6 48 1 32 1 0 2 5 20 9 0 48 0 17 6 20 10 0 16 0 16 6 48 2 5 20 5 0 16 0 48 1 17 7 16 7 33 12 0 20 11 0 16 7 16 6 48 2 32 1 0 2 5 20 12 0 16 0 16 2 16 3 48 3 17 7 16 7 1 14 0 52 13 0 2 17 8 16 7 1 15 0 52 13 0 2 17 9 16 7 1 16 0 52 13 0 2 17 10 20 17 0 16 0 20 18 0 48 0 20 19 0 48 3 17 11 20 20 0 48 0 17 12 16 4 33 20 0 51 22 0 1 11 1 4 16 4 52 23 0 1 52 21 0 2 32 1 0 2 5 16 10 33 14 0 16 11 1 25 0 16 10 52 24 0 3 32 1 0 2 5 16 12 33 14 0 16 11 1 26 0 16 12 52 24 0 3 32 1 0 2 5 20 27 0 20 28 0 16 8 48 2 17 13 20 29 0 16 0 48 1 17 14 20 30 0 16 0 48 1 17 15 20 31 0 16 0 48 1 17 16 20 32 0 16 0 1 33 0 48 2 5 20 34 0 16 0 1 35 0 1 36 0 48 3 5 20 37 0 16 0 1 38 0 1 14 0 16 8 1 40 0 16 2 52 39 0 4 48 3 5 20 41 0 1 14 0 16 8 1 40 0 16 2 1 42 0 16 11 1 15 0 16 9 1 43 0 20 44 0 16 6 48 1 1 45 0 20 46 0 16 8 48 1 1 47 0 16 13 52 39 0 14 51 48 0 1 0 1 15 1 16 1 14 1 8 1 1 1 4 1 2 51 49 0 1 0 1 15 1 16 1 14 1 2 1 8 49 3 50)} "handle-fetch-success" {:upvalue-count 0 :arity 6 :constants ("process-response-headers" "get" "css-hash" "_css-hash" "dispatch-trigger-events" "trigger" "process-cache-directives" "redirect" "browser-navigate" "refresh" "browser-reload" "location" "fetch-location" "retarget" "dom-query" "resolve-target" "parse-swap-spec" "reswap" "dom-get-attr" "sx-swap" "dom-has-class?" "dom-body" "sx-transitions" "style" "transition" "content-type" "" "contains?" "text/sx" "handle-sx-response" "handle-html-response" "trigger-swap" "handle-history" "set-timeout" {:upvalue-count 2 :arity 0 :constants ("get" "trigger-settle" "dispatch-trigger-events" "process-settle-hooks") :bytecode (18 0 1 1 0 52 0 0 2 33 19 0 20 2 0 18 1 18 0 1 1 0 52 0 0 2 48 2 32 1 0 2 5 20 3 0 18 1 49 1 50)} 20 "dom-dispatch" "sx:afterSwap" "dict" "target" "swap") :bytecode (20 0 0 16 4 48 1 17 6 16 6 1 2 0 52 1 0 2 17 7 16 7 33 8 0 16 7 21 3 0 32 1 0 2 5 20 4 0 16 0 16 6 1 5 0 52 1 0 2 48 2 5 20 6 0 16 0 16 6 16 5 48 3 5 16 6 1 7 0 52 1 0 2 33 17 0 20 8 0 16 6 1 7 0 52 1 0 2 49 1 32 31 1 16 6 1 9 0 52 1 0 2 33 8 0 20 10 0 49 0 32 11 1 16 6 1 11 0 52 1 0 2 33 17 0 20 12 0 16 6 1 11 0 52 1 0 2 49 1 32 238 0 16 6 1 13 0 52 1 0 2 33 17 0 20 14 0 16 6 1 13 0 52 1 0 2 48 1 32 7 0 20 15 0 16 0 48 1 17 7 20 16 0 16 6 1 17 0 52 1 0 2 6 34 11 0 5 20 18 0 16 0 1 19 0 48 2 20 20 0 20 21 0 48 0 1 22 0 48 2 48 2 17 8 16 8 1 23 0 52 1 0 2 17 9 16 8 1 24 0 52 1 0 2 17 10 16 6 1 25 0 52 1 0 2 6 34 4 0 5 1 26 0 17 11 16 11 1 28 0 52 27 0 2 33 18 0 20 29 0 16 0 16 7 16 5 16 9 16 10 48 5 32 15 0 20 30 0 16 0 16 7 16 5 16 9 16 10 48 5 5 20 4 0 16 0 16 6 1 31 0 52 1 0 2 48 2 5 20 32 0 16 0 16 1 16 6 48 3 5 20 33 0 51 34 0 1 6 1 0 1 35 0 48 2 5 20 36 0 16 0 1 37 0 1 39 0 16 7 1 40 0 16 9 52 38 0 4 49 3 50)} "handle-sx-response" {:upvalue-count 0 :arity 5 :constants ("strip-component-scripts" "extract-response-css" "trim" "not" "empty?" "sx-render" "dom-create-element" "div" "dom-append" "process-oob-swaps" {:upvalue-count 0 :arity 3 :constants ("dispose-islands-in" "swap-dom-nodes" "=" "innerHTML" "children-to-fragment" "post-swap") :bytecode (20 0 0 16 0 48 1 5 20 1 0 16 0 16 2 1 3 0 52 2 0 2 33 10 0 20 4 0 16 1 48 1 32 2 0 16 1 16 2 48 3 5 20 5 0 16 0 49 1 50)} "dom-get-attr" "sx-select" "select-from-container" "children-to-fragment" "dispose-islands-in" "with-transition" {:upvalue-count 3 :arity 0 :constants ("swap-dom-nodes" "post-swap" "=" "outerHTML" "dom-parent") :bytecode (20 0 0 18 0 18 1 18 2 48 3 17 0 20 1 0 18 2 1 3 0 52 2 0 2 33 17 0 20 4 0 16 0 6 34 3 0 5 18 0 48 1 32 9 0 16 0 6 34 3 0 5 18 0 49 1 50)}) :bytecode (20 0 0 16 2 48 1 17 5 20 1 0 16 5 48 1 17 6 16 6 52 2 0 1 17 7 16 7 52 4 0 1 52 3 0 1 33 106 0 20 5 0 16 7 48 1 17 8 20 6 0 1 7 0 2 48 2 17 9 20 8 0 16 9 16 8 48 2 5 20 9 0 16 9 51 10 0 48 2 5 20 11 0 16 0 1 12 0 48 2 17 10 16 10 33 12 0 20 13 0 16 9 16 10 48 2 32 7 0 20 14 0 16 9 48 1 17 11 20 15 0 16 1 48 1 5 20 16 0 16 4 51 17 0 1 1 1 11 1 3 49 2 32 1 0 2 50)} "handle-html-response" {:upvalue-count 0 :arity 5 :constants ("dom-parse-html-document" "dom-get-attr" "sx-select" "dispose-islands-in" "dom-create-element" "div" "dom-set-inner-html" "dom-body-inner-html" "process-oob-swaps" {:upvalue-count 0 :arity 3 :constants ("dispose-islands-in" "swap-dom-nodes" "post-swap") :bytecode (20 0 0 16 0 48 1 5 20 1 0 16 0 16 1 16 2 48 3 5 20 2 0 16 0 49 1 50)} "hoist-head-elements" "select-from-container" "with-transition" {:upvalue-count 3 :arity 0 :constants ("swap-dom-nodes" "log-info" "str" "swap-root: " "dom-tag-name" "nil" " target: " "post-swap") :bytecode (20 0 0 18 0 18 1 18 2 48 3 17 0 20 1 0 1 3 0 16 0 33 10 0 20 4 0 16 0 48 1 32 3 0 1 5 0 1 6 0 20 4 0 18 0 48 1 52 2 0 4 48 1 5 20 7 0 16 0 6 34 3 0 5 18 0 49 1 50)} {:upvalue-count 3 :arity 0 :constants ("swap-dom-nodes" "children-to-fragment" "post-swap") :bytecode (20 0 0 18 0 20 1 0 18 1 48 1 18 2 48 3 5 20 2 0 18 0 49 1 50)}) :bytecode (20 0 0 16 2 48 1 17 5 16 5 33 164 0 20 1 0 16 0 1 2 0 48 2 17 6 20 3 0 16 1 48 1 5 16 6 33 75 0 20 4 0 1 5 0 2 48 2 17 7 20 6 0 16 7 20 7 0 16 5 48 1 48 2 5 20 8 0 16 7 51 9 0 48 2 5 20 10 0 16 7 48 1 5 20 11 0 16 7 16 6 48 2 17 8 20 12 0 16 4 51 13 0 1 1 1 8 1 3 49 2 32 61 0 20 4 0 1 5 0 2 48 2 17 7 20 6 0 16 7 20 7 0 16 5 48 1 48 2 5 20 8 0 16 7 51 9 0 48 2 5 20 10 0 16 7 48 1 5 20 12 0 16 4 51 14 0 1 1 1 7 1 3 49 2 32 1 0 2 50)} "handle-retry" {:upvalue-count 0 :arity 5 :constants ("dom-get-attr" "sx-retry" "parse-retry-spec" "data-sx-retry-ms" "get" "start-ms" "parse-int" "dom-set-attr" "str" "next-retry-ms" "cap-ms" "set-timeout" {:upvalue-count 5 :arity 0 :constants ("do-fetch") :bytecode (20 0 0 18 0 18 1 18 2 18 3 18 4 49 5 50)}) :bytecode (20 0 0 16 0 1 1 0 48 2 17 5 20 2 0 16 5 48 1 17 6 16 6 33 97 0 20 0 0 16 0 1 3 0 48 2 6 34 10 0 5 16 6 1 5 0 52 4 0 2 17 7 16 7 16 6 1 5 0 52 4 0 2 52 6 0 2 17 8 20 7 0 16 0 1 3 0 20 9 0 16 8 16 6 1 10 0 52 4 0 2 48 2 52 8 0 1 48 3 5 20 11 0 51 12 0 1 0 1 1 1 2 1 3 1 4 16 8 49 2 32 1 0 2 50)} "bind-triggers" {:upvalue-count 0 :arity 2 :constants ("parse-trigger-spec" "dom-get-attr" "sx-trigger" "default-trigger" "dom-tag-name" "for-each" {:upvalue-count 2 :arity 1 :constants ("classify-trigger" "get" "modifiers" "=" "poll" "set-interval" {:upvalue-count 2 :arity 0 :constants ("host-get" "isConnected" "execute-request" "clear-interval" "log-info" "poll stopped: element removed") :bytecode (20 0 0 18 0 1 1 0 48 2 33 12 0 20 2 0 18 0 2 2 49 3 32 16 0 20 3 0 18 1 48 1 5 20 4 0 1 5 0 49 1 50)} "interval" "intersect" "observe-intersection" {:upvalue-count 1 :arity 0 :constants ("execute-request") :bytecode (20 0 0 18 0 2 2 49 3 50)} "delay" "load" "set-timeout" 0 "revealed" "event" "bind-event") :bytecode (20 0 0 16 0 48 1 17 1 16 0 1 2 0 52 1 0 2 17 2 16 1 1 4 0 52 3 0 2 33 29 0 2 17 3 20 5 0 51 6 0 0 0 1 3 16 2 1 7 0 52 1 0 2 48 2 17 3 32 152 0 16 1 1 8 0 52 3 0 2 33 25 0 20 9 0 18 0 51 10 0 0 0 4 16 2 1 11 0 52 1 0 2 49 4 32 115 0 16 1 1 12 0 52 3 0 2 33 30 0 20 13 0 51 10 0 0 0 16 2 1 11 0 52 1 0 2 6 34 4 0 5 1 14 0 49 2 32 73 0 16 1 1 15 0 52 3 0 2 33 25 0 20 9 0 18 0 51 10 0 0 0 3 16 2 1 11 0 52 1 0 2 49 4 32 36 0 16 1 1 16 0 52 3 0 2 33 23 0 20 17 0 18 0 16 0 1 16 0 52 1 0 2 16 2 18 1 49 4 32 1 0 2 50)}) :bytecode (20 0 0 20 1 0 16 0 1 2 0 48 2 48 1 6 34 13 0 5 20 3 0 20 4 0 16 0 48 1 48 1 17 2 51 6 0 1 0 1 1 16 2 52 5 0 2 50)} "bind-event" {:upvalue-count 0 :arity 4 :constants ("get" "from" "dom-query" "dom-add-listener" {:upvalue-count 5 :arity 1 :constants ("get" "changed" "element-value" "=" "not" "click" "event-modifier-key?" "submit" "dom-has-attr?" "href" "prevent-default" "get-verb-info" "method" "GET" "delay" "try-client-route" "url-pathname" "url" "dom-get-attr" "sx-target" "browser-push-state" "browser-scroll-to" 0 "log-info" "str" "sx:route server fetch " "clear-timeout" "set-timeout" {:upvalue-count 1 :arity 0 :constants ("execute-request") :bytecode (20 0 0 18 0 2 2 49 3 50)} "execute-request") :bytecode (3 17 1 18 0 1 1 0 52 0 0 2 33 29 0 20 2 0 17 2 16 2 18 1 52 3 0 2 33 6 0 4 17 1 32 4 0 16 2 19 1 32 1 0 2 5 16 1 6 33 26 0 5 18 2 1 5 0 52 3 0 2 6 33 8 0 5 20 6 0 16 0 48 1 52 4 0 1 33 36 1 18 2 1 7 0 52 3 0 2 6 34 25 0 5 18 2 1 5 0 52 3 0 2 6 33 11 0 5 20 8 0 18 3 1 9 0 48 2 33 10 0 20 10 0 16 0 48 1 32 1 0 2 5 20 11 0 18 3 48 1 17 2 18 2 1 5 0 52 3 0 2 6 33 50 0 5 16 2 1 12 0 52 0 0 2 1 13 0 52 3 0 2 6 33 29 0 5 20 8 0 18 3 1 9 0 48 2 6 33 14 0 5 18 0 1 14 0 52 0 0 2 52 4 0 1 17 3 4 17 4 16 3 33 34 0 20 15 0 20 16 0 16 2 1 17 0 52 0 0 2 48 1 20 18 0 18 3 1 19 0 48 2 48 2 17 4 32 1 0 2 5 16 4 33 29 0 20 20 0 16 2 1 17 0 52 0 0 2 48 1 5 20 21 0 1 22 0 1 22 0 49 2 32 84 0 16 3 33 24 0 20 23 0 1 25 0 16 2 1 17 0 52 0 0 2 52 24 0 2 48 1 32 1 0 2 5 18 0 1 14 0 52 0 0 2 33 32 0 20 26 0 18 4 48 1 5 20 27 0 51 28 0 0 3 18 0 1 14 0 52 0 0 2 48 2 19 4 32 9 0 20 29 0 18 3 2 2 49 3 32 1 0 2 50)} "once" "dict") :bytecode (2 17 4 2 17 5 16 2 1 1 0 52 0 0 2 33 17 0 20 2 0 16 2 1 1 0 52 0 0 2 48 1 32 2 0 16 0 17 6 16 6 33 49 0 20 3 0 16 6 16 1 51 4 0 1 2 1 5 1 1 1 0 1 4 16 2 1 5 0 52 0 0 2 33 11 0 1 5 0 3 52 6 0 2 32 1 0 2 49 4 32 1 0 2 50)} "post-swap" {:upvalue-count 0 :arity 1 :constants ("log-info" "str" "post-swap: root=" "dom-tag-name" "nil" "activate-scripts" "sx-process-scripts" "sx-hydrate" "sx-hydrate-islands" "run-post-render-hooks" "process-elements") :bytecode (20 0 0 1 2 0 16 0 33 10 0 20 3 0 16 0 48 1 32 3 0 1 4 0 52 1 0 2 48 1 5 20 5 0 16 0 48 1 5 20 6 0 16 0 48 1 5 20 7 0 16 0 48 1 5 20 8 0 16 0 48 1 5 20 9 0 48 0 5 20 10 0 16 0 49 1 50)} "process-settle-hooks" {:upvalue-count 0 :arity 1 :constants ("dom-get-attr" "sx-on-settle" "not" "empty?" "sx-parse" "for-each" {:upvalue-count 0 :arity 1 :constants ("eval-expr" "env-extend" "dict") :bytecode (20 0 0 16 0 20 1 0 52 2 0 0 48 1 49 2 50)}) :bytecode (20 0 0 16 0 1 1 0 48 2 17 1 16 1 6 33 11 0 5 16 1 52 3 0 1 52 2 0 1 33 21 0 20 4 0 16 1 48 1 17 2 51 6 0 16 2 52 5 0 2 32 1 0 2 50)} "activate-scripts" {:upvalue-count 0 :arity 1 :constants ("dom-query-all" "script" "for-each" {:upvalue-count 0 :arity 1 :constants ("not" "dom-has-attr?" "data-components" "data-sx-activated" "create-script-clone" "dom-set-attr" "true" "dom-replace-child" "dom-parent") :bytecode (20 1 0 16 0 1 2 0 48 2 52 0 0 1 6 33 15 0 5 20 1 0 16 0 1 3 0 48 2 52 0 0 1 33 42 0 20 4 0 16 0 48 1 17 1 20 5 0 16 1 1 3 0 1 6 0 48 3 5 20 7 0 20 8 0 16 0 48 1 16 1 16 0 49 3 32 1 0 2 50)}) :bytecode (16 0 33 24 0 20 0 0 16 0 1 1 0 48 2 17 1 51 3 0 16 1 52 2 0 2 32 1 0 2 50)} "process-oob-swaps" {:upvalue-count 0 :arity 2 :constants ("find-oob-swaps" "for-each" {:upvalue-count 1 :arity 1 :constants ("get" "target-id" "dom-query-by-id" "element" "swap-type" "dom-parent" "dom-remove-child") :bytecode (16 0 1 1 0 52 0 0 2 17 1 20 2 0 16 1 48 1 17 2 16 0 1 3 0 52 0 0 2 17 3 16 0 1 4 0 52 0 0 2 17 4 20 5 0 16 3 48 1 33 17 0 20 6 0 20 5 0 16 3 48 1 16 3 48 2 32 1 0 2 5 16 2 33 13 0 18 0 16 2 16 3 16 4 49 3 32 1 0 2 50)}) :bytecode (20 0 0 16 0 48 1 17 2 51 2 0 1 1 16 2 52 1 0 2 50)} "hoist-head-elements" {:upvalue-count 0 :arity 1 :constants ("for-each" {:upvalue-count 0 :arity 1 :constants ("dom-parent" "dom-remove-child" "dom-append-to-head") :bytecode (20 0 0 16 0 48 1 33 17 0 20 1 0 20 0 0 16 0 48 1 16 0 48 2 32 1 0 2 5 20 2 0 16 0 49 1 50)} "dom-query-all" "style[data-sx-css]" "link[rel=\"stylesheet\"]") :bytecode (51 1 0 20 2 0 16 0 1 3 0 48 2 52 0 0 2 5 51 1 0 20 2 0 16 0 1 4 0 48 2 52 0 0 2 50)} "process-boosted" {:upvalue-count 0 :arity 1 :constants ("for-each" {:upvalue-count 0 :arity 1 :constants ("boost-descendants") :bytecode (20 0 0 16 0 49 1 50)} "dom-query-all" "dom-body" "[sx-boost]") :bytecode (51 1 0 20 2 0 16 0 6 34 6 0 5 20 3 0 48 0 1 4 0 48 2 52 0 0 2 50)} "boost-descendants" {:upvalue-count 0 :arity 1 :constants ("dom-get-attr" "sx-boost" "for-each" {:upvalue-count 1 :arity 1 :constants ("not" "is-processed?" "boost" "should-boost-link?" "mark-processed!" "dom-has-attr?" "sx-target" "=" "true" "dom-set-attr" "sx-swap" "innerHTML" "sx-push-url" "bind-client-route-link" "dom-get-attr" "href") :bytecode (20 1 0 16 0 1 2 0 48 2 52 0 0 1 6 33 8 0 5 20 3 0 16 0 48 1 33 160 0 20 4 0 16 0 1 2 0 48 2 5 20 5 0 16 0 1 6 0 48 2 52 0 0 1 6 33 21 0 5 18 0 6 33 14 0 5 18 0 1 8 0 52 7 0 2 52 0 0 1 33 15 0 20 9 0 16 0 1 6 0 18 0 48 3 32 1 0 2 5 20 5 0 16 0 1 10 0 48 2 52 0 0 1 33 16 0 20 9 0 16 0 1 10 0 1 11 0 48 3 32 1 0 2 5 20 5 0 16 0 1 12 0 48 2 52 0 0 1 33 16 0 20 9 0 16 0 1 12 0 1 8 0 48 3 32 1 0 2 5 20 13 0 16 0 20 14 0 16 0 1 15 0 48 2 49 2 32 1 0 2 50)} "dom-query-all" "a[href]" {:upvalue-count 1 :arity 1 :constants ("not" "is-processed?" "boost" "should-boost-form?" "mark-processed!" "upper" "dom-get-attr" "method" "GET" "action" "browser-location-href" "dom-has-attr?" "sx-target" "=" "true" "dom-set-attr" "sx-swap" "innerHTML" "bind-boost-form") :bytecode (20 1 0 16 0 1 2 0 48 2 52 0 0 1 6 33 8 0 5 20 3 0 16 0 48 1 33 165 0 20 4 0 16 0 1 2 0 48 2 5 20 6 0 16 0 1 7 0 48 2 6 34 4 0 5 1 8 0 52 5 0 1 17 1 20 6 0 16 0 1 9 0 48 2 6 34 6 0 5 20 10 0 48 0 17 2 20 11 0 16 0 1 12 0 48 2 52 0 0 1 6 33 21 0 5 18 0 6 33 14 0 5 18 0 1 14 0 52 13 0 2 52 0 0 1 33 15 0 20 15 0 16 0 1 12 0 18 0 48 3 32 1 0 2 5 20 11 0 16 0 1 16 0 48 2 52 0 0 1 33 16 0 20 15 0 16 0 1 16 0 1 17 0 48 3 32 1 0 2 5 20 18 0 16 0 16 1 16 2 49 3 32 1 0 2 50)} "form") :bytecode (20 0 0 16 0 1 1 0 48 2 17 1 51 3 0 1 1 20 4 0 16 0 1 5 0 48 2 52 2 0 2 5 51 6 0 1 1 20 4 0 16 0 1 7 0 48 2 52 2 0 2 50)} "_page-data-cache" "_page-data-cache-ttl" 30000 "page-data-cache-key" {:upvalue-count 0 :arity 2 :constants ("nil?" "empty?" "keys" "list" "for-each" {:upvalue-count 2 :arity 1 :constants ("append!" "str" "=" "get") :bytecode (20 0 0 18 0 16 0 1 2 0 18 1 16 0 52 3 0 2 52 1 0 3 49 2 50)} "str" ":" "join" "&") :bytecode (16 0 17 2 16 1 52 0 0 1 6 34 11 0 5 16 1 52 2 0 1 52 1 0 1 33 5 0 16 2 32 42 0 52 3 0 0 17 3 51 5 0 1 3 1 1 16 1 52 2 0 1 52 4 0 2 5 16 2 1 7 0 1 9 0 16 3 52 8 0 2 52 6 0 3 50)} "page-data-cache-get" {:upvalue-count 0 :arity 1 :constants ("get" "_page-data-cache" "nil?" ">" "-" "now-ms" "ts" "_page-data-cache-ttl" "dict-set!" "data") :bytecode (20 1 0 16 0 52 0 0 2 17 1 16 1 52 2 0 1 33 4 0 2 32 52 0 20 5 0 48 0 16 1 1 6 0 52 0 0 2 52 4 0 2 20 7 0 52 3 0 2 33 15 0 20 1 0 16 0 2 52 8 0 3 5 2 32 9 0 16 1 1 9 0 52 0 0 2 50)} "page-data-cache-set" {:upvalue-count 0 :arity 2 :constants ("dict-set!" "_page-data-cache" "data" "ts" "now-ms") :bytecode (20 1 0 16 0 1 2 0 16 1 1 3 0 20 4 0 48 0 65 2 0 52 0 0 3 50)} "invalidate-page-cache" {:upvalue-count 0 :arity 1 :constants ("for-each" {:upvalue-count 1 :arity 1 :constants ("=" "starts-with?" "str" ":" "dict-set!" "_page-data-cache") :bytecode (16 0 18 0 52 0 0 2 6 34 16 0 5 16 0 18 0 1 3 0 52 2 0 2 52 1 0 2 33 13 0 20 5 0 16 0 2 52 4 0 3 32 1 0 2 50)} "keys" "_page-data-cache" "sw-post-message" "type" "invalidate" "page" "log-info" "str" "sx:cache invalidate ") :bytecode (51 1 0 1 0 20 3 0 52 2 0 1 52 0 0 2 5 20 4 0 1 5 0 1 6 0 1 7 0 16 0 65 2 0 48 1 5 20 8 0 1 10 0 16 0 52 9 0 2 49 1 50)} "invalidate-all-page-cache" {:upvalue-count 0 :arity 0 :constants ("dict" "_page-data-cache" "sw-post-message" "type" "invalidate" "page" "*" "log-info" "sx:cache invalidate *") :bytecode (52 0 0 0 21 1 0 5 20 2 0 1 3 0 1 4 0 1 5 0 1 6 0 65 2 0 48 1 5 20 7 0 1 8 0 49 1 50)} "update-page-cache" {:upvalue-count 0 :arity 2 :constants ("page-data-cache-key" "dict" "page-data-cache-set" "log-info" "str" "sx:cache update ") :bytecode (20 0 0 16 0 52 1 0 0 48 2 17 2 20 2 0 16 2 16 1 48 2 5 20 3 0 1 5 0 16 0 52 4 0 2 49 1 50)} "process-cache-directives" {:upvalue-count 0 :arity 3 :constants ("dom-get-attr" "sx-cache-invalidate" "=" "*" "invalidate-all-page-cache" "invalidate-page-cache" "get" "cache-invalidate" "cache-update" "parse-sx-data" "update-page-cache") :bytecode (20 0 0 16 0 1 1 0 48 2 17 3 16 3 33 30 0 16 3 1 3 0 52 2 0 2 33 8 0 20 4 0 48 0 32 7 0 20 5 0 16 3 48 1 32 1 0 2 5 16 1 1 7 0 52 6 0 2 17 3 16 3 33 30 0 16 3 1 3 0 52 2 0 2 33 8 0 20 4 0 48 0 32 7 0 20 5 0 16 3 48 1 32 1 0 2 5 16 1 1 8 0 52 6 0 2 17 3 16 3 33 30 0 20 9 0 16 2 48 1 17 4 16 4 33 12 0 20 10 0 16 3 16 4 49 2 32 1 0 2 32 1 0 2 50)} "_optimistic-snapshots" "optimistic-cache-update" {:upvalue-count 0 :arity 2 :constants ("page-data-cache-get" "dict-set!" "_optimistic-snapshots" "page-data-cache-set") :bytecode (20 0 0 16 0 48 1 17 2 16 2 33 35 0 16 1 16 2 48 1 17 3 20 2 0 16 0 16 2 52 1 0 3 5 20 3 0 16 0 16 3 48 2 5 16 3 32 1 0 2 50)} "optimistic-cache-revert" {:upvalue-count 0 :arity 1 :constants ("get" "_optimistic-snapshots" "page-data-cache-set" "dict-delete!") :bytecode (20 1 0 16 0 52 0 0 2 17 1 16 1 33 25 0 20 2 0 16 0 16 1 48 2 5 20 1 0 16 0 52 3 0 2 5 16 1 32 1 0 2 50)} "optimistic-cache-confirm" {:upvalue-count 0 :arity 1 :constants ("dict-delete!" "_optimistic-snapshots") :bytecode (20 1 0 16 0 52 0 0 2 50)} "submit-mutation" {:upvalue-count 0 :arity 6 :constants ("page-data-cache-key" "optimistic-cache-update" "try-rerender-page" "execute-action" {:upvalue-count 4 :arity 1 :constants ("page-data-cache-set" "optimistic-cache-confirm" "try-rerender-page" "log-info" "str" "sx:optimistic confirmed " "confirmed") :bytecode (16 0 33 12 0 20 0 0 18 0 16 0 48 2 32 1 0 2 5 20 1 0 18 0 48 1 5 16 0 33 14 0 20 2 0 18 1 18 2 16 0 48 3 32 1 0 2 5 20 3 0 1 5 0 18 1 52 4 0 2 48 1 5 18 3 33 10 0 18 3 1 6 0 49 1 32 1 0 2 50)} {:upvalue-count 4 :arity 1 :constants ("optimistic-cache-revert" "try-rerender-page" "log-warn" "str" "sx:optimistic reverted " ": " "reverted") :bytecode (20 0 0 18 0 48 1 17 1 16 1 33 14 0 20 1 0 18 1 18 2 16 1 48 3 32 1 0 2 5 20 2 0 1 4 0 18 1 1 5 0 16 0 52 3 0 4 48 1 5 18 3 33 10 0 18 3 1 6 0 49 1 32 1 0 2 50)}) :bytecode (20 0 0 16 0 16 1 48 2 17 6 20 1 0 16 6 16 4 48 2 17 7 16 7 33 14 0 20 2 0 16 0 16 1 16 7 48 3 32 1 0 2 5 20 3 0 16 2 16 3 51 4 0 1 6 1 0 1 1 1 5 51 5 0 1 6 1 0 1 1 1 5 49 4 50)} "_is-online" "_offline-queue" "list" "offline-is-online?" {:upvalue-count 0 :arity 0 :constants ("_is-online") :bytecode (20 0 0 50)} "offline-set-online!" {:upvalue-count 0 :arity 1 :constants ("_is-online") :bytecode (16 0 21 0 0 50)} "offline-queue-mutation" {:upvalue-count 0 :arity 5 :constants ("page-data-cache-key" "dict" "action" "payload" "page" "params" "timestamp" "now-ms" "status" "pending" "append!" "_offline-queue" "optimistic-cache-update" "try-rerender-page" "log-info" "str" "sx:offline queued " " (" "len" " pending)") :bytecode (20 0 0 16 2 16 3 48 2 17 5 1 2 0 16 0 1 3 0 16 1 1 4 0 16 2 1 5 0 16 3 1 6 0 20 7 0 48 0 1 8 0 1 9 0 52 1 0 12 17 6 20 10 0 20 11 0 16 6 48 2 5 20 12 0 16 5 16 4 48 2 17 7 16 7 33 14 0 20 13 0 16 2 16 3 16 7 48 3 32 1 0 2 5 20 14 0 1 16 0 16 0 1 17 0 20 11 0 52 18 0 1 1 19 0 52 15 0 5 48 1 5 16 6 50)} "offline-sync" {:upvalue-count 0 :arity 0 :constants ("filter" {:upvalue-count 0 :arity 1 :constants ("=" "get" "status" "pending") :bytecode (16 0 1 2 0 52 1 0 2 1 3 0 52 0 0 2 50)} "_offline-queue" "not" "empty?" "log-info" "str" "sx:offline syncing " "len" " mutations" "for-each" {:upvalue-count 0 :arity 1 :constants ("execute-action" "get" "action" "payload" {:upvalue-count 1 :arity 1 :constants ("dict-set!" "status" "synced" "log-info" "str" "sx:offline synced " "get" "action") :bytecode (18 0 1 1 0 1 2 0 52 0 0 3 5 20 3 0 1 5 0 18 0 1 7 0 52 6 0 2 52 4 0 2 49 1 50)} {:upvalue-count 1 :arity 1 :constants ("dict-set!" "status" "failed" "log-warn" "str" "sx:offline sync failed " "get" "action" ": ") :bytecode (18 0 1 1 0 1 2 0 52 0 0 3 5 20 3 0 1 5 0 18 0 1 7 0 52 6 0 2 1 8 0 16 0 52 4 0 4 49 1 50)}) :bytecode (20 0 0 16 0 1 2 0 52 1 0 2 16 0 1 3 0 52 1 0 2 51 4 0 1 0 51 5 0 1 0 49 4 50)}) :bytecode (51 1 0 20 2 0 52 0 0 2 17 0 16 0 52 4 0 1 52 3 0 1 33 34 0 20 5 0 1 7 0 16 0 52 8 0 1 1 9 0 52 6 0 3 48 1 5 51 11 0 16 0 52 10 0 2 32 1 0 2 50)} "offline-pending-count" {:upvalue-count 0 :arity 0 :constants ("len" "filter" {:upvalue-count 0 :arity 1 :constants ("=" "get" "status" "pending") :bytecode (16 0 1 2 0 52 1 0 2 1 3 0 52 0 0 2 50)} "_offline-queue") :bytecode (51 2 0 20 3 0 52 1 0 2 52 0 0 1 50)} "offline-aware-mutation" {:upvalue-count 0 :arity 6 :constants ("_is-online" "submit-mutation" "offline-queue-mutation" "queued") :bytecode (20 0 0 33 20 0 20 1 0 16 0 16 1 16 2 16 3 16 4 16 5 49 6 32 32 0 20 2 0 16 2 16 3 16 0 16 1 16 4 48 5 5 16 5 33 10 0 16 5 1 3 0 49 1 32 1 0 2 50)} "current-page-layout" {:upvalue-count 0 :arity 0 :constants ("url-pathname" "browser-location-href" "find-matching-route" "_page-routes" "nil?" "" "get" "layout") :bytecode (20 0 0 20 1 0 48 0 48 1 17 0 20 2 0 16 0 20 3 0 48 2 17 1 16 1 52 4 0 1 33 6 0 1 5 0 32 17 0 16 1 1 7 0 52 6 0 2 6 34 4 0 5 1 5 0 50)} "swap-rendered-content" {:upvalue-count 0 :arity 3 :constants ("dom-create-element" "div" "dom-append" "process-oob-swaps" {:upvalue-count 0 :arity 3 :constants ("dispose-islands-in" "swap-dom-nodes" "=" "innerHTML" "children-to-fragment" "post-swap") :bytecode (20 0 0 16 0 48 1 5 20 1 0 16 0 16 2 1 3 0 52 2 0 2 33 10 0 20 4 0 16 1 48 1 32 2 0 16 1 16 2 48 3 5 20 5 0 16 0 49 1 50)} "dom-get-attr" "id" "dom-query" "str" "#" "children-to-fragment" "dispose-islands-in" "dom-set-text-content" "" "hoist-head-elements-full" "process-elements" "sx-hydrate-elements" "sx-hydrate-islands" "run-post-render-hooks" "dom-dispatch" "sx:clientRoute" "dict" "pathname" "log-info" "sx:route client ") :bytecode (20 0 0 1 1 0 2 48 2 17 3 20 2 0 16 3 16 1 48 2 5 20 3 0 16 3 51 4 0 48 2 5 20 5 0 16 0 1 6 0 48 2 17 4 16 4 33 19 0 20 7 0 16 3 1 9 0 16 4 52 8 0 2 48 2 32 1 0 2 17 5 16 5 33 10 0 20 10 0 16 5 48 1 32 7 0 20 10 0 16 3 48 1 17 6 20 11 0 16 0 48 1 5 20 12 0 16 0 1 13 0 48 2 5 20 2 0 16 0 16 6 48 2 5 20 14 0 16 0 48 1 5 20 15 0 16 0 48 1 5 20 16 0 16 0 48 1 5 20 17 0 16 0 48 1 5 20 18 0 48 0 5 20 19 0 16 0 1 20 0 1 22 0 16 2 52 21 0 2 48 3 5 20 23 0 1 24 0 16 2 52 8 0 2 49 1 50)} "resolve-route-target" {:upvalue-count 0 :arity 1 :constants ("not" "=" "true" "dom-query") :bytecode (16 0 6 33 14 0 5 16 0 1 2 0 52 1 0 2 52 0 0 1 33 10 0 20 3 0 16 0 49 1 32 1 0 2 50)} "deps-satisfied?" {:upvalue-count 0 :arity 1 :constants ("get" "deps" "loaded-component-names" "nil?" "empty?" "every?" {:upvalue-count 1 :arity 1 :constants ("contains?") :bytecode (18 0 16 0 52 0 0 2 50)}) :bytecode (16 0 1 1 0 52 0 0 2 17 1 20 2 0 48 0 17 2 16 1 52 3 0 1 6 34 7 0 5 16 1 52 4 0 1 33 4 0 3 32 11 0 51 6 0 1 2 16 1 52 5 0 2 50)} "try-client-route" {:upvalue-count 0 :arity 2 :constants ("find-matching-route" "_page-routes" "nil?" "log-info" "str" "sx:route no match (" "len" " routes) " "get" "layout" "" "current-page-layout" "not" "=" "sx:route server (layout: " " -> " ") " "content" "closure" "params" "name" "empty?" "log-warn" "sx:route no content for " "resolve-route-target" "sx:route target not found: " "deps-satisfied?" "sx:route deps miss for " "io-deps" "render-plan" "server" "list" "client" "sx:route plan " " — " " server, " " client" "register-io-deps" "stream" "sx:route streaming " "fetch-streaming" "build-request-headers" "loaded-component-names" "_css-hash" "has-data" "page-data-cache-key" "page-data-cache-get" "merge" "sx:route client+cache+async " "try-async-eval-content" {:upvalue-count 2 :arity 1 :constants ("nil?" "log-warn" "str" "sx:route cache+async eval failed for " " — server fallback" "fetch-and-restore" "build-request-headers" "loaded-component-names" "_css-hash" 0 "swap-rendered-content") :bytecode (16 0 52 0 0 1 33 48 0 20 1 0 1 3 0 18 0 1 4 0 52 2 0 3 48 1 5 20 5 0 18 1 18 0 20 6 0 18 1 20 7 0 48 0 20 8 0 48 3 1 9 0 49 4 32 11 0 20 10 0 18 1 16 0 18 0 49 3 50)} "try-eval-content" "sx:route cached eval failed for " "sx:route client+cache " "swap-rendered-content" "sx:route client+data " "resolve-page-data" {:upvalue-count 7 :arity 1 :constants ("page-data-cache-set" "merge" "try-async-eval-content" {:upvalue-count 2 :arity 1 :constants ("nil?" "log-warn" "str" "sx:route data+async eval failed for " " — server fallback" "fetch-and-restore" "build-request-headers" "loaded-component-names" "_css-hash" 0 "swap-rendered-content") :bytecode (16 0 52 0 0 1 33 48 0 20 1 0 1 3 0 18 0 1 4 0 52 2 0 3 48 1 5 20 5 0 18 1 18 0 20 6 0 18 1 20 7 0 48 0 20 8 0 48 3 1 9 0 49 4 32 11 0 20 10 0 18 1 16 0 18 0 49 3 50)} "try-eval-content" "nil?" "log-warn" "str" "sx:route data eval failed for " " — server fallback" "fetch-and-restore" "build-request-headers" "loaded-component-names" "_css-hash" 0 "swap-rendered-content") :bytecode (20 0 0 18 0 16 0 48 2 5 18 1 18 2 16 0 52 1 0 3 17 1 18 3 33 19 0 20 2 0 18 4 16 1 51 3 0 0 5 0 6 49 3 32 79 0 20 4 0 18 4 16 1 48 2 17 2 16 2 52 5 0 1 33 48 0 20 6 0 1 8 0 18 5 1 9 0 52 7 0 3 48 1 5 20 10 0 18 6 18 5 20 11 0 18 6 20 12 0 48 0 20 13 0 48 3 1 14 0 49 4 32 11 0 20 15 0 18 6 16 2 18 5 49 3 50)} "sx:route client+async " {:upvalue-count 2 :arity 1 :constants ("nil?" "log-warn" "str" "sx:route async eval failed for " " — server fallback" "fetch-and-restore" "build-request-headers" "loaded-component-names" "_css-hash" 0 "swap-rendered-content") :bytecode (16 0 52 0 0 1 33 48 0 20 1 0 1 3 0 18 0 1 4 0 52 2 0 3 48 1 5 20 5 0 18 1 18 0 20 6 0 18 1 20 7 0 48 0 20 8 0 48 3 1 9 0 49 4 32 11 0 20 10 0 18 1 16 0 18 0 49 3 50)} "sx:route server (eval failed) ") :bytecode (20 0 0 16 0 20 1 0 48 2 17 2 16 2 52 2 0 1 33 29 0 20 3 0 1 5 0 20 1 0 52 6 0 1 1 7 0 16 0 52 4 0 4 48 1 5 4 32 233 2 16 2 1 9 0 52 8 0 2 6 34 4 0 5 1 10 0 17 3 20 11 0 48 0 17 4 16 3 16 4 52 13 0 2 52 12 0 1 33 29 0 20 3 0 1 14 0 16 4 1 15 0 16 3 1 16 0 16 0 52 4 0 6 48 1 5 4 32 163 2 16 2 1 17 0 52 8 0 2 17 5 16 2 1 18 0 52 8 0 2 6 34 4 0 5 65 0 0 17 6 16 2 1 19 0 52 8 0 2 17 7 16 2 1 20 0 52 8 0 2 17 8 16 5 52 2 0 1 6 34 7 0 5 16 5 52 21 0 1 33 19 0 20 22 0 1 23 0 16 0 52 4 0 2 48 1 5 4 32 72 2 20 24 0 16 1 48 1 17 9 16 9 52 2 0 1 33 19 0 20 22 0 1 25 0 16 1 52 4 0 2 48 1 5 4 32 35 2 20 26 0 16 2 48 1 52 12 0 1 33 19 0 20 3 0 1 27 0 16 8 52 4 0 2 48 1 5 4 32 2 2 16 2 1 28 0 52 8 0 2 17 10 16 10 6 33 11 0 5 16 10 52 21 0 1 52 12 0 1 17 11 16 2 1 29 0 52 8 0 2 17 12 16 12 33 78 0 16 12 1 30 0 52 8 0 2 6 34 5 0 5 52 31 0 0 17 13 16 12 1 32 0 52 8 0 2 6 34 5 0 5 52 31 0 0 17 14 20 3 0 1 33 0 16 8 1 34 0 16 13 52 6 0 1 1 35 0 16 14 52 6 0 1 1 36 0 52 4 0 7 48 1 32 1 0 2 5 16 11 33 10 0 20 37 0 16 10 48 1 32 1 0 2 5 16 2 1 38 0 52 8 0 2 33 44 0 20 3 0 1 39 0 16 0 52 4 0 2 48 1 5 20 40 0 16 9 16 0 20 41 0 16 9 20 42 0 48 0 20 43 0 48 3 48 3 5 3 32 59 1 16 2 1 44 0 52 8 0 2 33 194 0 20 45 0 16 8 16 7 48 2 17 13 20 46 0 16 13 48 1 17 14 16 14 33 123 0 16 6 16 7 16 14 52 47 0 3 17 15 16 11 33 36 0 20 3 0 1 48 0 16 0 52 4 0 2 48 1 5 20 49 0 16 5 16 15 51 50 0 1 0 1 9 48 3 5 3 32 67 0 20 51 0 16 5 16 15 48 2 17 16 16 16 52 2 0 1 33 19 0 20 22 0 1 52 0 16 0 52 4 0 2 48 1 5 4 32 28 0 20 3 0 1 53 0 16 0 52 4 0 2 48 1 5 20 54 0 16 9 16 16 16 0 48 3 5 3 32 43 0 20 3 0 1 55 0 16 0 52 4 0 2 48 1 5 20 56 0 16 8 16 7 51 57 0 1 13 1 6 1 7 1 11 1 5 1 0 1 9 48 3 5 3 32 109 0 16 11 33 42 0 20 3 0 1 58 0 16 0 52 4 0 2 48 1 5 20 49 0 16 5 16 6 16 7 52 47 0 2 51 59 0 1 0 1 9 48 3 5 3 32 62 0 16 6 16 7 52 47 0 2 17 13 20 51 0 16 5 16 13 48 2 17 14 16 14 52 2 0 1 33 19 0 20 3 0 1 60 0 16 0 52 4 0 2 48 1 5 4 32 13 0 20 54 0 16 9 16 14 16 0 48 3 5 3 50)} "bind-client-route-link" {:upvalue-count 0 :arity 2 :constants ("bind-client-route-click" {:upvalue-count 2 :arity 0 :constants ("bind-boost-link") :bytecode (20 0 0 18 0 18 1 49 2 50)}) :bytecode (20 0 0 16 0 16 1 51 1 0 1 0 1 1 49 3 50)} "process-sse" {:upvalue-count 0 :arity 1 :constants ("for-each" {:upvalue-count 0 :arity 1 :constants ("not" "is-processed?" "sse" "mark-processed!" "bind-sse") :bytecode (20 1 0 16 0 1 2 0 48 2 52 0 0 1 33 21 0 20 3 0 16 0 1 2 0 48 2 5 20 4 0 16 0 49 1 32 1 0 2 50)} "dom-query-all" "dom-body" "[sx-sse]") :bytecode (51 1 0 20 2 0 16 0 6 34 6 0 5 20 3 0 48 0 1 4 0 48 2 52 0 0 2 50)} "bind-sse" {:upvalue-count 0 :arity 1 :constants ("dom-get-attr" "sx-sse" "event-source-connect" "parse-sse-swap" "event-source-listen" {:upvalue-count 1 :arity 1 :constants ("bind-sse-swap") :bytecode (20 0 0 18 0 16 0 49 2 50)}) :bytecode (20 0 0 16 0 1 1 0 48 2 17 1 16 1 33 37 0 20 2 0 16 1 16 0 48 2 17 2 20 3 0 16 0 48 1 17 3 20 4 0 16 2 16 3 51 5 0 1 0 49 3 32 1 0 2 50)} "bind-sse-swap" {:upvalue-count 0 :arity 2 :constants ("resolve-target" "parse-swap-spec" "dom-get-attr" "sx-swap" "dom-has-class?" "dom-body" "sx-transitions" "get" "style" "transition" "trim" "not" "empty?" "dispose-islands-in" "starts-with?" "(" "sx-render" "dom-create-element" "div" "dom-append" "with-transition" {:upvalue-count 3 :arity 0 :constants ("swap-dom-nodes" "children-to-fragment" "post-swap") :bytecode (20 0 0 18 0 20 1 0 18 1 48 1 18 2 48 3 5 20 2 0 18 0 49 1 50)} {:upvalue-count 3 :arity 0 :constants ("swap-html-string" "post-swap") :bytecode (20 0 0 18 0 18 1 18 2 48 3 5 20 1 0 18 0 49 1 50)}) :bytecode (20 0 0 16 0 48 1 17 2 20 1 0 20 2 0 16 0 1 3 0 48 2 20 4 0 20 5 0 48 0 1 6 0 48 2 48 2 17 3 16 3 1 8 0 52 7 0 2 17 4 16 3 1 9 0 52 7 0 2 17 5 16 1 52 10 0 1 17 6 16 6 52 12 0 1 52 11 0 1 33 88 0 20 13 0 16 2 48 1 5 16 6 1 15 0 52 14 0 2 33 49 0 20 16 0 16 6 48 1 17 7 20 17 0 1 18 0 2 48 2 17 8 20 19 0 16 8 16 7 48 2 5 20 20 0 16 5 51 21 0 1 2 1 8 1 4 49 2 32 16 0 20 20 0 16 5 51 22 0 1 2 1 6 1 4 49 2 32 1 0 2 50)} "bind-inline-handlers" {:upvalue-count 0 :arity 1 :constants ("for-each" {:upvalue-count 0 :arity 1 :constants ("for-each" {:upvalue-count 1 :arity 1 :constants ("first" "nth" 1 "starts-with?" "sx-on:" "slice" 6 "not" "is-processed?" "str" "on:" "mark-processed!" "sx-parse" "dom-on" {:upvalue-count 2 :arity 1 :constants ("env-extend" "dict" "env-bind!" "event" "this" "detail" "event-detail" "for-each" {:upvalue-count 1 :arity 1 :constants ("eval-expr") :bytecode (20 0 0 16 0 18 0 49 2 50)}) :bytecode (20 0 0 52 1 0 0 48 1 17 1 20 2 0 16 1 1 3 0 16 0 48 3 5 20 2 0 16 1 1 4 0 18 0 48 3 5 20 2 0 16 1 1 5 0 20 6 0 16 0 48 1 48 3 5 51 8 0 1 1 18 1 52 7 0 2 50)}) :bytecode (16 0 52 0 0 1 17 1 16 0 1 2 0 52 1 0 2 17 2 16 1 1 4 0 52 3 0 2 33 83 0 16 1 1 6 0 52 5 0 2 17 3 20 8 0 18 0 1 10 0 16 3 52 9 0 2 48 2 52 7 0 1 33 45 0 20 11 0 18 0 1 10 0 16 3 52 9 0 2 48 2 5 20 12 0 16 2 48 1 17 4 20 13 0 18 0 16 3 51 14 0 0 0 1 4 49 3 32 1 0 2 32 1 0 2 50)} "dom-attr-list") :bytecode (51 1 0 1 0 20 2 0 16 0 48 1 52 0 0 2 50)} "dom-query-all" "dom-body" "[sx-on\\:]") :bytecode (51 1 0 20 2 0 16 0 6 34 6 0 5 20 3 0 48 0 1 4 0 48 2 52 0 0 2 50)} "bind-preload-for" {:upvalue-count 0 :arity 1 :constants ("dom-get-attr" "sx-preload" "=" "mousedown" "list" "touchstart" "mouseover" 0 100 "bind-preload" {:upvalue-count 1 :arity 0 :constants ("get-verb-info" "do-preload" "get" "url" "build-request-headers" "loaded-component-names" "_css-hash") :bytecode (20 0 0 18 0 48 1 17 0 16 0 33 32 0 20 1 0 16 0 1 3 0 52 2 0 2 20 4 0 18 0 20 5 0 48 0 20 6 0 48 3 49 2 32 1 0 2 50)}) :bytecode (20 0 0 16 0 1 1 0 48 2 17 1 16 1 33 76 0 16 1 1 3 0 52 2 0 2 33 13 0 1 3 0 1 5 0 52 4 0 2 32 7 0 1 6 0 52 4 0 1 17 2 16 1 1 3 0 52 2 0 2 33 6 0 1 7 0 32 3 0 1 8 0 17 3 20 9 0 16 0 16 2 16 3 51 10 0 1 0 49 4 32 1 0 2 50)} "do-preload" {:upvalue-count 0 :arity 2 :constants ("nil?" "preload-cache-get" "_preload-cache" "fetch-preload") :bytecode (20 1 0 20 2 0 16 0 48 2 52 0 0 1 33 15 0 20 3 0 16 0 16 1 20 2 0 49 3 32 1 0 2 50)} "VERB_SELECTOR" "str" "[sx-get],[sx-post],[sx-put],[sx-delete],[sx-patch]" "process-elements" {:upvalue-count 0 :arity 1 :constants ("dom-query-all" "dom-body" "VERB_SELECTOR" "for-each" {:upvalue-count 0 :arity 1 :constants ("not" "is-processed?" "verb" "mark-processed!" "process-one") :bytecode (20 1 0 16 0 1 2 0 48 2 52 0 0 1 33 21 0 20 3 0 16 0 1 2 0 48 2 5 20 4 0 16 0 49 1 32 1 0 2 50)} "process-boosted" "process-sse" "bind-inline-handlers" "process-emit-elements") :bytecode (20 0 0 16 0 6 34 6 0 5 20 1 0 48 0 20 2 0 48 2 17 1 51 4 0 16 1 52 3 0 2 5 20 5 0 16 0 48 1 5 20 6 0 16 0 48 1 5 20 7 0 16 0 48 1 5 20 8 0 16 0 49 1 50)} "process-one" {:upvalue-count 0 :arity 1 :constants ("get-verb-info" "not" "dom-has-attr?" "sx-disable" "bind-triggers" "bind-preload-for") :bytecode (20 0 0 16 0 48 1 17 1 16 1 33 41 0 20 2 0 16 0 1 3 0 48 2 52 1 0 1 33 20 0 20 4 0 16 0 16 1 48 2 5 20 5 0 16 0 49 1 32 1 0 2 32 1 0 2 50)} "process-emit-elements" {:upvalue-count 0 :arity 1 :constants ("dom-query-all" "dom-body" "[data-sx-emit]" "for-each" {:upvalue-count 0 :arity 1 :constants ("not" "is-processed?" "emit" "mark-processed!" "dom-get-attr" "data-sx-emit" "dom-on" "click" {:upvalue-count 2 :arity 1 :constants ("dom-get-attr" "data-sx-emit-detail" "json-parse" "dict" "dom-dispatch") :bytecode (20 0 0 18 0 1 1 0 48 2 17 1 16 1 33 10 0 20 2 0 16 1 48 1 32 4 0 52 3 0 0 17 2 20 4 0 18 0 18 1 16 2 49 3 50)}) :bytecode (20 1 0 16 0 1 2 0 48 2 52 0 0 1 33 52 0 20 3 0 16 0 1 2 0 48 2 5 20 4 0 16 0 1 5 0 48 2 17 1 16 1 33 20 0 20 6 0 16 0 1 7 0 51 8 0 1 0 1 1 49 3 32 1 0 2 32 1 0 2 50)}) :bytecode (20 0 0 16 0 6 34 6 0 5 20 1 0 48 0 1 2 0 48 2 17 1 51 4 0 16 1 52 3 0 2 50)} "handle-popstate" {:upvalue-count 0 :arity 1 :constants ("browser-location-href" "dom-query" "[sx-boost]" "dom-get-attr" "sx-boost" "not" "=" "true" "#main-panel" "url-pathname" "try-client-route" "browser-scroll-to" 0 "build-request-headers" "loaded-component-names" "_css-hash" "fetch-and-restore") :bytecode (20 0 0 48 0 17 1 20 1 0 1 2 0 48 1 17 2 16 2 33 44 0 20 3 0 16 2 1 4 0 48 2 17 4 16 4 6 33 14 0 5 16 4 1 7 0 52 6 0 2 52 5 0 1 33 5 0 16 4 32 1 0 2 32 1 0 2 17 3 16 3 6 34 4 0 5 1 8 0 17 3 20 1 0 16 3 48 1 17 4 20 9 0 16 1 48 1 17 5 16 4 33 58 0 20 10 0 16 5 16 3 48 2 33 13 0 20 11 0 1 12 0 16 0 49 2 32 30 0 20 13 0 16 4 20 14 0 48 0 20 15 0 48 3 17 6 20 16 0 16 4 16 1 16 6 16 0 49 4 32 1 0 2 50)} "engine-init" {:upvalue-count 0 :arity 0 :constants ("init-css-tracking" "sx-process-scripts" "sx-hydrate" "process-elements") :bytecode (20 0 0 48 0 5 20 1 0 2 48 1 5 20 2 0 2 48 1 5 20 3 0 2 49 1 50)}) :bytecode (52 1 0 0 128 0 0 5 1 3 0 128 2 0 5 51 5 0 128 4 0 5 51 7 0 128 6 0 5 51 9 0 128 8 0 5 51 11 0 128 10 0 5 51 13 0 128 12 0 5 51 15 0 128 14 0 5 51 17 0 128 16 0 5 51 19 0 128 18 0 5 51 21 0 128 20 0 5 51 23 0 128 22 0 5 51 25 0 128 24 0 5 51 27 0 128 26 0 5 51 29 0 128 28 0 5 51 31 0 128 30 0 5 51 33 0 128 32 0 5 51 35 0 128 34 0 5 51 37 0 128 36 0 5 52 1 0 0 128 38 0 5 1 40 0 128 39 0 5 51 42 0 128 41 0 5 51 44 0 128 43 0 5 51 46 0 128 45 0 5 51 48 0 128 47 0 5 51 50 0 128 49 0 5 51 52 0 128 51 0 5 51 54 0 128 53 0 5 52 1 0 0 128 55 0 5 51 57 0 128 56 0 5 51 59 0 128 58 0 5 51 61 0 128 60 0 5 51 63 0 128 62 0 5 3 128 64 0 5 52 66 0 0 128 65 0 5 51 68 0 128 67 0 5 51 70 0 128 69 0 5 51 72 0 128 71 0 5 51 74 0 128 73 0 5 51 76 0 128 75 0 5 51 78 0 128 77 0 5 51 80 0 128 79 0 5 51 82 0 128 81 0 5 51 84 0 128 83 0 5 51 86 0 128 85 0 5 51 88 0 128 87 0 5 51 90 0 128 89 0 5 51 92 0 128 91 0 5 51 94 0 128 93 0 5 51 96 0 128 95 0 5 51 98 0 128 97 0 5 51 100 0 128 99 0 5 51 102 0 128 101 0 5 1 105 0 52 104 0 1 128 103 0 5 51 107 0 128 106 0 5 51 109 0 128 108 0 5 51 111 0 128 110 0 5 51 113 0 128 112 0 5 51 115 0 128 114 0 50))) diff --git a/sx/sx/handlers/examples.sx b/sx/sx/handlers/examples.sx index c4d5d73a..b982cd93 100644 --- a/sx/sx/handlers/examples.sx +++ b/sx/sx/handlers/examples.sx @@ -1,795 +1,871 @@ -;; ========================================================================== -;; Example API endpoints — live demos for hypermedia examples pages -;; -;; Each defhandler with :path registers as a public route automatically. -;; OOB swaps show wire format and component source alongside each demo. -;; ========================================================================== +(define + search-languages + (list + "Python" + "JavaScript" + "TypeScript" + "Rust" + "Go" + "Java" + "C" + "C++" + "Ruby" + "Elixir" + "Haskell" + "Clojure" + "Scala" + "Kotlin" + "Swift" + "Zig" + "OCaml" + "Lua" + "Perl" + "PHP")) +(define value-select-data {:Languages (list "Python" "JavaScript" "Rust" "Go") :Databases (list "PostgreSQL" "Redis" "SQLite" "MongoDB") :Frameworks (list "Quart" "FastAPI" "React" "Svelte")}) -;; -------------------------------------------------------------------------- -;; Data constants (captured in handler closures) -;; -------------------------------------------------------------------------- - -(define search-languages - (list "Python" "JavaScript" "TypeScript" "Rust" "Go" "Java" "C" "C++" - "Ruby" "Elixir" "Haskell" "Clojure" "Scala" "Kotlin" "Swift" - "Zig" "OCaml" "Lua" "Perl" "PHP")) - -(define value-select-data - {"Languages" (list "Python" "JavaScript" "Rust" "Go") - "Frameworks" (list "Quart" "FastAPI" "React" "Svelte") - "Databases" (list "PostgreSQL" "Redis" "SQLite" "MongoDB")}) - -(define taken-emails +(define + taken-emails (list "admin@example.com" "test@example.com" "user@example.com")) -(define tab-content - {"tab1" "Welcome to the Overview tab. This is the default tab content loaded via sx-get." - "tab2" "Here are the details. Version: 1.0.0, Build: 2024-01-15, Engine: sx" - "tab3" "Recent history: Initial release, Added component caching, Wire format v2"}) +(define tab-content {:tab2 "Here are the details. Version: 1.0.0, Build: 2024-01-15, Engine: sx" :tab1 "Welcome to the Overview tab. This is the default tab content loaded via sx-get." :tab3 "Recent history: Initial release, Added component caching, Wire format v2"}) -(define kbd-actions - {"s" "Search panel activated" - "n" "New item created" - "h" "Help panel opened"}) +(define kbd-actions {:s "Search panel activated" :n "New item created" :h "Help panel opened"}) -(define anim-colors - (list "bg-violet-100" "bg-emerald-100" "bg-blue-100" "bg-amber-100" "bg-rose-100")) +(define + anim-colors + (list + "bg-violet-100" + "bg-emerald-100" + "bg-blue-100" + "bg-amber-100" + "bg-rose-100")) -(define edit-row-defaults - {"1" {"id" "1" "name" "Widget A" "price" "19.99" "stock" "142"} - "2" {"id" "2" "name" "Widget B" "price" "24.50" "stock" "89"} - "3" {"id" "3" "name" "Widget C" "price" "12.00" "stock" "305"} - "4" {"id" "4" "name" "Widget D" "price" "45.00" "stock" "67"}}) +(define edit-row-defaults {:1 {:stock "142" :id "1" :price "19.99" :name "Widget A"} :2 {:stock "89" :id "2" :price "24.50" :name "Widget B"} :3 {:stock "305" :id "3" :price "12.00" :name "Widget C"} :4 {:stock "67" :id "4" :price "45.00" :name "Widget D"}}) -(define bulk-user-defaults - {"1" {"id" "1" "name" "Alice Chen" "email" "alice@example.com" "status" "active"} - "2" {"id" "2" "name" "Bob Rivera" "email" "bob@example.com" "status" "inactive"} - "3" {"id" "3" "name" "Carol Zhang" "email" "carol@example.com" "status" "active"} - "4" {"id" "4" "name" "Dan Okafor" "email" "dan@example.com" "status" "inactive"} - "5" {"id" "5" "name" "Eve Larsson" "email" "eve@example.com" "status" "active"}}) +(define bulk-user-defaults {:1 {:email "alice@example.com" :status "active" :id "1" :name "Alice Chen"} :2 {:email "bob@example.com" :status "inactive" :id "2" :name "Bob Rivera"} :3 {:email "carol@example.com" :status "active" :id "3" :name "Carol Zhang"} :5 {:email "eve@example.com" :status "active" :id "5" :name "Eve Larsson"} :4 {:email "dan@example.com" :status "inactive" :id "4" :name "Dan Okafor"}}) - -;; -------------------------------------------------------------------------- -;; Click to Load -;; -------------------------------------------------------------------------- - -(defhandler ex-click +(defhandler + ex-click :path "/sx/(geography.(hypermedia.(example.(api.click))))" :method :get :returns "element" (&key) - (let ((now (helper "now" "%Y-%m-%d %H:%M:%S"))) + (let + ((now (helper "now" "%Y-%m-%d %H:%M:%S"))) (<> (~examples/click-result :time now) - (~docs/oob-code :target-id "click-comp" + (~docs/oob-code + :target-id "click-comp" :text (helper "component-source" "~examples/click-result")) - (~docs/oob-code :target-id "click-wire" + (~docs/oob-code + :target-id "click-wire" :text (str "(~examples/click-result :time \"" now "\")"))))) - -;; -------------------------------------------------------------------------- -;; Form Submission -;; -------------------------------------------------------------------------- - -(defhandler ex-form +(defhandler + ex-form :path "/sx/(geography.(hypermedia.(example.(api.form))))" :method :post :csrf false :returns "element" (&key) - (let ((name (helper "request-form" "name" ""))) + (let + ((name (helper "request-form" "name" ""))) (<> (~examples/form-result :name name) - (~docs/oob-code :target-id "form-comp" + (~docs/oob-code + :target-id "form-comp" :text (helper "component-source" "~examples/form-result")) - (~docs/oob-code :target-id "form-wire" + (~docs/oob-code + :target-id "form-wire" :text (str "(~examples/form-result :name \"" name "\")"))))) - -;; -------------------------------------------------------------------------- -;; Polling -;; -------------------------------------------------------------------------- - -(defhandler ex-poll +(defhandler + ex-poll :path "/sx/(geography.(hypermedia.(example.(api.poll))))" :method :get :returns "element" (&key) - (let ((prev (helper "state-get" "ex-poll-n" 0))) - (let ((n (+ prev 1))) - (helper "state-set!" "ex-poll-n" n) - (let ((now (helper "now" "%H:%M:%S")) - (count (if (< n 10) n 10))) - (<> - (~examples/poll-result :time now :count count) - (~docs/oob-code :target-id "poll-comp" - :text (helper "component-source" "~examples/poll-result")) - (~docs/oob-code :target-id "poll-wire" - :text (str "(~examples/poll-result :time \"" now "\" :count " count ")"))))))) + (let + ((prev (helper "state-get" "ex-poll-n" 0))) + (let + ((n (+ prev 1))) + (helper "state-set!" "ex-poll-n" n) + (let + ((now (helper "now" "%H:%M:%S")) (count (if (< n 10) n 10))) + (<> + (~examples/poll-result :time now :count count) + (~docs/oob-code + :target-id "poll-comp" + :text (helper "component-source" "~examples/poll-result")) + (~docs/oob-code + :target-id "poll-wire" + :text (str "(~examples/poll-result :time \"" now "\" :count " count ")"))))))) - -;; -------------------------------------------------------------------------- -;; Delete Row -;; -------------------------------------------------------------------------- - -(defhandler ex-delete +(defhandler + ex-delete :path "/sx/(geography.(hypermedia.(example.(api.(delete.)))))" :method :delete :csrf false :returns "element" (&key item-id) (<> - (~docs/oob-code :target-id "delete-comp" + (~docs/oob-code + :target-id "delete-comp" :text (helper "component-source" "~examples/delete-row")) - (~docs/oob-code :target-id "delete-wire" + (~docs/oob-code + :target-id "delete-wire" :text "(empty — row removed by outerHTML swap)"))) - -;; -------------------------------------------------------------------------- -;; Inline Edit -;; -------------------------------------------------------------------------- - -(defhandler ex-edit-form +(defhandler + ex-edit-form :path "/sx/(geography.(hypermedia.(example.(api.edit))))" :method :get :returns "element" (&key) - (let ((value (helper "request-arg" "value" ""))) + (let + ((value (helper "request-arg" "value" ""))) (<> (~examples/inline-edit-form :value value) - (~docs/oob-code :target-id "edit-comp" + (~docs/oob-code + :target-id "edit-comp" :text (helper "component-source" "~examples/inline-edit-form")) - (~docs/oob-code :target-id "edit-wire" + (~docs/oob-code + :target-id "edit-wire" :text (str "(~examples/inline-edit-form :value \"" value "\")"))))) -(defhandler ex-edit-save +(defhandler + ex-edit-save :path "/sx/(geography.(hypermedia.(example.(api.edit))))" :method :post :csrf false :returns "element" (&key) - (let ((value (helper "request-form" "value" ""))) + (let + ((value (helper "request-form" "value" ""))) (<> (~examples/inline-view :value value) - (~docs/oob-code :target-id "edit-comp" + (~docs/oob-code + :target-id "edit-comp" :text (helper "component-source" "~examples/inline-view")) - (~docs/oob-code :target-id "edit-wire" + (~docs/oob-code + :target-id "edit-wire" :text (str "(~examples/inline-view :value \"" value "\")"))))) -(defhandler ex-edit-cancel +(defhandler + ex-edit-cancel :path "/sx/(geography.(hypermedia.(example.(api.edit-cancel))))" :method :get :returns "element" (&key) - (let ((value (helper "request-arg" "value" ""))) + (let + ((value (helper "request-arg" "value" ""))) (<> (~examples/inline-view :value value) - (~docs/oob-code :target-id "edit-comp" + (~docs/oob-code + :target-id "edit-comp" :text (helper "component-source" "~examples/inline-view")) - (~docs/oob-code :target-id "edit-wire" + (~docs/oob-code + :target-id "edit-wire" :text (str "(~examples/inline-view :value \"" value "\")"))))) - -;; -------------------------------------------------------------------------- -;; Out-of-Band Swaps -;; -------------------------------------------------------------------------- - -(defhandler ex-oob +(defhandler + ex-oob :path "/sx/(geography.(hypermedia.(example.(api.oob))))" :method :get :returns "element" (&key) - (let ((now (helper "now" "%H:%M:%S"))) + (let + ((now (helper "now" "%H:%M:%S"))) (<> (p :class "text-emerald-600 font-medium" "Box A updated!") (p :class "text-sm text-stone-500" (str "at " now)) - (div :id "oob-box-b" :sx-swap-oob "innerHTML" + (div + :id "oob-box-b" + :sx-swap-oob "innerHTML" (p :class "text-violet-600 font-medium" "Box B updated via OOB!") (p :class "text-sm text-stone-500" (str "at " now))) - (~docs/oob-code :target-id "oob-wire" - :text (str "(<> (p ... \"Box A updated!\") (div :id \"oob-box-b\" :sx-swap-oob \"innerHTML\" (p ... \"Box B updated!\")))"))))) + (~docs/oob-code + :target-id "oob-wire" + :text (str + "(<> (p ... \"Box A updated!\") (div :id \"oob-box-b\" :sx-swap-oob \"innerHTML\" (p ... \"Box B updated!\")))"))))) - -;; -------------------------------------------------------------------------- -;; Lazy Loading -;; -------------------------------------------------------------------------- - -(defhandler ex-lazy +(defhandler + ex-lazy :path "/sx/(geography.(hypermedia.(example.(api.lazy))))" :method :get :returns "element" (&key) - (let ((now (helper "now" "%H:%M:%S"))) + (let + ((now (helper "now" "%H:%M:%S"))) (<> (~examples/lazy-result :time now) - (~docs/oob-code :target-id "lazy-comp" + (~docs/oob-code + :target-id "lazy-comp" :text (helper "component-source" "~examples/lazy-result")) - (~docs/oob-code :target-id "lazy-wire" + (~docs/oob-code + :target-id "lazy-wire" :text (str "(~examples/lazy-result :time \"" now "\")"))))) - -;; -------------------------------------------------------------------------- -;; Infinite Scroll -;; -------------------------------------------------------------------------- - -(defhandler ex-scroll +(defhandler + ex-scroll :path "/sx/(geography.(hypermedia.(example.(api.scroll))))" :method :get :returns "element" (&key) - (let ((page (helper "request-arg" "page" "2"))) - (let ((pg (parse-int page)) - (start (+ (* (- (parse-int page) 1) 5) 1))) + (let + ((page (helper "request-arg" "page" "2"))) + (let + ((pg (parse-int page)) (start (+ (* (- (parse-int page) 1) 5) 1))) (<> - (map (fn (i) - (div :class "px-4 py-3 border-b border-stone-100 text-sm text-stone-700" - (str "Item " i " — loaded from page " page))) + (map + (fn + (i) + (div + :class "px-4 py-3 border-b border-stone-100 text-sm text-stone-700" + (str "Item " i " — loaded from page " page))) (range start (+ start 5))) - (if (<= (+ pg 1) 6) - (div :id "scroll-sentinel" - :sx-get (str "/sx/(geography.(hypermedia.(example.(api.scroll))))?page=" (+ pg 1)) + (if + (<= (+ pg 1) 6) + (div + :id "scroll-sentinel" + :sx-get (str + "/sx/(geography.(hypermedia.(example.(api.scroll))))?page=" + (+ pg 1)) :sx-trigger "intersect once" :sx-target "#scroll-items" :sx-swap "beforeend" :class "p-3 text-center text-stone-400 text-sm" "Loading more...") - (div :class "p-3 text-center text-stone-500 text-sm font-medium" + (div + :class "p-3 text-center text-stone-500 text-sm font-medium" "All items loaded.")) - (~docs/oob-code :target-id "scroll-wire" + (~docs/oob-code + :target-id "scroll-wire" :text (str "(items for page " page " + sentinel)")))))) - -;; -------------------------------------------------------------------------- -;; Progress Bar -;; -------------------------------------------------------------------------- - -(defhandler ex-progress-start +(defhandler + ex-progress-start :path "/sx/(geography.(hypermedia.(example.(api.progress-start))))" :method :post :csrf false :returns "element" (&key) - (let ((prev-job (helper "state-get" "ex-job-counter" 0))) - (let ((n (+ prev-job 1))) - (helper "state-set!" "ex-job-counter" n) - (let ((job-id (str "job-" n))) - (helper "state-set!" (str "ex-job-" job-id) 0) - (<> - (~examples/progress-status :percent 0 :job-id job-id) - (~docs/oob-code :target-id "progress-comp" - :text (helper "component-source" "~examples/progress-status")) - (~docs/oob-code :target-id "progress-wire" - :text (str "(~examples/progress-status :percent 0 :job-id \"" job-id "\")"))))))) + (let + ((prev-job (helper "state-get" "ex-job-counter" 0))) + (let + ((n (+ prev-job 1))) + (helper "state-set!" "ex-job-counter" n) + (let + ((job-id (str "job-" n))) + (helper "state-set!" (str "ex-job-" job-id) 0) + (<> + (~examples/progress-status :percent 0 :job-id job-id) + (~docs/oob-code + :target-id "progress-comp" + :text (helper "component-source" "~examples/progress-status")) + (~docs/oob-code + :target-id "progress-wire" + :text (str "(~examples/progress-status :percent 0 :job-id \"" job-id "\")"))))))) -(defhandler ex-progress-status +(defhandler + ex-progress-status :path "/sx/(geography.(hypermedia.(example.(api.progress-status))))" :method :get :returns "element" (&key) - (let ((job-id (helper "request-arg" "job" ""))) - (let ((current (helper "state-get" (str "ex-job-" job-id) 0))) - (let ((next (if (>= (+ current (random-int 15 30)) 100) 100 (+ current (random-int 15 30))))) + (let + ((job-id (helper "request-arg" "job" ""))) + (let + ((current (helper "state-get" (str "ex-job-" job-id) 0))) + (let + ((next (if (>= (+ current (random-int 15 30)) 100) 100 (+ current (random-int 15 30))))) (helper "state-set!" (str "ex-job-" job-id) next) (<> (~examples/progress-status :percent next :job-id job-id) - (~docs/oob-code :target-id "progress-comp" + (~docs/oob-code + :target-id "progress-comp" :text (helper "component-source" "~examples/progress-status")) - (~docs/oob-code :target-id "progress-wire" - :text (str "(~examples/progress-status :percent " next " :job-id \"" job-id "\")"))))))) + (~docs/oob-code + :target-id "progress-wire" + :text (str + "(~examples/progress-status :percent " + next + " :job-id \"" + job-id + "\")"))))))) - -;; -------------------------------------------------------------------------- -;; Active Search -;; -------------------------------------------------------------------------- - -(defhandler ex-search +(defhandler + ex-search :path "/sx/(geography.(hypermedia.(example.(api.search))))" :method :get :returns "element" (&key) - (let ((q (helper "request-arg" "q" ""))) - (let ((results (if (= q "") - search-languages - (filter (fn (lang) (contains? (lower lang) (lower q))) - search-languages)))) + (let + ((q (helper "request-arg" "q" ""))) + (let + ((results (if (= q "") search-languages (filter (fn (lang) (contains? (lower lang) (lower q))) search-languages)))) (<> (~examples/search-results :items results :query q) - (~docs/oob-code :target-id "search-comp" + (~docs/oob-code + :target-id "search-comp" :text (helper "component-source" "~examples/search-results")) - (~docs/oob-code :target-id "search-wire" + (~docs/oob-code + :target-id "search-wire" :text (str "(~examples/search-results :items (list ...) :query \"" q "\")")))))) - -;; -------------------------------------------------------------------------- -;; Inline Validation -;; -------------------------------------------------------------------------- - -(defhandler ex-validate +(defhandler + ex-validate :path "/sx/(geography.(hypermedia.(example.(api.validate))))" :method :get :returns "element" (&key) - (let ((email (helper "request-arg" "email" ""))) + (let + ((email (helper "request-arg" "email" ""))) (cond (= email "") - (<> - (~examples/validation-error :message "Email is required") - (~docs/oob-code :target-id "validate-comp" - :text (helper "component-source" "~examples/validation-error")) - (~docs/oob-code :target-id "validate-wire" - :text "(~examples/validation-error :message \"Email is required\")")) + (<> + (~examples/validation-error :message "Email is required") + (~docs/oob-code + :target-id "validate-comp" + :text (helper "component-source" "~examples/validation-error")) + (~docs/oob-code + :target-id "validate-wire" + :text "(~examples/validation-error :message \"Email is required\")")) (not (contains? email "@")) - (<> - (~examples/validation-error :message "Invalid email format") - (~docs/oob-code :target-id "validate-comp" - :text (helper "component-source" "~examples/validation-error")) - (~docs/oob-code :target-id "validate-wire" - :text "(~examples/validation-error :message \"Invalid email format\")")) + (<> + (~examples/validation-error :message "Invalid email format") + (~docs/oob-code + :target-id "validate-comp" + :text (helper "component-source" "~examples/validation-error")) + (~docs/oob-code + :target-id "validate-wire" + :text "(~examples/validation-error :message \"Invalid email format\")")) (some (fn (e) (= (lower e) (lower email))) taken-emails) - (<> - (~examples/validation-error :message (str email " is already taken")) - (~docs/oob-code :target-id "validate-comp" - :text (helper "component-source" "~examples/validation-error")) - (~docs/oob-code :target-id "validate-wire" - :text (str "(~examples/validation-error :message \"" email " is already taken\")"))) - :else - (<> - (~examples/validation-ok :email email) - (~docs/oob-code :target-id "validate-comp" - :text (helper "component-source" "~examples/validation-ok")) - (~docs/oob-code :target-id "validate-wire" - :text (str "(~examples/validation-ok :email \"" email "\")")))))) + (<> + (~examples/validation-error :message (str email " is already taken")) + (~docs/oob-code + :target-id "validate-comp" + :text (helper "component-source" "~examples/validation-error")) + (~docs/oob-code + :target-id "validate-wire" + :text (str + "(~examples/validation-error :message \"" + email + " is already taken\")"))) + :else (<> + (~examples/validation-ok :email email) + (~docs/oob-code + :target-id "validate-comp" + :text (helper "component-source" "~examples/validation-ok")) + (~docs/oob-code + :target-id "validate-wire" + :text (str "(~examples/validation-ok :email \"" email "\")")))))) - -(defhandler ex-validate-submit +(defhandler + ex-validate-submit :path "/sx/(geography.(hypermedia.(example.(api.validate-submit))))" :method :post :csrf false :returns "element" (&key) - (let ((email (helper "request-form" "email" ""))) - (if (or (= email "") (not (contains? email "@"))) + (let + ((email (helper "request-form" "email" ""))) + (if + (or (= email "") (not (contains? email "@"))) (p :class "text-sm text-rose-600 mt-2" "Please enter a valid email.") - (p :class "text-sm text-emerald-600 mt-2" (str "Form submitted with: " email))))) + (p + :class "text-sm text-emerald-600 mt-2" + (str "Form submitted with: " email))))) - -;; -------------------------------------------------------------------------- -;; Value Select -;; -------------------------------------------------------------------------- - -(defhandler ex-values +(defhandler + ex-values :path "/sx/(geography.(hypermedia.(example.(api.values))))" :method :get :returns "element" (&key) - (let ((cat (helper "request-arg" "category" ""))) - (let ((items (get value-select-data cat (list)))) + (let + ((cat (helper "request-arg" "category" ""))) + (let + ((items (get value-select-data cat (list)))) (<> - (if (empty? items) + (if + (empty? items) (option :value "" "No items") (map (fn (i) (option :value i i)) items)) - (~docs/oob-code :target-id "values-wire" + (~docs/oob-code + :target-id "values-wire" :text (str "(options for \"" cat "\")")))))) - -;; -------------------------------------------------------------------------- -;; Reset on Submit -;; -------------------------------------------------------------------------- - -(defhandler ex-reset-submit +(defhandler + ex-reset-submit :path "/sx/(geography.(hypermedia.(example.(api.reset-submit))))" :method :post :csrf false :returns "element" (&key) - (let ((msg (helper "request-form" "message" "(empty)")) - (now (helper "now" "%H:%M:%S"))) + (let + ((msg (helper "request-form" "message" "(empty)")) + (now (helper "now" "%H:%M:%S"))) (<> (~examples/reset-message :message msg :time now) - (~docs/oob-code :target-id "reset-comp" + (~docs/oob-code + :target-id "reset-comp" :text (helper "component-source" "~examples/reset-message")) - (~docs/oob-code :target-id "reset-wire" + (~docs/oob-code + :target-id "reset-wire" :text (str "(~examples/reset-message :message \"" msg "\" :time \"" now "\")"))))) - -;; -------------------------------------------------------------------------- -;; Edit Row -;; -------------------------------------------------------------------------- - -(defhandler ex-editrow-form +(defhandler + ex-editrow-form :path "/sx/(geography.(hypermedia.(example.(api.(editrow.)))))" :method :get :returns "element" (&key row-id) - (let ((default (get edit-row-defaults row-id {"id" row-id "name" "" "price" "0" "stock" "0"}))) - (let ((row (helper "state-get" (str "ex-row-" row-id) default))) + (let + ((default (get edit-row-defaults row-id {:stock "0" :id row-id :price "0" :name ""}))) + (let + ((row (helper "state-get" (str "ex-row-" row-id) default))) (<> - (~examples/edit-row-form :id (get row "id") :name (get row "name") - :price (get row "price") :stock (get row "stock")) - (~docs/oob-code :target-id "editrow-comp" + (~examples/edit-row-form + :id (get row "id") + :name (get row "name") + :price (get row "price") + :stock (get row "stock")) + (~docs/oob-code + :target-id "editrow-comp" :text (helper "component-source" "~examples/edit-row-form")) - (~docs/oob-code :target-id "editrow-wire" + (~docs/oob-code + :target-id "editrow-wire" :text (str "(~examples/edit-row-form :id \"" (get row "id") "\" ...)")))))) -(defhandler ex-editrow-save +(defhandler + ex-editrow-save :path "/sx/(geography.(hypermedia.(example.(api.(editrow.)))))" :method :post :csrf false :returns "element" (&key row-id) - (let ((name (helper "request-form" "name" "")) - (price (helper "request-form" "price" "0")) - (stock (helper "request-form" "stock" "0"))) - (helper "state-set!" (str "ex-row-" row-id) - {"id" row-id "name" name "price" price "stock" stock}) + (let + ((name (helper "request-form" "name" "")) + (price (helper "request-form" "price" "0")) + (stock (helper "request-form" "stock" "0"))) + (helper "state-set!" (str "ex-row-" row-id) {:stock stock :id row-id :price price :name name}) (<> (~examples/edit-row-view :id row-id :name name :price price :stock stock) - (~docs/oob-code :target-id "editrow-comp" + (~docs/oob-code + :target-id "editrow-comp" :text (helper "component-source" "~examples/edit-row-view")) - (~docs/oob-code :target-id "editrow-wire" + (~docs/oob-code + :target-id "editrow-wire" :text (str "(~examples/edit-row-view :id \"" row-id "\" ...)"))))) -(defhandler ex-editrow-cancel +(defhandler + ex-editrow-cancel :path "/sx/(geography.(hypermedia.(example.(api.(editrow-cancel.)))))" :method :get :returns "element" (&key row-id) - (let ((default (get edit-row-defaults row-id {"id" row-id "name" "" "price" "0" "stock" "0"}))) - (let ((row (helper "state-get" (str "ex-row-" row-id) default))) + (let + ((default (get edit-row-defaults row-id {:stock "0" :id row-id :price "0" :name ""}))) + (let + ((row (helper "state-get" (str "ex-row-" row-id) default))) (<> - (~examples/edit-row-view :id (get row "id") :name (get row "name") - :price (get row "price") :stock (get row "stock")) - (~docs/oob-code :target-id "editrow-comp" + (~examples/edit-row-view + :id (get row "id") + :name (get row "name") + :price (get row "price") + :stock (get row "stock")) + (~docs/oob-code + :target-id "editrow-comp" :text (helper "component-source" "~examples/edit-row-view")) - (~docs/oob-code :target-id "editrow-wire" + (~docs/oob-code + :target-id "editrow-wire" :text (str "(~examples/edit-row-view :id \"" (get row "id") "\" ...)")))))) -;; -------------------------------------------------------------------------- -;; Bulk Update -;; -------------------------------------------------------------------------- - -(defhandler ex-bulk +(defhandler + ex-bulk :path "/sx/(geography.(hypermedia.(example.(api.bulk))))" :method :post :csrf false :returns "element" (&key) - (let ((action (helper "request-arg" "action" "activate")) - (ids (helper "request-form-list" "ids"))) - (let ((new-status (if (= action "activate") "active" "inactive"))) - ;; Update matching users in state - (for-each (fn (uid) - (let ((default (get bulk-user-defaults uid nil))) - (let ((user (helper "state-get" (str "ex-bulk-" uid) default))) - (when user - (helper "state-set!" (str "ex-bulk-" uid) - (assoc user "status" new-status)))))) + (let + ((action (helper "request-arg" "action" "activate")) + (ids (helper "request-form-list" "ids"))) + (let + ((new-status (if (= action "activate") "active" "inactive"))) + (for-each + (fn + (uid) + (let + ((default (get bulk-user-defaults uid nil))) + (let + ((user (helper "state-get" (str "ex-bulk-" uid) default))) + (when + user + (helper + "state-set!" + (str "ex-bulk-" uid) + (assoc user "status" new-status)))))) ids) - ;; Return all rows - (let ((rows (map (fn (uid) - (let ((default (get bulk-user-defaults uid - {"id" uid "name" "" "email" "" "status" "active"}))) - (let ((u (helper "state-get" (str "ex-bulk-" uid) default))) - (~examples/bulk-row :id (get u "id") :name (get u "name") - :email (get u "email") :status (get u "status"))))) - (list "1" "2" "3" "4" "5")))) + (let + ((rows (map (fn (uid) (let ((default (get bulk-user-defaults uid {:email "" :status "active" :id uid :name ""}))) (let ((u (helper "state-get" (str "ex-bulk-" uid) default))) (~examples/bulk-row :id (get u "id") :name (get u "name") :email (get u "email") :status (get u "status"))))) (list "1" "2" "3" "4" "5")))) (<> rows - (~docs/oob-code :target-id "bulk-comp" + (~docs/oob-code + :target-id "bulk-comp" :text (helper "component-source" "~examples/bulk-row")) - (~docs/oob-code :target-id "bulk-wire" + (~docs/oob-code + :target-id "bulk-wire" :text (str "(updated " (len ids) " users to " new-status ")"))))))) - -;; -------------------------------------------------------------------------- -;; Swap Positions -;; -------------------------------------------------------------------------- - -(defhandler ex-swap-log +(defhandler + ex-swap-log :path "/sx/(geography.(hypermedia.(example.(api.swap-log))))" :method :post :csrf false :returns "element" (&key) - (let ((mode (helper "request-arg" "mode" "beforeend")) - (prev-swap (helper "state-get" "ex-swap-n" 0)) - (now (helper "now" "%H:%M:%S"))) - (let ((n (+ prev-swap 1))) - (helper "state-set!" "ex-swap-n" n) - (<> - (div :class "px-3 py-2 text-sm text-stone-700" - (str "[" now "] " mode " (#" n ")")) - (span :id "swap-counter" :sx-swap-oob "innerHTML" - :class "self-center text-sm text-stone-500" - (str "Count: " n)) - (~docs/oob-code :target-id "swap-wire" - :text (str "(entry + oob counter: " n ")")))))) + (let + ((mode (helper "request-arg" "mode" "beforeend")) + (prev-swap (helper "state-get" "ex-swap-n" 0)) + (now (helper "now" "%H:%M:%S"))) + (let + ((n (+ prev-swap 1))) + (helper "state-set!" "ex-swap-n" n) + (<> + (div + :class "px-3 py-2 text-sm text-stone-700" + (str "[" now "] " mode " (#" n ")")) + (span + :id "swap-counter" + :sx-swap-oob "innerHTML" + :class "self-center text-sm text-stone-500" + (str "Count: " n)) + (~docs/oob-code + :target-id "swap-wire" + :text (str "(entry + oob counter: " n ")")))))) - -;; -------------------------------------------------------------------------- -;; Select Filter (Dashboard) -;; -------------------------------------------------------------------------- - -(defhandler ex-dashboard +(defhandler + ex-dashboard :path "/sx/(geography.(hypermedia.(example.(api.dashboard))))" :method :get :returns "element" (&key) - (let ((now (helper "now" "%H:%M:%S"))) + (let + ((now (helper "now" "%H:%M:%S"))) (<> - (div :id "dash-header" :class "p-3 bg-violet-50 rounded mb-3" + (div + :id "dash-header" + :class "p-3 bg-violet-50 rounded mb-3" (h4 :class "font-semibold text-violet-800" "Dashboard Header") (p :class "text-sm text-violet-600" (str "Generated at " now))) - (div :id "dash-stats" :class "grid grid-cols-3 gap-3 mb-3" - (div :class "p-3 bg-emerald-50 rounded text-center" + (div + :id "dash-stats" + :class "grid grid-cols-3 gap-3 mb-3" + (div + :class "p-3 bg-emerald-50 rounded text-center" (p :class "text-2xl font-bold text-emerald-700" "142") (p :class "text-xs text-emerald-600" "Users")) - (div :class "p-3 bg-blue-50 rounded text-center" + (div + :class "p-3 bg-blue-50 rounded text-center" (p :class "text-2xl font-bold text-blue-700" "89") (p :class "text-xs text-blue-600" "Orders")) - (div :class "p-3 bg-amber-50 rounded text-center" + (div + :class "p-3 bg-amber-50 rounded text-center" (p :class "text-2xl font-bold text-amber-700" "$4.2k") (p :class "text-xs text-amber-600" "Revenue"))) - (div :id "dash-footer" :class "p-3 bg-stone-50 rounded" + (div + :id "dash-footer" + :class "p-3 bg-stone-50 rounded" (p :class "text-sm text-stone-500" (str "Last updated: " now))) - (~docs/oob-code :target-id "filter-wire" - :text (str "(<> (div :id \"dash-header\" ...) (div :id \"dash-stats\" ...) (div :id \"dash-footer\" ...))"))))) + (~docs/oob-code + :target-id "filter-wire" + :text (str + "(<> (div :id \"dash-header\" ...) (div :id \"dash-stats\" ...) (div :id \"dash-footer\" ...))"))))) - -;; -------------------------------------------------------------------------- -;; Tabs -;; -------------------------------------------------------------------------- - -(defhandler ex-tabs +(defhandler + ex-tabs :path "/sx/(geography.(hypermedia.(example.(api.(tabs.)))))" :method :get :returns "element" (&key tab) - (let ((content (get tab-content tab (get tab-content "tab1")))) + (let + ((content (get tab-content tab (get tab-content "tab1")))) (<> content - (div :id "tab-buttons" :sx-swap-oob "innerHTML" + (div + :id "tab-buttons" + :sx-swap-oob "innerHTML" :class "flex border-b border-stone-200" - (~examples/tab-btn :tab "tab1" :label "Overview" :active (if (= tab "tab1") "true" "false")) - (~examples/tab-btn :tab "tab2" :label "Details" :active (if (= tab "tab2") "true" "false")) - (~examples/tab-btn :tab "tab3" :label "History" :active (if (= tab "tab3") "true" "false"))) - (~docs/oob-code :target-id "tabs-wire" + (~examples/tab-btn + :tab "tab1" + :label "Overview" + :active (if (= tab "tab1") "true" "false")) + (~examples/tab-btn + :tab "tab2" + :label "Details" + :active (if (= tab "tab2") "true" "false")) + (~examples/tab-btn + :tab "tab3" + :label "History" + :active (if (= tab "tab3") "true" "false"))) + (~docs/oob-code + :target-id "tabs-wire" :text (str "(content for " tab " + oob tab buttons"))))) - -;; -------------------------------------------------------------------------- -;; Animations -;; -------------------------------------------------------------------------- - -(defhandler ex-animate +(defhandler + ex-animate :path "/sx/(geography.(hypermedia.(example.(api.animate))))" :method :get :returns "element" (&key) - (let ((idx (random-int 0 4)) - (now (helper "now" "%H:%M:%S"))) - (let ((color (nth anim-colors idx))) + (let + ((idx (random-int 0 4)) (now (helper "now" "%H:%M:%S"))) + (let + ((color (nth anim-colors idx))) (<> (~anim-result :color color :time now) - (~docs/oob-code :target-id "anim-comp" + (~docs/oob-code + :target-id "anim-comp" :text (helper "component-source" "~anim-result")) - (~docs/oob-code :target-id "anim-wire" + (~docs/oob-code + :target-id "anim-wire" :text (str "(~anim-result :color \"" color "\" :time \"" now "\")")))))) - -;; -------------------------------------------------------------------------- -;; Dialogs -;; -------------------------------------------------------------------------- - -(defhandler ex-dialog +(defhandler + ex-dialog :path "/sx/(geography.(hypermedia.(example.(api.dialog))))" :method :get :returns "element" (&key) (<> - (~examples/dialog-modal :title "Confirm Action" + (~examples/dialog-modal + :title "Confirm Action" :message "Are you sure you want to proceed? This is a demo dialog rendered entirely with sx components.") - (~docs/oob-code :target-id "dialog-comp" + (~docs/oob-code + :target-id "dialog-comp" :text (helper "component-source" "~examples/dialog-modal")) - (~docs/oob-code :target-id "dialog-wire" + (~docs/oob-code + :target-id "dialog-wire" :text "(~examples/dialog-modal :title \"Confirm Action\" :message \"...\")"))) -(defhandler ex-dialog-close +(defhandler + ex-dialog-close :path "/sx/(geography.(hypermedia.(example.(api.dialog-close))))" :method :get :returns "element" (&key) (<> - (~docs/oob-code :target-id "dialog-wire" - :text "(empty — dialog closed)"))) + (~docs/oob-code :target-id "dialog-wire" :text "(empty — dialog closed)"))) - -;; -------------------------------------------------------------------------- -;; Keyboard Shortcuts -;; -------------------------------------------------------------------------- - -(defhandler ex-keyboard +(defhandler + ex-keyboard :path "/sx/(geography.(hypermedia.(example.(api.keyboard))))" :method :get :returns "element" (&key) - (let ((key (helper "request-arg" "key" ""))) - (let ((action (get kbd-actions key (str "Unknown key: " key)))) + (let + ((key (helper "request-arg" "key" ""))) + (let + ((action (get kbd-actions key (str "Unknown key: " key)))) (<> (~examples/kbd-result :key key :action action) - (~docs/oob-code :target-id "kbd-comp" + (~docs/oob-code + :target-id "kbd-comp" :text (helper "component-source" "~examples/kbd-result")) - (~docs/oob-code :target-id "kbd-wire" + (~docs/oob-code + :target-id "kbd-wire" :text (str "(~examples/kbd-result :key \"" key "\" :action \"" action "\")")))))) - -;; -------------------------------------------------------------------------- -;; PUT / PATCH -;; -------------------------------------------------------------------------- - -(defhandler ex-pp-edit-all +(defhandler + ex-putpatch-edit-all :path "/sx/(geography.(hypermedia.(example.(api.putpatch-edit-all))))" :method :get :returns "element" (&key) - (let ((p (helper "state-get" "ex-profile" - {"name" "Ada Lovelace" "email" "ada@example.com" "role" "Engineer"}))) + (let + ((p (helper "state-get" "ex-profile" {:email "ada@example.com" :role "Engineer" :name "Ada Lovelace"}))) (<> - (~examples/pp-form-full :name (get p "name") :email (get p "email") :role (get p "role")) - (~docs/oob-code :target-id "pp-comp" + (~examples/pp-form-full + :name (get p "name") + :email (get p "email") + :role (get p "role")) + (~docs/oob-code + :target-id "pp-comp" :text (helper "component-source" "~examples/pp-form-full")) - (~docs/oob-code :target-id "pp-wire" + (~docs/oob-code + :target-id "pp-wire" :text (str "(~examples/pp-form-full :name \"" (get p "name") "\" ...)"))))) -(defhandler ex-pp-put +(defhandler + ex-putpatch :path "/sx/(geography.(hypermedia.(example.(api.putpatch))))" :method :put :csrf false :returns "element" (&key) - (let ((name (helper "request-form" "name" "")) - (email (helper "request-form" "email" "")) - (role (helper "request-form" "role" ""))) - (helper "state-set!" "ex-profile" {"name" name "email" email "role" role}) + (let + ((name (helper "request-form" "name" "")) + (email (helper "request-form" "email" "")) + (role (helper "request-form" "role" ""))) + (helper "state-set!" "ex-profile" {:email email :role role :name name}) (<> (~examples/pp-view :name name :email email :role role) - (~docs/oob-code :target-id "pp-comp" + (~docs/oob-code + :target-id "pp-comp" :text (helper "component-source" "~examples/pp-view")) - (~docs/oob-code :target-id "pp-wire" + (~docs/oob-code + :target-id "pp-wire" :text (str "(~examples/pp-view :name \"" name "\" ...)"))))) -(defhandler ex-pp-cancel +(defhandler + ex-putpatch-cancel :path "/sx/(geography.(hypermedia.(example.(api.putpatch-cancel))))" :method :get :returns "element" (&key) - (let ((p (helper "state-get" "ex-profile" - {"name" "Ada Lovelace" "email" "ada@example.com" "role" "Engineer"}))) + (let + ((p (helper "state-get" "ex-profile" {:email "ada@example.com" :role "Engineer" :name "Ada Lovelace"}))) (<> - (~examples/pp-view :name (get p "name") :email (get p "email") :role (get p "role")) - (~docs/oob-code :target-id "pp-comp" + (~examples/pp-view + :name (get p "name") + :email (get p "email") + :role (get p "role")) + (~docs/oob-code + :target-id "pp-comp" :text (helper "component-source" "~examples/pp-view")) - (~docs/oob-code :target-id "pp-wire" + (~docs/oob-code + :target-id "pp-wire" :text (str "(~examples/pp-view :name \"" (get p "name") "\" ...)"))))) - -;; -------------------------------------------------------------------------- -;; JSON Encoding -;; -------------------------------------------------------------------------- - -(defhandler ex-json-echo +(defhandler + ex-json-echo :path "/sx/(geography.(hypermedia.(example.(api.json-echo))))" :method :post :csrf false :returns "element" (&key) - (let ((data (helper "request-json")) - (ct (helper "request-content-type"))) - (let ((body (json-encode data))) + (let + ((data (helper "request-json")) (ct (helper "request-content-type"))) + (let + ((body (json-encode data))) (<> (~examples/json-result :body body :content-type ct) - (~docs/oob-code :target-id "json-comp" + (~docs/oob-code + :target-id "json-comp" :text (helper "component-source" "~examples/json-result")) - (~docs/oob-code :target-id "json-wire" - :text (str "(~examples/json-result :body \"" body "\" :content-type \"" ct "\")")))))) + (~docs/oob-code + :target-id "json-wire" + :text (str + "(~examples/json-result :body \"" + body + "\" :content-type \"" + ct + "\")")))))) - -;; -------------------------------------------------------------------------- -;; Vals & Headers -;; -------------------------------------------------------------------------- - -(defhandler ex-echo-vals +(defhandler + ex-echo-vals :path "/sx/(geography.(hypermedia.(example.(api.echo-vals))))" :method :get :returns "element" (&key) - (let ((vals (helper "into" (list) (helper "request-args-all")))) - (let ((filtered (filter (fn (pair) (and (not (= (first pair) "_")) - (not (= (first pair) "sx-request")))) - vals))) - (let ((items (map (fn (pair) (str (first pair) ": " (nth pair 1))) filtered))) + (let + ((vals (helper "into" (list) (helper "request-args-all")))) + (let + ((filtered (filter (fn (pair) (and (not (= (first pair) "_")) (not (= (first pair) "sx-request")))) vals))) + (let + ((items (map (fn (pair) (str (first pair) ": " (nth pair 1))) filtered))) (<> (~examples/echo-result :label "values" :items items) - (~docs/oob-code :target-id "vals-comp" + (~docs/oob-code + :target-id "vals-comp" :text (helper "component-source" "~examples/echo-result")) - (~docs/oob-code :target-id "vals-wire" + (~docs/oob-code + :target-id "vals-wire" :text (str "(~examples/echo-result :label \"values\" :items (list ...))"))))))) -(defhandler ex-echo-headers +(defhandler + ex-echo-headers :path "/sx/(geography.(hypermedia.(example.(api.echo-headers))))" :method :get :returns "element" (&key) - (let ((all-headers (helper "into" (list) (helper "request-headers-all")))) - (let ((custom (filter (fn (pair) (starts-with? (first pair) "x-")) all-headers))) - (let ((items (map (fn (pair) (str (first pair) ": " (nth pair 1))) custom))) + (let + ((all-headers (helper "into" (list) (helper "request-headers-all")))) + (let + ((custom (filter (fn (pair) (starts-with? (first pair) "x-")) all-headers))) + (let + ((items (map (fn (pair) (str (first pair) ": " (nth pair 1))) custom))) (<> (~examples/echo-result :label "headers" :items items) - (~docs/oob-code :target-id "vals-comp" + (~docs/oob-code + :target-id "vals-comp" :text (helper "component-source" "~examples/echo-result")) - (~docs/oob-code :target-id "vals-wire" + (~docs/oob-code + :target-id "vals-wire" :text (str "(~examples/echo-result :label \"headers\" :items (list ...))"))))))) - -;; -------------------------------------------------------------------------- -;; Loading States -;; -------------------------------------------------------------------------- - -(defhandler ex-slow +(defhandler + ex-slow :path "/sx/(geography.(hypermedia.(example.(api.slow))))" :method :get :returns "element" (&key) (sleep 2000) - (let ((now (helper "now" "%H:%M:%S"))) + (let + ((now (helper "now" "%H:%M:%S"))) (<> (~examples/loading-result :time now) - (~docs/oob-code :target-id "loading-comp" + (~docs/oob-code + :target-id "loading-comp" :text (helper "component-source" "~examples/loading-result")) - (~docs/oob-code :target-id "loading-wire" + (~docs/oob-code + :target-id "loading-wire" :text (str "(~examples/loading-result :time \"" now "\")"))))) - -;; -------------------------------------------------------------------------- -;; Request Abort (sync replace) -;; -------------------------------------------------------------------------- - -(defhandler ex-slow-search +(defhandler + ex-slow-search :path "/sx/(geography.(hypermedia.(example.(api.slow-search))))" :method :get :returns "element" (&key) - (let ((delay-ms (random-int 500 2000))) + (let + ((delay-ms (random-int 500 2000))) (sleep delay-ms) - (let ((q (helper "request-arg" "q" ""))) + (let + ((q (helper "request-arg" "q" ""))) (<> (~examples/sync-result :query q :delay (str delay-ms)) - (~docs/oob-code :target-id "sync-comp" + (~docs/oob-code + :target-id "sync-comp" :text (helper "component-source" "~examples/sync-result")) - (~docs/oob-code :target-id "sync-wire" + (~docs/oob-code + :target-id "sync-wire" :text (str "(~examples/sync-result :query \"" q "\" :delay \"" delay-ms "\")")))))) - -;; -------------------------------------------------------------------------- -;; Retry -;; -------------------------------------------------------------------------- - -(defhandler ex-flaky +(defhandler + ex-flaky :path "/sx/(geography.(hypermedia.(example.(api.flaky))))" :method :get :returns "element" (&key) - (let ((prev-flaky (helper "state-get" "ex-flaky-n" 0))) - (let ((n (+ prev-flaky 1))) - (helper "state-set!" "ex-flaky-n" n) - (if (not (= (mod n 3) 0)) - (do - (set-response-status 503) - "") - (<> - (~examples/retry-result :attempt (str n) :message "Success! The endpoint finally responded.") - (~docs/oob-code :target-id "retry-comp" - :text (helper "component-source" "~examples/retry-result")) - (~docs/oob-code :target-id "retry-wire" - :text (str "(~examples/retry-result :attempt \"" n "\" ...)"))))))) \ No newline at end of file + (let + ((prev-flaky (helper "state-get" "ex-flaky-n" 0))) + (let + ((n (+ prev-flaky 1))) + (helper "state-set!" "ex-flaky-n" n) + (if + (not (= (mod n 3) 0)) + (do (set-response-status 503) "") + (<> + (~examples/retry-result + :attempt (str n) + :message "Success! The endpoint finally responded.") + (~docs/oob-code + :target-id "retry-comp" + :text (helper "component-source" "~examples/retry-result")) + (~docs/oob-code + :target-id "retry-wire" + :text (str "(~examples/retry-result :attempt \"" n "\" ...)"))))))) diff --git a/web/orchestration.sx b/web/orchestration.sx index adbb0481..63df142e 100644 --- a/web/orchestration.sx +++ b/web/orchestration.sx @@ -466,7 +466,7 @@ (when (get mods "changed") (let - ((val (dom-value el))) + ((val element-value)) (if (= val last-val) (set! should-fire false)