diff --git a/404.html b/404.html index 9cd6004..1c74496 100644 --- a/404.html +++ b/404.html @@ -4,8 +4,8 @@ HappyView - - + + diff --git a/assets/js/009f1e98.42325810.js b/assets/js/009f1e98.42325810.js deleted file mode 100644 index 5e1ae7f..0000000 --- a/assets/js/009f1e98.42325810.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[7715],{3511(e,t,n){n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>c,default:()=>a,frontMatter:()=>s,metadata:()=>r,toc:()=>l});const r=JSON.parse('{"id":"getting-started/configuration","title":"Configuration","description":"HappyView is configured via environment variables. A .env file in the project root is loaded automatically on startup. See Deployment for local setup or Production Deployment for production setup.","source":"@site/docs/getting-started/configuration.md","sourceDirName":"getting-started","slug":"/getting-started/configuration","permalink":"/getting-started/configuration","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Authentication","permalink":"/getting-started/authentication"},"next":{"title":"Dashboard","permalink":"/getting-started/dashboard"}}');var i=n(4848),d=n(8453);const s={},c="Configuration",o={},l=[{value:"Environment variables",id:"environment-variables",level:2},{value:"Example .env",id:"example-env",level:2}];function h(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,d.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.header,{children:(0,i.jsx)(t.h1,{id:"configuration",children:"Configuration"})}),"\n",(0,i.jsxs)(t.p,{children:["HappyView is configured via environment variables. A ",(0,i.jsx)(t.code,{children:".env"})," file in the project root is loaded automatically on startup. See ",(0,i.jsx)(t.a,{href:"deployment/docker",children:"Deployment"})," for local setup or ",(0,i.jsx)(t.a,{href:"../reference/production-deployment",children:"Production Deployment"})," for production setup."]}),"\n",(0,i.jsx)(t.h2,{id:"environment-variables",children:"Environment variables"}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:"Variable"}),(0,i.jsx)(t.th,{children:"Required"}),(0,i.jsx)(t.th,{children:"Default"}),(0,i.jsx)(t.th,{children:"Description"})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"DATABASE_URL"})}),(0,i.jsx)(t.td,{children:"yes"}),(0,i.jsx)(t.td,{children:"---"}),(0,i.jsx)(t.td,{children:"Postgres connection string"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"AIP_URL"})}),(0,i.jsx)(t.td,{children:"yes"}),(0,i.jsx)(t.td,{children:"---"}),(0,i.jsxs)(t.td,{children:[(0,i.jsx)(t.a,{href:"https://github.com/graze-social/aip",children:"AIP"})," instance URL for OAuth token validation"]})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"HOST"})}),(0,i.jsx)(t.td,{children:"no"}),(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"0.0.0.0"})}),(0,i.jsx)(t.td,{children:"Bind host"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"PORT"})}),(0,i.jsx)(t.td,{children:"no"}),(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"3000"})}),(0,i.jsx)(t.td,{children:"Bind port"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"TAP_URL"})}),(0,i.jsx)(t.td,{children:"no"}),(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"http://localhost:2480"})}),(0,i.jsxs)(t.td,{children:[(0,i.jsx)(t.a,{href:"https://github.com/bluesky-social/indigo/tree/main/cmd/tap",children:"Tap"})," instance URL for real-time record streaming and backfill"]})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"TAP_ADMIN_PASSWORD"})}),(0,i.jsx)(t.td,{children:"no"}),(0,i.jsx)(t.td,{children:"---"}),(0,i.jsx)(t.td,{children:"Shared secret for authenticating with Tap's admin endpoints"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"RELAY_URL"})}),(0,i.jsx)(t.td,{children:"no"}),(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"https://bsky.network"})}),(0,i.jsxs)(t.td,{children:["Relay URL for ",(0,i.jsx)(t.a,{href:"../guides/backfill",children:"backfill"})," repo discovery"]})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"PLC_URL"})}),(0,i.jsx)(t.td,{children:"no"}),(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"https://plc.directory"})}),(0,i.jsxs)(t.td,{children:[(0,i.jsx)(t.a,{href:"https://github.com/did-method-plc/did-method-plc",children:"PLC directory"})," URL for DID resolution"]})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"RUST_LOG"})}),(0,i.jsx)(t.td,{children:"no"}),(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"happyview=debug,tower_http=debug"})}),(0,i.jsxs)(t.td,{children:["Log filter (uses ",(0,i.jsx)(t.code,{children:"tracing_subscriber::EnvFilter"}),")"]})]})]})]}),"\n",(0,i.jsxs)(t.h2,{id:"example-env",children:["Example ",(0,i.jsx)(t.code,{children:".env"})]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-sh",children:"DATABASE_URL=postgres://happyview:happyview@localhost/happyview\nAIP_URL=http://localhost:8080\n\n# Optional overrides\n# HOST=0.0.0.0\n# PORT=3000\n# TAP_URL=http://localhost:2480\n# TAP_ADMIN_PASSWORD=your-secret-here\n# RELAY_URL=https://bsky.network\n# PLC_URL=https://plc.directory\n# RUST_LOG=happyview=debug,tower_http=debug\n"})})]})}function a(e={}){const{wrapper:t}={...(0,d.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},8453(e,t,n){n.d(t,{R:()=>s,x:()=>c});var r=n(6540);const i={},d=r.createContext(i);function s(e){const t=r.useContext(d);return r.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),r.createElement(d.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/009f1e98.833b5436.js b/assets/js/009f1e98.833b5436.js new file mode 100644 index 0000000..aeceadb --- /dev/null +++ b/assets/js/009f1e98.833b5436.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[7715],{3511(e,t,n){n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>c,default:()=>a,frontMatter:()=>s,metadata:()=>r,toc:()=>l});const r=JSON.parse('{"id":"getting-started/configuration","title":"Configuration","description":"HappyView is configured via environment variables. A .env file in the project root is loaded automatically on startup. See Deployment for local setup or Production Deployment for production setup.","source":"@site/docs/getting-started/configuration.md","sourceDirName":"getting-started","slug":"/getting-started/configuration","permalink":"/getting-started/configuration","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Authentication","permalink":"/getting-started/authentication"},"next":{"title":"Dashboard","permalink":"/getting-started/dashboard"}}');var i=n(4848),d=n(8453);const s={},c="Configuration",o={},l=[{value:"Environment variables",id:"environment-variables",level:2},{value:"Example .env",id:"example-env",level:2}];function h(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,d.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.header,{children:(0,i.jsx)(t.h1,{id:"configuration",children:"Configuration"})}),"\n",(0,i.jsxs)(t.p,{children:["HappyView is configured via environment variables. A ",(0,i.jsx)(t.code,{children:".env"})," file in the project root is loaded automatically on startup. See ",(0,i.jsx)(t.a,{href:"/getting-started/deployment/docker",children:"Deployment"})," for local setup or ",(0,i.jsx)(t.a,{href:"/reference/production-deployment",children:"Production Deployment"})," for production setup."]}),"\n",(0,i.jsx)(t.h2,{id:"environment-variables",children:"Environment variables"}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:"Variable"}),(0,i.jsx)(t.th,{children:"Required"}),(0,i.jsx)(t.th,{children:"Default"}),(0,i.jsx)(t.th,{children:"Description"})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"DATABASE_URL"})}),(0,i.jsx)(t.td,{children:"yes"}),(0,i.jsx)(t.td,{children:"---"}),(0,i.jsx)(t.td,{children:"Postgres connection string"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"AIP_URL"})}),(0,i.jsx)(t.td,{children:"yes"}),(0,i.jsx)(t.td,{children:"---"}),(0,i.jsxs)(t.td,{children:[(0,i.jsx)(t.a,{href:"https://github.com/graze-social/aip",children:"AIP"})," instance URL for OAuth token validation"]})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"HOST"})}),(0,i.jsx)(t.td,{children:"no"}),(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"0.0.0.0"})}),(0,i.jsx)(t.td,{children:"Bind host"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"PORT"})}),(0,i.jsx)(t.td,{children:"no"}),(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"3000"})}),(0,i.jsx)(t.td,{children:"Bind port"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"TAP_URL"})}),(0,i.jsx)(t.td,{children:"no"}),(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"http://localhost:2480"})}),(0,i.jsxs)(t.td,{children:[(0,i.jsx)(t.a,{href:"https://github.com/bluesky-social/indigo/tree/main/cmd/tap",children:"Tap"})," instance URL for real-time record streaming and backfill"]})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"TAP_ADMIN_PASSWORD"})}),(0,i.jsx)(t.td,{children:"no"}),(0,i.jsx)(t.td,{children:"---"}),(0,i.jsx)(t.td,{children:"Shared secret for authenticating with Tap's admin endpoints"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"RELAY_URL"})}),(0,i.jsx)(t.td,{children:"no"}),(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"https://bsky.network"})}),(0,i.jsxs)(t.td,{children:["Relay URL for ",(0,i.jsx)(t.a,{href:"/guides/backfill",children:"backfill"})," repo discovery"]})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"PLC_URL"})}),(0,i.jsx)(t.td,{children:"no"}),(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"https://plc.directory"})}),(0,i.jsxs)(t.td,{children:[(0,i.jsx)(t.a,{href:"https://github.com/did-method-plc/did-method-plc",children:"PLC directory"})," URL for DID resolution"]})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"RUST_LOG"})}),(0,i.jsx)(t.td,{children:"no"}),(0,i.jsx)(t.td,{children:(0,i.jsx)(t.code,{children:"happyview=debug,tower_http=debug"})}),(0,i.jsxs)(t.td,{children:["Log filter (uses ",(0,i.jsx)(t.code,{children:"tracing_subscriber::EnvFilter"}),")"]})]})]})]}),"\n",(0,i.jsxs)(t.h2,{id:"example-env",children:["Example ",(0,i.jsx)(t.code,{children:".env"})]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-sh",children:"DATABASE_URL=postgres://happyview:happyview@localhost/happyview\nAIP_URL=http://localhost:8080\n\n# Optional overrides\n# HOST=0.0.0.0\n# PORT=3000\n# TAP_URL=http://localhost:2480\n# TAP_ADMIN_PASSWORD=your-secret-here\n# RELAY_URL=https://bsky.network\n# PLC_URL=https://plc.directory\n# RUST_LOG=happyview=debug,tower_http=debug\n"})})]})}function a(e={}){const{wrapper:t}={...(0,d.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},8453(e,t,n){n.d(t,{R:()=>s,x:()=>c});var r=n(6540);const i={},d=r.createContext(i);function s(e){const t=r.useContext(d);return r.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),r.createElement(d.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/111eee19.94292821.js b/assets/js/111eee19.94292821.js new file mode 100644 index 0000000..b45dd87 --- /dev/null +++ b/assets/js/111eee19.94292821.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[8779],{9071(e,n,r){r.r(n),r.d(n,{assets:()=>l,contentTitle:()=>c,default:()=>h,frontMatter:()=>t,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"reference/troubleshooting","title":"Troubleshooting","description":"Common issues and how to resolve them.","source":"@site/docs/reference/troubleshooting.md","sourceDirName":"reference","slug":"/reference/troubleshooting","permalink":"/reference/troubleshooting","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Architecture","permalink":"/reference/architecture"},"next":{"title":"Production","permalink":"/reference/production-deployment"}}');var i=r(4848),o=r(8453);const t={},c="Troubleshooting",l={},d=[{value:"XRPC endpoint returns 404",id:"xrpc-endpoint-returns-404",level:2},{value:"Queries return empty results",id:"queries-return-empty-results",level:2},{value:"Procedure returns 401 Unauthorized",id:"procedure-returns-401-unauthorized",level:2},{value:"Admin endpoints return 403 Forbidden",id:"admin-endpoints-return-403-forbidden",level:2},{value:"Lua script errors",id:"lua-script-errors",level:2},{value:"Backfill job stuck in "pending" or "running"",id:"backfill-job-stuck-in-pending-or-running",level:2},{value:"Records not appearing in real time",id:"records-not-appearing-in-real-time",level:2},{value:"OAuth or login issues",id:"oauth-or-login-issues",level:2},{value:"Database connection errors",id:"database-connection-errors",level:2}];function a(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"troubleshooting",children:"Troubleshooting"})}),"\n",(0,i.jsx)(n.p,{children:"Common issues and how to resolve them."}),"\n",(0,i.jsx)(n.h2,{id:"xrpc-endpoint-returns-404",children:"XRPC endpoint returns 404"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Symptom"}),": ",(0,i.jsx)(n.code,{children:"GET /xrpc/your.method.name"})," returns ",(0,i.jsx)(n.code,{children:'{"error": "method not found"}'}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Causes"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["The lexicon hasn't been uploaded yet. Check with ",(0,i.jsx)(n.code,{children:"GET /admin/lexicons"})," or the ",(0,i.jsx)(n.a,{href:"/getting-started/dashboard",children:"dashboard"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["The lexicon's ",(0,i.jsx)(n.code,{children:"defs.main.type"})," doesn't match the HTTP method. Queries are ",(0,i.jsx)(n.code,{children:"GET"}),", procedures are ",(0,i.jsx)(n.code,{children:"POST"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["The NSID in the URL doesn't match the ",(0,i.jsx)(n.code,{children:"id"})," field in the uploaded lexicon JSON."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"queries-return-empty-results",children:"Queries return empty results"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Symptom"}),": The XRPC query endpoint returns ",(0,i.jsx)(n.code,{children:'{"records": []}'})," even though records should exist."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Causes"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["The query lexicon is missing a ",(0,i.jsx)(n.code,{children:"target_collection"}),". Without it, the query doesn't know which records to read. See ",(0,i.jsx)(n.a,{href:"/guides/lexicons#target-collection",children:"Lexicons - target_collection"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["The record-type lexicon hasn't finished backfilling. Check backfill status with ",(0,i.jsx)(n.code,{children:"GET /admin/backfill/status"})," or the dashboard."]}),"\n",(0,i.jsxs)(n.li,{children:["Records exist on the network but HappyView hasn't indexed them yet. Tap only picks up new events from when the collection filter was added. Use ",(0,i.jsx)(n.a,{href:"/guides/backfill",children:"backfill"})," for historical records."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"procedure-returns-401-unauthorized",children:"Procedure returns 401 Unauthorized"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Symptom"}),": ",(0,i.jsx)(n.code,{children:"POST /xrpc/your.method.name"})," returns ",(0,i.jsx)(n.code,{children:'{"error": "..."}'})," with status 401."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Causes"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["The ",(0,i.jsx)(n.code,{children:"Authorization: Bearer "})," header is missing or malformed."]}),"\n",(0,i.jsxs)(n.li,{children:["The token has expired or is invalid. Tokens are validated against AIP's ",(0,i.jsx)(n.code,{children:"/oauth/userinfo"})," endpoint."]}),"\n",(0,i.jsxs)(n.li,{children:["AIP is unreachable. Check that ",(0,i.jsx)(n.code,{children:"AIP_URL"})," is set correctly and the AIP service is running."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["For AIP-specific issues, see the ",(0,i.jsx)(n.a,{href:"https://github.com/graze-social/aip",children:"AIP documentation"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"admin-endpoints-return-403-forbidden",children:"Admin endpoints return 403 Forbidden"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Symptom"}),": Admin API calls return ",(0,i.jsx)(n.code,{children:'{"error": "forbidden"}'}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Causes"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Your DID is not in the admins table. Ask an existing admin to add you via ",(0,i.jsx)(n.code,{children:"POST /admin/admins"}),"."]}),"\n",(0,i.jsx)(n.li,{children:"If this is a fresh deployment with no admins, the first authenticated request to any admin endpoint automatically bootstraps you as admin. Make sure you're sending a valid Bearer token."}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"lua-script-errors",children:"Lua script errors"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Symptom"}),": An XRPC endpoint returns ",(0,i.jsx)(n.code,{children:'{"error": "script execution failed"}'})," or ",(0,i.jsx)(n.code,{children:'{"error": "script exceeded execution time limit"}'}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"What to do"}),":"]}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"Check the server logs: the full error message is logged at error level but not exposed to the client."}),"\n",(0,i.jsxs)(n.li,{children:["Use ",(0,i.jsx)(n.code,{children:'log("message")'})," in your script to trace execution. Output appears in server logs at debug level (requires ",(0,i.jsx)(n.code,{children:"RUST_LOG"})," to include debug)."]}),"\n",(0,i.jsxs)(n.li,{children:["If you hit the execution limit, your script likely has an infinite loop or is processing too much data. See ",(0,i.jsx)(n.a,{href:"/guides/scripting#sandbox",children:"Lua Scripting - Sandbox"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["See ",(0,i.jsx)(n.a,{href:"/guides/scripting#debugging",children:"Lua Scripting - Debugging"})," for more."]}),"\n",(0,i.jsx)(n.h2,{id:"backfill-job-stuck-in-pending-or-running",children:'Backfill job stuck in "pending" or "running"'}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Symptom"}),": A backfill job doesn't progress or stays in ",(0,i.jsx)(n.code,{children:"pending"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Causes"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"The backfill worker processes one job at a time. If another job is running, yours will wait."}),"\n",(0,i.jsxs)(n.li,{children:["The relay (",(0,i.jsx)(n.code,{children:"RELAY_URL"}),") may be unreachable or slow to respond. Check connectivity."]}),"\n",(0,i.jsx)(n.li,{children:"Individual PDS fetches can fail silently. The worker logs warnings and continues. Check server logs for details."}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["See ",(0,i.jsx)(n.a,{href:"/guides/backfill",children:"Backfill"})," for how the process works."]}),"\n",(0,i.jsx)(n.h2,{id:"records-not-appearing-in-real-time",children:"Records not appearing in real time"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Symptom"}),": New records created on the network don't show up in queries."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Causes"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["HappyView receives real-time events via ",(0,i.jsx)(n.a,{href:"https://github.com/bluesky-social/indigo/tree/main/cmd/tap",children:"Tap"}),". Make sure Tap is running and connected to HappyView. See the ",(0,i.jsx)(n.a,{href:"https://github.com/bluesky-social/indigo/tree/main/cmd/tap",children:"Tap documentation"})," for configuration."]}),"\n",(0,i.jsx)(n.li,{children:"No record-type lexicon exists for the collection. HappyView only indexes collections that have a corresponding record-type lexicon."}),"\n",(0,i.jsx)(n.li,{children:"The Tap connection hasn't synced the new collection filter after a lexicon change. This should happen automatically. Check server logs for connection errors."}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"oauth-or-login-issues",children:"OAuth or login issues"}),"\n",(0,i.jsxs)(n.p,{children:["OAuth is handled entirely by ",(0,i.jsx)(n.a,{href:"https://github.com/graze-social/aip",children:"AIP"}),". If users can't log in or tokens aren't working:"]}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["Verify AIP is running and reachable at the configured ",(0,i.jsx)(n.code,{children:"AIP_URL"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["Check that AIP has valid signing keys configured (",(0,i.jsx)(n.code,{children:"OAUTH_SIGNING_KEYS"}),")."]}),"\n",(0,i.jsx)(n.li,{children:"Check that both HappyView and AIP have public URLs assigned (required for OAuth callbacks)."}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["See the ",(0,i.jsx)(n.a,{href:"https://github.com/graze-social/aip",children:"AIP documentation"})," for setup and debugging."]}),"\n",(0,i.jsx)(n.h2,{id:"database-connection-errors",children:"Database connection errors"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Symptom"}),": HappyView fails to start or returns 500 errors."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Causes"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"DATABASE_URL"})," is not set or points to an unreachable Postgres instance."]}),"\n",(0,i.jsx)(n.li,{children:"The database user doesn't have sufficient permissions. HappyView needs to create tables (migrations run automatically on startup)."}),"\n",(0,i.jsx)(n.li,{children:"Postgres version is too old. HappyView requires Postgres 17+."}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["See ",(0,i.jsx)(n.a,{href:"/getting-started/configuration",children:"Configuration"})," for environment variable details."]})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(a,{...e})}):a(e)}},8453(e,n,r){r.d(n,{R:()=>t,x:()=>c});var s=r(6540);const i={},o=s.createContext(i);function t(e){const n=s.useContext(o);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:t(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/111eee19.c47c9a7a.js b/assets/js/111eee19.c47c9a7a.js deleted file mode 100644 index d051aec..0000000 --- a/assets/js/111eee19.c47c9a7a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[8779],{9071(e,n,r){r.r(n),r.d(n,{assets:()=>l,contentTitle:()=>c,default:()=>h,frontMatter:()=>t,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"reference/troubleshooting","title":"Troubleshooting","description":"Common issues and how to resolve them.","source":"@site/docs/reference/troubleshooting.md","sourceDirName":"reference","slug":"/reference/troubleshooting","permalink":"/reference/troubleshooting","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Architecture","permalink":"/reference/architecture"},"next":{"title":"Production","permalink":"/reference/production-deployment"}}');var i=r(4848),o=r(8453);const t={},c="Troubleshooting",l={},d=[{value:"XRPC endpoint returns 404",id:"xrpc-endpoint-returns-404",level:2},{value:"Queries return empty results",id:"queries-return-empty-results",level:2},{value:"Procedure returns 401 Unauthorized",id:"procedure-returns-401-unauthorized",level:2},{value:"Admin endpoints return 403 Forbidden",id:"admin-endpoints-return-403-forbidden",level:2},{value:"Lua script errors",id:"lua-script-errors",level:2},{value:"Backfill job stuck in "pending" or "running"",id:"backfill-job-stuck-in-pending-or-running",level:2},{value:"Records not appearing in real time",id:"records-not-appearing-in-real-time",level:2},{value:"OAuth or login issues",id:"oauth-or-login-issues",level:2},{value:"Database connection errors",id:"database-connection-errors",level:2}];function a(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"troubleshooting",children:"Troubleshooting"})}),"\n",(0,i.jsx)(n.p,{children:"Common issues and how to resolve them."}),"\n",(0,i.jsx)(n.h2,{id:"xrpc-endpoint-returns-404",children:"XRPC endpoint returns 404"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Symptom"}),": ",(0,i.jsx)(n.code,{children:"GET /xrpc/your.method.name"})," returns ",(0,i.jsx)(n.code,{children:'{"error": "method not found"}'}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Causes"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["The lexicon hasn't been uploaded yet. Check with ",(0,i.jsx)(n.code,{children:"GET /admin/lexicons"})," or the ",(0,i.jsx)(n.a,{href:"../getting-started/dashboard",children:"dashboard"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["The lexicon's ",(0,i.jsx)(n.code,{children:"defs.main.type"})," doesn't match the HTTP method. Queries are ",(0,i.jsx)(n.code,{children:"GET"}),", procedures are ",(0,i.jsx)(n.code,{children:"POST"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["The NSID in the URL doesn't match the ",(0,i.jsx)(n.code,{children:"id"})," field in the uploaded lexicon JSON."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"queries-return-empty-results",children:"Queries return empty results"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Symptom"}),": The XRPC query endpoint returns ",(0,i.jsx)(n.code,{children:'{"records": []}'})," even though records should exist."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Causes"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["The query lexicon is missing a ",(0,i.jsx)(n.code,{children:"target_collection"}),". Without it, the query doesn't know which records to read. See ",(0,i.jsx)(n.a,{href:"../guides/lexicons#target-collection",children:"Lexicons - target_collection"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["The record-type lexicon hasn't finished backfilling. Check backfill status with ",(0,i.jsx)(n.code,{children:"GET /admin/backfill/status"})," or the dashboard."]}),"\n",(0,i.jsxs)(n.li,{children:["Records exist on the network but HappyView hasn't indexed them yet. Tap only picks up new events from when the collection filter was added. Use ",(0,i.jsx)(n.a,{href:"../guides/backfill",children:"backfill"})," for historical records."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"procedure-returns-401-unauthorized",children:"Procedure returns 401 Unauthorized"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Symptom"}),": ",(0,i.jsx)(n.code,{children:"POST /xrpc/your.method.name"})," returns ",(0,i.jsx)(n.code,{children:'{"error": "..."}'})," with status 401."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Causes"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["The ",(0,i.jsx)(n.code,{children:"Authorization: Bearer "})," header is missing or malformed."]}),"\n",(0,i.jsxs)(n.li,{children:["The token has expired or is invalid. Tokens are validated against AIP's ",(0,i.jsx)(n.code,{children:"/oauth/userinfo"})," endpoint."]}),"\n",(0,i.jsxs)(n.li,{children:["AIP is unreachable. Check that ",(0,i.jsx)(n.code,{children:"AIP_URL"})," is set correctly and the AIP service is running."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["For AIP-specific issues, see the ",(0,i.jsx)(n.a,{href:"https://github.com/graze-social/aip",children:"AIP documentation"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"admin-endpoints-return-403-forbidden",children:"Admin endpoints return 403 Forbidden"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Symptom"}),": Admin API calls return ",(0,i.jsx)(n.code,{children:'{"error": "forbidden"}'}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Causes"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Your DID is not in the admins table. Ask an existing admin to add you via ",(0,i.jsx)(n.code,{children:"POST /admin/admins"}),"."]}),"\n",(0,i.jsx)(n.li,{children:"If this is a fresh deployment with no admins, the first authenticated request to any admin endpoint automatically bootstraps you as admin. Make sure you're sending a valid Bearer token."}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"lua-script-errors",children:"Lua script errors"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Symptom"}),": An XRPC endpoint returns ",(0,i.jsx)(n.code,{children:'{"error": "script execution failed"}'})," or ",(0,i.jsx)(n.code,{children:'{"error": "script exceeded execution time limit"}'}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"What to do"}),":"]}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"Check the server logs: the full error message is logged at error level but not exposed to the client."}),"\n",(0,i.jsxs)(n.li,{children:["Use ",(0,i.jsx)(n.code,{children:'log("message")'})," in your script to trace execution. Output appears in server logs at debug level (requires ",(0,i.jsx)(n.code,{children:"RUST_LOG"})," to include debug)."]}),"\n",(0,i.jsxs)(n.li,{children:["If you hit the execution limit, your script likely has an infinite loop or is processing too much data. See ",(0,i.jsx)(n.a,{href:"../guides/scripting#sandbox",children:"Lua Scripting - Sandbox"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["See ",(0,i.jsx)(n.a,{href:"../guides/scripting#debugging",children:"Lua Scripting - Debugging"})," for more."]}),"\n",(0,i.jsx)(n.h2,{id:"backfill-job-stuck-in-pending-or-running",children:'Backfill job stuck in "pending" or "running"'}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Symptom"}),": A backfill job doesn't progress or stays in ",(0,i.jsx)(n.code,{children:"pending"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Causes"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"The backfill worker processes one job at a time. If another job is running, yours will wait."}),"\n",(0,i.jsxs)(n.li,{children:["The relay (",(0,i.jsx)(n.code,{children:"RELAY_URL"}),") may be unreachable or slow to respond. Check connectivity."]}),"\n",(0,i.jsx)(n.li,{children:"Individual PDS fetches can fail silently. The worker logs warnings and continues. Check server logs for details."}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["See ",(0,i.jsx)(n.a,{href:"../guides/backfill",children:"Backfill"})," for how the process works."]}),"\n",(0,i.jsx)(n.h2,{id:"records-not-appearing-in-real-time",children:"Records not appearing in real time"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Symptom"}),": New records created on the network don't show up in queries."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Causes"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["HappyView receives real-time events via ",(0,i.jsx)(n.a,{href:"https://github.com/bluesky-social/indigo/tree/main/cmd/tap",children:"Tap"}),". Make sure Tap is running and connected to HappyView. See the ",(0,i.jsx)(n.a,{href:"https://github.com/bluesky-social/indigo/tree/main/cmd/tap",children:"Tap documentation"})," for configuration."]}),"\n",(0,i.jsx)(n.li,{children:"No record-type lexicon exists for the collection. HappyView only indexes collections that have a corresponding record-type lexicon."}),"\n",(0,i.jsx)(n.li,{children:"The Tap connection hasn't synced the new collection filter after a lexicon change. This should happen automatically. Check server logs for connection errors."}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"oauth-or-login-issues",children:"OAuth or login issues"}),"\n",(0,i.jsxs)(n.p,{children:["OAuth is handled entirely by ",(0,i.jsx)(n.a,{href:"https://github.com/graze-social/aip",children:"AIP"}),". If users can't log in or tokens aren't working:"]}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["Verify AIP is running and reachable at the configured ",(0,i.jsx)(n.code,{children:"AIP_URL"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["Check that AIP has valid signing keys configured (",(0,i.jsx)(n.code,{children:"OAUTH_SIGNING_KEYS"}),")."]}),"\n",(0,i.jsx)(n.li,{children:"Check that both HappyView and AIP have public URLs assigned (required for OAuth callbacks)."}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["See the ",(0,i.jsx)(n.a,{href:"https://github.com/graze-social/aip",children:"AIP documentation"})," for setup and debugging."]}),"\n",(0,i.jsx)(n.h2,{id:"database-connection-errors",children:"Database connection errors"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Symptom"}),": HappyView fails to start or returns 500 errors."]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Causes"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"DATABASE_URL"})," is not set or points to an unreachable Postgres instance."]}),"\n",(0,i.jsx)(n.li,{children:"The database user doesn't have sufficient permissions. HappyView needs to create tables (migrations run automatically on startup)."}),"\n",(0,i.jsx)(n.li,{children:"Postgres version is too old. HappyView requires Postgres 17+."}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["See ",(0,i.jsx)(n.a,{href:"../getting-started/configuration",children:"Configuration"})," for environment variable details."]})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(a,{...e})}):a(e)}},8453(e,n,r){r.d(n,{R:()=>t,x:()=>c});var s=r(6540);const i={},o=s.createContext(i);function t(e){const n=s.useContext(o);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:t(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/121e86a6.c22515bb.js b/assets/js/121e86a6.4a23b8e6.js similarity index 61% rename from assets/js/121e86a6.c22515bb.js rename to assets/js/121e86a6.4a23b8e6.js index dd406f5..c382147 100644 --- a/assets/js/121e86a6.c22515bb.js +++ b/assets/js/121e86a6.4a23b8e6.js @@ -1 +1 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[5011],{7544(e,r,n){n.r(r),n.d(r,{assets:()=>d,contentTitle:()=>o,default:()=>u,frontMatter:()=>i,metadata:()=>t,toc:()=>a});const t=JSON.parse('{"id":"reference/scripts/get-record","title":"Query: Get a Single Record","description":"Fetch a single record by its AT URI.","source":"@site/docs/reference/scripts/get-record.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/get-record","permalink":"/reference/scripts/get-record","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Admin API","permalink":"/reference/admin-api"},"next":{"title":"Create Record","permalink":"/reference/scripts/create-record"}}');var s=n(4848),c=n(8453);const i={},o="Query: Get a Single Record",d={},a=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function l(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,c.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.header,{children:(0,s.jsx)(r.h1,{id:"query-get-a-single-record",children:"Query: Get a Single Record"})}),"\n",(0,s.jsx)(r.p,{children:"Fetch a single record by its AT URI."}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"Lexicon type:"})," query"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-lua",children:'function handle()\n if not params.uri then\n return { error = "uri parameter is required" }\n end\n\n local record = db.get(params.uri)\n if not record then\n return { error = "not found" }\n end\n\n return { record = record }\nend\n'})}),"\n",(0,s.jsx)(r.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsxs)(r.li,{children:["Check that the ",(0,s.jsx)(r.code,{children:"uri"})," query parameter is present. Return a structured error if missing."]}),"\n",(0,s.jsxs)(r.li,{children:["Look up the record with ",(0,s.jsx)(r.a,{href:"../../guides/scripting#dbget",children:(0,s.jsx)(r.code,{children:"db.get"})}),", which returns the record table or ",(0,s.jsx)(r.code,{children:"nil"}),"."]}),"\n",(0,s.jsx)(r.li,{children:"Return the record wrapped in an object."}),"\n"]}),"\n",(0,s.jsx)(r.h2,{id:"usage",children:"Usage"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{children:"GET /xrpc/xyz.statusphere.getRecord?uri=at://did:plc:abc/xyz.statusphere.record/abc123\n"})}),"\n",(0,s.jsx)(r.h2,{id:"use-case",children:"Use case"}),"\n",(0,s.jsxs)(r.p,{children:["A focused read endpoint for detail views or record verification. Returns structured error responses instead of calling ",(0,s.jsx)(r.code,{children:"error()"}),", so the client gets a 200 with an error field it can handle gracefully rather than a 500."]})]})}function u(e={}){const{wrapper:r}={...(0,c.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453(e,r,n){n.d(r,{R:()=>i,x:()=>o});var t=n(6540);const s={},c=t.createContext(s);function i(e){const r=t.useContext(c);return t.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function o(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),t.createElement(c.Provider,{value:r},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[5011],{7544(e,r,n){n.r(r),n.d(r,{assets:()=>d,contentTitle:()=>o,default:()=>u,frontMatter:()=>i,metadata:()=>t,toc:()=>a});const t=JSON.parse('{"id":"reference/scripts/get-record","title":"Query: Get a Single Record","description":"Fetch a single record by its AT URI.","source":"@site/docs/reference/scripts/get-record.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/get-record","permalink":"/reference/scripts/get-record","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Admin API","permalink":"/reference/admin-api"},"next":{"title":"Create Record","permalink":"/reference/scripts/create-record"}}');var s=n(4848),c=n(8453);const i={},o="Query: Get a Single Record",d={},a=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function l(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,c.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.header,{children:(0,s.jsx)(r.h1,{id:"query-get-a-single-record",children:"Query: Get a Single Record"})}),"\n",(0,s.jsx)(r.p,{children:"Fetch a single record by its AT URI."}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"Lexicon type:"})," query"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-lua",children:'function handle()\n if not params.uri then\n return { error = "uri parameter is required" }\n end\n\n local record = db.get(params.uri)\n if not record then\n return { error = "not found" }\n end\n\n return { record = record }\nend\n'})}),"\n",(0,s.jsx)(r.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsxs)(r.li,{children:["Check that the ",(0,s.jsx)(r.code,{children:"uri"})," query parameter is present. Return a structured error if missing."]}),"\n",(0,s.jsxs)(r.li,{children:["Look up the record with ",(0,s.jsx)(r.a,{href:"/guides/scripting#dbget",children:(0,s.jsx)(r.code,{children:"db.get"})}),", which returns the record table or ",(0,s.jsx)(r.code,{children:"nil"}),"."]}),"\n",(0,s.jsx)(r.li,{children:"Return the record wrapped in an object."}),"\n"]}),"\n",(0,s.jsx)(r.h2,{id:"usage",children:"Usage"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{children:"GET /xrpc/xyz.statusphere.getRecord?uri=at://did:plc:abc/xyz.statusphere.record/abc123\n"})}),"\n",(0,s.jsx)(r.h2,{id:"use-case",children:"Use case"}),"\n",(0,s.jsxs)(r.p,{children:["A focused read endpoint for detail views or record verification. Returns structured error responses instead of calling ",(0,s.jsx)(r.code,{children:"error()"}),", so the client gets a 200 with an error field it can handle gracefully rather than a 500."]})]})}function u(e={}){const{wrapper:r}={...(0,c.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453(e,r,n){n.d(r,{R:()=>i,x:()=>o});var t=n(6540);const s={},c=t.createContext(s);function i(e){const r=t.useContext(c);return t.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function o(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),t.createElement(c.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/23374ca6.0bc9e136.js b/assets/js/23374ca6.0bc9e136.js new file mode 100644 index 0000000..1e4abca --- /dev/null +++ b/assets/js/23374ca6.0bc9e136.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[2278],{7403(e,n,i){i.r(n),i.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>h,frontMatter:()=>o,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"README","title":"HappyView","description":"HappyView is the best way to build an AppView for the AT Protocol. Upload your lexicon schemas and get a fully functional AppView, complete with XRPC endpoints, OAuth, real-time network sync, and historical backfill, without writing a single line of server code.","source":"@site/docs/README.md","sourceDirName":".","slug":"/","permalink":"/","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","next":{"title":"Quickstart","permalink":"/getting-started/quickstart"}}');var r=i(4848),s=i(8453);const o={},a="HappyView",l={},c=[{value:"Features",id:"features",level:2},{value:"Design Principles",id:"design-principles",level:2},{value:"Next Steps",id:"next-steps",level:2}];function d(e){const n={a:"a",em:"em",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"happyview",children:"HappyView"})}),"\n",(0,r.jsxs)(n.p,{children:["HappyView is the best way to build an ",(0,r.jsx)(n.a,{href:"https://atproto.com/guides/glossary#app-view",children:"AppView"})," for the ",(0,r.jsx)(n.a,{href:"https://atproto.com",children:"AT Protocol"}),". Upload your ",(0,r.jsx)(n.a,{href:"/reference/glossary#at-protocol-terms",children:"lexicon"})," schemas and get a fully functional AppView, complete with ",(0,r.jsx)(n.a,{href:"/reference/glossary#at-protocol-terms",children:"XRPC"})," endpoints, OAuth, real-time network sync, and historical ",(0,r.jsx)(n.a,{href:"/guides/backfill",children:"backfill"}),", without writing a single line of server code."]}),"\n",(0,r.jsx)(n.p,{children:"Building an AppView from scratch means wiring up firehose connections, record storage, XRPC routing, OAuth flows, and PDS write proxying before you can even think about your application. HappyView handles all of that. Define your data model with lexicons, add custom logic with Lua scripts when you need it, and ship your app."}),"\n",(0,r.jsx)(n.h2,{id:"features",children:"Features"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\ud83d\udcdc ",(0,r.jsx)(n.strong,{children:"Lexicon-Driven"}),": Upload your lexicon schemas and HappyView generates fully functional XRPC query and procedure endpoints automatically, no code required"]}),"\n",(0,r.jsxs)(n.li,{children:["\ud83d\udd04 ",(0,r.jsx)(n.strong,{children:"Real-Time Sync"}),": Records stream in from the AT Protocol network in real-time via ",(0,r.jsx)(n.a,{href:"https://github.com/bluesky-social/indigo/tree/main/cmd/tap",children:"Tap"}),", with cryptographic verification and backfill via the admin API"]}),"\n",(0,r.jsxs)(n.li,{children:["\ud83d\udd10 ",(0,r.jsx)(n.strong,{children:"OAuth Built In"}),": ",(0,r.jsx)(n.a,{href:"https://github.com/graze-social/aip",children:"AIP"})," handles authentication, and writes are proxied back to the user's PDS, so there's no session management needed"]}),"\n",(0,r.jsxs)(n.li,{children:["\ud83c\udf19 ",(0,r.jsx)(n.strong,{children:"Lua Scripting"}),": Add custom query and procedure logic with Lua scripts that have full access to the record database"]}),"\n",(0,r.jsxs)(n.li,{children:["\ud83d\uddc4\ufe0f ",(0,r.jsx)(n.strong,{children:"Automatic Indexing"}),": HappyView indexes relevant records into PostgreSQL as they arrive, ready to query"]}),"\n",(0,r.jsxs)(n.li,{children:["\ud83c\udf10 ",(0,r.jsx)(n.strong,{children:"Network Lexicons"}),": Fetch lexicon schemas directly from the AT Protocol network via DNS authority resolution"]}),"\n",(0,r.jsxs)(n.li,{children:["\u26a1 ",(0,r.jsx)(n.strong,{children:"Hot Reloading"}),": Upload or update lexicons at runtime, and new endpoints are available immediately with no restart"]}),"\n",(0,r.jsxs)(n.li,{children:["\ud83d\udee0\ufe0f ",(0,r.jsx)(n.strong,{children:"Admin Dashboard"}),": Manage lexicons, monitor record stats, and run backfill jobs through a built-in admin API"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"design-principles",children:"Design Principles"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Schema-first"}),": Your Lexicons are the source of truth. Upload a schema and HappyView derives endpoints, indexing rules, and network sync from it. You describe ",(0,r.jsx)(n.em,{children:"what"})," your data looks like; HappyView figures out the rest."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Zero boilerplate"}),": HappyView handles AppView infrastructure (firehose, backfill, OAuth, PDS proxying) for you. You should be writing application logic from minute one, not plumbing."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Runtime-configurable"}),": Lexicons can be added, updated, and removed without restarting the server. New endpoints and sync rules take effect immediately, so you can iterate on your data model in real time."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Protocol-native"}),": HappyView works with ",(0,r.jsx)(n.em,{children:"any"})," PDS, resolves DIDs through the directory, and follows AT Protocol conventions. It's a first-class citizen of the network, not a wrapper around it."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"next-steps",children:"Next Steps"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"/getting-started/deployment/railway",children:"Quickstart"}),": Deploy HappyView on Railway or run it locally"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"/guides/lexicons",children:"Lexicons"}),": Upload lexicon schemas and start indexing records"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"/guides/scripting",children:"Lua Scripting"}),": Write custom query and procedure logic"]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},8453(e,n,i){i.d(n,{R:()=>o,x:()=>a});var t=i(6540);const r={},s=t.createContext(r);function o(e){const n=t.useContext(s);return t.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),t.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/23374ca6.512a3357.js b/assets/js/23374ca6.512a3357.js deleted file mode 100644 index 0c9150f..0000000 --- a/assets/js/23374ca6.512a3357.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[2278],{7403(e,n,i){i.r(n),i.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>h,frontMatter:()=>o,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"README","title":"HappyView","description":"HappyView is the best way to build an AppView for the AT Protocol. Upload your lexicon schemas and get a fully functional AppView, complete with XRPC endpoints, OAuth, real-time network sync, and historical backfill, without writing a single line of server code.","source":"@site/docs/README.md","sourceDirName":".","slug":"/","permalink":"/","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","next":{"title":"Quickstart","permalink":"/getting-started/quickstart"}}');var r=i(4848),s=i(8453);const o={},a="HappyView",l={},c=[{value:"Features",id:"features",level:2},{value:"Design Principles",id:"design-principles",level:2},{value:"Next Steps",id:"next-steps",level:2}];function d(e){const n={a:"a",em:"em",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"happyview",children:"HappyView"})}),"\n",(0,r.jsxs)(n.p,{children:["HappyView is the best way to build an ",(0,r.jsx)(n.a,{href:"https://atproto.com/guides/glossary#app-view",children:"AppView"})," for the ",(0,r.jsx)(n.a,{href:"https://atproto.com",children:"AT Protocol"}),". Upload your ",(0,r.jsx)(n.a,{href:"reference/glossary#at-protocol-terms",children:"lexicon"})," schemas and get a fully functional AppView, complete with ",(0,r.jsx)(n.a,{href:"reference/glossary#at-protocol-terms",children:"XRPC"})," endpoints, OAuth, real-time network sync, and historical ",(0,r.jsx)(n.a,{href:"guides/backfill",children:"backfill"}),", without writing a single line of server code."]}),"\n",(0,r.jsx)(n.p,{children:"Building an AppView from scratch means wiring up firehose connections, record storage, XRPC routing, OAuth flows, and PDS write proxying before you can even think about your application. HappyView handles all of that. Define your data model with lexicons, add custom logic with Lua scripts when you need it, and ship your app."}),"\n",(0,r.jsx)(n.h2,{id:"features",children:"Features"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\ud83d\udcdc ",(0,r.jsx)(n.strong,{children:"Lexicon-Driven"}),": Upload your lexicon schemas and HappyView generates fully functional XRPC query and procedure endpoints automatically, no code required"]}),"\n",(0,r.jsxs)(n.li,{children:["\ud83d\udd04 ",(0,r.jsx)(n.strong,{children:"Real-Time Sync"}),": Records stream in from the AT Protocol network in real-time via ",(0,r.jsx)(n.a,{href:"https://github.com/bluesky-social/indigo/tree/main/cmd/tap",children:"Tap"}),", with cryptographic verification and backfill via the admin API"]}),"\n",(0,r.jsxs)(n.li,{children:["\ud83d\udd10 ",(0,r.jsx)(n.strong,{children:"OAuth Built In"}),": ",(0,r.jsx)(n.a,{href:"https://github.com/graze-social/aip",children:"AIP"})," handles authentication, and writes are proxied back to the user's PDS, so there's no session management needed"]}),"\n",(0,r.jsxs)(n.li,{children:["\ud83c\udf19 ",(0,r.jsx)(n.strong,{children:"Lua Scripting"}),": Add custom query and procedure logic with Lua scripts that have full access to the record database"]}),"\n",(0,r.jsxs)(n.li,{children:["\ud83d\uddc4\ufe0f ",(0,r.jsx)(n.strong,{children:"Automatic Indexing"}),": HappyView indexes relevant records into PostgreSQL as they arrive, ready to query"]}),"\n",(0,r.jsxs)(n.li,{children:["\ud83c\udf10 ",(0,r.jsx)(n.strong,{children:"Network Lexicons"}),": Fetch lexicon schemas directly from the AT Protocol network via DNS authority resolution"]}),"\n",(0,r.jsxs)(n.li,{children:["\u26a1 ",(0,r.jsx)(n.strong,{children:"Hot Reloading"}),": Upload or update lexicons at runtime, and new endpoints are available immediately with no restart"]}),"\n",(0,r.jsxs)(n.li,{children:["\ud83d\udee0\ufe0f ",(0,r.jsx)(n.strong,{children:"Admin Dashboard"}),": Manage lexicons, monitor record stats, and run backfill jobs through a built-in admin API"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"design-principles",children:"Design Principles"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Schema-first"}),": Your Lexicons are the source of truth. Upload a schema and HappyView derives endpoints, indexing rules, and network sync from it. You describe ",(0,r.jsx)(n.em,{children:"what"})," your data looks like; HappyView figures out the rest."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Zero boilerplate"}),": HappyView handles AppView infrastructure (firehose, backfill, OAuth, PDS proxying) for you. You should be writing application logic from minute one, not plumbing."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Runtime-configurable"}),": Lexicons can be added, updated, and removed without restarting the server. New endpoints and sync rules take effect immediately, so you can iterate on your data model in real time."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Protocol-native"}),": HappyView works with ",(0,r.jsx)(n.em,{children:"any"})," PDS, resolves DIDs through the directory, and follows AT Protocol conventions. It's a first-class citizen of the network, not a wrapper around it."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"next-steps",children:"Next Steps"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"getting-started/deployment/railway",children:"Quickstart"}),": Deploy HappyView on Railway or run it locally"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"guides/lexicons",children:"Lexicons"}),": Upload lexicon schemas and start indexing records"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"guides/scripting",children:"Lua Scripting"}),": Write custom query and procedure logic"]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},8453(e,n,i){i.d(n,{R:()=>o,x:()=>a});var t=i(6540);const r={},s=t.createContext(r);function o(e){const n=t.useContext(s);return t.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),t.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/280f48ec.09f3a1e7.js b/assets/js/280f48ec.09f3a1e7.js deleted file mode 100644 index e7058e9..0000000 --- a/assets/js/280f48ec.09f3a1e7.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[787],{4796(e,r,t){t.r(r),t.d(r,{assets:()=>i,contentTitle:()=>o,default:()=>h,frontMatter:()=>c,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"reference/scripts/sidecar-records","title":"Procedure: Create Sidecar Records","description":"Create two records with different collection NSIDs but the same rkey, linking them together by key.","source":"@site/docs/reference/scripts/sidecar-records.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/sidecar-records","permalink":"/reference/scripts/sidecar-records","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Batch Save","permalink":"/reference/scripts/batch-save"},"next":{"title":"Cascading Delete","permalink":"/reference/scripts/cascading-delete"}}');var s=t(4848),a=t(8453);const c={},o="Procedure: Create Sidecar Records",i={},d=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function l(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.header,{children:(0,s.jsx)(r.h1,{id:"procedure-create-sidecar-records",children:"Procedure: Create Sidecar Records"})}),"\n",(0,s.jsx)(r.p,{children:"Create two records with different collection NSIDs but the same rkey, linking them together by key."}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"Lexicon type:"})," procedure"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-lua",children:'function handle()\n local rkey = TID()\n\n local post = Record("xyz.statusphere.post", {\n text = input.text,\n createdAt = now(),\n })\n post:set_rkey(rkey)\n\n local metadata = Record("xyz.statusphere.postMetadata", {\n lang = input.lang or "en",\n source = input.source or "web",\n createdAt = now(),\n })\n metadata:set_rkey(rkey)\n\n Record.save_all({ post, metadata })\n\n return {\n post = { uri = post._uri, cid = post._cid },\n metadata = { uri = metadata._uri, cid = metadata._cid },\n }\nend\n'})}),"\n",(0,s.jsx)(r.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsxs)(r.li,{children:["Generate a single ",(0,s.jsx)(r.a,{href:"../../guides/scripting#utility-globals",children:(0,s.jsx)(r.code,{children:"TID()"})})," to use as the rkey for both records."]}),"\n",(0,s.jsxs)(r.li,{children:["Create a ",(0,s.jsx)(r.code,{children:"Record"})," for each collection and call ",(0,s.jsx)(r.code,{children:"r:set_rkey()"})," with the shared rkey."]}),"\n",(0,s.jsxs)(r.li,{children:["Save both records in parallel with ",(0,s.jsx)(r.a,{href:"../../guides/scripting#static-methods",children:(0,s.jsx)(r.code,{children:"Record.save_all()"})}),"."]}),"\n",(0,s.jsx)(r.li,{children:"Return both URIs so the client knows the identity of each record."}),"\n"]}),"\n",(0,s.jsx)(r.h2,{id:"usage",children:"Usage"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/xrpc/xyz.statusphere.createPost \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "text": "Hello world", "lang": "en", "source": "web" }\'\n'})}),"\n",(0,s.jsx)(r.p,{children:"The response includes URIs for both the post and its metadata:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-json",children:'{\n "post": {\n "uri": "at://did:plc:abc/xyz.statusphere.post/3abc123",\n "cid": "bafyrei..."\n },\n "metadata": {\n "uri": "at://did:plc:abc/xyz.statusphere.postMetadata/3abc123",\n "cid": "bafyrei..."\n }\n}\n'})}),"\n",(0,s.jsx)(r.h2,{id:"use-case",children:"Use case"}),"\n",(0,s.jsx)(r.p,{children:"Sidecar records are useful when you want to associate related data across collections without embedding everything in a single record. Because they share an rkey, you can derive one URI from the other:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{children:"at:// did:plc:abc /xyz.statusphere.post /3abc123\nat:// did:plc:abc /xyz.statusphere.postMetadata /3abc123\n ^^^^^^^ same rkey\n"})}),"\n",(0,s.jsx)(r.p,{children:"This is a common AT Protocol pattern for keeping a primary record lean while storing auxiliary data (metadata, reactions, settings) in a companion collection."})]})}function h(e={}){const{wrapper:r}={...(0,a.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453(e,r,t){t.d(r,{R:()=>c,x:()=>o});var n=t(6540);const s={},a=n.createContext(s);function c(e){const r=n.useContext(a);return n.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function o(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:c(e.components),n.createElement(a.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/280f48ec.8ce2f590.js b/assets/js/280f48ec.8ce2f590.js new file mode 100644 index 0000000..39a038e --- /dev/null +++ b/assets/js/280f48ec.8ce2f590.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[787],{4796(e,r,t){t.r(r),t.d(r,{assets:()=>i,contentTitle:()=>o,default:()=>h,frontMatter:()=>c,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"reference/scripts/sidecar-records","title":"Procedure: Create Sidecar Records","description":"Create two records with different collection NSIDs but the same rkey, linking them together by key.","source":"@site/docs/reference/scripts/sidecar-records.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/sidecar-records","permalink":"/reference/scripts/sidecar-records","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Batch Save","permalink":"/reference/scripts/batch-save"},"next":{"title":"Cascading Delete","permalink":"/reference/scripts/cascading-delete"}}');var s=t(4848),a=t(8453);const c={},o="Procedure: Create Sidecar Records",i={},d=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function l(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.header,{children:(0,s.jsx)(r.h1,{id:"procedure-create-sidecar-records",children:"Procedure: Create Sidecar Records"})}),"\n",(0,s.jsx)(r.p,{children:"Create two records with different collection NSIDs but the same rkey, linking them together by key."}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"Lexicon type:"})," procedure"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-lua",children:'function handle()\n local rkey = TID()\n\n local post = Record("xyz.statusphere.post", {\n text = input.text,\n createdAt = now(),\n })\n post:set_rkey(rkey)\n\n local metadata = Record("xyz.statusphere.postMetadata", {\n lang = input.lang or "en",\n source = input.source or "web",\n createdAt = now(),\n })\n metadata:set_rkey(rkey)\n\n Record.save_all({ post, metadata })\n\n return {\n post = { uri = post._uri, cid = post._cid },\n metadata = { uri = metadata._uri, cid = metadata._cid },\n }\nend\n'})}),"\n",(0,s.jsx)(r.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsxs)(r.li,{children:["Generate a single ",(0,s.jsx)(r.a,{href:"/guides/scripting#utility-globals",children:(0,s.jsx)(r.code,{children:"TID()"})})," to use as the rkey for both records."]}),"\n",(0,s.jsxs)(r.li,{children:["Create a ",(0,s.jsx)(r.code,{children:"Record"})," for each collection and call ",(0,s.jsx)(r.code,{children:"r:set_rkey()"})," with the shared rkey."]}),"\n",(0,s.jsxs)(r.li,{children:["Save both records in parallel with ",(0,s.jsx)(r.a,{href:"/guides/scripting#static-methods",children:(0,s.jsx)(r.code,{children:"Record.save_all()"})}),"."]}),"\n",(0,s.jsx)(r.li,{children:"Return both URIs so the client knows the identity of each record."}),"\n"]}),"\n",(0,s.jsx)(r.h2,{id:"usage",children:"Usage"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/xrpc/xyz.statusphere.createPost \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "text": "Hello world", "lang": "en", "source": "web" }\'\n'})}),"\n",(0,s.jsx)(r.p,{children:"The response includes URIs for both the post and its metadata:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-json",children:'{\n "post": {\n "uri": "at://did:plc:abc/xyz.statusphere.post/3abc123",\n "cid": "bafyrei..."\n },\n "metadata": {\n "uri": "at://did:plc:abc/xyz.statusphere.postMetadata/3abc123",\n "cid": "bafyrei..."\n }\n}\n'})}),"\n",(0,s.jsx)(r.h2,{id:"use-case",children:"Use case"}),"\n",(0,s.jsx)(r.p,{children:"Sidecar records are useful when you want to associate related data across collections without embedding everything in a single record. Because they share an rkey, you can derive one URI from the other:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{children:"at:// did:plc:abc /xyz.statusphere.post /3abc123\nat:// did:plc:abc /xyz.statusphere.postMetadata /3abc123\n ^^^^^^^ same rkey\n"})}),"\n",(0,s.jsx)(r.p,{children:"This is a common AT Protocol pattern for keeping a primary record lean while storing auxiliary data (metadata, reactions, settings) in a companion collection."})]})}function h(e={}){const{wrapper:r}={...(0,a.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453(e,r,t){t.d(r,{R:()=>c,x:()=>o});var n=t(6540);const s={},a=n.createContext(s);function c(e){const r=n.useContext(a);return n.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function o(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:c(e.components),n.createElement(a.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/43880f7a.8cbd0596.js b/assets/js/43880f7a.a0c8f815.js similarity index 54% rename from assets/js/43880f7a.8cbd0596.js rename to assets/js/43880f7a.a0c8f815.js index 182410e..8c598a5 100644 --- a/assets/js/43880f7a.8cbd0596.js +++ b/assets/js/43880f7a.a0c8f815.js @@ -1 +1 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[6590],{1572(e,r,t){t.r(r),t.d(r,{assets:()=>a,contentTitle:()=>i,default:()=>h,frontMatter:()=>o,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"reference/scripts/create-record","title":"Procedure: Create a Record","description":"The simplest write: take the request body, save it as a record, and return the URI.","source":"@site/docs/reference/scripts/create-record.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/create-record","permalink":"/reference/scripts/create-record","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Get a Record","permalink":"/reference/scripts/get-record"},"next":{"title":"Upsert Record","permalink":"/reference/scripts/upsert-record"}}');var s=t(4848),c=t(8453);const o={},i="Procedure: Create a Record",a={},d=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function l(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,c.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.header,{children:(0,s.jsx)(r.h1,{id:"procedure-create-a-record",children:"Procedure: Create a Record"})}),"\n",(0,s.jsx)(r.p,{children:"The simplest write: take the request body, save it as a record, and return the URI."}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"Lexicon type:"})," procedure"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-lua",children:"function handle()\n local r = Record(collection, input)\n r:save()\n return { uri = r._uri, cid = r._cid }\nend\n"})}),"\n",(0,s.jsx)(r.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsxs)(r.li,{children:["Create a new ",(0,s.jsx)(r.a,{href:"../../guides/scripting#record-api",children:(0,s.jsx)(r.code,{children:"Record"})})," instance from the target collection, populated with the fields from the request body."]}),"\n",(0,s.jsxs)(r.li,{children:["Call ",(0,s.jsx)(r.code,{children:"r:save()"}),", which creates the record on the caller's PDS and indexes it locally."]}),"\n",(0,s.jsx)(r.li,{children:"Return the AT URI and CID of the newly created record."}),"\n"]}),"\n",(0,s.jsx)(r.h2,{id:"usage",children:"Usage"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/xrpc/xyz.statusphere.createRecord \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "text": "Hello world", "createdAt": "2025-01-01T00:00:00Z" }\'\n'})}),"\n",(0,s.jsx)(r.h2,{id:"use-case",children:"Use case"}),"\n",(0,s.jsx)(r.p,{children:"This is the simplest possible write procedure. It works well when the client is responsible for populating all record fields and no server-side validation or transformation is needed."})]})}function h(e={}){const{wrapper:r}={...(0,c.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453(e,r,t){t.d(r,{R:()=>o,x:()=>i});var n=t(6540);const s={},c=n.createContext(s);function o(e){const r=n.useContext(c);return n.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function i(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),n.createElement(c.Provider,{value:r},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[6590],{1572(e,r,t){t.r(r),t.d(r,{assets:()=>a,contentTitle:()=>i,default:()=>h,frontMatter:()=>o,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"reference/scripts/create-record","title":"Procedure: Create a Record","description":"The simplest write: take the request body, save it as a record, and return the URI.","source":"@site/docs/reference/scripts/create-record.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/create-record","permalink":"/reference/scripts/create-record","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Get a Record","permalink":"/reference/scripts/get-record"},"next":{"title":"Upsert Record","permalink":"/reference/scripts/upsert-record"}}');var s=t(4848),c=t(8453);const o={},i="Procedure: Create a Record",a={},d=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function l(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,c.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.header,{children:(0,s.jsx)(r.h1,{id:"procedure-create-a-record",children:"Procedure: Create a Record"})}),"\n",(0,s.jsx)(r.p,{children:"The simplest write: take the request body, save it as a record, and return the URI."}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"Lexicon type:"})," procedure"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-lua",children:"function handle()\n local r = Record(collection, input)\n r:save()\n return { uri = r._uri, cid = r._cid }\nend\n"})}),"\n",(0,s.jsx)(r.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsxs)(r.li,{children:["Create a new ",(0,s.jsx)(r.a,{href:"/guides/scripting#record-api",children:(0,s.jsx)(r.code,{children:"Record"})})," instance from the target collection, populated with the fields from the request body."]}),"\n",(0,s.jsxs)(r.li,{children:["Call ",(0,s.jsx)(r.code,{children:"r:save()"}),", which creates the record on the caller's PDS and indexes it locally."]}),"\n",(0,s.jsx)(r.li,{children:"Return the AT URI and CID of the newly created record."}),"\n"]}),"\n",(0,s.jsx)(r.h2,{id:"usage",children:"Usage"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/xrpc/xyz.statusphere.createRecord \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "text": "Hello world", "createdAt": "2025-01-01T00:00:00Z" }\'\n'})}),"\n",(0,s.jsx)(r.h2,{id:"use-case",children:"Use case"}),"\n",(0,s.jsx)(r.p,{children:"This is the simplest possible write procedure. It works well when the client is responsible for populating all record fields and no server-side validation or transformation is needed."})]})}function h(e={}){const{wrapper:r}={...(0,c.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453(e,r,t){t.d(r,{R:()=>o,x:()=>i});var n=t(6540);const s={},c=n.createContext(s);function o(e){const r=n.useContext(c);return n.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function i(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),n.createElement(c.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/539fb2af.ab94867b.js b/assets/js/539fb2af.ab94867b.js new file mode 100644 index 0000000..a47c4d9 --- /dev/null +++ b/assets/js/539fb2af.ab94867b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[5563],{8289(e,n,i){i.r(n),i.d(n,{assets:()=>a,contentTitle:()=>d,default:()=>h,frontMatter:()=>o,metadata:()=>r,toc:()=>c});const r=JSON.parse('{"id":"getting-started/dashboard","title":"Dashboard","description":"HappyView ships with a web dashboard that provides a visual interface for everything the admin API offers: managing lexicons, viewing indexed records, and monitoring backfill jobs. It runs as a separate Next.js application alongside the Rust backend.","source":"@site/docs/getting-started/dashboard.md","sourceDirName":"getting-started","slug":"/getting-started/dashboard","permalink":"/getting-started/dashboard","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Configuration","permalink":"/getting-started/configuration"},"next":{"title":"Statusphere","permalink":"/tutorials/statusphere"}}');var s=i(4848),t=i(8453);const o={},d="Dashboard",a={},c=[{value:"Logging in for the first time",id:"logging-in-for-the-first-time",level:2},{value:"Adding a lexicon",id:"adding-a-lexicon",level:2},{value:"JSON editor",id:"json-editor",level:3},{value:"Lua editor",id:"lua-editor",level:3}];function l(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"dashboard",children:"Dashboard"})}),"\n",(0,s.jsxs)(n.p,{children:["HappyView ships with a web dashboard that provides a visual interface for everything the ",(0,s.jsx)(n.a,{href:"/reference/admin-api",children:"admin API"})," offers: managing lexicons, viewing indexed records, and monitoring backfill jobs. It runs as a separate Next.js application alongside the Rust backend."]}),"\n",(0,s.jsx)(n.h2,{id:"logging-in-for-the-first-time",children:"Logging in for the first time"}),"\n",(0,s.jsx)(n.p,{children:"The dashboard uses AT Protocol OAuth via AIP. If no admins exist in the database yet, the first authenticated request to any admin endpoint automatically bootstraps that user as an admin."}),"\n",(0,s.jsx)(n.h2,{id:"adding-a-lexicon",children:"Adding a lexicon"}),"\n",(0,s.jsxs)(n.p,{children:["Navigate to ",(0,s.jsx)(n.strong,{children:"Lexicons > Add Lexicon"})," and choose ",(0,s.jsx)(n.strong,{children:"Local"})," or ",(0,s.jsx)(n.strong,{children:"Network"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Local"})," lexicons are defined by you. The editor shows two side-by-side panels (stacked on mobile):"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Lexicon JSON"})," (left): define your lexicon schema"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Lua Script"})," (right): write the handler for query/procedure types"]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["The Lua panel only appears when the lexicon's ",(0,s.jsx)(n.code,{children:"defs.main.type"})," is ",(0,s.jsx)(n.code,{children:"query"})," or ",(0,s.jsx)(n.code,{children:"procedure"}),". For record-type lexicons, only the JSON panel is shown."]}),"\n",(0,s.jsx)(n.p,{children:"A default Lua script is auto-generated when you first set the type to query or procedure. The template updates automatically when the type changes, but once you manually edit the script your changes are preserved."}),"\n",(0,s.jsxs)(n.p,{children:["Toggle ",(0,s.jsx)(n.strong,{children:"Enable backfill"})," to index historical records when uploading a record-type lexicon."]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Network"})," lexicons are fetched from the AT Protocol network. Enter an NSID (e.g. ",(0,s.jsx)(n.code,{children:"xyz.statusphere.status"}),") and HappyView resolves the schema automatically. If found, the lexicon JSON is displayed in a read-only editor. Click ",(0,s.jsx)(n.strong,{children:"Add"})," to track it. Network lexicons are kept up to date via Tap. See ",(0,s.jsx)(n.a,{href:"/guides/lexicons#network-lexicons",children:"Lexicons - Network lexicons"})," for how resolution works."]}),"\n",(0,s.jsx)(n.h3,{id:"json-editor",children:"JSON editor"}),"\n",(0,s.jsx)(n.p,{children:"The JSON editor provides real-time validation against the AT Protocol Lexicon v1 schema:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Validation for Lexicon format"}),"\n",(0,s.jsxs)(n.li,{children:["Auto-complete for definition types (",(0,s.jsx)(n.code,{children:"record"}),", ",(0,s.jsx)(n.code,{children:"query"}),", ",(0,s.jsx)(n.code,{children:"procedure"}),", ",(0,s.jsx)(n.code,{children:"subscription"}),"), property types (",(0,s.jsx)(n.code,{children:"string"}),", ",(0,s.jsx)(n.code,{children:"integer"}),", ",(0,s.jsx)(n.code,{children:"boolean"}),", ",(0,s.jsx)(n.code,{children:"ref"}),", ",(0,s.jsx)(n.code,{children:"union"}),", ",(0,s.jsx)(n.code,{children:"blob"}),", ",(0,s.jsx)(n.code,{children:"cid-link"}),", etc.), and schema structure (",(0,s.jsx)(n.code,{children:"defs"}),", ",(0,s.jsx)(n.code,{children:"main"}),", ",(0,s.jsx)(n.code,{children:"properties"}),", ",(0,s.jsx)(n.code,{children:"required"}),")"]}),"\n",(0,s.jsxs)(n.li,{children:["Enforces the required top-level shape: ",(0,s.jsx)(n.code,{children:"lexicon"}),", ",(0,s.jsx)(n.code,{children:"id"}),", and ",(0,s.jsx)(n.code,{children:"defs.main"})]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"lua-editor",children:"Lua editor"}),"\n",(0,s.jsxs)(n.p,{children:["The Lua editor provides context-aware code completions, including suggestions for the ",(0,s.jsx)(n.code,{children:"Record"}),", ",(0,s.jsx)(n.code,{children:"db"}),", ",(0,s.jsx)(n.code,{children:"input"}),", and ",(0,s.jsx)(n.code,{children:"params"})," APIs as well as Lua keywords, builtins, and standard library functions. It also offers snippet templates for common constructs like ",(0,s.jsx)(n.code,{children:"if"}),", ",(0,s.jsx)(n.code,{children:"for"}),", and ",(0,s.jsx)(n.code,{children:"function"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["See ",(0,s.jsx)(n.a,{href:"/guides/scripting",children:"Lua Scripting"})," for the full runtime reference and examples."]})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453(e,n,i){i.d(n,{R:()=>o,x:()=>d});var r=i(6540);const s={},t=r.createContext(s);function o(e){const n=r.useContext(t);return r.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),r.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/539fb2af.dcb4d3d5.js b/assets/js/539fb2af.dcb4d3d5.js deleted file mode 100644 index 962caf5..0000000 --- a/assets/js/539fb2af.dcb4d3d5.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[5563],{8289(e,n,i){i.r(n),i.d(n,{assets:()=>a,contentTitle:()=>d,default:()=>h,frontMatter:()=>o,metadata:()=>r,toc:()=>c});const r=JSON.parse('{"id":"getting-started/dashboard","title":"Dashboard","description":"HappyView ships with a web dashboard that provides a visual interface for everything the admin API offers: managing lexicons, viewing indexed records, and monitoring backfill jobs. It runs as a separate Next.js application alongside the Rust backend.","source":"@site/docs/getting-started/dashboard.md","sourceDirName":"getting-started","slug":"/getting-started/dashboard","permalink":"/getting-started/dashboard","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Configuration","permalink":"/getting-started/configuration"},"next":{"title":"Statusphere","permalink":"/tutorials/statusphere"}}');var s=i(4848),t=i(8453);const o={},d="Dashboard",a={},c=[{value:"Logging in for the first time",id:"logging-in-for-the-first-time",level:2},{value:"Adding a lexicon",id:"adding-a-lexicon",level:2},{value:"JSON editor",id:"json-editor",level:3},{value:"Lua editor",id:"lua-editor",level:3}];function l(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"dashboard",children:"Dashboard"})}),"\n",(0,s.jsxs)(n.p,{children:["HappyView ships with a web dashboard that provides a visual interface for everything the ",(0,s.jsx)(n.a,{href:"../reference/admin-api",children:"admin API"})," offers: managing lexicons, viewing indexed records, and monitoring backfill jobs. It runs as a separate Next.js application alongside the Rust backend."]}),"\n",(0,s.jsx)(n.h2,{id:"logging-in-for-the-first-time",children:"Logging in for the first time"}),"\n",(0,s.jsx)(n.p,{children:"The dashboard uses AT Protocol OAuth via AIP. If no admins exist in the database yet, the first authenticated request to any admin endpoint automatically bootstraps that user as an admin."}),"\n",(0,s.jsx)(n.h2,{id:"adding-a-lexicon",children:"Adding a lexicon"}),"\n",(0,s.jsxs)(n.p,{children:["Navigate to ",(0,s.jsx)(n.strong,{children:"Lexicons > Add Lexicon"})," and choose ",(0,s.jsx)(n.strong,{children:"Local"})," or ",(0,s.jsx)(n.strong,{children:"Network"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Local"})," lexicons are defined by you. The editor shows two side-by-side panels (stacked on mobile):"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Lexicon JSON"})," (left): define your lexicon schema"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Lua Script"})," (right): write the handler for query/procedure types"]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["The Lua panel only appears when the lexicon's ",(0,s.jsx)(n.code,{children:"defs.main.type"})," is ",(0,s.jsx)(n.code,{children:"query"})," or ",(0,s.jsx)(n.code,{children:"procedure"}),". For record-type lexicons, only the JSON panel is shown."]}),"\n",(0,s.jsx)(n.p,{children:"A default Lua script is auto-generated when you first set the type to query or procedure. The template updates automatically when the type changes, but once you manually edit the script your changes are preserved."}),"\n",(0,s.jsxs)(n.p,{children:["Toggle ",(0,s.jsx)(n.strong,{children:"Enable backfill"})," to index historical records when uploading a record-type lexicon."]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Network"})," lexicons are fetched from the AT Protocol network. Enter an NSID (e.g. ",(0,s.jsx)(n.code,{children:"xyz.statusphere.status"}),") and HappyView resolves the schema automatically. If found, the lexicon JSON is displayed in a read-only editor. Click ",(0,s.jsx)(n.strong,{children:"Add"})," to track it. Network lexicons are kept up to date via Tap. See ",(0,s.jsx)(n.a,{href:"../guides/lexicons#network-lexicons",children:"Lexicons - Network lexicons"})," for how resolution works."]}),"\n",(0,s.jsx)(n.h3,{id:"json-editor",children:"JSON editor"}),"\n",(0,s.jsx)(n.p,{children:"The JSON editor provides real-time validation against the AT Protocol Lexicon v1 schema:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Validation for Lexicon format"}),"\n",(0,s.jsxs)(n.li,{children:["Auto-complete for definition types (",(0,s.jsx)(n.code,{children:"record"}),", ",(0,s.jsx)(n.code,{children:"query"}),", ",(0,s.jsx)(n.code,{children:"procedure"}),", ",(0,s.jsx)(n.code,{children:"subscription"}),"), property types (",(0,s.jsx)(n.code,{children:"string"}),", ",(0,s.jsx)(n.code,{children:"integer"}),", ",(0,s.jsx)(n.code,{children:"boolean"}),", ",(0,s.jsx)(n.code,{children:"ref"}),", ",(0,s.jsx)(n.code,{children:"union"}),", ",(0,s.jsx)(n.code,{children:"blob"}),", ",(0,s.jsx)(n.code,{children:"cid-link"}),", etc.), and schema structure (",(0,s.jsx)(n.code,{children:"defs"}),", ",(0,s.jsx)(n.code,{children:"main"}),", ",(0,s.jsx)(n.code,{children:"properties"}),", ",(0,s.jsx)(n.code,{children:"required"}),")"]}),"\n",(0,s.jsxs)(n.li,{children:["Enforces the required top-level shape: ",(0,s.jsx)(n.code,{children:"lexicon"}),", ",(0,s.jsx)(n.code,{children:"id"}),", and ",(0,s.jsx)(n.code,{children:"defs.main"})]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"lua-editor",children:"Lua editor"}),"\n",(0,s.jsxs)(n.p,{children:["The Lua editor provides context-aware code completions, including suggestions for the ",(0,s.jsx)(n.code,{children:"Record"}),", ",(0,s.jsx)(n.code,{children:"db"}),", ",(0,s.jsx)(n.code,{children:"input"}),", and ",(0,s.jsx)(n.code,{children:"params"})," APIs as well as Lua keywords, builtins, and standard library functions. It also offers snippet templates for common constructs like ",(0,s.jsx)(n.code,{children:"if"}),", ",(0,s.jsx)(n.code,{children:"for"}),", and ",(0,s.jsx)(n.code,{children:"function"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["See ",(0,s.jsx)(n.a,{href:"../guides/scripting",children:"Lua Scripting"})," for the full runtime reference and examples."]})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453(e,n,i){i.d(n,{R:()=>o,x:()=>d});var r=i(6540);const s={},t=r.createContext(s);function o(e){const n=r.useContext(t);return r.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),r.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5d3a5990.f2560b61.js b/assets/js/5d3a5990.a75f4a7b.js similarity index 55% rename from assets/js/5d3a5990.f2560b61.js rename to assets/js/5d3a5990.a75f4a7b.js index db8d7c4..b7938cc 100644 --- a/assets/js/5d3a5990.f2560b61.js +++ b/assets/js/5d3a5990.a75f4a7b.js @@ -1 +1 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[3197],{7825(e,s,r){r.r(s),r.d(s,{assets:()=>o,contentTitle:()=>l,default:()=>p,frontMatter:()=>a,metadata:()=>t,toc:()=>d});const t=JSON.parse('{"id":"reference/scripts/expanded-query","title":"Query: Expanded Query with Profiles","description":"List statuses and include the profile of each user who created one.","source":"@site/docs/reference/scripts/expanded-query.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/expanded-query","permalink":"/reference/scripts/expanded-query","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"List or Fetch","permalink":"/reference/scripts/list-or-fetch"},"next":{"title":"Update or Delete","permalink":"/reference/scripts/update-or-delete"}}');var n=r(4848),i=r(8453);const a={},l="Query: Expanded Query with Profiles",o={},d=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function c(e){const s={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.header,{children:(0,n.jsx)(s.h1,{id:"query-expanded-query-with-profiles",children:"Query: Expanded Query with Profiles"})}),"\n",(0,n.jsx)(s.p,{children:"List statuses and include the profile of each user who created one."}),"\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.strong,{children:"Lexicon type:"})," query"]}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-lua",children:'function handle()\n local limit = tonumber(params.limit) or 20\n if limit > 100 then limit = 100 end\n\n local result = db.query({\n collection = "xyz.statusphere.status",\n did = params.did,\n limit = limit,\n offset = tonumber(params.cursor) or 0,\n })\n\n -- Collect unique DIDs from the statuses\n local seen = {}\n local profile_uris = {}\n for _, status in ipairs(result.records) do\n local did = string.match(status.uri, "at://([^/]+)/")\n if did and not seen[did] then\n seen[did] = true\n profile_uris[#profile_uris + 1] = "at://" .. did .. "/app.bsky.actor.profile/self"\n end\n end\n\n -- Load all profiles in parallel\n local profiles = {}\n if #profile_uris > 0 then\n local loaded = Record.load_all(profile_uris)\n for i, profile in ipairs(loaded) do\n if profile then\n profiles[#profiles + 1] = profile\n end\n end\n end\n\n return {\n statuses = result.records,\n profiles = profiles,\n cursor = result.cursor,\n }\nend\n'})}),"\n",(0,n.jsx)(s.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,n.jsxs)(s.ol,{children:["\n",(0,n.jsx)(s.li,{children:"Query statuses from the target collection with pagination, same as a normal list query."}),"\n",(0,n.jsxs)(s.li,{children:["Extract the unique DIDs from the returned status URIs using ",(0,n.jsx)(s.code,{children:"string.match"}),"."]}),"\n",(0,n.jsxs)(s.li,{children:["Build an AT URI for each DID's ",(0,n.jsx)(s.code,{children:"app.bsky.actor.profile/self"})," record (this is where Bluesky profiles live)."]}),"\n",(0,n.jsxs)(s.li,{children:["Load all profiles in parallel with ",(0,n.jsx)(s.a,{href:"../../guides/scripting#static-methods",children:(0,n.jsx)(s.code,{children:"Record.load_all"})}),". Profiles that aren't indexed locally return ",(0,n.jsx)(s.code,{children:"nil"})," and are skipped."]}),"\n",(0,n.jsx)(s.li,{children:"Return statuses and profiles as separate keys, with the cursor from the status query."}),"\n"]}),"\n",(0,n.jsx)(s.h2,{id:"usage",children:"Usage"}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{children:"GET /xrpc/xyz.statusphere.listStatusesWithProfiles?limit=10\nGET /xrpc/xyz.statusphere.listStatusesWithProfiles?did=did:plc:abc\nGET /xrpc/xyz.statusphere.listStatusesWithProfiles?cursor=20&limit=20\n"})}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-json",children:'{\n "statuses": [\n { "uri": "at://did:plc:abc/xyz.statusphere.status/3abc123", "status": "\ud83d\ude0a", "createdAt": "..." },\n { "uri": "at://did:plc:def/xyz.statusphere.status/3def456", "status": "\ud83c\udf1f", "createdAt": "..." }\n ],\n "profiles": [\n { "uri": "at://did:plc:abc/app.bsky.actor.profile/self", "displayName": "Alice", "avatar": "..." },\n { "uri": "at://did:plc:def/app.bsky.actor.profile/self", "displayName": "Bob", "avatar": "..." }\n ],\n "cursor": "10"\n}\n'})}),"\n",(0,n.jsx)(s.h2,{id:"use-case",children:"Use case"}),"\n",(0,n.jsx)(s.p,{children:"This pattern avoids N+1 queries (fetching each author's profile individually) on the client side. Instead of fetching statuses and then making a separate request for each user's profile, the client gets everything in one call. The deduplication step ensures each profile is loaded only once even if multiple statuses are from the same user."}),"\n",(0,n.jsxs)(s.p,{children:["Note that ",(0,n.jsx)(s.code,{children:"Record.load_all"})," reads from HappyView's local index. Profiles only appear if ",(0,n.jsx)(s.code,{children:"app.bsky.actor.profile"})," is also being indexed. If a profile hasn't been indexed yet, it's silently omitted from the response."]})]})}function p(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},8453(e,s,r){r.d(s,{R:()=>a,x:()=>l});var t=r(6540);const n={},i=t.createContext(n);function a(e){const s=t.useContext(i);return t.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function l(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:a(e.components),t.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[3197],{7825(e,s,r){r.r(s),r.d(s,{assets:()=>o,contentTitle:()=>l,default:()=>p,frontMatter:()=>a,metadata:()=>t,toc:()=>d});const t=JSON.parse('{"id":"reference/scripts/expanded-query","title":"Query: Expanded Query with Profiles","description":"List statuses and include the profile of each user who created one.","source":"@site/docs/reference/scripts/expanded-query.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/expanded-query","permalink":"/reference/scripts/expanded-query","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"List or Fetch","permalink":"/reference/scripts/list-or-fetch"},"next":{"title":"Update or Delete","permalink":"/reference/scripts/update-or-delete"}}');var n=r(4848),i=r(8453);const a={},l="Query: Expanded Query with Profiles",o={},d=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function c(e){const s={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.header,{children:(0,n.jsx)(s.h1,{id:"query-expanded-query-with-profiles",children:"Query: Expanded Query with Profiles"})}),"\n",(0,n.jsx)(s.p,{children:"List statuses and include the profile of each user who created one."}),"\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.strong,{children:"Lexicon type:"})," query"]}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-lua",children:'function handle()\n local limit = tonumber(params.limit) or 20\n if limit > 100 then limit = 100 end\n\n local result = db.query({\n collection = "xyz.statusphere.status",\n did = params.did,\n limit = limit,\n offset = tonumber(params.cursor) or 0,\n })\n\n -- Collect unique DIDs from the statuses\n local seen = {}\n local profile_uris = {}\n for _, status in ipairs(result.records) do\n local did = string.match(status.uri, "at://([^/]+)/")\n if did and not seen[did] then\n seen[did] = true\n profile_uris[#profile_uris + 1] = "at://" .. did .. "/app.bsky.actor.profile/self"\n end\n end\n\n -- Load all profiles in parallel\n local profiles = {}\n if #profile_uris > 0 then\n local loaded = Record.load_all(profile_uris)\n for i, profile in ipairs(loaded) do\n if profile then\n profiles[#profiles + 1] = profile\n end\n end\n end\n\n return {\n statuses = result.records,\n profiles = profiles,\n cursor = result.cursor,\n }\nend\n'})}),"\n",(0,n.jsx)(s.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,n.jsxs)(s.ol,{children:["\n",(0,n.jsx)(s.li,{children:"Query statuses from the target collection with pagination, same as a normal list query."}),"\n",(0,n.jsxs)(s.li,{children:["Extract the unique DIDs from the returned status URIs using ",(0,n.jsx)(s.code,{children:"string.match"}),"."]}),"\n",(0,n.jsxs)(s.li,{children:["Build an AT URI for each DID's ",(0,n.jsx)(s.code,{children:"app.bsky.actor.profile/self"})," record (this is where Bluesky profiles live)."]}),"\n",(0,n.jsxs)(s.li,{children:["Load all profiles in parallel with ",(0,n.jsx)(s.a,{href:"/guides/scripting#static-methods",children:(0,n.jsx)(s.code,{children:"Record.load_all"})}),". Profiles that aren't indexed locally return ",(0,n.jsx)(s.code,{children:"nil"})," and are skipped."]}),"\n",(0,n.jsx)(s.li,{children:"Return statuses and profiles as separate keys, with the cursor from the status query."}),"\n"]}),"\n",(0,n.jsx)(s.h2,{id:"usage",children:"Usage"}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{children:"GET /xrpc/xyz.statusphere.listStatusesWithProfiles?limit=10\nGET /xrpc/xyz.statusphere.listStatusesWithProfiles?did=did:plc:abc\nGET /xrpc/xyz.statusphere.listStatusesWithProfiles?cursor=20&limit=20\n"})}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-json",children:'{\n "statuses": [\n { "uri": "at://did:plc:abc/xyz.statusphere.status/3abc123", "status": "\ud83d\ude0a", "createdAt": "..." },\n { "uri": "at://did:plc:def/xyz.statusphere.status/3def456", "status": "\ud83c\udf1f", "createdAt": "..." }\n ],\n "profiles": [\n { "uri": "at://did:plc:abc/app.bsky.actor.profile/self", "displayName": "Alice", "avatar": "..." },\n { "uri": "at://did:plc:def/app.bsky.actor.profile/self", "displayName": "Bob", "avatar": "..." }\n ],\n "cursor": "10"\n}\n'})}),"\n",(0,n.jsx)(s.h2,{id:"use-case",children:"Use case"}),"\n",(0,n.jsx)(s.p,{children:"This pattern avoids N+1 queries (fetching each author's profile individually) on the client side. Instead of fetching statuses and then making a separate request for each user's profile, the client gets everything in one call. The deduplication step ensures each profile is loaded only once even if multiple statuses are from the same user."}),"\n",(0,n.jsxs)(s.p,{children:["Note that ",(0,n.jsx)(s.code,{children:"Record.load_all"})," reads from HappyView's local index. Profiles only appear if ",(0,n.jsx)(s.code,{children:"app.bsky.actor.profile"})," is also being indexed. If a profile hasn't been indexed yet, it's silently omitted from the response."]})]})}function p(e={}){const{wrapper:s}={...(0,i.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},8453(e,s,r){r.d(s,{R:()=>a,x:()=>l});var t=r(6540);const n={},i=t.createContext(n);function a(e){const s=t.useContext(i);return t.useMemo(function(){return"function"==typeof e?e(s):{...s,...e}},[s,e])}function l(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:a(e.components),t.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5fd2dbdb.3f63380d.js b/assets/js/5fd2dbdb.3f63380d.js new file mode 100644 index 0000000..7890b0b --- /dev/null +++ b/assets/js/5fd2dbdb.3f63380d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[4440],{6395(e,t,n){n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>a,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"tutorials/statusphere","title":"Tutorial: Statusphere with HappyView","description":"Statusphere is an example AT Protocol application where users set their current status as a single emoji. It\'s a great way to learn how HappyView works because the data model is simple but the queries are interesting.","source":"@site/docs/tutorials/statusphere.md","sourceDirName":"tutorials","slug":"/tutorials/statusphere","permalink":"/tutorials/statusphere","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Dashboard","permalink":"/getting-started/dashboard"},"next":{"title":"Lexicons","permalink":"/guides/lexicons"}}');var r=n(4848),i=n(8453);const a={},o="Tutorial: Statusphere with HappyView",c={},l=[{value:"The Statusphere lexicon",id:"the-statusphere-lexicon",level:2},{value:"Step 1: Upload the record lexicon",id:"step-1-upload-the-record-lexicon",level:2},{value:"Step 2: Verify records are being indexed",id:"step-2-verify-records-are-being-indexed",level:2},{value:"Step 3: Add a query lexicon for listing statuses",id:"step-3-add-a-query-lexicon-for-listing-statuses",level:2},{value:"Step 4: Enhance the query with a Lua script",id:"step-4-enhance-the-query-with-a-lua-script",level:2},{value:"Step 5: Add a procedure lexicon for setting status",id:"step-5-add-a-procedure-lexicon-for-setting-status",level:2},{value:"Step 6: Test the procedure endpoint",id:"step-6-test-the-procedure-endpoint",level:2},{value:"What you've built",id:"what-youve-built",level:2},{value:"Next steps",id:"next-steps",level:2}];function d(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"tutorial-statusphere-with-happyview",children:"Tutorial: Statusphere with HappyView"})}),"\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.a,{href:"https://github.com/bluesky-social/statusphere-example-app",children:"Statusphere"})," is an example AT Protocol application where users set their current status as a single emoji. It's a great way to learn how HappyView works because the data model is simple but the queries are interesting."]}),"\n",(0,r.jsx)(t.p,{children:"In this tutorial, you'll set up HappyView to act as the AppView for Statusphere. By the end, you'll have automatically indexed records and automatically generated XPRC endpoints."}),"\n",(0,r.jsx)(t.admonition,{type:"tip",children:(0,r.jsxs)(t.p,{children:["This tutorial assumes you have a running HappyView instance. If you don't, start with the ",(0,r.jsx)(t.a,{href:"/getting-started/deployment/railway",children:"Quickstart"})," or one of the local development guides (",(0,r.jsx)(t.a,{href:"/getting-started/deployment/docker",children:"Docker"}),", ",(0,r.jsx)(t.a,{href:"/getting-started/deployment/other",children:"from source"}),")."]})}),"\n",(0,r.jsx)(t.h2,{id:"the-statusphere-lexicon",children:"The Statusphere lexicon"}),"\n",(0,r.jsxs)(t.p,{children:["Statusphere uses a single record type, ",(0,r.jsx)(t.code,{children:"xyz.statusphere.status"}),". Each record has two fields:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"status"}),": a single emoji"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"createdAt"}),": a timestamp"]}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:'Users can set their status as many times as they want. Each status is a new record in their repository, keyed by a TID (timestamp-based identifier). The most recent record is their "current" status.'}),"\n",(0,r.jsxs)(t.p,{children:["For more background on how the app works, see the ",(0,r.jsx)(t.a,{href:"https://atproto.com/guides/applications",children:"ATProto Statusphere guide"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"step-1-upload-the-record-lexicon",children:"Step 1: Upload the record lexicon"}),"\n",(0,r.jsxs)(t.p,{children:["First, upload the ",(0,r.jsx)(t.code,{children:"xyz.statusphere.status"})," lexicon to HappyView. This tells HappyView to start indexing Statusphere records from across the network as they're created, updated, or deleted."]}),"\n",(0,r.jsxs)(t.p,{children:["The examples below use ",(0,r.jsx)(t.code,{children:"$TOKEN"})," as a placeholder for an AIP-issued access token. See ",(0,r.jsx)(t.a,{href:"/getting-started/authentication",children:"Authentication"})," for how to get one."]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/admin/lexicons \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "lexicon_json": {\n "lexicon": 1,\n "id": "xyz.statusphere.status",\n "defs": {\n "main": {\n "type": "record",\n "key": "tid",\n "record": {\n "type": "object",\n "required": ["status", "createdAt"],\n "properties": {\n "status": { "type": "string", "maxGraphemes": 1 },\n "createdAt": { "type": "string", "format": "datetime" }\n }\n }\n }\n }\n },\n "backfill": true\n }\'\n'})}),"\n",(0,r.jsxs)(t.p,{children:["HappyView now subscribes to ",(0,r.jsx)(t.code,{children:"xyz.statusphere.status"})," via Tap. The ",(0,r.jsx)(t.code,{children:"backfill"})," flag tells HappyView to also index existing status records from the network. You can monitor progress with ",(0,r.jsx)(t.code,{children:"GET /admin/backfill/status"})," or the ",(0,r.jsx)(t.a,{href:"/getting-started/dashboard",children:"dashboard"}),"."]}),"\n",(0,r.jsxs)(t.admonition,{type:"tip",children:[(0,r.jsxs)(t.p,{children:["Since the ",(0,r.jsx)(t.code,{children:"xyz.statusphere.status"})," lexicon is ",(0,r.jsx)(t.a,{href:"/guides/lexicons#network-lexicons",children:"published on the AT Protocol network"}),", you can also add it as a network lexicon instead of uploading the JSON manually:"]}),(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/admin/network-lexicons \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "nsid": "xyz.statusphere.status" }\'\n'})})]}),"\n",(0,r.jsx)(t.h2,{id:"step-2-verify-records-are-being-indexed",children:"Step 2: Verify records are being indexed"}),"\n",(0,r.jsx)(t.p,{children:"Once the backfill starts processing, you should see records appearing. Check the stats:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:'curl http://localhost:3000/admin/stats \\\n -H "Authorization: Bearer $TOKEN"\n'})}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-json",children:'{\n "total_records": 1234,\n "collections": [{ "collection": "xyz.statusphere.status", "count": 1234 }]\n}\n'})}),"\n",(0,r.jsx)(t.h2,{id:"step-3-add-a-query-lexicon-for-listing-statuses",children:"Step 3: Add a query lexicon for listing statuses"}),"\n",(0,r.jsxs)(t.p,{children:["Now add a query endpoint to read the indexed data. Upload a query lexicon with ",(0,r.jsx)(t.code,{children:"target_collection"})," pointing at the record collection from Step 1:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/admin/lexicons \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "lexicon_json": {\n "lexicon": 1,\n "id": "xyz.statusphere.listStatuses",\n "defs": {\n "main": {\n "type": "query",\n "output": { "encoding": "application/json" }\n }\n }\n },\n "target_collection": "xyz.statusphere.status"\n }\'\n'})}),"\n",(0,r.jsxs)(t.p,{children:["This creates a ",(0,r.jsx)(t.code,{children:"GET /xrpc/xyz.statusphere.listStatuses"})," endpoint. Without a Lua script, it uses HappyView's built-in default behavior: listing records with ",(0,r.jsx)(t.code,{children:"limit"}),", ",(0,r.jsx)(t.code,{children:"cursor"}),", and ",(0,r.jsx)(t.code,{children:"did"})," parameters, or fetching a single record by ",(0,r.jsx)(t.code,{children:"uri"}),". Try it:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:'curl "http://localhost:3000/xrpc/xyz.statusphere.listStatuses?limit=5"\n'})}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-json",children:'{\n "records": [\n {\n "uri": "at://did:plc:abc/xyz.statusphere.status/3abc123",\n "status": "\\ud83d\\ude0a",\n "createdAt": "2025-01-01T12:00:00Z"\n },\n {\n "uri": "at://did:plc:def/xyz.statusphere.status/3def456",\n "status": "\\ud83c\\udf1f",\n "createdAt": "2025-01-01T11:30:00Z"\n }\n ],\n "cursor": "5"\n}\n'})}),"\n",(0,r.jsxs)(t.p,{children:["See ",(0,r.jsx)(t.a,{href:"/reference/xrpc-api",children:"XRPC API"})," for the full default query behavior."]}),"\n",(0,r.jsx)(t.h2,{id:"step-4-enhance-the-query-with-a-lua-script",children:"Step 4: Enhance the query with a Lua script"}),"\n",(0,r.jsxs)(t.p,{children:["The default query behavior works, but let's customize it with a ",(0,r.jsx)(t.a,{href:"/guides/scripting",children:"Lua script"}),". Here's a script that handles single-record lookups by URI and paginated listing with an optional DID filter:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-lua",children:'function handle()\n if params.uri then\n local record = db.get(params.uri)\n if not record then\n return { error = "not found" }\n end\n return { record = record }\n end\n\n return db.query({\n collection = collection,\n did = params.did,\n limit = tonumber(params.limit) or 20,\n offset = tonumber(params.cursor) or 0,\n })\nend\n'})}),"\n",(0,r.jsx)(t.p,{children:"Re-upload the lexicon with parameters defined in the schema and the script attached:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:'LEXICON=\'{\n "lexicon": 1,\n "id": "xyz.statusphere.listStatuses",\n "defs": {\n "main": {\n "type": "query",\n "parameters": {\n "type": "params",\n "properties": {\n "uri": { "type": "string" },\n "did": { "type": "string" },\n "limit": { "type": "integer" },\n "cursor": { "type": "string" }\n }\n },\n "output": { "encoding": "application/json" }\n }\n }\n}\'\n\nSCRIPT=\'function handle()\n if params.uri then\n local record = db.get(params.uri)\n if not record then\n return { error = "not found" }\n end\n return { record = record }\n end\n\n return db.query({\n collection = collection,\n did = params.did,\n limit = tonumber(params.limit) or 20,\n offset = tonumber(params.cursor) or 0,\n })\nend\'\n\ncurl -X POST http://localhost:3000/admin/lexicons \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d "{\n \\"lexicon_json\\": $LEXICON,\n \\"target_collection\\": \\"xyz.statusphere.status\\",\n \\"script\\": \\"$SCRIPT\\"\n }"\n'})}),"\n",(0,r.jsx)(t.p,{children:"The endpoint now uses your custom logic. Filter by a specific user:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:'curl "http://localhost:3000/xrpc/xyz.statusphere.listStatuses?did=did:plc:abc&limit=1"\n'})}),"\n",(0,r.jsx)(t.p,{children:"Fetch a single record by URI:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:'curl "http://localhost:3000/xrpc/xyz.statusphere.listStatuses?uri=at://did:plc:abc/xyz.statusphere.status/3abc123"\n'})}),"\n",(0,r.jsx)(t.h2,{id:"step-5-add-a-procedure-lexicon-for-setting-status",children:"Step 5: Add a procedure lexicon for setting status"}),"\n",(0,r.jsxs)(t.p,{children:["Add a write endpoint so users can set their status through your AppView. This creates a ",(0,r.jsx)(t.code,{children:"POST /xrpc/xyz.statusphere.setStatus"})," endpoint that proxies writes to the user's PDS."]}),"\n",(0,r.jsxs)(t.p,{children:["The Lua script auto-fills ",(0,r.jsx)(t.code,{children:"createdAt"})," and uses the authenticated user's DID:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-lua",children:"function handle()\n local r = Record(collection, {\n status = input.status,\n createdAt = now(),\n })\n r:save()\n return { uri = r._uri, cid = r._cid }\nend\n"})}),"\n",(0,r.jsx)(t.p,{children:"Upload the procedure lexicon with this script:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:'LEXICON=\'{\n "lexicon": 1,\n "id": "xyz.statusphere.setStatus",\n "defs": {\n "main": {\n "type": "procedure",\n "input": { "encoding": "application/json" },\n "output": { "encoding": "application/json" }\n }\n }\n}\'\n\nSCRIPT=\'function handle()\n local r = Record(collection, {\n status = input.status,\n createdAt = now(),\n })\n r:save()\n return { uri = r._uri, cid = r._cid }\nend\'\n\ncurl -X POST http://localhost:3000/admin/lexicons \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d "{\n \\"lexicon_json\\": $LEXICON,\n \\"target_collection\\": \\"xyz.statusphere.status\\",\n \\"script\\": \\"$SCRIPT\\"\n }"\n'})}),"\n",(0,r.jsx)(t.h2,{id:"step-6-test-the-procedure-endpoint",children:"Step 6: Test the procedure endpoint"}),"\n",(0,r.jsx)(t.p,{children:"Set a status (requires authentication):"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/xrpc/xyz.statusphere.setStatus \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "status": "\\ud83d\\ude80" }\'\n'})}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-json",children:'{\n "uri": "at://did:plc:yourDID/xyz.statusphere.status/3xyz789",\n "cid": "bafyreiabc123..."\n}\n'})}),"\n",(0,r.jsx)(t.p,{children:"The record is created on your PDS and immediately indexed by HappyView."}),"\n",(0,r.jsx)(t.h2,{id:"what-youve-built",children:"What you've built"}),"\n",(0,r.jsx)(t.p,{children:"With three lexicon uploads and a few lines of Lua, you have a complete Statusphere AppView:"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Real-time indexing"})," of ",(0,r.jsx)(t.code,{children:"xyz.statusphere.status"})," records from the entire AT Protocol network"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Historical backfill"})," of existing status records"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"A query endpoint"})," (",(0,r.jsx)(t.code,{children:"xyz.statusphere.listStatuses"}),") with filtering, pagination, and single-record lookups"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"A write endpoint"})," (",(0,r.jsx)(t.code,{children:"xyz.statusphere.setStatus"}),") that creates records on the user's PDS and indexes them locally"]}),"\n"]}),"\n",(0,r.jsx)(t.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"/guides/scripting",children:"Lua Scripting"}),": Explore the full Record and database APIs to build more complex queries"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"/guides/lexicons",children:"Lexicons"}),": Learn about network lexicons, the backfill flag, and target collections"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"/reference/xrpc-api",children:"XRPC API"}),": Understand how the generated endpoints behave"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"https://github.com/bluesky-social/statusphere-example-app",children:"Statusphere example app"}),": See the full Statusphere frontend"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"https://atproto.com/guides/applications",children:"ATProto Statusphere guide"}),": Deep dive into how the app works at the protocol level"]}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},8453(e,t,n){n.d(t,{R:()=>a,x:()=>o});var s=n(6540);const r={},i=s.createContext(r);function a(e){const t=s.useContext(i);return s.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),s.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5fd2dbdb.a9fe863f.js b/assets/js/5fd2dbdb.a9fe863f.js deleted file mode 100644 index 47aa83c..0000000 --- a/assets/js/5fd2dbdb.a9fe863f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[4440],{6395(e,t,n){n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>a,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"tutorials/statusphere","title":"Tutorial: Statusphere with HappyView","description":"Statusphere is an example AT Protocol application where users set their current status as a single emoji. It\'s a great way to learn how HappyView works because the data model is simple but the queries are interesting.","source":"@site/docs/tutorials/statusphere.md","sourceDirName":"tutorials","slug":"/tutorials/statusphere","permalink":"/tutorials/statusphere","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Dashboard","permalink":"/getting-started/dashboard"},"next":{"title":"Lexicons","permalink":"/guides/lexicons"}}');var r=n(4848),i=n(8453);const a={},o="Tutorial: Statusphere with HappyView",c={},l=[{value:"The Statusphere lexicon",id:"the-statusphere-lexicon",level:2},{value:"Step 1: Upload the record lexicon",id:"step-1-upload-the-record-lexicon",level:2},{value:"Step 2: Verify records are being indexed",id:"step-2-verify-records-are-being-indexed",level:2},{value:"Step 3: Add a query lexicon for listing statuses",id:"step-3-add-a-query-lexicon-for-listing-statuses",level:2},{value:"Step 4: Enhance the query with a Lua script",id:"step-4-enhance-the-query-with-a-lua-script",level:2},{value:"Step 5: Add a procedure lexicon for setting status",id:"step-5-add-a-procedure-lexicon-for-setting-status",level:2},{value:"Step 6: Test the procedure endpoint",id:"step-6-test-the-procedure-endpoint",level:2},{value:"What you've built",id:"what-youve-built",level:2},{value:"Next steps",id:"next-steps",level:2}];function d(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"tutorial-statusphere-with-happyview",children:"Tutorial: Statusphere with HappyView"})}),"\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.a,{href:"https://github.com/bluesky-social/statusphere-example-app",children:"Statusphere"})," is an example AT Protocol application where users set their current status as a single emoji. It's a great way to learn how HappyView works because the data model is simple but the queries are interesting."]}),"\n",(0,r.jsx)(t.p,{children:"In this tutorial, you'll set up HappyView to act as the AppView for Statusphere. By the end, you'll have automatically indexed records and automatically generated XPRC endpoints."}),"\n",(0,r.jsx)(t.admonition,{type:"tip",children:(0,r.jsxs)(t.p,{children:["This tutorial assumes you have a running HappyView instance. If you don't, start with the ",(0,r.jsx)(t.a,{href:"../getting-started/deployment/railway",children:"Quickstart"})," or one of the local development guides (",(0,r.jsx)(t.a,{href:"../getting-started/deployment/docker",children:"Docker"}),", ",(0,r.jsx)(t.a,{href:"../getting-started/deployment/other",children:"from source"}),")."]})}),"\n",(0,r.jsx)(t.h2,{id:"the-statusphere-lexicon",children:"The Statusphere lexicon"}),"\n",(0,r.jsxs)(t.p,{children:["Statusphere uses a single record type, ",(0,r.jsx)(t.code,{children:"xyz.statusphere.status"}),". Each record has two fields:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"status"}),": a single emoji"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"createdAt"}),": a timestamp"]}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:'Users can set their status as many times as they want. Each status is a new record in their repository, keyed by a TID (timestamp-based identifier). The most recent record is their "current" status.'}),"\n",(0,r.jsxs)(t.p,{children:["For more background on how the app works, see the ",(0,r.jsx)(t.a,{href:"https://atproto.com/guides/applications",children:"ATProto Statusphere guide"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"step-1-upload-the-record-lexicon",children:"Step 1: Upload the record lexicon"}),"\n",(0,r.jsxs)(t.p,{children:["First, upload the ",(0,r.jsx)(t.code,{children:"xyz.statusphere.status"})," lexicon to HappyView. This tells HappyView to start indexing Statusphere records from across the network as they're created, updated, or deleted."]}),"\n",(0,r.jsxs)(t.p,{children:["The examples below use ",(0,r.jsx)(t.code,{children:"$TOKEN"})," as a placeholder for an AIP-issued access token. See ",(0,r.jsx)(t.a,{href:"../getting-started/authentication",children:"Authentication"})," for how to get one."]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/admin/lexicons \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "lexicon_json": {\n "lexicon": 1,\n "id": "xyz.statusphere.status",\n "defs": {\n "main": {\n "type": "record",\n "key": "tid",\n "record": {\n "type": "object",\n "required": ["status", "createdAt"],\n "properties": {\n "status": { "type": "string", "maxGraphemes": 1 },\n "createdAt": { "type": "string", "format": "datetime" }\n }\n }\n }\n }\n },\n "backfill": true\n }\'\n'})}),"\n",(0,r.jsxs)(t.p,{children:["HappyView now subscribes to ",(0,r.jsx)(t.code,{children:"xyz.statusphere.status"})," via Tap. The ",(0,r.jsx)(t.code,{children:"backfill"})," flag tells HappyView to also index existing status records from the network. You can monitor progress with ",(0,r.jsx)(t.code,{children:"GET /admin/backfill/status"})," or the ",(0,r.jsx)(t.a,{href:"../getting-started/dashboard",children:"dashboard"}),"."]}),"\n",(0,r.jsxs)(t.admonition,{type:"tip",children:[(0,r.jsxs)(t.p,{children:["Since the ",(0,r.jsx)(t.code,{children:"xyz.statusphere.status"})," lexicon is ",(0,r.jsx)(t.a,{href:"../guides/lexicons#network-lexicons",children:"published on the AT Protocol network"}),", you can also add it as a network lexicon instead of uploading the JSON manually:"]}),(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/admin/network-lexicons \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "nsid": "xyz.statusphere.status" }\'\n'})})]}),"\n",(0,r.jsx)(t.h2,{id:"step-2-verify-records-are-being-indexed",children:"Step 2: Verify records are being indexed"}),"\n",(0,r.jsx)(t.p,{children:"Once the backfill starts processing, you should see records appearing. Check the stats:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:'curl http://localhost:3000/admin/stats \\\n -H "Authorization: Bearer $TOKEN"\n'})}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-json",children:'{\n "total_records": 1234,\n "collections": [{ "collection": "xyz.statusphere.status", "count": 1234 }]\n}\n'})}),"\n",(0,r.jsx)(t.h2,{id:"step-3-add-a-query-lexicon-for-listing-statuses",children:"Step 3: Add a query lexicon for listing statuses"}),"\n",(0,r.jsxs)(t.p,{children:["Now add a query endpoint to read the indexed data. Upload a query lexicon with ",(0,r.jsx)(t.code,{children:"target_collection"})," pointing at the record collection from Step 1:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/admin/lexicons \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "lexicon_json": {\n "lexicon": 1,\n "id": "xyz.statusphere.listStatuses",\n "defs": {\n "main": {\n "type": "query",\n "output": { "encoding": "application/json" }\n }\n }\n },\n "target_collection": "xyz.statusphere.status"\n }\'\n'})}),"\n",(0,r.jsxs)(t.p,{children:["This creates a ",(0,r.jsx)(t.code,{children:"GET /xrpc/xyz.statusphere.listStatuses"})," endpoint. Without a Lua script, it uses HappyView's built-in default behavior: listing records with ",(0,r.jsx)(t.code,{children:"limit"}),", ",(0,r.jsx)(t.code,{children:"cursor"}),", and ",(0,r.jsx)(t.code,{children:"did"})," parameters, or fetching a single record by ",(0,r.jsx)(t.code,{children:"uri"}),". Try it:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:'curl "http://localhost:3000/xrpc/xyz.statusphere.listStatuses?limit=5"\n'})}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-json",children:'{\n "records": [\n {\n "uri": "at://did:plc:abc/xyz.statusphere.status/3abc123",\n "status": "\\ud83d\\ude0a",\n "createdAt": "2025-01-01T12:00:00Z"\n },\n {\n "uri": "at://did:plc:def/xyz.statusphere.status/3def456",\n "status": "\\ud83c\\udf1f",\n "createdAt": "2025-01-01T11:30:00Z"\n }\n ],\n "cursor": "5"\n}\n'})}),"\n",(0,r.jsxs)(t.p,{children:["See ",(0,r.jsx)(t.a,{href:"../reference/xrpc-api",children:"XRPC API"})," for the full default query behavior."]}),"\n",(0,r.jsx)(t.h2,{id:"step-4-enhance-the-query-with-a-lua-script",children:"Step 4: Enhance the query with a Lua script"}),"\n",(0,r.jsxs)(t.p,{children:["The default query behavior works, but let's customize it with a ",(0,r.jsx)(t.a,{href:"../guides/scripting",children:"Lua script"}),". Here's a script that handles single-record lookups by URI and paginated listing with an optional DID filter:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-lua",children:'function handle()\n if params.uri then\n local record = db.get(params.uri)\n if not record then\n return { error = "not found" }\n end\n return { record = record }\n end\n\n return db.query({\n collection = collection,\n did = params.did,\n limit = tonumber(params.limit) or 20,\n offset = tonumber(params.cursor) or 0,\n })\nend\n'})}),"\n",(0,r.jsx)(t.p,{children:"Re-upload the lexicon with parameters defined in the schema and the script attached:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:'LEXICON=\'{\n "lexicon": 1,\n "id": "xyz.statusphere.listStatuses",\n "defs": {\n "main": {\n "type": "query",\n "parameters": {\n "type": "params",\n "properties": {\n "uri": { "type": "string" },\n "did": { "type": "string" },\n "limit": { "type": "integer" },\n "cursor": { "type": "string" }\n }\n },\n "output": { "encoding": "application/json" }\n }\n }\n}\'\n\nSCRIPT=\'function handle()\n if params.uri then\n local record = db.get(params.uri)\n if not record then\n return { error = "not found" }\n end\n return { record = record }\n end\n\n return db.query({\n collection = collection,\n did = params.did,\n limit = tonumber(params.limit) or 20,\n offset = tonumber(params.cursor) or 0,\n })\nend\'\n\ncurl -X POST http://localhost:3000/admin/lexicons \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d "{\n \\"lexicon_json\\": $LEXICON,\n \\"target_collection\\": \\"xyz.statusphere.status\\",\n \\"script\\": \\"$SCRIPT\\"\n }"\n'})}),"\n",(0,r.jsx)(t.p,{children:"The endpoint now uses your custom logic. Filter by a specific user:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:'curl "http://localhost:3000/xrpc/xyz.statusphere.listStatuses?did=did:plc:abc&limit=1"\n'})}),"\n",(0,r.jsx)(t.p,{children:"Fetch a single record by URI:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:'curl "http://localhost:3000/xrpc/xyz.statusphere.listStatuses?uri=at://did:plc:abc/xyz.statusphere.status/3abc123"\n'})}),"\n",(0,r.jsx)(t.h2,{id:"step-5-add-a-procedure-lexicon-for-setting-status",children:"Step 5: Add a procedure lexicon for setting status"}),"\n",(0,r.jsxs)(t.p,{children:["Add a write endpoint so users can set their status through your AppView. This creates a ",(0,r.jsx)(t.code,{children:"POST /xrpc/xyz.statusphere.setStatus"})," endpoint that proxies writes to the user's PDS."]}),"\n",(0,r.jsxs)(t.p,{children:["The Lua script auto-fills ",(0,r.jsx)(t.code,{children:"createdAt"})," and uses the authenticated user's DID:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-lua",children:"function handle()\n local r = Record(collection, {\n status = input.status,\n createdAt = now(),\n })\n r:save()\n return { uri = r._uri, cid = r._cid }\nend\n"})}),"\n",(0,r.jsx)(t.p,{children:"Upload the procedure lexicon with this script:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:'LEXICON=\'{\n "lexicon": 1,\n "id": "xyz.statusphere.setStatus",\n "defs": {\n "main": {\n "type": "procedure",\n "input": { "encoding": "application/json" },\n "output": { "encoding": "application/json" }\n }\n }\n}\'\n\nSCRIPT=\'function handle()\n local r = Record(collection, {\n status = input.status,\n createdAt = now(),\n })\n r:save()\n return { uri = r._uri, cid = r._cid }\nend\'\n\ncurl -X POST http://localhost:3000/admin/lexicons \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d "{\n \\"lexicon_json\\": $LEXICON,\n \\"target_collection\\": \\"xyz.statusphere.status\\",\n \\"script\\": \\"$SCRIPT\\"\n }"\n'})}),"\n",(0,r.jsx)(t.h2,{id:"step-6-test-the-procedure-endpoint",children:"Step 6: Test the procedure endpoint"}),"\n",(0,r.jsx)(t.p,{children:"Set a status (requires authentication):"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/xrpc/xyz.statusphere.setStatus \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "status": "\\ud83d\\ude80" }\'\n'})}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-json",children:'{\n "uri": "at://did:plc:yourDID/xyz.statusphere.status/3xyz789",\n "cid": "bafyreiabc123..."\n}\n'})}),"\n",(0,r.jsx)(t.p,{children:"The record is created on your PDS and immediately indexed by HappyView."}),"\n",(0,r.jsx)(t.h2,{id:"what-youve-built",children:"What you've built"}),"\n",(0,r.jsx)(t.p,{children:"With three lexicon uploads and a few lines of Lua, you have a complete Statusphere AppView:"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Real-time indexing"})," of ",(0,r.jsx)(t.code,{children:"xyz.statusphere.status"})," records from the entire AT Protocol network"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Historical backfill"})," of existing status records"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"A query endpoint"})," (",(0,r.jsx)(t.code,{children:"xyz.statusphere.listStatuses"}),") with filtering, pagination, and single-record lookups"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"A write endpoint"})," (",(0,r.jsx)(t.code,{children:"xyz.statusphere.setStatus"}),") that creates records on the user's PDS and indexes them locally"]}),"\n"]}),"\n",(0,r.jsx)(t.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"../guides/scripting",children:"Lua Scripting"}),": Explore the full Record and database APIs to build more complex queries"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"../guides/lexicons",children:"Lexicons"}),": Learn about network lexicons, the backfill flag, and target collections"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"../reference/xrpc-api",children:"XRPC API"}),": Understand how the generated endpoints behave"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"https://github.com/bluesky-social/statusphere-example-app",children:"Statusphere example app"}),": See the full Statusphere frontend"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"https://atproto.com/guides/applications",children:"ATProto Statusphere guide"}),": Deep dive into how the app works at the protocol level"]}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},8453(e,t,n){n.d(t,{R:()=>a,x:()=>o});var s=n(6540);const r={},i=s.createContext(r);function a(e){const t=s.useContext(i);return s.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),s.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6acefe75.2f7c5a5a.js b/assets/js/6acefe75.bf671ca4.js similarity index 50% rename from assets/js/6acefe75.2f7c5a5a.js rename to assets/js/6acefe75.bf671ca4.js index 1923ddb..b095967 100644 --- a/assets/js/6acefe75.2f7c5a5a.js +++ b/assets/js/6acefe75.bf671ca4.js @@ -1 +1 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[6495],{1438(e,n,t){t.r(n),t.d(n,{assets:()=>o,contentTitle:()=>c,default:()=>u,frontMatter:()=>i,metadata:()=>r,toc:()=>a});const r=JSON.parse('{"id":"reference/scripts/update-or-delete","title":"Procedure: Update or Delete","description":"A single endpoint that handles create, update, and delete based on the input fields.","source":"@site/docs/reference/scripts/update-or-delete.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/update-or-delete","permalink":"/reference/scripts/update-or-delete","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Expanded Query","permalink":"/reference/scripts/expanded-query"},"next":{"title":"Batch Save","permalink":"/reference/scripts/batch-save"}}');var s=t(4848),d=t(8453);const i={},c="Procedure: Update or Delete",o={},a=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function l(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,d.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"procedure-update-or-delete",children:"Procedure: Update or Delete"})}),"\n",(0,s.jsx)(n.p,{children:"A single endpoint that handles create, update, and delete based on the input fields."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Lexicon type:"})," procedure"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-lua",children:'function handle()\n if input.delete and input.uri then\n local r = Record.load(input.uri)\n if r then r:delete() end\n return { success = true }\n end\n\n if input.uri then\n -- Update existing\n local r = Record.load(input.uri)\n if not r then error("not found") end\n r.status = input.status\n r:save()\n return { uri = r._uri, cid = r._cid }\n end\n\n -- Create new\n local r = Record(collection, input)\n r:save()\n return { uri = r._uri, cid = r._cid }\nend\n'})}),"\n",(0,s.jsx)(n.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["If ",(0,s.jsx)(n.code,{children:"input.delete"})," is truthy and ",(0,s.jsx)(n.code,{children:"input.uri"})," is provided, load the record with ",(0,s.jsx)(n.a,{href:"../../guides/scripting#static-methods",children:(0,s.jsx)(n.code,{children:"Record.load"})})," and delete it."]}),"\n",(0,s.jsxs)(n.li,{children:["If only ",(0,s.jsx)(n.code,{children:"input.uri"})," is provided, load the existing record with ",(0,s.jsx)(n.a,{href:"../../guides/scripting#static-methods",children:(0,s.jsx)(n.code,{children:"Record.load"})}),", update its fields, and save it back. Since ",(0,s.jsx)(n.code,{children:"_uri"})," is already set, ",(0,s.jsx)(n.code,{children:"r:save()"})," calls ",(0,s.jsx)(n.code,{children:"putRecord"})," instead of ",(0,s.jsx)(n.code,{children:"createRecord"}),"."]}),"\n",(0,s.jsx)(n.li,{children:"If neither condition matches, create a new record from the input."}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"usage",children:"Usage"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sh",children:'# Create\ncurl -X POST http://localhost:3000/xrpc/xyz.statusphere.setRecord \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "status": "hello" }\'\n\n# Update\ncurl -X POST http://localhost:3000/xrpc/xyz.statusphere.setRecord \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "uri": "at://did:plc:abc/xyz.statusphere.record/abc123", "status": "updated" }\'\n\n# Delete\ncurl -X POST http://localhost:3000/xrpc/xyz.statusphere.setRecord \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "uri": "at://did:plc:abc/xyz.statusphere.record/abc123", "delete": true }\'\n'})}),"\n",(0,s.jsx)(n.h2,{id:"use-case",children:"Use case"}),"\n",(0,s.jsxs)(n.p,{children:["This pattern reduces the number of endpoints your app needs by multiplexing create, update, and delete through a single procedure. The presence of ",(0,s.jsx)(n.code,{children:"uri"})," and ",(0,s.jsx)(n.code,{children:"delete"})," fields in the input determines the action."]})]})}function u(e={}){const{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453(e,n,t){t.d(n,{R:()=>i,x:()=>c});var r=t(6540);const s={},d=r.createContext(s);function i(e){const n=r.useContext(d);return r.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),r.createElement(d.Provider,{value:n},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[6495],{1438(e,n,t){t.r(n),t.d(n,{assets:()=>o,contentTitle:()=>c,default:()=>u,frontMatter:()=>i,metadata:()=>r,toc:()=>a});const r=JSON.parse('{"id":"reference/scripts/update-or-delete","title":"Procedure: Update or Delete","description":"A single endpoint that handles create, update, and delete based on the input fields.","source":"@site/docs/reference/scripts/update-or-delete.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/update-or-delete","permalink":"/reference/scripts/update-or-delete","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Expanded Query","permalink":"/reference/scripts/expanded-query"},"next":{"title":"Batch Save","permalink":"/reference/scripts/batch-save"}}');var s=t(4848),d=t(8453);const i={},c="Procedure: Update or Delete",o={},a=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function l(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,d.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"procedure-update-or-delete",children:"Procedure: Update or Delete"})}),"\n",(0,s.jsx)(n.p,{children:"A single endpoint that handles create, update, and delete based on the input fields."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Lexicon type:"})," procedure"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-lua",children:'function handle()\n if input.delete and input.uri then\n local r = Record.load(input.uri)\n if r then r:delete() end\n return { success = true }\n end\n\n if input.uri then\n -- Update existing\n local r = Record.load(input.uri)\n if not r then error("not found") end\n r.status = input.status\n r:save()\n return { uri = r._uri, cid = r._cid }\n end\n\n -- Create new\n local r = Record(collection, input)\n r:save()\n return { uri = r._uri, cid = r._cid }\nend\n'})}),"\n",(0,s.jsx)(n.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["If ",(0,s.jsx)(n.code,{children:"input.delete"})," is truthy and ",(0,s.jsx)(n.code,{children:"input.uri"})," is provided, load the record with ",(0,s.jsx)(n.a,{href:"/guides/scripting#static-methods",children:(0,s.jsx)(n.code,{children:"Record.load"})})," and delete it."]}),"\n",(0,s.jsxs)(n.li,{children:["If only ",(0,s.jsx)(n.code,{children:"input.uri"})," is provided, load the existing record with ",(0,s.jsx)(n.a,{href:"/guides/scripting#static-methods",children:(0,s.jsx)(n.code,{children:"Record.load"})}),", update its fields, and save it back. Since ",(0,s.jsx)(n.code,{children:"_uri"})," is already set, ",(0,s.jsx)(n.code,{children:"r:save()"})," calls ",(0,s.jsx)(n.code,{children:"putRecord"})," instead of ",(0,s.jsx)(n.code,{children:"createRecord"}),"."]}),"\n",(0,s.jsx)(n.li,{children:"If neither condition matches, create a new record from the input."}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"usage",children:"Usage"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sh",children:'# Create\ncurl -X POST http://localhost:3000/xrpc/xyz.statusphere.setRecord \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "status": "hello" }\'\n\n# Update\ncurl -X POST http://localhost:3000/xrpc/xyz.statusphere.setRecord \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "uri": "at://did:plc:abc/xyz.statusphere.record/abc123", "status": "updated" }\'\n\n# Delete\ncurl -X POST http://localhost:3000/xrpc/xyz.statusphere.setRecord \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "uri": "at://did:plc:abc/xyz.statusphere.record/abc123", "delete": true }\'\n'})}),"\n",(0,s.jsx)(n.h2,{id:"use-case",children:"Use case"}),"\n",(0,s.jsxs)(n.p,{children:["This pattern reduces the number of endpoints your app needs by multiplexing create, update, and delete through a single procedure. The presence of ",(0,s.jsx)(n.code,{children:"uri"})," and ",(0,s.jsx)(n.code,{children:"delete"})," fields in the input determines the action."]})]})}function u(e={}){const{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453(e,n,t){t.d(n,{R:()=>i,x:()=>c});var r=t(6540);const s={},d=r.createContext(s);function i(e){const n=r.useContext(d);return r.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),r.createElement(d.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/846656e5.696efd35.js b/assets/js/846656e5.696efd35.js deleted file mode 100644 index ebc50c1..0000000 --- a/assets/js/846656e5.696efd35.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[9492],{5231(e,r,t){t.r(r),t.d(r,{assets:()=>a,contentTitle:()=>c,default:()=>h,frontMatter:()=>i,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"reference/glossary","title":"Glossary","description":"Key terms used throughout the HappyView documentation. For a broader introduction to the AT Protocol, see the official ATProto glossary.","source":"@site/docs/reference/glossary.md","sourceDirName":"reference","slug":"/reference/glossary","permalink":"/reference/glossary","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Complex Mutations","permalink":"/reference/scripts/complex-mutations"},"next":{"title":"Architecture","permalink":"/reference/architecture"}}');var o=t(4848),n=t(8453);const i={},c="Glossary",a={},d=[{value:"AT Protocol terms",id:"at-protocol-terms",level:2},{value:"HappyView-specific terms",id:"happyview-specific-terms",level:2}];function l(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",p:"p",strong:"strong",...(0,n.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.header,{children:(0,o.jsx)(r.h1,{id:"glossary",children:"Glossary"})}),"\n",(0,o.jsxs)(r.p,{children:["Key terms used throughout the HappyView documentation. For a broader introduction to the AT Protocol, see the ",(0,o.jsx)(r.a,{href:"https://atproto.com/guides/glossary",children:"official ATProto glossary"}),"."]}),"\n",(0,o.jsx)(r.h2,{id:"at-protocol-terms",children:"AT Protocol terms"}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"AppView"})," \u2014 A backend service that indexes AT Protocol records and serves them through an API. HappyView is an AppView. See the ",(0,o.jsx)(r.a,{href:"https://atproto.com/guides/glossary#app-view",children:"ATProto docs"})," for more."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"DID"})," (Decentralized Identifier) \u2014 A persistent, globally unique identifier for an account (e.g. ",(0,o.jsx)(r.code,{children:"did:plc:abc123"}),")."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"Firehose"})," \u2014 A real-time stream of all record events (creates, updates, deletes) across the AT Protocol network. HappyView consumes this via ",(0,o.jsx)(r.a,{href:"https://github.com/bluesky-social/indigo/tree/main/cmd/tap",children:"Tap"}),"."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"Handle"})," \u2014 A human-readable name for an account (e.g. ",(0,o.jsx)(r.code,{children:"user.bsky.social"}),"). Handles resolve to a DID via DNS or the PLC directory."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"Lexicon"})," \u2014 A schema definition for AT Protocol data types and API methods. Lexicons define what records look like, what endpoints exist, and what parameters they accept. See ",(0,o.jsx)(r.a,{href:"../guides/lexicons",children:"Lexicons"}),"."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"NSID"})," (Namespaced Identifier) \u2014 A reverse-DNS identifier for a lexicon (e.g. ",(0,o.jsx)(r.code,{children:"xyz.statusphere.status"}),"). The authority is everything except the last segment."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"PDS"})," (Personal Data Server) \u2014 The server that hosts a user's data. Users can be on any PDS \u2014 there's no single server. HappyView proxies writes back to each user's PDS."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"PLC directory"})," \u2014 A public service (e.g. ",(0,o.jsx)(r.code,{children:"plc.directory"}),") that maps DIDs to their DID documents, which contain the user's PDS endpoint and other metadata."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"Record"})," \u2014 A single piece of data in an AT Protocol repository, identified by an AT URI (e.g. ",(0,o.jsx)(r.code,{children:"at://did:plc:abc/xyz.statusphere.status/abc123"}),")."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"Relay"})," \u2014 A network service that aggregates repository data from many PDSes. HappyView queries the relay during ",(0,o.jsx)(r.a,{href:"../guides/backfill",children:"backfill"})," to discover which repos contain records for a given collection, then delegates the actual record fetching to Tap."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"rkey"})," (Record Key) \u2014 The unique key for a record within a collection and repo. These are most commonly TIDs (timestamp-based) or NSIDs."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"TID"})," (Timestamp Identifier) \u2014 A 13-character sortable identifier used as a record key. Generated from the current timestamp."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"XRPC"})," \u2014 The HTTP-based RPC protocol used by the AT Protocol. Query methods map to GET requests, procedure methods map to POST requests. See ",(0,o.jsx)(r.a,{href:"xrpc-api",children:"XRPC API"}),"."]}),"\n",(0,o.jsx)(r.h2,{id:"happyview-specific-terms",children:"HappyView-specific terms"}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"AIP"})," \u2014 ",(0,o.jsx)(r.a,{href:"https://github.com/graze-social/aip",children:"Authentication and Identity Provider"}),". An external service that handles AT Protocol OAuth for HappyView. Issues Bearer tokens used for authentication."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"Backfill"})," \u2014 The process of bulk-indexing existing records from the network. HappyView discovers repos via the relay and delegates record fetching to Tap. Runs when a new record-type lexicon is uploaded or triggered manually. See ",(0,o.jsx)(r.a,{href:"../guides/backfill",children:"Backfill"}),"."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"Network lexicon"})," \u2014 A lexicon fetched directly from the AT Protocol network via DNS authority resolution, rather than uploaded manually. See ",(0,o.jsx)(r.a,{href:"../guides/lexicons#network-lexicons",children:"Lexicons - Network lexicons"}),"."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"Tap"})," \u2014 A ",(0,o.jsx)(r.a,{href:"https://github.com/bluesky-social/indigo/tree/main/cmd/tap",children:"firehose consumer and backfill worker"})," that handles real-time record streaming, cryptographic verification, and historical record fetching. HappyView connects to Tap via WebSocket to receive record events, and delegates backfill work to Tap via its HTTP API."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"Target collection"})," \u2014 The record collection that a query or procedure lexicon operates on. Set via the ",(0,o.jsx)(r.code,{children:"target_collection"})," field when uploading a lexicon."]})]})}function h(e={}){const{wrapper:r}={...(0,n.R)(),...e.components};return r?(0,o.jsx)(r,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},8453(e,r,t){t.d(r,{R:()=>i,x:()=>c});var s=t(6540);const o={},n=s.createContext(o);function i(e){const r=s.useContext(n);return s.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function c(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),s.createElement(n.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/846656e5.ec5f11ac.js b/assets/js/846656e5.ec5f11ac.js new file mode 100644 index 0000000..2cc32fd --- /dev/null +++ b/assets/js/846656e5.ec5f11ac.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[9492],{5231(e,r,t){t.r(r),t.d(r,{assets:()=>a,contentTitle:()=>c,default:()=>h,frontMatter:()=>i,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"reference/glossary","title":"Glossary","description":"Key terms used throughout the HappyView documentation. For a broader introduction to the AT Protocol, see the official ATProto glossary.","source":"@site/docs/reference/glossary.md","sourceDirName":"reference","slug":"/reference/glossary","permalink":"/reference/glossary","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Complex Mutations","permalink":"/reference/scripts/complex-mutations"},"next":{"title":"Architecture","permalink":"/reference/architecture"}}');var o=t(4848),n=t(8453);const i={},c="Glossary",a={},d=[{value:"AT Protocol terms",id:"at-protocol-terms",level:2},{value:"HappyView-specific terms",id:"happyview-specific-terms",level:2}];function l(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",p:"p",strong:"strong",...(0,n.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.header,{children:(0,o.jsx)(r.h1,{id:"glossary",children:"Glossary"})}),"\n",(0,o.jsxs)(r.p,{children:["Key terms used throughout the HappyView documentation. For a broader introduction to the AT Protocol, see the ",(0,o.jsx)(r.a,{href:"https://atproto.com/guides/glossary",children:"official ATProto glossary"}),"."]}),"\n",(0,o.jsx)(r.h2,{id:"at-protocol-terms",children:"AT Protocol terms"}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"AppView"})," \u2014 A backend service that indexes AT Protocol records and serves them through an API. HappyView is an AppView. See the ",(0,o.jsx)(r.a,{href:"https://atproto.com/guides/glossary#app-view",children:"ATProto docs"})," for more."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"DID"})," (Decentralized Identifier) \u2014 A persistent, globally unique identifier for an account (e.g. ",(0,o.jsx)(r.code,{children:"did:plc:abc123"}),")."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"Firehose"})," \u2014 A real-time stream of all record events (creates, updates, deletes) across the AT Protocol network. HappyView consumes this via ",(0,o.jsx)(r.a,{href:"https://github.com/bluesky-social/indigo/tree/main/cmd/tap",children:"Tap"}),"."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"Handle"})," \u2014 A human-readable name for an account (e.g. ",(0,o.jsx)(r.code,{children:"user.bsky.social"}),"). Handles resolve to a DID via DNS or the PLC directory."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"Lexicon"})," \u2014 A schema definition for AT Protocol data types and API methods. Lexicons define what records look like, what endpoints exist, and what parameters they accept. See ",(0,o.jsx)(r.a,{href:"/guides/lexicons",children:"Lexicons"}),"."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"NSID"})," (Namespaced Identifier) \u2014 A reverse-DNS identifier for a lexicon (e.g. ",(0,o.jsx)(r.code,{children:"xyz.statusphere.status"}),"). The authority is everything except the last segment."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"PDS"})," (Personal Data Server) \u2014 The server that hosts a user's data. Users can be on any PDS \u2014 there's no single server. HappyView proxies writes back to each user's PDS."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"PLC directory"})," \u2014 A public service (e.g. ",(0,o.jsx)(r.code,{children:"plc.directory"}),") that maps DIDs to their DID documents, which contain the user's PDS endpoint and other metadata."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"Record"})," \u2014 A single piece of data in an AT Protocol repository, identified by an AT URI (e.g. ",(0,o.jsx)(r.code,{children:"at://did:plc:abc/xyz.statusphere.status/abc123"}),")."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"Relay"})," \u2014 A network service that aggregates repository data from many PDSes. HappyView queries the relay during ",(0,o.jsx)(r.a,{href:"/guides/backfill",children:"backfill"})," to discover which repos contain records for a given collection, then delegates the actual record fetching to Tap."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"rkey"})," (Record Key) \u2014 The unique key for a record within a collection and repo. These are most commonly TIDs (timestamp-based) or NSIDs."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"TID"})," (Timestamp Identifier) \u2014 A 13-character sortable identifier used as a record key. Generated from the current timestamp."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"XRPC"})," \u2014 The HTTP-based RPC protocol used by the AT Protocol. Query methods map to GET requests, procedure methods map to POST requests. See ",(0,o.jsx)(r.a,{href:"/reference/xrpc-api",children:"XRPC API"}),"."]}),"\n",(0,o.jsx)(r.h2,{id:"happyview-specific-terms",children:"HappyView-specific terms"}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"AIP"})," \u2014 ",(0,o.jsx)(r.a,{href:"https://github.com/graze-social/aip",children:"Authentication and Identity Provider"}),". An external service that handles AT Protocol OAuth for HappyView. Issues Bearer tokens used for authentication."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"Backfill"})," \u2014 The process of bulk-indexing existing records from the network. HappyView discovers repos via the relay and delegates record fetching to Tap. Runs when a new record-type lexicon is uploaded or triggered manually. See ",(0,o.jsx)(r.a,{href:"/guides/backfill",children:"Backfill"}),"."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"Network lexicon"})," \u2014 A lexicon fetched directly from the AT Protocol network via DNS authority resolution, rather than uploaded manually. See ",(0,o.jsx)(r.a,{href:"/guides/lexicons#network-lexicons",children:"Lexicons - Network lexicons"}),"."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"Tap"})," \u2014 A ",(0,o.jsx)(r.a,{href:"https://github.com/bluesky-social/indigo/tree/main/cmd/tap",children:"firehose consumer and backfill worker"})," that handles real-time record streaming, cryptographic verification, and historical record fetching. HappyView connects to Tap via WebSocket to receive record events, and delegates backfill work to Tap via its HTTP API."]}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.strong,{children:"Target collection"})," \u2014 The record collection that a query or procedure lexicon operates on. Set via the ",(0,o.jsx)(r.code,{children:"target_collection"})," field when uploading a lexicon."]})]})}function h(e={}){const{wrapper:r}={...(0,n.R)(),...e.components};return r?(0,o.jsx)(r,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},8453(e,r,t){t.d(r,{R:()=>i,x:()=>c});var s=t(6540);const o={},n=s.createContext(o);function i(e){const r=s.useContext(n);return s.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function c(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),s.createElement(n.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/89877b86.21a18237.js b/assets/js/89877b86.b544ad88.js similarity index 87% rename from assets/js/89877b86.21a18237.js rename to assets/js/89877b86.b544ad88.js index 2aabf8b..ec48fdc 100644 --- a/assets/js/89877b86.21a18237.js +++ b/assets/js/89877b86.b544ad88.js @@ -1 +1 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[7520],{2749(e,t,s){s.r(t),s.d(t,{assets:()=>d,contentTitle:()=>c,default:()=>h,frontMatter:()=>o,metadata:()=>n,toc:()=>a});const n=JSON.parse('{"id":"getting-started/deployment/docker","title":"Local Development with Docker","description":"This guide runs the full HappyView stack locally using Docker Compose: Postgres, Tap, HappyView, and the web dashboard.","source":"@site/docs/getting-started/deployment/docker.md","sourceDirName":"getting-started/deployment","slug":"/getting-started/deployment/docker","permalink":"/getting-started/deployment/docker","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Railway","permalink":"/getting-started/deployment/railway"},"next":{"title":"Other","permalink":"/getting-started/deployment/other"}}');var r=s(4848),i=s(8453);const o={},c="Local Development with Docker",d={},a=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"1. Clone and configure",id:"1-clone-and-configure",level:2},{value:"2. Start the stack",id:"2-start-the-stack",level:2},{value:"Next steps",id:"next-steps",level:2}];function l(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"local-development-with-docker",children:"Local Development with Docker"})}),"\n",(0,r.jsxs)(t.p,{children:["This guide runs the full HappyView stack locally using Docker Compose: Postgres, ",(0,r.jsx)(t.a,{href:"https://github.com/bluesky-social/indigo/tree/main/cmd/tap",children:"Tap"}),", HappyView, and the web dashboard."]}),"\n",(0,r.jsx)(t.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"https://docs.docker.com/get-docker/",children:"Docker"})," and Docker Compose"]}),"\n",(0,r.jsxs)(t.li,{children:["An ",(0,r.jsx)(t.a,{href:"https://github.com/graze-social/aip",children:"AIP"})," instance for OAuth. The Docker Compose config points at the public AIP instance at ",(0,r.jsx)(t.code,{children:"aip.gamesgamesgamesgames.games"})," by default."]}),"\n"]}),"\n",(0,r.jsx)(t.admonition,{type:"warning",children:(0,r.jsxs)(t.p,{children:["This public AIP instance is provided for development convenience only. Production deployments should run their own AIP instance or risk being blocked. See the ",(0,r.jsx)(t.a,{href:"https://github.com/graze-social/aip",children:"AIP documentation"})," for setup."]})}),"\n",(0,r.jsx)(t.h2,{id:"1-clone-and-configure",children:"1. Clone and configure"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:"git clone https://github.com/graze-social/happyview.git\ncd happyview\ncp .env.example .env\n"})}),"\n",(0,r.jsxs)(t.p,{children:["Set ",(0,r.jsx)(t.code,{children:"TAP_ADMIN_PASSWORD"})," in your ",(0,r.jsx)(t.code,{children:".env"}),". This shared secret is used by both Tap and HappyView:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:"TAP_ADMIN_PASSWORD=your-secret-here\n"})}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.code,{children:"docker-compose.yml"})," configures everything else (database URLs, service connections) automatically."]}),"\n",(0,r.jsx)(t.h2,{id:"2-start-the-stack",children:"2. Start the stack"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:"docker compose up\n"})}),"\n",(0,r.jsx)(t.p,{children:"This starts:"}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Service"}),(0,r.jsx)(t.th,{children:"Port"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.strong,{children:"postgres"})}),(0,r.jsx)(t.td,{children:"5432"}),(0,r.jsx)(t.td,{children:"PostgreSQL 17 (databases for both HappyView and Tap)"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.strong,{children:"tap"})}),(0,r.jsx)(t.td,{children:"2480"}),(0,r.jsx)(t.td,{children:"Firehose consumer, backfill worker"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.strong,{children:"happyview"})}),(0,r.jsx)(t.td,{children:"3000"}),(0,r.jsx)(t.td,{children:"HappyView API server"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.strong,{children:"web"})}),(0,r.jsx)(t.td,{children:"3001"}),(0,r.jsx)(t.td,{children:"Next.js dashboard"})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"HappyView runs migrations automatically on startup. The first build will take a few minutes while Rust compiles."}),"\n",(0,r.jsx)(t.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,r.jsxs)(t.p,{children:["Your HappyView stack is running. Follow the ",(0,r.jsx)(t.a,{href:"../../tutorials/statusphere",children:"Statusphere tutorial"})," to upload lexicons, add custom query logic, and start indexing records from the network."]})]})}function h(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},8453(e,t,s){s.d(t,{R:()=>o,x:()=>c});var n=s(6540);const r={},i=n.createContext(r);function o(e){const t=n.useContext(i);return n.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),n.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[7520],{2749(e,t,s){s.r(t),s.d(t,{assets:()=>d,contentTitle:()=>c,default:()=>h,frontMatter:()=>o,metadata:()=>n,toc:()=>a});const n=JSON.parse('{"id":"getting-started/deployment/docker","title":"Local Development with Docker","description":"This guide runs the full HappyView stack locally using Docker Compose: Postgres, Tap, HappyView, and the web dashboard.","source":"@site/docs/getting-started/deployment/docker.md","sourceDirName":"getting-started/deployment","slug":"/getting-started/deployment/docker","permalink":"/getting-started/deployment/docker","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Railway","permalink":"/getting-started/deployment/railway"},"next":{"title":"Other","permalink":"/getting-started/deployment/other"}}');var r=s(4848),i=s(8453);const o={},c="Local Development with Docker",d={},a=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"1. Clone and configure",id:"1-clone-and-configure",level:2},{value:"2. Start the stack",id:"2-start-the-stack",level:2},{value:"Next steps",id:"next-steps",level:2}];function l(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"local-development-with-docker",children:"Local Development with Docker"})}),"\n",(0,r.jsxs)(t.p,{children:["This guide runs the full HappyView stack locally using Docker Compose: Postgres, ",(0,r.jsx)(t.a,{href:"https://github.com/bluesky-social/indigo/tree/main/cmd/tap",children:"Tap"}),", HappyView, and the web dashboard."]}),"\n",(0,r.jsx)(t.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"https://docs.docker.com/get-docker/",children:"Docker"})," and Docker Compose"]}),"\n",(0,r.jsxs)(t.li,{children:["An ",(0,r.jsx)(t.a,{href:"https://github.com/graze-social/aip",children:"AIP"})," instance for OAuth. The Docker Compose config points at the public AIP instance at ",(0,r.jsx)(t.code,{children:"aip.gamesgamesgamesgames.games"})," by default."]}),"\n"]}),"\n",(0,r.jsx)(t.admonition,{type:"warning",children:(0,r.jsxs)(t.p,{children:["This public AIP instance is provided for development convenience only. Production deployments should run their own AIP instance or risk being blocked. See the ",(0,r.jsx)(t.a,{href:"https://github.com/graze-social/aip",children:"AIP documentation"})," for setup."]})}),"\n",(0,r.jsx)(t.h2,{id:"1-clone-and-configure",children:"1. Clone and configure"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:"git clone https://github.com/graze-social/happyview.git\ncd happyview\ncp .env.example .env\n"})}),"\n",(0,r.jsxs)(t.p,{children:["Set ",(0,r.jsx)(t.code,{children:"TAP_ADMIN_PASSWORD"})," in your ",(0,r.jsx)(t.code,{children:".env"}),". This shared secret is used by both Tap and HappyView:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:"TAP_ADMIN_PASSWORD=your-secret-here\n"})}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.code,{children:"docker-compose.yml"})," configures everything else (database URLs, service connections) automatically."]}),"\n",(0,r.jsx)(t.h2,{id:"2-start-the-stack",children:"2. Start the stack"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:"docker compose up\n"})}),"\n",(0,r.jsx)(t.p,{children:"This starts:"}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Service"}),(0,r.jsx)(t.th,{children:"Port"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.strong,{children:"postgres"})}),(0,r.jsx)(t.td,{children:"5432"}),(0,r.jsx)(t.td,{children:"PostgreSQL 17 (databases for both HappyView and Tap)"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.strong,{children:"tap"})}),(0,r.jsx)(t.td,{children:"2480"}),(0,r.jsx)(t.td,{children:"Firehose consumer, backfill worker"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.strong,{children:"happyview"})}),(0,r.jsx)(t.td,{children:"3000"}),(0,r.jsx)(t.td,{children:"HappyView API server"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.strong,{children:"web"})}),(0,r.jsx)(t.td,{children:"3001"}),(0,r.jsx)(t.td,{children:"Next.js dashboard"})]})]})]}),"\n",(0,r.jsx)(t.p,{children:"HappyView runs migrations automatically on startup. The first build will take a few minutes while Rust compiles."}),"\n",(0,r.jsx)(t.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,r.jsxs)(t.p,{children:["Your HappyView stack is running. Follow the ",(0,r.jsx)(t.a,{href:"/tutorials/statusphere",children:"Statusphere tutorial"})," to upload lexicons, add custom query logic, and start indexing records from the network."]})]})}function h(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},8453(e,t,s){s.d(t,{R:()=>o,x:()=>c});var n=s(6540);const r={},i=n.createContext(r);function o(e){const t=n.useContext(i);return n.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),n.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/919abb94.3ec12698.js b/assets/js/919abb94.3ec12698.js new file mode 100644 index 0000000..7b945b4 --- /dev/null +++ b/assets/js/919abb94.3ec12698.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[20],{521(e,r,t){t.r(r),t.d(r,{assets:()=>o,contentTitle:()=>a,default:()=>h,frontMatter:()=>c,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"reference/scripts/upsert-record","title":"Procedure: Upsert a Record","description":"Create a new record, or update an existing one if the client provides its rkey.","source":"@site/docs/reference/scripts/upsert-record.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/upsert-record","permalink":"/reference/scripts/upsert-record","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Create Record","permalink":"/reference/scripts/create-record"},"next":{"title":"Paginated List","permalink":"/reference/scripts/paginated-list"}}');var s=t(4848),i=t(8453);const c={},a="Procedure: Upsert a Record",o={},d=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function l(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.header,{children:(0,s.jsx)(r.h1,{id:"procedure-upsert-a-record",children:"Procedure: Upsert a Record"})}),"\n",(0,s.jsx)(r.p,{children:"Create a new record, or update an existing one if the client provides its rkey."}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"Lexicon type:"})," procedure"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-lua",children:'function handle()\n local rkey = input.rkey or TID()\n local uri = "at://" .. caller_did .. "/" .. collection .. "/" .. rkey\n\n local r = Record.load(uri)\n if r then\n -- Update existing record\n r.status = input.status\n r.updatedAt = now()\n r:save()\n else\n -- Create new record\n r = Record(collection, {\n status = input.status,\n createdAt = now(),\n updatedAt = now(),\n })\n r:set_rkey(rkey)\n r:save()\n end\n\n return { uri = r._uri, cid = r._cid }\nend\n'})}),"\n",(0,s.jsx)(r.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsxs)(r.li,{children:["Use the client-provided ",(0,s.jsx)(r.code,{children:"input.rkey"})," if present, otherwise generate a new ",(0,s.jsx)(r.a,{href:"/guides/scripting#utility-globals",children:(0,s.jsx)(r.code,{children:"TID()"})}),". This means omitting ",(0,s.jsx)(r.code,{children:"rkey"})," always creates, while providing one enables updates."]}),"\n",(0,s.jsxs)(r.li,{children:["Build the AT URI from the caller's DID, the target collection, and the rkey, then try to load it with ",(0,s.jsx)(r.a,{href:"/guides/scripting#static-methods",children:(0,s.jsx)(r.code,{children:"Record.load"})}),"."]}),"\n",(0,s.jsxs)(r.li,{children:["If the record exists, update its fields and save. Since ",(0,s.jsx)(r.code,{children:"_uri"})," is already set, ",(0,s.jsx)(r.code,{children:"r:save()"})," calls ",(0,s.jsx)(r.code,{children:"putRecord"}),"."]}),"\n",(0,s.jsxs)(r.li,{children:["If it doesn't exist, create a new record, set the rkey explicitly with ",(0,s.jsx)(r.code,{children:"r:set_rkey()"}),", and save. This calls ",(0,s.jsx)(r.code,{children:"createRecord"})," with the specified rkey."]}),"\n"]}),"\n",(0,s.jsx)(r.h2,{id:"usage",children:"Usage"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-sh",children:'# Create: no rkey, so a new TID is generated\ncurl -X POST http://localhost:3000/xrpc/xyz.statusphere.setStatus \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "status": "hello" }\'\n# \u2192 { "uri": "at://did:plc:abc/xyz.statusphere.status/3abc123", "cid": "bafyrei..." }\n\n# Update: pass the rkey back to update the same record\ncurl -X POST http://localhost:3000/xrpc/xyz.statusphere.setStatus \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "rkey": "3abc123", "status": "updated" }\'\n# \u2192 { "uri": "at://did:plc:abc/xyz.statusphere.status/3abc123", "cid": "bafyrei..." }\n'})}),"\n",(0,s.jsx)(r.h2,{id:"use-case",children:"Use case"}),"\n",(0,s.jsxs)(r.p,{children:["This is useful when the client knows whether it's creating or editing, but you want a single endpoint for both. The client omits ",(0,s.jsx)(r.code,{children:"rkey"})," for new records and includes it when editing an existing one. The rkey from the initial create response acts as the record's stable identifier for future updates."]})]})}function h(e={}){const{wrapper:r}={...(0,i.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453(e,r,t){t.d(r,{R:()=>c,x:()=>a});var n=t(6540);const s={},i=n.createContext(s);function c(e){const r=n.useContext(i);return n.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function a(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:c(e.components),n.createElement(i.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/919abb94.55fb1d2d.js b/assets/js/919abb94.55fb1d2d.js deleted file mode 100644 index 4d3e4c1..0000000 --- a/assets/js/919abb94.55fb1d2d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[20],{521(e,r,t){t.r(r),t.d(r,{assets:()=>o,contentTitle:()=>a,default:()=>h,frontMatter:()=>c,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"reference/scripts/upsert-record","title":"Procedure: Upsert a Record","description":"Create a new record, or update an existing one if the client provides its rkey.","source":"@site/docs/reference/scripts/upsert-record.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/upsert-record","permalink":"/reference/scripts/upsert-record","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Create Record","permalink":"/reference/scripts/create-record"},"next":{"title":"Paginated List","permalink":"/reference/scripts/paginated-list"}}');var s=t(4848),i=t(8453);const c={},a="Procedure: Upsert a Record",o={},d=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function l(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.header,{children:(0,s.jsx)(r.h1,{id:"procedure-upsert-a-record",children:"Procedure: Upsert a Record"})}),"\n",(0,s.jsx)(r.p,{children:"Create a new record, or update an existing one if the client provides its rkey."}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"Lexicon type:"})," procedure"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-lua",children:'function handle()\n local rkey = input.rkey or TID()\n local uri = "at://" .. caller_did .. "/" .. collection .. "/" .. rkey\n\n local r = Record.load(uri)\n if r then\n -- Update existing record\n r.status = input.status\n r.updatedAt = now()\n r:save()\n else\n -- Create new record\n r = Record(collection, {\n status = input.status,\n createdAt = now(),\n updatedAt = now(),\n })\n r:set_rkey(rkey)\n r:save()\n end\n\n return { uri = r._uri, cid = r._cid }\nend\n'})}),"\n",(0,s.jsx)(r.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsxs)(r.li,{children:["Use the client-provided ",(0,s.jsx)(r.code,{children:"input.rkey"})," if present, otherwise generate a new ",(0,s.jsx)(r.a,{href:"../../guides/scripting#utility-globals",children:(0,s.jsx)(r.code,{children:"TID()"})}),". This means omitting ",(0,s.jsx)(r.code,{children:"rkey"})," always creates, while providing one enables updates."]}),"\n",(0,s.jsxs)(r.li,{children:["Build the AT URI from the caller's DID, the target collection, and the rkey, then try to load it with ",(0,s.jsx)(r.a,{href:"../../guides/scripting#static-methods",children:(0,s.jsx)(r.code,{children:"Record.load"})}),"."]}),"\n",(0,s.jsxs)(r.li,{children:["If the record exists, update its fields and save. Since ",(0,s.jsx)(r.code,{children:"_uri"})," is already set, ",(0,s.jsx)(r.code,{children:"r:save()"})," calls ",(0,s.jsx)(r.code,{children:"putRecord"}),"."]}),"\n",(0,s.jsxs)(r.li,{children:["If it doesn't exist, create a new record, set the rkey explicitly with ",(0,s.jsx)(r.code,{children:"r:set_rkey()"}),", and save. This calls ",(0,s.jsx)(r.code,{children:"createRecord"})," with the specified rkey."]}),"\n"]}),"\n",(0,s.jsx)(r.h2,{id:"usage",children:"Usage"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-sh",children:'# Create: no rkey, so a new TID is generated\ncurl -X POST http://localhost:3000/xrpc/xyz.statusphere.setStatus \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "status": "hello" }\'\n# \u2192 { "uri": "at://did:plc:abc/xyz.statusphere.status/3abc123", "cid": "bafyrei..." }\n\n# Update: pass the rkey back to update the same record\ncurl -X POST http://localhost:3000/xrpc/xyz.statusphere.setStatus \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "rkey": "3abc123", "status": "updated" }\'\n# \u2192 { "uri": "at://did:plc:abc/xyz.statusphere.status/3abc123", "cid": "bafyrei..." }\n'})}),"\n",(0,s.jsx)(r.h2,{id:"use-case",children:"Use case"}),"\n",(0,s.jsxs)(r.p,{children:["This is useful when the client knows whether it's creating or editing, but you want a single endpoint for both. The client omits ",(0,s.jsx)(r.code,{children:"rkey"})," for new records and includes it when editing an existing one. The rkey from the initial create response acts as the record's stable identifier for future updates."]})]})}function h(e={}){const{wrapper:r}={...(0,i.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},8453(e,r,t){t.d(r,{R:()=>c,x:()=>a});var n=t(6540);const s={},i=n.createContext(s);function c(e){const r=n.useContext(i);return n.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function a(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:c(e.components),n.createElement(i.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/920ba7ef.680fb75f.js b/assets/js/920ba7ef.680fb75f.js deleted file mode 100644 index b313f8c..0000000 --- a/assets/js/920ba7ef.680fb75f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[5953],{1189(e,r,n){n.r(r),n.d(r,{assets:()=>a,contentTitle:()=>t,default:()=>o,frontMatter:()=>d,metadata:()=>l,toc:()=>c});const l=JSON.parse('{"id":"guides/scripting","title":"Lua Scripting","description":"Without Lua scripts, HappyView\'s query endpoints return raw records and procedure endpoints proxy simple creates and updates. Lua scripts let you go much further:","source":"@site/docs/guides/scripting.md","sourceDirName":"guides","slug":"/guides/scripting","permalink":"/guides/scripting","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Lexicons","permalink":"/guides/lexicons"},"next":{"title":"Backfill","permalink":"/guides/backfill"}}');var s=n(4848),i=n(8453);const d={},t="Lua Scripting",a={},c=[{value:"Script structure",id:"script-structure",level:2},{value:"Sandbox",id:"sandbox",level:2},{value:"Context globals",id:"context-globals",level:2},{value:"Procedure globals",id:"procedure-globals",level:3},{value:"Query globals",id:"query-globals",level:3},{value:"Utility globals",id:"utility-globals",level:2},{value:"Record API",id:"record-api",level:2},{value:"Constructor",id:"constructor",level:3},{value:"Static methods",id:"static-methods",level:3},{value:"Instance methods",id:"instance-methods",level:3},{value:"Instance fields",id:"instance-fields",level:3},{value:"Schema validation",id:"schema-validation",level:3},{value:"Save behavior",id:"save-behavior",level:3},{value:"Database API",id:"database-api",level:2},{value:"db.query",id:"dbquery",level:3},{value:"db.get",id:"dbget",level:3},{value:"db.count",id:"dbcount",level:3},{value:"Standard libraries",id:"standard-libraries",level:2},{value:"Debugging",id:"debugging",level:2},{value:"Logging",id:"logging",level:3},{value:"Error messages",id:"error-messages",level:3},{value:"Common mistakes",id:"common-mistakes",level:3},{value:"Example scripts",id:"example-scripts",level:2},{value:"Next steps",id:"next-steps",level:2}];function h(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components},{Details:n}=r;return n||function(e,r){throw new Error("Expected "+(r?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.header,{children:(0,s.jsx)(r.h1,{id:"lua-scripting",children:"Lua Scripting"})}),"\n",(0,s.jsx)(r.p,{children:"Without Lua scripts, HappyView's query endpoints return raw records and procedure endpoints proxy simple creates and updates. Lua scripts let you go much further:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:"Add filtering logic"}),"\n",(0,s.jsx)(r.li,{children:"Transform responses"}),"\n",(0,s.jsx)(r.li,{children:"Validate input"}),"\n",(0,s.jsx)(r.li,{children:"Compose multi-record operations"}),"\n",(0,s.jsx)(r.li,{children:"Build entirely custom behavior"}),"\n"]}),"\n",(0,s.jsxs)(r.p,{children:["Scripts are attached to query and procedure lexicons and run in a sandboxed Lua VM with access to the ",(0,s.jsx)(r.a,{href:"#record-api",children:"Record API"}),", a ",(0,s.jsx)(r.a,{href:"#database-api",children:"read-only database API"}),", and a set of ",(0,s.jsx)(r.a,{href:"#context-globals",children:"context globals"}),"."]}),"\n",(0,s.jsx)(r.h2,{id:"script-structure",children:"Script structure"}),"\n",(0,s.jsxs)(r.p,{children:["Every script must define a ",(0,s.jsx)(r.code,{children:"handle()"})," function. HappyView calls it when the XRPC endpoint is hit and returns its result as JSON to the client."]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-lua",children:'function handle()\n -- your logic here\n return { key = "value" }\nend\n'})}),"\n",(0,s.jsxs)(r.p,{children:["You can define helper functions and variables outside ",(0,s.jsx)(r.code,{children:"handle()"}),". They're evaluated once when the script loads, then ",(0,s.jsx)(r.code,{children:"handle()"})," is called per request."]}),"\n",(0,s.jsx)(r.h2,{id:"sandbox",children:"Sandbox"}),"\n",(0,s.jsxs)(r.p,{children:["Scripts run in a restricted environment. The following standard Lua modules are ",(0,s.jsx)(r.strong,{children:"removed"})," and unavailable:"]}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.code,{children:"os"}),", ",(0,s.jsx)(r.code,{children:"io"}),", ",(0,s.jsx)(r.code,{children:"debug"}),", ",(0,s.jsx)(r.code,{children:"package"}),", ",(0,s.jsx)(r.code,{children:"require"}),", ",(0,s.jsx)(r.code,{children:"dofile"}),", ",(0,s.jsx)(r.code,{children:"loadfile"}),", ",(0,s.jsx)(r.code,{children:"load"}),", ",(0,s.jsx)(r.code,{children:"collectgarbage"})]}),"\n",(0,s.jsx)(r.p,{children:"An instruction limit of 1,000,000 prevents infinite loops. Exceeding it terminates the script with an error."}),"\n",(0,s.jsx)(r.h2,{id:"context-globals",children:"Context globals"}),"\n",(0,s.jsxs)(r.p,{children:["These globals are set automatically before ",(0,s.jsx)(r.code,{children:"handle()"})," is called."]}),"\n",(0,s.jsx)(r.h3,{id:"procedure-globals",children:"Procedure globals"}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Global"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"method"})}),(0,s.jsx)(r.td,{children:"string"}),(0,s.jsxs)(r.td,{children:["The XRPC method name (e.g. ",(0,s.jsx)(r.code,{children:"xyz.statusphere.setStatus"}),")"]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"input"})}),(0,s.jsx)(r.td,{children:"table"}),(0,s.jsx)(r.td,{children:"Parsed JSON request body"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"caller_did"})}),(0,s.jsx)(r.td,{children:"string"}),(0,s.jsx)(r.td,{children:"DID of the authenticated user"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"collection"})}),(0,s.jsx)(r.td,{children:"string"}),(0,s.jsx)(r.td,{children:"Target collection NSID"})]})]})]}),"\n",(0,s.jsx)(r.h3,{id:"query-globals",children:"Query globals"}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Global"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"method"})}),(0,s.jsx)(r.td,{children:"string"}),(0,s.jsx)(r.td,{children:"The XRPC method name"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"params"})}),(0,s.jsx)(r.td,{children:"table"}),(0,s.jsx)(r.td,{children:"Query string parameters (all values are strings)"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"collection"})}),(0,s.jsx)(r.td,{children:"string"}),(0,s.jsx)(r.td,{children:"Target collection NSID"})]})]})]}),"\n",(0,s.jsxs)(r.p,{children:["Queries are unauthenticated: there is no ",(0,s.jsx)(r.code,{children:"caller_did"})," or ",(0,s.jsx)(r.code,{children:"input"}),"."]}),"\n",(0,s.jsx)(r.h2,{id:"utility-globals",children:"Utility globals"}),"\n",(0,s.jsx)(r.p,{children:"Available in both queries and procedures:"}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Function"}),(0,s.jsx)(r.th,{children:"Returns"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"now()"})}),(0,s.jsx)(r.td,{children:"string"}),(0,s.jsx)(r.td,{children:"Current UTC timestamp in ISO 8601 format"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"log(message)"})}),(0,s.jsx)(r.td,{children:"\u2014"}),(0,s.jsx)(r.td,{children:"Log a message (appears in server logs at debug level)"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"TID()"})}),(0,s.jsx)(r.td,{children:"string"}),(0,s.jsx)(r.td,{children:"Generate a fresh AT Protocol TID (13-character sortable identifier)"})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"record-api",children:"Record API"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.code,{children:"Record"})," API is only available in ",(0,s.jsx)(r.strong,{children:"procedure"})," scripts. It handles creating, updating, loading, and deleting AT Protocol records. Writes are proxied to the caller's PDS and indexed locally."]}),"\n",(0,s.jsx)(r.h3,{id:"constructor",children:"Constructor"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-lua",children:'local r = Record("xyz.statusphere.status", { status = "\\ud83d\\ude0a", createdAt = now() })\n'})}),"\n",(0,s.jsxs)(r.p,{children:["Creates a new record instance for the given collection. The optional second argument sets initial field values. The record's ",(0,s.jsx)(r.code,{children:"_key_type"})," is automatically set from the lexicon's ",(0,s.jsx)(r.code,{children:"key"})," definition. Default values from the schema are populated for any missing fields."]}),"\n",(0,s.jsx)(r.h3,{id:"static-methods",children:"Static methods"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-lua",children:'-- Save multiple records in parallel\nRecord.save_all({ record1, record2, record3 })\n\n-- Load a record from the local database by AT URI\nlocal r = Record.load("at://did:plc:abc/xyz.statusphere.status/abc123")\n-- Returns nil if not found\n\n-- Load multiple records in parallel\nlocal records = Record.load_all({ uri1, uri2 })\n-- Returns nil entries for URIs not found\n'})}),"\n",(0,s.jsx)(r.h3,{id:"instance-methods",children:"Instance methods"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-lua",children:'-- Save (creates or updates depending on whether _uri is set)\nr:save()\n\n-- Delete from PDS and local database\nr:delete()\n\n-- Set the record key type (tid, any, nsid, or literal:*)\nr:set_key_type("tid")\n\n-- Set a specific record key\nr:set_rkey("my-key")\n\n-- Auto-generate a record key based on _key_type\nlocal key = r:generate_rkey()\n'})}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsxs)(r.strong,{children:["Key type behavior for ",(0,s.jsx)(r.code,{children:"generate_rkey()"}),":"]})}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Key type"}),(0,s.jsx)(r.th,{children:"Generated rkey"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"tid"})}),(0,s.jsx)(r.td,{children:"Sortable timestamp-based ID"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"any"})}),(0,s.jsxs)(r.td,{children:["Same as ",(0,s.jsx)(r.code,{children:"tid"})]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"literal:value"})}),(0,s.jsx)(r.td,{children:"The literal value after the colon"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"nsid"})}),(0,s.jsxs)(r.td,{children:["Error \u2014 use ",(0,s.jsx)(r.code,{children:"set_rkey()"})," instead"]})]})]})]}),"\n",(0,s.jsx)(r.h3,{id:"instance-fields",children:"Instance fields"}),"\n",(0,s.jsx)(r.p,{children:"These fields are set automatically and are read-only (writes raise an error):"}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Field"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"_uri"})}),(0,s.jsx)(r.td,{children:"string?"}),(0,s.jsxs)(r.td,{children:["AT URI \u2014 set after ",(0,s.jsx)(r.code,{children:"save()"}),", cleared after ",(0,s.jsx)(r.code,{children:"delete()"})]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"_cid"})}),(0,s.jsx)(r.td,{children:"string?"}),(0,s.jsxs)(r.td,{children:["Content hash \u2014 set after ",(0,s.jsx)(r.code,{children:"save()"}),", cleared after ",(0,s.jsx)(r.code,{children:"delete()"})]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"_key_type"})}),(0,s.jsx)(r.td,{children:"string?"}),(0,s.jsx)(r.td,{children:"Record key type from the lexicon definition"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"_rkey"})}),(0,s.jsx)(r.td,{children:"string?"}),(0,s.jsxs)(r.td,{children:["Record key \u2014 set via ",(0,s.jsx)(r.code,{children:"set_rkey()"})," or ",(0,s.jsx)(r.code,{children:"generate_rkey()"})]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"_collection"})}),(0,s.jsx)(r.td,{children:"string"}),(0,s.jsx)(r.td,{children:"Collection NSID (always set)"})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.code,{children:"_schema"})}),(0,s.jsx)(r.td,{children:"table?"}),(0,s.jsx)(r.td,{children:"Schema definition from the lexicon (used for validation)"})]})]})]}),"\n",(0,s.jsx)(r.h3,{id:"schema-validation",children:"Schema validation"}),"\n",(0,s.jsx)(r.p,{children:"When a record has a schema (loaded from the lexicon):"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.strong,{children:"On save:"})," required fields are checked, and missing required fields raise an error"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.strong,{children:"On construction:"})," default values from schema properties are auto-populated"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.strong,{children:"On save:"})," only fields defined in the schema's ",(0,s.jsx)(r.code,{children:"properties"})," are sent to the PDS"]}),"\n"]}),"\n",(0,s.jsx)(r.h3,{id:"save-behavior",children:"Save behavior"}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.code,{children:"r:save()"})," auto-detects create vs update:"]}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["If ",(0,s.jsx)(r.code,{children:"_uri"})," is nil \u2192 calls ",(0,s.jsx)(r.code,{children:"createRecord"})," on the PDS"]}),"\n",(0,s.jsxs)(r.li,{children:["If ",(0,s.jsx)(r.code,{children:"_uri"})," is set \u2192 calls ",(0,s.jsx)(r.code,{children:"putRecord"})," on the PDS"]}),"\n"]}),"\n",(0,s.jsxs)(r.p,{children:["After a successful save, ",(0,s.jsx)(r.code,{children:"_uri"})," and ",(0,s.jsx)(r.code,{children:"_cid"})," are updated on the record instance."]}),"\n",(0,s.jsx)(r.h2,{id:"database-api",children:"Database API"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.code,{children:"db"})," table provides read-only access to indexed records. Available in both queries and procedures."]}),"\n",(0,s.jsx)(r.h3,{id:"dbquery",children:"db.query"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-lua",children:'local result = db.query({\n collection = "xyz.statusphere.status", -- required\n did = "did:plc:abc", -- optional: filter by DID\n limit = 20, -- optional: max 100, default 20\n offset = 0, -- optional: for pagination\n})\n\n-- result.records \u2014 array of record tables (each includes a "uri" field)\n-- result.cursor \u2014 present when more records exist\n'})}),"\n",(0,s.jsx)(r.h3,{id:"dbget",children:"db.get"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-lua",children:'local record = db.get("at://did:plc:abc/xyz.statusphere.status/abc123")\n-- Returns the record table or nil\n-- The returned table includes a "uri" field\n'})}),"\n",(0,s.jsx)(r.h3,{id:"dbcount",children:"db.count"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-lua",children:'local n = db.count("xyz.statusphere.status")\nlocal n = db.count("xyz.statusphere.status", "did:plc:abc") -- filter by DID\n'})}),"\n",(0,s.jsx)(r.h2,{id:"standard-libraries",children:"Standard libraries"}),"\n",(0,s.jsx)(r.p,{children:"The following Lua 5.4 standard library modules are available:"}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:(0,s.jsx)(r.p,{children:(0,s.jsx)(r.code,{children:"string"})})}),(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.byte",children:(0,s.jsx)(r.code,{children:"byte"})})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.char",children:(0,s.jsx)(r.code,{children:"char"})})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.find",children:(0,s.jsx)(r.code,{children:"find"})})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.format",children:(0,s.jsx)(r.code,{children:"format"})})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.gmatch",children:(0,s.jsx)(r.code,{children:"gmatch"})})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.gsub",children:(0,s.jsx)(r.code,{children:"gsub"})})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.len",children:(0,s.jsx)(r.code,{children:"len"})})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.lower",children:(0,s.jsx)(r.code,{children:"lower"})})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.match",children:(0,s.jsx)(r.code,{children:"match"})})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.rep",children:(0,s.jsx)(r.code,{children:"rep"})})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.reverse",children:(0,s.jsx)(r.code,{children:"reverse"})})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.sub",children:(0,s.jsx)(r.code,{children:"sub"})})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.upper",children:(0,s.jsx)(r.code,{children:"upper"})})}),"\n"]})]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:(0,s.jsx)(r.p,{children:(0,s.jsx)(r.code,{children:"table"})})}),(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-table.concat",children:(0,s.jsx)(r.code,{children:"concat"})})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-table.insert",children:(0,s.jsx)(r.code,{children:"insert"})})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-table.remove",children:(0,s.jsx)(r.code,{children:"remove"})})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-table.sort",children:(0,s.jsx)(r.code,{children:"sort"})})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-table.unpack",children:(0,s.jsx)(r.code,{children:"unpack"})})}),"\n"]})]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:(0,s.jsx)(r.p,{children:(0,s.jsx)(r.code,{children:"math"})})}),(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-math.abs",children:(0,s.jsx)(r.code,{children:"abs"})})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-math.ceil",children:(0,s.jsx)(r.code,{children:"ceil"})})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-math.floor",children:(0,s.jsx)(r.code,{children:"floor"})})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-math.max",children:(0,s.jsx)(r.code,{children:"max"})})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-math.min",children:(0,s.jsx)(r.code,{children:"min"})})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-math.random",children:(0,s.jsx)(r.code,{children:"random"})})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-math.sqrt",children:(0,s.jsx)(r.code,{children:"sqrt"})})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-math.huge",children:(0,s.jsx)(r.code,{children:"huge"})})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-math.pi",children:(0,s.jsx)(r.code,{children:"pi"})})}),"\n"]})]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:(0,s.jsx)(r.p,{children:"Standard builtins"})}),(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-print",children:(0,s.jsx)(r.code,{children:"print"})})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-tostring",children:(0,s.jsx)(r.code,{children:"tostring"})})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-tonumber",children:(0,s.jsx)(r.code,{children:"tonumber"})})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-type",children:(0,s.jsx)(r.code,{children:"type"})})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-pairs",children:(0,s.jsx)(r.code,{children:"pairs"})})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-ipairs",children:(0,s.jsx)(r.code,{children:"ipairs"})})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-next",children:(0,s.jsx)(r.code,{children:"next"})})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-select",children:(0,s.jsx)(r.code,{children:"select"})})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-table.unpack",children:(0,s.jsx)(r.code,{children:"unpack"})})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-error",children:(0,s.jsx)(r.code,{children:"error"})})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-pcall",children:(0,s.jsx)(r.code,{children:"pcall"})})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-xpcall",children:(0,s.jsx)(r.code,{children:"xpcall"})})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-assert",children:(0,s.jsx)(r.code,{children:"assert"})})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-setmetatable",children:(0,s.jsx)(r.code,{children:"setmetatable"})})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-getmetatable",children:(0,s.jsx)(r.code,{children:"getmetatable"})})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-rawget",children:(0,s.jsx)(r.code,{children:"rawget"})})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-rawset",children:(0,s.jsx)(r.code,{children:"rawset"})})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-rawequal",children:(0,s.jsx)(r.code,{children:"rawequal"})})}),"\n"]})]}),"\n",(0,s.jsx)(r.h2,{id:"debugging",children:"Debugging"}),"\n",(0,s.jsx)(r.h3,{id:"logging",children:"Logging"}),"\n",(0,s.jsxs)(r.p,{children:["Use ",(0,s.jsx)(r.code,{children:"log()"})," to trace script execution. Output appears in the server logs at ",(0,s.jsx)(r.strong,{children:"debug"})," level with the field ",(0,s.jsx)(r.code,{children:"lua_log"}),":"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-lua",children:'function handle()\n log("handle called with params: " .. tostring(params.limit))\n local result = db.query({ collection = collection, limit = params.limit })\n log("query returned " .. #result.records .. " records")\n return result\nend\n'})}),"\n",(0,s.jsxs)(r.p,{children:["To see log output, make sure your ",(0,s.jsx)(r.code,{children:"RUST_LOG"})," environment variable includes debug level for HappyView (the default ",(0,s.jsx)(r.code,{children:"happyview=debug"})," works). See ",(0,s.jsx)(r.a,{href:"../getting-started/configuration",children:"Configuration"}),"."]}),"\n",(0,s.jsx)(r.h3,{id:"error-messages",children:"Error messages"}),"\n",(0,s.jsxs)(r.p,{children:["When a script fails, the client receives a generic ",(0,s.jsx)(r.code,{children:"500"})," response:"]}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:'{"error": "script execution failed"}'}),": covers syntax errors, runtime errors, missing ",(0,s.jsx)(r.code,{children:"handle()"})," function, and errors raised with ",(0,s.jsx)(r.code,{children:"error()"})]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.code,{children:'{"error": "script exceeded execution time limit"}'}),": the script hit the 1,000,000 instruction limit"]}),"\n"]}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"full error message"})," is logged server-side at error level. Check the server logs to see the actual Lua error, including line numbers and stack traces."]}),"\n",(0,s.jsx)(r.h3,{id:"common-mistakes",children:"Common mistakes"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:[(0,s.jsxs)(r.strong,{children:["Missing ",(0,s.jsx)(r.code,{children:"handle()"})," function"]}),": Every script must define a global ",(0,s.jsx)(r.code,{children:"handle()"}),' function. If it\'s missing or misspelled, the script fails silently with "script execution failed".']}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsxs)(r.strong,{children:["Calling ",(0,s.jsx)(r.code,{children:"error()"})," for expected conditions"]}),": Lua's ",(0,s.jsx)(r.code,{children:"error()"}),' triggers a 500 response. For expected conditions like "record not found", return a structured error response instead: ',(0,s.jsx)(r.code,{children:'return { error = "not found" }'}),"."]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.strong,{children:"Infinite loops"}),": The sandbox enforces a 1,000,000 instruction limit. If your script processes large data sets, paginate with ",(0,s.jsx)(r.code,{children:"db.query()"})," limits instead of loading everything at once."]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsxs)(r.strong,{children:["Forgetting ",(0,s.jsx)(r.code,{children:"params"})," values are strings"]}),": All query string parameters arrive as strings. Use ",(0,s.jsx)(r.code,{children:"tonumber(params.limit)"})," if you need a number."]}),"\n"]}),"\n",(0,s.jsx)(r.h2,{id:"example-scripts",children:"Example scripts"}),"\n",(0,s.jsx)(r.p,{children:"See the example script references for complete, ready-to-use scripts:"}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Queries:"})}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.a,{href:"../reference/scripts/get-record",children:"Get a record"})," \u2014 fetch a single record by AT URI"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.a,{href:"../reference/scripts/paginated-list",children:"Paginated list"})," \u2014 list records with cursor-based pagination and DID filtering"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.a,{href:"../reference/scripts/list-or-fetch",children:"List or fetch"})," \u2014 combined single-record lookup and paginated listing"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.a,{href:"../reference/scripts/expanded-query",children:"Expanded query"})," \u2014 list statuses with user profiles in a single response"]}),"\n"]}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.strong,{children:"Procedures:"})}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.a,{href:"../reference/scripts/create-record",children:"Create a record"})," \u2014 simple write that saves input as a record"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.a,{href:"../reference/scripts/upsert-record",children:"Upsert a record"})," \u2014 create or update using a deterministic rkey"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.a,{href:"../reference/scripts/update-or-delete",children:"Update or delete"})," \u2014 single endpoint handling create, update, and delete"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.a,{href:"../reference/scripts/batch-save",children:"Batch save"})," \u2014 create multiple records in parallel with ",(0,s.jsx)(r.code,{children:"Record.save_all()"})]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.a,{href:"../reference/scripts/sidecar-records",children:"Sidecar records"})," \u2014 create linked records across collections with a shared rkey"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.a,{href:"../reference/scripts/cascading-delete",children:"Cascading delete"})," \u2014 delete a record and all related records"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.a,{href:"../reference/scripts/complex-mutations",children:"Complex mutations"})," \u2014 load, transform, and save a record with multiple field changes"]}),"\n"]}),"\n",(0,s.jsx)(r.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.a,{href:"lexicons",children:"Lexicons"}),": Understand how record, query, and procedure lexicons work together"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.a,{href:"../reference/xrpc-api",children:"XRPC API"}),": See how endpoints behave with and without Lua scripts"]}),"\n",(0,s.jsxs)(r.li,{children:[(0,s.jsx)(r.a,{href:"../getting-started/dashboard#lua-editor",children:"Dashboard"}),": Use the web editor with context-aware completions"]}),"\n"]})]})}function o(e={}){const{wrapper:r}={...(0,i.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},8453(e,r,n){n.d(r,{R:()=>d,x:()=>t});var l=n(6540);const s={},i=l.createContext(s);function d(e){const r=l.useContext(i);return l.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function t(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:d(e.components),l.createElement(i.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/920ba7ef.b825c418.js b/assets/js/920ba7ef.b825c418.js new file mode 100644 index 0000000..874174d --- /dev/null +++ b/assets/js/920ba7ef.b825c418.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[5953],{1189(e,r,n){n.r(r),n.d(r,{assets:()=>a,contentTitle:()=>t,default:()=>o,frontMatter:()=>d,metadata:()=>s,toc:()=>c});const s=JSON.parse('{"id":"guides/scripting","title":"Lua Scripting","description":"Without Lua scripts, HappyView\'s query endpoints return raw records and procedure endpoints proxy simple creates and updates. Lua scripts let you go much further:","source":"@site/docs/guides/scripting.md","sourceDirName":"guides","slug":"/guides/scripting","permalink":"/guides/scripting","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Lexicons","permalink":"/guides/lexicons"},"next":{"title":"Backfill","permalink":"/guides/backfill"}}');var l=n(4848),i=n(8453);const d={},t="Lua Scripting",a={},c=[{value:"Script structure",id:"script-structure",level:2},{value:"Sandbox",id:"sandbox",level:2},{value:"Context globals",id:"context-globals",level:2},{value:"Procedure globals",id:"procedure-globals",level:3},{value:"Query globals",id:"query-globals",level:3},{value:"Utility globals",id:"utility-globals",level:2},{value:"Record API",id:"record-api",level:2},{value:"Constructor",id:"constructor",level:3},{value:"Static methods",id:"static-methods",level:3},{value:"Instance methods",id:"instance-methods",level:3},{value:"Instance fields",id:"instance-fields",level:3},{value:"Schema validation",id:"schema-validation",level:3},{value:"Save behavior",id:"save-behavior",level:3},{value:"Database API",id:"database-api",level:2},{value:"db.query",id:"dbquery",level:3},{value:"db.get",id:"dbget",level:3},{value:"db.count",id:"dbcount",level:3},{value:"Standard libraries",id:"standard-libraries",level:2},{value:"Debugging",id:"debugging",level:2},{value:"Logging",id:"logging",level:3},{value:"Error messages",id:"error-messages",level:3},{value:"Common mistakes",id:"common-mistakes",level:3},{value:"Example scripts",id:"example-scripts",level:2},{value:"Next steps",id:"next-steps",level:2}];function h(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components},{Details:n}=r;return n||function(e,r){throw new Error("Expected "+(r?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(r.header,{children:(0,l.jsx)(r.h1,{id:"lua-scripting",children:"Lua Scripting"})}),"\n",(0,l.jsx)(r.p,{children:"Without Lua scripts, HappyView's query endpoints return raw records and procedure endpoints proxy simple creates and updates. Lua scripts let you go much further:"}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsx)(r.li,{children:"Add filtering logic"}),"\n",(0,l.jsx)(r.li,{children:"Transform responses"}),"\n",(0,l.jsx)(r.li,{children:"Validate input"}),"\n",(0,l.jsx)(r.li,{children:"Compose multi-record operations"}),"\n",(0,l.jsx)(r.li,{children:"Build entirely custom behavior"}),"\n"]}),"\n",(0,l.jsxs)(r.p,{children:["Scripts are attached to query and procedure lexicons and run in a sandboxed Lua VM with access to the ",(0,l.jsx)(r.a,{href:"#record-api",children:"Record API"}),", a ",(0,l.jsx)(r.a,{href:"#database-api",children:"read-only database API"}),", and a set of ",(0,l.jsx)(r.a,{href:"#context-globals",children:"context globals"}),"."]}),"\n",(0,l.jsx)(r.h2,{id:"script-structure",children:"Script structure"}),"\n",(0,l.jsxs)(r.p,{children:["Every script must define a ",(0,l.jsx)(r.code,{children:"handle()"})," function. HappyView calls it when the XRPC endpoint is hit and returns its result as JSON to the client."]}),"\n",(0,l.jsx)(r.pre,{children:(0,l.jsx)(r.code,{className:"language-lua",children:'function handle()\n -- your logic here\n return { key = "value" }\nend\n'})}),"\n",(0,l.jsxs)(r.p,{children:["You can define helper functions and variables outside ",(0,l.jsx)(r.code,{children:"handle()"}),". They're evaluated once when the script loads, then ",(0,l.jsx)(r.code,{children:"handle()"})," is called per request."]}),"\n",(0,l.jsx)(r.h2,{id:"sandbox",children:"Sandbox"}),"\n",(0,l.jsxs)(r.p,{children:["Scripts run in a restricted environment. The following standard Lua modules are ",(0,l.jsx)(r.strong,{children:"removed"})," and unavailable:"]}),"\n",(0,l.jsxs)(r.p,{children:[(0,l.jsx)(r.code,{children:"os"}),", ",(0,l.jsx)(r.code,{children:"io"}),", ",(0,l.jsx)(r.code,{children:"debug"}),", ",(0,l.jsx)(r.code,{children:"package"}),", ",(0,l.jsx)(r.code,{children:"require"}),", ",(0,l.jsx)(r.code,{children:"dofile"}),", ",(0,l.jsx)(r.code,{children:"loadfile"}),", ",(0,l.jsx)(r.code,{children:"load"}),", ",(0,l.jsx)(r.code,{children:"collectgarbage"})]}),"\n",(0,l.jsx)(r.p,{children:"An instruction limit of 1,000,000 prevents infinite loops. Exceeding it terminates the script with an error."}),"\n",(0,l.jsx)(r.h2,{id:"context-globals",children:"Context globals"}),"\n",(0,l.jsxs)(r.p,{children:["These globals are set automatically before ",(0,l.jsx)(r.code,{children:"handle()"})," is called."]}),"\n",(0,l.jsx)(r.h3,{id:"procedure-globals",children:"Procedure globals"}),"\n",(0,l.jsxs)(r.table,{children:[(0,l.jsx)(r.thead,{children:(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.th,{children:"Global"}),(0,l.jsx)(r.th,{children:"Type"}),(0,l.jsx)(r.th,{children:"Description"})]})}),(0,l.jsxs)(r.tbody,{children:[(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"method"})}),(0,l.jsx)(r.td,{children:"string"}),(0,l.jsxs)(r.td,{children:["The XRPC method name (e.g. ",(0,l.jsx)(r.code,{children:"xyz.statusphere.setStatus"}),")"]})]}),(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"input"})}),(0,l.jsx)(r.td,{children:"table"}),(0,l.jsx)(r.td,{children:"Parsed JSON request body"})]}),(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"caller_did"})}),(0,l.jsx)(r.td,{children:"string"}),(0,l.jsx)(r.td,{children:"DID of the authenticated user"})]}),(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"collection"})}),(0,l.jsx)(r.td,{children:"string"}),(0,l.jsx)(r.td,{children:"Target collection NSID"})]})]})]}),"\n",(0,l.jsx)(r.h3,{id:"query-globals",children:"Query globals"}),"\n",(0,l.jsxs)(r.table,{children:[(0,l.jsx)(r.thead,{children:(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.th,{children:"Global"}),(0,l.jsx)(r.th,{children:"Type"}),(0,l.jsx)(r.th,{children:"Description"})]})}),(0,l.jsxs)(r.tbody,{children:[(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"method"})}),(0,l.jsx)(r.td,{children:"string"}),(0,l.jsx)(r.td,{children:"The XRPC method name"})]}),(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"params"})}),(0,l.jsx)(r.td,{children:"table"}),(0,l.jsx)(r.td,{children:"Query string parameters (all values are strings)"})]}),(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"collection"})}),(0,l.jsx)(r.td,{children:"string"}),(0,l.jsx)(r.td,{children:"Target collection NSID"})]})]})]}),"\n",(0,l.jsxs)(r.p,{children:["Queries are unauthenticated: there is no ",(0,l.jsx)(r.code,{children:"caller_did"})," or ",(0,l.jsx)(r.code,{children:"input"}),"."]}),"\n",(0,l.jsx)(r.h2,{id:"utility-globals",children:"Utility globals"}),"\n",(0,l.jsx)(r.p,{children:"Available in both queries and procedures:"}),"\n",(0,l.jsxs)(r.table,{children:[(0,l.jsx)(r.thead,{children:(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.th,{children:"Function"}),(0,l.jsx)(r.th,{children:"Returns"}),(0,l.jsx)(r.th,{children:"Description"})]})}),(0,l.jsxs)(r.tbody,{children:[(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"now()"})}),(0,l.jsx)(r.td,{children:"string"}),(0,l.jsx)(r.td,{children:"Current UTC timestamp in ISO 8601 format"})]}),(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"log(message)"})}),(0,l.jsx)(r.td,{children:"\u2014"}),(0,l.jsx)(r.td,{children:"Log a message (appears in server logs at debug level)"})]}),(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"TID()"})}),(0,l.jsx)(r.td,{children:"string"}),(0,l.jsx)(r.td,{children:"Generate a fresh AT Protocol TID (13-character sortable identifier)"})]})]})]}),"\n",(0,l.jsx)(r.h2,{id:"record-api",children:"Record API"}),"\n",(0,l.jsxs)(r.p,{children:["The ",(0,l.jsx)(r.code,{children:"Record"})," API is only available in ",(0,l.jsx)(r.strong,{children:"procedure"})," scripts. It handles creating, updating, loading, and deleting AT Protocol records. Writes are proxied to the caller's PDS and indexed locally."]}),"\n",(0,l.jsx)(r.h3,{id:"constructor",children:"Constructor"}),"\n",(0,l.jsx)(r.pre,{children:(0,l.jsx)(r.code,{className:"language-lua",children:'local r = Record("xyz.statusphere.status", { status = "\\ud83d\\ude0a", createdAt = now() })\n'})}),"\n",(0,l.jsxs)(r.p,{children:["Creates a new record instance for the given collection. The optional second argument sets initial field values. The record's ",(0,l.jsx)(r.code,{children:"_key_type"})," is automatically set from the lexicon's ",(0,l.jsx)(r.code,{children:"key"})," definition. Default values from the schema are populated for any missing fields."]}),"\n",(0,l.jsx)(r.h3,{id:"static-methods",children:"Static methods"}),"\n",(0,l.jsx)(r.pre,{children:(0,l.jsx)(r.code,{className:"language-lua",children:'-- Save multiple records in parallel\nRecord.save_all({ record1, record2, record3 })\n\n-- Load a record from the local database by AT URI\nlocal r = Record.load("at://did:plc:abc/xyz.statusphere.status/abc123")\n-- Returns nil if not found\n\n-- Load multiple records in parallel\nlocal records = Record.load_all({ uri1, uri2 })\n-- Returns nil entries for URIs not found\n'})}),"\n",(0,l.jsx)(r.h3,{id:"instance-methods",children:"Instance methods"}),"\n",(0,l.jsx)(r.pre,{children:(0,l.jsx)(r.code,{className:"language-lua",children:'-- Save (creates or updates depending on whether _uri is set)\nr:save()\n\n-- Delete from PDS and local database\nr:delete()\n\n-- Set the record key type (tid, any, nsid, or literal:*)\nr:set_key_type("tid")\n\n-- Set a specific record key\nr:set_rkey("my-key")\n\n-- Auto-generate a record key based on _key_type\nlocal key = r:generate_rkey()\n'})}),"\n",(0,l.jsx)(r.p,{children:(0,l.jsxs)(r.strong,{children:["Key type behavior for ",(0,l.jsx)(r.code,{children:"generate_rkey()"}),":"]})}),"\n",(0,l.jsxs)(r.table,{children:[(0,l.jsx)(r.thead,{children:(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.th,{children:"Key type"}),(0,l.jsx)(r.th,{children:"Generated rkey"})]})}),(0,l.jsxs)(r.tbody,{children:[(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"tid"})}),(0,l.jsx)(r.td,{children:"Sortable timestamp-based ID"})]}),(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"any"})}),(0,l.jsxs)(r.td,{children:["Same as ",(0,l.jsx)(r.code,{children:"tid"})]})]}),(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"literal:value"})}),(0,l.jsx)(r.td,{children:"The literal value after the colon"})]}),(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"nsid"})}),(0,l.jsxs)(r.td,{children:["Error \u2014 use ",(0,l.jsx)(r.code,{children:"set_rkey()"})," instead"]})]})]})]}),"\n",(0,l.jsx)(r.h3,{id:"instance-fields",children:"Instance fields"}),"\n",(0,l.jsx)(r.p,{children:"These fields are set automatically and are read-only (writes raise an error):"}),"\n",(0,l.jsxs)(r.table,{children:[(0,l.jsx)(r.thead,{children:(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.th,{children:"Field"}),(0,l.jsx)(r.th,{children:"Type"}),(0,l.jsx)(r.th,{children:"Description"})]})}),(0,l.jsxs)(r.tbody,{children:[(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"_uri"})}),(0,l.jsx)(r.td,{children:"string?"}),(0,l.jsxs)(r.td,{children:["AT URI \u2014 set after ",(0,l.jsx)(r.code,{children:"save()"}),", cleared after ",(0,l.jsx)(r.code,{children:"delete()"})]})]}),(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"_cid"})}),(0,l.jsx)(r.td,{children:"string?"}),(0,l.jsxs)(r.td,{children:["Content hash \u2014 set after ",(0,l.jsx)(r.code,{children:"save()"}),", cleared after ",(0,l.jsx)(r.code,{children:"delete()"})]})]}),(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"_key_type"})}),(0,l.jsx)(r.td,{children:"string?"}),(0,l.jsx)(r.td,{children:"Record key type from the lexicon definition"})]}),(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"_rkey"})}),(0,l.jsx)(r.td,{children:"string?"}),(0,l.jsxs)(r.td,{children:["Record key \u2014 set via ",(0,l.jsx)(r.code,{children:"set_rkey()"})," or ",(0,l.jsx)(r.code,{children:"generate_rkey()"})]})]}),(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"_collection"})}),(0,l.jsx)(r.td,{children:"string"}),(0,l.jsx)(r.td,{children:"Collection NSID (always set)"})]}),(0,l.jsxs)(r.tr,{children:[(0,l.jsx)(r.td,{children:(0,l.jsx)(r.code,{children:"_schema"})}),(0,l.jsx)(r.td,{children:"table?"}),(0,l.jsx)(r.td,{children:"Schema definition from the lexicon (used for validation)"})]})]})]}),"\n",(0,l.jsx)(r.h3,{id:"schema-validation",children:"Schema validation"}),"\n",(0,l.jsx)(r.p,{children:"When a record has a schema (loaded from the lexicon):"}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.strong,{children:"On save:"})," required fields are checked, and missing required fields raise an error"]}),"\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.strong,{children:"On construction:"})," default values from schema properties are auto-populated"]}),"\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.strong,{children:"On save:"})," only fields defined in the schema's ",(0,l.jsx)(r.code,{children:"properties"})," are sent to the PDS"]}),"\n"]}),"\n",(0,l.jsx)(r.h3,{id:"save-behavior",children:"Save behavior"}),"\n",(0,l.jsxs)(r.p,{children:[(0,l.jsx)(r.code,{children:"r:save()"})," auto-detects create vs update:"]}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:["If ",(0,l.jsx)(r.code,{children:"_uri"})," is nil \u2192 calls ",(0,l.jsx)(r.code,{children:"createRecord"})," on the PDS"]}),"\n",(0,l.jsxs)(r.li,{children:["If ",(0,l.jsx)(r.code,{children:"_uri"})," is set \u2192 calls ",(0,l.jsx)(r.code,{children:"putRecord"})," on the PDS"]}),"\n"]}),"\n",(0,l.jsxs)(r.p,{children:["After a successful save, ",(0,l.jsx)(r.code,{children:"_uri"})," and ",(0,l.jsx)(r.code,{children:"_cid"})," are updated on the record instance."]}),"\n",(0,l.jsx)(r.h2,{id:"database-api",children:"Database API"}),"\n",(0,l.jsxs)(r.p,{children:["The ",(0,l.jsx)(r.code,{children:"db"})," table provides read-only access to indexed records. Available in both queries and procedures."]}),"\n",(0,l.jsx)(r.h3,{id:"dbquery",children:"db.query"}),"\n",(0,l.jsx)(r.pre,{children:(0,l.jsx)(r.code,{className:"language-lua",children:'local result = db.query({\n collection = "xyz.statusphere.status", -- required\n did = "did:plc:abc", -- optional: filter by DID\n limit = 20, -- optional: max 100, default 20\n offset = 0, -- optional: for pagination\n})\n\n-- result.records \u2014 array of record tables (each includes a "uri" field)\n-- result.cursor \u2014 present when more records exist\n'})}),"\n",(0,l.jsx)(r.h3,{id:"dbget",children:"db.get"}),"\n",(0,l.jsx)(r.pre,{children:(0,l.jsx)(r.code,{className:"language-lua",children:'local record = db.get("at://did:plc:abc/xyz.statusphere.status/abc123")\n-- Returns the record table or nil\n-- The returned table includes a "uri" field\n'})}),"\n",(0,l.jsx)(r.h3,{id:"dbcount",children:"db.count"}),"\n",(0,l.jsx)(r.pre,{children:(0,l.jsx)(r.code,{className:"language-lua",children:'local n = db.count("xyz.statusphere.status")\nlocal n = db.count("xyz.statusphere.status", "did:plc:abc") -- filter by DID\n'})}),"\n",(0,l.jsx)(r.h2,{id:"standard-libraries",children:"Standard libraries"}),"\n",(0,l.jsx)(r.p,{children:"The following Lua 5.4 standard library modules are available:"}),"\n",(0,l.jsxs)(n,{children:[(0,l.jsx)("summary",{children:(0,l.jsx)(r.p,{children:(0,l.jsx)(r.code,{children:"string"})})}),(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.byte",children:(0,l.jsx)(r.code,{children:"byte"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.char",children:(0,l.jsx)(r.code,{children:"char"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.find",children:(0,l.jsx)(r.code,{children:"find"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.format",children:(0,l.jsx)(r.code,{children:"format"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.gmatch",children:(0,l.jsx)(r.code,{children:"gmatch"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.gsub",children:(0,l.jsx)(r.code,{children:"gsub"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.len",children:(0,l.jsx)(r.code,{children:"len"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.lower",children:(0,l.jsx)(r.code,{children:"lower"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.match",children:(0,l.jsx)(r.code,{children:"match"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.rep",children:(0,l.jsx)(r.code,{children:"rep"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.reverse",children:(0,l.jsx)(r.code,{children:"reverse"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.sub",children:(0,l.jsx)(r.code,{children:"sub"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-string.upper",children:(0,l.jsx)(r.code,{children:"upper"})})}),"\n"]})]}),"\n",(0,l.jsxs)(n,{children:[(0,l.jsx)("summary",{children:(0,l.jsx)(r.p,{children:(0,l.jsx)(r.code,{children:"table"})})}),(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-table.concat",children:(0,l.jsx)(r.code,{children:"concat"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-table.insert",children:(0,l.jsx)(r.code,{children:"insert"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-table.remove",children:(0,l.jsx)(r.code,{children:"remove"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-table.sort",children:(0,l.jsx)(r.code,{children:"sort"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-table.unpack",children:(0,l.jsx)(r.code,{children:"unpack"})})}),"\n"]})]}),"\n",(0,l.jsxs)(n,{children:[(0,l.jsx)("summary",{children:(0,l.jsx)(r.p,{children:(0,l.jsx)(r.code,{children:"math"})})}),(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-math.abs",children:(0,l.jsx)(r.code,{children:"abs"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-math.ceil",children:(0,l.jsx)(r.code,{children:"ceil"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-math.floor",children:(0,l.jsx)(r.code,{children:"floor"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-math.max",children:(0,l.jsx)(r.code,{children:"max"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-math.min",children:(0,l.jsx)(r.code,{children:"min"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-math.random",children:(0,l.jsx)(r.code,{children:"random"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-math.sqrt",children:(0,l.jsx)(r.code,{children:"sqrt"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-math.huge",children:(0,l.jsx)(r.code,{children:"huge"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-math.pi",children:(0,l.jsx)(r.code,{children:"pi"})})}),"\n"]})]}),"\n",(0,l.jsxs)(n,{children:[(0,l.jsx)("summary",{children:(0,l.jsx)(r.p,{children:"Standard builtins"})}),(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-print",children:(0,l.jsx)(r.code,{children:"print"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-tostring",children:(0,l.jsx)(r.code,{children:"tostring"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-tonumber",children:(0,l.jsx)(r.code,{children:"tonumber"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-type",children:(0,l.jsx)(r.code,{children:"type"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-pairs",children:(0,l.jsx)(r.code,{children:"pairs"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-ipairs",children:(0,l.jsx)(r.code,{children:"ipairs"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-next",children:(0,l.jsx)(r.code,{children:"next"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-select",children:(0,l.jsx)(r.code,{children:"select"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-table.unpack",children:(0,l.jsx)(r.code,{children:"unpack"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-error",children:(0,l.jsx)(r.code,{children:"error"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-pcall",children:(0,l.jsx)(r.code,{children:"pcall"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-xpcall",children:(0,l.jsx)(r.code,{children:"xpcall"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-assert",children:(0,l.jsx)(r.code,{children:"assert"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-setmetatable",children:(0,l.jsx)(r.code,{children:"setmetatable"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-getmetatable",children:(0,l.jsx)(r.code,{children:"getmetatable"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-rawget",children:(0,l.jsx)(r.code,{children:"rawget"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-rawset",children:(0,l.jsx)(r.code,{children:"rawset"})})}),"\n",(0,l.jsx)(r.li,{children:(0,l.jsx)(r.a,{href:"https://lua.org/manual/5.4/manual.html#pdf-rawequal",children:(0,l.jsx)(r.code,{children:"rawequal"})})}),"\n"]})]}),"\n",(0,l.jsx)(r.h2,{id:"debugging",children:"Debugging"}),"\n",(0,l.jsx)(r.h3,{id:"logging",children:"Logging"}),"\n",(0,l.jsxs)(r.p,{children:["Use ",(0,l.jsx)(r.code,{children:"log()"})," to trace script execution. Output appears in the server logs at ",(0,l.jsx)(r.strong,{children:"debug"})," level with the field ",(0,l.jsx)(r.code,{children:"lua_log"}),":"]}),"\n",(0,l.jsx)(r.pre,{children:(0,l.jsx)(r.code,{className:"language-lua",children:'function handle()\n log("handle called with params: " .. tostring(params.limit))\n local result = db.query({ collection = collection, limit = params.limit })\n log("query returned " .. #result.records .. " records")\n return result\nend\n'})}),"\n",(0,l.jsxs)(r.p,{children:["To see log output, make sure your ",(0,l.jsx)(r.code,{children:"RUST_LOG"})," environment variable includes debug level for HappyView (the default ",(0,l.jsx)(r.code,{children:"happyview=debug"})," works). See ",(0,l.jsx)(r.a,{href:"/getting-started/configuration",children:"Configuration"}),"."]}),"\n",(0,l.jsx)(r.h3,{id:"error-messages",children:"Error messages"}),"\n",(0,l.jsxs)(r.p,{children:["When a script fails, the client receives a generic ",(0,l.jsx)(r.code,{children:"500"})," response:"]}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.code,{children:'{"error": "script execution failed"}'}),": covers syntax errors, runtime errors, missing ",(0,l.jsx)(r.code,{children:"handle()"})," function, and errors raised with ",(0,l.jsx)(r.code,{children:"error()"})]}),"\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.code,{children:'{"error": "script exceeded execution time limit"}'}),": the script hit the 1,000,000 instruction limit"]}),"\n"]}),"\n",(0,l.jsxs)(r.p,{children:["The ",(0,l.jsx)(r.strong,{children:"full error message"})," is logged server-side at error level. Check the server logs to see the actual Lua error, including line numbers and stack traces."]}),"\n",(0,l.jsx)(r.h3,{id:"common-mistakes",children:"Common mistakes"}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:[(0,l.jsxs)(r.strong,{children:["Missing ",(0,l.jsx)(r.code,{children:"handle()"})," function"]}),": Every script must define a global ",(0,l.jsx)(r.code,{children:"handle()"}),' function. If it\'s missing or misspelled, the script fails silently with "script execution failed".']}),"\n",(0,l.jsxs)(r.li,{children:[(0,l.jsxs)(r.strong,{children:["Calling ",(0,l.jsx)(r.code,{children:"error()"})," for expected conditions"]}),": Lua's ",(0,l.jsx)(r.code,{children:"error()"}),' triggers a 500 response. For expected conditions like "record not found", return a structured error response instead: ',(0,l.jsx)(r.code,{children:'return { error = "not found" }'}),"."]}),"\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.strong,{children:"Infinite loops"}),": The sandbox enforces a 1,000,000 instruction limit. If your script processes large data sets, paginate with ",(0,l.jsx)(r.code,{children:"db.query()"})," limits instead of loading everything at once."]}),"\n",(0,l.jsxs)(r.li,{children:[(0,l.jsxs)(r.strong,{children:["Forgetting ",(0,l.jsx)(r.code,{children:"params"})," values are strings"]}),": All query string parameters arrive as strings. Use ",(0,l.jsx)(r.code,{children:"tonumber(params.limit)"})," if you need a number."]}),"\n"]}),"\n",(0,l.jsx)(r.h2,{id:"example-scripts",children:"Example scripts"}),"\n",(0,l.jsx)(r.p,{children:"See the example script references for complete, ready-to-use scripts:"}),"\n",(0,l.jsx)(r.p,{children:(0,l.jsx)(r.strong,{children:"Queries:"})}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.a,{href:"/reference/scripts/get-record",children:"Get a record"})," \u2014 fetch a single record by AT URI"]}),"\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.a,{href:"/reference/scripts/paginated-list",children:"Paginated list"})," \u2014 list records with cursor-based pagination and DID filtering"]}),"\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.a,{href:"/reference/scripts/list-or-fetch",children:"List or fetch"})," \u2014 combined single-record lookup and paginated listing"]}),"\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.a,{href:"/reference/scripts/expanded-query",children:"Expanded query"})," \u2014 list statuses with user profiles in a single response"]}),"\n"]}),"\n",(0,l.jsx)(r.p,{children:(0,l.jsx)(r.strong,{children:"Procedures:"})}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.a,{href:"/reference/scripts/create-record",children:"Create a record"})," \u2014 simple write that saves input as a record"]}),"\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.a,{href:"/reference/scripts/upsert-record",children:"Upsert a record"})," \u2014 create or update using a deterministic rkey"]}),"\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.a,{href:"/reference/scripts/update-or-delete",children:"Update or delete"})," \u2014 single endpoint handling create, update, and delete"]}),"\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.a,{href:"/reference/scripts/batch-save",children:"Batch save"})," \u2014 create multiple records in parallel with ",(0,l.jsx)(r.code,{children:"Record.save_all()"})]}),"\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.a,{href:"/reference/scripts/sidecar-records",children:"Sidecar records"})," \u2014 create linked records across collections with a shared rkey"]}),"\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.a,{href:"/reference/scripts/cascading-delete",children:"Cascading delete"})," \u2014 delete a record and all related records"]}),"\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.a,{href:"/reference/scripts/complex-mutations",children:"Complex mutations"})," \u2014 load, transform, and save a record with multiple field changes"]}),"\n"]}),"\n",(0,l.jsx)(r.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,l.jsxs)(r.ul,{children:["\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.a,{href:"/guides/lexicons",children:"Lexicons"}),": Understand how record, query, and procedure lexicons work together"]}),"\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.a,{href:"/reference/xrpc-api",children:"XRPC API"}),": See how endpoints behave with and without Lua scripts"]}),"\n",(0,l.jsxs)(r.li,{children:[(0,l.jsx)(r.a,{href:"/getting-started/dashboard#lua-editor",children:"Dashboard"}),": Use the web editor with context-aware completions"]}),"\n"]})]})}function o(e={}){const{wrapper:r}={...(0,i.R)(),...e.components};return r?(0,l.jsx)(r,{...e,children:(0,l.jsx)(h,{...e})}):h(e)}},8453(e,r,n){n.d(r,{R:()=>d,x:()=>t});var s=n(6540);const l={},i=s.createContext(l);function d(e){const r=s.useContext(i);return s.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function t(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:d(e.components),s.createElement(i.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a4086a70.03789122.js b/assets/js/a4086a70.58f7d6fe.js similarity index 53% rename from assets/js/a4086a70.03789122.js rename to assets/js/a4086a70.58f7d6fe.js index b357c59..7398c9d 100644 --- a/assets/js/a4086a70.03789122.js +++ b/assets/js/a4086a70.58f7d6fe.js @@ -1 +1 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[7194],{9297(e,r,n){n.r(r),n.d(r,{assets:()=>o,contentTitle:()=>i,default:()=>h,frontMatter:()=>a,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"reference/scripts/batch-save","title":"Procedure: Batch Save","description":"Use Record.save_all() to create multiple records in parallel.","source":"@site/docs/reference/scripts/batch-save.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/batch-save","permalink":"/reference/scripts/batch-save","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Update or Delete","permalink":"/reference/scripts/update-or-delete"},"next":{"title":"Sidecar Records","permalink":"/reference/scripts/sidecar-records"}}');var t=n(4848),c=n(8453);const a={},i="Procedure: Batch Save",o={},l=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function d(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,c.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.header,{children:(0,t.jsx)(r.h1,{id:"procedure-batch-save",children:"Procedure: Batch Save"})}),"\n",(0,t.jsxs)(r.p,{children:["Use ",(0,t.jsx)(r.code,{children:"Record.save_all()"})," to create multiple records in parallel."]}),"\n",(0,t.jsxs)(r.p,{children:[(0,t.jsx)(r.strong,{children:"Lexicon type:"})," procedure"]}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-lua",children:"function handle()\n local records = {}\n for _, item in ipairs(input.items) do\n local r = Record(collection, item)\n records[#records + 1] = r\n end\n Record.save_all(records)\n\n local uris = {}\n for _, r in ipairs(records) do\n uris[#uris + 1] = r._uri\n end\n return { uris = uris }\nend\n"})}),"\n",(0,t.jsx)(r.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,t.jsxs)(r.ol,{children:["\n",(0,t.jsxs)(r.li,{children:["Iterate over ",(0,t.jsx)(r.code,{children:"input.items"})," and create a ",(0,t.jsx)(r.a,{href:"../../guides/scripting#record-api",children:(0,t.jsx)(r.code,{children:"Record"})})," instance for each item."]}),"\n",(0,t.jsxs)(r.li,{children:["Call ",(0,t.jsx)(r.a,{href:"../../guides/scripting#static-methods",children:(0,t.jsx)(r.code,{children:"Record.save_all()"})})," to save all records in parallel, rather than one at a time."]}),"\n",(0,t.jsx)(r.li,{children:"Collect the resulting AT URIs and return them."}),"\n"]}),"\n",(0,t.jsx)(r.h2,{id:"usage",children:"Usage"}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/xrpc/xyz.statusphere.batchCreate \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "items": [\n { "text": "First", "createdAt": "2025-01-01T00:00:00Z" },\n { "text": "Second", "createdAt": "2025-01-01T00:01:00Z" }\n ]\n }\'\n'})}),"\n",(0,t.jsx)(r.h2,{id:"use-case",children:"Use case"}),"\n",(0,t.jsxs)(r.p,{children:["Batch saving is useful when a single user action should create multiple records (e.g. importing data, multi-step forms). ",(0,t.jsx)(r.code,{children:"save_all"})," is significantly faster than calling ",(0,t.jsx)(r.code,{children:"r:save()"})," in a loop because the PDS writes happen concurrently."]})]})}function h(e={}){const{wrapper:r}={...(0,c.R)(),...e.components};return r?(0,t.jsx)(r,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},8453(e,r,n){n.d(r,{R:()=>a,x:()=>i});var s=n(6540);const t={},c=s.createContext(t);function a(e){const r=s.useContext(c);return s.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function i(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:a(e.components),s.createElement(c.Provider,{value:r},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[7194],{9297(e,r,n){n.r(r),n.d(r,{assets:()=>o,contentTitle:()=>i,default:()=>h,frontMatter:()=>a,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"reference/scripts/batch-save","title":"Procedure: Batch Save","description":"Use Record.save_all() to create multiple records in parallel.","source":"@site/docs/reference/scripts/batch-save.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/batch-save","permalink":"/reference/scripts/batch-save","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Update or Delete","permalink":"/reference/scripts/update-or-delete"},"next":{"title":"Sidecar Records","permalink":"/reference/scripts/sidecar-records"}}');var t=n(4848),c=n(8453);const a={},i="Procedure: Batch Save",o={},l=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function d(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,c.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.header,{children:(0,t.jsx)(r.h1,{id:"procedure-batch-save",children:"Procedure: Batch Save"})}),"\n",(0,t.jsxs)(r.p,{children:["Use ",(0,t.jsx)(r.code,{children:"Record.save_all()"})," to create multiple records in parallel."]}),"\n",(0,t.jsxs)(r.p,{children:[(0,t.jsx)(r.strong,{children:"Lexicon type:"})," procedure"]}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-lua",children:"function handle()\n local records = {}\n for _, item in ipairs(input.items) do\n local r = Record(collection, item)\n records[#records + 1] = r\n end\n Record.save_all(records)\n\n local uris = {}\n for _, r in ipairs(records) do\n uris[#uris + 1] = r._uri\n end\n return { uris = uris }\nend\n"})}),"\n",(0,t.jsx)(r.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,t.jsxs)(r.ol,{children:["\n",(0,t.jsxs)(r.li,{children:["Iterate over ",(0,t.jsx)(r.code,{children:"input.items"})," and create a ",(0,t.jsx)(r.a,{href:"/guides/scripting#record-api",children:(0,t.jsx)(r.code,{children:"Record"})})," instance for each item."]}),"\n",(0,t.jsxs)(r.li,{children:["Call ",(0,t.jsx)(r.a,{href:"/guides/scripting#static-methods",children:(0,t.jsx)(r.code,{children:"Record.save_all()"})})," to save all records in parallel, rather than one at a time."]}),"\n",(0,t.jsx)(r.li,{children:"Collect the resulting AT URIs and return them."}),"\n"]}),"\n",(0,t.jsx)(r.h2,{id:"usage",children:"Usage"}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/xrpc/xyz.statusphere.batchCreate \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "items": [\n { "text": "First", "createdAt": "2025-01-01T00:00:00Z" },\n { "text": "Second", "createdAt": "2025-01-01T00:01:00Z" }\n ]\n }\'\n'})}),"\n",(0,t.jsx)(r.h2,{id:"use-case",children:"Use case"}),"\n",(0,t.jsxs)(r.p,{children:["Batch saving is useful when a single user action should create multiple records (e.g. importing data, multi-step forms). ",(0,t.jsx)(r.code,{children:"save_all"})," is significantly faster than calling ",(0,t.jsx)(r.code,{children:"r:save()"})," in a loop because the PDS writes happen concurrently."]})]})}function h(e={}){const{wrapper:r}={...(0,c.R)(),...e.components};return r?(0,t.jsx)(r,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},8453(e,r,n){n.d(r,{R:()=>a,x:()=>i});var s=n(6540);const t={},c=s.createContext(t);function a(e){const r=s.useContext(c);return s.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function i(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:a(e.components),s.createElement(c.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a51dfc20.1b4b1274.js b/assets/js/a51dfc20.1b4b1274.js new file mode 100644 index 0000000..4962d1b --- /dev/null +++ b/assets/js/a51dfc20.1b4b1274.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[8897],{4783(e,r,s){s.r(r),s.d(r,{assets:()=>o,contentTitle:()=>c,default:()=>h,frontMatter:()=>t,metadata:()=>n,toc:()=>l});const n=JSON.parse('{"id":"reference/xrpc-api","title":"XRPC API","description":"XRPC is the HTTP-based RPC protocol used by the AT Protocol. HappyView dynamically registers XRPC endpoints based on your uploaded lexicons: query lexicons become GET /xrpc/ routes, procedure lexicons become POST /xrpc/{nsid} routes.","source":"@site/docs/reference/xrpc-api.md","sourceDirName":"reference","slug":"/reference/xrpc-api","permalink":"/reference/xrpc-api","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Backfill","permalink":"/guides/backfill"},"next":{"title":"Admin API","permalink":"/reference/admin-api"}}');var i=s(4848),d=s(8453);const t={},c="XRPC API",o={},l=[{value:"Auth",id:"auth",level:2},{value:"Fixed endpoints",id:"fixed-endpoints",level:2},{value:"Health check",id:"health-check",level:3},{value:"Get profile",id:"get-profile",level:3},{value:"Upload blob",id:"upload-blob",level:3},{value:"Dynamic query endpoints",id:"dynamic-query-endpoints",level:2},{value:"Single record",id:"single-record",level:3},{value:"List records",id:"list-records",level:3},{value:"Dynamic procedure endpoints",id:"dynamic-procedure-endpoints",level:2},{value:"Create a record",id:"create-a-record",level:3},{value:"Update a record",id:"update-a-record",level:3},{value:"Errors",id:"errors",level:2},{value:"Lua script errors",id:"lua-script-errors",level:3},{value:"PDS errors",id:"pds-errors",level:3},{value:"Next steps",id:"next-steps",level:2}];function a(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,d.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.header,{children:(0,i.jsx)(r.h1,{id:"xrpc-api",children:"XRPC API"})}),"\n",(0,i.jsxs)(r.p,{children:[(0,i.jsx)(r.a,{href:"https://atproto.com/specs/xrpc",children:"XRPC"})," is the HTTP-based RPC protocol used by the AT Protocol. HappyView dynamically registers XRPC endpoints based on your uploaded ",(0,i.jsx)(r.a,{href:"/guides/lexicons",children:"lexicons"}),": query lexicons become ",(0,i.jsx)(r.code,{children:"GET /xrpc/{nsid}"})," routes, procedure lexicons become ",(0,i.jsx)(r.code,{children:"POST /xrpc/{nsid}"})," routes."]}),"\n",(0,i.jsxs)(r.p,{children:["If a query or procedure lexicon has a ",(0,i.jsx)(r.a,{href:"/guides/scripting",children:"Lua script"})," attached, the script handles the request. Otherwise, HappyView uses built-in default behavior (described below)."]}),"\n",(0,i.jsx)(r.h2,{id:"auth",children:"Auth"}),"\n",(0,i.jsxs)(r.ul,{children:["\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.strong,{children:"Queries"})," (",(0,i.jsx)(r.code,{children:"GET /xrpc/{method}"}),"): unauthenticated"]}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.strong,{children:"Procedures"})," (",(0,i.jsx)(r.code,{children:"POST /xrpc/{method}"}),"): require an AIP-issued ",(0,i.jsx)(r.code,{children:"Authorization: Bearer "})," header"]}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.strong,{children:"getProfile"}),": requires auth"]}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.strong,{children:"uploadBlob"}),": requires auth"]}),"\n"]}),"\n",(0,i.jsx)(r.h2,{id:"fixed-endpoints",children:"Fixed endpoints"}),"\n",(0,i.jsx)(r.p,{children:"These endpoints are always available regardless of which lexicons are loaded."}),"\n",(0,i.jsx)(r.h3,{id:"health-check",children:"Health check"}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{children:"GET /health\n"})}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-sh",children:"curl http://localhost:3000/health\n"})}),"\n",(0,i.jsxs)(r.p,{children:[(0,i.jsx)(r.strong,{children:"Response"}),": ",(0,i.jsx)(r.code,{children:"200 OK"})," with body ",(0,i.jsx)(r.code,{children:"ok"})]}),"\n",(0,i.jsx)(r.h3,{id:"get-profile",children:"Get profile"}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{children:"GET /xrpc/app.bsky.actor.getProfile\n"})}),"\n",(0,i.jsx)(r.p,{children:"Returns the authenticated user's profile, resolved from their PDS via PLC directory lookup."}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-sh",children:'curl http://localhost:3000/xrpc/app.bsky.actor.getProfile \\\n -H "Authorization: Bearer $TOKEN"\n'})}),"\n",(0,i.jsxs)(r.p,{children:[(0,i.jsx)(r.strong,{children:"Response"}),": ",(0,i.jsx)(r.code,{children:"200 OK"})]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-json",children:'{\n "did": "did:plc:abc123",\n "handle": "user.bsky.social",\n "displayName": "User Name",\n "description": "Bio text",\n "avatarURL": "https://pds.example.com/xrpc/com.atproto.sync.getBlob?did=did:plc:abc123&cid=bafyabc"\n}\n'})}),"\n",(0,i.jsx)(r.h3,{id:"upload-blob",children:"Upload blob"}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{children:"POST /xrpc/com.atproto.repo.uploadBlob\n"})}),"\n",(0,i.jsx)(r.p,{children:"Proxies a blob upload to the authenticated user's PDS. Maximum size: 50MB."}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/xrpc/com.atproto.repo.uploadBlob \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: image/png" \\\n --data-binary @image.png\n'})}),"\n",(0,i.jsxs)(r.p,{children:[(0,i.jsx)(r.strong,{children:"Response"}),": proxied from the user's PDS."]}),"\n",(0,i.jsx)(r.h2,{id:"dynamic-query-endpoints",children:"Dynamic query endpoints"}),"\n",(0,i.jsxs)(r.p,{children:["Query endpoints are generated from lexicons with ",(0,i.jsx)(r.code,{children:'type: "query"'}),". Without a ",(0,i.jsx)(r.a,{href:"/guides/scripting",children:"Lua script"}),", they support two built-in modes depending on whether a ",(0,i.jsx)(r.code,{children:"uri"})," parameter is provided."]}),"\n",(0,i.jsx)(r.h3,{id:"single-record",children:"Single record"}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{children:"GET /xrpc/{method}?uri={at-uri}\n"})}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-sh",children:'curl "http://localhost:3000/xrpc/xyz.statusphere.listStatuses?uri=at%3A%2F%2Fdid%3Aplc%3Aabc%2Fxyz.statusphere.status%2Fabc123"\n'})}),"\n",(0,i.jsxs)(r.p,{children:[(0,i.jsx)(r.strong,{children:"Response"}),": ",(0,i.jsx)(r.code,{children:"200 OK"})]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-json",children:'{\n "record": {\n "uri": "at://did:plc:abc/xyz.statusphere.status/abc123",\n "$type": "xyz.statusphere.status",\n "status": "\\ud83d\\ude0a",\n "createdAt": "2025-01-01T12:00:00Z"\n }\n}\n'})}),"\n",(0,i.jsxs)(r.p,{children:["Media blobs are automatically enriched with a ",(0,i.jsx)(r.code,{children:"url"})," field pointing to the user's PDS."]}),"\n",(0,i.jsx)(r.h3,{id:"list-records",children:"List records"}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{children:"GET /xrpc/{method}?limit=20&cursor=0&did=optional\n"})}),"\n",(0,i.jsxs)(r.table,{children:[(0,i.jsx)(r.thead,{children:(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.th,{children:"Param"}),(0,i.jsx)(r.th,{children:"Type"}),(0,i.jsx)(r.th,{children:"Default"}),(0,i.jsx)(r.th,{children:"Description"})]})}),(0,i.jsxs)(r.tbody,{children:[(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:(0,i.jsx)(r.code,{children:"limit"})}),(0,i.jsx)(r.td,{children:"integer"}),(0,i.jsx)(r.td,{children:"20"}),(0,i.jsx)(r.td,{children:"Max records to return (max 100)"})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:(0,i.jsx)(r.code,{children:"cursor"})}),(0,i.jsx)(r.td,{children:"string"}),(0,i.jsx)(r.td,{children:(0,i.jsx)(r.code,{children:"0"})}),(0,i.jsx)(r.td,{children:"Pagination cursor (opaque, pass from previous response)"})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:(0,i.jsx)(r.code,{children:"did"})}),(0,i.jsx)(r.td,{children:"string"}),(0,i.jsx)(r.td,{children:"---"}),(0,i.jsx)(r.td,{children:"Filter records by DID"})]})]})]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-sh",children:'curl "http://localhost:3000/xrpc/xyz.statusphere.listStatuses?limit=10&did=did:plc:abc"\n'})}),"\n",(0,i.jsxs)(r.p,{children:[(0,i.jsx)(r.strong,{children:"Response"}),": ",(0,i.jsx)(r.code,{children:"200 OK"})]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-json",children:'{\n "records": [\n {\n "uri": "at://did:plc:abc/xyz.statusphere.status/abc123",\n "status": "\\ud83d\\ude0a",\n "createdAt": "2025-01-01T12:00:00Z"\n }\n ],\n "cursor": "10"\n}\n'})}),"\n",(0,i.jsxs)(r.p,{children:["The ",(0,i.jsx)(r.code,{children:"cursor"})," field is present only when more records exist."]}),"\n",(0,i.jsx)(r.h2,{id:"dynamic-procedure-endpoints",children:"Dynamic procedure endpoints"}),"\n",(0,i.jsxs)(r.p,{children:["Procedure endpoints are generated from lexicons with ",(0,i.jsx)(r.code,{children:'type: "procedure"'}),". Without a ",(0,i.jsx)(r.a,{href:"/guides/scripting",children:"Lua script"}),", HappyView auto-detects create vs update based on whether the request body contains a ",(0,i.jsx)(r.code,{children:"uri"})," field."]}),"\n",(0,i.jsx)(r.h3,{id:"create-a-record",children:"Create a record"}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{children:"POST /xrpc/{method}\n"})}),"\n",(0,i.jsxs)(r.p,{children:["When the body does ",(0,i.jsx)(r.strong,{children:"not"})," contain a ",(0,i.jsx)(r.code,{children:"uri"})," field, a new record is created."]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/xrpc/xyz.statusphere.setStatus \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "status": "\\ud83d\\ude0a", "createdAt": "2025-01-01T12:00:00Z" }\'\n'})}),"\n",(0,i.jsxs)(r.p,{children:["HappyView proxies this to the user's PDS as ",(0,i.jsx)(r.code,{children:"com.atproto.repo.createRecord"}),", then indexes the created record locally."]}),"\n",(0,i.jsx)(r.h3,{id:"update-a-record",children:"Update a record"}),"\n",(0,i.jsxs)(r.p,{children:["When the body ",(0,i.jsx)(r.strong,{children:"contains"})," a ",(0,i.jsx)(r.code,{children:"uri"})," field, the existing record is updated."]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/xrpc/xyz.statusphere.setStatus \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "uri": "at://did:plc:abc/xyz.statusphere.status/abc123",\n "status": "\\ud83c\\udf1f",\n "createdAt": "2025-01-01T13:00:00Z"\n }\'\n'})}),"\n",(0,i.jsxs)(r.p,{children:["HappyView proxies this to the user's PDS as ",(0,i.jsx)(r.code,{children:"com.atproto.repo.putRecord"}),", then upserts the record locally."]}),"\n",(0,i.jsxs)(r.p,{children:[(0,i.jsx)(r.strong,{children:"Response"})," for both: proxied from the user's PDS."]}),"\n",(0,i.jsx)(r.h2,{id:"errors",children:"Errors"}),"\n",(0,i.jsxs)(r.p,{children:["All error responses return JSON with an ",(0,i.jsx)(r.code,{children:"error"})," field:"]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-json",children:'{\n "error": "description of what went wrong"\n}\n'})}),"\n",(0,i.jsxs)(r.table,{children:[(0,i.jsx)(r.thead,{children:(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.th,{children:"Status"}),(0,i.jsx)(r.th,{children:"Meaning"}),(0,i.jsx)(r.th,{children:"Common causes"})]})}),(0,i.jsxs)(r.tbody,{children:[(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:(0,i.jsx)(r.code,{children:"400 Bad Request"})}),(0,i.jsx)(r.td,{children:"Invalid input"}),(0,i.jsx)(r.td,{children:"Missing required fields, malformed JSON, invalid AT URI"})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:(0,i.jsx)(r.code,{children:"401 Unauthorized"})}),(0,i.jsx)(r.td,{children:"Authentication failed"}),(0,i.jsxs)(r.td,{children:["Missing or invalid Bearer token. See ",(0,i.jsx)(r.a,{href:"https://github.com/graze-social/aip",children:"AIP documentation"})," for token issues"]})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:(0,i.jsx)(r.code,{children:"404 Not Found"})}),(0,i.jsx)(r.td,{children:"Method or record not found"}),(0,i.jsx)(r.td,{children:"XRPC method has no matching lexicon, or the requested record doesn't exist"})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:(0,i.jsx)(r.code,{children:"500 Internal Server Error"})}),(0,i.jsx)(r.td,{children:"Server-side failure"}),(0,i.jsx)(r.td,{children:"Lua script error, database error, or upstream PDS failure"})]})]})]}),"\n",(0,i.jsx)(r.h3,{id:"lua-script-errors",children:"Lua script errors"}),"\n",(0,i.jsxs)(r.p,{children:["When a Lua script fails, the response is ",(0,i.jsx)(r.code,{children:"500"})," with one of:"]}),"\n",(0,i.jsxs)(r.ul,{children:["\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.code,{children:'{"error": "script execution failed"}'}),": syntax error, runtime error, or missing ",(0,i.jsx)(r.code,{children:"handle()"})," function"]}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.code,{children:'{"error": "script exceeded execution time limit"}'}),": the script hit the 1,000,000 instruction limit"]}),"\n"]}),"\n",(0,i.jsxs)(r.p,{children:["The full error details are logged server-side but not exposed to the client. See ",(0,i.jsx)(r.a,{href:"/guides/scripting#debugging",children:"Lua Scripting - Debugging"})," for how to diagnose script issues."]}),"\n",(0,i.jsx)(r.h3,{id:"pds-errors",children:"PDS errors"}),"\n",(0,i.jsx)(r.p,{children:"When a procedure proxies a write to the user's PDS and the PDS returns an error, HappyView forwards the PDS response status code and body directly to the client."}),"\n",(0,i.jsx)(r.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,i.jsxs)(r.ul,{children:["\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.a,{href:"/guides/scripting",children:"Lua Scripting"}),": Override the default query and procedure behavior with custom logic"]}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.a,{href:"/guides/lexicons",children:"Lexicons"}),": Understand how lexicons generate these endpoints"]}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.a,{href:"/reference/admin-api",children:"Admin API"}),": Manage lexicons and monitor your instance"]}),"\n"]})]})}function h(e={}){const{wrapper:r}={...(0,d.R)(),...e.components};return r?(0,i.jsx)(r,{...e,children:(0,i.jsx)(a,{...e})}):a(e)}},8453(e,r,s){s.d(r,{R:()=>t,x:()=>c});var n=s(6540);const i={},d=n.createContext(i);function t(e){const r=n.useContext(d);return n.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function c(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:t(e.components),n.createElement(d.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a51dfc20.8380324d.js b/assets/js/a51dfc20.8380324d.js deleted file mode 100644 index 6587008..0000000 --- a/assets/js/a51dfc20.8380324d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[8897],{4783(e,r,s){s.r(r),s.d(r,{assets:()=>o,contentTitle:()=>c,default:()=>h,frontMatter:()=>t,metadata:()=>n,toc:()=>l});const n=JSON.parse('{"id":"reference/xrpc-api","title":"XRPC API","description":"XRPC is the HTTP-based RPC protocol used by the AT Protocol. HappyView dynamically registers XRPC endpoints based on your uploaded lexicons: query lexicons become GET /xrpc/ routes, procedure lexicons become POST /xrpc/{nsid} routes.","source":"@site/docs/reference/xrpc-api.md","sourceDirName":"reference","slug":"/reference/xrpc-api","permalink":"/reference/xrpc-api","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Backfill","permalink":"/guides/backfill"},"next":{"title":"Admin API","permalink":"/reference/admin-api"}}');var i=s(4848),d=s(8453);const t={},c="XRPC API",o={},l=[{value:"Auth",id:"auth",level:2},{value:"Fixed endpoints",id:"fixed-endpoints",level:2},{value:"Health check",id:"health-check",level:3},{value:"Get profile",id:"get-profile",level:3},{value:"Upload blob",id:"upload-blob",level:3},{value:"Dynamic query endpoints",id:"dynamic-query-endpoints",level:2},{value:"Single record",id:"single-record",level:3},{value:"List records",id:"list-records",level:3},{value:"Dynamic procedure endpoints",id:"dynamic-procedure-endpoints",level:2},{value:"Create a record",id:"create-a-record",level:3},{value:"Update a record",id:"update-a-record",level:3},{value:"Errors",id:"errors",level:2},{value:"Lua script errors",id:"lua-script-errors",level:3},{value:"PDS errors",id:"pds-errors",level:3},{value:"Next steps",id:"next-steps",level:2}];function a(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,d.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.header,{children:(0,i.jsx)(r.h1,{id:"xrpc-api",children:"XRPC API"})}),"\n",(0,i.jsxs)(r.p,{children:[(0,i.jsx)(r.a,{href:"https://atproto.com/specs/xrpc",children:"XRPC"})," is the HTTP-based RPC protocol used by the AT Protocol. HappyView dynamically registers XRPC endpoints based on your uploaded ",(0,i.jsx)(r.a,{href:"../guides/lexicons",children:"lexicons"}),": query lexicons become ",(0,i.jsx)(r.code,{children:"GET /xrpc/{nsid}"})," routes, procedure lexicons become ",(0,i.jsx)(r.code,{children:"POST /xrpc/{nsid}"})," routes."]}),"\n",(0,i.jsxs)(r.p,{children:["If a query or procedure lexicon has a ",(0,i.jsx)(r.a,{href:"../guides/scripting",children:"Lua script"})," attached, the script handles the request. Otherwise, HappyView uses built-in default behavior (described below)."]}),"\n",(0,i.jsx)(r.h2,{id:"auth",children:"Auth"}),"\n",(0,i.jsxs)(r.ul,{children:["\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.strong,{children:"Queries"})," (",(0,i.jsx)(r.code,{children:"GET /xrpc/{method}"}),"): unauthenticated"]}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.strong,{children:"Procedures"})," (",(0,i.jsx)(r.code,{children:"POST /xrpc/{method}"}),"): require an AIP-issued ",(0,i.jsx)(r.code,{children:"Authorization: Bearer "})," header"]}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.strong,{children:"getProfile"}),": requires auth"]}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.strong,{children:"uploadBlob"}),": requires auth"]}),"\n"]}),"\n",(0,i.jsx)(r.h2,{id:"fixed-endpoints",children:"Fixed endpoints"}),"\n",(0,i.jsx)(r.p,{children:"These endpoints are always available regardless of which lexicons are loaded."}),"\n",(0,i.jsx)(r.h3,{id:"health-check",children:"Health check"}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{children:"GET /health\n"})}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-sh",children:"curl http://localhost:3000/health\n"})}),"\n",(0,i.jsxs)(r.p,{children:[(0,i.jsx)(r.strong,{children:"Response"}),": ",(0,i.jsx)(r.code,{children:"200 OK"})," with body ",(0,i.jsx)(r.code,{children:"ok"})]}),"\n",(0,i.jsx)(r.h3,{id:"get-profile",children:"Get profile"}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{children:"GET /xrpc/app.bsky.actor.getProfile\n"})}),"\n",(0,i.jsx)(r.p,{children:"Returns the authenticated user's profile, resolved from their PDS via PLC directory lookup."}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-sh",children:'curl http://localhost:3000/xrpc/app.bsky.actor.getProfile \\\n -H "Authorization: Bearer $TOKEN"\n'})}),"\n",(0,i.jsxs)(r.p,{children:[(0,i.jsx)(r.strong,{children:"Response"}),": ",(0,i.jsx)(r.code,{children:"200 OK"})]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-json",children:'{\n "did": "did:plc:abc123",\n "handle": "user.bsky.social",\n "displayName": "User Name",\n "description": "Bio text",\n "avatarURL": "https://pds.example.com/xrpc/com.atproto.sync.getBlob?did=did:plc:abc123&cid=bafyabc"\n}\n'})}),"\n",(0,i.jsx)(r.h3,{id:"upload-blob",children:"Upload blob"}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{children:"POST /xrpc/com.atproto.repo.uploadBlob\n"})}),"\n",(0,i.jsx)(r.p,{children:"Proxies a blob upload to the authenticated user's PDS. Maximum size: 50MB."}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/xrpc/com.atproto.repo.uploadBlob \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: image/png" \\\n --data-binary @image.png\n'})}),"\n",(0,i.jsxs)(r.p,{children:[(0,i.jsx)(r.strong,{children:"Response"}),": proxied from the user's PDS."]}),"\n",(0,i.jsx)(r.h2,{id:"dynamic-query-endpoints",children:"Dynamic query endpoints"}),"\n",(0,i.jsxs)(r.p,{children:["Query endpoints are generated from lexicons with ",(0,i.jsx)(r.code,{children:'type: "query"'}),". Without a ",(0,i.jsx)(r.a,{href:"../guides/scripting",children:"Lua script"}),", they support two built-in modes depending on whether a ",(0,i.jsx)(r.code,{children:"uri"})," parameter is provided."]}),"\n",(0,i.jsx)(r.h3,{id:"single-record",children:"Single record"}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{children:"GET /xrpc/{method}?uri={at-uri}\n"})}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-sh",children:'curl "http://localhost:3000/xrpc/xyz.statusphere.listStatuses?uri=at%3A%2F%2Fdid%3Aplc%3Aabc%2Fxyz.statusphere.status%2Fabc123"\n'})}),"\n",(0,i.jsxs)(r.p,{children:[(0,i.jsx)(r.strong,{children:"Response"}),": ",(0,i.jsx)(r.code,{children:"200 OK"})]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-json",children:'{\n "record": {\n "uri": "at://did:plc:abc/xyz.statusphere.status/abc123",\n "$type": "xyz.statusphere.status",\n "status": "\\ud83d\\ude0a",\n "createdAt": "2025-01-01T12:00:00Z"\n }\n}\n'})}),"\n",(0,i.jsxs)(r.p,{children:["Media blobs are automatically enriched with a ",(0,i.jsx)(r.code,{children:"url"})," field pointing to the user's PDS."]}),"\n",(0,i.jsx)(r.h3,{id:"list-records",children:"List records"}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{children:"GET /xrpc/{method}?limit=20&cursor=0&did=optional\n"})}),"\n",(0,i.jsxs)(r.table,{children:[(0,i.jsx)(r.thead,{children:(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.th,{children:"Param"}),(0,i.jsx)(r.th,{children:"Type"}),(0,i.jsx)(r.th,{children:"Default"}),(0,i.jsx)(r.th,{children:"Description"})]})}),(0,i.jsxs)(r.tbody,{children:[(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:(0,i.jsx)(r.code,{children:"limit"})}),(0,i.jsx)(r.td,{children:"integer"}),(0,i.jsx)(r.td,{children:"20"}),(0,i.jsx)(r.td,{children:"Max records to return (max 100)"})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:(0,i.jsx)(r.code,{children:"cursor"})}),(0,i.jsx)(r.td,{children:"string"}),(0,i.jsx)(r.td,{children:(0,i.jsx)(r.code,{children:"0"})}),(0,i.jsx)(r.td,{children:"Pagination cursor (opaque, pass from previous response)"})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:(0,i.jsx)(r.code,{children:"did"})}),(0,i.jsx)(r.td,{children:"string"}),(0,i.jsx)(r.td,{children:"---"}),(0,i.jsx)(r.td,{children:"Filter records by DID"})]})]})]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-sh",children:'curl "http://localhost:3000/xrpc/xyz.statusphere.listStatuses?limit=10&did=did:plc:abc"\n'})}),"\n",(0,i.jsxs)(r.p,{children:[(0,i.jsx)(r.strong,{children:"Response"}),": ",(0,i.jsx)(r.code,{children:"200 OK"})]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-json",children:'{\n "records": [\n {\n "uri": "at://did:plc:abc/xyz.statusphere.status/abc123",\n "status": "\\ud83d\\ude0a",\n "createdAt": "2025-01-01T12:00:00Z"\n }\n ],\n "cursor": "10"\n}\n'})}),"\n",(0,i.jsxs)(r.p,{children:["The ",(0,i.jsx)(r.code,{children:"cursor"})," field is present only when more records exist."]}),"\n",(0,i.jsx)(r.h2,{id:"dynamic-procedure-endpoints",children:"Dynamic procedure endpoints"}),"\n",(0,i.jsxs)(r.p,{children:["Procedure endpoints are generated from lexicons with ",(0,i.jsx)(r.code,{children:'type: "procedure"'}),". Without a ",(0,i.jsx)(r.a,{href:"../guides/scripting",children:"Lua script"}),", HappyView auto-detects create vs update based on whether the request body contains a ",(0,i.jsx)(r.code,{children:"uri"})," field."]}),"\n",(0,i.jsx)(r.h3,{id:"create-a-record",children:"Create a record"}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{children:"POST /xrpc/{method}\n"})}),"\n",(0,i.jsxs)(r.p,{children:["When the body does ",(0,i.jsx)(r.strong,{children:"not"})," contain a ",(0,i.jsx)(r.code,{children:"uri"})," field, a new record is created."]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/xrpc/xyz.statusphere.setStatus \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "status": "\\ud83d\\ude0a", "createdAt": "2025-01-01T12:00:00Z" }\'\n'})}),"\n",(0,i.jsxs)(r.p,{children:["HappyView proxies this to the user's PDS as ",(0,i.jsx)(r.code,{children:"com.atproto.repo.createRecord"}),", then indexes the created record locally."]}),"\n",(0,i.jsx)(r.h3,{id:"update-a-record",children:"Update a record"}),"\n",(0,i.jsxs)(r.p,{children:["When the body ",(0,i.jsx)(r.strong,{children:"contains"})," a ",(0,i.jsx)(r.code,{children:"uri"})," field, the existing record is updated."]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/xrpc/xyz.statusphere.setStatus \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "uri": "at://did:plc:abc/xyz.statusphere.status/abc123",\n "status": "\\ud83c\\udf1f",\n "createdAt": "2025-01-01T13:00:00Z"\n }\'\n'})}),"\n",(0,i.jsxs)(r.p,{children:["HappyView proxies this to the user's PDS as ",(0,i.jsx)(r.code,{children:"com.atproto.repo.putRecord"}),", then upserts the record locally."]}),"\n",(0,i.jsxs)(r.p,{children:[(0,i.jsx)(r.strong,{children:"Response"})," for both: proxied from the user's PDS."]}),"\n",(0,i.jsx)(r.h2,{id:"errors",children:"Errors"}),"\n",(0,i.jsxs)(r.p,{children:["All error responses return JSON with an ",(0,i.jsx)(r.code,{children:"error"})," field:"]}),"\n",(0,i.jsx)(r.pre,{children:(0,i.jsx)(r.code,{className:"language-json",children:'{\n "error": "description of what went wrong"\n}\n'})}),"\n",(0,i.jsxs)(r.table,{children:[(0,i.jsx)(r.thead,{children:(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.th,{children:"Status"}),(0,i.jsx)(r.th,{children:"Meaning"}),(0,i.jsx)(r.th,{children:"Common causes"})]})}),(0,i.jsxs)(r.tbody,{children:[(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:(0,i.jsx)(r.code,{children:"400 Bad Request"})}),(0,i.jsx)(r.td,{children:"Invalid input"}),(0,i.jsx)(r.td,{children:"Missing required fields, malformed JSON, invalid AT URI"})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:(0,i.jsx)(r.code,{children:"401 Unauthorized"})}),(0,i.jsx)(r.td,{children:"Authentication failed"}),(0,i.jsxs)(r.td,{children:["Missing or invalid Bearer token. See ",(0,i.jsx)(r.a,{href:"https://github.com/graze-social/aip",children:"AIP documentation"})," for token issues"]})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:(0,i.jsx)(r.code,{children:"404 Not Found"})}),(0,i.jsx)(r.td,{children:"Method or record not found"}),(0,i.jsx)(r.td,{children:"XRPC method has no matching lexicon, or the requested record doesn't exist"})]}),(0,i.jsxs)(r.tr,{children:[(0,i.jsx)(r.td,{children:(0,i.jsx)(r.code,{children:"500 Internal Server Error"})}),(0,i.jsx)(r.td,{children:"Server-side failure"}),(0,i.jsx)(r.td,{children:"Lua script error, database error, or upstream PDS failure"})]})]})]}),"\n",(0,i.jsx)(r.h3,{id:"lua-script-errors",children:"Lua script errors"}),"\n",(0,i.jsxs)(r.p,{children:["When a Lua script fails, the response is ",(0,i.jsx)(r.code,{children:"500"})," with one of:"]}),"\n",(0,i.jsxs)(r.ul,{children:["\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.code,{children:'{"error": "script execution failed"}'}),": syntax error, runtime error, or missing ",(0,i.jsx)(r.code,{children:"handle()"})," function"]}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.code,{children:'{"error": "script exceeded execution time limit"}'}),": the script hit the 1,000,000 instruction limit"]}),"\n"]}),"\n",(0,i.jsxs)(r.p,{children:["The full error details are logged server-side but not exposed to the client. See ",(0,i.jsx)(r.a,{href:"../guides/scripting#debugging",children:"Lua Scripting - Debugging"})," for how to diagnose script issues."]}),"\n",(0,i.jsx)(r.h3,{id:"pds-errors",children:"PDS errors"}),"\n",(0,i.jsx)(r.p,{children:"When a procedure proxies a write to the user's PDS and the PDS returns an error, HappyView forwards the PDS response status code and body directly to the client."}),"\n",(0,i.jsx)(r.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,i.jsxs)(r.ul,{children:["\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.a,{href:"../guides/scripting",children:"Lua Scripting"}),": Override the default query and procedure behavior with custom logic"]}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.a,{href:"../guides/lexicons",children:"Lexicons"}),": Understand how lexicons generate these endpoints"]}),"\n",(0,i.jsxs)(r.li,{children:[(0,i.jsx)(r.a,{href:"admin-api",children:"Admin API"}),": Manage lexicons and monitor your instance"]}),"\n"]})]})}function h(e={}){const{wrapper:r}={...(0,d.R)(),...e.components};return r?(0,i.jsx)(r,{...e,children:(0,i.jsx)(a,{...e})}):a(e)}},8453(e,r,s){s.d(r,{R:()=>t,x:()=>c});var n=s(6540);const i={},d=n.createContext(i);function t(e){const r=n.useContext(d);return n.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function c(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:t(e.components),n.createElement(d.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a77ba7fa.be66bc37.js b/assets/js/a77ba7fa.be66bc37.js new file mode 100644 index 0000000..ef5a7f7 --- /dev/null +++ b/assets/js/a77ba7fa.be66bc37.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[6087],{6494(e,t,n){n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>a,default:()=>l,frontMatter:()=>o,metadata:()=>i,toc:()=>h});const i=JSON.parse('{"id":"getting-started/authentication","title":"Authentication","description":"HappyView uses AT Protocol OAuth for authentication, handled by an external AIP instance. HappyView does not store credentials or issue tokens: all OAuth is delegated to AIP.","source":"@site/docs/getting-started/authentication.md","sourceDirName":"getting-started","slug":"/getting-started/authentication","permalink":"/getting-started/authentication","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Other","permalink":"/getting-started/deployment/other"},"next":{"title":"Configuration","permalink":"/getting-started/configuration"}}');var s=n(4848),r=n(8453);const o={},a="Authentication",d={},h=[{value:"Which endpoints require auth?",id:"which-endpoints-require-auth",level:2},{value:"Getting a token from the dashboard",id:"getting-a-token-from-the-dashboard",level:2},{value:"Programmatic access",id:"programmatic-access",level:2},{value:"How token validation works",id:"how-token-validation-works",level:2},{value:"Admin access",id:"admin-access",level:2}];function c(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.header,{children:(0,s.jsx)(t.h1,{id:"authentication",children:"Authentication"})}),"\n",(0,s.jsxs)(t.p,{children:["HappyView uses ",(0,s.jsx)(t.a,{href:"https://atproto.com/specs/oauth",children:"AT Protocol OAuth"})," for authentication, handled by an external ",(0,s.jsx)(t.a,{href:"https://github.com/graze-social/aip",children:"AIP"})," instance. HappyView does not store credentials or issue tokens: all OAuth is delegated to AIP."]}),"\n",(0,s.jsx)(t.h2,{id:"which-endpoints-require-auth",children:"Which endpoints require auth?"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Endpoint type"}),(0,s.jsx)(t.th,{children:"Auth required?"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsxs)(t.td,{children:["Queries (",(0,s.jsx)(t.code,{children:"GET /xrpc/{method}"}),")"]}),(0,s.jsx)(t.td,{children:"No"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsxs)(t.td,{children:["Procedures (",(0,s.jsx)(t.code,{children:"POST /xrpc/{method}"}),")"]}),(0,s.jsx)(t.td,{children:"Yes"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsxs)(t.td,{children:["Admin API (",(0,s.jsx)(t.code,{children:"/admin/*"}),")"]}),(0,s.jsx)(t.td,{children:"Yes (must be an admin)"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsxs)(t.td,{children:["Health check (",(0,s.jsx)(t.code,{children:"GET /health"}),")"]}),(0,s.jsx)(t.td,{children:"No"})]})]})]}),"\n",(0,s.jsxs)(t.p,{children:["Authenticated requests must include an ",(0,s.jsx)(t.code,{children:"Authorization"})," header with a token issued by AIP:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{children:"Authorization: Bearer \n"})}),"\n",(0,s.jsx)(t.h2,{id:"getting-a-token-from-the-dashboard",children:"Getting a token from the dashboard"}),"\n",(0,s.jsxs)(t.p,{children:["The easiest way to get a token for CLI or curl usage is through the ",(0,s.jsx)(t.a,{href:"/getting-started/dashboard",children:"web dashboard"}),":"]}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsx)(t.li,{children:"Open the dashboard and log in with your AT Protocol identity"}),"\n",(0,s.jsx)(t.li,{children:"Open your browser's developer tools (F12 or Cmd+Shift+I)"}),"\n",(0,s.jsxs)(t.li,{children:["Go to ",(0,s.jsx)(t.strong,{children:"Application"})," (Chrome) or ",(0,s.jsx)(t.strong,{children:"Storage"})," (Firefox) > ",(0,s.jsx)(t.strong,{children:"Session Storage"})]}),"\n",(0,s.jsx)(t.li,{children:"Find the entry for your dashboard's URL"}),"\n",(0,s.jsxs)(t.li,{children:["Copy the value of the ",(0,s.jsx)(t.code,{children:"session"})," key: this contains your access token"]}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:"You can then use it in curl:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:'export TOKEN="your-token-here"\ncurl http://localhost:3000/admin/lexicons \\\n -H "Authorization: Bearer $TOKEN"\n'})}),"\n",(0,s.jsx)(t.p,{children:"Tokens expire based on AIP's configuration. When a token expires, log in again through the dashboard to get a new one."}),"\n",(0,s.jsx)(t.h2,{id:"programmatic-access",children:"Programmatic access"}),"\n",(0,s.jsx)(t.p,{children:"For scripts or applications that need to authenticate programmatically, you'll need to implement the AT Protocol OAuth flow against your AIP instance. This involves:"}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsx)(t.li,{children:"Registering an OAuth client with AIP"}),"\n",(0,s.jsx)(t.li,{children:"Redirecting the user to AIP's authorization endpoint"}),"\n",(0,s.jsx)(t.li,{children:"Exchanging the authorization code for an access token"}),"\n",(0,s.jsx)(t.li,{children:"Using that token with HappyView"}),"\n"]}),"\n",(0,s.jsxs)(t.p,{children:["See the ",(0,s.jsx)(t.a,{href:"https://github.com/graze-social/aip",children:"AIP documentation"})," for endpoint details and the ",(0,s.jsx)(t.a,{href:"https://atproto.com/specs/oauth",children:"ATProto OAuth spec"})," for the full protocol."]}),"\n",(0,s.jsx)(t.h2,{id:"how-token-validation-works",children:"How token validation works"}),"\n",(0,s.jsxs)(t.p,{children:["When HappyView receives an authenticated request, it forwards the token to AIP's ",(0,s.jsx)(t.code,{children:"/oauth/userinfo"})," endpoint. AIP responds with the user's DID, which HappyView uses to:"]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Identify who is making the request"}),"\n",(0,s.jsx)(t.li,{children:"Proxy writes to the correct PDS"}),"\n",(0,s.jsx)(t.li,{children:"Check admin permissions (for admin endpoints)"}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:"Token validation happens on every request; there is no local token caching."}),"\n",(0,s.jsx)(t.h2,{id:"admin-access",children:"Admin access"}),"\n",(0,s.jsxs)(t.p,{children:["Admin endpoints require the authenticated user's DID to exist in the ",(0,s.jsx)(t.code,{children:"admins"})," table. If the table is empty (fresh deployment), the first authenticated request to any admin endpoint auto-bootstraps that user as the initial admin."]}),"\n",(0,s.jsxs)(t.p,{children:["To add more admins, use ",(0,s.jsx)(t.code,{children:"POST /admin/admins"})," or the ",(0,s.jsx)(t.a,{href:"/getting-started/dashboard",children:"dashboard"}),". See ",(0,s.jsx)(t.a,{href:"/reference/admin-api#admin-management",children:"Admin API"})," for details."]})]})}function l(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},8453(e,t,n){n.d(t,{R:()=>o,x:()=>a});var i=n(6540);const s={},r=i.createContext(s);function o(e){const t=i.useContext(r);return i.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),i.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a77ba7fa.fdd32ab6.js b/assets/js/a77ba7fa.fdd32ab6.js deleted file mode 100644 index 7b5c5c0..0000000 --- a/assets/js/a77ba7fa.fdd32ab6.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[6087],{6494(e,t,n){n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>a,default:()=>l,frontMatter:()=>o,metadata:()=>i,toc:()=>h});const i=JSON.parse('{"id":"getting-started/authentication","title":"Authentication","description":"HappyView uses AT Protocol OAuth for authentication, handled by an external AIP instance. HappyView does not store credentials or issue tokens: all OAuth is delegated to AIP.","source":"@site/docs/getting-started/authentication.md","sourceDirName":"getting-started","slug":"/getting-started/authentication","permalink":"/getting-started/authentication","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Other","permalink":"/getting-started/deployment/other"},"next":{"title":"Configuration","permalink":"/getting-started/configuration"}}');var s=n(4848),r=n(8453);const o={},a="Authentication",d={},h=[{value:"Which endpoints require auth?",id:"which-endpoints-require-auth",level:2},{value:"Getting a token from the dashboard",id:"getting-a-token-from-the-dashboard",level:2},{value:"Programmatic access",id:"programmatic-access",level:2},{value:"How token validation works",id:"how-token-validation-works",level:2},{value:"Admin access",id:"admin-access",level:2}];function c(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.header,{children:(0,s.jsx)(t.h1,{id:"authentication",children:"Authentication"})}),"\n",(0,s.jsxs)(t.p,{children:["HappyView uses ",(0,s.jsx)(t.a,{href:"https://atproto.com/specs/oauth",children:"AT Protocol OAuth"})," for authentication, handled by an external ",(0,s.jsx)(t.a,{href:"https://github.com/graze-social/aip",children:"AIP"})," instance. HappyView does not store credentials or issue tokens: all OAuth is delegated to AIP."]}),"\n",(0,s.jsx)(t.h2,{id:"which-endpoints-require-auth",children:"Which endpoints require auth?"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Endpoint type"}),(0,s.jsx)(t.th,{children:"Auth required?"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsxs)(t.td,{children:["Queries (",(0,s.jsx)(t.code,{children:"GET /xrpc/{method}"}),")"]}),(0,s.jsx)(t.td,{children:"No"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsxs)(t.td,{children:["Procedures (",(0,s.jsx)(t.code,{children:"POST /xrpc/{method}"}),")"]}),(0,s.jsx)(t.td,{children:"Yes"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsxs)(t.td,{children:["Admin API (",(0,s.jsx)(t.code,{children:"/admin/*"}),")"]}),(0,s.jsx)(t.td,{children:"Yes (must be an admin)"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsxs)(t.td,{children:["Health check (",(0,s.jsx)(t.code,{children:"GET /health"}),")"]}),(0,s.jsx)(t.td,{children:"No"})]})]})]}),"\n",(0,s.jsxs)(t.p,{children:["Authenticated requests must include an ",(0,s.jsx)(t.code,{children:"Authorization"})," header with a token issued by AIP:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{children:"Authorization: Bearer \n"})}),"\n",(0,s.jsx)(t.h2,{id:"getting-a-token-from-the-dashboard",children:"Getting a token from the dashboard"}),"\n",(0,s.jsxs)(t.p,{children:["The easiest way to get a token for CLI or curl usage is through the ",(0,s.jsx)(t.a,{href:"dashboard",children:"web dashboard"}),":"]}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsx)(t.li,{children:"Open the dashboard and log in with your AT Protocol identity"}),"\n",(0,s.jsx)(t.li,{children:"Open your browser's developer tools (F12 or Cmd+Shift+I)"}),"\n",(0,s.jsxs)(t.li,{children:["Go to ",(0,s.jsx)(t.strong,{children:"Application"})," (Chrome) or ",(0,s.jsx)(t.strong,{children:"Storage"})," (Firefox) > ",(0,s.jsx)(t.strong,{children:"Session Storage"})]}),"\n",(0,s.jsx)(t.li,{children:"Find the entry for your dashboard's URL"}),"\n",(0,s.jsxs)(t.li,{children:["Copy the value of the ",(0,s.jsx)(t.code,{children:"session"})," key: this contains your access token"]}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:"You can then use it in curl:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:'export TOKEN="your-token-here"\ncurl http://localhost:3000/admin/lexicons \\\n -H "Authorization: Bearer $TOKEN"\n'})}),"\n",(0,s.jsx)(t.p,{children:"Tokens expire based on AIP's configuration. When a token expires, log in again through the dashboard to get a new one."}),"\n",(0,s.jsx)(t.h2,{id:"programmatic-access",children:"Programmatic access"}),"\n",(0,s.jsx)(t.p,{children:"For scripts or applications that need to authenticate programmatically, you'll need to implement the AT Protocol OAuth flow against your AIP instance. This involves:"}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsx)(t.li,{children:"Registering an OAuth client with AIP"}),"\n",(0,s.jsx)(t.li,{children:"Redirecting the user to AIP's authorization endpoint"}),"\n",(0,s.jsx)(t.li,{children:"Exchanging the authorization code for an access token"}),"\n",(0,s.jsx)(t.li,{children:"Using that token with HappyView"}),"\n"]}),"\n",(0,s.jsxs)(t.p,{children:["See the ",(0,s.jsx)(t.a,{href:"https://github.com/graze-social/aip",children:"AIP documentation"})," for endpoint details and the ",(0,s.jsx)(t.a,{href:"https://atproto.com/specs/oauth",children:"ATProto OAuth spec"})," for the full protocol."]}),"\n",(0,s.jsx)(t.h2,{id:"how-token-validation-works",children:"How token validation works"}),"\n",(0,s.jsxs)(t.p,{children:["When HappyView receives an authenticated request, it forwards the token to AIP's ",(0,s.jsx)(t.code,{children:"/oauth/userinfo"})," endpoint. AIP responds with the user's DID, which HappyView uses to:"]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Identify who is making the request"}),"\n",(0,s.jsx)(t.li,{children:"Proxy writes to the correct PDS"}),"\n",(0,s.jsx)(t.li,{children:"Check admin permissions (for admin endpoints)"}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:"Token validation happens on every request; there is no local token caching."}),"\n",(0,s.jsx)(t.h2,{id:"admin-access",children:"Admin access"}),"\n",(0,s.jsxs)(t.p,{children:["Admin endpoints require the authenticated user's DID to exist in the ",(0,s.jsx)(t.code,{children:"admins"})," table. If the table is empty (fresh deployment), the first authenticated request to any admin endpoint auto-bootstraps that user as the initial admin."]}),"\n",(0,s.jsxs)(t.p,{children:["To add more admins, use ",(0,s.jsx)(t.code,{children:"POST /admin/admins"})," or the ",(0,s.jsx)(t.a,{href:"dashboard",children:"dashboard"}),". See ",(0,s.jsx)(t.a,{href:"../reference/admin-api#admin-management",children:"Admin API"})," for details."]})]})}function l(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},8453(e,t,n){n.d(t,{R:()=>o,x:()=>a});var i=n(6540);const s={},r=i.createContext(s);function o(e){const t=i.useContext(r);return i.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),i.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b27c7406.d8754146.js b/assets/js/b27c7406.d8754146.js new file mode 100644 index 0000000..00b32e8 --- /dev/null +++ b/assets/js/b27c7406.d8754146.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[2618],{537(e,t,n){n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>h,frontMatter:()=>i,metadata:()=>r,toc:()=>c});const r=JSON.parse('{"id":"getting-started/deployment/other","title":"Local Development from Source","description":"This guide runs HappyView directly with cargo run, with you managing Postgres, AIP, and Tap separately. If you\'d rather use Docker Compose to run everything together, see Local Development with Docker.","source":"@site/docs/getting-started/deployment/other.md","sourceDirName":"getting-started/deployment","slug":"/getting-started/deployment/other","permalink":"/getting-started/deployment/other","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Docker","permalink":"/getting-started/deployment/docker"},"next":{"title":"Authentication","permalink":"/getting-started/authentication"}}');var s=n(4848),a=n(8453);const i={},o="Local Development from Source",l={},c=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"1. Clone and configure",id:"1-clone-and-configure",level:2},{value:"2. Create the database",id:"2-create-the-database",level:2},{value:"3. Start HappyView",id:"3-start-happyview",level:2},{value:"Next steps",id:"next-steps",level:2}];function d(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.header,{children:(0,s.jsx)(t.h1,{id:"local-development-from-source",children:"Local Development from Source"})}),"\n",(0,s.jsxs)(t.p,{children:["This guide runs HappyView directly with ",(0,s.jsx)(t.code,{children:"cargo run"}),", with you managing Postgres, AIP, and Tap separately. If you'd rather use Docker Compose to run everything together, see ",(0,s.jsx)(t.a,{href:"/getting-started/deployment/docker",children:"Local Development with Docker"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Rust (stable)"}),"\n",(0,s.jsx)(t.li,{children:"PostgreSQL 17+"}),"\n",(0,s.jsxs)(t.li,{children:["A running ",(0,s.jsx)(t.a,{href:"https://github.com/graze-social/aip",children:"AIP"})," instance (handles OAuth). See the ",(0,s.jsx)(t.a,{href:"https://github.com/graze-social/aip",children:"AIP documentation"})," for setup."]}),"\n",(0,s.jsxs)(t.li,{children:["A running ",(0,s.jsx)(t.a,{href:"https://github.com/bluesky-social/indigo/tree/main/cmd/tap",children:"Tap"})," instance (delivers real-time records and handles backfill). See the ",(0,s.jsx)(t.a,{href:"https://github.com/bluesky-social/indigo/tree/main/cmd/tap",children:"Tap documentation"})," for setup."]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"1-clone-and-configure",children:"1. Clone and configure"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:"git clone https://github.com/graze-social/happyview.git\ncd happyview\ncp .env.example .env\n"})}),"\n",(0,s.jsxs)(t.p,{children:["Edit ",(0,s.jsx)(t.code,{children:".env"})," to point at your running services:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:"DATABASE_URL=postgres://happyview:happyview@localhost/happyview\nAIP_URL=http://localhost:8080\nTAP_URL=http://localhost:2480\nTAP_ADMIN_PASSWORD=your-secret-here\n"})}),"\n",(0,s.jsxs)(t.p,{children:["See ",(0,s.jsx)(t.a,{href:"/getting-started/configuration",children:"Configuration"})," for all available variables."]}),"\n",(0,s.jsx)(t.h2,{id:"2-create-the-database",children:"2. Create the database"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:"createdb happyview\n"})}),"\n",(0,s.jsx)(t.p,{children:"Or if using a Postgres user with a password:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:'psql -c "CREATE DATABASE happyview;" -U postgres\n'})}),"\n",(0,s.jsx)(t.p,{children:"HappyView runs migrations automatically on startup, so no manual migration step is needed."}),"\n",(0,s.jsx)(t.h2,{id:"3-start-happyview",children:"3. Start HappyView"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:"cargo run\n"})}),"\n",(0,s.jsxs)(t.p,{children:["HappyView starts on port 3000 (configurable via the ",(0,s.jsx)(t.code,{children:"PORT"})," environment variable)."]}),"\n",(0,s.jsx)(t.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,s.jsxs)(t.p,{children:["Your HappyView instance is running. Follow the ",(0,s.jsx)(t.a,{href:"/tutorials/statusphere",children:"Statusphere tutorial"})," to upload lexicons, add custom query logic, and start indexing records from the network."]})]})}function h(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453(e,t,n){n.d(t,{R:()=>i,x:()=>o});var r=n(6540);const s={},a=r.createContext(s);function i(e){const t=r.useContext(a);return r.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),r.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b27c7406.eeaa6157.js b/assets/js/b27c7406.eeaa6157.js deleted file mode 100644 index e331c49..0000000 --- a/assets/js/b27c7406.eeaa6157.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[2618],{537(e,t,n){n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>h,frontMatter:()=>i,metadata:()=>r,toc:()=>c});const r=JSON.parse('{"id":"getting-started/deployment/other","title":"Local Development from Source","description":"This guide runs HappyView directly with cargo run, with you managing Postgres, AIP, and Tap separately. If you\'d rather use Docker Compose to run everything together, see Local Development with Docker.","source":"@site/docs/getting-started/deployment/other.md","sourceDirName":"getting-started/deployment","slug":"/getting-started/deployment/other","permalink":"/getting-started/deployment/other","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Docker","permalink":"/getting-started/deployment/docker"},"next":{"title":"Authentication","permalink":"/getting-started/authentication"}}');var s=n(4848),a=n(8453);const i={},o="Local Development from Source",l={},c=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"1. Clone and configure",id:"1-clone-and-configure",level:2},{value:"2. Create the database",id:"2-create-the-database",level:2},{value:"3. Start HappyView",id:"3-start-happyview",level:2},{value:"Next steps",id:"next-steps",level:2}];function d(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.header,{children:(0,s.jsx)(t.h1,{id:"local-development-from-source",children:"Local Development from Source"})}),"\n",(0,s.jsxs)(t.p,{children:["This guide runs HappyView directly with ",(0,s.jsx)(t.code,{children:"cargo run"}),", with you managing Postgres, AIP, and Tap separately. If you'd rather use Docker Compose to run everything together, see ",(0,s.jsx)(t.a,{href:"docker",children:"Local Development with Docker"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Rust (stable)"}),"\n",(0,s.jsx)(t.li,{children:"PostgreSQL 17+"}),"\n",(0,s.jsxs)(t.li,{children:["A running ",(0,s.jsx)(t.a,{href:"https://github.com/graze-social/aip",children:"AIP"})," instance (handles OAuth). See the ",(0,s.jsx)(t.a,{href:"https://github.com/graze-social/aip",children:"AIP documentation"})," for setup."]}),"\n",(0,s.jsxs)(t.li,{children:["A running ",(0,s.jsx)(t.a,{href:"https://github.com/bluesky-social/indigo/tree/main/cmd/tap",children:"Tap"})," instance (delivers real-time records and handles backfill). See the ",(0,s.jsx)(t.a,{href:"https://github.com/bluesky-social/indigo/tree/main/cmd/tap",children:"Tap documentation"})," for setup."]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"1-clone-and-configure",children:"1. Clone and configure"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:"git clone https://github.com/graze-social/happyview.git\ncd happyview\ncp .env.example .env\n"})}),"\n",(0,s.jsxs)(t.p,{children:["Edit ",(0,s.jsx)(t.code,{children:".env"})," to point at your running services:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:"DATABASE_URL=postgres://happyview:happyview@localhost/happyview\nAIP_URL=http://localhost:8080\nTAP_URL=http://localhost:2480\nTAP_ADMIN_PASSWORD=your-secret-here\n"})}),"\n",(0,s.jsxs)(t.p,{children:["See ",(0,s.jsx)(t.a,{href:"../configuration",children:"Configuration"})," for all available variables."]}),"\n",(0,s.jsx)(t.h2,{id:"2-create-the-database",children:"2. Create the database"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:"createdb happyview\n"})}),"\n",(0,s.jsx)(t.p,{children:"Or if using a Postgres user with a password:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:'psql -c "CREATE DATABASE happyview;" -U postgres\n'})}),"\n",(0,s.jsx)(t.p,{children:"HappyView runs migrations automatically on startup, so no manual migration step is needed."}),"\n",(0,s.jsx)(t.h2,{id:"3-start-happyview",children:"3. Start HappyView"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sh",children:"cargo run\n"})}),"\n",(0,s.jsxs)(t.p,{children:["HappyView starts on port 3000 (configurable via the ",(0,s.jsx)(t.code,{children:"PORT"})," environment variable)."]}),"\n",(0,s.jsx)(t.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,s.jsxs)(t.p,{children:["Your HappyView instance is running. Follow the ",(0,s.jsx)(t.a,{href:"../../tutorials/statusphere",children:"Statusphere tutorial"})," to upload lexicons, add custom query logic, and start indexing records from the network."]})]})}function h(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453(e,t,n){n.d(t,{R:()=>i,x:()=>o});var r=n(6540);const s={},a=r.createContext(s);function i(e){const t=r.useContext(a);return r.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),r.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/bccc5e9b.bfceefed.js b/assets/js/bccc5e9b.bfceefed.js new file mode 100644 index 0000000..ca60c6c --- /dev/null +++ b/assets/js/bccc5e9b.bfceefed.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[2431],{9641(e,r,s){s.r(r),s.d(r,{assets:()=>o,contentTitle:()=>a,default:()=>h,frontMatter:()=>t,metadata:()=>i,toc:()=>c});const i=JSON.parse('{"id":"guides/backfill","title":"Backfill","description":"When you add a new record-type lexicon, HappyView starts indexing new records from that moment via Tap. But what about records that already exist on the network? That\'s what backfill does: HappyView discovers repos via the relay and delegates the actual record fetching to Tap.","source":"@site/docs/guides/backfill.md","sourceDirName":"guides","slug":"/guides/backfill","permalink":"/guides/backfill","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Lua Scripting","permalink":"/guides/scripting"},"next":{"title":"XRPC API","permalink":"/reference/xrpc-api"}}');var n=s(4848),l=s(8453);const t={},a="Backfill",o={},c=[{value:"When backfill runs",id:"when-backfill-runs",level:2},{value:"How it works",id:"how-it-works",level:2},{value:"Job lifecycle",id:"job-lifecycle",level:2},{value:"Re-running backfills",id:"re-running-backfills",level:2},{value:"Restoring deleted records",id:"restoring-deleted-records",level:2},{value:"Next steps",id:"next-steps",level:2}];function d(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,l.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.header,{children:(0,n.jsx)(r.h1,{id:"backfill",children:"Backfill"})}),"\n",(0,n.jsxs)(r.p,{children:["When you add a new record-type lexicon, HappyView starts indexing new records from that moment via ",(0,n.jsx)(r.a,{href:"https://github.com/bluesky-social/indigo/tree/main/cmd/tap",children:"Tap"}),". But what about records that already exist on the network? That's what backfill does: HappyView discovers repos via the relay and delegates the actual record fetching to Tap."]}),"\n",(0,n.jsx)(r.h2,{id:"when-backfill-runs",children:"When backfill runs"}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsxs)(r.li,{children:[(0,n.jsx)(r.strong,{children:"Automatically"})," when a record-type lexicon is uploaded with ",(0,n.jsx)(r.code,{children:"backfill: true"})," (the default). See ",(0,n.jsx)(r.a,{href:"/guides/lexicons#backfill-flag",children:"Lexicons - Backfill flag"}),"."]}),"\n",(0,n.jsxs)(r.li,{children:[(0,n.jsx)(r.strong,{children:"Manually"})," via ",(0,n.jsx)(r.code,{children:"POST /admin/backfill"})," or the ",(0,n.jsx)(r.a,{href:"/getting-started/dashboard",children:"dashboard"}),". You can scope a manual backfill to a specific collection, a specific DID, or both."]}),"\n"]}),"\n",(0,n.jsxs)(r.p,{children:["See the ",(0,n.jsx)(r.a,{href:"/reference/admin-api#backfill",children:"admin API"})," for endpoint details."]}),"\n",(0,n.jsx)(r.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,n.jsxs)(r.ol,{children:["\n",(0,n.jsxs)(r.li,{children:[(0,n.jsx)(r.strong,{children:"Determine target collections"}),": uses the specified collection, or all record lexicons with ",(0,n.jsx)(r.code,{children:"backfill: true"})]}),"\n",(0,n.jsxs)(r.li,{children:[(0,n.jsx)(r.strong,{children:"Discover DIDs"}),": HappyView calls the relay's ",(0,n.jsx)(r.code,{children:"com.atproto.sync.listReposByCollection"})," to find repos that contain records for each target collection (paginated, 1000 per page)"]}),"\n",(0,n.jsxs)(r.li,{children:[(0,n.jsx)(r.strong,{children:"Delegate to Tap"}),": HappyView sends discovered DIDs to Tap in batches of 1000 via its ",(0,n.jsx)(r.code,{children:"/repos/add"})," endpoint"]}),"\n",(0,n.jsxs)(r.li,{children:[(0,n.jsx)(r.strong,{children:"Tap fetches records"}),": Tap handles the actual record fetching from each user's PDS and delivers them to HappyView via the WebSocket channel"]}),"\n"]}),"\n",(0,n.jsx)(r.h2,{id:"job-lifecycle",children:"Job lifecycle"}),"\n",(0,n.jsxs)(r.p,{children:['HappyView marks a backfill job as "completed" once it finishes discovering repos and handing DIDs off to Tap (steps 1-3). This does ',(0,n.jsx)(r.strong,{children:"not"})," mean Tap has finished processing all the records. Tap works through them asynchronously after the handoff."]}),"\n",(0,n.jsxs)(r.p,{children:["To see whether Tap is still working through the backlog, check the Tap stats on the dashboard's Backfill page or via ",(0,n.jsx)(r.code,{children:"GET /admin/tap/stats"}),". The ",(0,n.jsx)(r.strong,{children:"outbox buffer"})," indicates how many events are still queued for delivery; a high number means Tap is actively processing."]}),"\n",(0,n.jsx)(r.h2,{id:"re-running-backfills",children:"Re-running backfills"}),"\n",(0,n.jsx)(r.p,{children:"Re-running a backfill for a collection that's already been backfilled is safe. HappyView removes the discovered repos from Tap before re-adding them, which clears Tap's cached state and forces a full re-fetch of all records from each repo's PDS. This means re-running a backfill will restore any records that were previously deleted from HappyView, as well as pick up repos that were added to the network since the last run."}),"\n",(0,n.jsx)(r.h2,{id:"restoring-deleted-records",children:"Restoring deleted records"}),"\n",(0,n.jsx)(r.p,{children:"Deleting records from HappyView (via the dashboard or API) only removes them from the local database \u2014 the records still exist on the AT Protocol network. To restore deleted records, create a backfill job for the affected collection. The backfill will clear Tap's cache for the discovered repos and re-fetch all records from the network, restoring any that were previously deleted."}),"\n",(0,n.jsx)(r.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsxs)(r.li,{children:[(0,n.jsx)(r.a,{href:"/guides/lexicons#backfill-flag",children:"Lexicons"}),": Control whether lexicons trigger backfill on upload"]}),"\n",(0,n.jsxs)(r.li,{children:[(0,n.jsx)(r.a,{href:"/reference/admin-api#backfill",children:"Admin API"}),": Full reference for backfill endpoints"]}),"\n",(0,n.jsxs)(r.li,{children:[(0,n.jsx)(r.a,{href:"/reference/admin-api#tap-stats",children:"Admin API - Tap Stats"}),": Monitor Tap's processing progress"]}),"\n"]})]})}function h(e={}){const{wrapper:r}={...(0,l.R)(),...e.components};return r?(0,n.jsx)(r,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},8453(e,r,s){s.d(r,{R:()=>t,x:()=>a});var i=s(6540);const n={},l=i.createContext(n);function t(e){const r=i.useContext(l);return i.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function a(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:t(e.components),i.createElement(l.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/bccc5e9b.d36e3865.js b/assets/js/bccc5e9b.d36e3865.js deleted file mode 100644 index 4be78e6..0000000 --- a/assets/js/bccc5e9b.d36e3865.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[2431],{9641(e,r,s){s.r(r),s.d(r,{assets:()=>o,contentTitle:()=>a,default:()=>h,frontMatter:()=>t,metadata:()=>i,toc:()=>c});const i=JSON.parse('{"id":"guides/backfill","title":"Backfill","description":"When you add a new record-type lexicon, HappyView starts indexing new records from that moment via Tap. But what about records that already exist on the network? That\'s what backfill does: HappyView discovers repos via the relay and delegates the actual record fetching to Tap.","source":"@site/docs/guides/backfill.md","sourceDirName":"guides","slug":"/guides/backfill","permalink":"/guides/backfill","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Lua Scripting","permalink":"/guides/scripting"},"next":{"title":"XRPC API","permalink":"/reference/xrpc-api"}}');var n=s(4848),l=s(8453);const t={},a="Backfill",o={},c=[{value:"When backfill runs",id:"when-backfill-runs",level:2},{value:"How it works",id:"how-it-works",level:2},{value:"Job lifecycle",id:"job-lifecycle",level:2},{value:"Re-running backfills",id:"re-running-backfills",level:2},{value:"Restoring deleted records",id:"restoring-deleted-records",level:2},{value:"Next steps",id:"next-steps",level:2}];function d(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,l.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.header,{children:(0,n.jsx)(r.h1,{id:"backfill",children:"Backfill"})}),"\n",(0,n.jsxs)(r.p,{children:["When you add a new record-type lexicon, HappyView starts indexing new records from that moment via ",(0,n.jsx)(r.a,{href:"https://github.com/bluesky-social/indigo/tree/main/cmd/tap",children:"Tap"}),". But what about records that already exist on the network? That's what backfill does: HappyView discovers repos via the relay and delegates the actual record fetching to Tap."]}),"\n",(0,n.jsx)(r.h2,{id:"when-backfill-runs",children:"When backfill runs"}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsxs)(r.li,{children:[(0,n.jsx)(r.strong,{children:"Automatically"})," when a record-type lexicon is uploaded with ",(0,n.jsx)(r.code,{children:"backfill: true"})," (the default). See ",(0,n.jsx)(r.a,{href:"lexicons#backfill-flag",children:"Lexicons - Backfill flag"}),"."]}),"\n",(0,n.jsxs)(r.li,{children:[(0,n.jsx)(r.strong,{children:"Manually"})," via ",(0,n.jsx)(r.code,{children:"POST /admin/backfill"})," or the ",(0,n.jsx)(r.a,{href:"../getting-started/dashboard",children:"dashboard"}),". You can scope a manual backfill to a specific collection, a specific DID, or both."]}),"\n"]}),"\n",(0,n.jsxs)(r.p,{children:["See the ",(0,n.jsx)(r.a,{href:"../reference/admin-api#backfill",children:"admin API"})," for endpoint details."]}),"\n",(0,n.jsx)(r.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,n.jsxs)(r.ol,{children:["\n",(0,n.jsxs)(r.li,{children:[(0,n.jsx)(r.strong,{children:"Determine target collections"}),": uses the specified collection, or all record lexicons with ",(0,n.jsx)(r.code,{children:"backfill: true"})]}),"\n",(0,n.jsxs)(r.li,{children:[(0,n.jsx)(r.strong,{children:"Discover DIDs"}),": HappyView calls the relay's ",(0,n.jsx)(r.code,{children:"com.atproto.sync.listReposByCollection"})," to find repos that contain records for each target collection (paginated, 1000 per page)"]}),"\n",(0,n.jsxs)(r.li,{children:[(0,n.jsx)(r.strong,{children:"Delegate to Tap"}),": HappyView sends discovered DIDs to Tap in batches of 1000 via its ",(0,n.jsx)(r.code,{children:"/repos/add"})," endpoint"]}),"\n",(0,n.jsxs)(r.li,{children:[(0,n.jsx)(r.strong,{children:"Tap fetches records"}),": Tap handles the actual record fetching from each user's PDS and delivers them to HappyView via the WebSocket channel"]}),"\n"]}),"\n",(0,n.jsx)(r.h2,{id:"job-lifecycle",children:"Job lifecycle"}),"\n",(0,n.jsxs)(r.p,{children:['HappyView marks a backfill job as "completed" once it finishes discovering repos and handing DIDs off to Tap (steps 1-3). This does ',(0,n.jsx)(r.strong,{children:"not"})," mean Tap has finished processing all the records. Tap works through them asynchronously after the handoff."]}),"\n",(0,n.jsxs)(r.p,{children:["To see whether Tap is still working through the backlog, check the Tap stats on the dashboard's Backfill page or via ",(0,n.jsx)(r.code,{children:"GET /admin/tap/stats"}),". The ",(0,n.jsx)(r.strong,{children:"outbox buffer"})," indicates how many events are still queued for delivery; a high number means Tap is actively processing."]}),"\n",(0,n.jsx)(r.h2,{id:"re-running-backfills",children:"Re-running backfills"}),"\n",(0,n.jsx)(r.p,{children:"Re-running a backfill for a collection that's already been backfilled is safe. HappyView removes the discovered repos from Tap before re-adding them, which clears Tap's cached state and forces a full re-fetch of all records from each repo's PDS. This means re-running a backfill will restore any records that were previously deleted from HappyView, as well as pick up repos that were added to the network since the last run."}),"\n",(0,n.jsx)(r.h2,{id:"restoring-deleted-records",children:"Restoring deleted records"}),"\n",(0,n.jsx)(r.p,{children:"Deleting records from HappyView (via the dashboard or API) only removes them from the local database \u2014 the records still exist on the AT Protocol network. To restore deleted records, create a backfill job for the affected collection. The backfill will clear Tap's cache for the discovered repos and re-fetch all records from the network, restoring any that were previously deleted."}),"\n",(0,n.jsx)(r.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsxs)(r.li,{children:[(0,n.jsx)(r.a,{href:"lexicons#backfill-flag",children:"Lexicons"}),": Control whether lexicons trigger backfill on upload"]}),"\n",(0,n.jsxs)(r.li,{children:[(0,n.jsx)(r.a,{href:"../reference/admin-api#backfill",children:"Admin API"}),": Full reference for backfill endpoints"]}),"\n",(0,n.jsxs)(r.li,{children:[(0,n.jsx)(r.a,{href:"../reference/admin-api#tap-stats",children:"Admin API - Tap Stats"}),": Monitor Tap's processing progress"]}),"\n"]})]})}function h(e={}){const{wrapper:r}={...(0,l.R)(),...e.components};return r?(0,n.jsx)(r,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},8453(e,r,s){s.d(r,{R:()=>t,x:()=>a});var i=s(6540);const n={},l=i.createContext(n);function t(e){const r=i.useContext(l);return i.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function a(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:t(e.components),i.createElement(l.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/bde15bec.3d921e73.js b/assets/js/bde15bec.3d921e73.js deleted file mode 100644 index 664d914..0000000 --- a/assets/js/bde15bec.3d921e73.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[6438],{8796(e,n,t){t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>u,frontMatter:()=>o,metadata:()=>r,toc:()=>c});const r=JSON.parse('{"id":"reference/scripts/complex-mutations","title":"Procedure: Complex Mutations","description":"Load an existing record, apply multiple transformations, and save it back.","source":"@site/docs/reference/scripts/complex-mutations.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/complex-mutations","permalink":"/reference/scripts/complex-mutations","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Cascading Delete","permalink":"/reference/scripts/cascading-delete"},"next":{"title":"Glossary","permalink":"/reference/glossary"}}');var s=t(4848),i=t(8453);const o={},a="Procedure: Complex Mutations",l={},c=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function d(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"procedure-complex-mutations",children:"Procedure: Complex Mutations"})}),"\n",(0,s.jsx)(n.p,{children:"Load an existing record, apply multiple transformations, and save it back."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Lexicon type:"})," procedure"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-lua",children:'function handle()\n if not input.uri then\n return { error = "uri is required" }\n end\n\n local r = Record.load(input.uri)\n if not r then\n return { error = "not found" }\n end\n\n -- Increment a counter\n r.likeCount = (r.likeCount or 0) + 1\n\n -- Merge tags, deduplicating and capping at 10\n r.tags = r.tags or {}\n if input.tags then\n for _, tag in ipairs(input.tags) do\n local found = false\n for _, t in ipairs(r.tags) do\n if t == tag then\n found = true\n break\n end\n end\n if not found then\n r.tags[#r.tags + 1] = tag\n end\n end\n -- Keep only the last 10\n while #r.tags > 10 do\n table.remove(r.tags, 1)\n end\n end\n\n -- Normalize a string field\n if input.title then\n r.title = string.gsub(input.title, "^%s+", "")\n r.title = string.gsub(r.title, "%s+$", "")\n end\n\n -- Set a computed field\n r.updatedAt = now()\n\n r:save()\n\n return { uri = r._uri, cid = r._cid }\nend\n'})}),"\n",(0,s.jsx)(n.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["Load the existing record with ",(0,s.jsx)(n.a,{href:"../../guides/scripting#static-methods",children:(0,s.jsx)(n.code,{children:"Record.load"})}),". This gives you a mutable ",(0,s.jsx)(n.code,{children:"Record"})," instance with all the current field values."]}),"\n",(0,s.jsxs)(n.li,{children:["Apply transformations directly on the record's fields:","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Increment a counter"}),": use ",(0,s.jsx)(n.code,{children:"or 0"})," to handle the field being ",(0,s.jsx)(n.code,{children:"nil"})," on first access."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Merge tags"}),": iterate over ",(0,s.jsx)(n.code,{children:"input.tags"}),", skip duplicates already in ",(0,s.jsx)(n.code,{children:"r.tags"}),", append new ones, then trim the list to 10."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Normalize a string"}),": use ",(0,s.jsx)(n.code,{children:"string.gsub"})," to trim whitespace."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Set a timestamp"}),": use ",(0,s.jsx)(n.a,{href:"../../guides/scripting#utility-globals",children:(0,s.jsx)(n.code,{children:"now()"})})," for UTC ISO 8601."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["Call ",(0,s.jsx)(n.code,{children:"r:save()"}),". Since ",(0,s.jsx)(n.code,{children:"_uri"})," is set (from the load), this calls ",(0,s.jsx)(n.code,{children:"putRecord"})," to update the record on the user's PDS."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"usage",children:"Usage"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/xrpc/xyz.statusphere.updatePost \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "uri": "at://did:plc:abc/xyz.statusphere.post/abc123",\n "tags": ["tutorial", "atproto"],\n "title": " My Post Title "\n }\'\n'})}),"\n",(0,s.jsx)(n.h2,{id:"use-case",children:"Use case"}),"\n",(0,s.jsxs)(n.p,{children:["This pattern is useful when updates involve more than simple field replacement: counters, bounded lists, string normalization, or computed fields. All mutations happen in memory before the single ",(0,s.jsx)(n.code,{children:"r:save()"})," call, so there's no partial save: either all changes are written or none are."]}),"\n",(0,s.jsxs)(n.p,{children:["If the record has a schema, HappyView only sends fields defined in the schema's ",(0,s.jsx)(n.code,{children:"properties"})," to the PDS on save. Extra fields you set on the record instance are ignored."]})]})}function u(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453(e,n,t){t.d(n,{R:()=>o,x:()=>a});var r=t(6540);const s={},i=r.createContext(s);function o(e){const n=r.useContext(i);return r.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/bde15bec.7425f799.js b/assets/js/bde15bec.7425f799.js new file mode 100644 index 0000000..1db1851 --- /dev/null +++ b/assets/js/bde15bec.7425f799.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[6438],{8796(e,n,t){t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>u,frontMatter:()=>o,metadata:()=>r,toc:()=>c});const r=JSON.parse('{"id":"reference/scripts/complex-mutations","title":"Procedure: Complex Mutations","description":"Load an existing record, apply multiple transformations, and save it back.","source":"@site/docs/reference/scripts/complex-mutations.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/complex-mutations","permalink":"/reference/scripts/complex-mutations","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Cascading Delete","permalink":"/reference/scripts/cascading-delete"},"next":{"title":"Glossary","permalink":"/reference/glossary"}}');var s=t(4848),i=t(8453);const o={},a="Procedure: Complex Mutations",l={},c=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function d(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"procedure-complex-mutations",children:"Procedure: Complex Mutations"})}),"\n",(0,s.jsx)(n.p,{children:"Load an existing record, apply multiple transformations, and save it back."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Lexicon type:"})," procedure"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-lua",children:'function handle()\n if not input.uri then\n return { error = "uri is required" }\n end\n\n local r = Record.load(input.uri)\n if not r then\n return { error = "not found" }\n end\n\n -- Increment a counter\n r.likeCount = (r.likeCount or 0) + 1\n\n -- Merge tags, deduplicating and capping at 10\n r.tags = r.tags or {}\n if input.tags then\n for _, tag in ipairs(input.tags) do\n local found = false\n for _, t in ipairs(r.tags) do\n if t == tag then\n found = true\n break\n end\n end\n if not found then\n r.tags[#r.tags + 1] = tag\n end\n end\n -- Keep only the last 10\n while #r.tags > 10 do\n table.remove(r.tags, 1)\n end\n end\n\n -- Normalize a string field\n if input.title then\n r.title = string.gsub(input.title, "^%s+", "")\n r.title = string.gsub(r.title, "%s+$", "")\n end\n\n -- Set a computed field\n r.updatedAt = now()\n\n r:save()\n\n return { uri = r._uri, cid = r._cid }\nend\n'})}),"\n",(0,s.jsx)(n.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["Load the existing record with ",(0,s.jsx)(n.a,{href:"/guides/scripting#static-methods",children:(0,s.jsx)(n.code,{children:"Record.load"})}),". This gives you a mutable ",(0,s.jsx)(n.code,{children:"Record"})," instance with all the current field values."]}),"\n",(0,s.jsxs)(n.li,{children:["Apply transformations directly on the record's fields:","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Increment a counter"}),": use ",(0,s.jsx)(n.code,{children:"or 0"})," to handle the field being ",(0,s.jsx)(n.code,{children:"nil"})," on first access."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Merge tags"}),": iterate over ",(0,s.jsx)(n.code,{children:"input.tags"}),", skip duplicates already in ",(0,s.jsx)(n.code,{children:"r.tags"}),", append new ones, then trim the list to 10."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Normalize a string"}),": use ",(0,s.jsx)(n.code,{children:"string.gsub"})," to trim whitespace."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Set a timestamp"}),": use ",(0,s.jsx)(n.a,{href:"/guides/scripting#utility-globals",children:(0,s.jsx)(n.code,{children:"now()"})})," for UTC ISO 8601."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["Call ",(0,s.jsx)(n.code,{children:"r:save()"}),". Since ",(0,s.jsx)(n.code,{children:"_uri"})," is set (from the load), this calls ",(0,s.jsx)(n.code,{children:"putRecord"})," to update the record on the user's PDS."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"usage",children:"Usage"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/xrpc/xyz.statusphere.updatePost \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "uri": "at://did:plc:abc/xyz.statusphere.post/abc123",\n "tags": ["tutorial", "atproto"],\n "title": " My Post Title "\n }\'\n'})}),"\n",(0,s.jsx)(n.h2,{id:"use-case",children:"Use case"}),"\n",(0,s.jsxs)(n.p,{children:["This pattern is useful when updates involve more than simple field replacement: counters, bounded lists, string normalization, or computed fields. All mutations happen in memory before the single ",(0,s.jsx)(n.code,{children:"r:save()"})," call, so there's no partial save: either all changes are written or none are."]}),"\n",(0,s.jsxs)(n.p,{children:["If the record has a schema, HappyView only sends fields defined in the schema's ",(0,s.jsx)(n.code,{children:"properties"})," to the PDS on save. Extra fields you set on the record instance are ignored."]})]})}function u(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},8453(e,n,t){t.d(n,{R:()=>o,x:()=>a});var r=t(6540);const s={},i=r.createContext(s);function o(e){const n=r.useContext(i);return r.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c985d368.4a5d382b.js b/assets/js/c985d368.9be5144d.js similarity index 59% rename from assets/js/c985d368.4a5d382b.js rename to assets/js/c985d368.9be5144d.js index 1249af9..beb12f1 100644 --- a/assets/js/c985d368.4a5d382b.js +++ b/assets/js/c985d368.9be5144d.js @@ -1 +1 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[2007],{4436(e,r,n){n.r(r),n.d(r,{assets:()=>a,contentTitle:()=>d,default:()=>h,frontMatter:()=>o,metadata:()=>t,toc:()=>l});const t=JSON.parse('{"id":"reference/scripts/cascading-delete","title":"Procedure: Cascading Delete","description":"Delete a record and all related records across collections.","source":"@site/docs/reference/scripts/cascading-delete.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/cascading-delete","permalink":"/reference/scripts/cascading-delete","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Sidecar Records","permalink":"/reference/scripts/sidecar-records"},"next":{"title":"Complex Mutations","permalink":"/reference/scripts/complex-mutations"}}');var s=n(4848),c=n(8453);const o={},d="Procedure: Cascading Delete",a={},l=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function i(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,c.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.header,{children:(0,s.jsx)(r.h1,{id:"procedure-cascading-delete",children:"Procedure: Cascading Delete"})}),"\n",(0,s.jsx)(r.p,{children:"Delete a record and all related records across collections."}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"Lexicon type:"})," procedure"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-lua",children:'function handle()\n if not input.uri then\n return { error = "uri is required" }\n end\n\n -- Load the primary record\n local primary = Record.load(input.uri)\n if not primary then\n return { error = "not found" }\n end\n\n -- Find related records that reference this URI\n local comments = db.query({\n collection = "xyz.statusphere.comment",\n did = caller_did,\n limit = 100,\n })\n\n -- Collect records to delete\n local to_delete = { primary }\n for _, comment in ipairs(comments.records) do\n if comment.postUri == input.uri then\n local r = Record.load(comment.uri)\n if r then\n to_delete[#to_delete + 1] = r\n end\n end\n end\n\n -- Delete all matched records\n for _, r in ipairs(to_delete) do\n r:delete()\n end\n\n return {\n deleted = #to_delete,\n }\nend\n'})}),"\n",(0,s.jsx)(r.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsx)(r.li,{children:"Load the primary record by URI. Return early if it doesn't exist."}),"\n",(0,s.jsx)(r.li,{children:"Query for related records, in this example comments by the same user that reference the primary record's URI."}),"\n",(0,s.jsxs)(r.li,{children:["Load each related record with ",(0,s.jsx)(r.a,{href:"../../guides/scripting#static-methods",children:(0,s.jsx)(r.code,{children:"Record.load"})})," to get a deletable ",(0,s.jsx)(r.code,{children:"Record"})," instance."]}),"\n",(0,s.jsxs)(r.li,{children:["Delete everything. Each ",(0,s.jsx)(r.code,{children:"r:delete()"})," removes the record from the user's PDS and the local index."]}),"\n"]}),"\n",(0,s.jsx)(r.h2,{id:"usage",children:"Usage"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/xrpc/xyz.statusphere.deletePost \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "uri": "at://did:plc:abc/xyz.statusphere.post/abc123" }\'\n'})}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-json",children:'{\n "deleted": 4\n}\n'})}),"\n",(0,s.jsx)(r.h2,{id:"use-case",children:"Use case"}),"\n",(0,s.jsx)(r.p,{children:"Cascading deletes are useful when your data model has parent-child relationships across collections. For example, deleting a post should also clean up its comments, reactions, or metadata records. This keeps the user's repo and the local index consistent."}),"\n",(0,s.jsxs)(r.p,{children:["Note that this only deletes records owned by ",(0,s.jsx)(r.code,{children:"caller_did"}),". AT Protocol records can only be deleted by their owner. If the related records could have more than 100 matches, paginate through all of them before deleting."]})]})}function h(e={}){const{wrapper:r}={...(0,c.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(i,{...e})}):i(e)}},8453(e,r,n){n.d(r,{R:()=>o,x:()=>d});var t=n(6540);const s={},c=t.createContext(s);function o(e){const r=t.useContext(c);return t.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function d(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),t.createElement(c.Provider,{value:r},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[2007],{4436(e,r,n){n.r(r),n.d(r,{assets:()=>a,contentTitle:()=>d,default:()=>h,frontMatter:()=>o,metadata:()=>t,toc:()=>l});const t=JSON.parse('{"id":"reference/scripts/cascading-delete","title":"Procedure: Cascading Delete","description":"Delete a record and all related records across collections.","source":"@site/docs/reference/scripts/cascading-delete.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/cascading-delete","permalink":"/reference/scripts/cascading-delete","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Sidecar Records","permalink":"/reference/scripts/sidecar-records"},"next":{"title":"Complex Mutations","permalink":"/reference/scripts/complex-mutations"}}');var s=n(4848),c=n(8453);const o={},d="Procedure: Cascading Delete",a={},l=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function i(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,c.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.header,{children:(0,s.jsx)(r.h1,{id:"procedure-cascading-delete",children:"Procedure: Cascading Delete"})}),"\n",(0,s.jsx)(r.p,{children:"Delete a record and all related records across collections."}),"\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"Lexicon type:"})," procedure"]}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-lua",children:'function handle()\n if not input.uri then\n return { error = "uri is required" }\n end\n\n -- Load the primary record\n local primary = Record.load(input.uri)\n if not primary then\n return { error = "not found" }\n end\n\n -- Find related records that reference this URI\n local comments = db.query({\n collection = "xyz.statusphere.comment",\n did = caller_did,\n limit = 100,\n })\n\n -- Collect records to delete\n local to_delete = { primary }\n for _, comment in ipairs(comments.records) do\n if comment.postUri == input.uri then\n local r = Record.load(comment.uri)\n if r then\n to_delete[#to_delete + 1] = r\n end\n end\n end\n\n -- Delete all matched records\n for _, r in ipairs(to_delete) do\n r:delete()\n end\n\n return {\n deleted = #to_delete,\n }\nend\n'})}),"\n",(0,s.jsx)(r.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsx)(r.li,{children:"Load the primary record by URI. Return early if it doesn't exist."}),"\n",(0,s.jsx)(r.li,{children:"Query for related records, in this example comments by the same user that reference the primary record's URI."}),"\n",(0,s.jsxs)(r.li,{children:["Load each related record with ",(0,s.jsx)(r.a,{href:"/guides/scripting#static-methods",children:(0,s.jsx)(r.code,{children:"Record.load"})})," to get a deletable ",(0,s.jsx)(r.code,{children:"Record"})," instance."]}),"\n",(0,s.jsxs)(r.li,{children:["Delete everything. Each ",(0,s.jsx)(r.code,{children:"r:delete()"})," removes the record from the user's PDS and the local index."]}),"\n"]}),"\n",(0,s.jsx)(r.h2,{id:"usage",children:"Usage"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/xrpc/xyz.statusphere.deletePost \\\n -H "Authorization: Bearer $TOKEN" \\\n -H "Content-Type: application/json" \\\n -d \'{ "uri": "at://did:plc:abc/xyz.statusphere.post/abc123" }\'\n'})}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-json",children:'{\n "deleted": 4\n}\n'})}),"\n",(0,s.jsx)(r.h2,{id:"use-case",children:"Use case"}),"\n",(0,s.jsx)(r.p,{children:"Cascading deletes are useful when your data model has parent-child relationships across collections. For example, deleting a post should also clean up its comments, reactions, or metadata records. This keeps the user's repo and the local index consistent."}),"\n",(0,s.jsxs)(r.p,{children:["Note that this only deletes records owned by ",(0,s.jsx)(r.code,{children:"caller_did"}),". AT Protocol records can only be deleted by their owner. If the related records could have more than 100 matches, paginate through all of them before deleting."]})]})}function h(e={}){const{wrapper:r}={...(0,c.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(i,{...e})}):i(e)}},8453(e,r,n){n.d(r,{R:()=>o,x:()=>d});var t=n(6540);const s={},c=t.createContext(s);function o(e){const r=t.useContext(c);return t.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function d(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),t.createElement(c.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d2e94323.9954b951.js b/assets/js/d2e94323.9cf23f81.js similarity index 54% rename from assets/js/d2e94323.9954b951.js rename to assets/js/d2e94323.9cf23f81.js index 52461ca..a3ad18a 100644 --- a/assets/js/d2e94323.9954b951.js +++ b/assets/js/d2e94323.9cf23f81.js @@ -1 +1 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[3993],{7791(e,t,i){i.r(t),i.d(t,{assets:()=>l,contentTitle:()=>c,default:()=>h,frontMatter:()=>o,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"guides/lexicons","title":"Lexicons","description":"Lexicons are the core building block of HappyView. They\'re AT Protocol schema definitions that describe your data model, and HappyView uses them to decide which records to index from the network and what XRPC endpoints to serve.","source":"@site/docs/guides/lexicons.md","sourceDirName":"guides","slug":"/guides/lexicons","permalink":"/guides/lexicons","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Statusphere","permalink":"/tutorials/statusphere"},"next":{"title":"Lua Scripting","permalink":"/guides/scripting"}}');var r=i(4848),s=i(8453);const o={},c="Lexicons",l={},d=[{value:"Supported lexicon types",id:"supported-lexicon-types",level:2},{value:"Target collection",id:"target-collection",level:2},{value:"Backfill flag",id:"backfill-flag",level:2},{value:"Tap collection filters",id:"tap-collection-filters",level:2},{value:"Network lexicons",id:"network-lexicons",level:2},{value:"NSID authority resolution",id:"nsid-authority-resolution",level:3},{value:"Fetching",id:"fetching",level:3},{value:"Live updates via Tap",id:"live-updates-via-tap",level:3},{value:"Startup re-fetch",id:"startup-re-fetch",level:3},{value:"Next steps",id:"next-steps",level:2}];function a(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"lexicons",children:"Lexicons"})}),"\n",(0,r.jsxs)(t.p,{children:["Lexicons are the core building block of HappyView. They're ",(0,r.jsx)(t.a,{href:"https://atproto.com/specs/lexicon",children:"AT Protocol schema definitions"})," that describe your data model, and HappyView uses them to decide which records to index from the network and what XRPC endpoints to serve."]}),"\n",(0,r.jsxs)(t.p,{children:["You don't write route handlers or database queries; you upload a lexicon and HappyView generates the infrastructure from it. There are two ways to add lexicons: uploading them via the ",(0,r.jsx)(t.a,{href:"../reference/admin-api#lexicons",children:"admin API"})," or ",(0,r.jsx)(t.a,{href:"../getting-started/dashboard",children:"dashboard"}),", or fetching them directly from the AT Protocol network via ",(0,r.jsx)(t.a,{href:"#network-lexicons",children:"DNS authority resolution"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"supported-lexicon-types",children:"Supported lexicon types"}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Type"}),(0,r.jsx)(t.th,{children:"Effect"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"record"})}),(0,r.jsx)(t.td,{children:"Syncs the collection filter to Tap and indexes records into Postgres"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"query"})}),(0,r.jsxs)(t.td,{children:["Registers a ",(0,r.jsx)(t.code,{children:"GET /xrpc/{nsid}"})," endpoint that queries indexed records"]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"procedure"})}),(0,r.jsxs)(t.td,{children:["Registers a ",(0,r.jsx)(t.code,{children:"POST /xrpc/{nsid}"})," endpoint that proxies writes to the user's PDS"]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"definitions"})}),(0,r.jsx)(t.td,{children:"Stored but does not generate routes or subscriptions"})]})]})]}),"\n",(0,r.jsxs)(t.p,{children:["A typical setup has three lexicons working together: a ",(0,r.jsx)(t.strong,{children:"record"})," lexicon that defines the data and triggers indexing, a ",(0,r.jsx)(t.strong,{children:"query"})," lexicon that exposes a read endpoint, and a ",(0,r.jsx)(t.strong,{children:"procedure"})," lexicon that exposes a write endpoint. The ",(0,r.jsx)(t.a,{href:"../tutorials/statusphere",children:"Statusphere tutorial"})," walks through this pattern end-to-end."]}),"\n",(0,r.jsx)(t.h2,{id:"target-collection",children:"Target collection"}),"\n",(0,r.jsxs)(t.p,{children:["Query and procedure lexicons don't store data themselves. They operate on records stored by a record-type lexicon. The ",(0,r.jsx)(t.code,{children:"target_collection"})," field tells HappyView which record collection to read from or write to. Without it, default queries and procedures won't know which DB records to operate on."]}),"\n",(0,r.jsxs)(t.p,{children:["For example, a query lexicon ",(0,r.jsx)(t.code,{children:"xyz.statusphere.listStatuses"})," would set ",(0,r.jsx)(t.code,{children:"target_collection"})," to ",(0,r.jsx)(t.code,{children:"xyz.statusphere.status"})," to read from that record collection."]}),"\n",(0,r.jsxs)(t.p,{children:["See the ",(0,r.jsx)(t.a,{href:"../reference/admin-api#upload--upsert-a-lexicon",children:"admin API"})," for how to set ",(0,r.jsx)(t.code,{children:"target_collection"})," when uploading."]}),"\n",(0,r.jsx)(t.admonition,{type:"note",children:(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.code,{children:"target_collection"})," is available in Lua scripts as the ",(0,r.jsx)(t.code,{children:"collection"})," global, but it is not required if your endpoint uses a Lua script."]})}),"\n",(0,r.jsx)(t.h2,{id:"backfill-flag",children:"Backfill flag"}),"\n",(0,r.jsxs)(t.p,{children:["When uploading a record-type lexicon, HappyView automatically creates a backfill job to discover existing records. If you only want to index new records going forward, you can set ",(0,r.jsx)(t.code,{children:"backfill"})," to ",(0,r.jsx)(t.code,{children:"false"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"tap-collection-filters",children:"Tap collection filters"}),"\n",(0,r.jsxs)(t.p,{children:["When record-type lexicons change (uploaded or deleted), HappyView automatically syncs the updated collection filter to Tap. HappyView always includes ",(0,r.jsx)(t.code,{children:"com.atproto.lexicon.schema"})," in the filter to track network lexicon updates."]}),"\n",(0,r.jsxs)(t.p,{children:["Deleting a lexicon updates Tap's collection filters (stopping live indexing for that collection) but does ",(0,r.jsx)(t.strong,{children:"not"})," remove previously indexed repos or their cached state from Tap. To fully reset a collection's state, delete the lexicon, re-add it, and run a ",(0,r.jsx)(t.a,{href:"backfill",children:"backfill"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"network-lexicons",children:"Network lexicons"}),"\n",(0,r.jsx)(t.p,{children:"If a lexicon has already been published, you don't need to upload the JSON manually. Point HappyView at the NSID and it fetches the lexicon directly from the network. Network lexicons are kept updated automatically via Tap. If the publisher updates their schema, your instance will pick up the change."}),"\n",(0,r.jsx)(t.h3,{id:"nsid-authority-resolution",children:"NSID authority resolution"}),"\n",(0,r.jsxs)(t.p,{children:["Lexicons are stored as records themselves with the ",(0,r.jsx)(t.code,{children:"com.atproto.lexicon.schema"})," NSID and the rkey set to the lexicon's NSID. To find which repo holds a lexicon, HappyView resolves the NSID's authority:"]}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["Extract the authority from the NSID (all segments except the last). For example, ",(0,r.jsx)(t.code,{children:"xyz.statusphere.status"})," has authority ",(0,r.jsx)(t.code,{children:"xyz.statusphere"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["Reverse the authority segments to form a domain: ",(0,r.jsx)(t.code,{children:"statusphere.xyz"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["Look up the DNS TXT record at ",(0,r.jsx)(t.code,{children:"_lexicon.{domain}"})," (e.g. ",(0,r.jsx)(t.code,{children:"_lexicon.statusphere.xyz"}),")."]}),"\n",(0,r.jsxs)(t.li,{children:["Parse the TXT record for a ",(0,r.jsx)(t.code,{children:"did="})," value."]}),"\n",(0,r.jsx)(t.li,{children:"Resolve the DID to a PDS endpoint via the PLC directory."}),"\n"]}),"\n",(0,r.jsx)(t.admonition,{type:"note",children:(0,r.jsxs)(t.p,{children:["The spec states that resolution must be ",(0,r.jsx)(t.strong,{children:"non-hierarchical"}),". Each authority requires its own explicit TXT record. If you have multiple levels of authority (e.g. ",(0,r.jsx)(t.code,{children:"xyz.statusphere.status"})," and ",(0,r.jsx)(t.code,{children:"xyz.statusphere.actor.profile"}),"), each level must have an explicit TXT record."]})}),"\n",(0,r.jsx)(t.h3,{id:"fetching",children:"Fetching"}),"\n",(0,r.jsxs)(t.p,{children:["Once the authority DID and PDS endpoint are known, HappyView calls ",(0,r.jsx)(t.code,{children:"com.atproto.repo.getRecord"})," with:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"repo"})," = the authority DID"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"collection"})," = ",(0,r.jsx)(t.code,{children:"com.atproto.lexicon.schema"})]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"rkey"})," = the NSID"]}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.code,{children:"value"})," field of the response is the raw lexicon JSON."]}),"\n",(0,r.jsx)(t.h3,{id:"live-updates-via-tap",children:"Live updates via Tap"}),"\n",(0,r.jsxs)(t.p,{children:["Tap always subscribes to ",(0,r.jsx)(t.code,{children:"com.atproto.lexicon.schema"})," alongside the dynamic record collections. When a record event arrives:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"create/update"}),": If the event's DID and rkey match a tracked network lexicon (",(0,r.jsx)(t.code,{children:"authority_did"})," and ",(0,r.jsx)(t.code,{children:"nsid"}),"), the lexicon is parsed, upserted into the ",(0,r.jsx)(t.code,{children:"lexicons"})," table and in-memory registry, and collection filters are updated if it's a record type."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"delete"}),": The lexicon is removed from the ",(0,r.jsx)(t.code,{children:"lexicons"})," table and registry."]}),"\n"]}),"\n",(0,r.jsx)(t.h3,{id:"startup-re-fetch",children:"Startup re-fetch"}),"\n",(0,r.jsx)(t.p,{children:"On every startup, HappyView re-fetches all network lexicons from their respective PDSes. This ensures consistency even if events were missed while offline. Failures are logged as warnings but don't block startup."}),"\n",(0,r.jsx)(t.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"scripting",children:"Lua Scripting"}),": Add custom query and procedure logic to your endpoints"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"../reference/xrpc-api",children:"XRPC API"}),": Understand how the generated endpoints behave"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"backfill",children:"Backfill"}),": Learn how historical records are indexed"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"../reference/admin-api",children:"Admin API"}),": Full reference for lexicon management endpoints"]}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(a,{...e})}):a(e)}},8453(e,t,i){i.d(t,{R:()=>o,x:()=>c});var n=i(6540);const r={},s=n.createContext(r);function o(e){const t=n.useContext(s);return n.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),n.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[3993],{7791(e,t,i){i.r(t),i.d(t,{assets:()=>l,contentTitle:()=>c,default:()=>h,frontMatter:()=>o,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"guides/lexicons","title":"Lexicons","description":"Lexicons are the core building block of HappyView. They\'re AT Protocol schema definitions that describe your data model, and HappyView uses them to decide which records to index from the network and what XRPC endpoints to serve.","source":"@site/docs/guides/lexicons.md","sourceDirName":"guides","slug":"/guides/lexicons","permalink":"/guides/lexicons","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Statusphere","permalink":"/tutorials/statusphere"},"next":{"title":"Lua Scripting","permalink":"/guides/scripting"}}');var r=i(4848),s=i(8453);const o={},c="Lexicons",l={},d=[{value:"Supported lexicon types",id:"supported-lexicon-types",level:2},{value:"Target collection",id:"target-collection",level:2},{value:"Backfill flag",id:"backfill-flag",level:2},{value:"Tap collection filters",id:"tap-collection-filters",level:2},{value:"Network lexicons",id:"network-lexicons",level:2},{value:"NSID authority resolution",id:"nsid-authority-resolution",level:3},{value:"Fetching",id:"fetching",level:3},{value:"Live updates via Tap",id:"live-updates-via-tap",level:3},{value:"Startup re-fetch",id:"startup-re-fetch",level:3},{value:"Next steps",id:"next-steps",level:2}];function a(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"lexicons",children:"Lexicons"})}),"\n",(0,r.jsxs)(t.p,{children:["Lexicons are the core building block of HappyView. They're ",(0,r.jsx)(t.a,{href:"https://atproto.com/specs/lexicon",children:"AT Protocol schema definitions"})," that describe your data model, and HappyView uses them to decide which records to index from the network and what XRPC endpoints to serve."]}),"\n",(0,r.jsxs)(t.p,{children:["You don't write route handlers or database queries; you upload a lexicon and HappyView generates the infrastructure from it. There are two ways to add lexicons: uploading them via the ",(0,r.jsx)(t.a,{href:"/reference/admin-api#lexicons",children:"admin API"})," or ",(0,r.jsx)(t.a,{href:"/getting-started/dashboard",children:"dashboard"}),", or fetching them directly from the AT Protocol network via ",(0,r.jsx)(t.a,{href:"#network-lexicons",children:"DNS authority resolution"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"supported-lexicon-types",children:"Supported lexicon types"}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Type"}),(0,r.jsx)(t.th,{children:"Effect"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"record"})}),(0,r.jsx)(t.td,{children:"Syncs the collection filter to Tap and indexes records into Postgres"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"query"})}),(0,r.jsxs)(t.td,{children:["Registers a ",(0,r.jsx)(t.code,{children:"GET /xrpc/{nsid}"})," endpoint that queries indexed records"]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"procedure"})}),(0,r.jsxs)(t.td,{children:["Registers a ",(0,r.jsx)(t.code,{children:"POST /xrpc/{nsid}"})," endpoint that proxies writes to the user's PDS"]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"definitions"})}),(0,r.jsx)(t.td,{children:"Stored but does not generate routes or subscriptions"})]})]})]}),"\n",(0,r.jsxs)(t.p,{children:["A typical setup has three lexicons working together: a ",(0,r.jsx)(t.strong,{children:"record"})," lexicon that defines the data and triggers indexing, a ",(0,r.jsx)(t.strong,{children:"query"})," lexicon that exposes a read endpoint, and a ",(0,r.jsx)(t.strong,{children:"procedure"})," lexicon that exposes a write endpoint. The ",(0,r.jsx)(t.a,{href:"/tutorials/statusphere",children:"Statusphere tutorial"})," walks through this pattern end-to-end."]}),"\n",(0,r.jsx)(t.h2,{id:"target-collection",children:"Target collection"}),"\n",(0,r.jsxs)(t.p,{children:["Query and procedure lexicons don't store data themselves. They operate on records stored by a record-type lexicon. The ",(0,r.jsx)(t.code,{children:"target_collection"})," field tells HappyView which record collection to read from or write to. Without it, default queries and procedures won't know which DB records to operate on."]}),"\n",(0,r.jsxs)(t.p,{children:["For example, a query lexicon ",(0,r.jsx)(t.code,{children:"xyz.statusphere.listStatuses"})," would set ",(0,r.jsx)(t.code,{children:"target_collection"})," to ",(0,r.jsx)(t.code,{children:"xyz.statusphere.status"})," to read from that record collection."]}),"\n",(0,r.jsxs)(t.p,{children:["See the ",(0,r.jsx)(t.a,{href:"/reference/admin-api#upload--upsert-a-lexicon",children:"admin API"})," for how to set ",(0,r.jsx)(t.code,{children:"target_collection"})," when uploading."]}),"\n",(0,r.jsx)(t.admonition,{type:"note",children:(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.code,{children:"target_collection"})," is available in Lua scripts as the ",(0,r.jsx)(t.code,{children:"collection"})," global, but it is not required if your endpoint uses a Lua script."]})}),"\n",(0,r.jsx)(t.h2,{id:"backfill-flag",children:"Backfill flag"}),"\n",(0,r.jsxs)(t.p,{children:["When uploading a record-type lexicon, HappyView automatically creates a backfill job to discover existing records. If you only want to index new records going forward, you can set ",(0,r.jsx)(t.code,{children:"backfill"})," to ",(0,r.jsx)(t.code,{children:"false"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"tap-collection-filters",children:"Tap collection filters"}),"\n",(0,r.jsxs)(t.p,{children:["When record-type lexicons change (uploaded or deleted), HappyView automatically syncs the updated collection filter to Tap. HappyView always includes ",(0,r.jsx)(t.code,{children:"com.atproto.lexicon.schema"})," in the filter to track network lexicon updates."]}),"\n",(0,r.jsxs)(t.p,{children:["Deleting a lexicon updates Tap's collection filters (stopping live indexing for that collection) but does ",(0,r.jsx)(t.strong,{children:"not"})," remove previously indexed repos or their cached state from Tap. To fully reset a collection's state, delete the lexicon, re-add it, and run a ",(0,r.jsx)(t.a,{href:"/guides/backfill",children:"backfill"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"network-lexicons",children:"Network lexicons"}),"\n",(0,r.jsx)(t.p,{children:"If a lexicon has already been published, you don't need to upload the JSON manually. Point HappyView at the NSID and it fetches the lexicon directly from the network. Network lexicons are kept updated automatically via Tap. If the publisher updates their schema, your instance will pick up the change."}),"\n",(0,r.jsx)(t.h3,{id:"nsid-authority-resolution",children:"NSID authority resolution"}),"\n",(0,r.jsxs)(t.p,{children:["Lexicons are stored as records themselves with the ",(0,r.jsx)(t.code,{children:"com.atproto.lexicon.schema"})," NSID and the rkey set to the lexicon's NSID. To find which repo holds a lexicon, HappyView resolves the NSID's authority:"]}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["Extract the authority from the NSID (all segments except the last). For example, ",(0,r.jsx)(t.code,{children:"xyz.statusphere.status"})," has authority ",(0,r.jsx)(t.code,{children:"xyz.statusphere"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["Reverse the authority segments to form a domain: ",(0,r.jsx)(t.code,{children:"statusphere.xyz"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["Look up the DNS TXT record at ",(0,r.jsx)(t.code,{children:"_lexicon.{domain}"})," (e.g. ",(0,r.jsx)(t.code,{children:"_lexicon.statusphere.xyz"}),")."]}),"\n",(0,r.jsxs)(t.li,{children:["Parse the TXT record for a ",(0,r.jsx)(t.code,{children:"did="})," value."]}),"\n",(0,r.jsx)(t.li,{children:"Resolve the DID to a PDS endpoint via the PLC directory."}),"\n"]}),"\n",(0,r.jsx)(t.admonition,{type:"note",children:(0,r.jsxs)(t.p,{children:["The spec states that resolution must be ",(0,r.jsx)(t.strong,{children:"non-hierarchical"}),". Each authority requires its own explicit TXT record. If you have multiple levels of authority (e.g. ",(0,r.jsx)(t.code,{children:"xyz.statusphere.status"})," and ",(0,r.jsx)(t.code,{children:"xyz.statusphere.actor.profile"}),"), each level must have an explicit TXT record."]})}),"\n",(0,r.jsx)(t.h3,{id:"fetching",children:"Fetching"}),"\n",(0,r.jsxs)(t.p,{children:["Once the authority DID and PDS endpoint are known, HappyView calls ",(0,r.jsx)(t.code,{children:"com.atproto.repo.getRecord"})," with:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"repo"})," = the authority DID"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"collection"})," = ",(0,r.jsx)(t.code,{children:"com.atproto.lexicon.schema"})]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"rkey"})," = the NSID"]}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.code,{children:"value"})," field of the response is the raw lexicon JSON."]}),"\n",(0,r.jsx)(t.h3,{id:"live-updates-via-tap",children:"Live updates via Tap"}),"\n",(0,r.jsxs)(t.p,{children:["Tap always subscribes to ",(0,r.jsx)(t.code,{children:"com.atproto.lexicon.schema"})," alongside the dynamic record collections. When a record event arrives:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"create/update"}),": If the event's DID and rkey match a tracked network lexicon (",(0,r.jsx)(t.code,{children:"authority_did"})," and ",(0,r.jsx)(t.code,{children:"nsid"}),"), the lexicon is parsed, upserted into the ",(0,r.jsx)(t.code,{children:"lexicons"})," table and in-memory registry, and collection filters are updated if it's a record type."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"delete"}),": The lexicon is removed from the ",(0,r.jsx)(t.code,{children:"lexicons"})," table and registry."]}),"\n"]}),"\n",(0,r.jsx)(t.h3,{id:"startup-re-fetch",children:"Startup re-fetch"}),"\n",(0,r.jsx)(t.p,{children:"On every startup, HappyView re-fetches all network lexicons from their respective PDSes. This ensures consistency even if events were missed while offline. Failures are logged as warnings but don't block startup."}),"\n",(0,r.jsx)(t.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"/guides/scripting",children:"Lua Scripting"}),": Add custom query and procedure logic to your endpoints"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"/reference/xrpc-api",children:"XRPC API"}),": Understand how the generated endpoints behave"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"/guides/backfill",children:"Backfill"}),": Learn how historical records are indexed"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"/reference/admin-api",children:"Admin API"}),": Full reference for lexicon management endpoints"]}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(a,{...e})}):a(e)}},8453(e,t,i){i.d(t,{R:()=>o,x:()=>c});var n=i(6540);const r={},s=n.createContext(r);function o(e){const t=n.useContext(s);return n.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),n.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e8644baa.3fdd94ab.js b/assets/js/e8644baa.350e6ac9.js similarity index 52% rename from assets/js/e8644baa.3fdd94ab.js rename to assets/js/e8644baa.350e6ac9.js index d1aa37d..21eba36 100644 --- a/assets/js/e8644baa.3fdd94ab.js +++ b/assets/js/e8644baa.350e6ac9.js @@ -1 +1 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[9178],{8525(e,r,t){t.r(r),t.d(r,{assets:()=>a,contentTitle:()=>o,default:()=>u,frontMatter:()=>c,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"reference/scripts/paginated-list","title":"Query: Paginated List","description":"List records from a collection with cursor-based pagination and an optional DID filter.","source":"@site/docs/reference/scripts/paginated-list.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/paginated-list","permalink":"/reference/scripts/paginated-list","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Upsert Record","permalink":"/reference/scripts/upsert-record"},"next":{"title":"List or Fetch","permalink":"/reference/scripts/list-or-fetch"}}');var n=t(4848),i=t(8453);const c={},o="Query: Paginated List",a={},l=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function d(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.header,{children:(0,n.jsx)(r.h1,{id:"query-paginated-list",children:"Query: Paginated List"})}),"\n",(0,n.jsx)(r.p,{children:"List records from a collection with cursor-based pagination and an optional DID filter."}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.strong,{children:"Lexicon type:"})," query"]}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-lua",children:"function handle()\n local limit = tonumber(params.limit) or 20\n if limit > 100 then limit = 100 end\n\n local result = db.query({\n collection = collection,\n did = params.did,\n limit = limit,\n offset = tonumber(params.cursor) or 0,\n })\n\n return result\nend\n"})}),"\n",(0,n.jsx)(r.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,n.jsxs)(r.ol,{children:["\n",(0,n.jsxs)(r.li,{children:["Parse ",(0,n.jsx)(r.code,{children:"limit"})," from the query string, defaulting to 20 and capping at 100."]}),"\n",(0,n.jsxs)(r.li,{children:["Call ",(0,n.jsx)(r.a,{href:"../../guides/scripting#dbquery",children:(0,n.jsx)(r.code,{children:"db.query"})})," with the target collection, optional DID filter, and offset-based pagination."]}),"\n",(0,n.jsxs)(r.li,{children:["Return the result directly. ",(0,n.jsx)(r.code,{children:"db.query"})," returns ",(0,n.jsx)(r.code,{children:'{ records = [...], cursor = "..." }'})," where ",(0,n.jsx)(r.code,{children:"cursor"})," is present when more records exist."]}),"\n"]}),"\n",(0,n.jsx)(r.h2,{id:"usage",children:"Usage"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{children:"GET /xrpc/xyz.statusphere.listStatuses\nGET /xrpc/xyz.statusphere.listStatuses?limit=50\nGET /xrpc/xyz.statusphere.listStatuses?did=did:plc:abc&limit=10\nGET /xrpc/xyz.statusphere.listStatuses?cursor=20&limit=20\n"})}),"\n",(0,n.jsx)(r.h2,{id:"use-case",children:"Use case"}),"\n",(0,n.jsxs)(r.p,{children:["A straightforward list endpoint for feeds, timelines, or browsing records by collection. The ",(0,n.jsx)(r.code,{children:"cursor"})," value returned by ",(0,n.jsx)(r.code,{children:"db.query"})," is an offset. Clients pass it back as the ",(0,n.jsx)(r.code,{children:"cursor"})," parameter to fetch the next page. Since all query parameters arrive as strings, use ",(0,n.jsx)(r.code,{children:"tonumber()"})," to convert ",(0,n.jsx)(r.code,{children:"limit"})," and ",(0,n.jsx)(r.code,{children:"cursor"})," to numbers."]})]})}function u(e={}){const{wrapper:r}={...(0,i.R)(),...e.components};return r?(0,n.jsx)(r,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},8453(e,r,t){t.d(r,{R:()=>c,x:()=>o});var s=t(6540);const n={},i=s.createContext(n);function c(e){const r=s.useContext(i);return s.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function o(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:c(e.components),s.createElement(i.Provider,{value:r},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[9178],{8525(e,r,t){t.r(r),t.d(r,{assets:()=>a,contentTitle:()=>o,default:()=>u,frontMatter:()=>c,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"reference/scripts/paginated-list","title":"Query: Paginated List","description":"List records from a collection with cursor-based pagination and an optional DID filter.","source":"@site/docs/reference/scripts/paginated-list.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/paginated-list","permalink":"/reference/scripts/paginated-list","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Upsert Record","permalink":"/reference/scripts/upsert-record"},"next":{"title":"List or Fetch","permalink":"/reference/scripts/list-or-fetch"}}');var n=t(4848),i=t(8453);const c={},o="Query: Paginated List",a={},l=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function d(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.header,{children:(0,n.jsx)(r.h1,{id:"query-paginated-list",children:"Query: Paginated List"})}),"\n",(0,n.jsx)(r.p,{children:"List records from a collection with cursor-based pagination and an optional DID filter."}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.strong,{children:"Lexicon type:"})," query"]}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-lua",children:"function handle()\n local limit = tonumber(params.limit) or 20\n if limit > 100 then limit = 100 end\n\n local result = db.query({\n collection = collection,\n did = params.did,\n limit = limit,\n offset = tonumber(params.cursor) or 0,\n })\n\n return result\nend\n"})}),"\n",(0,n.jsx)(r.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,n.jsxs)(r.ol,{children:["\n",(0,n.jsxs)(r.li,{children:["Parse ",(0,n.jsx)(r.code,{children:"limit"})," from the query string, defaulting to 20 and capping at 100."]}),"\n",(0,n.jsxs)(r.li,{children:["Call ",(0,n.jsx)(r.a,{href:"/guides/scripting#dbquery",children:(0,n.jsx)(r.code,{children:"db.query"})})," with the target collection, optional DID filter, and offset-based pagination."]}),"\n",(0,n.jsxs)(r.li,{children:["Return the result directly. ",(0,n.jsx)(r.code,{children:"db.query"})," returns ",(0,n.jsx)(r.code,{children:'{ records = [...], cursor = "..." }'})," where ",(0,n.jsx)(r.code,{children:"cursor"})," is present when more records exist."]}),"\n"]}),"\n",(0,n.jsx)(r.h2,{id:"usage",children:"Usage"}),"\n",(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{children:"GET /xrpc/xyz.statusphere.listStatuses\nGET /xrpc/xyz.statusphere.listStatuses?limit=50\nGET /xrpc/xyz.statusphere.listStatuses?did=did:plc:abc&limit=10\nGET /xrpc/xyz.statusphere.listStatuses?cursor=20&limit=20\n"})}),"\n",(0,n.jsx)(r.h2,{id:"use-case",children:"Use case"}),"\n",(0,n.jsxs)(r.p,{children:["A straightforward list endpoint for feeds, timelines, or browsing records by collection. The ",(0,n.jsx)(r.code,{children:"cursor"})," value returned by ",(0,n.jsx)(r.code,{children:"db.query"})," is an offset. Clients pass it back as the ",(0,n.jsx)(r.code,{children:"cursor"})," parameter to fetch the next page. Since all query parameters arrive as strings, use ",(0,n.jsx)(r.code,{children:"tonumber()"})," to convert ",(0,n.jsx)(r.code,{children:"limit"})," and ",(0,n.jsx)(r.code,{children:"cursor"})," to numbers."]})]})}function u(e={}){const{wrapper:r}={...(0,i.R)(),...e.components};return r?(0,n.jsx)(r,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},8453(e,r,t){t.d(r,{R:()=>c,x:()=>o});var s=t(6540);const n={},i=s.createContext(n);function c(e){const r=s.useContext(i);return s.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function o(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:c(e.components),s.createElement(i.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ec125a10.22946749.js b/assets/js/ec125a10.22946749.js deleted file mode 100644 index 31d5aa9..0000000 --- a/assets/js/ec125a10.22946749.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[9659],{2192(e,n,s){s.r(n),s.d(n,{assets:()=>t,contentTitle:()=>c,default:()=>h,frontMatter:()=>r,metadata:()=>i,toc:()=>a});const i=JSON.parse('{"id":"reference/admin-api","title":"Admin API","description":"The admin API lets you manage lexicons, monitor records, run backfill jobs, and control admin access. All endpoints live under /admin and require an AIP-issued Bearer token from a DID that exists in the admins table. You can also manage all of this through the web dashboard.","source":"@site/docs/reference/admin-api.md","sourceDirName":"reference","slug":"/reference/admin-api","permalink":"/reference/admin-api","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"XRPC API","permalink":"/reference/xrpc-api"},"next":{"title":"Get a Record","permalink":"/reference/scripts/get-record"}}');var d=s(4848),l=s(8453);const r={},c="Admin API",t={},a=[{value:"Auth",id:"auth",level:2},{value:"Lexicons",id:"lexicons",level:2},{value:"Upload / upsert a lexicon",id:"upload--upsert-a-lexicon",level:3},{value:"List lexicons",id:"list-lexicons",level:3},{value:"Get a lexicon",id:"get-a-lexicon",level:3},{value:"Delete a lexicon",id:"delete-a-lexicon",level:3},{value:"Network Lexicons",id:"network-lexicons",level:2},{value:"Add a network lexicon",id:"add-a-network-lexicon",level:3},{value:"List network lexicons",id:"list-network-lexicons",level:3},{value:"Remove a network lexicon",id:"remove-a-network-lexicon",level:3},{value:"Stats",id:"stats",level:2},{value:"Record counts",id:"record-counts",level:3},{value:"Tap Stats",id:"tap-stats",level:2},{value:"Get Tap stats",id:"get-tap-stats",level:3},{value:"Backfill",id:"backfill",level:2},{value:"Create a backfill job",id:"create-a-backfill-job",level:3},{value:"List backfill jobs",id:"list-backfill-jobs",level:3},{value:"Admin management",id:"admin-management",level:2},{value:"Add an admin",id:"add-an-admin",level:3},{value:"List admins",id:"list-admins",level:3},{value:"Remove an admin",id:"remove-an-admin",level:3}];function o(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,l.R)(),...e.components};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(n.header,{children:(0,d.jsx)(n.h1,{id:"admin-api",children:"Admin API"})}),"\n",(0,d.jsxs)(n.p,{children:["The admin API lets you manage lexicons, monitor records, run backfill jobs, and control admin access. All endpoints live under ",(0,d.jsx)(n.code,{children:"/admin"})," and require an ",(0,d.jsx)(n.a,{href:"https://github.com/graze-social/aip",children:"AIP"}),"-issued Bearer token from a DID that exists in the ",(0,d.jsx)(n.code,{children:"admins"})," table. You can also manage all of this through the ",(0,d.jsx)(n.a,{href:"../getting-started/dashboard",children:"web dashboard"}),"."]}),"\n",(0,d.jsx)(n.h2,{id:"auth",children:"Auth"}),"\n",(0,d.jsxs)(n.p,{children:["Admin auth works the same as user auth: the Bearer token is validated against AIP's ",(0,d.jsx)(n.code,{children:"/oauth/userinfo"})," endpoint to retrieve the caller's DID. That DID is then checked against the ",(0,d.jsx)(n.code,{children:"admins"})," table."]}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Auto-bootstrap"}),": If the ",(0,d.jsx)(n.code,{children:"admins"})," table is empty, the first authenticated request automatically inserts the caller as the initial admin."]}),"\n",(0,d.jsxs)(n.p,{children:["Non-admin DIDs receive a ",(0,d.jsx)(n.code,{children:"403 Forbidden"})," response."]}),"\n",(0,d.jsxs)(n.p,{children:["All error responses return JSON with an ",(0,d.jsx)(n.code,{children:"error"})," field:"]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-json",children:'{\n "error": "description of what went wrong"\n}\n'})}),"\n",(0,d.jsxs)(n.table,{children:[(0,d.jsx)(n.thead,{children:(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.th,{children:"Status"}),(0,d.jsx)(n.th,{children:"Meaning"})]})}),(0,d.jsxs)(n.tbody,{children:[(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"400 Bad Request"})}),(0,d.jsx)(n.td,{children:"Invalid input (missing required fields, malformed lexicon JSON)"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"401 Unauthorized"})}),(0,d.jsxs)(n.td,{children:["Missing or invalid Bearer token. See ",(0,d.jsx)(n.a,{href:"https://github.com/graze-social/aip",children:"AIP documentation"})," for token issues"]})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"403 Forbidden"})}),(0,d.jsx)(n.td,{children:"Authenticated DID is not in the admins table"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"404 Not Found"})}),(0,d.jsx)(n.td,{children:"Lexicon, admin, or backfill job not found"})]})]})]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'# All examples assume $TOKEN is an AIP-issued access token for an admin DID\nAUTH="Authorization: Bearer $TOKEN"\n'})}),"\n",(0,d.jsx)(n.h2,{id:"lexicons",children:"Lexicons"}),"\n",(0,d.jsx)(n.h3,{id:"upload--upsert-a-lexicon",children:"Upload / upsert a lexicon"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"POST /admin/lexicons\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/admin/lexicons \\\n -H "$AUTH" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "lexicon_json": { "lexicon": 1, "id": "xyz.statusphere.status", "defs": { "main": { "type": "record", "key": "tid", "record": { "type": "object", "required": ["status", "createdAt"], "properties": { "status": { "type": "string", "maxGraphemes": 1 }, "createdAt": { "type": "string", "format": "datetime" } } } } } },\n "backfill": true,\n "target_collection": null\n }\'\n'})}),"\n",(0,d.jsxs)(n.table,{children:[(0,d.jsx)(n.thead,{children:(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.th,{children:"Field"}),(0,d.jsx)(n.th,{children:"Type"}),(0,d.jsx)(n.th,{children:"Required"}),(0,d.jsx)(n.th,{children:"Description"})]})}),(0,d.jsxs)(n.tbody,{children:[(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"lexicon_json"})}),(0,d.jsx)(n.td,{children:"object"}),(0,d.jsx)(n.td,{children:"yes"}),(0,d.jsxs)(n.td,{children:["Raw lexicon JSON (must have ",(0,d.jsx)(n.code,{children:"lexicon: 1"})," and ",(0,d.jsx)(n.code,{children:"id"}),")"]})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"backfill"})}),(0,d.jsx)(n.td,{children:"boolean"}),(0,d.jsx)(n.td,{children:"no"}),(0,d.jsxs)(n.td,{children:["Whether uploading triggers historical backfill (default ",(0,d.jsx)(n.code,{children:"true"}),")"]})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"target_collection"})}),(0,d.jsx)(n.td,{children:"string"}),(0,d.jsx)(n.td,{children:"no"}),(0,d.jsx)(n.td,{children:"For query/procedure lexicons, the record collection they operate on"})]})]})]}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"201 Created"})," (new) or ",(0,d.jsx)(n.code,{children:"200 OK"})," (upsert)"]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-json",children:'{\n "id": "xyz.statusphere.status",\n "revision": 1\n}\n'})}),"\n",(0,d.jsx)(n.h3,{id:"list-lexicons",children:"List lexicons"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"GET /admin/lexicons\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl http://localhost:3000/admin/lexicons -H "$AUTH"\n'})}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"200 OK"})]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-json",children:'[\n {\n "id": "xyz.statusphere.status",\n "revision": 1,\n "lexicon_type": "record",\n "backfill": true,\n "created_at": "2025-01-01T00:00:00Z",\n "updated_at": "2025-01-01T00:00:00Z"\n }\n]\n'})}),"\n",(0,d.jsx)(n.h3,{id:"get-a-lexicon",children:"Get a lexicon"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"GET /admin/lexicons/{id}\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl http://localhost:3000/admin/lexicons/xyz.statusphere.status -H "$AUTH"\n'})}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"200 OK"})," with full lexicon details including raw JSON."]}),"\n",(0,d.jsx)(n.h3,{id:"delete-a-lexicon",children:"Delete a lexicon"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"DELETE /admin/lexicons/{id}\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl -X DELETE http://localhost:3000/admin/lexicons/xyz.statusphere.status -H "$AUTH"\n'})}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"204 No Content"})]}),"\n",(0,d.jsx)(n.h2,{id:"network-lexicons",children:"Network Lexicons"}),"\n",(0,d.jsxs)(n.p,{children:["Network lexicons are fetched from the AT Protocol network via DNS TXT resolution and kept updated via Tap. See ",(0,d.jsx)(n.a,{href:"../guides/lexicons#network-lexicons",children:"Lexicons - Network lexicons"})," for background."]}),"\n",(0,d.jsx)(n.h3,{id:"add-a-network-lexicon",children:"Add a network lexicon"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"POST /admin/network-lexicons\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/admin/network-lexicons \\\n -H "$AUTH" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "nsid": "xyz.statusphere.status",\n "target_collection": null\n }\'\n'})}),"\n",(0,d.jsxs)(n.table,{children:[(0,d.jsx)(n.thead,{children:(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.th,{children:"Field"}),(0,d.jsx)(n.th,{children:"Type"}),(0,d.jsx)(n.th,{children:"Required"}),(0,d.jsx)(n.th,{children:"Description"})]})}),(0,d.jsxs)(n.tbody,{children:[(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"nsid"})}),(0,d.jsx)(n.td,{children:"string"}),(0,d.jsx)(n.td,{children:"yes"}),(0,d.jsx)(n.td,{children:"The NSID of the lexicon to watch"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"target_collection"})}),(0,d.jsx)(n.td,{children:"string"}),(0,d.jsx)(n.td,{children:"no"}),(0,d.jsx)(n.td,{children:"For query/procedure lexicons, the record collection they operate on"})]})]})]}),"\n",(0,d.jsx)(n.p,{children:"HappyView resolves the NSID authority via DNS TXT, fetches the lexicon from the authority's PDS, parses it, and stores it."}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"201 Created"})]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-json",children:'{\n "nsid": "xyz.statusphere.status",\n "authority_did": "did:plc:authority",\n "revision": 1\n}\n'})}),"\n",(0,d.jsx)(n.h3,{id:"list-network-lexicons",children:"List network lexicons"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"GET /admin/network-lexicons\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl http://localhost:3000/admin/network-lexicons -H "$AUTH"\n'})}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"200 OK"})]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-json",children:'[\n {\n "nsid": "xyz.statusphere.status",\n "authority_did": "did:plc:authority",\n "target_collection": null,\n "last_fetched_at": "2025-01-01T00:00:00Z",\n "created_at": "2025-01-01T00:00:00Z"\n }\n]\n'})}),"\n",(0,d.jsx)(n.h3,{id:"remove-a-network-lexicon",children:"Remove a network lexicon"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"DELETE /admin/network-lexicons/{nsid}\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl -X DELETE http://localhost:3000/admin/network-lexicons/xyz.statusphere.status \\\n -H "$AUTH"\n'})}),"\n",(0,d.jsxs)(n.p,{children:["Removes the network lexicon tracking and also deletes the lexicon from the ",(0,d.jsx)(n.code,{children:"lexicons"})," table and in-memory registry."]}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"204 No Content"})]}),"\n",(0,d.jsx)(n.h2,{id:"stats",children:"Stats"}),"\n",(0,d.jsx)(n.h3,{id:"record-counts",children:"Record counts"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"GET /admin/stats\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl http://localhost:3000/admin/stats -H "$AUTH"\n'})}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"200 OK"})]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-json",children:'{\n "total_records": 12345,\n "collections": [{ "collection": "xyz.statusphere.status", "count": 500 }]\n}\n'})}),"\n",(0,d.jsx)(n.h2,{id:"tap-stats",children:"Tap Stats"}),"\n",(0,d.jsxs)(n.p,{children:["Aggregate stats from the ",(0,d.jsx)(n.a,{href:"https://github.com/bluesky-social/indigo/tree/main/cmd/tap",children:"Tap"})," instance. Useful for monitoring backfill progress. See ",(0,d.jsx)(n.a,{href:"../guides/backfill#job-lifecycle",children:"Backfill - Job lifecycle"})," for context."]}),"\n",(0,d.jsx)(n.h3,{id:"get-tap-stats",children:"Get Tap stats"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"GET /admin/tap/stats\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl http://localhost:3000/admin/tap/stats -H "$AUTH"\n'})}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"200 OK"})]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-json",children:'{\n "repo_count": 5234,\n "record_count": 1048576,\n "outbox_buffer": 42\n}\n'})}),"\n",(0,d.jsxs)(n.table,{children:[(0,d.jsx)(n.thead,{children:(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.th,{children:"Field"}),(0,d.jsx)(n.th,{children:"Type"}),(0,d.jsx)(n.th,{children:"Description"})]})}),(0,d.jsxs)(n.tbody,{children:[(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"repo_count"})}),(0,d.jsx)(n.td,{children:"number"}),(0,d.jsx)(n.td,{children:"Total repos Tap is tracking"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"record_count"})}),(0,d.jsx)(n.td,{children:"number"}),(0,d.jsx)(n.td,{children:"Total records Tap has indexed"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"outbox_buffer"})}),(0,d.jsx)(n.td,{children:"number"}),(0,d.jsx)(n.td,{children:"Pending events awaiting delivery (high = Tap is busy)"})]})]})]}),"\n",(0,d.jsxs)(n.p,{children:["Returns ",(0,d.jsx)(n.code,{children:"502 Bad Gateway"})," if Tap is unreachable."]}),"\n",(0,d.jsx)(n.h2,{id:"backfill",children:"Backfill"}),"\n",(0,d.jsx)(n.h3,{id:"create-a-backfill-job",children:"Create a backfill job"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"POST /admin/backfill\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/admin/backfill \\\n -H "$AUTH" \\\n -H "Content-Type: application/json" \\\n -d \'{ "collection": "xyz.statusphere.status" }\'\n'})}),"\n",(0,d.jsxs)(n.table,{children:[(0,d.jsx)(n.thead,{children:(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.th,{children:"Field"}),(0,d.jsx)(n.th,{children:"Type"}),(0,d.jsx)(n.th,{children:"Required"}),(0,d.jsx)(n.th,{children:"Description"})]})}),(0,d.jsxs)(n.tbody,{children:[(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"collection"})}),(0,d.jsx)(n.td,{children:"string"}),(0,d.jsx)(n.td,{children:"no"}),(0,d.jsx)(n.td,{children:"Limit to a single collection (backfills all if omitted)"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"did"})}),(0,d.jsx)(n.td,{children:"string"}),(0,d.jsx)(n.td,{children:"no"}),(0,d.jsx)(n.td,{children:"Limit to a single DID (discovers all via relay if omitted)"})]})]})]}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"201 Created"})]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-json",children:'{\n "id": "550e8400-e29b-41d4-a716-446655440000",\n "status": "pending"\n}\n'})}),"\n",(0,d.jsx)(n.h3,{id:"list-backfill-jobs",children:"List backfill jobs"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"GET /admin/backfill/status\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl http://localhost:3000/admin/backfill/status -H "$AUTH"\n'})}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"200 OK"})]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-json",children:'[\n {\n "id": "550e8400-e29b-41d4-a716-446655440000",\n "collection": "xyz.statusphere.status",\n "did": null,\n "status": "completed",\n "total_repos": 42,\n "processed_repos": 42,\n "total_records": 1000,\n "error": null,\n "started_at": "2025-01-01T00:01:00Z",\n "completed_at": "2025-01-01T00:05:00Z",\n "created_at": "2025-01-01T00:00:00Z"\n }\n]\n'})}),"\n",(0,d.jsx)(n.h2,{id:"admin-management",children:"Admin management"}),"\n",(0,d.jsx)(n.h3,{id:"add-an-admin",children:"Add an admin"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"POST /admin/admins\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/admin/admins \\\n -H "$AUTH" \\\n -H "Content-Type: application/json" \\\n -d \'{ "did": "did:plc:newadmin" }\'\n'})}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"201 Created"})]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-json",children:'{\n "id": "550e8400-e29b-41d4-a716-446655440000",\n "did": "did:plc:newadmin"\n}\n'})}),"\n",(0,d.jsx)(n.h3,{id:"list-admins",children:"List admins"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"GET /admin/admins\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl http://localhost:3000/admin/admins -H "$AUTH"\n'})}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"200 OK"})]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-json",children:'[\n {\n "id": "550e8400-e29b-41d4-a716-446655440000",\n "did": "did:plc:admin",\n "created_at": "2025-01-01T00:00:00Z",\n "last_used_at": "2025-01-02T12:00:00Z"\n }\n]\n'})}),"\n",(0,d.jsx)(n.h3,{id:"remove-an-admin",children:"Remove an admin"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"DELETE /admin/admins/{id}\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl -X DELETE http://localhost:3000/admin/admins/550e8400-e29b-41d4-a716-446655440000 \\\n -H "$AUTH"\n'})}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"204 No Content"})]})]})}function h(e={}){const{wrapper:n}={...(0,l.R)(),...e.components};return n?(0,d.jsx)(n,{...e,children:(0,d.jsx)(o,{...e})}):o(e)}},8453(e,n,s){s.d(n,{R:()=>r,x:()=>c});var i=s(6540);const d={},l=i.createContext(d);function r(e){const n=i.useContext(l);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(d):e.components||d:r(e.components),i.createElement(l.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ec125a10.81999196.js b/assets/js/ec125a10.81999196.js new file mode 100644 index 0000000..8c9de3c --- /dev/null +++ b/assets/js/ec125a10.81999196.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[9659],{2192(e,n,s){s.r(n),s.d(n,{assets:()=>t,contentTitle:()=>c,default:()=>h,frontMatter:()=>r,metadata:()=>i,toc:()=>a});const i=JSON.parse('{"id":"reference/admin-api","title":"Admin API","description":"The admin API lets you manage lexicons, monitor records, run backfill jobs, and control admin access. All endpoints live under /admin and require an AIP-issued Bearer token from a DID that exists in the admins table. You can also manage all of this through the web dashboard.","source":"@site/docs/reference/admin-api.md","sourceDirName":"reference","slug":"/reference/admin-api","permalink":"/reference/admin-api","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"XRPC API","permalink":"/reference/xrpc-api"},"next":{"title":"Get a Record","permalink":"/reference/scripts/get-record"}}');var d=s(4848),l=s(8453);const r={},c="Admin API",t={},a=[{value:"Auth",id:"auth",level:2},{value:"Lexicons",id:"lexicons",level:2},{value:"Upload / upsert a lexicon",id:"upload--upsert-a-lexicon",level:3},{value:"List lexicons",id:"list-lexicons",level:3},{value:"Get a lexicon",id:"get-a-lexicon",level:3},{value:"Delete a lexicon",id:"delete-a-lexicon",level:3},{value:"Network Lexicons",id:"network-lexicons",level:2},{value:"Add a network lexicon",id:"add-a-network-lexicon",level:3},{value:"List network lexicons",id:"list-network-lexicons",level:3},{value:"Remove a network lexicon",id:"remove-a-network-lexicon",level:3},{value:"Stats",id:"stats",level:2},{value:"Record counts",id:"record-counts",level:3},{value:"Tap Stats",id:"tap-stats",level:2},{value:"Get Tap stats",id:"get-tap-stats",level:3},{value:"Backfill",id:"backfill",level:2},{value:"Create a backfill job",id:"create-a-backfill-job",level:3},{value:"List backfill jobs",id:"list-backfill-jobs",level:3},{value:"Admin management",id:"admin-management",level:2},{value:"Add an admin",id:"add-an-admin",level:3},{value:"List admins",id:"list-admins",level:3},{value:"Remove an admin",id:"remove-an-admin",level:3}];function o(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,l.R)(),...e.components};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(n.header,{children:(0,d.jsx)(n.h1,{id:"admin-api",children:"Admin API"})}),"\n",(0,d.jsxs)(n.p,{children:["The admin API lets you manage lexicons, monitor records, run backfill jobs, and control admin access. All endpoints live under ",(0,d.jsx)(n.code,{children:"/admin"})," and require an ",(0,d.jsx)(n.a,{href:"https://github.com/graze-social/aip",children:"AIP"}),"-issued Bearer token from a DID that exists in the ",(0,d.jsx)(n.code,{children:"admins"})," table. You can also manage all of this through the ",(0,d.jsx)(n.a,{href:"/getting-started/dashboard",children:"web dashboard"}),"."]}),"\n",(0,d.jsx)(n.h2,{id:"auth",children:"Auth"}),"\n",(0,d.jsxs)(n.p,{children:["Admin auth works the same as user auth: the Bearer token is validated against AIP's ",(0,d.jsx)(n.code,{children:"/oauth/userinfo"})," endpoint to retrieve the caller's DID. That DID is then checked against the ",(0,d.jsx)(n.code,{children:"admins"})," table."]}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Auto-bootstrap"}),": If the ",(0,d.jsx)(n.code,{children:"admins"})," table is empty, the first authenticated request automatically inserts the caller as the initial admin."]}),"\n",(0,d.jsxs)(n.p,{children:["Non-admin DIDs receive a ",(0,d.jsx)(n.code,{children:"403 Forbidden"})," response."]}),"\n",(0,d.jsxs)(n.p,{children:["All error responses return JSON with an ",(0,d.jsx)(n.code,{children:"error"})," field:"]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-json",children:'{\n "error": "description of what went wrong"\n}\n'})}),"\n",(0,d.jsxs)(n.table,{children:[(0,d.jsx)(n.thead,{children:(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.th,{children:"Status"}),(0,d.jsx)(n.th,{children:"Meaning"})]})}),(0,d.jsxs)(n.tbody,{children:[(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"400 Bad Request"})}),(0,d.jsx)(n.td,{children:"Invalid input (missing required fields, malformed lexicon JSON)"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"401 Unauthorized"})}),(0,d.jsxs)(n.td,{children:["Missing or invalid Bearer token. See ",(0,d.jsx)(n.a,{href:"https://github.com/graze-social/aip",children:"AIP documentation"})," for token issues"]})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"403 Forbidden"})}),(0,d.jsx)(n.td,{children:"Authenticated DID is not in the admins table"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"404 Not Found"})}),(0,d.jsx)(n.td,{children:"Lexicon, admin, or backfill job not found"})]})]})]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'# All examples assume $TOKEN is an AIP-issued access token for an admin DID\nAUTH="Authorization: Bearer $TOKEN"\n'})}),"\n",(0,d.jsx)(n.h2,{id:"lexicons",children:"Lexicons"}),"\n",(0,d.jsx)(n.h3,{id:"upload--upsert-a-lexicon",children:"Upload / upsert a lexicon"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"POST /admin/lexicons\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/admin/lexicons \\\n -H "$AUTH" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "lexicon_json": { "lexicon": 1, "id": "xyz.statusphere.status", "defs": { "main": { "type": "record", "key": "tid", "record": { "type": "object", "required": ["status", "createdAt"], "properties": { "status": { "type": "string", "maxGraphemes": 1 }, "createdAt": { "type": "string", "format": "datetime" } } } } } },\n "backfill": true,\n "target_collection": null\n }\'\n'})}),"\n",(0,d.jsxs)(n.table,{children:[(0,d.jsx)(n.thead,{children:(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.th,{children:"Field"}),(0,d.jsx)(n.th,{children:"Type"}),(0,d.jsx)(n.th,{children:"Required"}),(0,d.jsx)(n.th,{children:"Description"})]})}),(0,d.jsxs)(n.tbody,{children:[(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"lexicon_json"})}),(0,d.jsx)(n.td,{children:"object"}),(0,d.jsx)(n.td,{children:"yes"}),(0,d.jsxs)(n.td,{children:["Raw lexicon JSON (must have ",(0,d.jsx)(n.code,{children:"lexicon: 1"})," and ",(0,d.jsx)(n.code,{children:"id"}),")"]})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"backfill"})}),(0,d.jsx)(n.td,{children:"boolean"}),(0,d.jsx)(n.td,{children:"no"}),(0,d.jsxs)(n.td,{children:["Whether uploading triggers historical backfill (default ",(0,d.jsx)(n.code,{children:"true"}),")"]})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"target_collection"})}),(0,d.jsx)(n.td,{children:"string"}),(0,d.jsx)(n.td,{children:"no"}),(0,d.jsx)(n.td,{children:"For query/procedure lexicons, the record collection they operate on"})]})]})]}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"201 Created"})," (new) or ",(0,d.jsx)(n.code,{children:"200 OK"})," (upsert)"]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-json",children:'{\n "id": "xyz.statusphere.status",\n "revision": 1\n}\n'})}),"\n",(0,d.jsx)(n.h3,{id:"list-lexicons",children:"List lexicons"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"GET /admin/lexicons\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl http://localhost:3000/admin/lexicons -H "$AUTH"\n'})}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"200 OK"})]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-json",children:'[\n {\n "id": "xyz.statusphere.status",\n "revision": 1,\n "lexicon_type": "record",\n "backfill": true,\n "created_at": "2025-01-01T00:00:00Z",\n "updated_at": "2025-01-01T00:00:00Z"\n }\n]\n'})}),"\n",(0,d.jsx)(n.h3,{id:"get-a-lexicon",children:"Get a lexicon"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"GET /admin/lexicons/{id}\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl http://localhost:3000/admin/lexicons/xyz.statusphere.status -H "$AUTH"\n'})}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"200 OK"})," with full lexicon details including raw JSON."]}),"\n",(0,d.jsx)(n.h3,{id:"delete-a-lexicon",children:"Delete a lexicon"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"DELETE /admin/lexicons/{id}\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl -X DELETE http://localhost:3000/admin/lexicons/xyz.statusphere.status -H "$AUTH"\n'})}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"204 No Content"})]}),"\n",(0,d.jsx)(n.h2,{id:"network-lexicons",children:"Network Lexicons"}),"\n",(0,d.jsxs)(n.p,{children:["Network lexicons are fetched from the AT Protocol network via DNS TXT resolution and kept updated via Tap. See ",(0,d.jsx)(n.a,{href:"/guides/lexicons#network-lexicons",children:"Lexicons - Network lexicons"})," for background."]}),"\n",(0,d.jsx)(n.h3,{id:"add-a-network-lexicon",children:"Add a network lexicon"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"POST /admin/network-lexicons\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/admin/network-lexicons \\\n -H "$AUTH" \\\n -H "Content-Type: application/json" \\\n -d \'{\n "nsid": "xyz.statusphere.status",\n "target_collection": null\n }\'\n'})}),"\n",(0,d.jsxs)(n.table,{children:[(0,d.jsx)(n.thead,{children:(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.th,{children:"Field"}),(0,d.jsx)(n.th,{children:"Type"}),(0,d.jsx)(n.th,{children:"Required"}),(0,d.jsx)(n.th,{children:"Description"})]})}),(0,d.jsxs)(n.tbody,{children:[(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"nsid"})}),(0,d.jsx)(n.td,{children:"string"}),(0,d.jsx)(n.td,{children:"yes"}),(0,d.jsx)(n.td,{children:"The NSID of the lexicon to watch"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"target_collection"})}),(0,d.jsx)(n.td,{children:"string"}),(0,d.jsx)(n.td,{children:"no"}),(0,d.jsx)(n.td,{children:"For query/procedure lexicons, the record collection they operate on"})]})]})]}),"\n",(0,d.jsx)(n.p,{children:"HappyView resolves the NSID authority via DNS TXT, fetches the lexicon from the authority's PDS, parses it, and stores it."}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"201 Created"})]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-json",children:'{\n "nsid": "xyz.statusphere.status",\n "authority_did": "did:plc:authority",\n "revision": 1\n}\n'})}),"\n",(0,d.jsx)(n.h3,{id:"list-network-lexicons",children:"List network lexicons"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"GET /admin/network-lexicons\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl http://localhost:3000/admin/network-lexicons -H "$AUTH"\n'})}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"200 OK"})]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-json",children:'[\n {\n "nsid": "xyz.statusphere.status",\n "authority_did": "did:plc:authority",\n "target_collection": null,\n "last_fetched_at": "2025-01-01T00:00:00Z",\n "created_at": "2025-01-01T00:00:00Z"\n }\n]\n'})}),"\n",(0,d.jsx)(n.h3,{id:"remove-a-network-lexicon",children:"Remove a network lexicon"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"DELETE /admin/network-lexicons/{nsid}\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl -X DELETE http://localhost:3000/admin/network-lexicons/xyz.statusphere.status \\\n -H "$AUTH"\n'})}),"\n",(0,d.jsxs)(n.p,{children:["Removes the network lexicon tracking and also deletes the lexicon from the ",(0,d.jsx)(n.code,{children:"lexicons"})," table and in-memory registry."]}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"204 No Content"})]}),"\n",(0,d.jsx)(n.h2,{id:"stats",children:"Stats"}),"\n",(0,d.jsx)(n.h3,{id:"record-counts",children:"Record counts"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"GET /admin/stats\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl http://localhost:3000/admin/stats -H "$AUTH"\n'})}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"200 OK"})]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-json",children:'{\n "total_records": 12345,\n "collections": [{ "collection": "xyz.statusphere.status", "count": 500 }]\n}\n'})}),"\n",(0,d.jsx)(n.h2,{id:"tap-stats",children:"Tap Stats"}),"\n",(0,d.jsxs)(n.p,{children:["Aggregate stats from the ",(0,d.jsx)(n.a,{href:"https://github.com/bluesky-social/indigo/tree/main/cmd/tap",children:"Tap"})," instance. Useful for monitoring backfill progress. See ",(0,d.jsx)(n.a,{href:"/guides/backfill#job-lifecycle",children:"Backfill - Job lifecycle"})," for context."]}),"\n",(0,d.jsx)(n.h3,{id:"get-tap-stats",children:"Get Tap stats"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"GET /admin/tap/stats\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl http://localhost:3000/admin/tap/stats -H "$AUTH"\n'})}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"200 OK"})]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-json",children:'{\n "repo_count": 5234,\n "record_count": 1048576,\n "outbox_buffer": 42\n}\n'})}),"\n",(0,d.jsxs)(n.table,{children:[(0,d.jsx)(n.thead,{children:(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.th,{children:"Field"}),(0,d.jsx)(n.th,{children:"Type"}),(0,d.jsx)(n.th,{children:"Description"})]})}),(0,d.jsxs)(n.tbody,{children:[(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"repo_count"})}),(0,d.jsx)(n.td,{children:"number"}),(0,d.jsx)(n.td,{children:"Total repos Tap is tracking"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"record_count"})}),(0,d.jsx)(n.td,{children:"number"}),(0,d.jsx)(n.td,{children:"Total records Tap has indexed"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"outbox_buffer"})}),(0,d.jsx)(n.td,{children:"number"}),(0,d.jsx)(n.td,{children:"Pending events awaiting delivery (high = Tap is busy)"})]})]})]}),"\n",(0,d.jsxs)(n.p,{children:["Returns ",(0,d.jsx)(n.code,{children:"502 Bad Gateway"})," if Tap is unreachable."]}),"\n",(0,d.jsx)(n.h2,{id:"backfill",children:"Backfill"}),"\n",(0,d.jsx)(n.h3,{id:"create-a-backfill-job",children:"Create a backfill job"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"POST /admin/backfill\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/admin/backfill \\\n -H "$AUTH" \\\n -H "Content-Type: application/json" \\\n -d \'{ "collection": "xyz.statusphere.status" }\'\n'})}),"\n",(0,d.jsxs)(n.table,{children:[(0,d.jsx)(n.thead,{children:(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.th,{children:"Field"}),(0,d.jsx)(n.th,{children:"Type"}),(0,d.jsx)(n.th,{children:"Required"}),(0,d.jsx)(n.th,{children:"Description"})]})}),(0,d.jsxs)(n.tbody,{children:[(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"collection"})}),(0,d.jsx)(n.td,{children:"string"}),(0,d.jsx)(n.td,{children:"no"}),(0,d.jsx)(n.td,{children:"Limit to a single collection (backfills all if omitted)"})]}),(0,d.jsxs)(n.tr,{children:[(0,d.jsx)(n.td,{children:(0,d.jsx)(n.code,{children:"did"})}),(0,d.jsx)(n.td,{children:"string"}),(0,d.jsx)(n.td,{children:"no"}),(0,d.jsx)(n.td,{children:"Limit to a single DID (discovers all via relay if omitted)"})]})]})]}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"201 Created"})]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-json",children:'{\n "id": "550e8400-e29b-41d4-a716-446655440000",\n "status": "pending"\n}\n'})}),"\n",(0,d.jsx)(n.h3,{id:"list-backfill-jobs",children:"List backfill jobs"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"GET /admin/backfill/status\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl http://localhost:3000/admin/backfill/status -H "$AUTH"\n'})}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"200 OK"})]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-json",children:'[\n {\n "id": "550e8400-e29b-41d4-a716-446655440000",\n "collection": "xyz.statusphere.status",\n "did": null,\n "status": "completed",\n "total_repos": 42,\n "processed_repos": 42,\n "total_records": 1000,\n "error": null,\n "started_at": "2025-01-01T00:01:00Z",\n "completed_at": "2025-01-01T00:05:00Z",\n "created_at": "2025-01-01T00:00:00Z"\n }\n]\n'})}),"\n",(0,d.jsx)(n.h2,{id:"admin-management",children:"Admin management"}),"\n",(0,d.jsx)(n.h3,{id:"add-an-admin",children:"Add an admin"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"POST /admin/admins\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl -X POST http://localhost:3000/admin/admins \\\n -H "$AUTH" \\\n -H "Content-Type: application/json" \\\n -d \'{ "did": "did:plc:newadmin" }\'\n'})}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"201 Created"})]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-json",children:'{\n "id": "550e8400-e29b-41d4-a716-446655440000",\n "did": "did:plc:newadmin"\n}\n'})}),"\n",(0,d.jsx)(n.h3,{id:"list-admins",children:"List admins"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"GET /admin/admins\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl http://localhost:3000/admin/admins -H "$AUTH"\n'})}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"200 OK"})]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-json",children:'[\n {\n "id": "550e8400-e29b-41d4-a716-446655440000",\n "did": "did:plc:admin",\n "created_at": "2025-01-01T00:00:00Z",\n "last_used_at": "2025-01-02T12:00:00Z"\n }\n]\n'})}),"\n",(0,d.jsx)(n.h3,{id:"remove-an-admin",children:"Remove an admin"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{children:"DELETE /admin/admins/{id}\n"})}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-sh",children:'curl -X DELETE http://localhost:3000/admin/admins/550e8400-e29b-41d4-a716-446655440000 \\\n -H "$AUTH"\n'})}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.strong,{children:"Response"}),": ",(0,d.jsx)(n.code,{children:"204 No Content"})]})]})}function h(e={}){const{wrapper:n}={...(0,l.R)(),...e.components};return n?(0,d.jsx)(n,{...e,children:(0,d.jsx)(o,{...e})}):o(e)}},8453(e,n,s){s.d(n,{R:()=>r,x:()=>c});var i=s(6540);const d={},l=i.createContext(d);function r(e){const n=i.useContext(l);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(d):e.components||d:r(e.components),i.createElement(l.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f142c65c.551b31a6.js b/assets/js/f142c65c.366ae717.js similarity index 56% rename from assets/js/f142c65c.551b31a6.js rename to assets/js/f142c65c.366ae717.js index 2b57bca..48ce997 100644 --- a/assets/js/f142c65c.551b31a6.js +++ b/assets/js/f142c65c.366ae717.js @@ -1 +1 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[9957],{9573(e,r,n){n.r(r),n.d(r,{assets:()=>d,contentTitle:()=>o,default:()=>u,frontMatter:()=>c,metadata:()=>s,toc:()=>a});const s=JSON.parse('{"id":"reference/scripts/list-or-fetch","title":"Query: List or Fetch Records","description":"This query handles both single-record lookups (when a uri param is provided) and paginated listing.","source":"@site/docs/reference/scripts/list-or-fetch.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/list-or-fetch","permalink":"/reference/scripts/list-or-fetch","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Paginated List","permalink":"/reference/scripts/paginated-list"},"next":{"title":"Expanded Query","permalink":"/reference/scripts/expanded-query"}}');var t=n(4848),i=n(8453);const c={},o="Query: List or Fetch Records",d={},a=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function l(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.header,{children:(0,t.jsx)(r.h1,{id:"query-list-or-fetch-records",children:"Query: List or Fetch Records"})}),"\n",(0,t.jsxs)(r.p,{children:["This query handles both single-record lookups (when a ",(0,t.jsx)(r.code,{children:"uri"})," param is provided) and paginated listing."]}),"\n",(0,t.jsxs)(r.p,{children:[(0,t.jsx)(r.strong,{children:"Lexicon type:"})," query"]}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-lua",children:'function handle()\n if params.uri then\n local record = db.get(params.uri)\n if not record then\n return { error = "record not found" }\n end\n return { record = record }\n end\n\n return db.query({\n collection = collection,\n did = params.did,\n limit = tonumber(params.limit) or 20,\n offset = tonumber(params.cursor) or 0,\n })\nend\n'})}),"\n",(0,t.jsx)(r.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,t.jsxs)(r.ol,{children:["\n",(0,t.jsxs)(r.li,{children:["If a ",(0,t.jsx)(r.code,{children:"uri"})," query parameter is provided, fetch that single record with ",(0,t.jsx)(r.a,{href:"../../guides/scripting#dbget",children:(0,t.jsx)(r.code,{children:"db.get"})})," and return it. If it doesn't exist, return a structured error (using ",(0,t.jsx)(r.code,{children:"error()"})," would trigger a 500 response)."]}),"\n",(0,t.jsxs)(r.li,{children:["Otherwise, list records from the target collection using ",(0,t.jsx)(r.a,{href:"../../guides/scripting#dbquery",children:(0,t.jsx)(r.code,{children:"db.query"})}),", with optional filtering by ",(0,t.jsx)(r.code,{children:"did"})," and pagination via ",(0,t.jsx)(r.code,{children:"limit"}),"/",(0,t.jsx)(r.code,{children:"offset"}),". Since query parameters arrive as strings, ",(0,t.jsx)(r.code,{children:"tonumber()"})," converts them to numbers."]}),"\n"]}),"\n",(0,t.jsx)(r.h2,{id:"usage",children:"Usage"}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{children:"GET /xrpc/xyz.statusphere.listRecords?limit=10\nGET /xrpc/xyz.statusphere.listRecords?did=did:plc:abc\nGET /xrpc/xyz.statusphere.listRecords?uri=at://did:plc:abc/xyz.statusphere.record/abc123\n"})}),"\n",(0,t.jsx)(r.h2,{id:"use-case",children:"Use case"}),"\n",(0,t.jsx)(r.p,{children:"This is a good default query script when you want a single endpoint that serves double duty: list browsing for feeds/timelines and direct record fetching for detail views."})]})}function u(e={}){const{wrapper:r}={...(0,i.R)(),...e.components};return r?(0,t.jsx)(r,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},8453(e,r,n){n.d(r,{R:()=>c,x:()=>o});var s=n(6540);const t={},i=s.createContext(t);function c(e){const r=s.useContext(i);return s.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function o(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:c(e.components),s.createElement(i.Provider,{value:r},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[9957],{9573(e,r,n){n.r(r),n.d(r,{assets:()=>d,contentTitle:()=>o,default:()=>u,frontMatter:()=>c,metadata:()=>s,toc:()=>a});const s=JSON.parse('{"id":"reference/scripts/list-or-fetch","title":"Query: List or Fetch Records","description":"This query handles both single-record lookups (when a uri param is provided) and paginated listing.","source":"@site/docs/reference/scripts/list-or-fetch.md","sourceDirName":"reference/scripts","slug":"/reference/scripts/list-or-fetch","permalink":"/reference/scripts/list-or-fetch","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Paginated List","permalink":"/reference/scripts/paginated-list"},"next":{"title":"Expanded Query","permalink":"/reference/scripts/expanded-query"}}');var t=n(4848),i=n(8453);const c={},o="Query: List or Fetch Records",d={},a=[{value:"How it works",id:"how-it-works",level:2},{value:"Usage",id:"usage",level:2},{value:"Use case",id:"use-case",level:2}];function l(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.header,{children:(0,t.jsx)(r.h1,{id:"query-list-or-fetch-records",children:"Query: List or Fetch Records"})}),"\n",(0,t.jsxs)(r.p,{children:["This query handles both single-record lookups (when a ",(0,t.jsx)(r.code,{children:"uri"})," param is provided) and paginated listing."]}),"\n",(0,t.jsxs)(r.p,{children:[(0,t.jsx)(r.strong,{children:"Lexicon type:"})," query"]}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-lua",children:'function handle()\n if params.uri then\n local record = db.get(params.uri)\n if not record then\n return { error = "record not found" }\n end\n return { record = record }\n end\n\n return db.query({\n collection = collection,\n did = params.did,\n limit = tonumber(params.limit) or 20,\n offset = tonumber(params.cursor) or 0,\n })\nend\n'})}),"\n",(0,t.jsx)(r.h2,{id:"how-it-works",children:"How it works"}),"\n",(0,t.jsxs)(r.ol,{children:["\n",(0,t.jsxs)(r.li,{children:["If a ",(0,t.jsx)(r.code,{children:"uri"})," query parameter is provided, fetch that single record with ",(0,t.jsx)(r.a,{href:"/guides/scripting#dbget",children:(0,t.jsx)(r.code,{children:"db.get"})})," and return it. If it doesn't exist, return a structured error (using ",(0,t.jsx)(r.code,{children:"error()"})," would trigger a 500 response)."]}),"\n",(0,t.jsxs)(r.li,{children:["Otherwise, list records from the target collection using ",(0,t.jsx)(r.a,{href:"/guides/scripting#dbquery",children:(0,t.jsx)(r.code,{children:"db.query"})}),", with optional filtering by ",(0,t.jsx)(r.code,{children:"did"})," and pagination via ",(0,t.jsx)(r.code,{children:"limit"}),"/",(0,t.jsx)(r.code,{children:"offset"}),". Since query parameters arrive as strings, ",(0,t.jsx)(r.code,{children:"tonumber()"})," converts them to numbers."]}),"\n"]}),"\n",(0,t.jsx)(r.h2,{id:"usage",children:"Usage"}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{children:"GET /xrpc/xyz.statusphere.listRecords?limit=10\nGET /xrpc/xyz.statusphere.listRecords?did=did:plc:abc\nGET /xrpc/xyz.statusphere.listRecords?uri=at://did:plc:abc/xyz.statusphere.record/abc123\n"})}),"\n",(0,t.jsx)(r.h2,{id:"use-case",children:"Use case"}),"\n",(0,t.jsx)(r.p,{children:"This is a good default query script when you want a single endpoint that serves double duty: list browsing for feeds/timelines and direct record fetching for detail views."})]})}function u(e={}){const{wrapper:r}={...(0,i.R)(),...e.components};return r?(0,t.jsx)(r,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},8453(e,r,n){n.d(r,{R:()=>c,x:()=>o});var s=n(6540);const t={},i=s.createContext(t);function c(e){const r=s.useContext(i);return s.useMemo(function(){return"function"==typeof e?e(r):{...r,...e}},[r,e])}function o(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:c(e.components),s.createElement(i.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/fac68122.66f4e9f8.js b/assets/js/fac68122.66f4e9f8.js new file mode 100644 index 0000000..f5e0790 --- /dev/null +++ b/assets/js/fac68122.66f4e9f8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[5986],{4924(e,n,t){t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>p,frontMatter:()=>s,metadata:()=>i,toc:()=>c});const i=JSON.parse('{"id":"reference/production-deployment","title":"Deployment","description":"HappyView requires a Postgres database and an AIP instance for OAuth. The Quickstart covers the fastest path with Railway. This page covers other deployment options.","source":"@site/docs/reference/production-deployment.md","sourceDirName":"reference","slug":"/reference/production-deployment","permalink":"/reference/production-deployment","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Troubleshooting","permalink":"/reference/troubleshooting"}}');var o=t(4848),r=t(8453);const s={},a="Deployment",l={},c=[{value:"Docker",id:"docker",level:2},{value:"Production Compose example",id:"production-compose-example",level:3},{value:"Railway / Fly.io / other platforms",id:"railway--flyio--other-platforms",level:2},{value:"Database",id:"database",level:2},{value:"TLS",id:"tls",level:2},{value:"Logging",id:"logging",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"deployment",children:"Deployment"})}),"\n",(0,o.jsxs)(n.p,{children:["HappyView requires a Postgres database and an ",(0,o.jsx)(n.a,{href:"https://github.com/graze-social/aip",children:"AIP"})," instance for OAuth. The ",(0,o.jsx)(n.a,{href:"/getting-started/deployment/railway",children:"Quickstart"})," covers the fastest path with Railway. This page covers other deployment options."]}),"\n",(0,o.jsx)(n.h2,{id:"docker",children:"Docker"}),"\n",(0,o.jsx)(n.p,{children:"Build the image:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-sh",children:"docker build -t happyview .\n"})}),"\n",(0,o.jsxs)(n.p,{children:["For local development, see ",(0,o.jsx)(n.a,{href:"/getting-started/deployment/docker",children:"Docker deployment"}),"."]}),"\n",(0,o.jsx)(n.h3,{id:"production-compose-example",children:"Production Compose example"}),"\n",(0,o.jsx)(n.admonition,{type:"note",children:(0,o.jsxs)(n.p,{children:["This example omits ",(0,o.jsx)(n.a,{href:"https://github.com/bluesky-social/indigo/tree/main/cmd/tap",children:"Tap"}),", which is required for real-time record streaming and backfill. See the full ",(0,o.jsx)(n.code,{children:"docker-compose.yml"})," in the repository for a complete configuration including Tap."]})}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-yaml",children:'services:\n postgres:\n image: postgres:17\n environment:\n POSTGRES_USER: happyview\n POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"\n POSTGRES_DB: happyview\n volumes:\n - pgdata:/var/lib/postgresql/data\n\n happyview:\n image: happyview:latest\n ports:\n - "3000:3000"\n environment:\n DATABASE_URL: "postgres://happyview:${POSTGRES_PASSWORD}@postgres/happyview"\n AIP_URL: "https://aip.example.com"\n depends_on:\n postgres:\n condition: service_healthy\n\nvolumes:\n pgdata:\n'})}),"\n",(0,o.jsx)(n.h2,{id:"railway--flyio--other-platforms",children:"Railway / Fly.io / other platforms"}),"\n",(0,o.jsx)(n.p,{children:"The general process for any hosting platform:"}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsx)(n.li,{children:"Provision a Postgres 17+ database"}),"\n",(0,o.jsxs)(n.li,{children:["Deploy an ",(0,o.jsx)(n.a,{href:"https://github.com/graze-social/aip",children:"AIP"})," instance (handles OAuth for your AppView)"]}),"\n",(0,o.jsxs)(n.li,{children:["Set ",(0,o.jsx)(n.code,{children:"DATABASE_URL"})," and ",(0,o.jsx)(n.code,{children:"AIP_URL"})," environment variables (see ",(0,o.jsx)(n.a,{href:"/getting-started/configuration",children:"Configuration"})," for all options)"]}),"\n",(0,o.jsx)(n.li,{children:"Deploy the Docker image or build from source"}),"\n",(0,o.jsxs)(n.li,{children:["HappyView listens on ",(0,o.jsx)(n.code,{children:"PORT"})," (default ",(0,o.jsx)(n.code,{children:"3000"}),")"]}),"\n",(0,o.jsxs)(n.li,{children:["Health check: ",(0,o.jsx)(n.code,{children:"GET /health"})," returns ",(0,o.jsx)(n.code,{children:"ok"})]}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["For Railway specifically, the ",(0,o.jsx)(n.a,{href:"/getting-started/deployment/railway",children:"Quickstart"})," template handles all of this with a single click."]}),"\n",(0,o.jsx)(n.h2,{id:"database",children:"Database"}),"\n",(0,o.jsxs)(n.p,{children:["Migrations run automatically on startup via ",(0,o.jsx)(n.code,{children:"sqlx::migrate!()"}),". No manual migration step is needed."]}),"\n",(0,o.jsx)(n.h2,{id:"tls",children:"TLS"}),"\n",(0,o.jsx)(n.p,{children:"HappyView does not terminate TLS. Put it behind a reverse proxy (nginx, Caddy, Cloudflare Tunnel, etc.) for HTTPS."}),"\n",(0,o.jsx)(n.h2,{id:"logging",children:"Logging"}),"\n",(0,o.jsxs)(n.p,{children:["HappyView uses the ",(0,o.jsx)(n.code,{children:"RUST_LOG"})," environment variable to control log output. The default (",(0,o.jsx)(n.code,{children:"happyview=debug,tower_http=debug"}),") logs all HappyView activity and HTTP requests. For production, consider ",(0,o.jsx)(n.code,{children:"happyview=info,tower_http=info"})," to reduce noise. See ",(0,o.jsx)(n.a,{href:"/getting-started/configuration",children:"Configuration"})," for details."]})]})}function p(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453(e,n,t){t.d(n,{R:()=>s,x:()=>a});var i=t(6540);const o={},r=i.createContext(o);function s(e){const n=i.useContext(r);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),i.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/fac68122.c6f4e6d6.js b/assets/js/fac68122.c6f4e6d6.js deleted file mode 100644 index 04786fc..0000000 --- a/assets/js/fac68122.c6f4e6d6.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[5986],{4924(e,n,t){t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>p,frontMatter:()=>s,metadata:()=>i,toc:()=>c});const i=JSON.parse('{"id":"reference/production-deployment","title":"Deployment","description":"HappyView requires a Postgres database and an AIP instance for OAuth. The Quickstart covers the fastest path with Railway. This page covers other deployment options.","source":"@site/docs/reference/production-deployment.md","sourceDirName":"reference","slug":"/reference/production-deployment","permalink":"/reference/production-deployment","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Troubleshooting","permalink":"/reference/troubleshooting"}}');var o=t(4848),r=t(8453);const s={},a="Deployment",l={},c=[{value:"Docker",id:"docker",level:2},{value:"Production Compose example",id:"production-compose-example",level:3},{value:"Railway / Fly.io / other platforms",id:"railway--flyio--other-platforms",level:2},{value:"Database",id:"database",level:2},{value:"TLS",id:"tls",level:2},{value:"Logging",id:"logging",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"deployment",children:"Deployment"})}),"\n",(0,o.jsxs)(n.p,{children:["HappyView requires a Postgres database and an ",(0,o.jsx)(n.a,{href:"https://github.com/graze-social/aip",children:"AIP"})," instance for OAuth. The ",(0,o.jsx)(n.a,{href:"../getting-started/deployment/railway",children:"Quickstart"})," covers the fastest path with Railway. This page covers other deployment options."]}),"\n",(0,o.jsx)(n.h2,{id:"docker",children:"Docker"}),"\n",(0,o.jsx)(n.p,{children:"Build the image:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-sh",children:"docker build -t happyview .\n"})}),"\n",(0,o.jsxs)(n.p,{children:["For local development, see ",(0,o.jsx)(n.a,{href:"../getting-started/deployment/docker",children:"Docker deployment"}),"."]}),"\n",(0,o.jsx)(n.h3,{id:"production-compose-example",children:"Production Compose example"}),"\n",(0,o.jsx)(n.admonition,{type:"note",children:(0,o.jsxs)(n.p,{children:["This example omits ",(0,o.jsx)(n.a,{href:"https://github.com/bluesky-social/indigo/tree/main/cmd/tap",children:"Tap"}),", which is required for real-time record streaming and backfill. See the full ",(0,o.jsx)(n.code,{children:"docker-compose.yml"})," in the repository for a complete configuration including Tap."]})}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-yaml",children:'services:\n postgres:\n image: postgres:17\n environment:\n POSTGRES_USER: happyview\n POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"\n POSTGRES_DB: happyview\n volumes:\n - pgdata:/var/lib/postgresql/data\n\n happyview:\n image: happyview:latest\n ports:\n - "3000:3000"\n environment:\n DATABASE_URL: "postgres://happyview:${POSTGRES_PASSWORD}@postgres/happyview"\n AIP_URL: "https://aip.example.com"\n depends_on:\n postgres:\n condition: service_healthy\n\nvolumes:\n pgdata:\n'})}),"\n",(0,o.jsx)(n.h2,{id:"railway--flyio--other-platforms",children:"Railway / Fly.io / other platforms"}),"\n",(0,o.jsx)(n.p,{children:"The general process for any hosting platform:"}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsx)(n.li,{children:"Provision a Postgres 17+ database"}),"\n",(0,o.jsxs)(n.li,{children:["Deploy an ",(0,o.jsx)(n.a,{href:"https://github.com/graze-social/aip",children:"AIP"})," instance (handles OAuth for your AppView)"]}),"\n",(0,o.jsxs)(n.li,{children:["Set ",(0,o.jsx)(n.code,{children:"DATABASE_URL"})," and ",(0,o.jsx)(n.code,{children:"AIP_URL"})," environment variables (see ",(0,o.jsx)(n.a,{href:"../getting-started/configuration",children:"Configuration"})," for all options)"]}),"\n",(0,o.jsx)(n.li,{children:"Deploy the Docker image or build from source"}),"\n",(0,o.jsxs)(n.li,{children:["HappyView listens on ",(0,o.jsx)(n.code,{children:"PORT"})," (default ",(0,o.jsx)(n.code,{children:"3000"}),")"]}),"\n",(0,o.jsxs)(n.li,{children:["Health check: ",(0,o.jsx)(n.code,{children:"GET /health"})," returns ",(0,o.jsx)(n.code,{children:"ok"})]}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["For Railway specifically, the ",(0,o.jsx)(n.a,{href:"../getting-started/deployment/railway",children:"Quickstart"})," template handles all of this with a single click."]}),"\n",(0,o.jsx)(n.h2,{id:"database",children:"Database"}),"\n",(0,o.jsxs)(n.p,{children:["Migrations run automatically on startup via ",(0,o.jsx)(n.code,{children:"sqlx::migrate!()"}),". No manual migration step is needed."]}),"\n",(0,o.jsx)(n.h2,{id:"tls",children:"TLS"}),"\n",(0,o.jsx)(n.p,{children:"HappyView does not terminate TLS. Put it behind a reverse proxy (nginx, Caddy, Cloudflare Tunnel, etc.) for HTTPS."}),"\n",(0,o.jsx)(n.h2,{id:"logging",children:"Logging"}),"\n",(0,o.jsxs)(n.p,{children:["HappyView uses the ",(0,o.jsx)(n.code,{children:"RUST_LOG"})," environment variable to control log output. The default (",(0,o.jsx)(n.code,{children:"happyview=debug,tower_http=debug"}),") logs all HappyView activity and HTTP requests. For production, consider ",(0,o.jsx)(n.code,{children:"happyview=info,tower_http=info"})," to reduce noise. See ",(0,o.jsx)(n.a,{href:"../getting-started/configuration",children:"Configuration"})," for details."]})]})}function p(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453(e,n,t){t.d(n,{R:()=>s,x:()=>a});var i=t(6540);const o={},r=i.createContext(o);function s(e){const n=i.useContext(r);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),i.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/fbd7a87c.e3e74927.js b/assets/js/fbd7a87c.e3e74927.js new file mode 100644 index 0000000..e91f0e7 --- /dev/null +++ b/assets/js/fbd7a87c.e3e74927.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[1361],{8594(e,t,n){n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>d,default:()=>h,frontMatter:()=>o,metadata:()=>r,toc:()=>c});const r=JSON.parse('{"id":"getting-started/quickstart","title":"Quickstart","description":"This page walks you through the fastest path to a working HappyView instance. By the end, you\'ll have an AppView that indexes records from the AT Protocol network and serves XRPC endpoints.","source":"@site/docs/getting-started/quickstart.md","sourceDirName":"getting-started","slug":"/getting-started/quickstart","permalink":"/getting-started/quickstart","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Introduction","permalink":"/"},"next":{"title":"Railway","permalink":"/getting-started/deployment/railway"}}');var i=n(4848),s=n(8453);const o={},d="Quickstart",a={},c=[{value:"1. Deploy HappyView",id:"1-deploy-happyview",level:2},{value:"2. Log in to the dashboard",id:"2-log-in-to-the-dashboard",level:2},{value:"3. Add your first lexicon",id:"3-add-your-first-lexicon",level:2},{value:"4. Verify records are being indexed",id:"4-verify-records-are-being-indexed",level:2},{value:"5. Query your data",id:"5-query-your-data",level:2},{value:"Next steps",id:"next-steps",level:2}];function l(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.header,{children:(0,i.jsx)(t.h1,{id:"quickstart",children:"Quickstart"})}),"\n",(0,i.jsx)(t.p,{children:"This page walks you through the fastest path to a working HappyView instance. By the end, you'll have an AppView that indexes records from the AT Protocol network and serves XRPC endpoints."}),"\n",(0,i.jsx)(t.h2,{id:"1-deploy-happyview",children:"1. Deploy HappyView"}),"\n",(0,i.jsx)(t.p,{children:"Pick whichever option fits your situation:"}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:"Option"}),(0,i.jsx)(t.th,{children:"Best for"})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.a,{href:"/getting-started/deployment/railway",children:(0,i.jsx)(t.strong,{children:"Railway"})})}),(0,i.jsx)(t.td,{children:"Fastest path \u2014 one-click deploy of the full stack (HappyView + AIP + Tap + Postgres)"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.a,{href:"/getting-started/deployment/docker",children:(0,i.jsx)(t.strong,{children:"Docker Compose"})})}),(0,i.jsx)(t.td,{children:"Local development with the full stack running in containers"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.a,{href:"/getting-started/deployment/other",children:(0,i.jsx)(t.strong,{children:"From source"})})}),(0,i.jsxs)(t.td,{children:["Running HappyView with ",(0,i.jsx)(t.code,{children:"cargo run"})," and managing dependencies yourself"]})]})]})]}),"\n",(0,i.jsx)(t.p,{children:"If you're just trying HappyView for the first time, start with Railway."}),"\n",(0,i.jsx)(t.h2,{id:"2-log-in-to-the-dashboard",children:"2. Log in to the dashboard"}),"\n",(0,i.jsxs)(t.p,{children:["Open your HappyView instance in a browser. The built-in ",(0,i.jsx)(t.a,{href:"/getting-started/dashboard",children:"dashboard"})," is served at the root URL."]}),"\n",(0,i.jsxs)(t.p,{children:["Click ",(0,i.jsx)(t.strong,{children:"Log in"})," and authenticate with your AT Protocol identity. On a fresh deployment with no admins configured, the first authenticated request to any admin endpoint automatically bootstraps that user as an admin."]}),"\n",(0,i.jsx)(t.h2,{id:"3-add-your-first-lexicon",children:"3. Add your first lexicon"}),"\n",(0,i.jsx)(t.p,{children:"Lexicons tell HappyView what data to index and what endpoints to serve. The quickest way to get started is to add one from the network:"}),"\n",(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsxs)(t.li,{children:["In the dashboard, go to ",(0,i.jsx)(t.strong,{children:"Lexicons > Add Lexicon > Network"})]}),"\n",(0,i.jsxs)(t.li,{children:["Enter an NSID (e.g. ",(0,i.jsx)(t.code,{children:"xyz.statusphere.status"}),")"]}),"\n",(0,i.jsx)(t.li,{children:"HappyView resolves the schema from the AT Protocol network and shows a preview"}),"\n",(0,i.jsxs)(t.li,{children:["Click ",(0,i.jsx)(t.strong,{children:"Add"})]}),"\n"]}),"\n",(0,i.jsx)(t.p,{children:"HappyView immediately starts indexing records for that collection. A backfill job is created to fetch historical records, and new records stream in via Tap in real time."}),"\n",(0,i.jsxs)(t.p,{children:["You can also upload lexicons manually via the dashboard or the ",(0,i.jsx)(t.a,{href:"/reference/admin-api",children:"admin API"}),". See ",(0,i.jsx)(t.a,{href:"/guides/lexicons",children:"Lexicons"})," for the full details."]}),"\n",(0,i.jsx)(t.h2,{id:"4-verify-records-are-being-indexed",children:"4. Verify records are being indexed"}),"\n",(0,i.jsxs)(t.p,{children:["Go to the ",(0,i.jsx)(t.strong,{children:"Dashboard"})," home page. The stat cards show the total record count and a breakdown by collection. You can also browse indexed records on the ",(0,i.jsx)(t.strong,{children:"Records"})," page."]}),"\n",(0,i.jsxs)(t.p,{children:["To check backfill progress, go to the ",(0,i.jsx)(t.strong,{children:"Backfill"})," page. The Tap stats cards show how many repos and records Tap has processed."]}),"\n",(0,i.jsx)(t.h2,{id:"5-query-your-data",children:"5. Query your data"}),"\n",(0,i.jsxs)(t.p,{children:["Once you have a record lexicon indexed, add a query lexicon to expose a read endpoint. Go to ",(0,i.jsx)(t.strong,{children:"Lexicons > Add Lexicon > Local"})," and create a query lexicon with ",(0,i.jsx)(t.code,{children:"target_collection"})," set to your record collection's NSID."]}),"\n",(0,i.jsxs)(t.p,{children:["Without a Lua script, HappyView generates a default query endpoint that supports ",(0,i.jsx)(t.code,{children:"limit"}),", ",(0,i.jsx)(t.code,{children:"cursor"}),", ",(0,i.jsx)(t.code,{children:"did"}),", and ",(0,i.jsx)(t.code,{children:"uri"})," parameters:"]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:"GET /xrpc/xyz.statusphere.listStatuses?limit=5\n"})}),"\n",(0,i.jsxs)(t.p,{children:["For custom query logic, attach a ",(0,i.jsx)(t.a,{href:"/guides/scripting",children:"Lua script"}),"."]}),"\n",(0,i.jsx)(t.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,i.jsx)(t.p,{children:"You now have a working AppView. Here's where to go from here:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"/tutorials/statusphere",children:(0,i.jsx)(t.strong,{children:"Statusphere tutorial"})}),": end-to-end walkthrough building a complete AppView with record, query, and procedure lexicons"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"/guides/lexicons",children:(0,i.jsx)(t.strong,{children:"Lexicons guide"})}),": target collections, backfill flag, network lexicons"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"/guides/scripting",children:(0,i.jsx)(t.strong,{children:"Lua Scripting"})}),": custom query and procedure logic"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"/getting-started/configuration",children:(0,i.jsx)(t.strong,{children:"Configuration"})}),": environment variables and tuning"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"/getting-started/authentication",children:(0,i.jsx)(t.strong,{children:"Authentication"})}),": how OAuth works and how to get API tokens"]}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}},8453(e,t,n){n.d(t,{R:()=>o,x:()=>d});var r=n(6540);const i={},s=r.createContext(i);function o(e){const t=r.useContext(s);return r.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),r.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/fbd7a87c.fbacae2b.js b/assets/js/fbd7a87c.fbacae2b.js deleted file mode 100644 index e5b95af..0000000 --- a/assets/js/fbd7a87c.fbacae2b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[1361],{8594(e,t,n){n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>d,default:()=>h,frontMatter:()=>o,metadata:()=>r,toc:()=>c});const r=JSON.parse('{"id":"getting-started/quickstart","title":"Quickstart","description":"This page walks you through the fastest path to a working HappyView instance. By the end, you\'ll have an AppView that indexes records from the AT Protocol network and serves XRPC endpoints.","source":"@site/docs/getting-started/quickstart.md","sourceDirName":"getting-started","slug":"/getting-started/quickstart","permalink":"/getting-started/quickstart","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Introduction","permalink":"/"},"next":{"title":"Railway","permalink":"/getting-started/deployment/railway"}}');var i=n(4848),s=n(8453);const o={},d="Quickstart",a={},c=[{value:"1. Deploy HappyView",id:"1-deploy-happyview",level:2},{value:"2. Log in to the dashboard",id:"2-log-in-to-the-dashboard",level:2},{value:"3. Add your first lexicon",id:"3-add-your-first-lexicon",level:2},{value:"4. Verify records are being indexed",id:"4-verify-records-are-being-indexed",level:2},{value:"5. Query your data",id:"5-query-your-data",level:2},{value:"Next steps",id:"next-steps",level:2}];function l(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.header,{children:(0,i.jsx)(t.h1,{id:"quickstart",children:"Quickstart"})}),"\n",(0,i.jsx)(t.p,{children:"This page walks you through the fastest path to a working HappyView instance. By the end, you'll have an AppView that indexes records from the AT Protocol network and serves XRPC endpoints."}),"\n",(0,i.jsx)(t.h2,{id:"1-deploy-happyview",children:"1. Deploy HappyView"}),"\n",(0,i.jsx)(t.p,{children:"Pick whichever option fits your situation:"}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:"Option"}),(0,i.jsx)(t.th,{children:"Best for"})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.a,{href:"deployment/railway",children:(0,i.jsx)(t.strong,{children:"Railway"})})}),(0,i.jsx)(t.td,{children:"Fastest path \u2014 one-click deploy of the full stack (HappyView + AIP + Tap + Postgres)"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.a,{href:"deployment/docker",children:(0,i.jsx)(t.strong,{children:"Docker Compose"})})}),(0,i.jsx)(t.td,{children:"Local development with the full stack running in containers"})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:(0,i.jsx)(t.a,{href:"deployment/other",children:(0,i.jsx)(t.strong,{children:"From source"})})}),(0,i.jsxs)(t.td,{children:["Running HappyView with ",(0,i.jsx)(t.code,{children:"cargo run"})," and managing dependencies yourself"]})]})]})]}),"\n",(0,i.jsx)(t.p,{children:"If you're just trying HappyView for the first time, start with Railway."}),"\n",(0,i.jsx)(t.h2,{id:"2-log-in-to-the-dashboard",children:"2. Log in to the dashboard"}),"\n",(0,i.jsxs)(t.p,{children:["Open your HappyView instance in a browser. The built-in ",(0,i.jsx)(t.a,{href:"dashboard",children:"dashboard"})," is served at the root URL."]}),"\n",(0,i.jsxs)(t.p,{children:["Click ",(0,i.jsx)(t.strong,{children:"Log in"})," and authenticate with your AT Protocol identity. On a fresh deployment with no admins configured, the first authenticated request to any admin endpoint automatically bootstraps that user as an admin."]}),"\n",(0,i.jsx)(t.h2,{id:"3-add-your-first-lexicon",children:"3. Add your first lexicon"}),"\n",(0,i.jsx)(t.p,{children:"Lexicons tell HappyView what data to index and what endpoints to serve. The quickest way to get started is to add one from the network:"}),"\n",(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsxs)(t.li,{children:["In the dashboard, go to ",(0,i.jsx)(t.strong,{children:"Lexicons > Add Lexicon > Network"})]}),"\n",(0,i.jsxs)(t.li,{children:["Enter an NSID (e.g. ",(0,i.jsx)(t.code,{children:"xyz.statusphere.status"}),")"]}),"\n",(0,i.jsx)(t.li,{children:"HappyView resolves the schema from the AT Protocol network and shows a preview"}),"\n",(0,i.jsxs)(t.li,{children:["Click ",(0,i.jsx)(t.strong,{children:"Add"})]}),"\n"]}),"\n",(0,i.jsx)(t.p,{children:"HappyView immediately starts indexing records for that collection. A backfill job is created to fetch historical records, and new records stream in via Tap in real time."}),"\n",(0,i.jsxs)(t.p,{children:["You can also upload lexicons manually via the dashboard or the ",(0,i.jsx)(t.a,{href:"../reference/admin-api",children:"admin API"}),". See ",(0,i.jsx)(t.a,{href:"../guides/lexicons",children:"Lexicons"})," for the full details."]}),"\n",(0,i.jsx)(t.h2,{id:"4-verify-records-are-being-indexed",children:"4. Verify records are being indexed"}),"\n",(0,i.jsxs)(t.p,{children:["Go to the ",(0,i.jsx)(t.strong,{children:"Dashboard"})," home page. The stat cards show the total record count and a breakdown by collection. You can also browse indexed records on the ",(0,i.jsx)(t.strong,{children:"Records"})," page."]}),"\n",(0,i.jsxs)(t.p,{children:["To check backfill progress, go to the ",(0,i.jsx)(t.strong,{children:"Backfill"})," page. The Tap stats cards show how many repos and records Tap has processed."]}),"\n",(0,i.jsx)(t.h2,{id:"5-query-your-data",children:"5. Query your data"}),"\n",(0,i.jsxs)(t.p,{children:["Once you have a record lexicon indexed, add a query lexicon to expose a read endpoint. Go to ",(0,i.jsx)(t.strong,{children:"Lexicons > Add Lexicon > Local"})," and create a query lexicon with ",(0,i.jsx)(t.code,{children:"target_collection"})," set to your record collection's NSID."]}),"\n",(0,i.jsxs)(t.p,{children:["Without a Lua script, HappyView generates a default query endpoint that supports ",(0,i.jsx)(t.code,{children:"limit"}),", ",(0,i.jsx)(t.code,{children:"cursor"}),", ",(0,i.jsx)(t.code,{children:"did"}),", and ",(0,i.jsx)(t.code,{children:"uri"})," parameters:"]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:"GET /xrpc/xyz.statusphere.listStatuses?limit=5\n"})}),"\n",(0,i.jsxs)(t.p,{children:["For custom query logic, attach a ",(0,i.jsx)(t.a,{href:"../guides/scripting",children:"Lua script"}),"."]}),"\n",(0,i.jsx)(t.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,i.jsx)(t.p,{children:"You now have a working AppView. Here's where to go from here:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"../tutorials/statusphere",children:(0,i.jsx)(t.strong,{children:"Statusphere tutorial"})}),": end-to-end walkthrough building a complete AppView with record, query, and procedure lexicons"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"../guides/lexicons",children:(0,i.jsx)(t.strong,{children:"Lexicons guide"})}),": target collections, backfill flag, network lexicons"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"../guides/scripting",children:(0,i.jsx)(t.strong,{children:"Lua Scripting"})}),": custom query and procedure logic"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"configuration",children:(0,i.jsx)(t.strong,{children:"Configuration"})}),": environment variables and tuning"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.a,{href:"authentication",children:(0,i.jsx)(t.strong,{children:"Authentication"})}),": how OAuth works and how to get API tokens"]}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}},8453(e,t,n){n.d(t,{R:()=>o,x:()=>d});var r=n(6540);const i={},s=r.createContext(i);function o(e){const t=r.useContext(s);return r.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),r.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/main.ae5bb244.js b/assets/js/main.00f36f1d.js similarity index 99% rename from assets/js/main.ae5bb244.js rename to assets/js/main.00f36f1d.js index c47d569..192aa08 100644 --- a/assets/js/main.ae5bb244.js +++ b/assets/js/main.00f36f1d.js @@ -1,2 +1,2 @@ -/*! For license information please see main.ae5bb244.js.LICENSE.txt */ -(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[8792],{8328(e,t,n){"use strict";n.d(t,{A:()=>f});n(6540);var r=n(3259),a=n.n(r),o=n(4054);const i={"009f1e98":[function(){return n.e(7715).then(n.bind(n,3511))},"@site/docs/getting-started/configuration.md",3511],"111eee19":[function(){return n.e(8779).then(n.bind(n,9071))},"@site/docs/reference/troubleshooting.md",9071],"121e86a6":[function(){return n.e(5011).then(n.bind(n,7544))},"@site/docs/reference/scripts/get-record.md",7544],17896441:[function(){return Promise.all([n.e(1869),n.e(8401)]).then(n.bind(n,1527))},"@theme/DocItem",1527],"22dd74f7":[function(){return n.e(1567).then(n.t.bind(n,5226,19))},"@generated/docusaurus-plugin-content-docs/default/p/index-466.json",5226],"23374ca6":[function(){return n.e(2278).then(n.bind(n,7403))},"@site/docs/README.md",7403],"280f48ec":[function(){return n.e(787).then(n.bind(n,4796))},"@site/docs/reference/scripts/sidecar-records.md",4796],"33ec3d65":[function(){return n.e(6803).then(n.bind(n,6974))},"@site/docs/reference/architecture.md",6974],"43880f7a":[function(){return n.e(6590).then(n.bind(n,1572))},"@site/docs/reference/scripts/create-record.md",1572],"539fb2af":[function(){return n.e(5563).then(n.bind(n,8289))},"@site/docs/getting-started/dashboard.md",8289],"5d3a5990":[function(){return n.e(3197).then(n.bind(n,7825))},"@site/docs/reference/scripts/expanded-query.md",7825],"5e95c892":[function(){return n.e(9647).then(n.bind(n,7121))},"@theme/DocsRoot",7121],"5fd2dbdb":[function(){return n.e(4440).then(n.bind(n,6395))},"@site/docs/tutorials/statusphere.md",6395],"6acefe75":[function(){return n.e(6495).then(n.bind(n,1438))},"@site/docs/reference/scripts/update-or-delete.md",1438],"846656e5":[function(){return n.e(9492).then(n.bind(n,5231))},"@site/docs/reference/glossary.md",5231],"89877b86":[function(){return n.e(7520).then(n.bind(n,2749))},"@site/docs/getting-started/deployment/docker.md",2749],"919abb94":[function(){return n.e(20).then(n.bind(n,521))},"@site/docs/reference/scripts/upsert-record.md",521],"920ba7ef":[function(){return n.e(5953).then(n.bind(n,1189))},"@site/docs/guides/scripting.md",1189],"9985d6d5":[function(){return n.e(203).then(n.bind(n,2223))},"@site/docs/getting-started/deployment/railway.md",2223],a4086a70:[function(){return n.e(7194).then(n.bind(n,9297))},"@site/docs/reference/scripts/batch-save.md",9297],a51dfc20:[function(){return n.e(8897).then(n.bind(n,4783))},"@site/docs/reference/xrpc-api.md",4783],a77ba7fa:[function(){return n.e(6087).then(n.bind(n,6494))},"@site/docs/getting-started/authentication.md",6494],a7bd4aaa:[function(){return n.e(7098).then(n.bind(n,1723))},"@theme/DocVersionRoot",1723],a94703ab:[function(){return Promise.all([n.e(1869),n.e(9048)]).then(n.bind(n,8115))},"@theme/DocRoot",8115],aba21aa0:[function(){return n.e(5742).then(n.t.bind(n,7093,19))},"@generated/docusaurus-plugin-content-docs/default/__plugin.json",7093],b27c7406:[function(){return n.e(2618).then(n.bind(n,537))},"@site/docs/getting-started/deployment/other.md",537],bccc5e9b:[function(){return n.e(2431).then(n.bind(n,9641))},"@site/docs/guides/backfill.md",9641],bde15bec:[function(){return n.e(6438).then(n.bind(n,8796))},"@site/docs/reference/scripts/complex-mutations.md",8796],c985d368:[function(){return n.e(2007).then(n.bind(n,4436))},"@site/docs/reference/scripts/cascading-delete.md",4436],d2e94323:[function(){return n.e(3993).then(n.bind(n,7791))},"@site/docs/guides/lexicons.md",7791],e8644baa:[function(){return n.e(9178).then(n.bind(n,8525))},"@site/docs/reference/scripts/paginated-list.md",8525],ec125a10:[function(){return n.e(9659).then(n.bind(n,2192))},"@site/docs/reference/admin-api.md",2192],f142c65c:[function(){return n.e(9957).then(n.bind(n,9573))},"@site/docs/reference/scripts/list-or-fetch.md",9573],fac68122:[function(){return n.e(5986).then(n.bind(n,4924))},"@site/docs/reference/production-deployment.md",4924],fbd7a87c:[function(){return n.e(1361).then(n.bind(n,8594))},"@site/docs/getting-started/quickstart.md",8594]};var l=n(4848);function s(e){var t=e.error,n=e.retry,r=e.pastDelay;return t?(0,l.jsxs)("div",{style:{textAlign:"center",color:"#fff",backgroundColor:"#fa383e",borderColor:"#fa383e",borderStyle:"solid",borderRadius:"0.25rem",borderWidth:"1px",boxSizing:"border-box",display:"block",padding:"1rem",flex:"0 0 50%",marginLeft:"25%",marginRight:"25%",marginTop:"5rem",maxWidth:"50%",width:"100%"},children:[(0,l.jsx)("p",{children:String(t)}),(0,l.jsx)("div",{children:(0,l.jsx)("button",{type:"button",onClick:n,children:"Retry"})})]}):r?(0,l.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"},children:(0,l.jsx)("svg",{id:"loader",style:{width:128,height:110,position:"absolute",top:"calc(100vh - 64%)"},viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg",stroke:"#61dafb",children:(0,l.jsxs)("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",strokeWidth:"2",children:[(0,l.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,l.jsx)("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,l.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,l.jsx)("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,l.jsx)("circle",{cx:"22",cy:"22",r:"8",children:(0,l.jsx)("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"})})]})})}):null}var u=n(6921),c=n(3102);function d(e,t){if("*"===e)return a()({loading:s,loader:function(){return n.e(2237).then(n.bind(n,2237))},modules:["@theme/NotFound"],webpack:function(){return[2237]},render:function(e,t){var n=e.default;return(0,l.jsx)(c.W,{value:{plugin:{name:"native",id:"default"}},children:(0,l.jsx)(n,Object.assign({},t))})}});var r=o[e+"-"+t],d={},f=[],p=[],m=(0,u.A)(r);return Object.entries(m).forEach(function(e){var t=e[0],n=e[1],r=i[n];r&&(d[t]=r[0],f.push(r[1]),p.push(r[2]))}),a().Map({loading:s,loader:d,modules:f,webpack:function(){return p},render:function(t,n){var a=JSON.parse(JSON.stringify(r));Object.entries(t).forEach(function(t){var n=t[0],r=t[1],o=r.default;if(!o)throw new Error("The page component at "+e+" doesn't have a default export. This makes it impossible to render anything. Consider default-exporting a React component.");"object"!=typeof o&&"function"!=typeof o||Object.keys(r).filter(function(e){return"default"!==e}).forEach(function(e){o[e]=r[e]});var i=a,l=n.split(".");l.slice(0,-1).forEach(function(e){i=i[e]}),i[l[l.length-1]]=o});var o=a.__comp;delete a.__comp;var i=a.__context;delete a.__context;var s=a.__props;return delete a.__props,(0,l.jsx)(c.W,{value:i,children:(0,l.jsx)(o,Object.assign({},a,s,n))})}})}const f=[{path:"/",component:d("/","414"),routes:[{path:"/",component:d("/","5f5"),routes:[{path:"/",component:d("/","a4e"),routes:[{path:"/getting-started/authentication",component:d("/getting-started/authentication","fd3"),exact:!0,sidebar:"docs"},{path:"/getting-started/configuration",component:d("/getting-started/configuration","641"),exact:!0,sidebar:"docs"},{path:"/getting-started/dashboard",component:d("/getting-started/dashboard","889"),exact:!0,sidebar:"docs"},{path:"/getting-started/deployment/docker",component:d("/getting-started/deployment/docker","d4f"),exact:!0,sidebar:"docs"},{path:"/getting-started/deployment/other",component:d("/getting-started/deployment/other","a50"),exact:!0,sidebar:"docs"},{path:"/getting-started/deployment/railway",component:d("/getting-started/deployment/railway","d15"),exact:!0,sidebar:"docs"},{path:"/getting-started/quickstart",component:d("/getting-started/quickstart","c60"),exact:!0,sidebar:"docs"},{path:"/guides/backfill",component:d("/guides/backfill","8e9"),exact:!0,sidebar:"docs"},{path:"/guides/lexicons",component:d("/guides/lexicons","f9a"),exact:!0,sidebar:"docs"},{path:"/guides/scripting",component:d("/guides/scripting","259"),exact:!0,sidebar:"docs"},{path:"/reference/admin-api",component:d("/reference/admin-api","cec"),exact:!0,sidebar:"docs"},{path:"/reference/architecture",component:d("/reference/architecture","5c9"),exact:!0,sidebar:"docs"},{path:"/reference/glossary",component:d("/reference/glossary","aa6"),exact:!0,sidebar:"docs"},{path:"/reference/production-deployment",component:d("/reference/production-deployment","935"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/batch-save",component:d("/reference/scripts/batch-save","e3f"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/cascading-delete",component:d("/reference/scripts/cascading-delete","2dc"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/complex-mutations",component:d("/reference/scripts/complex-mutations","a45"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/create-record",component:d("/reference/scripts/create-record","d2f"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/expanded-query",component:d("/reference/scripts/expanded-query","7c6"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/get-record",component:d("/reference/scripts/get-record","5c8"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/list-or-fetch",component:d("/reference/scripts/list-or-fetch","62b"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/paginated-list",component:d("/reference/scripts/paginated-list","917"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/sidecar-records",component:d("/reference/scripts/sidecar-records","b55"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/update-or-delete",component:d("/reference/scripts/update-or-delete","d03"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/upsert-record",component:d("/reference/scripts/upsert-record","279"),exact:!0,sidebar:"docs"},{path:"/reference/troubleshooting",component:d("/reference/troubleshooting","af4"),exact:!0,sidebar:"docs"},{path:"/reference/xrpc-api",component:d("/reference/xrpc-api","a2e"),exact:!0,sidebar:"docs"},{path:"/tutorials/statusphere",component:d("/tutorials/statusphere","187"),exact:!0,sidebar:"docs"},{path:"/",component:d("/","280"),exact:!0,sidebar:"docs"}]}]}]},{path:"*",component:d("*")}]},6125(e,t,n){"use strict";n.d(t,{o:()=>o,x:()=>i});var r=n(6540),a=n(4848),o=r.createContext(!1);function i(e){var t=e.children,n=(0,r.useState)(!1),i=n[0],l=n[1];return(0,r.useEffect)(function(){l(!0)},[]),(0,a.jsx)(o.Provider,{value:i,children:t})}},8600(e,t,n){"use strict";var r=n(6540),a=n(5338),o=n(545),i=n(4625),l=n(4784),s=n(8193);const u=[n(119),n(6134),n(6294)];var c=n(8328),d=n(6347),f=n(2831),p=n(4848);function m(e){var t=e.children;return(0,p.jsx)(p.Fragment,{children:t})}var g=n(4563),h=function(e){return e.defaultFormatter(e)};function y(e){var t=e.children;return(0,p.jsx)(g.AL,{formatter:h,children:t})}function b(e){var t=e.children;return(0,p.jsx)(y,{children:t})}var v=n(5260),w=n(4586),k=n(6025),x=n(6342),S=n(5500),E=n(2131),_=n(4090),A=n(440),C=n(1463);function T(){var e=(0,w.A)().i18n,t=e.currentLocale,n=e.defaultLocale,r=e.localeConfigs,a=(0,E.o)(),o=r[t].htmlLang,i=function(e){return e.replace("-","_")};return(0,p.jsxs)(v.A,{children:[Object.entries(r).map(function(e){var t=e[0],n=e[1].htmlLang;return(0,p.jsx)("link",{rel:"alternate",href:a.createUrl({locale:t,fullyQualified:!0}),hrefLang:n},t)}),(0,p.jsx)("link",{rel:"alternate",href:a.createUrl({locale:n,fullyQualified:!0}),hrefLang:"x-default"}),(0,p.jsx)("meta",{property:"og:locale",content:i(o)}),Object.values(r).filter(function(e){return o!==e.htmlLang}).map(function(e){return(0,p.jsx)("meta",{property:"og:locale:alternate",content:i(e.htmlLang)},"meta-og-"+e.htmlLang)})]})}function j(e){var t=e.permalink,n=(0,w.A)().siteConfig.url,r=function(){var e=(0,w.A)().siteConfig,t=e.url,n=e.baseUrl,r=e.trailingSlash,a=(0,d.zy)().pathname;return t+(0,A.Ks)((0,k.Ay)(a),{trailingSlash:r,baseUrl:n})}(),a=t?""+n+t:r;return(0,p.jsxs)(v.A,{children:[(0,p.jsx)("meta",{property:"og:url",content:a}),(0,p.jsx)("link",{rel:"canonical",href:a})]})}function O(){var e=(0,w.A)().i18n.currentLocale,t=(0,x.p)(),n=t.metadata,r=t.image;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(v.A,{children:[(0,p.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,p.jsx)("body",{className:_.w})]}),r&&(0,p.jsx)(S.be,{image:r}),(0,p.jsx)(j,{}),(0,p.jsx)(T,{}),(0,p.jsx)(C.A,{tag:"default",locale:e}),(0,p.jsx)(v.A,{children:n.map(function(e,t){return(0,p.jsx)("meta",Object.assign({},e),t)})})]})}var P=new Map;var N=n(6125),L=n(6988),R=n(7387),I=n(205);function F(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r\n

Your Docusaurus site did not load properly.

\n

A very common reason is a wrong site baseUrl configuration.

\n

Current configured baseUrl = '+e+" "+("/"===e?" (default value)":"")+'

\n

We suggest trying baseUrl =

\n\n'}(e)).replace(/d,l:()=>f});var r=n(6540),a=n(4784);const o=JSON.parse('{"docusaurus-plugin-content-docs":{"default":{"path":"/","versions":[{"name":"current","label":"Next","isLast":true,"path":"/","mainDocId":"README","docs":[{"id":"getting-started/authentication","path":"/getting-started/authentication","sidebar":"docs"},{"id":"getting-started/configuration","path":"/getting-started/configuration","sidebar":"docs"},{"id":"getting-started/dashboard","path":"/getting-started/dashboard","sidebar":"docs"},{"id":"getting-started/deployment/docker","path":"/getting-started/deployment/docker","sidebar":"docs"},{"id":"getting-started/deployment/other","path":"/getting-started/deployment/other","sidebar":"docs"},{"id":"getting-started/deployment/railway","path":"/getting-started/deployment/railway","sidebar":"docs"},{"id":"getting-started/quickstart","path":"/getting-started/quickstart","sidebar":"docs"},{"id":"guides/backfill","path":"/guides/backfill","sidebar":"docs"},{"id":"guides/lexicons","path":"/guides/lexicons","sidebar":"docs"},{"id":"guides/scripting","path":"/guides/scripting","sidebar":"docs"},{"id":"README","path":"/","sidebar":"docs"},{"id":"reference/admin-api","path":"/reference/admin-api","sidebar":"docs"},{"id":"reference/architecture","path":"/reference/architecture","sidebar":"docs"},{"id":"reference/glossary","path":"/reference/glossary","sidebar":"docs"},{"id":"reference/production-deployment","path":"/reference/production-deployment","sidebar":"docs"},{"id":"reference/scripts/batch-save","path":"/reference/scripts/batch-save","sidebar":"docs"},{"id":"reference/scripts/cascading-delete","path":"/reference/scripts/cascading-delete","sidebar":"docs"},{"id":"reference/scripts/complex-mutations","path":"/reference/scripts/complex-mutations","sidebar":"docs"},{"id":"reference/scripts/create-record","path":"/reference/scripts/create-record","sidebar":"docs"},{"id":"reference/scripts/expanded-query","path":"/reference/scripts/expanded-query","sidebar":"docs"},{"id":"reference/scripts/get-record","path":"/reference/scripts/get-record","sidebar":"docs"},{"id":"reference/scripts/list-or-fetch","path":"/reference/scripts/list-or-fetch","sidebar":"docs"},{"id":"reference/scripts/paginated-list","path":"/reference/scripts/paginated-list","sidebar":"docs"},{"id":"reference/scripts/sidecar-records","path":"/reference/scripts/sidecar-records","sidebar":"docs"},{"id":"reference/scripts/update-or-delete","path":"/reference/scripts/update-or-delete","sidebar":"docs"},{"id":"reference/scripts/upsert-record","path":"/reference/scripts/upsert-record","sidebar":"docs"},{"id":"reference/troubleshooting","path":"/reference/troubleshooting","sidebar":"docs"},{"id":"reference/xrpc-api","path":"/reference/xrpc-api","sidebar":"docs"},{"id":"tutorials/statusphere","path":"/tutorials/statusphere","sidebar":"docs"}],"draftIds":[],"sidebars":{"docs":{"link":{"path":"/","label":"Introduction"}}}}],"breadcrumbs":true}}}'),i=JSON.parse('{"defaultLocale":"en","locales":["en"],"path":"i18n","currentLocale":"en","localeConfigs":{"en":{"label":"English","direction":"ltr","htmlLang":"en","calendar":"gregory","path":"en","translate":false,"url":"https://happyview.dev","baseUrl":"/"}}}');var l=n(2654);const s=JSON.parse('{"docusaurusVersion":"3.9.2","siteVersion":"0.0.0","pluginVersions":{"docusaurus-plugin-content-docs":{"type":"package","name":"@docusaurus/plugin-content-docs","version":"3.9.2"},"docusaurus-plugin-content-pages":{"type":"package","name":"@docusaurus/plugin-content-pages","version":"3.9.2"},"docusaurus-plugin-sitemap":{"type":"package","name":"@docusaurus/plugin-sitemap","version":"3.9.2"},"docusaurus-plugin-svgr":{"type":"package","name":"@docusaurus/plugin-svgr","version":"3.9.2"},"docusaurus-theme-classic":{"type":"package","name":"@docusaurus/theme-classic","version":"3.9.2"},"docusaurus-theme-mermaid":{"type":"package","name":"@docusaurus/theme-mermaid","version":"3.9.2"}}}');var u=n(4848),c={siteConfig:a.A,siteMetadata:s,globalData:o,i18n:i,codeTranslations:l},d=r.createContext(c);function f(e){var t=e.children;return(0,u.jsx)(d.Provider,{value:c,children:t})}},7489(e,t,n){"use strict";n.d(t,{A:()=>h});var r=n(7387),a=n(6540),o=n(8193),i=n(5260),l=n(440),s=n(9139),u=n(3102),c=n(4848);function d(e){var t=e.error,n=e.tryAgain;return(0,c.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",minHeight:"100vh",width:"100%",maxWidth:"80ch",fontSize:"20px",margin:"0 auto",padding:"1rem"},children:[(0,c.jsx)("h1",{style:{fontSize:"3rem"},children:"This page crashed"}),(0,c.jsx)("button",{type:"button",onClick:n,style:{margin:"1rem 0",fontSize:"2rem",cursor:"pointer",borderRadius:20,padding:"1rem"},children:"Try again"}),(0,c.jsx)(f,{error:t})]})}function f(e){var t=e.error,n=(0,l.rA)(t).map(function(e){return e.message}).join("\n\nCause:\n");return(0,c.jsx)("p",{style:{whiteSpace:"pre-wrap"},children:n})}function p(e){var t=e.children;return(0,c.jsx)(u.W,{value:{plugin:{name:"docusaurus-core-error-boundary",id:"default"}},children:t})}function m(e){var t=e.error,n=e.tryAgain;return(0,c.jsx)(p,{children:(0,c.jsxs)(h,{fallback:function(){return(0,c.jsx)(d,{error:t,tryAgain:n})},children:[(0,c.jsx)(i.A,{children:(0,c.jsx)("title",{children:"Page Error"})}),(0,c.jsx)(s.A,{children:(0,c.jsx)(d,{error:t,tryAgain:n})})]})})}var g=function(e){return(0,c.jsx)(m,Object.assign({},e))},h=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={error:null},n}(0,r.A)(t,e);var n=t.prototype;return n.componentDidCatch=function(e){o.A.canUseDOM&&this.setState({error:e})},n.render=function(){var e=this,t=this.props.children,n=this.state.error;if(n){var r,a={error:n,tryAgain:function(){return e.setState({error:null})}};return(null!=(r=this.props.fallback)?r:g)(a)}return null!=t?t:null},t}(a.Component)},8193(e,t,n){"use strict";n.d(t,{A:()=>a});var r="undefined"!=typeof window&&"document"in window&&"createElement"in window.document;const a={canUseDOM:r,canUseEventListeners:r&&("addEventListener"in window||"attachEvent"in window),canUseIntersectionObserver:r&&"IntersectionObserver"in window,canUseViewport:r&&"screen"in window}},5260(e,t,n){"use strict";n.d(t,{A:()=>o});n(6540);var r=n(545),a=n(4848);function o(e){return(0,a.jsx)(r.mg,Object.assign({},e))}},8774(e,t,n){"use strict";n.d(t,{A:()=>g});var r=n(8587),a=n(6540),o=n(4625),i=n(440),l=n(4586),s=n(6654),u=n(8193),c=n(3427),d=n(6025),f=n(4848),p=["isNavLink","to","href","activeClassName","isActive","data-noBrokenLinkCheck","autoAddBaseUrl"];function m(e,t){var n,m,g,h=e.isNavLink,y=e.to,b=e.href,v=e.activeClassName,w=e.isActive,k=e["data-noBrokenLinkCheck"],x=e.autoAddBaseUrl,S=void 0===x||x,E=(0,r.A)(e,p),_=(0,l.A)().siteConfig,A=_.trailingSlash,C=_.baseUrl,T=_.future.experimental_router,j=(0,d.hH)().withBaseUrl,O=(0,c.A)(),P=(0,a.useRef)(null);(0,a.useImperativeHandle)(t,function(){return P.current});var N=y||b;var L,R,I=(0,s.A)(N),F=null==N?void 0:N.replace("pathname://",""),D=void 0!==F?(L=F,S&&function(e){return e.startsWith("/")}(L)?j(L):L):void 0;"hash"===T&&null!=(n=D)&&n.startsWith("./")&&(D=null==(R=D)?void 0:R.slice(1));D&&I&&(D=(0,i.Ks)(D,{trailingSlash:A,baseUrl:C}));var z=(0,a.useRef)(!1),M=h?o.k2:o.N_,B=u.A.canUseIntersectionObserver,U=(0,a.useRef)(),$=function(){z.current||null==D||(window.docusaurus.preload(D),z.current=!0)};(0,a.useEffect)(function(){return!B&&I&&u.A.canUseDOM&&null!=D&&window.docusaurus.prefetch(D),function(){B&&U.current&&U.current.disconnect()}},[U,D,B,I]);var H=null!=(m=null==(g=D)?void 0:g.startsWith("#"))&&m,V=!E.target||"_self"===E.target,W=!D||!I||!V||H&&"hash"!==T;k||!H&&W||O.collectLink(D),E.id&&O.collectAnchor(E.id);var q={};return W?(0,f.jsx)("a",Object.assign({ref:P,href:D},N&&!I&&{target:"_blank",rel:"noopener noreferrer"},E,q)):(0,f.jsx)(M,Object.assign({},E,{onMouseEnter:$,onTouchStart:$,innerRef:function(e){P.current=e,B&&e&&I&&(U.current=new window.IntersectionObserver(function(t){t.forEach(function(t){e===t.target&&(t.isIntersecting||t.intersectionRatio>0)&&(U.current.unobserve(e),U.current.disconnect(),null!=D&&window.docusaurus.prefetch(D))})}),U.current.observe(e))},to:D},h&&{isActive:w,activeClassName:v},q))}const g=a.forwardRef(m)},1312(e,t,n){"use strict";n.d(t,{A:()=>u,T:()=>s});var r=n(6540),a=n(4848);function o(e,t){var n=e.split(/(\{\w+\})/).map(function(e,n){if(n%2==1){var r=null==t?void 0:t[e.slice(1,-1)];if(void 0!==r)return r}return e});return n.some(function(e){return(0,r.isValidElement)(e)})?n.map(function(e,t){return(0,r.isValidElement)(e)?r.cloneElement(e,{key:t}):e}).filter(function(e){return""!==e}):n.join("")}var i=n(2654);function l(e){var t,n,r=e.id,a=e.message;if(void 0===r&&void 0===a)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return null!=(t=null!=(n=i[null!=r?r:a])?n:a)?t:r}function s(e,t){return o(l({message:e.message,id:e.id}),t)}function u(e){var t=e.children,n=e.id,r=e.values;if(t&&"string"!=typeof t)throw console.warn("Illegal children",t),new Error("The Docusaurus component only accept simple string values");var i=l({message:t,id:n});return(0,a.jsx)(a.Fragment,{children:o(i,r)})}},7065(e,t,n){"use strict";n.d(t,{W:()=>r});var r="default"},6654(e,t,n){"use strict";function r(e){return/^(?:\w*:|\/\/)/.test(e)}function a(e){return void 0!==e&&!r(e)}n.d(t,{A:()=>a,z:()=>r})},6025(e,t,n){"use strict";n.d(t,{Ay:()=>l,hH:()=>i});var r=n(6540),a=n(4586),o=n(6654);function i(){var e=(0,a.A)().siteConfig,t=e.baseUrl,n=e.url,i=e.future.experimental_router,l=(0,r.useCallback)(function(e,r){return function(e){var t=e.siteUrl,n=e.baseUrl,r=e.url,a=e.options,i=void 0===a?{}:a,l=i.forcePrependBaseUrl,s=void 0!==l&&l,u=i.absolute,c=void 0!==u&&u,d=e.router;if(!r||r.startsWith("#")||(0,o.z)(r))return r;if("hash"===d)return r.startsWith("/")?"."+r:"./"+r;if(s)return n+r.replace(/^\//,"");if(r===n.replace(/\/$/,""))return n;var f=r.startsWith(n)?r:n+r.replace(/^\//,"");return c?t+f:f}({siteUrl:n,baseUrl:t,url:e,options:r,router:i})},[n,t,i]);return{withBaseUrl:l}}function l(e,t){return void 0===t&&(t={}),(0,i().withBaseUrl)(e,t)}},3427(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(6540),a=(n(4848),r.createContext({collectAnchor:function(){},collectLink:function(){}}));function o(){return(0,r.useContext)(a)}},4586(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(6540),a=n(6988);function o(){return(0,r.useContext)(a.o)}},2303(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(6540),a=n(6125);function o(){return(0,r.useContext)(a.o)}},205(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(6540);const a=n(8193).A.canUseDOM?r.useLayoutEffect:r.useEffect},6803(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(6540),a=n(3102);function o(){var e=r.useContext(a.o);if(!e)throw new Error("Unexpected: no Docusaurus route context found");return e}},6921(e,t,n){"use strict";n.d(t,{A:()=>r});function r(e){var t={};return function e(n,r){Object.entries(n).forEach(function(n){var a,o=n[0],i=n[1],l=r?r+"."+o:o;"object"==typeof(a=i)&&a&&Object.keys(a).length>0?e(i,l):t[l]=i})}(e),t}},3102(e,t,n){"use strict";n.d(t,{W:()=>i,o:()=>o});var r=n(6540),a=n(4848),o=r.createContext(null);function i(e){var t=e.children,n=e.value,i=r.useContext(o),l=(0,r.useMemo)(function(){return function(e){var t=e.parent,n=e.value;if(!t){if(!n)throw new Error("Unexpected: no Docusaurus route context found");if(!("plugin"in n))throw new Error("Unexpected: Docusaurus topmost route context has no `plugin` attribute");return n}var r=Object.assign({},t.data,null==n?void 0:n.data);return{plugin:t.plugin,data:r}}({parent:i,value:n})},[i,n]);return(0,a.jsx)(o.Provider,{value:l,children:t})}},3886(e,t,n){"use strict";n.d(t,{VQ:()=>y,g1:()=>v});var r=n(6540),a=n(4070),o=n(7065),i=n(6342),l=n(679),s=n(3807),u=n(4848),c=function(e){return"docs-preferred-version-"+e},d=function(e,t,n){(0,l.Wf)(c(e),{persistence:t}).set(n)},f=function(e,t){return(0,l.Wf)(c(e),{persistence:t}).get()},p=function(e,t){(0,l.Wf)(c(e),{persistence:t}).del()};var m=r.createContext(null);function g(){var e=(0,a.Gy)(),t=(0,i.p)().docs.versionPersistence,n=(0,r.useMemo)(function(){return Object.keys(e)},[e]),o=(0,r.useState)(function(){return function(e){return Object.fromEntries(e.map(function(e){return[e,{preferredVersionName:null}]}))}(n)}),l=o[0],s=o[1];return(0,r.useEffect)(function(){s(function(e){var t=e.pluginIds,n=e.versionPersistence,r=e.allDocsData;return Object.fromEntries(t.map(function(e){return[e,(t=e,a=f(t,n),r[t].versions.some(function(e){return e.name===a})?{preferredVersionName:a}:(p(t,n),{preferredVersionName:null}))];var t,a}))}({allDocsData:e,versionPersistence:t,pluginIds:n}))},[e,t,n]),[l,(0,r.useMemo)(function(){return{savePreferredVersion:function(e,n){d(e,t,n),s(function(t){var r;return Object.assign({},t,((r={})[e]={preferredVersionName:n},r))})}}},[t])]}function h(e){var t=e.children,n=g();return(0,u.jsx)(m.Provider,{value:n,children:t})}function y(e){var t=e.children;return(0,u.jsx)(h,{children:t})}function b(){var e=(0,r.useContext)(m);if(!e)throw new s.dV("DocsPreferredVersionContextProvider");return e}function v(e){var t;void 0===e&&(e=o.W);var n=(0,a.ht)(e),i=b(),l=i[0],s=i[1],u=l[e].preferredVersionName;return{preferredVersion:null!=(t=n.versions.find(function(e){return e.name===u}))?t:null,savePreferredVersionName:(0,r.useCallback)(function(t){s.savePreferredVersion(e,t)},[s,e])}}},609(e,t,n){"use strict";n.d(t,{V:()=>s,t:()=>u});var r=n(6540),a=n(3807),o=n(4848),i=Symbol("EmptyContext"),l=r.createContext(i);function s(e){var t=e.children,n=e.name,a=e.items,i=(0,r.useMemo)(function(){return n&&a?{name:n,items:a}:null},[n,a]);return(0,o.jsx)(l.Provider,{value:i,children:t})}function u(){var e=(0,r.useContext)(l);if(e===i)throw new a.dV("DocsSidebarProvider");return e}},4718(e,t,n){"use strict";n.d(t,{Nr:()=>p,w8:()=>g,B5:()=>S,Vd:()=>w,QB:()=>x,fW:()=>k,OF:()=>v,Y:()=>y});var r=n(3845),a=n(6540),o=n(6347),i=n(2831),l=n(4070),s=n(9169);function u(e){return Array.from(new Set(e))}var c=n(3886),d=n(3025),f=n(609);function p(e){return"link"!==e.type||e.unlisted?"category"===e.type?function(e){if(e.href&&!e.linkUnlisted)return e.href;for(var t,n=(0,r.A)(e.items);!(t=n()).done;){var a=p(t.value);if(a)return a}}(e):void 0:e.href}var m=function(e,t){return void 0!==e&&(0,s.ys)(e,t)};function g(e,t){return"link"===e.type?m(e.href,t):"category"===e.type&&(m(e.href,t)||function(e,t){return e.some(function(e){return g(e,t)})}(e.items,t))}function h(e,t){switch(e.type){case"category":return g(e,t)||void 0!==e.href&&!e.linkUnlisted||e.items.some(function(e){return h(e,t)});case"link":return!e.unlisted||g(e,t);default:return!0}}function y(e,t){return(0,a.useMemo)(function(){return e.filter(function(e){return h(e,t)})},[e,t])}function b(e){var t=e.sidebarItems,n=e.pathname,a=e.onlyCategories,o=void 0!==a&&a,i=[];return function e(t){for(var a,l=(0,r.A)(t);!(a=l()).done;){var u=a.value;if("category"===u.type&&((0,s.ys)(u.href,n)||e(u.items))||"link"===u.type&&(0,s.ys)(u.href,n))return o&&"category"!==u.type||i.unshift(u),!0}return!1}(t),i}function v(){var e,t=(0,f.t)(),n=(0,o.zy)().pathname;return!1!==(null==(e=(0,l.vT)())?void 0:e.pluginData.breadcrumbs)&&t?b({sidebarItems:t.items,pathname:n}):null}function w(e){var t=(0,l.zK)(e).activeVersion,n=(0,c.g1)(e).preferredVersion,r=(0,l.r7)(e);return(0,a.useMemo)(function(){return u([t,n,r].filter(Boolean))},[t,n,r])}function k(e,t){var n=w(t);return(0,a.useMemo)(function(){var t=n.flatMap(function(e){return e.sidebars?Object.entries(e.sidebars):[]}),r=t.find(function(t){return t[0]===e});if(!r)throw new Error("Can't find any sidebar with id \""+e+'" in version'+(n.length>1?"s":"")+" "+n.map(function(e){return e.name}).join(", ")+'".\nAvailable sidebar ids are:\n- '+t.map(function(e){return e[0]}).join("\n- "));return r[1]},[e,n])}function x(e,t){var n=w(t);return(0,a.useMemo)(function(){var t=n.flatMap(function(e){return e.docs}),r=t.find(function(t){return t.id===e});if(!r){if(n.flatMap(function(e){return e.draftIds}).includes(e))return null;throw new Error("Couldn't find any doc with id \""+e+'" in version'+(n.length>1?"s":"")+' "'+n.map(function(e){return e.name}).join(", ")+'".\nAvailable doc ids are:\n- '+u(t.map(function(e){return e.id})).join("\n- "))}return r},[e,n])}function S(e){var t=e.route,n=(0,o.zy)(),r=(0,d.r)(),a=t.routes,l=a.find(function(e){return(0,o.B6)(n.pathname,e)});if(!l)return null;var s=l.sidebar,u=s?r.docsSidebars[s]:void 0;return{docElement:(0,i.v)(a),sidebarName:s,sidebarItems:u}}},3025(e,t,n){"use strict";n.d(t,{n:()=>l,r:()=>s});var r=n(6540),a=n(3807),o=n(4848),i=r.createContext(null);function l(e){var t=e.children,n=e.version;return(0,o.jsx)(i.Provider,{value:n,children:t})}function s(){var e=(0,r.useContext)(i);if(null===e)throw new a.dV("DocsVersionProvider");return e}},4070(e,t,n){"use strict";n.d(t,{zK:()=>g,vT:()=>f,Gy:()=>c,HW:()=>h,ht:()=>d,r7:()=>m,jh:()=>p});var r=n(6347),a=n(4586),o=n(7065);function i(e,t){void 0===t&&(t={});var n=(0,a.A)().globalData[e];if(!n&&t.failfast)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin.');return n}var l=function(e){return e.versions.find(function(e){return e.isLast})};function s(e,t){var n,a,o=function(e,t){return[].concat(e.versions).sort(function(e,t){return e.path===t.path?0:e.path.includes(t.path)?-1:t.path.includes(e.path)?1:0}).find(function(e){return!!(0,r.B6)(t,{path:e.path,exact:!1,strict:!1})})}(e,t),i=null==o?void 0:o.docs.find(function(e){return!!(0,r.B6)(t,{path:e.path,exact:!0,strict:!1})});return{activeVersion:o,activeDoc:i,alternateDocVersions:i?(n=i.id,a={},e.versions.forEach(function(e){e.docs.forEach(function(t){t.id===n&&(a[e.name]=t)})}),a):{}}}var u={},c=function(){var e;return null!=(e=i("docusaurus-plugin-content-docs"))?e:u},d=function(e){try{return function(e,t,n){void 0===t&&(t=o.W),void 0===n&&(n={});var r=i(e),a=null==r?void 0:r[t];if(!a&&n.failfast)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin with id "'+t+'".');return a}("docusaurus-plugin-content-docs",e,{failfast:!0})}catch(t){throw new Error("You are using a feature of the Docusaurus docs plugin, but this plugin does not seem to be enabled"+("Default"===e?"":" (pluginId="+e),{cause:t})}};function f(e){return void 0===e&&(e={}),function(e,t,n){void 0===n&&(n={});var a=Object.entries(e).sort(function(e,t){return t[1].path.localeCompare(e[1].path)}).find(function(e){var n=e[1];return!!(0,r.B6)(t,{path:n.path,exact:!1,strict:!1})}),o=a?{pluginId:a[0],pluginData:a[1]}:void 0;if(!o&&n.failfast)throw new Error("Can't find active docs plugin for \""+t+'" pathname, while it was expected to be found. Maybe you tried to use a docs feature that can only be used on a docs-related page? Existing docs plugin paths are: '+Object.values(e).map(function(e){return e.path}).join(", "));return o}(c(),(0,r.zy)().pathname,e)}function p(e){return d(e).versions}function m(e){var t=d(e);return l(t)}function g(e){return s(d(e),(0,r.zy)().pathname)}function h(e){return function(e,t){var n=l(e);return{latestDocSuggestion:s(e,t).alternateDocVersions[n.name],latestVersionSuggestion:n}}(d(e),(0,r.zy)().pathname)}},6294(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(5947),a=n.n(r);a().configure({showSpinner:!1});const o={onRouteUpdate:function(e){var t=e.location,n=e.previousLocation;if(n&&t.pathname!==n.pathname){var r=window.setTimeout(function(){a().start()},200);return function(){return window.clearTimeout(r)}}},onRouteDidUpdate:function(){a().done()}}},6134(e,t,n){"use strict";var r,a,o,i=n(1765),l=n(4784);r=i.My,a=l.A.themeConfig.prism.additionalLanguages,o=globalThis.Prism,globalThis.Prism=r,a.forEach(function(e){"php"===e&&n(9700),n(3890)("./prism-"+e)}),delete globalThis.Prism,void 0!==o&&(globalThis.Prism=r)},1107(e,t,n){"use strict";n.d(t,{A:()=>d});var r=n(8587),a=(n(6540),n(4164)),o=n(1312),i=n(3535),l=n(8774),s=n(3427),u=n(4848),c=["as","id"];function d(e){var t=e.as,n=e.id,d=(0,r.A)(e,c),f=(0,s.A)(),p=(0,i.v)(n);if("h1"===t||!n)return(0,u.jsx)(t,Object.assign({},d,{id:void 0}));f.collectAnchor(n);var m=(0,o.T)({id:"theme.common.headingLinkTitle",message:"Direct link to {heading}",description:"Title for link to heading"},{heading:"string"==typeof d.children?d.children:n});return(0,u.jsxs)(t,Object.assign({},d,{className:(0,a.A)("anchor",p,d.className),id:n,children:[d.children,(0,u.jsx)(l.A,{className:"hash-link",to:"#"+n,"aria-label":m,title:m,translate:"no",children:"\u200b"})]}))}},3186(e,t,n){"use strict";n.d(t,{A:()=>i});n(6540);var r=n(1312);const a="iconExternalLink_nPIU";var o=n(4848);function i(e){var t=e.width,n=void 0===t?13.5:t,i=e.height,l=void 0===i?13.5:i;return(0,o.jsx)("svg",{width:n,height:l,"aria-label":(0,r.T)({id:"theme.IconExternalLink.ariaLabel",message:"(opens in new tab)",description:"The ARIA label for the external link icon"}),className:a,children:(0,o.jsx)("use",{href:"#theme-svg-external-link"})})}},9139(e,t,n){"use strict";n.d(t,{A:()=>Wt});var r=n(6540),a=n(4164),o=n(7489),i=n(5500),l=n(6347),s=n(1312),u=n(5062),c=n(4848),d="__docusaurus_skipToContent_fallback";function f(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}function p(){var e=(0,r.useRef)(null),t=(0,l.W6)().action,n=(0,r.useCallback)(function(e){e.preventDefault();var t,n=null!=(t=document.querySelector("main:first-of-type"))?t:document.getElementById(d);n&&f(n)},[]);return(0,u.$)(function(n){var r=n.location;e.current&&!r.hash&&"PUSH"===t&&f(e.current)}),{containerRef:e,onClick:n}}var m=(0,s.T)({id:"theme.common.skipToMainContent",description:"The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation",message:"Skip to main content"});function g(e){var t,n=null!=(t=e.children)?t:m,r=p(),a=r.containerRef,o=r.onClick;return(0,c.jsx)("div",{ref:a,role:"region","aria-label":m,children:(0,c.jsx)("a",Object.assign({},e,{href:"#"+d,onClick:o,children:n}))})}var h=n(7559),y=n(4090);const b="skipToContent_fXgn";function v(){return(0,c.jsx)(g,{className:b})}var w=n(6342),k=n(5041),x=n(8587),S=["width","height","color","strokeWidth","className"];function E(e){var t=e.width,n=void 0===t?21:t,r=e.height,a=void 0===r?21:r,o=e.color,i=void 0===o?"currentColor":o,l=e.strokeWidth,s=void 0===l?1.2:l,u=(e.className,(0,x.A)(e,S));return(0,c.jsx)("svg",Object.assign({viewBox:"0 0 15 15",width:n,height:a},u,{children:(0,c.jsx)("g",{stroke:i,strokeWidth:s,children:(0,c.jsx)("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})})}))}const _="closeButton_CVFx";function A(e){return(0,c.jsx)("button",Object.assign({type:"button","aria-label":(0,s.T)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"})},e,{className:(0,a.A)("clean-btn close",_,e.className),children:(0,c.jsx)(E,{width:14,height:14,strokeWidth:3.1})}))}const C="content_knG7";function T(e){var t=(0,w.p)().announcementBar.content;return(0,c.jsx)("div",Object.assign({},e,{className:(0,a.A)(C,e.className),dangerouslySetInnerHTML:{__html:t}}))}const j="announcementBar_mb4j",O="announcementBarPlaceholder_vyr4",P="announcementBarClose_gvF7",N="announcementBarContent_xLdY";function L(){var e=(0,w.p)().announcementBar,t=(0,k.M)(),n=t.isActive,r=t.close;if(!n)return null;var o=e.backgroundColor,i=e.textColor,l=e.isCloseable;return(0,c.jsxs)("div",{className:(0,a.A)(h.G.announcementBar.container,j),style:{backgroundColor:o,color:i},role:"banner",children:[l&&(0,c.jsx)("div",{className:O}),(0,c.jsx)(T,{className:N}),l&&(0,c.jsx)(A,{onClick:r,className:P})]})}var R=n(2069),I=n(3104);var F=n(3807),D=n(5600),z=r.createContext(null);function M(e){var t,n,a,o,i,l,s,u=e.children,d=(t=(0,R.M)(),n=(0,D.YL)(),a=(0,r.useState)(!1),o=a[0],i=a[1],l=null!==n.component,s=(0,F.ZC)(l),(0,r.useEffect)(function(){l&&!s&&i(!0)},[l,s]),(0,r.useEffect)(function(){l?t.shown||i(!0):i(!1)},[t.shown,l]),(0,r.useMemo)(function(){return[o,i]},[o]));return(0,c.jsx)(z.Provider,{value:d,children:u})}function B(e){if(e.component){var t=e.component;return(0,c.jsx)(t,Object.assign({},e.props))}}function U(){var e=(0,r.useContext)(z);if(!e)throw new F.dV("NavbarSecondaryMenuDisplayProvider");var t=e[0],n=e[1],a=(0,r.useCallback)(function(){return n(!1)},[n]),o=(0,D.YL)();return(0,r.useMemo)(function(){return{shown:t,hide:a,content:B(o)}},[a,o,t])}function $(e){var t=e.children,n=e.inert;return(0,c.jsx)("div",Object.assign({className:(0,a.A)(h.G.layout.navbar.mobileSidebar.panel,"navbar-sidebar__item menu")},function(e){return parseInt(r.version.split(".")[0],10)<19?{inert:e?"":void 0}:{inert:e}}(n),{children:t}))}function H(e){var t=e.header,n=e.primaryMenu,r=e.secondaryMenu,o=U().shown;return(0,c.jsxs)("div",{className:(0,a.A)(h.G.layout.navbar.mobileSidebar.container,"navbar-sidebar"),children:[t,(0,c.jsxs)("div",{className:(0,a.A)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":o}),children:[(0,c.jsx)($,{inert:o,children:n}),(0,c.jsx)($,{inert:!o,children:r})]})]})}var V=n(5293),W=n(2303);function q(e){return(0,c.jsx)("svg",Object.assign({viewBox:"0 0 24 24",width:24,height:24},e,{children:(0,c.jsx)("path",{fill:"currentColor",d:"M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"})}))}function G(e){return(0,c.jsx)("svg",Object.assign({viewBox:"0 0 24 24",width:24,height:24},e,{children:(0,c.jsx)("path",{fill:"currentColor",d:"M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"})}))}function Q(e){return(0,c.jsx)("svg",Object.assign({viewBox:"0 0 24 24",width:24,height:24},e,{children:(0,c.jsx)("path",{fill:"currentColor",d:"m12 21c4.971 0 9-4.029 9-9s-4.029-9-9-9-9 4.029-9 9 4.029 9 9 9zm4.95-13.95c1.313 1.313 2.05 3.093 2.05 4.95s-0.738 3.637-2.05 4.95c-1.313 1.313-3.093 2.05-4.95 2.05v-14c1.857 0 3.637 0.737 4.95 2.05z"})}))}const Y="toggle_vylO",K="toggleButton_gllP",Z="toggleIcon_g3eP",X="systemToggleIcon_QzmC",J="lightToggleIcon_pyhR",ee="darkToggleIcon_wfgR",te="toggleButtonDisabled_aARS";function ne(e){switch(e){case null:return(0,s.T)({message:"system mode",id:"theme.colorToggle.ariaLabel.mode.system",description:"The name for the system color mode"});case"light":return(0,s.T)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"});case"dark":return(0,s.T)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"});default:throw new Error("unexpected color mode "+e)}}function re(e){return(0,s.T)({message:"Switch between dark and light mode (currently {mode})",id:"theme.colorToggle.ariaLabel",description:"The ARIA label for the color mode toggle"},{mode:ne(e)})}function ae(){return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(q,{"aria-hidden":!0,className:(0,a.A)(Z,J)}),(0,c.jsx)(G,{"aria-hidden":!0,className:(0,a.A)(Z,ee)}),(0,c.jsx)(Q,{"aria-hidden":!0,className:(0,a.A)(Z,X)})]})}function oe(e){var t=e.className,n=e.buttonClassName,r=e.respectPrefersColorScheme,o=e.value,i=e.onChange,l=(0,W.A)();return(0,c.jsx)("div",{className:(0,a.A)(Y,t),children:(0,c.jsx)("button",{className:(0,a.A)("clean-btn",K,!l&&te,n),type:"button",onClick:function(){return i(function(e,t){if(!t)return"dark"===e?"light":"dark";switch(e){case null:return"light";case"light":return"dark";case"dark":return null;default:throw new Error("unexpected color mode "+e)}}(o,r))},disabled:!l,title:ne(o),"aria-label":re(o),children:(0,c.jsx)(ae,{})})})}const ie=r.memo(oe),le="darkNavbarColorModeToggle_X3D1";function se(e){var t=e.className,n=(0,w.p)().navbar.style,r=(0,w.p)().colorMode,a=r.disableSwitch,o=r.respectPrefersColorScheme,i=(0,V.G)(),l=i.colorModeChoice,s=i.setColorMode;return a?null:(0,c.jsx)(ie,{className:t,buttonClassName:"dark"===n?le:void 0,respectPrefersColorScheme:o,value:l,onChange:s})}var ue=n(3465);function ce(){return(0,c.jsx)(ue.A,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function de(){var e=(0,R.M)();return(0,c.jsx)("button",{type:"button","aria-label":(0,s.T)({id:"theme.docs.sidebar.closeSidebarButtonAriaLabel",message:"Close navigation bar",description:"The ARIA label for close button of mobile sidebar"}),className:"clean-btn navbar-sidebar__close",onClick:function(){return e.toggle()},children:(0,c.jsx)(E,{color:"var(--ifm-color-emphasis-600)"})})}function fe(){return(0,c.jsxs)("div",{className:"navbar-sidebar__brand",children:[(0,c.jsx)(ce,{}),(0,c.jsx)(se,{className:"margin-right--md"}),(0,c.jsx)(de,{})]})}var pe=n(8774),me=n(6025),ge=n(6654);function he(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}var ye=n(3186),be=["activeBasePath","activeBaseRegex","to","href","label","html","isDropdownLink","prependBaseUrlToHref"];function ve(e){var t=e.activeBasePath,n=e.activeBaseRegex,r=e.to,a=e.href,o=e.label,i=e.html,l=e.isDropdownLink,s=e.prependBaseUrlToHref,u=(0,x.A)(e,be),d=(0,me.Ay)(r),f=(0,me.Ay)(t),p=(0,me.Ay)(a,{forcePrependBaseUrl:!0}),m=o&&a&&!(0,ge.A)(a),g=i?{dangerouslySetInnerHTML:{__html:i}}:{children:(0,c.jsxs)(c.Fragment,{children:[o,m&&(0,c.jsx)(ye.A,Object.assign({},l&&{width:12,height:12}))]})};return a?(0,c.jsx)(pe.A,Object.assign({href:s?p:a},u,g)):(0,c.jsx)(pe.A,Object.assign({to:d,isNavLink:!0},(t||n)&&{isActive:function(e,t){return n?he(n,t.pathname):t.pathname.startsWith(f)}},u,g))}var we=["className","isDropdownItem"];function ke(e){var t=e.className,n=(e.isDropdownItem,(0,x.A)(e,we));return(0,c.jsx)("li",{className:"menu__list-item",children:(0,c.jsx)(ve,Object.assign({className:(0,a.A)("menu__link",t)},n))})}var xe=["className","isDropdownItem"];function Se(e){var t=e.className,n=e.isDropdownItem,r=void 0!==n&&n,o=(0,x.A)(e,xe),i=(0,c.jsx)(ve,Object.assign({className:(0,a.A)(r?"dropdown__link":"navbar__item navbar__link",t),isDropdownLink:r},o));return r?(0,c.jsx)("li",{children:i}):i}var Ee=["mobile","position"];function _e(e){var t,n=e.mobile,r=void 0!==n&&n,a=(e.position,(0,x.A)(e,Ee)),o=r?ke:Se;return(0,c.jsx)(o,Object.assign({},a,{activeClassName:null!=(t=a.activeClassName)?t:r?"menu__link--active":"navbar__link--active"}))}var Ae=n(1422),Ce=n(9169),Te=n(4586);const je="dropdownNavbarItemMobile_J0Sd";var Oe=["items","className","position","onClick"];function Pe(e,t){return e.some(function(e){return function(e,t){return!!(0,Ce.ys)(e.to,t)||!!he(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t)})}function Ne(e){var t=e.collapsed,n=e.onClick;return(0,c.jsx)("button",{"aria-label":t?(0,s.T)({id:"theme.navbar.mobileDropdown.collapseButton.expandAriaLabel",message:"Expand the dropdown",description:"The ARIA label of the button to expand the mobile dropdown navbar item"}):(0,s.T)({id:"theme.navbar.mobileDropdown.collapseButton.collapseAriaLabel",message:"Collapse the dropdown",description:"The ARIA label of the button to collapse the mobile dropdown navbar item"}),"aria-expanded":!t,type:"button",className:"clean-btn menu__caret",onClick:n})}function Le(e){var t,n,o=e.items,i=e.className,s=(e.position,e.onClick),u=(0,x.A)(e,Oe),d=(n=(0,Te.A)().siteConfig.baseUrl,(0,l.zy)().pathname.replace(n,"/")),f=(0,Ce.ys)(u.to,d),p=Pe(o,d),m=function(e){var t=e.active,n=(0,Ae.u)({initialState:function(){return!t}}),a=n.collapsed,o=n.toggleCollapsed,i=n.setCollapsed;return(0,r.useEffect)(function(){t&&i(!1)},[t,i]),{collapsed:a,toggleCollapsed:o}}({active:f||p}),g=m.collapsed,h=m.toggleCollapsed,y=u.to?void 0:"#";return(0,c.jsxs)("li",{className:(0,a.A)("menu__list-item",{"menu__list-item--collapsed":g}),children:[(0,c.jsxs)("div",{className:(0,a.A)("menu__list-item-collapsible",{"menu__list-item-collapsible--active":f}),children:[(0,c.jsx)(ve,Object.assign({role:"button",className:(0,a.A)(je,"menu__link menu__link--sublist",i),href:y},u,{onClick:function(e){"#"===y&&e.preventDefault(),h()},children:null!=(t=u.children)?t:u.label})),(0,c.jsx)(Ne,{collapsed:g,onClick:function(e){e.preventDefault(),h()}})]}),(0,c.jsx)(Ae.N,{lazy:!0,as:"ul",className:"menu__list",collapsed:g,children:o.map(function(e,t){return(0,r.createElement)(ot,Object.assign({mobile:!0,isDropdownItem:!0,onClick:s,activeClassName:"menu__link--active"},e,{key:t}))})})]})}var Re=["items","position","className","onClick"];function Ie(e){var t,n=e.items,o=e.position,i=e.className,l=(e.onClick,(0,x.A)(e,Re)),s=(0,r.useRef)(null),u=(0,r.useState)(!1),d=u[0],f=u[1];return(0,r.useEffect)(function(){var e=function(e){s.current&&!s.current.contains(e.target)&&f(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),document.addEventListener("focusin",e),function(){document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e),document.removeEventListener("focusin",e)}},[s]),(0,c.jsxs)("div",{ref:s,className:(0,a.A)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===o,"dropdown--show":d}),children:[(0,c.jsx)(ve,Object.assign({"aria-haspopup":"true","aria-expanded":d,role:"button",href:l.to?void 0:"#",className:(0,a.A)("navbar__link",i)},l,{onClick:l.to?void 0:function(e){return e.preventDefault()},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),f(!d))},children:null!=(t=l.children)?t:l.label})),(0,c.jsx)("ul",{className:"dropdown__menu",children:n.map(function(e,t){return(0,r.createElement)(ot,Object.assign({isDropdownItem:!0,activeClassName:"dropdown__link--active"},e,{key:t}))})})]})}var Fe=["mobile"];function De(e){var t=e.mobile,n=void 0!==t&&t,r=(0,x.A)(e,Fe),a=n?Le:Ie;return(0,c.jsx)(a,Object.assign({},r))}var ze=n(2131),Me=n(7485),Be=["width","height"];function Ue(e){var t=e.width,n=void 0===t?20:t,r=e.height,a=void 0===r?20:r,o=(0,x.A)(e,Be);return(0,c.jsx)("svg",Object.assign({viewBox:"0 0 24 24",width:n,height:a,"aria-hidden":!0},o,{children:(0,c.jsx)("path",{fill:"currentColor",d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"})}))}const $e="iconLanguage_nlXk";var He=["mobile","dropdownItemsBefore","dropdownItemsAfter","queryString"];function Ve(){var e=(0,Te.A)(),t=e.siteConfig,n=e.i18n.localeConfigs,r=(0,ze.o)(),a=(0,Me.Hl)(function(e){return e.location.search}),o=(0,Me.Hl)(function(e){return e.location.hash}),i=function(e){var t=n[e];if(!t)throw new Error("Docusaurus bug, no locale config found for locale="+e);return t};return{getURL:function(e,n){var l=(0,Me.jy)([a,n.queryString],"append");return""+function(e){return i(e).url===t.url?"pathname://"+r.createUrl({locale:e,fullyQualified:!1}):r.createUrl({locale:e,fullyQualified:!0})}(e)+l+o},getLabel:function(e){return i(e).label},getLang:function(e){return i(e).htmlLang}}}const We=function(){return null},qe="navbarSearchContainer_Bca1";function Ge(e){var t=e.children,n=e.className;return(0,c.jsx)("div",{className:(0,a.A)(n,qe),children:t})}var Qe=n(4070),Ye=n(4718),Ke=["docId","label","docsPluginId"];var Ze=["sidebarId","label","docsPluginId"];var Xe=["label","to","docsPluginId"];var Je=n(3886),et=["mobile","docsPluginId","dropdownActiveClassDisabled","dropdownItemsBefore","dropdownItemsAfter","versions"];function tt(e){var t=e.docsPluginId,n=e.configs;return function(e,t){if(t){var n=new Map(e.map(function(e){return[e.name,e]})),r=function(t,r){var a,o=n.get(t);if(!o)throw new Error("No docs version exist for name '"+t+"', please verify your 'docsVersionDropdown' navbar item versions config.\nAvailable version names:\n- "+e.map(function(e){return""+e.name}).join("\n- "));return{version:o,label:null!=(a=null==r?void 0:r.label)?a:o.label}};return Array.isArray(t)?t.map(function(e){return r(e,void 0)}):Object.entries(t).map(function(e){var t=e[0],n=e[1];return r(t,n)})}return e.map(function(e){return{version:e,label:e.label}})}((0,Qe.jh)(t),n)}function nt(e,t){var n;return null!=(n=t.alternateDocVersions[e.name])?n:function(e){return e.docs.find(function(t){return t.id===e.mainDocId})}(e)}const rt={default:_e,localeDropdown:function(e){var t=e.mobile,n=e.dropdownItemsBefore,r=e.dropdownItemsAfter,a=e.queryString,o=(0,x.A)(e,He),i=Ve(),l=(0,Te.A)().i18n,u=l.currentLocale,d=l.locales.map(function(e){return{label:i.getLabel(e),lang:i.getLang(e),to:i.getURL(e,{queryString:a}),target:"_self",autoAddBaseUrl:!1,className:e===u?t?"menu__link--active":"dropdown__link--active":""}}),f=[].concat(n,d,r),p=t?(0,s.T)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):i.getLabel(u);return(0,c.jsx)(De,Object.assign({},o,{mobile:t,label:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Ue,{className:$e}),p]}),items:f}))},search:function(e){var t=e.mobile,n=e.className;return t?null:(0,c.jsx)(Ge,{className:n,children:(0,c.jsx)(We,{})})},dropdown:De,html:function(e){var t=e.value,n=e.className,r=e.mobile,o=void 0!==r&&r,i=e.isDropdownItem,l=void 0!==i&&i,s=l?"li":"div";return(0,c.jsx)(s,{className:(0,a.A)({navbar__item:!o&&!l,"menu__list-item":o},n),dangerouslySetInnerHTML:{__html:t}})},doc:function(e){var t=e.docId,n=e.label,r=e.docsPluginId,a=(0,x.A)(e,Ke),o=(0,Qe.zK)(r).activeDoc,i=(0,Ye.QB)(t,r),l=(null==o?void 0:o.path)===(null==i?void 0:i.path);return null===i||i.unlisted&&!l?null:(0,c.jsx)(_e,Object.assign({exact:!0},a,{isActive:function(){return l||!(null==o||!o.sidebar)&&o.sidebar===i.sidebar},label:null!=n?n:i.id,to:i.path}))},docSidebar:function(e){var t=e.sidebarId,n=e.label,r=e.docsPluginId,a=(0,x.A)(e,Ze),o=(0,Qe.zK)(r).activeDoc,i=(0,Ye.fW)(t,r).link;if(!i)throw new Error('DocSidebarNavbarItem: Sidebar with ID "'+t+"\" doesn't have anything to be linked to.");return(0,c.jsx)(_e,Object.assign({exact:!0},a,{isActive:function(){return(null==o?void 0:o.sidebar)===t},label:null!=n?n:i.label,to:i.path}))},docsVersion:function(e){var t=e.label,n=e.to,r=e.docsPluginId,a=(0,x.A)(e,Xe),o=(0,Ye.Vd)(r)[0],i=null!=t?t:o.label,l=null!=n?n:function(e){return e.docs.find(function(t){return t.id===e.mainDocId})}(o).path;return(0,c.jsx)(_e,Object.assign({},a,{label:i,to:l}))},docsVersionDropdown:function(e){var t=e.mobile,n=e.docsPluginId,r=e.dropdownActiveClassDisabled,a=e.dropdownItemsBefore,o=e.dropdownItemsAfter,i=e.versions,l=(0,x.A)(e,et),u=(0,Me.Hl)(function(e){return e.location.search}),d=(0,Me.Hl)(function(e){return e.location.hash}),f=(0,Qe.zK)(n),p=(0,Je.g1)(n).savePreferredVersionName,m=tt({docsPluginId:n,configs:i}),g=function(e){var t,n=e.docsPluginId,r=e.versionItems;return null!=(t=(0,Ye.Vd)(n).map(function(e){return r.find(function(t){return t.version===e})}).filter(function(e){return void 0!==e})[0])?t:r[0]}({docsPluginId:n,versionItems:m}),h=[].concat(a,m.map(function(e){var t=e.version;return{label:e.label,to:""+nt(t,f).path+u+d,isActive:function(){return t===f.activeVersion},onClick:function(){return p(t.name)}}}),o),y=t&&h.length>1?(0,s.T)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):g.label,b=t&&h.length>1?void 0:nt(g.version,f).path;return h.length<=1?(0,c.jsx)(_e,Object.assign({},l,{mobile:t,label:y,to:b,isActive:r?function(){return!1}:void 0})):(0,c.jsx)(De,Object.assign({},l,{mobile:t,label:y,to:b,items:h,isActive:r?function(){return!1}:void 0}))}};var at=["type"];function ot(e){var t=e.type,n=(0,x.A)(e,at),r=function(e,t){return e&&"default"!==e?e:"items"in t?"dropdown":"default"}(t,n),a=rt[r];if(!a)throw new Error('No NavbarItem component found for type "'+t+'".');return(0,c.jsx)(a,Object.assign({},n))}function it(){var e=(0,R.M)(),t=(0,w.p)().navbar.items;return(0,c.jsx)("ul",{className:"menu__list",children:t.map(function(t,n){return(0,r.createElement)(ot,Object.assign({mobile:!0},t,{onClick:function(){return e.toggle()},key:n}))})})}function lt(e){return(0,c.jsx)("button",Object.assign({},e,{type:"button",className:"clean-btn navbar-sidebar__back",children:(0,c.jsx)(s.A,{id:"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel",description:"The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)",children:"\u2190 Back to main menu"})}))}function st(){var e=0===(0,w.p)().navbar.items.length,t=U();return(0,c.jsxs)(c.Fragment,{children:[!e&&(0,c.jsx)(lt,{onClick:function(){return t.hide()}}),t.content]})}function ut(){var e,t=(0,R.M)();return void 0===(e=t.shown)&&(e=!0),(0,r.useEffect)(function(){return document.body.style.overflow=e?"hidden":"visible",function(){document.body.style.overflow="visible"}},[e]),t.shouldRender?(0,c.jsx)(H,{header:(0,c.jsx)(fe,{}),primaryMenu:(0,c.jsx)(it,{}),secondaryMenu:(0,c.jsx)(st,{})}):null}const ct="navbarHideable_m1mJ",dt="navbarHidden_jGov";function ft(e){return(0,c.jsx)("div",Object.assign({role:"presentation"},e,{className:(0,a.A)("navbar-sidebar__backdrop",e.className)}))}function pt(e){var t=e.children,n=(0,w.p)().navbar,o=n.hideOnScroll,i=n.style,l=(0,R.M)(),d=function(e){var t=(0,r.useState)(e),n=t[0],a=t[1],o=(0,r.useRef)(!1),i=(0,r.useRef)(0),l=(0,r.useCallback)(function(e){null!==e&&(i.current=e.getBoundingClientRect().height)},[]);return(0,I.Mq)(function(t,n){var r=t.scrollY;if(e)if(r=l?a(!1):r+u0&&(0,c.jsx)(Pt,{links:n}),logo:r&&(0,c.jsx)(It,{logo:r}),copyright:t&&(0,c.jsx)(Ft,{copyright:t})})}const Mt=r.memo(zt);var Bt=(0,F.fM)([V.a,k.o,I.Tv,Je.VQ,i.Jx,function(e){var t=e.children;return(0,c.jsx)(D.y_,{children:(0,c.jsx)(R.e,{children:(0,c.jsx)(M,{children:t})})})}]);function Ut(e){var t=e.children;return(0,c.jsx)(Bt,{children:t})}var $t=n(1107);function Ht(e){var t=e.error,n=e.tryAgain;return(0,c.jsx)("main",{className:"container margin-vert--xl",children:(0,c.jsx)("div",{className:"row",children:(0,c.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,c.jsx)($t.A,{as:"h1",className:"hero__title",children:(0,c.jsx)(s.A,{id:"theme.ErrorPageContent.title",description:"The title of the fallback page when the page crashed",children:"This page crashed."})}),(0,c.jsx)("div",{className:"margin-vert--lg",children:(0,c.jsx)(mt.a2,{onClick:n,className:"button button--primary shadow--lw"})}),(0,c.jsx)("hr",{}),(0,c.jsx)("div",{className:"margin-vert--md",children:(0,c.jsx)(mt.bq,{error:t})})]})})})}const Vt="mainWrapper_z2l0";function Wt(e){var t=e.children,n=e.noFooter,r=e.wrapperClassName,l=e.title,s=e.description;return(0,y.J)(),(0,c.jsxs)(Ut,{children:[(0,c.jsx)(i.be,{title:l,description:s}),(0,c.jsx)(v,{}),(0,c.jsx)(L,{}),(0,c.jsx)(xt,{}),(0,c.jsx)("div",{id:d,className:(0,a.A)(h.G.layout.main.container,h.G.wrapper.main,Vt,r),children:(0,c.jsx)(o.A,{fallback:function(e){return(0,c.jsx)(Ht,Object.assign({},e))},children:t})}),!n&&(0,c.jsx)(Mt,{})]})}},3465(e,t,n){"use strict";n.d(t,{A:()=>f});var r=n(8587),a=(n(6540),n(8774)),o=n(6025),i=n(4586),l=n(6342),s=n(1122),u=n(4848),c=["imageClassName","titleClassName"];function d(e){var t=e.logo,n=e.alt,r=e.imageClassName,a={light:(0,o.Ay)(t.src),dark:(0,o.Ay)(t.srcDark||t.src)},i=(0,u.jsx)(s.A,{className:t.className,sources:a,height:t.height,width:t.width,alt:n,style:t.style});return r?(0,u.jsx)("div",{className:r,children:i}):i}function f(e){var t,n=(0,i.A)().siteConfig.title,s=(0,l.p)().navbar,f=s.title,p=s.logo,m=e.imageClassName,g=e.titleClassName,h=(0,r.A)(e,c),y=(0,o.Ay)((null==p?void 0:p.href)||"/"),b=f?"":n,v=null!=(t=null==p?void 0:p.alt)?t:b;return(0,u.jsxs)(a.A,Object.assign({to:y},h,(null==p?void 0:p.target)&&{target:p.target},{children:[p&&(0,u.jsx)(d,{logo:p,alt:v,imageClassName:m}),null!=f&&(0,u.jsx)("b",{className:g,children:f})]}))}},1463(e,t,n){"use strict";n.d(t,{A:()=>o});n(6540);var r=n(5260),a=n(4848);function o(e){var t=e.locale,n=e.version,o=e.tag,i=t;return(0,a.jsxs)(r.A,{children:[t&&(0,a.jsx)("meta",{name:"docusaurus_locale",content:t}),n&&(0,a.jsx)("meta",{name:"docusaurus_version",content:n}),o&&(0,a.jsx)("meta",{name:"docusaurus_tag",content:o}),i&&(0,a.jsx)("meta",{name:"docsearch:language",content:i}),n&&(0,a.jsx)("meta",{name:"docsearch:version",content:n}),o&&(0,a.jsx)("meta",{name:"docsearch:docusaurus_tag",content:o})]})}},1122(e,t,n){"use strict";n.d(t,{A:()=>f});var r=n(8587),a=n(6540),o=n(4164),i=n(2303),l=n(5293);const s={themedComponent:"themedComponent_mlkZ","themedComponent--light":"themedComponent--light_NVdE","themedComponent--dark":"themedComponent--dark_xIcU"};var u=n(4848);function c(e){var t=e.className,n=e.children,r=(0,i.A)(),c=(0,l.G)().colorMode;return(0,u.jsx)(u.Fragment,{children:(r?"dark"===c?["dark"]:["light"]:["light","dark"]).map(function(e){var r=n({theme:e,className:(0,o.A)(t,s.themedComponent,s["themedComponent--"+e])});return(0,u.jsx)(a.Fragment,{children:r},e)})})}var d=["sources","className","alt"];function f(e){var t=e.sources,n=e.className,a=e.alt,o=(0,r.A)(e,d);return(0,u.jsx)(c,{className:n,children:function(e){var n=e.theme,r=e.className;return(0,u.jsx)("img",Object.assign({src:t[n],alt:a,className:r},o))}})}},1422(e,t,n){"use strict";n.d(t,{N:()=>y,u:()=>c});var r=n(8587),a=n(6540),o=n(205),i=n(3109),l=n(4848),s=["collapsed"],u=["lazy"];function c(e){var t=e.initialState,n=(0,a.useState)(null!=t&&t),r=n[0],o=n[1],i=(0,a.useCallback)(function(){o(function(e){return!e})},[]);return{collapsed:r,setCollapsed:o,toggleCollapsed:i}}var d={display:"none",overflow:"hidden",height:"0px"},f={display:"block",overflow:"visible",height:"auto"};function p(e,t){var n=t?d:f;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function m(e){var t=e.collapsibleRef,n=e.collapsed,r=e.animation,o=(0,a.useRef)(!1);(0,a.useEffect)(function(){var e,a=t.current;function l(){var e,t,n=a.scrollHeight,o=null!=(e=null==r?void 0:r.duration)?e:function(e){if((0,i.O)())return 1;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}(n);return{transition:"height "+o+"ms "+(null!=(t=null==r?void 0:r.easing)?t:"ease-in-out"),height:n+"px"}}function s(){var e=l();a.style.transition=e.transition,a.style.height=e.height}if(!o.current)return p(a,n),void(o.current=!0);return a.style.willChange="height",e=requestAnimationFrame(function(){n?(s(),requestAnimationFrame(function(){a.style.height=d.height,a.style.overflow=d.overflow})):(a.style.display="block",requestAnimationFrame(function(){s()}))}),function(){return cancelAnimationFrame(e)}},[t,n,r])}function g(e){var t=e.as,n=void 0===t?"div":t,r=e.collapsed,o=e.children,i=e.animation,s=e.onCollapseTransitionEnd,u=e.className,c=(0,a.useRef)(null);return m({collapsibleRef:c,collapsed:r,animation:i}),(0,l.jsx)(n,{ref:c,onTransitionEnd:function(e){"height"===e.propertyName&&(p(c.current,r),null==s||s(r))},className:u,children:o})}function h(e){var t=e.collapsed,n=(0,r.A)(e,s),i=(0,a.useState)(!t),u=i[0],c=i[1],d=(0,a.useState)(t),f=d[0],p=d[1];return(0,o.A)(function(){t||c(!0)},[t]),(0,o.A)(function(){u&&p(t)},[u,t]),u?(0,l.jsx)(g,Object.assign({},n,{collapsed:f})):null}function y(e){var t=e.lazy,n=(0,r.A)(e,u),a=t?h:g;return(0,l.jsx)(a,Object.assign({},n))}},5041(e,t,n){"use strict";n.d(t,{M:()=>g,o:()=>m});var r=n(6540),a=n(2303),o=n(679),i=n(3807),l=n(6342),s=n(4848),u=(0,o.Wf)("docusaurus.announcement.dismiss"),c=(0,o.Wf)("docusaurus.announcement.id"),d=function(){return"true"===u.get()},f=function(e){return u.set(String(e))},p=r.createContext(null);function m(e){var t=e.children,n=function(){var e=(0,l.p)().announcementBar,t=(0,a.A)(),n=(0,r.useState)(function(){return!!t&&d()}),o=n[0],i=n[1];(0,r.useEffect)(function(){i(d())},[]);var s=(0,r.useCallback)(function(){f(!0),i(!0)},[]);return(0,r.useEffect)(function(){if(e){var t=e.id,n=c.get();"annoucement-bar"===n&&(n="announcement-bar");var r=t!==n;c.set(t),r&&f(!1),!r&&d()||i(!1)}},[e]),(0,r.useMemo)(function(){return{isActive:!!e&&!o,close:s}},[e,o,s])}();return(0,s.jsx)(p.Provider,{value:n,children:t})}function g(){var e=(0,r.useContext)(p);if(!e)throw new i.dV("AnnouncementBarProvider");return e}},5293(e,t,n){"use strict";n.d(t,{G:()=>x,a:()=>k});var r=n(6540),a=n(2303),o=n(3807),i=n(679),l=n(6342),s=n(4848);function u(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function c(e){return t="(prefers-color-scheme: dark)",n=function(){return e(u())},(r=window.matchMedia(t)).addEventListener("change",n),function(){return r.removeEventListener("change",n)};var t,n,r}var d=r.createContext(void 0),f=(0,i.Wf)("theme"),p="system",m=function(e){return"dark"===e?"dark":"light"},g=function(e){return null===e||e===p?null:m(e)},h=function(){return m(document.documentElement.getAttribute("data-theme"))},y=function(e){document.documentElement.setAttribute("data-theme",m(e))},b=function(){return g(document.documentElement.getAttribute("data-theme-choice"))},v=function(e){var t;document.documentElement.setAttribute("data-theme-choice",null!=(t=g(e))?t:p)};function w(){var e=(0,l.p)().colorMode,t=e.defaultMode,n=e.disableSwitch,o=e.respectPrefersColorScheme,i=function(){var e=(0,l.p)().colorMode.defaultMode,t=(0,a.A)(),n=(0,r.useState)(t?h():e),o=n[0],i=n[1],s=(0,r.useState)(t?b():null),u=s[0],c=s[1];return(0,r.useEffect)(function(){i(h()),c(b())},[]),{colorMode:o,setColorModeState:i,colorModeChoice:u,setColorModeChoiceState:c}}(),s=i.colorMode,d=i.setColorModeState,p=i.colorModeChoice,w=i.setColorModeChoiceState;(0,r.useEffect)(function(){n&&f.del()},[n]);var k=(0,r.useCallback)(function(e,n){void 0===n&&(n={});var r=n.persist,a=void 0===r||r;if(null===e){var i=o?u():t;y(i),d(i),v(null),w(null)}else y(e),v(e),d(e),w(e);a&&function(e){null===e?f.del():f.set(m(e))}(e)},[d,w,o,t]);return(0,r.useEffect)(function(){return f.listen(function(e){k(g(e.newValue))})},[k]),(0,r.useEffect)(function(){if(null===p&&o)return c(function(e){d(e),y(e)})},[o,p,d]),(0,r.useMemo)(function(){return{colorMode:s,colorModeChoice:p,setColorMode:k,get isDarkTheme(){return"dark"===s},setLightTheme:function(){k("light")},setDarkTheme:function(){k("dark")}}},[s,p,k])}function k(e){var t=e.children,n=w();return(0,s.jsx)(d.Provider,{value:n,children:t})}function x(){var e=(0,r.useContext)(d);if(null==e)throw new o.dV("ColorModeProvider","Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.");return e}},2069(e,t,n){"use strict";n.d(t,{M:()=>m,e:()=>p});var r=n(6540),a=n(5600),o=n(4581),i=n(7485),l=n(6342),s=n(3807),u=n(4848),c=r.createContext(void 0);function d(){var e,t=(e=(0,a.YL)(),0===(0,l.p)().navbar.items.length&&!e.component),n=(0,o.l)(),i=!t&&"mobile"===n,s=(0,r.useState)(!1),u=s[0],c=s[1],d=(0,r.useCallback)(function(){c(function(e){return!e})},[]);return(0,r.useEffect)(function(){"desktop"===n&&c(!1)},[n]),(0,r.useMemo)(function(){return{disabled:t,shouldRender:i,toggle:d,shown:u}},[t,i,d,u])}function f(e){var t=e.handler;return(0,i.$Z)(t),null}function p(e){var t=e.children,n=d();return(0,u.jsxs)(u.Fragment,{children:[n.shown&&(0,u.jsx)(f,{handler:function(){return n.toggle(),!1}}),(0,u.jsx)(c.Provider,{value:n,children:t})]})}function m(){var e=r.useContext(c);if(void 0===e)throw new s.dV("NavbarMobileSidebarProvider");return e}},5600(e,t,n){"use strict";n.d(t,{GX:()=>u,YL:()=>s,y_:()=>l});var r=n(6540),a=n(3807),o=n(4848),i=r.createContext(null);function l(e){var t=e.children,n=(0,r.useState)({component:null,props:null});return(0,o.jsx)(i.Provider,{value:n,children:t})}function s(){var e=(0,r.useContext)(i);if(!e)throw new a.dV("NavbarSecondaryMenuContentProvider");return e[0]}function u(e){var t=e.component,n=e.props,o=(0,r.useContext)(i);if(!o)throw new a.dV("NavbarSecondaryMenuContentProvider");var l=o[1],s=(0,a.Be)(n);return(0,r.useEffect)(function(){l({component:t,props:s})},[l,t,s]),(0,r.useEffect)(function(){return function(){return l({component:null,props:null})}},[l]),null}},4090(e,t,n){"use strict";n.d(t,{w:()=>a,J:()=>o});var r=n(6540),a="navigation-with-keyboard";function o(){(0,r.useEffect)(function(){function e(e){"keydown"===e.type&&"Tab"===e.key&&document.body.classList.add(a),"mousedown"===e.type&&document.body.classList.remove(a)}return document.addEventListener("keydown",e),document.addEventListener("mousedown",e),function(){document.body.classList.remove(a),document.removeEventListener("keydown",e),document.removeEventListener("mousedown",e)}},[])}},4581(e,t,n){"use strict";n.d(t,{l:()=>l});var r=n(6540),a=n(8193),o="desktop",i="mobile";function l(e){var t=(void 0===e?{}:e).desktopBreakpoint,n=void 0===t?996:t,l=(0,r.useState)(function(){return"ssr"}),s=l[0],u=l[1];return(0,r.useEffect)(function(){function e(){u(function(e){if(!a.A.canUseDOM)throw new Error("getWindowSize() should only be called after React hydration");return window.innerWidth>e?o:i}(n))}return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}},[n]),s}},7559(e,t,n){"use strict";n.d(t,{G:()=>r});var r={page:{blogListPage:"blog-list-page",blogPostPage:"blog-post-page",blogTagsListPage:"blog-tags-list-page",blogTagPostListPage:"blog-tags-post-list-page",blogAuthorsListPage:"blog-authors-list-page",blogAuthorsPostsPage:"blog-authors-posts-page",docsDocPage:"docs-doc-page",docsTagsListPage:"docs-tags-list-page",docsTagDocListPage:"docs-tags-doc-list-page",mdxPage:"mdx-page"},wrapper:{main:"main-wrapper",blogPages:"blog-wrapper",docsPages:"docs-wrapper",mdxPages:"mdx-wrapper"},common:{editThisPage:"theme-edit-this-page",lastUpdated:"theme-last-updated",backToTopButton:"theme-back-to-top-button",codeBlock:"theme-code-block",admonition:"theme-admonition",unlistedBanner:"theme-unlisted-banner",draftBanner:"theme-draft-banner",admonitionType:function(e){return"theme-admonition-"+e}},announcementBar:{container:"theme-announcement-bar"},tabs:{container:"theme-tabs-container"},layout:{navbar:{container:"theme-layout-navbar",containerLeft:"theme-layout-navbar-left",containerRight:"theme-layout-navbar-right",mobileSidebar:{container:"theme-layout-navbar-sidebar",panel:"theme-layout-navbar-sidebar-panel"}},main:{container:"theme-layout-main"},footer:{container:"theme-layout-footer",column:"theme-layout-footer-column"}},docs:{docVersionBanner:"theme-doc-version-banner",docVersionBadge:"theme-doc-version-badge",docBreadcrumbs:"theme-doc-breadcrumbs",docMarkdown:"theme-doc-markdown",docTocMobile:"theme-doc-toc-mobile",docTocDesktop:"theme-doc-toc-desktop",docFooter:"theme-doc-footer",docFooterTagsRow:"theme-doc-footer-tags-row",docFooterEditMetaRow:"theme-doc-footer-edit-meta-row",docSidebarContainer:"theme-doc-sidebar-container",docSidebarMenu:"theme-doc-sidebar-menu",docSidebarItemCategory:"theme-doc-sidebar-item-category",docSidebarItemLink:"theme-doc-sidebar-item-link",docSidebarItemCategoryLevel:function(e){return"theme-doc-sidebar-item-category-level-"+e},docSidebarItemLinkLevel:function(e){return"theme-doc-sidebar-item-link-level-"+e}},blog:{blogFooterTagsRow:"theme-blog-footer-tags-row",blogFooterEditMetaRow:"theme-blog-footer-edit-meta-row"},pages:{pageFooterEditMetaRow:"theme-pages-footer-edit-meta-row"}}},3109(e,t,n){"use strict";function r(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}n.d(t,{O:()=>r})},3535(e,t,n){"use strict";n.d(t,{v:()=>i});var r=n(6342);const a="anchorTargetStickyNavbar_Vzrq",o="anchorTargetHideOnScrollNavbar_vjPI";function i(e){var t=(0,r.p)().navbar.hideOnScroll;if(void 0!==e)return t?o:a}},2181(e,t,n){"use strict";n.d(t,{bq:()=>f,MN:()=>d,a2:()=>c,k2:()=>p});var r=n(7387),a=n(6540),o=n(1312),i=n(440);const l="errorBoundaryError_a6uf",s="errorBoundaryFallback_VBag";var u=n(4848);function c(e){return(0,u.jsx)("button",Object.assign({type:"button"},e,{children:(0,u.jsx)(o.A,{id:"theme.ErrorPageContent.tryAgain",description:"The label of the button to try again rendering when the React error boundary captures an error",children:"Try again"})}))}function d(e){var t=e.error,n=e.tryAgain;return(0,u.jsxs)("div",{className:s,children:[(0,u.jsx)("p",{children:t.message}),(0,u.jsx)(c,{onClick:n})]})}function f(e){var t=e.error,n=(0,i.rA)(t).map(function(e){return e.message}).join("\n\nCause:\n");return(0,u.jsx)("p",{className:l,children:n})}var p=function(e){function t(){return e.apply(this,arguments)||this}(0,r.A)(t,e);var n=t.prototype;return n.componentDidCatch=function(e,t){throw this.props.onError(e,t)},n.render=function(){return this.props.children},t}(a.Component)},7485(e,t,n){"use strict";n.d(t,{$Z:()=>l,Hl:()=>s,jy:()=>u});var r=n(3845),a=n(6540),o=n(6347),i=n(3807);function l(e){!function(e){var t=(0,o.W6)(),n=(0,i._q)(e);(0,a.useEffect)(function(){return t.block(function(e,t){return n(e,t)})},[t,n])}(function(t,n){if("POP"===n)return e(t,n)})}function s(e){var t=(0,o.W6)();return(0,a.useSyncExternalStore)(t.listen,function(){return e(t)},function(){return e(Object.assign({},t,{location:Object.assign({},t.location,{search:"",hash:"",state:void 0})}))})}function u(e,t){var n=function(e,t){for(var n,a=new URLSearchParams,o=(0,r.A)(e);!(n=o()).done;)for(var i,l=n.value,s=(0,r.A)(l.entries());!(i=s()).done;){var u=i.value,c=u[0],d=u[1];"append"===t?a.append(c,d):a.set(c,d)}return a}(e.map(function(e){return new URLSearchParams(null!=e?e:"")}),t),a=n.toString();return a?"?"+a:a}},5500(e,t,n){"use strict";n.d(t,{Jx:()=>y,be:()=>m,e3:()=>h});var r=n(6540),a=n(4164),o=n(5260),i=n(6803),l=n(6025),s=n(4563),u=n(4848);function c(e){var t=e.title,n=(0,s.s$)().format(t);return(0,u.jsxs)(o.A,{children:[(0,u.jsx)("title",{children:n}),(0,u.jsx)("meta",{property:"og:title",content:n})]})}function d(e){var t=e.description;return(0,u.jsxs)(o.A,{children:[(0,u.jsx)("meta",{name:"description",content:t}),(0,u.jsx)("meta",{property:"og:description",content:t})]})}function f(e){var t=e.image,n=(0,(0,l.hH)().withBaseUrl)(t,{absolute:!0});return(0,u.jsxs)(o.A,{children:[(0,u.jsx)("meta",{property:"og:image",content:n}),(0,u.jsx)("meta",{name:"twitter:image",content:n})]})}function p(e){var t=e.keywords;return(0,u.jsx)(o.A,{children:(0,u.jsx)("meta",{name:"keywords",content:Array.isArray(t)?t.join(","):t})})}function m(e){var t=e.title,n=e.description,r=e.keywords,a=e.image,i=e.children;return(0,u.jsxs)(u.Fragment,{children:[t&&(0,u.jsx)(c,{title:t}),n&&(0,u.jsx)(d,{description:n}),r&&(0,u.jsx)(p,{keywords:r}),a&&(0,u.jsx)(f,{image:a}),i&&(0,u.jsx)(o.A,{children:i})]})}var g=r.createContext(void 0);function h(e){var t=e.className,n=e.children,i=r.useContext(g),l=(0,a.A)(i,t);return(0,u.jsxs)(g.Provider,{value:l,children:[(0,u.jsx)(o.A,{children:(0,u.jsx)("html",{className:l})}),n]})}function y(e){var t=e.children,n=(0,i.A)(),r="plugin-"+n.plugin.name.replace(/docusaurus-(?:plugin|theme)-(?:content-)?/gi,""),o="plugin-id-"+n.plugin.id;return(0,u.jsx)(h,{className:(0,a.A)(r,o),children:t})}},3807(e,t,n){"use strict";n.d(t,{dV:()=>m,fM:()=>h,_q:()=>f,ZC:()=>p,Be:()=>g});var r=n(8634),a=n(7387);function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}var i=n(3662);function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(l=function(){return!!e})()}function s(e){var t="function"==typeof Map?new Map:void 0;return s=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(l())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var a=new(e.bind.apply(e,r));return n&&(0,i.A)(a,n.prototype),a}(e,arguments,o(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),(0,i.A)(n,e)},s(e)}var u=n(6540),c=n(205),d=n(4848);function f(e){var t=(0,u.useRef)(e);return(0,c.A)(function(){t.current=e},[e]),(0,u.useCallback)(function(){return t.current.apply(t,arguments)},[])}function p(e){var t=(0,u.useRef)();return(0,c.A)(function(){t.current=e}),t.current}var m=function(e){function t(t,n){var a,o,i;return(i=e.call(this)||this).name="ReactContextError",i.message="Hook "+(null!=(a=null==(o=i.stack)||null==(o=o.split("\n")[1])||null==(o=o.match((0,r.A)(/at (?:\w+\.)?(\w+)/,{name:1})))?void 0:o.groups.name)?a:"")+" is called outside the <"+t+">. "+(null!=n?n:""),i}return(0,a.A)(t,e),t}(s(Error));function g(e){var t=Object.entries(e);return t.sort(function(e,t){return e[0].localeCompare(t[0])}),(0,u.useMemo)(function(){return e},t.flat())}function h(e){return function(t){var n=t.children;return(0,d.jsx)(d.Fragment,{children:e.reduceRight(function(e,t){return(0,d.jsx)(t,{children:e})},n)})}}},9169(e,t,n){"use strict";n.d(t,{Dt:()=>l,ys:()=>i});var r=n(6540),a=n(8328),o=n(4586);function i(e,t){var n=function(e){var t;return null==(t=!e||e.endsWith("/")?e:e+"/")?void 0:t.toLowerCase()};return n(e)===n(t)}function l(){var e=(0,o.A)().siteConfig.baseUrl;return(0,r.useMemo)(function(){return function(e){var t=e.baseUrl;function n(e){return e.path===t&&!0===e.exact}function r(e){return e.path===t&&!e.exact}return function e(t){if(0!==t.length)return t.find(n)||e(t.filter(r).flatMap(function(e){var t;return null!=(t=e.routes)?t:[]}))}(e.routes)}({routes:a.A,baseUrl:e})},[e])}},3104(e,t,n){"use strict";n.d(t,{Mq:()=>f,Tv:()=>u,gk:()=>p});var r=n(6540),a=n(8193),o=n(2303),i=(n(205),n(3807)),l=n(4848);var s=r.createContext(void 0);function u(e){var t,n=e.children,a=(t=(0,r.useRef)(!0),(0,r.useMemo)(function(){return{scrollEventsEnabledRef:t,enableScrollEvents:function(){t.current=!0},disableScrollEvents:function(){t.current=!1}}},[]));return(0,l.jsx)(s.Provider,{value:a,children:n})}function c(){var e=(0,r.useContext)(s);if(null==e)throw new i.dV("ScrollControllerProvider");return e}var d=function(){return a.A.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null};function f(e,t){void 0===t&&(t=[]);var n=c().scrollEventsEnabledRef,a=(0,r.useRef)(d()),o=(0,i._q)(e);(0,r.useEffect)(function(){var e=function(){if(n.current){var e=d();o(e,a.current),a.current=e}},t={passive:!0};return e(),window.addEventListener("scroll",e,t),function(){return window.removeEventListener("scroll",e,t)}},[o,n].concat(t))}function p(){var e=(0,r.useRef)(null),t=(0,o.A)()&&"smooth"===getComputedStyle(document.documentElement).scrollBehavior;return{startScroll:function(n){e.current=t?function(e){return window.scrollTo({top:e,behavior:"smooth"}),function(){}}(n):function(e){var t=null,n=document.documentElement.scrollTop>e;return function r(){var a=document.documentElement.scrollTop;(n&&a>e||!n&&au});n(6540);const r=JSON.parse('{"N":"localStorage","M":""}');var a=r.N;function o(e){var t=e.key,n=e.oldValue,r=e.newValue,a=e.storage;if(n!==r){var o=document.createEvent("StorageEvent");o.initStorageEvent("storage",!1,!1,t,n,r,window.location.href,a),window.dispatchEvent(o)}}function i(e){if(void 0===e&&(e=a),"undefined"==typeof window)throw new Error("Browser storage is not available on Node.js/Docusaurus SSR process.");if("none"===e)return null;try{return window[e]}catch(n){return t=n,l||(console.warn("Docusaurus browser storage is not available.\nPossible reasons: running Docusaurus in an iframe, in an incognito browser session, or using too strict browser privacy settings.",t),l=!0),null}var t}var l=!1;var s={get:function(){return null},set:function(){},del:function(){},listen:function(){return function(){}}};function u(e,t){var n=""+e+r.M;if("undefined"==typeof window)return function(e){function t(){throw new Error('Illegal storage API usage for storage key "'+e+'".\nDocusaurus storage APIs are not supposed to be called on the server-rendering process.\nPlease only call storage APIs in effects and event handlers.')}return{get:t,set:t,del:t,listen:t}}(n);var a=i(null==t?void 0:t.persistence);return null===a?s:{get:function(){try{return a.getItem(n)}catch(e){return console.error("Docusaurus storage error, can't get key="+n,e),null}},set:function(e){try{var t=a.getItem(n);a.setItem(n,e),o({key:n,oldValue:t,newValue:e,storage:a})}catch(r){console.error("Docusaurus storage error, can't set "+n+"="+e,r)}},del:function(){try{var e=a.getItem(n);a.removeItem(n),o({key:n,oldValue:e,newValue:null,storage:a})}catch(t){console.error("Docusaurus storage error, can't delete key="+n,t)}},listen:function(e){try{var t=function(t){t.storageArea===a&&t.key===n&&e(t)};return window.addEventListener("storage",t),function(){return window.removeEventListener("storage",t)}}catch(r){return console.error("Docusaurus storage error, can't listen for changes of key="+n,r),function(){}}}}}},4563(e,t,n){"use strict";n.d(t,{AL:()=>c,s$:()=>d});var r=n(6540),a=n(4586),o=n(6803),i=n(3807),l=n(4848),s=function(e){var t=e.title,n=e.siteTitle,r=e.titleDelimiter,a=null==t?void 0:t.trim();return a&&a!==n?a+" "+r+" "+n:n},u=(0,r.createContext)(null);function c(e){var t=e.formatter,n=e.children;return(0,l.jsx)(u.Provider,{value:t,children:n})}function d(){var e=function(){var e=(0,r.useContext)(u);if(null===e)throw new i.dV("TitleFormatterProvider");return e}(),t=(0,a.A)().siteConfig,n=t.title,l=t.titleDelimiter,c=(0,o.A)().plugin;return{format:function(t){return e({title:t,siteTitle:n,titleDelimiter:l,plugin:c,defaultFormatter:s})}}}},2131(e,t,n){"use strict";n.d(t,{o:()=>i});var r=n(4586),a=n(6347),o=n(440);function i(){var e=(0,r.A)(),t=e.siteConfig,n=t.baseUrl,i=t.trailingSlash,l=e.i18n.localeConfigs,s=(0,a.zy)().pathname,u=(0,o.Ks)(s,{trailingSlash:i,baseUrl:n}).replace(n,"");return{createUrl:function(e){var t=e.locale,n=e.fullyQualified,r=function(e){var t=l[e];if(!t)throw new Error("Unexpected Docusaurus bug, no locale config found for locale="+e);return t}(t);return""+(""+(n?r.url:""))+r.baseUrl+u}}}},5062(e,t,n){"use strict";n.d(t,{$:()=>i});var r=n(6540),a=n(6347),o=n(3807);function i(e){var t=(0,a.zy)(),n=(0,o.ZC)(t),i=(0,o._q)(e);(0,r.useEffect)(function(){n&&t!==n&&i({location:t,previousLocation:n})},[i,t,n])}},6342(e,t,n){"use strict";n.d(t,{p:()=>a});var r=n(4586);function a(){return(0,r.A)().siteConfig.themeConfig}},2983(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addTrailingSlash=a,t.default=function(e,t){var n=t.trailingSlash,r=t.baseUrl;if(e.startsWith("#"))return e;if(void 0===n)return e;var i=e.split(/[#?]/)[0],l="/"===i||i===r?i:(s=i,u=n,u?a(s):o(s));var s,u;return e.replace(i,l)},t.addLeadingSlash=function(e){return(0,r.addPrefix)(e,"/")},t.removeTrailingSlash=o;var r=n(2566);function a(e){return e.endsWith("/")?e:e+"/"}function o(e){return(0,r.removeSuffix)(e,"/")}},253(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=function e(t){if(t.cause)return[t].concat(e(t.cause));return[t]}},440(e,t,n){"use strict";t.rA=t.Ks=void 0;var r=n(1635);var a=n(2983);Object.defineProperty(t,"Ks",{enumerable:!0,get:function(){return r.__importDefault(a).default}});var o=n(2566);var i=n(253);Object.defineProperty(t,"rA",{enumerable:!0,get:function(){return i.getErrorCausalChain}})},2566(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addPrefix=function(e,t){return e.startsWith(t)?e:""+t+e},t.removeSuffix=function(e,t){if(""===t)return e;return e.endsWith(t)?e.slice(0,-t.length):e},t.addSuffix=function(e,t){return e.endsWith(t)?e:""+e+t},t.removePrefix=function(e,t){return e.startsWith(t)?e.slice(t.length):e}},1513(e,t,n){"use strict";n.d(t,{zR:()=>w,TM:()=>A,yJ:()=>p,sC:()=>T,AO:()=>f});var r=n(8168);function a(e){return"/"===e.charAt(0)}function o(e,t){for(var n=t,r=n+1,a=e.length;r=0;f--){var p=i[f];"."===p?o(i,f):".."===p?(o(i,f),d++):d&&(o(i,f),d--)}if(!u)for(;d--;d)i.unshift("..");!u||""===i[0]||i[0]&&a(i[0])||i.unshift("");var m=i.join("/");return n&&"/"!==m.substr(-1)&&(m+="/"),m};var l=n(1561);function s(e){return"/"===e.charAt(0)?e:"/"+e}function u(e){return"/"===e.charAt(0)?e.substr(1):e}function c(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function f(e){var t=e.pathname,n=e.search,r=e.hash,a=t||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}function p(e,t,n,a){var o;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),o.state=t):(void 0===(o=(0,r.A)({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(l){throw l instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):l}return n&&(o.key=n),a?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=i(o.pathname,a.pathname)):o.pathname=a.pathname:o.pathname||(o.pathname="/"),o}function m(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,a){if(null!=e){var o="function"==typeof e?e(t,n):e;"string"==typeof o?"function"==typeof r?r(o,a):a(!0):a(!1!==o)}else a(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter(function(e){return e!==r})}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,a):n.push(a),d({action:r,location:a,index:t,entries:n})}})},replace:function(e,t){var r="REPLACE",a=p(e,t,g(),w.location);c.confirmTransitionTo(a,r,n,function(e){e&&(w.entries[w.index]=a,d({action:r,location:a}))})},go:v,goBack:function(){v(-1)},goForward:function(){v(1)},canGo:function(e){var t=w.index+e;return t>=0&&t
'};function a(e,t,n){return en?n:e}function o(e){return 100*(-1+e)}function i(e,t,n){var a;return(a="translate3d"===r.positionUsing?{transform:"translate3d("+o(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+o(e)+"%,0)"}:{"margin-left":o(e)+"%"}).transition="all "+t+"ms "+n,a}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=a(e,r.minimum,1),n.status=1===e?null:e;var o=n.render(!t),u=o.querySelector(r.barSelector),c=r.speed,d=r.easing;return o.offsetWidth,l(function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),s(u,i(e,c,d)),1===e?(s(o,{transition:"none",opacity:1}),o.offsetWidth,setTimeout(function(){s(o,{transition:"all "+c+"ms linear",opacity:0}),setTimeout(function(){n.remove(),t()},c)},c)):setTimeout(t,c)}),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout(function(){n.status&&(n.trickle(),e())},r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*a(Math.random()*t,.1,.95)),t=a(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always(function(){0===--t?(e=0,n.done()):n.set((e-t)/e)}),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");c(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var a,i=t.querySelector(r.barSelector),l=e?"-100":o(n.status||0),u=document.querySelector(r.parent);return s(i,{transition:"all 0 linear",transform:"translate3d("+l+"%,0,0)"}),r.showSpinner||(a=t.querySelector(r.spinnerSelector))&&p(a),u!=document.body&&c(u,"nprogress-custom-parent"),u.appendChild(t),t},n.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&p(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var l=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),s=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(e,t){return t.toUpperCase()})}function r(t){var n=document.body.style;if(t in n)return t;for(var r,a=e.length,o=t.charAt(0).toUpperCase()+t.slice(1);a--;)if((r=e[a]+o)in n)return r;return t}function a(e){return e=n(e),t[e]||(t[e]=r(e))}function o(e,t,n){t=a(t),e.style[t]=n}return function(e,t){var n,r,a=arguments;if(2==a.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&o(e,n,r);else o(e,a[1],a[2])}}();function u(e,t){return("string"==typeof e?e:f(e)).indexOf(" "+t+" ")>=0}function c(e,t){var n=f(e),r=n+t;u(n,t)||(e.className=r.substring(1))}function d(e,t){var n,r=f(e);u(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function f(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function p(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n},void 0===(a="function"==typeof r?r.call(t,n,t,e):r)||(e.exports=a)},5302(e,t,n){var r=n(4634);e.exports=g,e.exports.parse=o,e.exports.compile=function(e,t){return u(o(e,t),t)},e.exports.tokensToFunction=u,e.exports.tokensToRegExp=m;var a=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function o(e,t){for(var n,r=[],o=0,l=0,s="",u=t&&t.delimiter||"/";null!=(n=a.exec(e));){var c=n[0],f=n[1],p=n.index;if(s+=e.slice(l,p),l=p+c.length,f)s+=f[1];else{var m=e[l],g=n[2],h=n[3],y=n[4],b=n[5],v=n[6],w=n[7];s&&(r.push(s),s="");var k=null!=g&&null!=m&&m!==g,x="+"===v||"*"===v,S="?"===v||"*"===v,E=g||u,_=y||b,A=g||("string"==typeof r[r.length-1]?r[r.length-1]:"");r.push({name:h||o++,prefix:g||"",delimiter:E,optional:S,repeat:x,partial:k,asterisk:!!w,pattern:_?d(_):w?".*":i(E,A)})}}return l-1?"[^"+c(e)+"]+?":c(t)+"|(?:(?!"+c(t)+")[^"+c(e)+"])+?"}function l(e){return encodeURI(e).replace(/[\/?#]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function s(e){return encodeURI(e).replace(/[?#]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function u(e,t){for(var n=new Array(e.length),a=0;a[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/}},9700(){!function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,a,o){if(n.language===r){var i=n.tokenStack=[];n.code=n.code.replace(a,function(e){if("function"==typeof o&&!o(e))return e;for(var a,l=i.length;-1!==n.code.indexOf(a=t(r,l));)++l;return i[l]=e,a}),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var a=0,o=Object.keys(n.tokenStack);!function i(l){for(var s=0;s=o.length);s++){var u=l[s];if("string"==typeof u||u.content&&"string"==typeof u.content){var c=o[a],d=n.tokenStack[c],f="string"==typeof u?u:u.content,p=t(r,c),m=f.indexOf(p);if(m>-1){++a;var g=f.substring(0,m),h=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),y=f.substring(m+p.length),b=[];g&&b.push.apply(b,i([g])),b.push(h),y&&b.push.apply(b,i([y])),"string"==typeof u?l.splice.apply(l,[s,1].concat(b)):u.content=b}}else u.content&&i(u.content)}return l}(n.tokens)}}}})}(Prism)},3890(e,t,n){var r={"./prism-lua":64};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=3890},2694(e,t,n){"use strict";var r=n(6925);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},5556(e,t,n){e.exports=n(2694)()},6925(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},1247(e,t,n){"use strict";var r=n(9982),a=n(6540),o=n(961);function i(e){var t="https://react.dev/errors/"+e;if(1z||(e.current=D[z],D[z]=null,z--)}function U(e,t){z++,D[z]=e.current,e.current=t}var $,H,V=M(null),W=M(null),q=M(null),G=M(null);function Q(e,t){switch(U(q,t),U(W,e),U(V,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?yd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)e=bd(t=yd(t),e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(V),U(V,e)}function Y(){B(V),B(W),B(q)}function K(e){null!==e.memoizedState&&U(G,e);var t=V.current,n=bd(t,e.type);t!==n&&(U(W,e),U(V,n))}function Z(e){W.current===e&&(B(V),B(W)),G.current===e&&(B(G),df._currentValue=F)}function X(e){if(void 0===$)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);$=t&&t[1]||"",H=-1)":-1--a||s[r]!==u[a]){var c="\n"+s[r].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}}while(1<=r&&0<=a);break}}}finally{J=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?X(n):""}function te(e,t){switch(e.tag){case 26:case 27:case 5:return X(e.type);case 16:return X("Lazy");case 13:return e.child!==t&&null!==t?X("Suspense Fallback"):X("Suspense");case 19:return X("SuspenseList");case 0:case 15:return ee(e.type,!1);case 11:return ee(e.type.render,!1);case 1:return ee(e.type,!0);case 31:return X("Activity");default:return""}}function ne(e){try{var t="",n=null;do{t+=te(e,n),n=e,e=e.return}while(e);return t}catch(r){return"\nError generating stack: "+r.message+"\n"+r.stack}}var re=Object.prototype.hasOwnProperty,ae=r.unstable_scheduleCallback,oe=r.unstable_cancelCallback,ie=r.unstable_shouldYield,le=r.unstable_requestPaint,se=r.unstable_now,ue=r.unstable_getCurrentPriorityLevel,ce=r.unstable_ImmediatePriority,de=r.unstable_UserBlockingPriority,fe=r.unstable_NormalPriority,pe=r.unstable_LowPriority,me=r.unstable_IdlePriority,ge=r.log,he=r.unstable_setDisableYieldValue,ye=null,be=null;function ve(e){if("function"==typeof ge&&he(e),be&&"function"==typeof be.setStrictMode)try{be.setStrictMode(ye,e)}catch(t){}}var we=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(ke(e)/xe|0)|0},ke=Math.log,xe=Math.LN2;var Se=256,Ee=262144,_e=4194304;function Ae(e){var t=42&e;if(0!==t)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return 261888&e;case 262144:case 524288:case 1048576:case 2097152:return 3932160&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ce(e,t,n){var r=e.pendingLanes;if(0===r)return 0;var a=0,o=e.suspendedLanes,i=e.pingedLanes;e=e.warmLanes;var l=134217727&r;return 0!==l?0!==(r=l&~o)?a=Ae(r):0!==(i&=l)?a=Ae(i):n||0!==(n=l&~e)&&(a=Ae(n)):0!==(l=r&~o)?a=Ae(l):0!==i?a=Ae(i):n||0!==(n=r&~e)&&(a=Ae(n)),0===a?0:0!==t&&t!==a&&0===(t&o)&&((o=a&-a)>=(n=t&-t)||32===o&&4194048&n)?t:a}function Te(e,t){return 0===(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function je(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function Oe(){var e=_e;return!(62914560&(_e<<=1))&&(_e=4194304),e}function Pe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ne(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Le(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-we(t);e.entangledLanes|=t,e.entanglements[r]=1073741824|e.entanglements[r]|261930&n}function Re(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-we(n),a=1<=An),jn=String.fromCharCode(32),On=!1;function Pn(e,t){switch(e){case"keyup":return-1!==En.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Nn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Ln=!1;var Rn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function In(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Rn[e.type]:"textarea"===t}function Fn(e,t,n,r){It?Ft?Ft.push(r):Ft=[r]:It=r,0<(t=rd(t,"onChange")).length&&(n=new nn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Dn=null,zn=null;function Mn(e){Yc(e,0)}function Bn(e){if(mt(Xe(e)))return e}function Un(e,t){if("change"===e)return t}var $n=!1;if(Ut){var Hn;if(Ut){var Vn="oninput"in document;if(!Vn){var Wn=document.createElement("div");Wn.setAttribute("oninput","return;"),Vn="function"==typeof Wn.oninput}Hn=Vn}else Hn=!1;$n=Hn&&(!document.documentMode||9=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=er(r)}}function nr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?nr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function rr(e){for(var t=gt((e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window).document);t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=gt((e=t.contentWindow).document)}return t}function ar(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var or=Ut&&"documentMode"in document&&11>=document.documentMode,ir=null,lr=null,sr=null,ur=!1;function cr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;ur||null==ir||ir!==gt(r)||("selectionStart"in(r=ir)&&ar(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},sr&&Jn(sr,r)||(sr=r,0<(r=rd(lr,"onSelect")).length&&(t=new nn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ir)))}function dr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var fr={animationend:dr("Animation","AnimationEnd"),animationiteration:dr("Animation","AnimationIteration"),animationstart:dr("Animation","AnimationStart"),transitionrun:dr("Transition","TransitionRun"),transitionstart:dr("Transition","TransitionStart"),transitioncancel:dr("Transition","TransitionCancel"),transitionend:dr("Transition","TransitionEnd")},pr={},mr={};function gr(e){if(pr[e])return pr[e];if(!fr[e])return e;var t,n=fr[e];for(t in n)if(n.hasOwnProperty(t)&&t in mr)return pr[e]=n[t];return e}Ut&&(mr=document.createElement("div").style,"AnimationEvent"in window||(delete fr.animationend.animation,delete fr.animationiteration.animation,delete fr.animationstart.animation),"TransitionEvent"in window||delete fr.transitionend.transition);var hr=gr("animationend"),yr=gr("animationiteration"),br=gr("animationstart"),vr=gr("transitionrun"),wr=gr("transitionstart"),kr=gr("transitioncancel"),xr=gr("transitionend"),Sr=new Map,Er="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function _r(e,t){Sr.set(e,t),rt(t,[e])}Er.push("scrollEnd");var Ar="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},Cr=[],Tr=0,jr=0;function Or(){for(var e=Tr,t=jr=Tr=0;t>=i,a-=i,na=1<<32-we(t)+a|n<g?(h=d,d=null):h=d.sibling;var y=p(a,d,l[g],s);if(null===y){null===d&&(d=h);break}e&&d&&null===y.alternate&&t(a,d),i=o(y,i,g),null===c?u=y:c.sibling=y,c=y,d=h}if(g===l.length)return n(a,d),da&&aa(a,g),u;if(null===d){for(;gh?(y=g,g=null):y=g.sibling;var v=p(a,g,b.value,u);if(null===v){null===g&&(g=y);break}e&&g&&null===v.alternate&&t(a,g),l=o(v,l,h),null===d?c=v:d.sibling=v,d=v,g=y}if(b.done)return n(a,g),da&&aa(a,h),c;if(null===g){for(;!b.done;h++,b=s.next())null!==(b=f(a,b.value,u))&&(l=o(b,l,h),null===d?c=b:d.sibling=b,d=b);return da&&aa(a,h),c}for(g=r(g);!b.done;h++,b=s.next())null!==(b=m(g,a,h,b.value,u))&&(e&&null!==b.alternate&&g.delete(null===b.key?h:b.key),l=o(b,l,h),null===d?c=b:d.sibling=b,d=b);return e&&g.forEach(function(e){return t(a,e)}),da&&aa(a,h),c}(s,u,c=v.call(c),d)}if("function"==typeof c.then)return b(s,u,uo(c),d);if(c.$$typeof===k)return b(s,u,La(s,c),d);fo(s,c)}return"string"==typeof c&&""!==c||"number"==typeof c||"bigint"==typeof c?(c=""+c,null!==u&&6===u.tag?(n(s,u.sibling),(d=a(u,c)).return=s,s=d):(n(s,u),(d=Vr(c,s.mode,d)).return=s,s=d),l(s)):n(s,u)}return function(e,t,n,r){try{so=0;var a=b(e,t,n,r);return lo=null,a}catch(i){if(i===Za||i===Ja)throw i;var o=zr(29,i,null,e.mode);return o.lanes=r,o.return=e,o}}}var mo=po(!0),go=po(!1),ho=!1;function yo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function bo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function vo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function wo(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&pu){var a=r.pending;return null===a?t.next=t:(t.next=a.next,a.next=t),r.pending=t,t=Ir(e),Rr(e,null,n),t}return Pr(e,r,t,n),Ir(e)}function ko(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194048&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Re(e,n)}}function xo(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var a=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var i={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};null===o?a=o=i:o=o.next=i,n=n.next}while(null!==n);null===o?a=o=t:o=o.next=t}else a=o=t;return n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:o,shared:r.shared,callbacks:r.callbacks},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var So=!1;function Eo(){if(So){if(null!==Va)throw Va}}function _o(e,t,n,r){So=!1;var a=e.updateQueue;ho=!1;var o=a.firstBaseUpdate,i=a.lastBaseUpdate,l=a.shared.pending;if(null!==l){a.shared.pending=null;var s=l,u=s.next;s.next=null,null===i?o=u:i.next=u,i=s;var c=e.alternate;null!==c&&((l=(c=c.updateQueue).lastBaseUpdate)!==i&&(null===l?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=s))}if(null!==o){var d=a.baseState;for(i=0,c=u=s=null,l=o;;){var f=-536870913&l.lane,m=f!==l.lane;if(m?(hu&f)===f:(r&f)===f){0!==f&&f===Ha&&(So=!0),null!==c&&(c=c.next={lane:0,tag:l.tag,payload:l.payload,callback:null,next:null});e:{var g=e,h=l;f=t;var y=n;switch(h.tag){case 1:if("function"==typeof(g=h.payload)){d=g.call(y,d,f);break e}d=g;break e;case 3:g.flags=-65537&g.flags|128;case 0:if(null==(f="function"==typeof(g=h.payload)?g.call(y,d,f):g))break e;d=p({},d,f);break e;case 2:ho=!0}}null!==(f=l.callback)&&(e.flags|=64,m&&(e.flags|=8192),null===(m=a.callbacks)?a.callbacks=[f]:m.push(f))}else m={lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},null===c?(u=c=m,s=d):c=c.next=m,i|=f;if(null===(l=l.next)){if(null===(l=a.shared.pending))break;l=(m=l).next,m.next=null,a.lastBaseUpdate=m,a.shared.pending=null}}null===c&&(s=d),a.baseState=s,a.firstBaseUpdate=u,a.lastBaseUpdate=c,null===o&&(a.shared.lanes=0),Eu|=i,e.lanes=i,e.memoizedState=d}}function Ao(e,t){if("function"!=typeof e)throw Error(i(191,e));e.call(t)}function Co(e,t){var n=e.callbacks;if(null!==n)for(e.callbacks=null,e=0;eo?o:8;var i,l,s,u=R.T,c={};R.T=c,dl(e,!1,t,n);try{var d=a(),f=R.S;if(null!==f&&f(c,d),null!==d&&"object"==typeof d&&"function"==typeof d.then)cl(e,t,(i=r,l=[],s={status:"pending",value:null,reason:null,then:function(e){l.push(e)}},d.then(function(){s.status="fulfilled",s.value=i;for(var e=0;e<\/script>",o=o.removeChild(o.firstChild);break;case"select":o="string"==typeof r.is?l.createElement("select",{is:r.is}):l.createElement("select"),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o="string"==typeof r.is?l.createElement(a,{is:r.is}):l.createElement(a)}}o[Ue]=t,o[$e]=r;e:for(l=t.child;null!==l;){if(5===l.tag||6===l.tag)o.appendChild(l.stateNode);else if(4!==l.tag&&27!==l.tag&&null!==l.child){l.child.return=l,l=l.child;continue}if(l===t)break e;for(;null===l.sibling;){if(null===l.return||l.return===t)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}t.stateNode=o;e:switch(fd(o,a,r),a){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&ls(t)}}return fs(t),ss(t,t.type,null===e||e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==r&&ls(t);else{if("string"!=typeof r&&null===t.stateNode)throw Error(i(166));if(e=q.current,ba(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,null!==(a=ua))switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Ue]=t,(e=!!(e.nodeValue===n||null!==r&&!0===r.suppressHydrationWarning||ud(e.nodeValue,n)))||ga(t,!0)}else(e=hd(e).createTextNode(r))[Ue]=t,t.stateNode=e}return fs(t),null;case 31:if(n=t.memoizedState,null===e||null!==e.memoizedState){if(r=ba(t),null!==n){if(null===e){if(!r)throw Error(i(318));if(!(e=null!==(e=t.memoizedState)?e.dehydrated:null))throw Error(i(557));e[Ue]=t}else va(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;fs(t),e=!1}else n=wa(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return 256&t.flags?(Mo(t),t):(Mo(t),null);if(128&t.flags)throw Error(i(558))}return fs(t),null;case 13:if(r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(a=ba(t),null!==r&&null!==r.dehydrated){if(null===e){if(!a)throw Error(i(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(i(317));a[Ue]=t}else va(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;fs(t),a=!1}else a=wa(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return 256&t.flags?(Mo(t),t):(Mo(t),null)}return Mo(t),128&t.flags?(t.lanes=n,t):(n=null!==r,e=null!==e&&null!==e.memoizedState,n&&(a=null,null!==(r=t.child).alternate&&null!==r.alternate.memoizedState&&null!==r.alternate.memoizedState.cachePool&&(a=r.alternate.memoizedState.cachePool.pool),o=null,null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),cs(t,t.updateQueue),fs(t),null);case 4:return Y(),null===e&&Jc(t.stateNode.containerInfo),fs(t),null;case 10:return Aa(t.type),fs(t),null;case 19:if(B(Bo),null===(r=t.memoizedState))return fs(t),null;if(a=!!(128&t.flags),null===(o=r.rendering))if(a)ds(r,!1);else{if(0!==Su||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(o=Uo(e))){for(t.flags|=128,ds(r,!1),e=o.updateQueue,t.updateQueue=e,cs(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)Ur(n,e),n=n.sibling;return U(Bo,1&Bo.current|2),da&&aa(t,r.treeForkCount),t.child}e=e.sibling}null!==r.tail&&se()>Ru&&(t.flags|=128,a=!0,ds(r,!1),t.lanes=4194304)}else{if(!a)if(null!==(e=Uo(o))){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,cs(t,e),ds(r,!0),null===r.tail&&"hidden"===r.tailMode&&!o.alternate&&!da)return fs(t),null}else 2*se()-r.renderingStartTime>Ru&&536870912!==n&&(t.flags|=128,a=!0,ds(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(null!==(e=r.last)?e.sibling=o:t.child=o,r.last=o)}return null!==r.tail?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=se(),e.sibling=null,n=Bo.current,U(Bo,a?1&n|2:1&n),da&&aa(t,r.treeForkCount),e):(fs(t),null);case 22:case 23:return Mo(t),No(),r=null!==t.memoizedState,null!==e?null!==e.memoizedState!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?!!(536870912&n)&&!(128&t.flags)&&(fs(t),6&t.subtreeFlags&&(t.flags|=8192)):fs(t),null!==(n=t.updateQueue)&&cs(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),r=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),null!==e&&B(Ga),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Aa(za),fs(t),null;case 25:case 30:return null}throw Error(i(156,t.tag))}function ms(e,t){switch(la(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Aa(za),Y(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return Z(t),null;case 31:if(null!==t.memoizedState){if(Mo(t),null===t.alternate)throw Error(i(340));va()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 13:if(Mo(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(i(340));va()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return B(Bo),null;case 4:return Y(),null;case 10:return Aa(t.type),null;case 22:case 23:return Mo(t),No(),null!==e&&B(Ga),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return Aa(za),null;default:return null}}function gs(e,t){switch(la(t),t.tag){case 3:Aa(za),Y();break;case 26:case 27:case 5:Z(t);break;case 4:Y();break;case 31:null!==t.memoizedState&&Mo(t);break;case 13:Mo(t);break;case 19:B(Bo);break;case 10:Aa(t.type);break;case 22:case 23:Mo(t),No(),null!==e&&B(Ga);break;case 24:Aa(za)}}function hs(e,t){try{var n=t.updateQueue,r=null!==n?n.lastEffect:null;if(null!==r){var a=r.next;n=a;do{if((n.tag&e)===e){r=void 0;var o=n.create,i=n.inst;r=o(),i.destroy=r}n=n.next}while(n!==a)}}catch(l){Sc(t,t.return,l)}}function ys(e,t,n){try{var r=t.updateQueue,a=null!==r?r.lastEffect:null;if(null!==a){var o=a.next;r=o;do{if((r.tag&e)===e){var i=r.inst,l=i.destroy;if(void 0!==l){i.destroy=void 0,a=t;var s=n,u=l;try{u()}catch(c){Sc(a,s,c)}}}r=r.next}while(r!==o)}}catch(c){Sc(t,t.return,c)}}function bs(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{Co(t,n)}catch(r){Sc(e,e.return,r)}}}function vs(e,t,n){n.props=Sl(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){Sc(e,t,r)}}function ws(e,t){try{var n=e.ref;if(null!==n){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;default:r=e.stateNode}"function"==typeof n?e.refCleanup=n(r):n.current=r}}catch(a){Sc(e,t,a)}}function ks(e,t){var n=e.ref,r=e.refCleanup;if(null!==n)if("function"==typeof r)try{r()}catch(a){Sc(e,t,a)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"==typeof n)try{n(null)}catch(o){Sc(e,t,o)}else n.current=null}function xs(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(a){Sc(e,e.return,a)}}function Ss(e,t,n){try{var r=e.stateNode;!function(e,t,n,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,o=null,l=null,s=null,u=null,c=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&null!=f)switch(m){case"checked":case"value":break;case"defaultValue":u=f;default:r.hasOwnProperty(m)||cd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(null!=m||null!=f))switch(p){case"type":o=m;break;case"name":a=m;break;case"checked":c=m;break;case"defaultChecked":d=m;break;case"value":l=m;break;case"defaultValue":s=m;break;case"children":case"dangerouslySetInnerHTML":if(null!=m)throw Error(i(137,t));break;default:m!==f&&cd(e,t,p,m,r,f)}}return void bt(e,l,s,u,c,d,o,a);case"select":for(o in m=l=s=p=null,n)if(u=n[o],n.hasOwnProperty(o)&&null!=u)switch(o){case"value":break;case"multiple":m=u;default:r.hasOwnProperty(o)||cd(e,t,o,null,r,u)}for(a in r)if(o=r[a],u=n[a],r.hasOwnProperty(a)&&(null!=o||null!=u))switch(a){case"value":p=o;break;case"defaultValue":s=o;break;case"multiple":l=o;default:o!==u&&cd(e,t,a,o,r,u)}return t=s,n=l,r=m,void(null!=p?kt(e,!!n,p,!1):!!r!=!!n&&(null!=t?kt(e,!!n,t,!0):kt(e,!!n,n?[]:"",!1)));case"textarea":for(s in m=p=null,n)if(a=n[s],n.hasOwnProperty(s)&&null!=a&&!r.hasOwnProperty(s))switch(s){case"value":case"children":break;default:cd(e,t,s,null,r,a)}for(l in r)if(a=r[l],o=n[l],r.hasOwnProperty(l)&&(null!=a||null!=o))switch(l){case"value":p=a;break;case"defaultValue":m=a;break;case"children":break;case"dangerouslySetInnerHTML":if(null!=a)throw Error(i(91));break;default:a!==o&&cd(e,t,l,a,r,o)}return void xt(e,p,m);case"option":for(var g in n)if(p=n[g],n.hasOwnProperty(g)&&null!=p&&!r.hasOwnProperty(g))if("selected"===g)e.selected=!1;else cd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(null!=p||null!=m))if("selected"===u)e.selected=p&&"function"!=typeof p&&"symbol"!=typeof p;else cd(e,t,u,p,r,m);return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var h in n)p=n[h],n.hasOwnProperty(h)&&null!=p&&!r.hasOwnProperty(h)&&cd(e,t,h,null,r,p);for(c in r)if(p=r[c],m=n[c],r.hasOwnProperty(c)&&p!==m&&(null!=p||null!=m))switch(c){case"children":case"dangerouslySetInnerHTML":if(null!=p)throw Error(i(137,t));break;default:cd(e,t,c,p,r,m)}return;default:if(Tt(t)){for(var y in n)p=n[y],n.hasOwnProperty(y)&&void 0!==p&&!r.hasOwnProperty(y)&&dd(e,t,y,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||void 0===p&&void 0===m||dd(e,t,d,p,r,m);return}}for(var b in n)p=n[b],n.hasOwnProperty(b)&&null!=p&&!r.hasOwnProperty(b)&&cd(e,t,b,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||null==p&&null==m||cd(e,t,f,p,r,m)}(r,e.type,n,t),r[$e]=t}catch(a){Sc(e,e.return,a)}}function Es(e){return 5===e.tag||3===e.tag||26===e.tag||27===e.tag&&Ad(e.type)||4===e.tag}function _s(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Es(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(27===e.tag&&Ad(e.type))continue e;if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function As(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?(9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).insertBefore(e,t):((t=9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Nt));else if(4!==r&&(27===r&&Ad(e.type)&&(n=e.stateNode,t=null),null!==(e=e.child)))for(As(e,t,n),e=e.sibling;null!==e;)As(e,t,n),e=e.sibling}function Cs(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&(27===r&&Ad(e.type)&&(n=e.stateNode),null!==(e=e.child)))for(Cs(e,t,n),e=e.sibling;null!==e;)Cs(e,t,n),e=e.sibling}function Ts(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);fd(t,r,n),t[Ue]=e,t[$e]=n}catch(o){Sc(e,e.return,o)}}var js=!1,Os=!1,Ps=!1,Ns="function"==typeof WeakSet?WeakSet:Set,Ls=null;function Rs(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Qs(e,n),4&r&&hs(5,n);break;case 1:if(Qs(e,n),4&r)if(e=n.stateNode,null===t)try{e.componentDidMount()}catch(i){Sc(n,n.return,i)}else{var a=Sl(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(l){Sc(n,n.return,l)}}64&r&&bs(n),512&r&&ws(n,n.return);break;case 3:if(Qs(e,n),64&r&&null!==(e=n.updateQueue)){if(t=null,null!==n.child)switch(n.child.tag){case 27:case 5:case 1:t=n.child.stateNode}try{Co(e,t)}catch(i){Sc(n,n.return,i)}}break;case 27:null===t&&4&r&&Ts(n);case 26:case 5:Qs(e,n),null===t&&4&r&&xs(n),512&r&&ws(n,n.return);break;case 12:Qs(e,n);break;case 31:Qs(e,n),4&r&&Bs(e,n);break;case 13:Qs(e,n),4&r&&Us(e,n),64&r&&(null!==(e=n.memoizedState)&&(null!==(e=e.dehydrated)&&function(e,t){var n=e.ownerDocument;if("$~"===e.data)e._reactRetry=t;else if("$?"!==e.data||"loading"!==n.readyState)t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}(e,n=Cc.bind(null,n))));break;case 22:if(!(r=null!==n.memoizedState||js)){t=null!==t&&null!==t.memoizedState||Os,a=js;var o=Os;js=r,(Os=t)&&!o?Ks(e,n,!!(8772&n.subtreeFlags)):Qs(e,n),js=a,Os=o}break;case 30:break;default:Qs(e,n)}}function Is(e){var t=e.alternate;null!==t&&(e.alternate=null,Is(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&Ye(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Fs=null,Ds=!1;function zs(e,t,n){for(n=n.child;null!==n;)Ms(e,t,n),n=n.sibling}function Ms(e,t,n){if(be&&"function"==typeof be.onCommitFiberUnmount)try{be.onCommitFiberUnmount(ye,n)}catch(o){}switch(n.tag){case 26:Os||ks(n,t),zs(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode).parentNode.removeChild(n);break;case 27:Os||ks(n,t);var r=Fs,a=Ds;Ad(n.type)&&(Fs=n.stateNode,Ds=!1),zs(e,t,n),zd(n.stateNode),Fs=r,Ds=a;break;case 5:Os||ks(n,t);case 6:if(r=Fs,a=Ds,Fs=null,zs(e,t,n),Ds=a,null!==(Fs=r))if(Ds)try{(9===Fs.nodeType?Fs.body:"HTML"===Fs.nodeName?Fs.ownerDocument.body:Fs).removeChild(n.stateNode)}catch(i){Sc(n,t,i)}else try{Fs.removeChild(n.stateNode)}catch(i){Sc(n,t,i)}break;case 18:null!==Fs&&(Ds?(Cd(9===(e=Fs).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e,n.stateNode),Wf(e)):Cd(Fs,n.stateNode));break;case 4:r=Fs,a=Ds,Fs=n.stateNode.containerInfo,Ds=!0,zs(e,t,n),Fs=r,Ds=a;break;case 0:case 11:case 14:case 15:ys(2,n,t),Os||ys(4,n,t),zs(e,t,n);break;case 1:Os||(ks(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount&&vs(n,t,r)),zs(e,t,n);break;case 21:zs(e,t,n);break;case 22:Os=(r=Os)||null!==n.memoizedState,zs(e,t,n),Os=r;break;default:zs(e,t,n)}}function Bs(e,t){if(null===t.memoizedState&&(null!==(e=t.alternate)&&null!==(e=e.memoizedState))){e=e.dehydrated;try{Wf(e)}catch(n){Sc(t,t.return,n)}}}function Us(e,t){if(null===t.memoizedState&&(null!==(e=t.alternate)&&(null!==(e=e.memoizedState)&&null!==(e=e.dehydrated))))try{Wf(e)}catch(n){Sc(t,t.return,n)}}function $s(e,t){var n=function(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return null===t&&(t=e.stateNode=new Ns),t;case 22:return null===(t=(e=e.stateNode)._retryCache)&&(t=e._retryCache=new Ns),t;default:throw Error(i(435,e.tag))}}(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Tc.bind(null,e,t);t.then(r,r)}})}function Hs(e,t){var n=t.deletions;if(null!==n)for(var r=0;r title"))),fd(o,r,n),o[Ue]=e,et(o),r=o;break e;case"link":var l=nf("link","href",a).get(r+(n.href||""));if(l)for(var s=0;sl)break;var c=s.transferSize,d=s.initiatorType;c&&pd(d)&&(i+=c*((s=s.responseEnd)of?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(a)}}:null}(d,m)))return Bu=o,e.cancelPendingCommit=m(gc.bind(null,e,t,o,n,r,a,i,l,s,c,d,null,f,p)),void Xu(e,o,i,!u)}gc(e,t,o,n,r,a,i,l,s)}function Zu(e){for(var t=e;;){var n=t.tag;if((0===n||11===n||15===n)&&16384&t.flags&&(null!==(n=t.updateQueue)&&null!==(n=n.stores)))for(var r=0;rh&&(i=h,h=g,g=i);var y=tr(l,g),b=tr(l,h);if(y&&b&&(1!==p.rangeCount||p.anchorNode!==y.node||p.anchorOffset!==y.offset||p.focusNode!==b.node||p.focusOffset!==b.offset)){var v=d.createRange();v.setStart(y.node,y.offset),p.removeAllRanges(),g>h?(p.addRange(v),p.extend(b.node,b.offset)):(v.setEnd(b.node,b.offset),p.addRange(v))}}}}for(d=[],p=l;p=p.parentNode;)1===p.nodeType&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for("function"==typeof l.focus&&l.focus(),l=0;ln?32:n,R.T=null,n=$u,$u=null;var o=zu,l=Bu;if(Du=0,Mu=zu=null,Bu=0,6&pu)throw Error(i(331));var s=pu;if(pu|=4,su(o.current),eu(o,o.current,l,n),pu=s,Fc(0,!1),be&&"function"==typeof be.onPostCommitFiberRoot)try{be.onPostCommitFiberRoot(ye,o)}catch(u){}return!0}finally{I.p=a,R.T=r,vc(e,t)}}function xc(e,t,n){t=Qr(n,t),null!==(e=wo(e,t=jl(e.stateNode,t,2),2))&&(Ne(e,2),Ic(e))}function Sc(e,t,n){if(3===e.tag)xc(e,e,n);else for(;null!==t;){if(3===t.tag){xc(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Fu||!Fu.has(r))){e=Qr(n,e),null!==(r=wo(t,n=Ol(2),2))&&(Pl(n,r,t,e),Ne(r,2),Ic(r));break}}t=t.return}}function Ec(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new fu;var a=new Set;r.set(t,a)}else void 0===(a=r.get(t))&&(a=new Set,r.set(t,a));a.has(n)||(ku=!0,a.add(n),e=_c.bind(null,e,t,n),t.then(e,e))}function _c(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,mu===e&&(hu&n)===n&&(4===Su||3===Su&&(62914560&hu)===hu&&300>se()-Nu?!(2&pu)&&tc(e,0):Au|=n,Tu===hu&&(Tu=0)),Ic(e)}function Ac(e,t){0===t&&(t=Oe()),null!==(e=Lr(e,t))&&(Ne(e,t),Ic(e))}function Cc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Ac(e,n)}function Tc(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;null!==a&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}null!==r&&r.delete(t),Ac(e,n)}var jc=null,Oc=null,Pc=!1,Nc=!1,Lc=!1,Rc=0;function Ic(e){e!==Oc&&null===e.next&&(null===Oc?jc=Oc=e:Oc=Oc.next=e),Nc=!0,Pc||(Pc=!0,Ed(function(){6&pu?ae(ce,Dc):zc()}))}function Fc(e,t){if(!Lc&&Nc){Lc=!0;do{for(var n=!1,r=jc;null!==r;){if(!t)if(0!==e){var a=r.pendingLanes;if(0===a)var o=0;else{var i=r.suspendedLanes,l=r.pingedLanes;o=(1<<31-we(42|e)+1)-1,o=201326741&(o&=a&~(i&~l))?201326741&o|1:o?2|o:0}0!==o&&(n=!0,Uc(r,o))}else o=hu,!(3&(o=Ce(r,r===mu?o:0,null!==r.cancelPendingCommit||-1!==r.timeoutHandle)))||Te(r,o)||(n=!0,Uc(r,o));r=r.next}}while(n);Lc=!1}}function Dc(){zc()}function zc(){Nc=Pc=!1;var e=0;0!==Rc&&function(){var e=window.event;if(e&&"popstate"===e.type)return e!==wd&&(wd=e,!0);return wd=null,!1}()&&(e=Rc);for(var t=se(),n=null,r=jc;null!==r;){var a=r.next,o=Mc(r,t);0===o?(r.next=null,null===n?jc=a:n.next=a,null===a&&(Oc=n)):(n=r,(0!==e||3&o)&&(Nc=!0)),r=a}0!==Du&&5!==Du||Fc(e,!1),0!==Rc&&(Rc=0)}function Mc(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,a=e.expirationTimes,o=-62914561&e.pendingLanes;0 title"):null)}function af(e){return!!("stylesheet"!==e.type||3&e.state.loading)}var of=0;function lf(){if(this.count--,0===this.count&&(0===this.imgCount||!this.waitingForImages))if(this.stylesheets)uf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}var sf=null;function uf(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,sf=new Map,t.forEach(cf,e),sf=null,lf.call(e))}function cf(e,t){if(!(4&t.state.loading)){var n=sf.get(e);if(n)var r=n.get(null);else{n=new Map,sf.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;oJ,vd:()=>W});var r=n(6540),a=n(5556),o=n.n(a),i=n(115),l=n.n(i),s=n(311),u=n.n(s),c=n(2833),d=n.n(c);function f(){return f=Object.assign||function(e){for(var t=1;t=0||(a[n]=e[n]);return a}var h={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title",FRAGMENT:"Symbol(react.fragment)"},y={rel:["amphtml","canonical","alternate"]},b={type:["application/ld+json"]},v={charset:"",name:["robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]},w=Object.keys(h).map(function(e){return h[e]}),k={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},x=Object.keys(k).reduce(function(e,t){return e[k[t]]=t,e},{}),S=function(e,t){for(var n=e.length-1;n>=0;n-=1){var r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},E=function(e){var t=S(e,h.TITLE),n=S(e,"titleTemplate");if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,function(){return t});var r=S(e,"defaultTitle");return t||r||void 0},_=function(e){return S(e,"onChangeClientState")||function(){}},A=function(e,t){return t.filter(function(t){return void 0!==t[e]}).map(function(t){return t[e]}).reduce(function(e,t){return f({},e,t)},{})},C=function(e,t){return t.filter(function(e){return void 0!==e[h.BASE]}).map(function(e){return e[h.BASE]}).reverse().reduce(function(t,n){if(!t.length)for(var r=Object.keys(n),a=0;a/g,">").replace(/"/g,""").replace(/'/g,"'")},I=function(e){return Object.keys(e).reduce(function(t,n){var r=void 0!==e[n]?n+'="'+e[n]+'"':""+n;return t?t+" "+r:r},"")},F=function(e,t){return void 0===t&&(t={}),Object.keys(e).reduce(function(t,n){return t[k[n]||n]=e[n],t},t)},D=function(e,t){return t.map(function(t,n){var a,o=((a={key:n})["data-rh"]=!0,a);return Object.keys(t).forEach(function(e){var n=k[e]||e;"innerHTML"===n||"cssText"===n?o.dangerouslySetInnerHTML={__html:t.innerHTML||t.cssText}:o[n]=t[e]}),r.createElement(e,o)})},z=function(e,t,n){switch(e){case h.TITLE:return{toComponent:function(){return n=t.titleAttributes,(a={key:e=t.title})["data-rh"]=!0,o=F(n,a),[r.createElement(h.TITLE,o,e)];var e,n,a,o},toString:function(){return function(e,t,n,r){var a=I(n),o=O(t);return a?"<"+e+' data-rh="true" '+a+">"+R(o,r)+"":"<"+e+' data-rh="true">'+R(o,r)+""}(e,t.title,t.titleAttributes,n)}};case"bodyAttributes":case"htmlAttributes":return{toComponent:function(){return F(t)},toString:function(){return I(t)}};default:return{toComponent:function(){return D(e,t)},toString:function(){return function(e,t,n){return t.reduce(function(t,r){var a=Object.keys(r).filter(function(e){return!("innerHTML"===e||"cssText"===e)}).reduce(function(e,t){var a=void 0===r[t]?t:t+'="'+R(r[t],n)+'"';return e?e+" "+a:a},""),o=r.innerHTML||r.cssText||"",i=-1===L.indexOf(e);return t+"<"+e+' data-rh="true" '+a+(i?"/>":">"+o+"")},"")}(e,t,n)}}}},M=function(e){var t=e.baseTag,n=e.bodyAttributes,r=e.encode,a=e.htmlAttributes,o=e.noscriptTags,i=e.styleTags,l=e.title,s=void 0===l?"":l,u=e.titleAttributes,c=e.linkTags,d=e.metaTags,f=e.scriptTags,p={toComponent:function(){},toString:function(){return""}};if(e.prioritizeSeoTags){var m=function(e){var t=e.linkTags,n=e.scriptTags,r=e.encode,a=P(e.metaTags,v),o=P(t,y),i=P(n,b);return{priorityMethods:{toComponent:function(){return[].concat(D(h.META,a.priority),D(h.LINK,o.priority),D(h.SCRIPT,i.priority))},toString:function(){return z(h.META,a.priority,r)+" "+z(h.LINK,o.priority,r)+" "+z(h.SCRIPT,i.priority,r)}},metaTags:a.default,linkTags:o.default,scriptTags:i.default}}(e);p=m.priorityMethods,c=m.linkTags,d=m.metaTags,f=m.scriptTags}return{priority:p,base:z(h.BASE,t,r),bodyAttributes:z("bodyAttributes",n,r),htmlAttributes:z("htmlAttributes",a,r),link:z(h.LINK,c,r),meta:z(h.META,d,r),noscript:z(h.NOSCRIPT,o,r),script:z(h.SCRIPT,f,r),style:z(h.STYLE,i,r),title:z(h.TITLE,{title:s,titleAttributes:u},r)}},B=[],U=function(e,t){var n=this;void 0===t&&(t="undefined"!=typeof document),this.instances=[],this.value={setHelmet:function(e){n.context.helmet=e},helmetInstances:{get:function(){return n.canUseDOM?B:n.instances},add:function(e){(n.canUseDOM?B:n.instances).push(e)},remove:function(e){var t=(n.canUseDOM?B:n.instances).indexOf(e);(n.canUseDOM?B:n.instances).splice(t,1)}}},this.context=e,this.canUseDOM=t,t||(e.helmet=M({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))},$=r.createContext({}),H=o().shape({setHelmet:o().func,helmetInstances:o().shape({get:o().func,add:o().func,remove:o().func})}),V="undefined"!=typeof document,W=function(e){function t(n){var r;return(r=e.call(this,n)||this).helmetData=new U(r.props.context,t.canUseDOM),r}return p(t,e),t.prototype.render=function(){return r.createElement($.Provider,{value:this.helmetData.value},this.props.children)},t}(r.Component);W.canUseDOM=V,W.propTypes={context:o().shape({helmet:o().shape()}),children:o().node.isRequired},W.defaultProps={context:{}},W.displayName="HelmetProvider";var q=function(e,t){var n,r=document.head||document.querySelector(h.HEAD),a=r.querySelectorAll(e+"[data-rh]"),o=[].slice.call(a),i=[];return t&&t.length&&t.forEach(function(t){var r=document.createElement(e);for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&("innerHTML"===a?r.innerHTML=t.innerHTML:"cssText"===a?r.styleSheet?r.styleSheet.cssText=t.cssText:r.appendChild(document.createTextNode(t.cssText)):r.setAttribute(a,void 0===t[a]?"":t[a]));r.setAttribute("data-rh","true"),o.some(function(e,t){return n=t,r.isEqualNode(e)})?o.splice(n,1):i.push(r)}),o.forEach(function(e){return e.parentNode.removeChild(e)}),i.forEach(function(e){return r.appendChild(e)}),{oldTags:o,newTags:i}},G=function(e,t){var n=document.getElementsByTagName(e)[0];if(n){for(var r=n.getAttribute("data-rh"),a=r?r.split(","):[],o=[].concat(a),i=Object.keys(t),l=0;l=0;d-=1)n.removeAttribute(o[d]);a.length===o.length?n.removeAttribute("data-rh"):n.getAttribute("data-rh")!==i.join(",")&&n.setAttribute("data-rh",i.join(","))}},Q=function(e,t){var n=e.baseTag,r=e.htmlAttributes,a=e.linkTags,o=e.metaTags,i=e.noscriptTags,l=e.onChangeClientState,s=e.scriptTags,u=e.styleTags,c=e.title,d=e.titleAttributes;G(h.BODY,e.bodyAttributes),G(h.HTML,r),function(e,t){void 0!==e&&document.title!==e&&(document.title=O(e)),G(h.TITLE,t)}(c,d);var f={baseTag:q(h.BASE,n),linkTags:q(h.LINK,a),metaTags:q(h.META,o),noscriptTags:q(h.NOSCRIPT,i),scriptTags:q(h.SCRIPT,s),styleTags:q(h.STYLE,u)},p={},m={};Object.keys(f).forEach(function(e){var t=f[e],n=t.newTags,r=t.oldTags;n.length&&(p[e]=n),r.length&&(m[e]=f[e].oldTags)}),t&&t(),l(e,p,m)},Y=null,K=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a elements are self-closing and can not contain children. Refer to our API for more information.")}},n.flattenArrayTypeChildren=function(e){var t,n=e.child,r=e.arrayTypeChildren;return f({},r,((t={})[n.type]=[].concat(r[n.type]||[],[f({},e.newChildProps,this.mapNestedChildrenToProps(n,e.nestedChildren))]),t))},n.mapObjectTypeChildren=function(e){var t,n,r=e.child,a=e.newProps,o=e.newChildProps,i=e.nestedChildren;switch(r.type){case h.TITLE:return f({},a,((t={})[r.type]=i,t.titleAttributes=f({},o),t));case h.BODY:return f({},a,{bodyAttributes:f({},o)});case h.HTML:return f({},a,{htmlAttributes:f({},o)});default:return f({},a,((n={})[r.type]=f({},o),n))}},n.mapArrayTypeChildrenToProps=function(e,t){var n=f({},t);return Object.keys(e).forEach(function(t){var r;n=f({},n,((r={})[t]=e[t],r))}),n},n.warnOnInvalidChildren=function(e,t){return u()(w.some(function(t){return e.type===t}),"function"==typeof e.type?"You may be attempting to nest components within each other, which is not allowed. Refer to our API for more information.":"Only elements types "+w.join(", ")+" are allowed. Helmet does not support rendering <"+e.type+"> elements. Refer to our API for more information."),u()(!t||"string"==typeof t||Array.isArray(t)&&!t.some(function(e){return"string"!=typeof e}),"Helmet expects a string as a child of <"+e.type+">. Did you forget to wrap your children in braces? ( <"+e.type+">{``} ) Refer to our API for more information."),!0},n.mapChildrenToProps=function(e,t){var n=this,a={};return r.Children.forEach(e,function(e){if(e&&e.props){var r=e.props,o=r.children,i=g(r,Z),l=Object.keys(i).reduce(function(e,t){return e[x[t]||t]=i[t],e},{}),s=e.type;switch("symbol"==typeof s?s=s.toString():n.warnOnInvalidChildren(e,o),s){case h.FRAGMENT:t=n.mapChildrenToProps(o,t);break;case h.LINK:case h.META:case h.NOSCRIPT:case h.SCRIPT:case h.STYLE:a=n.flattenArrayTypeChildren({child:e,arrayTypeChildren:a,newChildProps:l,nestedChildren:o});break;default:t=n.mapObjectTypeChildren({child:e,newProps:t,newChildProps:l,nestedChildren:o})}}}),this.mapArrayTypeChildrenToProps(a,t)},n.render=function(){var e=this.props,t=e.children,n=g(e,X),a=f({},n),o=n.helmetData;return t&&(a=this.mapChildrenToProps(t,a)),!o||o instanceof U||(o=new U(o.context,o.instances)),o?r.createElement(K,f({},a,{context:o.value,helmetData:void 0})):r.createElement($.Consumer,null,function(e){return r.createElement(K,f({},a,{context:e}))})},t}(r.Component);J.propTypes={base:o().object,bodyAttributes:o().object,children:o().oneOfType([o().arrayOf(o().node),o().node]),defaultTitle:o().string,defer:o().bool,encodeSpecialCharacters:o().bool,htmlAttributes:o().object,link:o().arrayOf(o().object),meta:o().arrayOf(o().object),noscript:o().arrayOf(o().object),onChangeClientState:o().func,script:o().arrayOf(o().object),style:o().arrayOf(o().object),title:o().string,titleAttributes:o().object,titleTemplate:o().string,prioritizeSeoTags:o().bool,helmetData:o().object},J.defaultProps={defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1},J.displayName="Helmet"},2799(e,t){"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,a=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,i=n?Symbol.for("react.strict_mode"):60108,l=n?Symbol.for("react.profiler"):60114,s=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,m=n?Symbol.for("react.suspense_list"):60120,g=n?Symbol.for("react.memo"):60115,h=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,v=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function k(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case d:case o:case l:case i:case p:return e;default:switch(e=e&&e.$$typeof){case u:case f:case h:case g:case s:return e;default:return t}}case a:return t}}}function x(e){return k(e)===d}t.AsyncMode=c,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=s,t.Element=r,t.ForwardRef=f,t.Fragment=o,t.Lazy=h,t.Memo=g,t.Portal=a,t.Profiler=l,t.StrictMode=i,t.Suspense=p,t.isAsyncMode=function(e){return x(e)||k(e)===c},t.isConcurrentMode=x,t.isContextConsumer=function(e){return k(e)===u},t.isContextProvider=function(e){return k(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return k(e)===f},t.isFragment=function(e){return k(e)===o},t.isLazy=function(e){return k(e)===h},t.isMemo=function(e){return k(e)===g},t.isPortal=function(e){return k(e)===a},t.isProfiler=function(e){return k(e)===l},t.isStrictMode=function(e){return k(e)===i},t.isSuspense=function(e){return k(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===l||e===i||e===p||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===g||e.$$typeof===s||e.$$typeof===u||e.$$typeof===f||e.$$typeof===b||e.$$typeof===v||e.$$typeof===w||e.$$typeof===y)},t.typeOf=k},4363(e,t,n){"use strict";e.exports=n(2799)},3259(e,t,n){"use strict";function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(){return i=Object.assign||function(e){for(var t=1;ti,v:()=>l});var r=n(6347),a=n(8168),o=n(6540);function i(e,t,n){return void 0===n&&(n=[]),e.some(function(e){var a=e.path?(0,r.B6)(t,e):n.length?n[n.length-1].match:r.Ix.computeRootMatch(t);return a&&(n.push({route:e,match:a}),e.routes&&i(e.routes,t,n)),a}),n}function l(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),e?o.createElement(r.dO,n,e.map(function(e,n){return o.createElement(r.qh,{key:e.key||n,path:e.path,exact:e.exact,strict:e.strict,render:function(n){return e.render?e.render((0,a.A)({},n,{},t,{route:e})):o.createElement(e.component,(0,a.A)({},n,t,{route:e}))}})})):null}},4625(e,t,n){"use strict";n.d(t,{I9:()=>d,Kd:()=>c,N_:()=>y,k2:()=>w});var r=n(6347),a=n(7387),o=n(6540),i=n(1513),l=n(8168),s=n(8587),u=n(1561),c=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;ax,Ix:()=>v,W6:()=>P,XZ:()=>b,dO:()=>j,qh:()=>S,zy:()=>N});var r=n(7387),a=n(6540),o=n(5556),i=n.n(o),l=n(1513),s=n(1561),u=n(8168),c=n(5302),d=n.n(c),f=(n(4363),n(8587)),p=(n(4146),1073741823),m="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:{};var g=a.createContext||function(e,t){var n,o,l="__create-react-context-"+function(){var e="__global_unique_id__";return m[e]=(m[e]||0)+1}()+"__",s=function(e){function n(){for(var t,n,r,a=arguments.length,o=new Array(a),i=0;i>>1,a=e[r];if(!(0>>1;ro(s,n))uo(c,s)?(e[r]=c,e[u]=n,r=u):(e[r]=s,e[l]=n,r=l);else{if(!(uo(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(t.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var i=performance;t.unstable_now=function(){return i.now()}}else{var l=Date,s=l.now();t.unstable_now=function(){return l.now()-s}}var u=[],c=[],d=1,f=null,p=3,m=!1,g=!1,h=!1,y=!1,b="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,w="undefined"!=typeof setImmediate?setImmediate:null;function k(e){for(var t=r(c);null!==t;){if(null===t.callback)a(c);else{if(!(t.startTime<=e))break;a(c),t.sortIndex=t.expirationTime,n(u,t)}t=r(c)}}function x(e){if(h=!1,k(e),!g)if(null!==r(u))g=!0,E||(E=!0,S());else{var t=r(c);null!==t&&N(x,t.startTime-e)}}var S,E=!1,_=-1,A=5,C=-1;function T(){return!!y||!(t.unstable_now()-Ce&&T());){var i=f.callback;if("function"==typeof i){f.callback=null,p=f.priorityLevel;var l=i(f.expirationTime<=e);if(e=t.unstable_now(),"function"==typeof l){f.callback=l,k(e),n=!0;break t}f===r(u)&&a(u),k(e)}else a(u);f=r(u)}if(null!==f)n=!0;else{var s=r(c);null!==s&&N(x,s.startTime-e),n=!1}}break e}finally{f=null,p=o,m=!1}n=void 0}}finally{n?S():E=!1}}}if("function"==typeof w)S=function(){w(j)};else if("undefined"!=typeof MessageChannel){var O=new MessageChannel,P=O.port2;O.port1.onmessage=j,S=function(){P.postMessage(null)}}else S=function(){b(j,0)};function N(e,n){_=b(function(){e(t.unstable_now())},n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_forceFrameRate=function(e){0>e||125i?(e.sortIndex=o,n(c,e),null===r(u)&&e===r(c)&&(h?(v(_),_=-1):h=!0,N(x,o-i))):(e.sortIndex=l,n(u,e),g||m||(g=!0,E||(E=!0,S()))),e},t.unstable_shouldYield=T,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},9982(e,t,n){"use strict";e.exports=n(4477)},2833(e){e.exports=function(e,t,n,r){var a=n?n.call(r,e,t):void 0;if(void 0!==a)return!!a;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var o=Object.keys(e),i=Object.keys(t);if(o.length!==i.length)return!1;for(var l=Object.prototype.hasOwnProperty.bind(t),s=0;sr});const r={title:"HappyView",tagline:"Lexicon-driven ATProto AppView",url:"https://happyview.dev",baseUrl:"/",favicon:"img/favicon.png",onBrokenLinks:"throw",markdown:{mermaid:!0,format:"mdx",emoji:!0,mdx1Compat:{comments:!0,admonitions:!0,headingIds:!0},anchors:{maintainCase:!1},hooks:{onBrokenMarkdownLinks:"warn",onBrokenMarkdownImages:"throw"}},themes:["@docusaurus/theme-mermaid"],i18n:{defaultLocale:"en",locales:["en"],path:"i18n",localeConfigs:{}},presets:[["classic",{docs:{path:"docs",routeBasePath:"/",sidebarPath:"./sidebars.ts"},blog:!1,theme:{}}]],themeConfig:{image:"img/og.png",navbar:{title:"",logo:{alt:"HappyView",src:"img/logo.light.png",srcDark:"img/logo.dark.png"},items:[{type:"docSidebar",sidebarId:"docs",position:"left",label:"Docs"},{href:"https://github.com/gamesgamesgamesgamesgames/happyview",label:"GitHub",position:"right"}],hideOnScroll:!1},prism:{additionalLanguages:["lua"],theme:{plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},magicComments:[{className:"theme-code-block-highlighted-line",line:"highlight-next-line",block:{start:"highlight-start",end:"highlight-end"}}]},footer:{copyright:"Copyright \xa9 2026 [Birbhouse Games](https://birb.house).",style:"light",links:[]},mermaid:{theme:{dark:"dark",light:"default"},options:{}},colorMode:{defaultMode:"light",disableSwitch:!1,respectPrefersColorScheme:!1},docs:{versionPersistence:"localStorage",sidebar:{hideable:!1,autoCollapseCategories:!1}},blog:{sidebar:{groupByYear:!0}},metadata:[],tableOfContents:{minHeadingLevel:2,maxHeadingLevel:3}},baseUrlIssueBanner:!0,future:{v4:{removeLegacyPostBuildHeadAttribute:!1,useCssCascadeLayers:!1},experimental_faster:{swcJsLoader:!1,swcJsMinimizer:!1,swcHtmlMinimizer:!1,lightningCssMinimizer:!1,mdxCrossCompilerCache:!1,rspackBundler:!1,rspackPersistentCache:!1,ssgWorkerThreads:!1},experimental_storage:{type:"localStorage",namespace:!1},experimental_router:"browser"},onBrokenAnchors:"warn",onDuplicateRoutes:"warn",staticDirectories:["static"],customFields:{},plugins:[],scripts:[],headTags:[],stylesheets:[],clientModules:[],titleDelimiter:"|",noIndex:!1}},3845(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=e.length?{done:!0}:{done:!1,value:e[a++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{A:()=>a})},8168(e,t,n){"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;tr})},7387(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(3662);function a(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,(0,r.A)(e,t)}},8587(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}n.d(t,{A:()=>r})},3662(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{A:()=>r})},8634(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{A:()=>o});var a=n(3662);function o(){o=function(e,t){return new n(e,void 0,t)};var e=RegExp.prototype,t=new WeakMap;function n(e,r,o){var i=RegExp(e,r);return t.set(i,o||t.get(e)),(0,a.A)(i,n.prototype)}function i(e,n){var r=t.get(n);return Object.keys(r).reduce(function(t,n){var a=r[n];if("number"==typeof a)t[n]=e[a];else{for(var o=0;void 0===e[a[o]]&&o+1]+)(>|$)/g,function(e,t,n){if(""===n)return e;var r=o[t];return Array.isArray(r)?"$"+r.join("$"):"number"==typeof r?"$"+r:""}))}if("function"==typeof a){var l=this;return e[Symbol.replace].call(this,n,function(){var e=arguments;return"object"!=r(e[e.length-1])&&(e=[].slice.call(e)).push(i(e,l)),a.apply(this,e)})}return e[Symbol.replace].call(this,n,a)},o.apply(this,arguments)}},4164(e,t,n){"use strict";function r(e){var t,n,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;ta});const a=function(){for(var e,t,n=0,a="",o=arguments.length;nC,f4:()=>ne});var r,a,o,i,l,s,u,c=n(6540),d=n(4164),f=Object.create,p=Object.defineProperty,m=Object.defineProperties,g=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertyNames,b=Object.getOwnPropertySymbols,v=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,x=(e,t,n)=>t in e?p(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,S=(e,t)=>{for(var n in t||(t={}))w.call(t,n)&&x(e,n,t[n]);if(b)for(var n of b(t))k.call(t,n)&&x(e,n,t[n]);return e},E=(e,t)=>m(e,h(t)),_=(e,t)=>{var n={};for(var r in e)w.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&b)for(var r of b(e))t.indexOf(r)<0&&k.call(e,r)&&(n[r]=e[r]);return n},A=(r={"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e,t){var n=function(){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,n={},r={util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/=d.reach);S+=x.value.length,x=x.next){var E=x.value;if(t.length>e.length)return;if(!(E instanceof a)){var _,A=1;if(b){if(!(_=o(k,S,e,y))||_.index>=e.length)break;var C=_.index,T=_.index+_[0].length,j=S;for(j+=x.value.length;C>=j;)j+=(x=x.next).value.length;if(S=j-=x.value.length,x.value instanceof a)continue;for(var O=x;O!==t.tail&&(jd.reach&&(d.reach=R);var I=x.prev;if(N&&(I=s(t,I,N),S+=N.length),u(t,I,A),x=s(t,I,new a(f,h?r.tokenize(P,h):P,v,P)),L&&s(t,x,L),A>1){var F={cause:f+","+m,reach:R};i(e,t,n,x.prev,S,F),d&&F.reach>d.reach&&(d.reach=F.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function s(e,t,n){var r=t.next,a={value:n,prev:t,next:r};return t.next=a,r.prev=a,e.length++,a}function u(e,t,n){for(var r=t.next,a=0;a"+o.content+""},r}();t.exports=n,n.default=n}},function(){return a||(0,r[y(r)[0]])((a={exports:{}}).exports,a),a.exports}),C=((e,t,n)=>(n=null!=e?f(v(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of y(t))w.call(e,a)||a===n||p(e,a,{get:()=>t[a],enumerable:!(r=g(t,a))||r.enumerable});return e})(!t&&e&&e.__esModule?n:p(n,"default",{value:e,enumerable:!0}),e)))(A());C.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},C.languages.markup.tag.inside["attr-value"].inside.entity=C.languages.markup.entity,C.languages.markup.doctype.inside["internal-subset"].inside=C.languages.markup,C.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(C.languages.markup.tag,"addInlined",{value:function(e,t){var n;(t=((n=((n={})["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:C.languages[t]},n.cdata=/^$/i,{"included-cdata":{pattern://i,inside:n}}))["language-"+t]={pattern:/[\s\S]+/,inside:C.languages[t]},{}))[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:n},C.languages.insertBefore("markup","cdata",t)}}),Object.defineProperty(C.languages.markup.tag,"addAttribute",{value:function(e,t){C.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:C.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),C.languages.html=C.languages.markup,C.languages.mathml=C.languages.markup,C.languages.svg=C.languages.markup,C.languages.xml=C.languages.extend("markup",{}),C.languages.ssml=C.languages.xml,C.languages.atom=C.languages.xml,C.languages.rss=C.languages.xml,o=C,i={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},s="(?:[^\\\\-]|"+(l=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/).source+")",s=RegExp(s+"-"+s),u={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"},o.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:s,inside:{escape:l,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":i,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:l}},"special-escape":i,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":u}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:l,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},C.languages.javascript=C.languages.extend("clike",{"class-name":[C.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),C.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,C.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:C.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:C.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:C.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:C.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:C.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),C.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:C.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),C.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),C.languages.markup&&(C.languages.markup.tag.addInlined("script","javascript"),C.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),C.languages.js=C.languages.javascript,C.languages.actionscript=C.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<>?>?|[!=]=?)=?|[~?@]/}),C.languages.actionscript["class-name"].alias="function",delete C.languages.actionscript.parameter,delete C.languages.actionscript["literal-property"],C.languages.markup&&C.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:C.languages.markup}}),function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(C),function(e){var t=e.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(t,"addSupport",{value:function(t,n){(t="string"==typeof t?[t]:t).forEach(function(t){var r=function(e){e.inside||(e.inside={}),e.inside.rest=n},a="doc-comment";if(o=e.languages[t]){var o,i=o[a];if((i=i||(o=e.languages.insertBefore(t,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[a])instanceof RegExp&&(i=o[a]={pattern:i}),Array.isArray(i))for(var l=0,s=i.length;l|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0}),{pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0});e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,number:n})}(C),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",a=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function i(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,function(){return r}).replace(/<>/g,function(){return e});return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,function(){return r})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,function(){return r}).replace(/<>/g,function(){return"(?:"+a+"|"+o+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:i(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:i(o),lookbehind:!0,greedy:!0},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(C),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(//g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,a=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,i=(e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+a+o+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+o+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(t){["url","bold","italic","strike","code-snippet"].forEach(function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])})}),e.hooks.add("after-tokenize",function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n",quot:'"'},s=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(C),C.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:C.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},C.hooks.add("after-tokenize",function(e){if("graphql"===e.language)for(var t=e.tokens.filter(function(e){return"string"!=typeof e&&"comment"!==e.type&&"scalar"!==e.type}),n=0;n?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,a=r.inside["interpolation-punctuation"],o=r.pattern.source;function i(t,r){if(e.languages[t])return{pattern:RegExp("((?:"+r+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function l(t,n,r){return t={code:t,grammar:n,language:r},e.hooks.run("before-tokenize",t),t.tokens=e.tokenize(t.code,t.grammar),e.hooks.run("after-tokenize",t),t.tokens}function s(t,n,i){var s=e.tokenize(t,{interpolation:{pattern:RegExp(o),lookbehind:!0}}),u=0,c={},d=(s=l(s.map(function(e){if("string"==typeof e)return e;var n,r;for(e=e.content;-1!==t.indexOf((r=u++,n="___"+i.toUpperCase()+"_"+r+"___")););return c[n]=e,n}).join(""),n,i),Object.keys(c));return u=0,function t(n){for(var o=0;o=d.length)return;var i,s,f,p,m,g,h,y=n[o];"string"==typeof y||"string"==typeof y.content?(i=d[u],-1!==(h=(g="string"==typeof y?y:y.content).indexOf(i))&&(++u,s=g.substring(0,h),m=c[i],f=void 0,(p={})["interpolation-punctuation"]=a,3===(p=e.tokenize(m,p)).length&&((f=[1,1]).push.apply(f,l(p[1],e.languages.javascript,"javascript")),p.splice.apply(p,f)),f=new e.Token("interpolation",p,r.alias,m),p=g.substring(h+i.length),m=[],s&&m.push(s),m.push(f),p&&(t(g=[p]),m.push.apply(m,g)),"string"==typeof y?(n.splice.apply(n,[o,1].concat(m)),o+=m.length-1):y.content=m)):(h=y.content,Array.isArray(h)?t(h):t([h]))}}(s),new e.Token(i,s,"language-"+i,t)}e.languages.javascript["template-string"]=[i("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),i("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),i("svg",/\bsvg/.source),i("markdown",/\b(?:markdown|md)/.source),i("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),i("sql",/\bsql/.source),t].filter(Boolean);var u={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function c(e){return"string"==typeof e?e:Array.isArray(e)?e.map(c).join(""):c(e.content)}e.hooks.add("after-tokenize",function(t){t.language in u&&function t(n){for(var r=0,a=n.length;r]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(C),function(e){var t=e.languages.javascript,n=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,r="(@(?:arg|argument|param|property)\\s+(?:"+n+"\\s+)?)";e.languages.jsdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp(r+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(r+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:t,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(//g,function(){return n})),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+n),lookbehind:!0,inside:{string:t.string,number:t.number,boolean:t.boolean,keyword:e.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:t,alias:"language-javascript"}}}}),e.languages.javadoclike.addSupport("javascript",e.languages.jsdoc)}(C),function(e){e.languages.flow=e.languages.extend("javascript",{}),e.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:"class-name"}]}),e.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete e.languages.flow.parameter,e.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(e.languages.flow.keyword)||(e.languages.flow.keyword=[e.languages.flow.keyword]),e.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})}(C),C.languages.n4js=C.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),C.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),C.languages.n4jsd=C.languages.n4js,function(e){function t(e,t){return RegExp(e.replace(//g,function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source}),t)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:(?:\s*,\s*(?:\*\s*as\s+|\{[^{}]*\}))?|\*\s*as\s+|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],r=0;r*\.{3}(?:[^{}]|)*\})/.source;function o(e,t){return e=e.replace(//g,function(){return n}).replace(//g,function(){return r}).replace(//g,function(){return a}),RegExp(e,t)}function i(t){for(var n=[],r=0;r"!==a.content[a.content.length-1].content&&n.push({tagName:l(a.content[0].content[1]),openedBraces:0}):0+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|))?|))**\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:o(//.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:o(/=/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var l=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(l).join(""):""};e.hooks.add("after-tokenize",function(e){"jsx"!==e.language&&"tsx"!==e.language||i(e.tokens)})}(C),function(e){var t=e.util.clone(e.languages.typescript);(t=(e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"],e.languages.tsx.tag)).pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+t.pattern.source+")",t.pattern.flags),t.lookbehind=!0}(C),C.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},C.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=C.languages.swift}),function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(C),C.languages.c=C.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),C.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),C.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},C.languages.c.string],char:C.languages.c.char,comment:C.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:C.languages.c}}}}),C.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete C.languages.c.boolean,C.languages.objectivec=C.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete C.languages.objectivec["class-name"],C.languages.objc=C.languages.objectivec,C.languages.reason=C.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),C.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete C.languages.reason.function,function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|)*\*\//.source,n=0;n<2;n++)t=t.replace(//g,function(){return t});t=t.replace(//g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(C),C.languages.go=C.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),C.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete C.languages.go["class-name"],function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(C),C.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},C.languages.python["string-interpolation"].inside.interpolation.inside.rest=C.languages.python,C.languages.py=C.languages.python,C.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},C.languages.webmanifest=C.languages.json;((e,t)=>{for(var n in t)p(e,n,{get:t[n],enumerable:!0})})({},{dracula:()=>T,duotoneDark:()=>j,duotoneLight:()=>O,github:()=>P,gruvboxMaterialDark:()=>Q,gruvboxMaterialLight:()=>Y,jettwaveDark:()=>V,jettwaveLight:()=>W,nightOwl:()=>N,nightOwlLight:()=>L,oceanicNext:()=>F,okaidia:()=>D,oneDark:()=>q,oneLight:()=>G,palenight:()=>z,shadesOfPurple:()=>M,synthwave84:()=>B,ultramin:()=>U,vsDark:()=>$,vsLight:()=>H});var T={plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},j={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]},O={plain:{backgroundColor:"#faf8f5",color:"#728fcb"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#b6ad9a"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#063289"}},{types:["property","function"],style:{color:"#b29762"}},{types:["tag-id","selector","atrule-id"],style:{color:"#2d2006"}},{types:["attr-name"],style:{color:"#896724"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule"],style:{color:"#728fcb"}},{types:["placeholder","variable"],style:{color:"#93abdc"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#896724"}}]},P={plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},N={plain:{color:"#d6deeb",backgroundColor:"#011627"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(99, 119, 119)",fontStyle:"italic"}},{types:["string","url"],style:{color:"rgb(173, 219, 103)"}},{types:["variable"],style:{color:"rgb(214, 222, 235)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation"],style:{color:"rgb(199, 146, 234)"}},{types:["selector","doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(255, 203, 139)"}},{types:["tag","operator","keyword"],style:{color:"rgb(127, 219, 202)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["property"],style:{color:"rgb(128, 203, 196)"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}}]},L={plain:{color:"#403f53",backgroundColor:"#FBFBFB"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(72, 118, 214)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(152, 159, 177)",fontStyle:"italic"}},{types:["string","builtin","char","constant","url"],style:{color:"rgb(72, 118, 214)"}},{types:["variable"],style:{color:"rgb(201, 103, 101)"}},{types:["number"],style:{color:"rgb(170, 9, 130)"}},{types:["punctuation"],style:{color:"rgb(153, 76, 195)"}},{types:["function","selector","doctype"],style:{color:"rgb(153, 76, 195)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(17, 17, 17)"}},{types:["tag"],style:{color:"rgb(153, 76, 195)"}},{types:["operator","property","keyword","namespace"],style:{color:"rgb(12, 150, 155)"}},{types:["boolean"],style:{color:"rgb(188, 84, 84)"}}]},R="#c5a5c5",I="#8dc891",F={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:R}},{types:["attr-value"],style:{color:I}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:"#999999"}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:"#5a9bcf"}},{types:["boolean"],style:{color:"#ff8b50"}},{types:["tag"],style:{color:"#fc929e"}},{types:["string"],style:{color:I}},{types:["punctuation"],style:{color:I}},{types:["selector","char","builtin","inserted"],style:{color:"#D8DEE9"}},{types:["function"],style:{color:"#79b6f2"}},{types:["operator","entity","url","variable"],style:{color:"#d7deea"}},{types:["keyword"],style:{color:R}},{types:["atrule","class-name"],style:{color:"#FAC863"}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},D={plain:{color:"#f8f8f2",backgroundColor:"#272822"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"#f92672",fontStyle:"italic"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"#8292a2",fontStyle:"italic"}},{types:["string","url"],style:{color:"#a6e22e"}},{types:["variable"],style:{color:"#f8f8f2"}},{types:["number"],style:{color:"#ae81ff"}},{types:["builtin","char","constant","function","class-name"],style:{color:"#e6db74"}},{types:["punctuation"],style:{color:"#f8f8f2"}},{types:["selector","doctype"],style:{color:"#a6e22e",fontStyle:"italic"}},{types:["tag","operator","keyword"],style:{color:"#66d9ef"}},{types:["boolean"],style:{color:"#ae81ff"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)",opacity:.7}},{types:["tag","property"],style:{color:"#f92672"}},{types:["attr-name"],style:{color:"#a6e22e !important"}},{types:["doctype"],style:{color:"#8292a2"}},{types:["rule"],style:{color:"#e6db74"}}]},z={plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},M={plain:{color:"#9EFEFF",backgroundColor:"#2D2A55"},styles:[{types:["changed"],style:{color:"rgb(255, 238, 128)"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)"}},{types:["comment"],style:{color:"rgb(179, 98, 255)",fontStyle:"italic"}},{types:["punctuation"],style:{color:"rgb(255, 255, 255)"}},{types:["constant"],style:{color:"rgb(255, 98, 140)"}},{types:["string","url"],style:{color:"rgb(165, 255, 144)"}},{types:["variable"],style:{color:"rgb(255, 238, 128)"}},{types:["number","boolean"],style:{color:"rgb(255, 98, 140)"}},{types:["attr-name"],style:{color:"rgb(255, 180, 84)"}},{types:["keyword","operator","property","namespace","tag","selector","doctype"],style:{color:"rgb(255, 157, 0)"}},{types:["builtin","char","constant","function","class-name"],style:{color:"rgb(250, 208, 0)"}}]},B={plain:{backgroundColor:"linear-gradient(to bottom, #2a2139 75%, #34294f)",backgroundImage:"#34294f",color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},styles:[{types:["comment","block-comment","prolog","doctype","cdata"],style:{color:"#495495",fontStyle:"italic"}},{types:["punctuation"],style:{color:"#ccc"}},{types:["tag","attr-name","namespace","number","unit","hexcode","deleted"],style:{color:"#e2777a"}},{types:["property","selector"],style:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"}},{types:["function-name"],style:{color:"#6196cc"}},{types:["boolean","selector-id","function"],style:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"}},{types:["class-name","maybe-class-name","builtin"],style:{color:"#fff5f6",textShadow:"0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"}},{types:["constant","symbol"],style:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"}},{types:["important","atrule","keyword","selector-class"],style:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"}},{types:["string","char","attr-value","regex","variable"],style:{color:"#f87c32"}},{types:["parameter"],style:{fontStyle:"italic"}},{types:["entity","url"],style:{color:"#67cdcc"}},{types:["operator"],style:{color:"ffffffee"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["entity"],style:{cursor:"help"}},{types:["inserted"],style:{color:"green"}}]},U={plain:{color:"#282a2e",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(197, 200, 198)"}},{types:["string","number","builtin","variable"],style:{color:"rgb(150, 152, 150)"}},{types:["class-name","function","tag","attr-name"],style:{color:"rgb(40, 42, 46)"}}]},$={plain:{color:"#9CDCFE",backgroundColor:"#1E1E1E"},styles:[{types:["prolog"],style:{color:"rgb(0, 0, 128)"}},{types:["comment"],style:{color:"rgb(106, 153, 85)"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"rgb(86, 156, 214)"}},{types:["number","inserted"],style:{color:"rgb(181, 206, 168)"}},{types:["constant"],style:{color:"rgb(100, 102, 149)"}},{types:["attr-name","variable"],style:{color:"rgb(156, 220, 254)"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"rgb(206, 145, 120)"}},{types:["selector"],style:{color:"rgb(215, 186, 125)"}},{types:["tag"],style:{color:"rgb(78, 201, 176)"}},{types:["tag"],languages:["markup"],style:{color:"rgb(86, 156, 214)"}},{types:["punctuation","operator"],style:{color:"rgb(212, 212, 212)"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"rgb(220, 220, 170)"}},{types:["class-name"],style:{color:"rgb(78, 201, 176)"}},{types:["char"],style:{color:"rgb(209, 105, 105)"}}]},H={plain:{color:"#000000",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(0, 128, 0)"}},{types:["builtin"],style:{color:"rgb(0, 112, 193)"}},{types:["number","variable","inserted"],style:{color:"rgb(9, 134, 88)"}},{types:["operator"],style:{color:"rgb(0, 0, 0)"}},{types:["constant","char"],style:{color:"rgb(129, 31, 63)"}},{types:["tag"],style:{color:"rgb(128, 0, 0)"}},{types:["attr-name"],style:{color:"rgb(255, 0, 0)"}},{types:["deleted","string"],style:{color:"rgb(163, 21, 21)"}},{types:["changed","punctuation"],style:{color:"rgb(4, 81, 165)"}},{types:["function","keyword"],style:{color:"rgb(0, 0, 255)"}},{types:["class-name"],style:{color:"rgb(38, 127, 153)"}}]},V={plain:{color:"#f8fafc",backgroundColor:"#011627"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#569CD6"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#f8fafc"}},{types:["attr-name","variable"],style:{color:"#9CDCFE"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#cbd5e1"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#D4D4D4"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#7dd3fc"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},W={plain:{color:"#0f172a",backgroundColor:"#f1f5f9"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#0c4a6e"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#0f172a"}},{types:["attr-name","variable"],style:{color:"#0c4a6e"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#64748b"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#475569"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#0e7490"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},q={plain:{backgroundColor:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(220, 10%, 40%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(220, 14%, 71%)"}},{types:["attr-name","class-name","maybe-class-name","boolean","constant","number","atrule"],style:{color:"hsl(29, 54%, 61%)"}},{types:["keyword"],style:{color:"hsl(286, 60%, 67%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(355, 65%, 65%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value"],style:{color:"hsl(95, 38%, 62%)"}},{types:["variable","operator","function"],style:{color:"hsl(207, 82%, 66%)"}},{types:["url"],style:{color:"hsl(187, 47%, 55%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(220, 14%, 71%)"}}]},G={plain:{backgroundColor:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(230, 4%, 64%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(230, 8%, 24%)"}},{types:["attr-name","class-name","boolean","constant","number","atrule"],style:{color:"hsl(35, 99%, 36%)"}},{types:["keyword"],style:{color:"hsl(301, 63%, 40%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(5, 74%, 59%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value","punctuation"],style:{color:"hsl(119, 34%, 47%)"}},{types:["variable","operator","function"],style:{color:"hsl(221, 87%, 60%)"}},{types:["url"],style:{color:"hsl(198, 99%, 37%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(230, 8%, 24%)"}}]},Q={plain:{color:"#ebdbb2",backgroundColor:"#292828"},styles:[{types:["imports","class-name","maybe-class-name","constant","doctype","builtin","function"],style:{color:"#d8a657"}},{types:["property-access"],style:{color:"#7daea3"}},{types:["tag"],style:{color:"#e78a4e"}},{types:["attr-name","char","url","regex"],style:{color:"#a9b665"}},{types:["attr-value","string"],style:{color:"#89b482"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#ea6962"}},{types:["entity","number","symbol"],style:{color:"#d3869b"}}]},Y={plain:{color:"#654735",backgroundColor:"#f9f5d7"},styles:[{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#af2528"}},{types:["imports","class-name","maybe-class-name","constant","doctype","builtin"],style:{color:"#b4730e"}},{types:["string","attr-value"],style:{color:"#477a5b"}},{types:["property-access"],style:{color:"#266b79"}},{types:["function","attr-name","char","url"],style:{color:"#72761e"}},{types:["tag"],style:{color:"#b94c07"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["entity","number","symbol"],style:{color:"#924f79"}}]},K=/\r\n|\r|\n/,Z=e=>{0===e.length?e.push({types:["plain"],content:"\n",empty:!0}):1===e.length&&""===e[0].content&&(e[0].content="\n",e[0].empty=!0)},X=(e,t)=>{const n=e.length;return n>0&&e[n-1]===t?e:e.concat(t)},J=e=>{const t=[[]],n=[e],r=[0],a=[e.length];let o=0,i=0,l=[];const s=[l];for(;i>-1;){for(;(o=r[i]++)0?u:["plain"],e=c):(u=X(u,c.type),c.alias&&(u=X(u,c.alias)),e=c.content),"string"!=typeof e){i++,t.push(u),n.push(e),r.push(0),a.push(e.length);continue}const d=e.split(K),f=d.length;l.push({types:u,content:d[0]});for(let t=1;t{const{plain:n}=e,r=e.styles.reduce((e,n)=>{const{languages:r,style:a}=n;return r&&!r.includes(t)||n.types.forEach(t=>{const n=S(S({},e[t]),a);e[t]=n}),e},{});return r.root=n,r.plain=E(S({},n),{backgroundColor:void 0}),r},te=({children:e,language:t,code:n,theme:r,prism:a})=>{const o=t.toLowerCase(),i=ee(r,o),l=(e=>(0,c.useCallback)(t=>{var n=t,{className:r,style:a,line:o}=n,i=_(n,["className","style","line"]);const l=E(S({},i),{className:(0,d.A)("token-line",r)});return"object"==typeof e&&"plain"in e&&(l.style=e.plain),"object"==typeof a&&(l.style=S(S({},l.style||{}),a)),l},[e]))(i),s=(e=>{const t=(0,c.useCallback)(({types:t,empty:n})=>{if(null!=e)return 1===t.length&&"plain"===t[0]?null!=n?{display:"inline-block"}:void 0:1===t.length&&null!=n?e[t[0]]:Object.assign(null!=n?{display:"inline-block"}:{},...t.map(t=>e[t]))},[e]);return(0,c.useCallback)(e=>{var n=e,{token:r,className:a,style:o}=n,i=_(n,["token","className","style"]);const l=E(S({},i),{className:(0,d.A)("token",...r.types,a),children:r.content,style:t(r)});return null!=o&&(l.style=S(S({},l.style||{}),o)),l},[t])})(i),u=(({prism:e,code:t,grammar:n,language:r})=>(0,c.useMemo)(()=>{if(null==n)return J([t]);const a={code:t,grammar:n,language:r,tokens:[]};return e.hooks.run("before-tokenize",a),a.tokens=e.tokenize(t,n),e.hooks.run("after-tokenize",a),J(a.tokens)},[t,n,r,e]))({prism:a,language:o,code:n,grammar:a.languages[o]});return e({tokens:u,className:`prism-code language-${o}`,style:null!=i?i.root:{},getLineProps:l,getTokenProps:s})},ne=e=>(0,c.createElement)(te,E(S({},e),{prism:e.prism||C,theme:e.theme||$,code:e.code,language:e.language}))},1561(e,t,n){"use strict";n.d(t,{A:()=>a});var r="Invariant failed";function a(e,t){if(!e)throw new Error(r)}},1635(e,t,n){"use strict";n.r(t),n.d(t,{__addDisposableResource:()=>I,__assign:()=>o,__asyncDelegator:()=>_,__asyncGenerator:()=>E,__asyncValues:()=>A,__await:()=>S,__awaiter:()=>m,__classPrivateFieldGet:()=>N,__classPrivateFieldIn:()=>R,__classPrivateFieldSet:()=>L,__createBinding:()=>h,__decorate:()=>l,__disposeResources:()=>D,__esDecorate:()=>u,__exportStar:()=>y,__extends:()=>a,__generator:()=>g,__importDefault:()=>P,__importStar:()=>O,__makeTemplateObject:()=>C,__metadata:()=>p,__param:()=>s,__propKey:()=>d,__read:()=>v,__rest:()=>i,__rewriteRelativeImportExtension:()=>z,__runInitializers:()=>c,__setFunctionName:()=>f,__spread:()=>w,__spreadArray:()=>x,__spreadArrays:()=>k,__values:()=>b,default:()=>M});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0;l--)(a=e[l])&&(i=(o<3?a(i):o>3?a(t,n,i):a(t,n))||i);return o>3&&i&&Object.defineProperty(t,n,i),i}function s(e,t){return function(n,r){t(n,r,e)}}function u(e,t,n,r,a,o){function i(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var l,s=r.kind,u="getter"===s?"get":"setter"===s?"set":"value",c=!t&&e?r.static?e:e.prototype:null,d=t||(c?Object.getOwnPropertyDescriptor(c,r.name):{}),f=!1,p=n.length-1;p>=0;p--){var m={};for(var g in r)m[g]="access"===g?{}:r[g];for(var g in r.access)m.access[g]=r.access[g];m.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");o.push(i(e||null))};var h=(0,n[p])("accessor"===s?{get:d.get,set:d.set}:d[u],m);if("accessor"===s){if(void 0===h)continue;if(null===h||"object"!=typeof h)throw new TypeError("Object expected");(l=i(h.get))&&(d.get=l),(l=i(h.set))&&(d.set=l),(l=i(h.init))&&a.unshift(l)}else(l=i(h))&&("field"===s?a.unshift(l):d[u]=l)}c&&Object.defineProperty(c,r.name,d),f=!0}function c(e,t,n){for(var r=arguments.length>2,a=0;a0&&a[a.length-1])||6!==l[0]&&2!==l[0])){o=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(l){a={error:l}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}function w(){for(var e=[],t=0;t1||l(e,t)})},t&&(r[e]=t(r[e])))}function l(e,t){try{(n=a[e](t)).value instanceof S?Promise.resolve(n.value.v).then(s,u):c(o[0][2],n)}catch(r){c(o[0][3],r)}var n}function s(e){l("next",e)}function u(e){l("throw",e)}function c(e,t){e(t),o.shift(),o.length&&l(o[0][0],o[0][1])}}function _(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,a){t[r]=e[r]?function(t){return(n=!n)?{value:S(e[r](t)),done:!1}:a?a(t):t}:a}}function A(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=b(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,a){(function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)})(r,a,(t=e[n](t)).done,t.value)})}}}function C(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var T=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},j=function(e){return j=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},j(e)};function O(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=j(e),r=0;r{e.O(0,[1869],()=>{return t=8600,e(e.s=t);var t});e.O()}]); \ No newline at end of file +/*! For license information please see main.00f36f1d.js.LICENSE.txt */ +(self.webpackChunkhappyview_docs=self.webpackChunkhappyview_docs||[]).push([[8792],{8328(e,t,n){"use strict";n.d(t,{A:()=>f});n(6540);var r=n(3259),a=n.n(r),o=n(4054);const i={"009f1e98":[function(){return n.e(7715).then(n.bind(n,3511))},"@site/docs/getting-started/configuration.md",3511],"111eee19":[function(){return n.e(8779).then(n.bind(n,9071))},"@site/docs/reference/troubleshooting.md",9071],"121e86a6":[function(){return n.e(5011).then(n.bind(n,7544))},"@site/docs/reference/scripts/get-record.md",7544],17896441:[function(){return Promise.all([n.e(1869),n.e(8401)]).then(n.bind(n,1527))},"@theme/DocItem",1527],"22dd74f7":[function(){return n.e(1567).then(n.t.bind(n,5226,19))},"@generated/docusaurus-plugin-content-docs/default/p/index-466.json",5226],"23374ca6":[function(){return n.e(2278).then(n.bind(n,7403))},"@site/docs/README.md",7403],"280f48ec":[function(){return n.e(787).then(n.bind(n,4796))},"@site/docs/reference/scripts/sidecar-records.md",4796],"33ec3d65":[function(){return n.e(6803).then(n.bind(n,6974))},"@site/docs/reference/architecture.md",6974],"43880f7a":[function(){return n.e(6590).then(n.bind(n,1572))},"@site/docs/reference/scripts/create-record.md",1572],"539fb2af":[function(){return n.e(5563).then(n.bind(n,8289))},"@site/docs/getting-started/dashboard.md",8289],"5d3a5990":[function(){return n.e(3197).then(n.bind(n,7825))},"@site/docs/reference/scripts/expanded-query.md",7825],"5e95c892":[function(){return n.e(9647).then(n.bind(n,7121))},"@theme/DocsRoot",7121],"5fd2dbdb":[function(){return n.e(4440).then(n.bind(n,6395))},"@site/docs/tutorials/statusphere.md",6395],"6acefe75":[function(){return n.e(6495).then(n.bind(n,1438))},"@site/docs/reference/scripts/update-or-delete.md",1438],"846656e5":[function(){return n.e(9492).then(n.bind(n,5231))},"@site/docs/reference/glossary.md",5231],"89877b86":[function(){return n.e(7520).then(n.bind(n,2749))},"@site/docs/getting-started/deployment/docker.md",2749],"919abb94":[function(){return n.e(20).then(n.bind(n,521))},"@site/docs/reference/scripts/upsert-record.md",521],"920ba7ef":[function(){return n.e(5953).then(n.bind(n,1189))},"@site/docs/guides/scripting.md",1189],"9985d6d5":[function(){return n.e(203).then(n.bind(n,2223))},"@site/docs/getting-started/deployment/railway.md",2223],a4086a70:[function(){return n.e(7194).then(n.bind(n,9297))},"@site/docs/reference/scripts/batch-save.md",9297],a51dfc20:[function(){return n.e(8897).then(n.bind(n,4783))},"@site/docs/reference/xrpc-api.md",4783],a77ba7fa:[function(){return n.e(6087).then(n.bind(n,6494))},"@site/docs/getting-started/authentication.md",6494],a7bd4aaa:[function(){return n.e(7098).then(n.bind(n,1723))},"@theme/DocVersionRoot",1723],a94703ab:[function(){return Promise.all([n.e(1869),n.e(9048)]).then(n.bind(n,8115))},"@theme/DocRoot",8115],aba21aa0:[function(){return n.e(5742).then(n.t.bind(n,7093,19))},"@generated/docusaurus-plugin-content-docs/default/__plugin.json",7093],b27c7406:[function(){return n.e(2618).then(n.bind(n,537))},"@site/docs/getting-started/deployment/other.md",537],bccc5e9b:[function(){return n.e(2431).then(n.bind(n,9641))},"@site/docs/guides/backfill.md",9641],bde15bec:[function(){return n.e(6438).then(n.bind(n,8796))},"@site/docs/reference/scripts/complex-mutations.md",8796],c985d368:[function(){return n.e(2007).then(n.bind(n,4436))},"@site/docs/reference/scripts/cascading-delete.md",4436],d2e94323:[function(){return n.e(3993).then(n.bind(n,7791))},"@site/docs/guides/lexicons.md",7791],e8644baa:[function(){return n.e(9178).then(n.bind(n,8525))},"@site/docs/reference/scripts/paginated-list.md",8525],ec125a10:[function(){return n.e(9659).then(n.bind(n,2192))},"@site/docs/reference/admin-api.md",2192],f142c65c:[function(){return n.e(9957).then(n.bind(n,9573))},"@site/docs/reference/scripts/list-or-fetch.md",9573],fac68122:[function(){return n.e(5986).then(n.bind(n,4924))},"@site/docs/reference/production-deployment.md",4924],fbd7a87c:[function(){return n.e(1361).then(n.bind(n,8594))},"@site/docs/getting-started/quickstart.md",8594]};var l=n(4848);function s(e){var t=e.error,n=e.retry,r=e.pastDelay;return t?(0,l.jsxs)("div",{style:{textAlign:"center",color:"#fff",backgroundColor:"#fa383e",borderColor:"#fa383e",borderStyle:"solid",borderRadius:"0.25rem",borderWidth:"1px",boxSizing:"border-box",display:"block",padding:"1rem",flex:"0 0 50%",marginLeft:"25%",marginRight:"25%",marginTop:"5rem",maxWidth:"50%",width:"100%"},children:[(0,l.jsx)("p",{children:String(t)}),(0,l.jsx)("div",{children:(0,l.jsx)("button",{type:"button",onClick:n,children:"Retry"})})]}):r?(0,l.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"},children:(0,l.jsx)("svg",{id:"loader",style:{width:128,height:110,position:"absolute",top:"calc(100vh - 64%)"},viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg",stroke:"#61dafb",children:(0,l.jsxs)("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",strokeWidth:"2",children:[(0,l.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,l.jsx)("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,l.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,l.jsx)("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,l.jsx)("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,l.jsx)("circle",{cx:"22",cy:"22",r:"8",children:(0,l.jsx)("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"})})]})})}):null}var u=n(6921),c=n(3102);function d(e,t){if("*"===e)return a()({loading:s,loader:function(){return n.e(2237).then(n.bind(n,2237))},modules:["@theme/NotFound"],webpack:function(){return[2237]},render:function(e,t){var n=e.default;return(0,l.jsx)(c.W,{value:{plugin:{name:"native",id:"default"}},children:(0,l.jsx)(n,Object.assign({},t))})}});var r=o[e+"-"+t],d={},f=[],p=[],m=(0,u.A)(r);return Object.entries(m).forEach(function(e){var t=e[0],n=e[1],r=i[n];r&&(d[t]=r[0],f.push(r[1]),p.push(r[2]))}),a().Map({loading:s,loader:d,modules:f,webpack:function(){return p},render:function(t,n){var a=JSON.parse(JSON.stringify(r));Object.entries(t).forEach(function(t){var n=t[0],r=t[1],o=r.default;if(!o)throw new Error("The page component at "+e+" doesn't have a default export. This makes it impossible to render anything. Consider default-exporting a React component.");"object"!=typeof o&&"function"!=typeof o||Object.keys(r).filter(function(e){return"default"!==e}).forEach(function(e){o[e]=r[e]});var i=a,l=n.split(".");l.slice(0,-1).forEach(function(e){i=i[e]}),i[l[l.length-1]]=o});var o=a.__comp;delete a.__comp;var i=a.__context;delete a.__context;var s=a.__props;return delete a.__props,(0,l.jsx)(c.W,{value:i,children:(0,l.jsx)(o,Object.assign({},a,s,n))})}})}const f=[{path:"/",component:d("/","414"),routes:[{path:"/",component:d("/","5f5"),routes:[{path:"/",component:d("/","a4e"),routes:[{path:"/getting-started/authentication",component:d("/getting-started/authentication","fd3"),exact:!0,sidebar:"docs"},{path:"/getting-started/configuration",component:d("/getting-started/configuration","641"),exact:!0,sidebar:"docs"},{path:"/getting-started/dashboard",component:d("/getting-started/dashboard","889"),exact:!0,sidebar:"docs"},{path:"/getting-started/deployment/docker",component:d("/getting-started/deployment/docker","d4f"),exact:!0,sidebar:"docs"},{path:"/getting-started/deployment/other",component:d("/getting-started/deployment/other","a50"),exact:!0,sidebar:"docs"},{path:"/getting-started/deployment/railway",component:d("/getting-started/deployment/railway","d15"),exact:!0,sidebar:"docs"},{path:"/getting-started/quickstart",component:d("/getting-started/quickstart","c60"),exact:!0,sidebar:"docs"},{path:"/guides/backfill",component:d("/guides/backfill","8e9"),exact:!0,sidebar:"docs"},{path:"/guides/lexicons",component:d("/guides/lexicons","f9a"),exact:!0,sidebar:"docs"},{path:"/guides/scripting",component:d("/guides/scripting","259"),exact:!0,sidebar:"docs"},{path:"/reference/admin-api",component:d("/reference/admin-api","cec"),exact:!0,sidebar:"docs"},{path:"/reference/architecture",component:d("/reference/architecture","5c9"),exact:!0,sidebar:"docs"},{path:"/reference/glossary",component:d("/reference/glossary","aa6"),exact:!0,sidebar:"docs"},{path:"/reference/production-deployment",component:d("/reference/production-deployment","935"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/batch-save",component:d("/reference/scripts/batch-save","e3f"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/cascading-delete",component:d("/reference/scripts/cascading-delete","2dc"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/complex-mutations",component:d("/reference/scripts/complex-mutations","a45"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/create-record",component:d("/reference/scripts/create-record","d2f"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/expanded-query",component:d("/reference/scripts/expanded-query","7c6"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/get-record",component:d("/reference/scripts/get-record","5c8"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/list-or-fetch",component:d("/reference/scripts/list-or-fetch","62b"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/paginated-list",component:d("/reference/scripts/paginated-list","917"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/sidecar-records",component:d("/reference/scripts/sidecar-records","b55"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/update-or-delete",component:d("/reference/scripts/update-or-delete","d03"),exact:!0,sidebar:"docs"},{path:"/reference/scripts/upsert-record",component:d("/reference/scripts/upsert-record","279"),exact:!0,sidebar:"docs"},{path:"/reference/troubleshooting",component:d("/reference/troubleshooting","af4"),exact:!0,sidebar:"docs"},{path:"/reference/xrpc-api",component:d("/reference/xrpc-api","a2e"),exact:!0,sidebar:"docs"},{path:"/tutorials/statusphere",component:d("/tutorials/statusphere","187"),exact:!0,sidebar:"docs"},{path:"/",component:d("/","280"),exact:!0,sidebar:"docs"}]}]}]},{path:"*",component:d("*")}]},6125(e,t,n){"use strict";n.d(t,{o:()=>o,x:()=>i});var r=n(6540),a=n(4848),o=r.createContext(!1);function i(e){var t=e.children,n=(0,r.useState)(!1),i=n[0],l=n[1];return(0,r.useEffect)(function(){l(!0)},[]),(0,a.jsx)(o.Provider,{value:i,children:t})}},8600(e,t,n){"use strict";var r=n(6540),a=n(5338),o=n(545),i=n(4625),l=n(4784),s=n(8193);const u=[n(119),n(6134),n(6294)];var c=n(8328),d=n(6347),f=n(2831),p=n(4848);function m(e){var t=e.children;return(0,p.jsx)(p.Fragment,{children:t})}var g=n(4563),h=function(e){return e.defaultFormatter(e)};function y(e){var t=e.children;return(0,p.jsx)(g.AL,{formatter:h,children:t})}function b(e){var t=e.children;return(0,p.jsx)(y,{children:t})}var v=n(5260),w=n(4586),k=n(6025),x=n(6342),S=n(5500),E=n(2131),_=n(4090),A=n(440),C=n(1463);function T(){var e=(0,w.A)().i18n,t=e.currentLocale,n=e.defaultLocale,r=e.localeConfigs,a=(0,E.o)(),o=r[t].htmlLang,i=function(e){return e.replace("-","_")};return(0,p.jsxs)(v.A,{children:[Object.entries(r).map(function(e){var t=e[0],n=e[1].htmlLang;return(0,p.jsx)("link",{rel:"alternate",href:a.createUrl({locale:t,fullyQualified:!0}),hrefLang:n},t)}),(0,p.jsx)("link",{rel:"alternate",href:a.createUrl({locale:n,fullyQualified:!0}),hrefLang:"x-default"}),(0,p.jsx)("meta",{property:"og:locale",content:i(o)}),Object.values(r).filter(function(e){return o!==e.htmlLang}).map(function(e){return(0,p.jsx)("meta",{property:"og:locale:alternate",content:i(e.htmlLang)},"meta-og-"+e.htmlLang)})]})}function j(e){var t=e.permalink,n=(0,w.A)().siteConfig.url,r=function(){var e=(0,w.A)().siteConfig,t=e.url,n=e.baseUrl,r=e.trailingSlash,a=(0,d.zy)().pathname;return t+(0,A.Ks)((0,k.Ay)(a),{trailingSlash:r,baseUrl:n})}(),a=t?""+n+t:r;return(0,p.jsxs)(v.A,{children:[(0,p.jsx)("meta",{property:"og:url",content:a}),(0,p.jsx)("link",{rel:"canonical",href:a})]})}function O(){var e=(0,w.A)().i18n.currentLocale,t=(0,x.p)(),n=t.metadata,r=t.image;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsxs)(v.A,{children:[(0,p.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,p.jsx)("body",{className:_.w})]}),r&&(0,p.jsx)(S.be,{image:r}),(0,p.jsx)(j,{}),(0,p.jsx)(T,{}),(0,p.jsx)(C.A,{tag:"default",locale:e}),(0,p.jsx)(v.A,{children:n.map(function(e,t){return(0,p.jsx)("meta",Object.assign({},e),t)})})]})}var P=new Map;var N=n(6125),L=n(6988),R=n(7387),I=n(205);function F(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r\n

Your Docusaurus site did not load properly.

\n

A very common reason is a wrong site baseUrl configuration.

\n

Current configured baseUrl = '+e+" "+("/"===e?" (default value)":"")+'

\n

We suggest trying baseUrl =

\n\n'}(e)).replace(/d,l:()=>f});var r=n(6540),a=n(4784);const o=JSON.parse('{"docusaurus-plugin-content-docs":{"default":{"path":"/","versions":[{"name":"current","label":"Next","isLast":true,"path":"/","mainDocId":"README","docs":[{"id":"getting-started/authentication","path":"/getting-started/authentication","sidebar":"docs"},{"id":"getting-started/configuration","path":"/getting-started/configuration","sidebar":"docs"},{"id":"getting-started/dashboard","path":"/getting-started/dashboard","sidebar":"docs"},{"id":"getting-started/deployment/docker","path":"/getting-started/deployment/docker","sidebar":"docs"},{"id":"getting-started/deployment/other","path":"/getting-started/deployment/other","sidebar":"docs"},{"id":"getting-started/deployment/railway","path":"/getting-started/deployment/railway","sidebar":"docs"},{"id":"getting-started/quickstart","path":"/getting-started/quickstart","sidebar":"docs"},{"id":"guides/backfill","path":"/guides/backfill","sidebar":"docs"},{"id":"guides/lexicons","path":"/guides/lexicons","sidebar":"docs"},{"id":"guides/scripting","path":"/guides/scripting","sidebar":"docs"},{"id":"README","path":"/","sidebar":"docs"},{"id":"reference/admin-api","path":"/reference/admin-api","sidebar":"docs"},{"id":"reference/architecture","path":"/reference/architecture","sidebar":"docs"},{"id":"reference/glossary","path":"/reference/glossary","sidebar":"docs"},{"id":"reference/production-deployment","path":"/reference/production-deployment","sidebar":"docs"},{"id":"reference/scripts/batch-save","path":"/reference/scripts/batch-save","sidebar":"docs"},{"id":"reference/scripts/cascading-delete","path":"/reference/scripts/cascading-delete","sidebar":"docs"},{"id":"reference/scripts/complex-mutations","path":"/reference/scripts/complex-mutations","sidebar":"docs"},{"id":"reference/scripts/create-record","path":"/reference/scripts/create-record","sidebar":"docs"},{"id":"reference/scripts/expanded-query","path":"/reference/scripts/expanded-query","sidebar":"docs"},{"id":"reference/scripts/get-record","path":"/reference/scripts/get-record","sidebar":"docs"},{"id":"reference/scripts/list-or-fetch","path":"/reference/scripts/list-or-fetch","sidebar":"docs"},{"id":"reference/scripts/paginated-list","path":"/reference/scripts/paginated-list","sidebar":"docs"},{"id":"reference/scripts/sidecar-records","path":"/reference/scripts/sidecar-records","sidebar":"docs"},{"id":"reference/scripts/update-or-delete","path":"/reference/scripts/update-or-delete","sidebar":"docs"},{"id":"reference/scripts/upsert-record","path":"/reference/scripts/upsert-record","sidebar":"docs"},{"id":"reference/troubleshooting","path":"/reference/troubleshooting","sidebar":"docs"},{"id":"reference/xrpc-api","path":"/reference/xrpc-api","sidebar":"docs"},{"id":"tutorials/statusphere","path":"/tutorials/statusphere","sidebar":"docs"}],"draftIds":[],"sidebars":{"docs":{"link":{"path":"/","label":"Introduction"}}}}],"breadcrumbs":true}}}'),i=JSON.parse('{"defaultLocale":"en","locales":["en"],"path":"i18n","currentLocale":"en","localeConfigs":{"en":{"label":"English","direction":"ltr","htmlLang":"en","calendar":"gregory","path":"en","translate":false,"url":"https://happyview.dev","baseUrl":"/"}}}');var l=n(2654);const s=JSON.parse('{"docusaurusVersion":"3.9.2","siteVersion":"0.0.0","pluginVersions":{"docusaurus-plugin-content-docs":{"type":"package","name":"@docusaurus/plugin-content-docs","version":"3.9.2"},"docusaurus-plugin-content-pages":{"type":"package","name":"@docusaurus/plugin-content-pages","version":"3.9.2"},"docusaurus-plugin-sitemap":{"type":"package","name":"@docusaurus/plugin-sitemap","version":"3.9.2"},"docusaurus-plugin-svgr":{"type":"package","name":"@docusaurus/plugin-svgr","version":"3.9.2"},"docusaurus-theme-classic":{"type":"package","name":"@docusaurus/theme-classic","version":"3.9.2"},"docusaurus-theme-mermaid":{"type":"package","name":"@docusaurus/theme-mermaid","version":"3.9.2"}}}');var u=n(4848),c={siteConfig:a.A,siteMetadata:s,globalData:o,i18n:i,codeTranslations:l},d=r.createContext(c);function f(e){var t=e.children;return(0,u.jsx)(d.Provider,{value:c,children:t})}},7489(e,t,n){"use strict";n.d(t,{A:()=>h});var r=n(7387),a=n(6540),o=n(8193),i=n(5260),l=n(440),s=n(9139),u=n(3102),c=n(4848);function d(e){var t=e.error,n=e.tryAgain;return(0,c.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",minHeight:"100vh",width:"100%",maxWidth:"80ch",fontSize:"20px",margin:"0 auto",padding:"1rem"},children:[(0,c.jsx)("h1",{style:{fontSize:"3rem"},children:"This page crashed"}),(0,c.jsx)("button",{type:"button",onClick:n,style:{margin:"1rem 0",fontSize:"2rem",cursor:"pointer",borderRadius:20,padding:"1rem"},children:"Try again"}),(0,c.jsx)(f,{error:t})]})}function f(e){var t=e.error,n=(0,l.rA)(t).map(function(e){return e.message}).join("\n\nCause:\n");return(0,c.jsx)("p",{style:{whiteSpace:"pre-wrap"},children:n})}function p(e){var t=e.children;return(0,c.jsx)(u.W,{value:{plugin:{name:"docusaurus-core-error-boundary",id:"default"}},children:t})}function m(e){var t=e.error,n=e.tryAgain;return(0,c.jsx)(p,{children:(0,c.jsxs)(h,{fallback:function(){return(0,c.jsx)(d,{error:t,tryAgain:n})},children:[(0,c.jsx)(i.A,{children:(0,c.jsx)("title",{children:"Page Error"})}),(0,c.jsx)(s.A,{children:(0,c.jsx)(d,{error:t,tryAgain:n})})]})})}var g=function(e){return(0,c.jsx)(m,Object.assign({},e))},h=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={error:null},n}(0,r.A)(t,e);var n=t.prototype;return n.componentDidCatch=function(e){o.A.canUseDOM&&this.setState({error:e})},n.render=function(){var e=this,t=this.props.children,n=this.state.error;if(n){var r,a={error:n,tryAgain:function(){return e.setState({error:null})}};return(null!=(r=this.props.fallback)?r:g)(a)}return null!=t?t:null},t}(a.Component)},8193(e,t,n){"use strict";n.d(t,{A:()=>a});var r="undefined"!=typeof window&&"document"in window&&"createElement"in window.document;const a={canUseDOM:r,canUseEventListeners:r&&("addEventListener"in window||"attachEvent"in window),canUseIntersectionObserver:r&&"IntersectionObserver"in window,canUseViewport:r&&"screen"in window}},5260(e,t,n){"use strict";n.d(t,{A:()=>o});n(6540);var r=n(545),a=n(4848);function o(e){return(0,a.jsx)(r.mg,Object.assign({},e))}},8774(e,t,n){"use strict";n.d(t,{A:()=>g});var r=n(8587),a=n(6540),o=n(4625),i=n(440),l=n(4586),s=n(6654),u=n(8193),c=n(3427),d=n(6025),f=n(4848),p=["isNavLink","to","href","activeClassName","isActive","data-noBrokenLinkCheck","autoAddBaseUrl"];function m(e,t){var n,m,g,h=e.isNavLink,y=e.to,b=e.href,v=e.activeClassName,w=e.isActive,k=e["data-noBrokenLinkCheck"],x=e.autoAddBaseUrl,S=void 0===x||x,E=(0,r.A)(e,p),_=(0,l.A)().siteConfig,A=_.trailingSlash,C=_.baseUrl,T=_.future.experimental_router,j=(0,d.hH)().withBaseUrl,O=(0,c.A)(),P=(0,a.useRef)(null);(0,a.useImperativeHandle)(t,function(){return P.current});var N=y||b;var L,R,I=(0,s.A)(N),F=null==N?void 0:N.replace("pathname://",""),D=void 0!==F?(L=F,S&&function(e){return e.startsWith("/")}(L)?j(L):L):void 0;"hash"===T&&null!=(n=D)&&n.startsWith("./")&&(D=null==(R=D)?void 0:R.slice(1));D&&I&&(D=(0,i.Ks)(D,{trailingSlash:A,baseUrl:C}));var z=(0,a.useRef)(!1),M=h?o.k2:o.N_,B=u.A.canUseIntersectionObserver,U=(0,a.useRef)(),$=function(){z.current||null==D||(window.docusaurus.preload(D),z.current=!0)};(0,a.useEffect)(function(){return!B&&I&&u.A.canUseDOM&&null!=D&&window.docusaurus.prefetch(D),function(){B&&U.current&&U.current.disconnect()}},[U,D,B,I]);var H=null!=(m=null==(g=D)?void 0:g.startsWith("#"))&&m,V=!E.target||"_self"===E.target,W=!D||!I||!V||H&&"hash"!==T;k||!H&&W||O.collectLink(D),E.id&&O.collectAnchor(E.id);var q={};return W?(0,f.jsx)("a",Object.assign({ref:P,href:D},N&&!I&&{target:"_blank",rel:"noopener noreferrer"},E,q)):(0,f.jsx)(M,Object.assign({},E,{onMouseEnter:$,onTouchStart:$,innerRef:function(e){P.current=e,B&&e&&I&&(U.current=new window.IntersectionObserver(function(t){t.forEach(function(t){e===t.target&&(t.isIntersecting||t.intersectionRatio>0)&&(U.current.unobserve(e),U.current.disconnect(),null!=D&&window.docusaurus.prefetch(D))})}),U.current.observe(e))},to:D},h&&{isActive:w,activeClassName:v},q))}const g=a.forwardRef(m)},1312(e,t,n){"use strict";n.d(t,{A:()=>u,T:()=>s});var r=n(6540),a=n(4848);function o(e,t){var n=e.split(/(\{\w+\})/).map(function(e,n){if(n%2==1){var r=null==t?void 0:t[e.slice(1,-1)];if(void 0!==r)return r}return e});return n.some(function(e){return(0,r.isValidElement)(e)})?n.map(function(e,t){return(0,r.isValidElement)(e)?r.cloneElement(e,{key:t}):e}).filter(function(e){return""!==e}):n.join("")}var i=n(2654);function l(e){var t,n,r=e.id,a=e.message;if(void 0===r&&void 0===a)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return null!=(t=null!=(n=i[null!=r?r:a])?n:a)?t:r}function s(e,t){return o(l({message:e.message,id:e.id}),t)}function u(e){var t=e.children,n=e.id,r=e.values;if(t&&"string"!=typeof t)throw console.warn("Illegal children",t),new Error("The Docusaurus component only accept simple string values");var i=l({message:t,id:n});return(0,a.jsx)(a.Fragment,{children:o(i,r)})}},7065(e,t,n){"use strict";n.d(t,{W:()=>r});var r="default"},6654(e,t,n){"use strict";function r(e){return/^(?:\w*:|\/\/)/.test(e)}function a(e){return void 0!==e&&!r(e)}n.d(t,{A:()=>a,z:()=>r})},6025(e,t,n){"use strict";n.d(t,{Ay:()=>l,hH:()=>i});var r=n(6540),a=n(4586),o=n(6654);function i(){var e=(0,a.A)().siteConfig,t=e.baseUrl,n=e.url,i=e.future.experimental_router,l=(0,r.useCallback)(function(e,r){return function(e){var t=e.siteUrl,n=e.baseUrl,r=e.url,a=e.options,i=void 0===a?{}:a,l=i.forcePrependBaseUrl,s=void 0!==l&&l,u=i.absolute,c=void 0!==u&&u,d=e.router;if(!r||r.startsWith("#")||(0,o.z)(r))return r;if("hash"===d)return r.startsWith("/")?"."+r:"./"+r;if(s)return n+r.replace(/^\//,"");if(r===n.replace(/\/$/,""))return n;var f=r.startsWith(n)?r:n+r.replace(/^\//,"");return c?t+f:f}({siteUrl:n,baseUrl:t,url:e,options:r,router:i})},[n,t,i]);return{withBaseUrl:l}}function l(e,t){return void 0===t&&(t={}),(0,i().withBaseUrl)(e,t)}},3427(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(6540),a=(n(4848),r.createContext({collectAnchor:function(){},collectLink:function(){}}));function o(){return(0,r.useContext)(a)}},4586(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(6540),a=n(6988);function o(){return(0,r.useContext)(a.o)}},2303(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(6540),a=n(6125);function o(){return(0,r.useContext)(a.o)}},205(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(6540);const a=n(8193).A.canUseDOM?r.useLayoutEffect:r.useEffect},6803(e,t,n){"use strict";n.d(t,{A:()=>o});var r=n(6540),a=n(3102);function o(){var e=r.useContext(a.o);if(!e)throw new Error("Unexpected: no Docusaurus route context found");return e}},6921(e,t,n){"use strict";n.d(t,{A:()=>r});function r(e){var t={};return function e(n,r){Object.entries(n).forEach(function(n){var a,o=n[0],i=n[1],l=r?r+"."+o:o;"object"==typeof(a=i)&&a&&Object.keys(a).length>0?e(i,l):t[l]=i})}(e),t}},3102(e,t,n){"use strict";n.d(t,{W:()=>i,o:()=>o});var r=n(6540),a=n(4848),o=r.createContext(null);function i(e){var t=e.children,n=e.value,i=r.useContext(o),l=(0,r.useMemo)(function(){return function(e){var t=e.parent,n=e.value;if(!t){if(!n)throw new Error("Unexpected: no Docusaurus route context found");if(!("plugin"in n))throw new Error("Unexpected: Docusaurus topmost route context has no `plugin` attribute");return n}var r=Object.assign({},t.data,null==n?void 0:n.data);return{plugin:t.plugin,data:r}}({parent:i,value:n})},[i,n]);return(0,a.jsx)(o.Provider,{value:l,children:t})}},3886(e,t,n){"use strict";n.d(t,{VQ:()=>y,g1:()=>v});var r=n(6540),a=n(4070),o=n(7065),i=n(6342),l=n(679),s=n(3807),u=n(4848),c=function(e){return"docs-preferred-version-"+e},d=function(e,t,n){(0,l.Wf)(c(e),{persistence:t}).set(n)},f=function(e,t){return(0,l.Wf)(c(e),{persistence:t}).get()},p=function(e,t){(0,l.Wf)(c(e),{persistence:t}).del()};var m=r.createContext(null);function g(){var e=(0,a.Gy)(),t=(0,i.p)().docs.versionPersistence,n=(0,r.useMemo)(function(){return Object.keys(e)},[e]),o=(0,r.useState)(function(){return function(e){return Object.fromEntries(e.map(function(e){return[e,{preferredVersionName:null}]}))}(n)}),l=o[0],s=o[1];return(0,r.useEffect)(function(){s(function(e){var t=e.pluginIds,n=e.versionPersistence,r=e.allDocsData;return Object.fromEntries(t.map(function(e){return[e,(t=e,a=f(t,n),r[t].versions.some(function(e){return e.name===a})?{preferredVersionName:a}:(p(t,n),{preferredVersionName:null}))];var t,a}))}({allDocsData:e,versionPersistence:t,pluginIds:n}))},[e,t,n]),[l,(0,r.useMemo)(function(){return{savePreferredVersion:function(e,n){d(e,t,n),s(function(t){var r;return Object.assign({},t,((r={})[e]={preferredVersionName:n},r))})}}},[t])]}function h(e){var t=e.children,n=g();return(0,u.jsx)(m.Provider,{value:n,children:t})}function y(e){var t=e.children;return(0,u.jsx)(h,{children:t})}function b(){var e=(0,r.useContext)(m);if(!e)throw new s.dV("DocsPreferredVersionContextProvider");return e}function v(e){var t;void 0===e&&(e=o.W);var n=(0,a.ht)(e),i=b(),l=i[0],s=i[1],u=l[e].preferredVersionName;return{preferredVersion:null!=(t=n.versions.find(function(e){return e.name===u}))?t:null,savePreferredVersionName:(0,r.useCallback)(function(t){s.savePreferredVersion(e,t)},[s,e])}}},609(e,t,n){"use strict";n.d(t,{V:()=>s,t:()=>u});var r=n(6540),a=n(3807),o=n(4848),i=Symbol("EmptyContext"),l=r.createContext(i);function s(e){var t=e.children,n=e.name,a=e.items,i=(0,r.useMemo)(function(){return n&&a?{name:n,items:a}:null},[n,a]);return(0,o.jsx)(l.Provider,{value:i,children:t})}function u(){var e=(0,r.useContext)(l);if(e===i)throw new a.dV("DocsSidebarProvider");return e}},4718(e,t,n){"use strict";n.d(t,{Nr:()=>p,w8:()=>g,B5:()=>S,Vd:()=>w,QB:()=>x,fW:()=>k,OF:()=>v,Y:()=>y});var r=n(3845),a=n(6540),o=n(6347),i=n(2831),l=n(4070),s=n(9169);function u(e){return Array.from(new Set(e))}var c=n(3886),d=n(3025),f=n(609);function p(e){return"link"!==e.type||e.unlisted?"category"===e.type?function(e){if(e.href&&!e.linkUnlisted)return e.href;for(var t,n=(0,r.A)(e.items);!(t=n()).done;){var a=p(t.value);if(a)return a}}(e):void 0:e.href}var m=function(e,t){return void 0!==e&&(0,s.ys)(e,t)};function g(e,t){return"link"===e.type?m(e.href,t):"category"===e.type&&(m(e.href,t)||function(e,t){return e.some(function(e){return g(e,t)})}(e.items,t))}function h(e,t){switch(e.type){case"category":return g(e,t)||void 0!==e.href&&!e.linkUnlisted||e.items.some(function(e){return h(e,t)});case"link":return!e.unlisted||g(e,t);default:return!0}}function y(e,t){return(0,a.useMemo)(function(){return e.filter(function(e){return h(e,t)})},[e,t])}function b(e){var t=e.sidebarItems,n=e.pathname,a=e.onlyCategories,o=void 0!==a&&a,i=[];return function e(t){for(var a,l=(0,r.A)(t);!(a=l()).done;){var u=a.value;if("category"===u.type&&((0,s.ys)(u.href,n)||e(u.items))||"link"===u.type&&(0,s.ys)(u.href,n))return o&&"category"!==u.type||i.unshift(u),!0}return!1}(t),i}function v(){var e,t=(0,f.t)(),n=(0,o.zy)().pathname;return!1!==(null==(e=(0,l.vT)())?void 0:e.pluginData.breadcrumbs)&&t?b({sidebarItems:t.items,pathname:n}):null}function w(e){var t=(0,l.zK)(e).activeVersion,n=(0,c.g1)(e).preferredVersion,r=(0,l.r7)(e);return(0,a.useMemo)(function(){return u([t,n,r].filter(Boolean))},[t,n,r])}function k(e,t){var n=w(t);return(0,a.useMemo)(function(){var t=n.flatMap(function(e){return e.sidebars?Object.entries(e.sidebars):[]}),r=t.find(function(t){return t[0]===e});if(!r)throw new Error("Can't find any sidebar with id \""+e+'" in version'+(n.length>1?"s":"")+" "+n.map(function(e){return e.name}).join(", ")+'".\nAvailable sidebar ids are:\n- '+t.map(function(e){return e[0]}).join("\n- "));return r[1]},[e,n])}function x(e,t){var n=w(t);return(0,a.useMemo)(function(){var t=n.flatMap(function(e){return e.docs}),r=t.find(function(t){return t.id===e});if(!r){if(n.flatMap(function(e){return e.draftIds}).includes(e))return null;throw new Error("Couldn't find any doc with id \""+e+'" in version'+(n.length>1?"s":"")+' "'+n.map(function(e){return e.name}).join(", ")+'".\nAvailable doc ids are:\n- '+u(t.map(function(e){return e.id})).join("\n- "))}return r},[e,n])}function S(e){var t=e.route,n=(0,o.zy)(),r=(0,d.r)(),a=t.routes,l=a.find(function(e){return(0,o.B6)(n.pathname,e)});if(!l)return null;var s=l.sidebar,u=s?r.docsSidebars[s]:void 0;return{docElement:(0,i.v)(a),sidebarName:s,sidebarItems:u}}},3025(e,t,n){"use strict";n.d(t,{n:()=>l,r:()=>s});var r=n(6540),a=n(3807),o=n(4848),i=r.createContext(null);function l(e){var t=e.children,n=e.version;return(0,o.jsx)(i.Provider,{value:n,children:t})}function s(){var e=(0,r.useContext)(i);if(null===e)throw new a.dV("DocsVersionProvider");return e}},4070(e,t,n){"use strict";n.d(t,{zK:()=>g,vT:()=>f,Gy:()=>c,HW:()=>h,ht:()=>d,r7:()=>m,jh:()=>p});var r=n(6347),a=n(4586),o=n(7065);function i(e,t){void 0===t&&(t={});var n=(0,a.A)().globalData[e];if(!n&&t.failfast)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin.');return n}var l=function(e){return e.versions.find(function(e){return e.isLast})};function s(e,t){var n,a,o=function(e,t){return[].concat(e.versions).sort(function(e,t){return e.path===t.path?0:e.path.includes(t.path)?-1:t.path.includes(e.path)?1:0}).find(function(e){return!!(0,r.B6)(t,{path:e.path,exact:!1,strict:!1})})}(e,t),i=null==o?void 0:o.docs.find(function(e){return!!(0,r.B6)(t,{path:e.path,exact:!0,strict:!1})});return{activeVersion:o,activeDoc:i,alternateDocVersions:i?(n=i.id,a={},e.versions.forEach(function(e){e.docs.forEach(function(t){t.id===n&&(a[e.name]=t)})}),a):{}}}var u={},c=function(){var e;return null!=(e=i("docusaurus-plugin-content-docs"))?e:u},d=function(e){try{return function(e,t,n){void 0===t&&(t=o.W),void 0===n&&(n={});var r=i(e),a=null==r?void 0:r[t];if(!a&&n.failfast)throw new Error('Docusaurus plugin global data not found for "'+e+'" plugin with id "'+t+'".');return a}("docusaurus-plugin-content-docs",e,{failfast:!0})}catch(t){throw new Error("You are using a feature of the Docusaurus docs plugin, but this plugin does not seem to be enabled"+("Default"===e?"":" (pluginId="+e),{cause:t})}};function f(e){return void 0===e&&(e={}),function(e,t,n){void 0===n&&(n={});var a=Object.entries(e).sort(function(e,t){return t[1].path.localeCompare(e[1].path)}).find(function(e){var n=e[1];return!!(0,r.B6)(t,{path:n.path,exact:!1,strict:!1})}),o=a?{pluginId:a[0],pluginData:a[1]}:void 0;if(!o&&n.failfast)throw new Error("Can't find active docs plugin for \""+t+'" pathname, while it was expected to be found. Maybe you tried to use a docs feature that can only be used on a docs-related page? Existing docs plugin paths are: '+Object.values(e).map(function(e){return e.path}).join(", "));return o}(c(),(0,r.zy)().pathname,e)}function p(e){return d(e).versions}function m(e){var t=d(e);return l(t)}function g(e){return s(d(e),(0,r.zy)().pathname)}function h(e){return function(e,t){var n=l(e);return{latestDocSuggestion:s(e,t).alternateDocVersions[n.name],latestVersionSuggestion:n}}(d(e),(0,r.zy)().pathname)}},6294(e,t,n){"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(5947),a=n.n(r);a().configure({showSpinner:!1});const o={onRouteUpdate:function(e){var t=e.location,n=e.previousLocation;if(n&&t.pathname!==n.pathname){var r=window.setTimeout(function(){a().start()},200);return function(){return window.clearTimeout(r)}}},onRouteDidUpdate:function(){a().done()}}},6134(e,t,n){"use strict";var r,a,o,i=n(1765),l=n(4784);r=i.My,a=l.A.themeConfig.prism.additionalLanguages,o=globalThis.Prism,globalThis.Prism=r,a.forEach(function(e){"php"===e&&n(9700),n(3890)("./prism-"+e)}),delete globalThis.Prism,void 0!==o&&(globalThis.Prism=r)},1107(e,t,n){"use strict";n.d(t,{A:()=>d});var r=n(8587),a=(n(6540),n(4164)),o=n(1312),i=n(3535),l=n(8774),s=n(3427),u=n(4848),c=["as","id"];function d(e){var t=e.as,n=e.id,d=(0,r.A)(e,c),f=(0,s.A)(),p=(0,i.v)(n);if("h1"===t||!n)return(0,u.jsx)(t,Object.assign({},d,{id:void 0}));f.collectAnchor(n);var m=(0,o.T)({id:"theme.common.headingLinkTitle",message:"Direct link to {heading}",description:"Title for link to heading"},{heading:"string"==typeof d.children?d.children:n});return(0,u.jsxs)(t,Object.assign({},d,{className:(0,a.A)("anchor",p,d.className),id:n,children:[d.children,(0,u.jsx)(l.A,{className:"hash-link",to:"#"+n,"aria-label":m,title:m,translate:"no",children:"\u200b"})]}))}},3186(e,t,n){"use strict";n.d(t,{A:()=>i});n(6540);var r=n(1312);const a="iconExternalLink_nPIU";var o=n(4848);function i(e){var t=e.width,n=void 0===t?13.5:t,i=e.height,l=void 0===i?13.5:i;return(0,o.jsx)("svg",{width:n,height:l,"aria-label":(0,r.T)({id:"theme.IconExternalLink.ariaLabel",message:"(opens in new tab)",description:"The ARIA label for the external link icon"}),className:a,children:(0,o.jsx)("use",{href:"#theme-svg-external-link"})})}},9139(e,t,n){"use strict";n.d(t,{A:()=>Wt});var r=n(6540),a=n(4164),o=n(7489),i=n(5500),l=n(6347),s=n(1312),u=n(5062),c=n(4848),d="__docusaurus_skipToContent_fallback";function f(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}function p(){var e=(0,r.useRef)(null),t=(0,l.W6)().action,n=(0,r.useCallback)(function(e){e.preventDefault();var t,n=null!=(t=document.querySelector("main:first-of-type"))?t:document.getElementById(d);n&&f(n)},[]);return(0,u.$)(function(n){var r=n.location;e.current&&!r.hash&&"PUSH"===t&&f(e.current)}),{containerRef:e,onClick:n}}var m=(0,s.T)({id:"theme.common.skipToMainContent",description:"The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation",message:"Skip to main content"});function g(e){var t,n=null!=(t=e.children)?t:m,r=p(),a=r.containerRef,o=r.onClick;return(0,c.jsx)("div",{ref:a,role:"region","aria-label":m,children:(0,c.jsx)("a",Object.assign({},e,{href:"#"+d,onClick:o,children:n}))})}var h=n(7559),y=n(4090);const b="skipToContent_fXgn";function v(){return(0,c.jsx)(g,{className:b})}var w=n(6342),k=n(5041),x=n(8587),S=["width","height","color","strokeWidth","className"];function E(e){var t=e.width,n=void 0===t?21:t,r=e.height,a=void 0===r?21:r,o=e.color,i=void 0===o?"currentColor":o,l=e.strokeWidth,s=void 0===l?1.2:l,u=(e.className,(0,x.A)(e,S));return(0,c.jsx)("svg",Object.assign({viewBox:"0 0 15 15",width:n,height:a},u,{children:(0,c.jsx)("g",{stroke:i,strokeWidth:s,children:(0,c.jsx)("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})})}))}const _="closeButton_CVFx";function A(e){return(0,c.jsx)("button",Object.assign({type:"button","aria-label":(0,s.T)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"})},e,{className:(0,a.A)("clean-btn close",_,e.className),children:(0,c.jsx)(E,{width:14,height:14,strokeWidth:3.1})}))}const C="content_knG7";function T(e){var t=(0,w.p)().announcementBar.content;return(0,c.jsx)("div",Object.assign({},e,{className:(0,a.A)(C,e.className),dangerouslySetInnerHTML:{__html:t}}))}const j="announcementBar_mb4j",O="announcementBarPlaceholder_vyr4",P="announcementBarClose_gvF7",N="announcementBarContent_xLdY";function L(){var e=(0,w.p)().announcementBar,t=(0,k.M)(),n=t.isActive,r=t.close;if(!n)return null;var o=e.backgroundColor,i=e.textColor,l=e.isCloseable;return(0,c.jsxs)("div",{className:(0,a.A)(h.G.announcementBar.container,j),style:{backgroundColor:o,color:i},role:"banner",children:[l&&(0,c.jsx)("div",{className:O}),(0,c.jsx)(T,{className:N}),l&&(0,c.jsx)(A,{onClick:r,className:P})]})}var R=n(2069),I=n(3104);var F=n(3807),D=n(5600),z=r.createContext(null);function M(e){var t,n,a,o,i,l,s,u=e.children,d=(t=(0,R.M)(),n=(0,D.YL)(),a=(0,r.useState)(!1),o=a[0],i=a[1],l=null!==n.component,s=(0,F.ZC)(l),(0,r.useEffect)(function(){l&&!s&&i(!0)},[l,s]),(0,r.useEffect)(function(){l?t.shown||i(!0):i(!1)},[t.shown,l]),(0,r.useMemo)(function(){return[o,i]},[o]));return(0,c.jsx)(z.Provider,{value:d,children:u})}function B(e){if(e.component){var t=e.component;return(0,c.jsx)(t,Object.assign({},e.props))}}function U(){var e=(0,r.useContext)(z);if(!e)throw new F.dV("NavbarSecondaryMenuDisplayProvider");var t=e[0],n=e[1],a=(0,r.useCallback)(function(){return n(!1)},[n]),o=(0,D.YL)();return(0,r.useMemo)(function(){return{shown:t,hide:a,content:B(o)}},[a,o,t])}function $(e){var t=e.children,n=e.inert;return(0,c.jsx)("div",Object.assign({className:(0,a.A)(h.G.layout.navbar.mobileSidebar.panel,"navbar-sidebar__item menu")},function(e){return parseInt(r.version.split(".")[0],10)<19?{inert:e?"":void 0}:{inert:e}}(n),{children:t}))}function H(e){var t=e.header,n=e.primaryMenu,r=e.secondaryMenu,o=U().shown;return(0,c.jsxs)("div",{className:(0,a.A)(h.G.layout.navbar.mobileSidebar.container,"navbar-sidebar"),children:[t,(0,c.jsxs)("div",{className:(0,a.A)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":o}),children:[(0,c.jsx)($,{inert:o,children:n}),(0,c.jsx)($,{inert:!o,children:r})]})]})}var V=n(5293),W=n(2303);function q(e){return(0,c.jsx)("svg",Object.assign({viewBox:"0 0 24 24",width:24,height:24},e,{children:(0,c.jsx)("path",{fill:"currentColor",d:"M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"})}))}function G(e){return(0,c.jsx)("svg",Object.assign({viewBox:"0 0 24 24",width:24,height:24},e,{children:(0,c.jsx)("path",{fill:"currentColor",d:"M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"})}))}function Q(e){return(0,c.jsx)("svg",Object.assign({viewBox:"0 0 24 24",width:24,height:24},e,{children:(0,c.jsx)("path",{fill:"currentColor",d:"m12 21c4.971 0 9-4.029 9-9s-4.029-9-9-9-9 4.029-9 9 4.029 9 9 9zm4.95-13.95c1.313 1.313 2.05 3.093 2.05 4.95s-0.738 3.637-2.05 4.95c-1.313 1.313-3.093 2.05-4.95 2.05v-14c1.857 0 3.637 0.737 4.95 2.05z"})}))}const Y="toggle_vylO",K="toggleButton_gllP",Z="toggleIcon_g3eP",X="systemToggleIcon_QzmC",J="lightToggleIcon_pyhR",ee="darkToggleIcon_wfgR",te="toggleButtonDisabled_aARS";function ne(e){switch(e){case null:return(0,s.T)({message:"system mode",id:"theme.colorToggle.ariaLabel.mode.system",description:"The name for the system color mode"});case"light":return(0,s.T)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"});case"dark":return(0,s.T)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"});default:throw new Error("unexpected color mode "+e)}}function re(e){return(0,s.T)({message:"Switch between dark and light mode (currently {mode})",id:"theme.colorToggle.ariaLabel",description:"The ARIA label for the color mode toggle"},{mode:ne(e)})}function ae(){return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(q,{"aria-hidden":!0,className:(0,a.A)(Z,J)}),(0,c.jsx)(G,{"aria-hidden":!0,className:(0,a.A)(Z,ee)}),(0,c.jsx)(Q,{"aria-hidden":!0,className:(0,a.A)(Z,X)})]})}function oe(e){var t=e.className,n=e.buttonClassName,r=e.respectPrefersColorScheme,o=e.value,i=e.onChange,l=(0,W.A)();return(0,c.jsx)("div",{className:(0,a.A)(Y,t),children:(0,c.jsx)("button",{className:(0,a.A)("clean-btn",K,!l&&te,n),type:"button",onClick:function(){return i(function(e,t){if(!t)return"dark"===e?"light":"dark";switch(e){case null:return"light";case"light":return"dark";case"dark":return null;default:throw new Error("unexpected color mode "+e)}}(o,r))},disabled:!l,title:ne(o),"aria-label":re(o),children:(0,c.jsx)(ae,{})})})}const ie=r.memo(oe),le="darkNavbarColorModeToggle_X3D1";function se(e){var t=e.className,n=(0,w.p)().navbar.style,r=(0,w.p)().colorMode,a=r.disableSwitch,o=r.respectPrefersColorScheme,i=(0,V.G)(),l=i.colorModeChoice,s=i.setColorMode;return a?null:(0,c.jsx)(ie,{className:t,buttonClassName:"dark"===n?le:void 0,respectPrefersColorScheme:o,value:l,onChange:s})}var ue=n(3465);function ce(){return(0,c.jsx)(ue.A,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function de(){var e=(0,R.M)();return(0,c.jsx)("button",{type:"button","aria-label":(0,s.T)({id:"theme.docs.sidebar.closeSidebarButtonAriaLabel",message:"Close navigation bar",description:"The ARIA label for close button of mobile sidebar"}),className:"clean-btn navbar-sidebar__close",onClick:function(){return e.toggle()},children:(0,c.jsx)(E,{color:"var(--ifm-color-emphasis-600)"})})}function fe(){return(0,c.jsxs)("div",{className:"navbar-sidebar__brand",children:[(0,c.jsx)(ce,{}),(0,c.jsx)(se,{className:"margin-right--md"}),(0,c.jsx)(de,{})]})}var pe=n(8774),me=n(6025),ge=n(6654);function he(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}var ye=n(3186),be=["activeBasePath","activeBaseRegex","to","href","label","html","isDropdownLink","prependBaseUrlToHref"];function ve(e){var t=e.activeBasePath,n=e.activeBaseRegex,r=e.to,a=e.href,o=e.label,i=e.html,l=e.isDropdownLink,s=e.prependBaseUrlToHref,u=(0,x.A)(e,be),d=(0,me.Ay)(r),f=(0,me.Ay)(t),p=(0,me.Ay)(a,{forcePrependBaseUrl:!0}),m=o&&a&&!(0,ge.A)(a),g=i?{dangerouslySetInnerHTML:{__html:i}}:{children:(0,c.jsxs)(c.Fragment,{children:[o,m&&(0,c.jsx)(ye.A,Object.assign({},l&&{width:12,height:12}))]})};return a?(0,c.jsx)(pe.A,Object.assign({href:s?p:a},u,g)):(0,c.jsx)(pe.A,Object.assign({to:d,isNavLink:!0},(t||n)&&{isActive:function(e,t){return n?he(n,t.pathname):t.pathname.startsWith(f)}},u,g))}var we=["className","isDropdownItem"];function ke(e){var t=e.className,n=(e.isDropdownItem,(0,x.A)(e,we));return(0,c.jsx)("li",{className:"menu__list-item",children:(0,c.jsx)(ve,Object.assign({className:(0,a.A)("menu__link",t)},n))})}var xe=["className","isDropdownItem"];function Se(e){var t=e.className,n=e.isDropdownItem,r=void 0!==n&&n,o=(0,x.A)(e,xe),i=(0,c.jsx)(ve,Object.assign({className:(0,a.A)(r?"dropdown__link":"navbar__item navbar__link",t),isDropdownLink:r},o));return r?(0,c.jsx)("li",{children:i}):i}var Ee=["mobile","position"];function _e(e){var t,n=e.mobile,r=void 0!==n&&n,a=(e.position,(0,x.A)(e,Ee)),o=r?ke:Se;return(0,c.jsx)(o,Object.assign({},a,{activeClassName:null!=(t=a.activeClassName)?t:r?"menu__link--active":"navbar__link--active"}))}var Ae=n(1422),Ce=n(9169),Te=n(4586);const je="dropdownNavbarItemMobile_J0Sd";var Oe=["items","className","position","onClick"];function Pe(e,t){return e.some(function(e){return function(e,t){return!!(0,Ce.ys)(e.to,t)||!!he(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t)})}function Ne(e){var t=e.collapsed,n=e.onClick;return(0,c.jsx)("button",{"aria-label":t?(0,s.T)({id:"theme.navbar.mobileDropdown.collapseButton.expandAriaLabel",message:"Expand the dropdown",description:"The ARIA label of the button to expand the mobile dropdown navbar item"}):(0,s.T)({id:"theme.navbar.mobileDropdown.collapseButton.collapseAriaLabel",message:"Collapse the dropdown",description:"The ARIA label of the button to collapse the mobile dropdown navbar item"}),"aria-expanded":!t,type:"button",className:"clean-btn menu__caret",onClick:n})}function Le(e){var t,n,o=e.items,i=e.className,s=(e.position,e.onClick),u=(0,x.A)(e,Oe),d=(n=(0,Te.A)().siteConfig.baseUrl,(0,l.zy)().pathname.replace(n,"/")),f=(0,Ce.ys)(u.to,d),p=Pe(o,d),m=function(e){var t=e.active,n=(0,Ae.u)({initialState:function(){return!t}}),a=n.collapsed,o=n.toggleCollapsed,i=n.setCollapsed;return(0,r.useEffect)(function(){t&&i(!1)},[t,i]),{collapsed:a,toggleCollapsed:o}}({active:f||p}),g=m.collapsed,h=m.toggleCollapsed,y=u.to?void 0:"#";return(0,c.jsxs)("li",{className:(0,a.A)("menu__list-item",{"menu__list-item--collapsed":g}),children:[(0,c.jsxs)("div",{className:(0,a.A)("menu__list-item-collapsible",{"menu__list-item-collapsible--active":f}),children:[(0,c.jsx)(ve,Object.assign({role:"button",className:(0,a.A)(je,"menu__link menu__link--sublist",i),href:y},u,{onClick:function(e){"#"===y&&e.preventDefault(),h()},children:null!=(t=u.children)?t:u.label})),(0,c.jsx)(Ne,{collapsed:g,onClick:function(e){e.preventDefault(),h()}})]}),(0,c.jsx)(Ae.N,{lazy:!0,as:"ul",className:"menu__list",collapsed:g,children:o.map(function(e,t){return(0,r.createElement)(ot,Object.assign({mobile:!0,isDropdownItem:!0,onClick:s,activeClassName:"menu__link--active"},e,{key:t}))})})]})}var Re=["items","position","className","onClick"];function Ie(e){var t,n=e.items,o=e.position,i=e.className,l=(e.onClick,(0,x.A)(e,Re)),s=(0,r.useRef)(null),u=(0,r.useState)(!1),d=u[0],f=u[1];return(0,r.useEffect)(function(){var e=function(e){s.current&&!s.current.contains(e.target)&&f(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),document.addEventListener("focusin",e),function(){document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e),document.removeEventListener("focusin",e)}},[s]),(0,c.jsxs)("div",{ref:s,className:(0,a.A)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===o,"dropdown--show":d}),children:[(0,c.jsx)(ve,Object.assign({"aria-haspopup":"true","aria-expanded":d,role:"button",href:l.to?void 0:"#",className:(0,a.A)("navbar__link",i)},l,{onClick:l.to?void 0:function(e){return e.preventDefault()},onKeyDown:function(e){"Enter"===e.key&&(e.preventDefault(),f(!d))},children:null!=(t=l.children)?t:l.label})),(0,c.jsx)("ul",{className:"dropdown__menu",children:n.map(function(e,t){return(0,r.createElement)(ot,Object.assign({isDropdownItem:!0,activeClassName:"dropdown__link--active"},e,{key:t}))})})]})}var Fe=["mobile"];function De(e){var t=e.mobile,n=void 0!==t&&t,r=(0,x.A)(e,Fe),a=n?Le:Ie;return(0,c.jsx)(a,Object.assign({},r))}var ze=n(2131),Me=n(7485),Be=["width","height"];function Ue(e){var t=e.width,n=void 0===t?20:t,r=e.height,a=void 0===r?20:r,o=(0,x.A)(e,Be);return(0,c.jsx)("svg",Object.assign({viewBox:"0 0 24 24",width:n,height:a,"aria-hidden":!0},o,{children:(0,c.jsx)("path",{fill:"currentColor",d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"})}))}const $e="iconLanguage_nlXk";var He=["mobile","dropdownItemsBefore","dropdownItemsAfter","queryString"];function Ve(){var e=(0,Te.A)(),t=e.siteConfig,n=e.i18n.localeConfigs,r=(0,ze.o)(),a=(0,Me.Hl)(function(e){return e.location.search}),o=(0,Me.Hl)(function(e){return e.location.hash}),i=function(e){var t=n[e];if(!t)throw new Error("Docusaurus bug, no locale config found for locale="+e);return t};return{getURL:function(e,n){var l=(0,Me.jy)([a,n.queryString],"append");return""+function(e){return i(e).url===t.url?"pathname://"+r.createUrl({locale:e,fullyQualified:!1}):r.createUrl({locale:e,fullyQualified:!0})}(e)+l+o},getLabel:function(e){return i(e).label},getLang:function(e){return i(e).htmlLang}}}const We=function(){return null},qe="navbarSearchContainer_Bca1";function Ge(e){var t=e.children,n=e.className;return(0,c.jsx)("div",{className:(0,a.A)(n,qe),children:t})}var Qe=n(4070),Ye=n(4718),Ke=["docId","label","docsPluginId"];var Ze=["sidebarId","label","docsPluginId"];var Xe=["label","to","docsPluginId"];var Je=n(3886),et=["mobile","docsPluginId","dropdownActiveClassDisabled","dropdownItemsBefore","dropdownItemsAfter","versions"];function tt(e){var t=e.docsPluginId,n=e.configs;return function(e,t){if(t){var n=new Map(e.map(function(e){return[e.name,e]})),r=function(t,r){var a,o=n.get(t);if(!o)throw new Error("No docs version exist for name '"+t+"', please verify your 'docsVersionDropdown' navbar item versions config.\nAvailable version names:\n- "+e.map(function(e){return""+e.name}).join("\n- "));return{version:o,label:null!=(a=null==r?void 0:r.label)?a:o.label}};return Array.isArray(t)?t.map(function(e){return r(e,void 0)}):Object.entries(t).map(function(e){var t=e[0],n=e[1];return r(t,n)})}return e.map(function(e){return{version:e,label:e.label}})}((0,Qe.jh)(t),n)}function nt(e,t){var n;return null!=(n=t.alternateDocVersions[e.name])?n:function(e){return e.docs.find(function(t){return t.id===e.mainDocId})}(e)}const rt={default:_e,localeDropdown:function(e){var t=e.mobile,n=e.dropdownItemsBefore,r=e.dropdownItemsAfter,a=e.queryString,o=(0,x.A)(e,He),i=Ve(),l=(0,Te.A)().i18n,u=l.currentLocale,d=l.locales.map(function(e){return{label:i.getLabel(e),lang:i.getLang(e),to:i.getURL(e,{queryString:a}),target:"_self",autoAddBaseUrl:!1,className:e===u?t?"menu__link--active":"dropdown__link--active":""}}),f=[].concat(n,d,r),p=t?(0,s.T)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):i.getLabel(u);return(0,c.jsx)(De,Object.assign({},o,{mobile:t,label:(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(Ue,{className:$e}),p]}),items:f}))},search:function(e){var t=e.mobile,n=e.className;return t?null:(0,c.jsx)(Ge,{className:n,children:(0,c.jsx)(We,{})})},dropdown:De,html:function(e){var t=e.value,n=e.className,r=e.mobile,o=void 0!==r&&r,i=e.isDropdownItem,l=void 0!==i&&i,s=l?"li":"div";return(0,c.jsx)(s,{className:(0,a.A)({navbar__item:!o&&!l,"menu__list-item":o},n),dangerouslySetInnerHTML:{__html:t}})},doc:function(e){var t=e.docId,n=e.label,r=e.docsPluginId,a=(0,x.A)(e,Ke),o=(0,Qe.zK)(r).activeDoc,i=(0,Ye.QB)(t,r),l=(null==o?void 0:o.path)===(null==i?void 0:i.path);return null===i||i.unlisted&&!l?null:(0,c.jsx)(_e,Object.assign({exact:!0},a,{isActive:function(){return l||!(null==o||!o.sidebar)&&o.sidebar===i.sidebar},label:null!=n?n:i.id,to:i.path}))},docSidebar:function(e){var t=e.sidebarId,n=e.label,r=e.docsPluginId,a=(0,x.A)(e,Ze),o=(0,Qe.zK)(r).activeDoc,i=(0,Ye.fW)(t,r).link;if(!i)throw new Error('DocSidebarNavbarItem: Sidebar with ID "'+t+"\" doesn't have anything to be linked to.");return(0,c.jsx)(_e,Object.assign({exact:!0},a,{isActive:function(){return(null==o?void 0:o.sidebar)===t},label:null!=n?n:i.label,to:i.path}))},docsVersion:function(e){var t=e.label,n=e.to,r=e.docsPluginId,a=(0,x.A)(e,Xe),o=(0,Ye.Vd)(r)[0],i=null!=t?t:o.label,l=null!=n?n:function(e){return e.docs.find(function(t){return t.id===e.mainDocId})}(o).path;return(0,c.jsx)(_e,Object.assign({},a,{label:i,to:l}))},docsVersionDropdown:function(e){var t=e.mobile,n=e.docsPluginId,r=e.dropdownActiveClassDisabled,a=e.dropdownItemsBefore,o=e.dropdownItemsAfter,i=e.versions,l=(0,x.A)(e,et),u=(0,Me.Hl)(function(e){return e.location.search}),d=(0,Me.Hl)(function(e){return e.location.hash}),f=(0,Qe.zK)(n),p=(0,Je.g1)(n).savePreferredVersionName,m=tt({docsPluginId:n,configs:i}),g=function(e){var t,n=e.docsPluginId,r=e.versionItems;return null!=(t=(0,Ye.Vd)(n).map(function(e){return r.find(function(t){return t.version===e})}).filter(function(e){return void 0!==e})[0])?t:r[0]}({docsPluginId:n,versionItems:m}),h=[].concat(a,m.map(function(e){var t=e.version;return{label:e.label,to:""+nt(t,f).path+u+d,isActive:function(){return t===f.activeVersion},onClick:function(){return p(t.name)}}}),o),y=t&&h.length>1?(0,s.T)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):g.label,b=t&&h.length>1?void 0:nt(g.version,f).path;return h.length<=1?(0,c.jsx)(_e,Object.assign({},l,{mobile:t,label:y,to:b,isActive:r?function(){return!1}:void 0})):(0,c.jsx)(De,Object.assign({},l,{mobile:t,label:y,to:b,items:h,isActive:r?function(){return!1}:void 0}))}};var at=["type"];function ot(e){var t=e.type,n=(0,x.A)(e,at),r=function(e,t){return e&&"default"!==e?e:"items"in t?"dropdown":"default"}(t,n),a=rt[r];if(!a)throw new Error('No NavbarItem component found for type "'+t+'".');return(0,c.jsx)(a,Object.assign({},n))}function it(){var e=(0,R.M)(),t=(0,w.p)().navbar.items;return(0,c.jsx)("ul",{className:"menu__list",children:t.map(function(t,n){return(0,r.createElement)(ot,Object.assign({mobile:!0},t,{onClick:function(){return e.toggle()},key:n}))})})}function lt(e){return(0,c.jsx)("button",Object.assign({},e,{type:"button",className:"clean-btn navbar-sidebar__back",children:(0,c.jsx)(s.A,{id:"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel",description:"The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)",children:"\u2190 Back to main menu"})}))}function st(){var e=0===(0,w.p)().navbar.items.length,t=U();return(0,c.jsxs)(c.Fragment,{children:[!e&&(0,c.jsx)(lt,{onClick:function(){return t.hide()}}),t.content]})}function ut(){var e,t=(0,R.M)();return void 0===(e=t.shown)&&(e=!0),(0,r.useEffect)(function(){return document.body.style.overflow=e?"hidden":"visible",function(){document.body.style.overflow="visible"}},[e]),t.shouldRender?(0,c.jsx)(H,{header:(0,c.jsx)(fe,{}),primaryMenu:(0,c.jsx)(it,{}),secondaryMenu:(0,c.jsx)(st,{})}):null}const ct="navbarHideable_m1mJ",dt="navbarHidden_jGov";function ft(e){return(0,c.jsx)("div",Object.assign({role:"presentation"},e,{className:(0,a.A)("navbar-sidebar__backdrop",e.className)}))}function pt(e){var t=e.children,n=(0,w.p)().navbar,o=n.hideOnScroll,i=n.style,l=(0,R.M)(),d=function(e){var t=(0,r.useState)(e),n=t[0],a=t[1],o=(0,r.useRef)(!1),i=(0,r.useRef)(0),l=(0,r.useCallback)(function(e){null!==e&&(i.current=e.getBoundingClientRect().height)},[]);return(0,I.Mq)(function(t,n){var r=t.scrollY;if(e)if(r=l?a(!1):r+u0&&(0,c.jsx)(Pt,{links:n}),logo:r&&(0,c.jsx)(It,{logo:r}),copyright:t&&(0,c.jsx)(Ft,{copyright:t})})}const Mt=r.memo(zt);var Bt=(0,F.fM)([V.a,k.o,I.Tv,Je.VQ,i.Jx,function(e){var t=e.children;return(0,c.jsx)(D.y_,{children:(0,c.jsx)(R.e,{children:(0,c.jsx)(M,{children:t})})})}]);function Ut(e){var t=e.children;return(0,c.jsx)(Bt,{children:t})}var $t=n(1107);function Ht(e){var t=e.error,n=e.tryAgain;return(0,c.jsx)("main",{className:"container margin-vert--xl",children:(0,c.jsx)("div",{className:"row",children:(0,c.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,c.jsx)($t.A,{as:"h1",className:"hero__title",children:(0,c.jsx)(s.A,{id:"theme.ErrorPageContent.title",description:"The title of the fallback page when the page crashed",children:"This page crashed."})}),(0,c.jsx)("div",{className:"margin-vert--lg",children:(0,c.jsx)(mt.a2,{onClick:n,className:"button button--primary shadow--lw"})}),(0,c.jsx)("hr",{}),(0,c.jsx)("div",{className:"margin-vert--md",children:(0,c.jsx)(mt.bq,{error:t})})]})})})}const Vt="mainWrapper_z2l0";function Wt(e){var t=e.children,n=e.noFooter,r=e.wrapperClassName,l=e.title,s=e.description;return(0,y.J)(),(0,c.jsxs)(Ut,{children:[(0,c.jsx)(i.be,{title:l,description:s}),(0,c.jsx)(v,{}),(0,c.jsx)(L,{}),(0,c.jsx)(xt,{}),(0,c.jsx)("div",{id:d,className:(0,a.A)(h.G.layout.main.container,h.G.wrapper.main,Vt,r),children:(0,c.jsx)(o.A,{fallback:function(e){return(0,c.jsx)(Ht,Object.assign({},e))},children:t})}),!n&&(0,c.jsx)(Mt,{})]})}},3465(e,t,n){"use strict";n.d(t,{A:()=>f});var r=n(8587),a=(n(6540),n(8774)),o=n(6025),i=n(4586),l=n(6342),s=n(1122),u=n(4848),c=["imageClassName","titleClassName"];function d(e){var t=e.logo,n=e.alt,r=e.imageClassName,a={light:(0,o.Ay)(t.src),dark:(0,o.Ay)(t.srcDark||t.src)},i=(0,u.jsx)(s.A,{className:t.className,sources:a,height:t.height,width:t.width,alt:n,style:t.style});return r?(0,u.jsx)("div",{className:r,children:i}):i}function f(e){var t,n=(0,i.A)().siteConfig.title,s=(0,l.p)().navbar,f=s.title,p=s.logo,m=e.imageClassName,g=e.titleClassName,h=(0,r.A)(e,c),y=(0,o.Ay)((null==p?void 0:p.href)||"/"),b=f?"":n,v=null!=(t=null==p?void 0:p.alt)?t:b;return(0,u.jsxs)(a.A,Object.assign({to:y},h,(null==p?void 0:p.target)&&{target:p.target},{children:[p&&(0,u.jsx)(d,{logo:p,alt:v,imageClassName:m}),null!=f&&(0,u.jsx)("b",{className:g,children:f})]}))}},1463(e,t,n){"use strict";n.d(t,{A:()=>o});n(6540);var r=n(5260),a=n(4848);function o(e){var t=e.locale,n=e.version,o=e.tag,i=t;return(0,a.jsxs)(r.A,{children:[t&&(0,a.jsx)("meta",{name:"docusaurus_locale",content:t}),n&&(0,a.jsx)("meta",{name:"docusaurus_version",content:n}),o&&(0,a.jsx)("meta",{name:"docusaurus_tag",content:o}),i&&(0,a.jsx)("meta",{name:"docsearch:language",content:i}),n&&(0,a.jsx)("meta",{name:"docsearch:version",content:n}),o&&(0,a.jsx)("meta",{name:"docsearch:docusaurus_tag",content:o})]})}},1122(e,t,n){"use strict";n.d(t,{A:()=>f});var r=n(8587),a=n(6540),o=n(4164),i=n(2303),l=n(5293);const s={themedComponent:"themedComponent_mlkZ","themedComponent--light":"themedComponent--light_NVdE","themedComponent--dark":"themedComponent--dark_xIcU"};var u=n(4848);function c(e){var t=e.className,n=e.children,r=(0,i.A)(),c=(0,l.G)().colorMode;return(0,u.jsx)(u.Fragment,{children:(r?"dark"===c?["dark"]:["light"]:["light","dark"]).map(function(e){var r=n({theme:e,className:(0,o.A)(t,s.themedComponent,s["themedComponent--"+e])});return(0,u.jsx)(a.Fragment,{children:r},e)})})}var d=["sources","className","alt"];function f(e){var t=e.sources,n=e.className,a=e.alt,o=(0,r.A)(e,d);return(0,u.jsx)(c,{className:n,children:function(e){var n=e.theme,r=e.className;return(0,u.jsx)("img",Object.assign({src:t[n],alt:a,className:r},o))}})}},1422(e,t,n){"use strict";n.d(t,{N:()=>y,u:()=>c});var r=n(8587),a=n(6540),o=n(205),i=n(3109),l=n(4848),s=["collapsed"],u=["lazy"];function c(e){var t=e.initialState,n=(0,a.useState)(null!=t&&t),r=n[0],o=n[1],i=(0,a.useCallback)(function(){o(function(e){return!e})},[]);return{collapsed:r,setCollapsed:o,toggleCollapsed:i}}var d={display:"none",overflow:"hidden",height:"0px"},f={display:"block",overflow:"visible",height:"auto"};function p(e,t){var n=t?d:f;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function m(e){var t=e.collapsibleRef,n=e.collapsed,r=e.animation,o=(0,a.useRef)(!1);(0,a.useEffect)(function(){var e,a=t.current;function l(){var e,t,n=a.scrollHeight,o=null!=(e=null==r?void 0:r.duration)?e:function(e){if((0,i.O)())return 1;var t=e/36;return Math.round(10*(4+15*Math.pow(t,.25)+t/5))}(n);return{transition:"height "+o+"ms "+(null!=(t=null==r?void 0:r.easing)?t:"ease-in-out"),height:n+"px"}}function s(){var e=l();a.style.transition=e.transition,a.style.height=e.height}if(!o.current)return p(a,n),void(o.current=!0);return a.style.willChange="height",e=requestAnimationFrame(function(){n?(s(),requestAnimationFrame(function(){a.style.height=d.height,a.style.overflow=d.overflow})):(a.style.display="block",requestAnimationFrame(function(){s()}))}),function(){return cancelAnimationFrame(e)}},[t,n,r])}function g(e){var t=e.as,n=void 0===t?"div":t,r=e.collapsed,o=e.children,i=e.animation,s=e.onCollapseTransitionEnd,u=e.className,c=(0,a.useRef)(null);return m({collapsibleRef:c,collapsed:r,animation:i}),(0,l.jsx)(n,{ref:c,onTransitionEnd:function(e){"height"===e.propertyName&&(p(c.current,r),null==s||s(r))},className:u,children:o})}function h(e){var t=e.collapsed,n=(0,r.A)(e,s),i=(0,a.useState)(!t),u=i[0],c=i[1],d=(0,a.useState)(t),f=d[0],p=d[1];return(0,o.A)(function(){t||c(!0)},[t]),(0,o.A)(function(){u&&p(t)},[u,t]),u?(0,l.jsx)(g,Object.assign({},n,{collapsed:f})):null}function y(e){var t=e.lazy,n=(0,r.A)(e,u),a=t?h:g;return(0,l.jsx)(a,Object.assign({},n))}},5041(e,t,n){"use strict";n.d(t,{M:()=>g,o:()=>m});var r=n(6540),a=n(2303),o=n(679),i=n(3807),l=n(6342),s=n(4848),u=(0,o.Wf)("docusaurus.announcement.dismiss"),c=(0,o.Wf)("docusaurus.announcement.id"),d=function(){return"true"===u.get()},f=function(e){return u.set(String(e))},p=r.createContext(null);function m(e){var t=e.children,n=function(){var e=(0,l.p)().announcementBar,t=(0,a.A)(),n=(0,r.useState)(function(){return!!t&&d()}),o=n[0],i=n[1];(0,r.useEffect)(function(){i(d())},[]);var s=(0,r.useCallback)(function(){f(!0),i(!0)},[]);return(0,r.useEffect)(function(){if(e){var t=e.id,n=c.get();"annoucement-bar"===n&&(n="announcement-bar");var r=t!==n;c.set(t),r&&f(!1),!r&&d()||i(!1)}},[e]),(0,r.useMemo)(function(){return{isActive:!!e&&!o,close:s}},[e,o,s])}();return(0,s.jsx)(p.Provider,{value:n,children:t})}function g(){var e=(0,r.useContext)(p);if(!e)throw new i.dV("AnnouncementBarProvider");return e}},5293(e,t,n){"use strict";n.d(t,{G:()=>x,a:()=>k});var r=n(6540),a=n(2303),o=n(3807),i=n(679),l=n(6342),s=n(4848);function u(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function c(e){return t="(prefers-color-scheme: dark)",n=function(){return e(u())},(r=window.matchMedia(t)).addEventListener("change",n),function(){return r.removeEventListener("change",n)};var t,n,r}var d=r.createContext(void 0),f=(0,i.Wf)("theme"),p="system",m=function(e){return"dark"===e?"dark":"light"},g=function(e){return null===e||e===p?null:m(e)},h=function(){return m(document.documentElement.getAttribute("data-theme"))},y=function(e){document.documentElement.setAttribute("data-theme",m(e))},b=function(){return g(document.documentElement.getAttribute("data-theme-choice"))},v=function(e){var t;document.documentElement.setAttribute("data-theme-choice",null!=(t=g(e))?t:p)};function w(){var e=(0,l.p)().colorMode,t=e.defaultMode,n=e.disableSwitch,o=e.respectPrefersColorScheme,i=function(){var e=(0,l.p)().colorMode.defaultMode,t=(0,a.A)(),n=(0,r.useState)(t?h():e),o=n[0],i=n[1],s=(0,r.useState)(t?b():null),u=s[0],c=s[1];return(0,r.useEffect)(function(){i(h()),c(b())},[]),{colorMode:o,setColorModeState:i,colorModeChoice:u,setColorModeChoiceState:c}}(),s=i.colorMode,d=i.setColorModeState,p=i.colorModeChoice,w=i.setColorModeChoiceState;(0,r.useEffect)(function(){n&&f.del()},[n]);var k=(0,r.useCallback)(function(e,n){void 0===n&&(n={});var r=n.persist,a=void 0===r||r;if(null===e){var i=o?u():t;y(i),d(i),v(null),w(null)}else y(e),v(e),d(e),w(e);a&&function(e){null===e?f.del():f.set(m(e))}(e)},[d,w,o,t]);return(0,r.useEffect)(function(){return f.listen(function(e){k(g(e.newValue))})},[k]),(0,r.useEffect)(function(){if(null===p&&o)return c(function(e){d(e),y(e)})},[o,p,d]),(0,r.useMemo)(function(){return{colorMode:s,colorModeChoice:p,setColorMode:k,get isDarkTheme(){return"dark"===s},setLightTheme:function(){k("light")},setDarkTheme:function(){k("dark")}}},[s,p,k])}function k(e){var t=e.children,n=w();return(0,s.jsx)(d.Provider,{value:n,children:t})}function x(){var e=(0,r.useContext)(d);if(null==e)throw new o.dV("ColorModeProvider","Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.");return e}},2069(e,t,n){"use strict";n.d(t,{M:()=>m,e:()=>p});var r=n(6540),a=n(5600),o=n(4581),i=n(7485),l=n(6342),s=n(3807),u=n(4848),c=r.createContext(void 0);function d(){var e,t=(e=(0,a.YL)(),0===(0,l.p)().navbar.items.length&&!e.component),n=(0,o.l)(),i=!t&&"mobile"===n,s=(0,r.useState)(!1),u=s[0],c=s[1],d=(0,r.useCallback)(function(){c(function(e){return!e})},[]);return(0,r.useEffect)(function(){"desktop"===n&&c(!1)},[n]),(0,r.useMemo)(function(){return{disabled:t,shouldRender:i,toggle:d,shown:u}},[t,i,d,u])}function f(e){var t=e.handler;return(0,i.$Z)(t),null}function p(e){var t=e.children,n=d();return(0,u.jsxs)(u.Fragment,{children:[n.shown&&(0,u.jsx)(f,{handler:function(){return n.toggle(),!1}}),(0,u.jsx)(c.Provider,{value:n,children:t})]})}function m(){var e=r.useContext(c);if(void 0===e)throw new s.dV("NavbarMobileSidebarProvider");return e}},5600(e,t,n){"use strict";n.d(t,{GX:()=>u,YL:()=>s,y_:()=>l});var r=n(6540),a=n(3807),o=n(4848),i=r.createContext(null);function l(e){var t=e.children,n=(0,r.useState)({component:null,props:null});return(0,o.jsx)(i.Provider,{value:n,children:t})}function s(){var e=(0,r.useContext)(i);if(!e)throw new a.dV("NavbarSecondaryMenuContentProvider");return e[0]}function u(e){var t=e.component,n=e.props,o=(0,r.useContext)(i);if(!o)throw new a.dV("NavbarSecondaryMenuContentProvider");var l=o[1],s=(0,a.Be)(n);return(0,r.useEffect)(function(){l({component:t,props:s})},[l,t,s]),(0,r.useEffect)(function(){return function(){return l({component:null,props:null})}},[l]),null}},4090(e,t,n){"use strict";n.d(t,{w:()=>a,J:()=>o});var r=n(6540),a="navigation-with-keyboard";function o(){(0,r.useEffect)(function(){function e(e){"keydown"===e.type&&"Tab"===e.key&&document.body.classList.add(a),"mousedown"===e.type&&document.body.classList.remove(a)}return document.addEventListener("keydown",e),document.addEventListener("mousedown",e),function(){document.body.classList.remove(a),document.removeEventListener("keydown",e),document.removeEventListener("mousedown",e)}},[])}},4581(e,t,n){"use strict";n.d(t,{l:()=>l});var r=n(6540),a=n(8193),o="desktop",i="mobile";function l(e){var t=(void 0===e?{}:e).desktopBreakpoint,n=void 0===t?996:t,l=(0,r.useState)(function(){return"ssr"}),s=l[0],u=l[1];return(0,r.useEffect)(function(){function e(){u(function(e){if(!a.A.canUseDOM)throw new Error("getWindowSize() should only be called after React hydration");return window.innerWidth>e?o:i}(n))}return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}},[n]),s}},7559(e,t,n){"use strict";n.d(t,{G:()=>r});var r={page:{blogListPage:"blog-list-page",blogPostPage:"blog-post-page",blogTagsListPage:"blog-tags-list-page",blogTagPostListPage:"blog-tags-post-list-page",blogAuthorsListPage:"blog-authors-list-page",blogAuthorsPostsPage:"blog-authors-posts-page",docsDocPage:"docs-doc-page",docsTagsListPage:"docs-tags-list-page",docsTagDocListPage:"docs-tags-doc-list-page",mdxPage:"mdx-page"},wrapper:{main:"main-wrapper",blogPages:"blog-wrapper",docsPages:"docs-wrapper",mdxPages:"mdx-wrapper"},common:{editThisPage:"theme-edit-this-page",lastUpdated:"theme-last-updated",backToTopButton:"theme-back-to-top-button",codeBlock:"theme-code-block",admonition:"theme-admonition",unlistedBanner:"theme-unlisted-banner",draftBanner:"theme-draft-banner",admonitionType:function(e){return"theme-admonition-"+e}},announcementBar:{container:"theme-announcement-bar"},tabs:{container:"theme-tabs-container"},layout:{navbar:{container:"theme-layout-navbar",containerLeft:"theme-layout-navbar-left",containerRight:"theme-layout-navbar-right",mobileSidebar:{container:"theme-layout-navbar-sidebar",panel:"theme-layout-navbar-sidebar-panel"}},main:{container:"theme-layout-main"},footer:{container:"theme-layout-footer",column:"theme-layout-footer-column"}},docs:{docVersionBanner:"theme-doc-version-banner",docVersionBadge:"theme-doc-version-badge",docBreadcrumbs:"theme-doc-breadcrumbs",docMarkdown:"theme-doc-markdown",docTocMobile:"theme-doc-toc-mobile",docTocDesktop:"theme-doc-toc-desktop",docFooter:"theme-doc-footer",docFooterTagsRow:"theme-doc-footer-tags-row",docFooterEditMetaRow:"theme-doc-footer-edit-meta-row",docSidebarContainer:"theme-doc-sidebar-container",docSidebarMenu:"theme-doc-sidebar-menu",docSidebarItemCategory:"theme-doc-sidebar-item-category",docSidebarItemLink:"theme-doc-sidebar-item-link",docSidebarItemCategoryLevel:function(e){return"theme-doc-sidebar-item-category-level-"+e},docSidebarItemLinkLevel:function(e){return"theme-doc-sidebar-item-link-level-"+e}},blog:{blogFooterTagsRow:"theme-blog-footer-tags-row",blogFooterEditMetaRow:"theme-blog-footer-edit-meta-row"},pages:{pageFooterEditMetaRow:"theme-pages-footer-edit-meta-row"}}},3109(e,t,n){"use strict";function r(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}n.d(t,{O:()=>r})},3535(e,t,n){"use strict";n.d(t,{v:()=>i});var r=n(6342);const a="anchorTargetStickyNavbar_Vzrq",o="anchorTargetHideOnScrollNavbar_vjPI";function i(e){var t=(0,r.p)().navbar.hideOnScroll;if(void 0!==e)return t?o:a}},2181(e,t,n){"use strict";n.d(t,{bq:()=>f,MN:()=>d,a2:()=>c,k2:()=>p});var r=n(7387),a=n(6540),o=n(1312),i=n(440);const l="errorBoundaryError_a6uf",s="errorBoundaryFallback_VBag";var u=n(4848);function c(e){return(0,u.jsx)("button",Object.assign({type:"button"},e,{children:(0,u.jsx)(o.A,{id:"theme.ErrorPageContent.tryAgain",description:"The label of the button to try again rendering when the React error boundary captures an error",children:"Try again"})}))}function d(e){var t=e.error,n=e.tryAgain;return(0,u.jsxs)("div",{className:s,children:[(0,u.jsx)("p",{children:t.message}),(0,u.jsx)(c,{onClick:n})]})}function f(e){var t=e.error,n=(0,i.rA)(t).map(function(e){return e.message}).join("\n\nCause:\n");return(0,u.jsx)("p",{className:l,children:n})}var p=function(e){function t(){return e.apply(this,arguments)||this}(0,r.A)(t,e);var n=t.prototype;return n.componentDidCatch=function(e,t){throw this.props.onError(e,t)},n.render=function(){return this.props.children},t}(a.Component)},7485(e,t,n){"use strict";n.d(t,{$Z:()=>l,Hl:()=>s,jy:()=>u});var r=n(3845),a=n(6540),o=n(6347),i=n(3807);function l(e){!function(e){var t=(0,o.W6)(),n=(0,i._q)(e);(0,a.useEffect)(function(){return t.block(function(e,t){return n(e,t)})},[t,n])}(function(t,n){if("POP"===n)return e(t,n)})}function s(e){var t=(0,o.W6)();return(0,a.useSyncExternalStore)(t.listen,function(){return e(t)},function(){return e(Object.assign({},t,{location:Object.assign({},t.location,{search:"",hash:"",state:void 0})}))})}function u(e,t){var n=function(e,t){for(var n,a=new URLSearchParams,o=(0,r.A)(e);!(n=o()).done;)for(var i,l=n.value,s=(0,r.A)(l.entries());!(i=s()).done;){var u=i.value,c=u[0],d=u[1];"append"===t?a.append(c,d):a.set(c,d)}return a}(e.map(function(e){return new URLSearchParams(null!=e?e:"")}),t),a=n.toString();return a?"?"+a:a}},5500(e,t,n){"use strict";n.d(t,{Jx:()=>y,be:()=>m,e3:()=>h});var r=n(6540),a=n(4164),o=n(5260),i=n(6803),l=n(6025),s=n(4563),u=n(4848);function c(e){var t=e.title,n=(0,s.s$)().format(t);return(0,u.jsxs)(o.A,{children:[(0,u.jsx)("title",{children:n}),(0,u.jsx)("meta",{property:"og:title",content:n})]})}function d(e){var t=e.description;return(0,u.jsxs)(o.A,{children:[(0,u.jsx)("meta",{name:"description",content:t}),(0,u.jsx)("meta",{property:"og:description",content:t})]})}function f(e){var t=e.image,n=(0,(0,l.hH)().withBaseUrl)(t,{absolute:!0});return(0,u.jsxs)(o.A,{children:[(0,u.jsx)("meta",{property:"og:image",content:n}),(0,u.jsx)("meta",{name:"twitter:image",content:n})]})}function p(e){var t=e.keywords;return(0,u.jsx)(o.A,{children:(0,u.jsx)("meta",{name:"keywords",content:Array.isArray(t)?t.join(","):t})})}function m(e){var t=e.title,n=e.description,r=e.keywords,a=e.image,i=e.children;return(0,u.jsxs)(u.Fragment,{children:[t&&(0,u.jsx)(c,{title:t}),n&&(0,u.jsx)(d,{description:n}),r&&(0,u.jsx)(p,{keywords:r}),a&&(0,u.jsx)(f,{image:a}),i&&(0,u.jsx)(o.A,{children:i})]})}var g=r.createContext(void 0);function h(e){var t=e.className,n=e.children,i=r.useContext(g),l=(0,a.A)(i,t);return(0,u.jsxs)(g.Provider,{value:l,children:[(0,u.jsx)(o.A,{children:(0,u.jsx)("html",{className:l})}),n]})}function y(e){var t=e.children,n=(0,i.A)(),r="plugin-"+n.plugin.name.replace(/docusaurus-(?:plugin|theme)-(?:content-)?/gi,""),o="plugin-id-"+n.plugin.id;return(0,u.jsx)(h,{className:(0,a.A)(r,o),children:t})}},3807(e,t,n){"use strict";n.d(t,{dV:()=>m,fM:()=>h,_q:()=>f,ZC:()=>p,Be:()=>g});var r=n(8634),a=n(7387);function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}var i=n(3662);function l(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(l=function(){return!!e})()}function s(e){var t="function"==typeof Map?new Map:void 0;return s=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(l())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var a=new(e.bind.apply(e,r));return n&&(0,i.A)(a,n.prototype),a}(e,arguments,o(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),(0,i.A)(n,e)},s(e)}var u=n(6540),c=n(205),d=n(4848);function f(e){var t=(0,u.useRef)(e);return(0,c.A)(function(){t.current=e},[e]),(0,u.useCallback)(function(){return t.current.apply(t,arguments)},[])}function p(e){var t=(0,u.useRef)();return(0,c.A)(function(){t.current=e}),t.current}var m=function(e){function t(t,n){var a,o,i;return(i=e.call(this)||this).name="ReactContextError",i.message="Hook "+(null!=(a=null==(o=i.stack)||null==(o=o.split("\n")[1])||null==(o=o.match((0,r.A)(/at (?:\w+\.)?(\w+)/,{name:1})))?void 0:o.groups.name)?a:"")+" is called outside the <"+t+">. "+(null!=n?n:""),i}return(0,a.A)(t,e),t}(s(Error));function g(e){var t=Object.entries(e);return t.sort(function(e,t){return e[0].localeCompare(t[0])}),(0,u.useMemo)(function(){return e},t.flat())}function h(e){return function(t){var n=t.children;return(0,d.jsx)(d.Fragment,{children:e.reduceRight(function(e,t){return(0,d.jsx)(t,{children:e})},n)})}}},9169(e,t,n){"use strict";n.d(t,{Dt:()=>l,ys:()=>i});var r=n(6540),a=n(8328),o=n(4586);function i(e,t){var n=function(e){var t;return null==(t=!e||e.endsWith("/")?e:e+"/")?void 0:t.toLowerCase()};return n(e)===n(t)}function l(){var e=(0,o.A)().siteConfig.baseUrl;return(0,r.useMemo)(function(){return function(e){var t=e.baseUrl;function n(e){return e.path===t&&!0===e.exact}function r(e){return e.path===t&&!e.exact}return function e(t){if(0!==t.length)return t.find(n)||e(t.filter(r).flatMap(function(e){var t;return null!=(t=e.routes)?t:[]}))}(e.routes)}({routes:a.A,baseUrl:e})},[e])}},3104(e,t,n){"use strict";n.d(t,{Mq:()=>f,Tv:()=>u,gk:()=>p});var r=n(6540),a=n(8193),o=n(2303),i=(n(205),n(3807)),l=n(4848);var s=r.createContext(void 0);function u(e){var t,n=e.children,a=(t=(0,r.useRef)(!0),(0,r.useMemo)(function(){return{scrollEventsEnabledRef:t,enableScrollEvents:function(){t.current=!0},disableScrollEvents:function(){t.current=!1}}},[]));return(0,l.jsx)(s.Provider,{value:a,children:n})}function c(){var e=(0,r.useContext)(s);if(null==e)throw new i.dV("ScrollControllerProvider");return e}var d=function(){return a.A.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null};function f(e,t){void 0===t&&(t=[]);var n=c().scrollEventsEnabledRef,a=(0,r.useRef)(d()),o=(0,i._q)(e);(0,r.useEffect)(function(){var e=function(){if(n.current){var e=d();o(e,a.current),a.current=e}},t={passive:!0};return e(),window.addEventListener("scroll",e,t),function(){return window.removeEventListener("scroll",e,t)}},[o,n].concat(t))}function p(){var e=(0,r.useRef)(null),t=(0,o.A)()&&"smooth"===getComputedStyle(document.documentElement).scrollBehavior;return{startScroll:function(n){e.current=t?function(e){return window.scrollTo({top:e,behavior:"smooth"}),function(){}}(n):function(e){var t=null,n=document.documentElement.scrollTop>e;return function r(){var a=document.documentElement.scrollTop;(n&&a>e||!n&&au});n(6540);const r=JSON.parse('{"N":"localStorage","M":""}');var a=r.N;function o(e){var t=e.key,n=e.oldValue,r=e.newValue,a=e.storage;if(n!==r){var o=document.createEvent("StorageEvent");o.initStorageEvent("storage",!1,!1,t,n,r,window.location.href,a),window.dispatchEvent(o)}}function i(e){if(void 0===e&&(e=a),"undefined"==typeof window)throw new Error("Browser storage is not available on Node.js/Docusaurus SSR process.");if("none"===e)return null;try{return window[e]}catch(n){return t=n,l||(console.warn("Docusaurus browser storage is not available.\nPossible reasons: running Docusaurus in an iframe, in an incognito browser session, or using too strict browser privacy settings.",t),l=!0),null}var t}var l=!1;var s={get:function(){return null},set:function(){},del:function(){},listen:function(){return function(){}}};function u(e,t){var n=""+e+r.M;if("undefined"==typeof window)return function(e){function t(){throw new Error('Illegal storage API usage for storage key "'+e+'".\nDocusaurus storage APIs are not supposed to be called on the server-rendering process.\nPlease only call storage APIs in effects and event handlers.')}return{get:t,set:t,del:t,listen:t}}(n);var a=i(null==t?void 0:t.persistence);return null===a?s:{get:function(){try{return a.getItem(n)}catch(e){return console.error("Docusaurus storage error, can't get key="+n,e),null}},set:function(e){try{var t=a.getItem(n);a.setItem(n,e),o({key:n,oldValue:t,newValue:e,storage:a})}catch(r){console.error("Docusaurus storage error, can't set "+n+"="+e,r)}},del:function(){try{var e=a.getItem(n);a.removeItem(n),o({key:n,oldValue:e,newValue:null,storage:a})}catch(t){console.error("Docusaurus storage error, can't delete key="+n,t)}},listen:function(e){try{var t=function(t){t.storageArea===a&&t.key===n&&e(t)};return window.addEventListener("storage",t),function(){return window.removeEventListener("storage",t)}}catch(r){return console.error("Docusaurus storage error, can't listen for changes of key="+n,r),function(){}}}}}},4563(e,t,n){"use strict";n.d(t,{AL:()=>c,s$:()=>d});var r=n(6540),a=n(4586),o=n(6803),i=n(3807),l=n(4848),s=function(e){var t=e.title,n=e.siteTitle,r=e.titleDelimiter,a=null==t?void 0:t.trim();return a&&a!==n?a+" "+r+" "+n:n},u=(0,r.createContext)(null);function c(e){var t=e.formatter,n=e.children;return(0,l.jsx)(u.Provider,{value:t,children:n})}function d(){var e=function(){var e=(0,r.useContext)(u);if(null===e)throw new i.dV("TitleFormatterProvider");return e}(),t=(0,a.A)().siteConfig,n=t.title,l=t.titleDelimiter,c=(0,o.A)().plugin;return{format:function(t){return e({title:t,siteTitle:n,titleDelimiter:l,plugin:c,defaultFormatter:s})}}}},2131(e,t,n){"use strict";n.d(t,{o:()=>i});var r=n(4586),a=n(6347),o=n(440);function i(){var e=(0,r.A)(),t=e.siteConfig,n=t.baseUrl,i=t.trailingSlash,l=e.i18n.localeConfigs,s=(0,a.zy)().pathname,u=(0,o.Ks)(s,{trailingSlash:i,baseUrl:n}).replace(n,"");return{createUrl:function(e){var t=e.locale,n=e.fullyQualified,r=function(e){var t=l[e];if(!t)throw new Error("Unexpected Docusaurus bug, no locale config found for locale="+e);return t}(t);return""+(""+(n?r.url:""))+r.baseUrl+u}}}},5062(e,t,n){"use strict";n.d(t,{$:()=>i});var r=n(6540),a=n(6347),o=n(3807);function i(e){var t=(0,a.zy)(),n=(0,o.ZC)(t),i=(0,o._q)(e);(0,r.useEffect)(function(){n&&t!==n&&i({location:t,previousLocation:n})},[i,t,n])}},6342(e,t,n){"use strict";n.d(t,{p:()=>a});var r=n(4586);function a(){return(0,r.A)().siteConfig.themeConfig}},2983(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addTrailingSlash=a,t.default=function(e,t){var n=t.trailingSlash,r=t.baseUrl;if(e.startsWith("#"))return e;if(void 0===n)return e;var i=e.split(/[#?]/)[0],l="/"===i||i===r?i:(s=i,u=n,u?a(s):o(s));var s,u;return e.replace(i,l)},t.addLeadingSlash=function(e){return(0,r.addPrefix)(e,"/")},t.removeTrailingSlash=o;var r=n(2566);function a(e){return e.endsWith("/")?e:e+"/"}function o(e){return(0,r.removeSuffix)(e,"/")}},253(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=function e(t){if(t.cause)return[t].concat(e(t.cause));return[t]}},440(e,t,n){"use strict";t.rA=t.Ks=void 0;var r=n(1635);var a=n(2983);Object.defineProperty(t,"Ks",{enumerable:!0,get:function(){return r.__importDefault(a).default}});var o=n(2566);var i=n(253);Object.defineProperty(t,"rA",{enumerable:!0,get:function(){return i.getErrorCausalChain}})},2566(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addPrefix=function(e,t){return e.startsWith(t)?e:""+t+e},t.removeSuffix=function(e,t){if(""===t)return e;return e.endsWith(t)?e.slice(0,-t.length):e},t.addSuffix=function(e,t){return e.endsWith(t)?e:""+e+t},t.removePrefix=function(e,t){return e.startsWith(t)?e.slice(t.length):e}},1513(e,t,n){"use strict";n.d(t,{zR:()=>w,TM:()=>A,yJ:()=>p,sC:()=>T,AO:()=>f});var r=n(8168);function a(e){return"/"===e.charAt(0)}function o(e,t){for(var n=t,r=n+1,a=e.length;r=0;f--){var p=i[f];"."===p?o(i,f):".."===p?(o(i,f),d++):d&&(o(i,f),d--)}if(!u)for(;d--;d)i.unshift("..");!u||""===i[0]||i[0]&&a(i[0])||i.unshift("");var m=i.join("/");return n&&"/"!==m.substr(-1)&&(m+="/"),m};var l=n(1561);function s(e){return"/"===e.charAt(0)?e:"/"+e}function u(e){return"/"===e.charAt(0)?e.substr(1):e}function c(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function f(e){var t=e.pathname,n=e.search,r=e.hash,a=t||"/";return n&&"?"!==n&&(a+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(a+="#"===r.charAt(0)?r:"#"+r),a}function p(e,t,n,a){var o;"string"==typeof e?(o=function(e){var t=e||"/",n="",r="",a=t.indexOf("#");-1!==a&&(r=t.substr(a),t=t.substr(0,a));var o=t.indexOf("?");return-1!==o&&(n=t.substr(o),t=t.substr(0,o)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),o.state=t):(void 0===(o=(0,r.A)({},e)).pathname&&(o.pathname=""),o.search?"?"!==o.search.charAt(0)&&(o.search="?"+o.search):o.search="",o.hash?"#"!==o.hash.charAt(0)&&(o.hash="#"+o.hash):o.hash="",void 0!==t&&void 0===o.state&&(o.state=t));try{o.pathname=decodeURI(o.pathname)}catch(l){throw l instanceof URIError?new URIError('Pathname "'+o.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):l}return n&&(o.key=n),a?o.pathname?"/"!==o.pathname.charAt(0)&&(o.pathname=i(o.pathname,a.pathname)):o.pathname=a.pathname:o.pathname||(o.pathname="/"),o}function m(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,a){if(null!=e){var o="function"==typeof e?e(t,n):e;"string"==typeof o?"function"==typeof r?r(o,a):a(!0):a(!1!==o)}else a(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter(function(e){return e!==r})}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,a):n.push(a),d({action:r,location:a,index:t,entries:n})}})},replace:function(e,t){var r="REPLACE",a=p(e,t,g(),w.location);c.confirmTransitionTo(a,r,n,function(e){e&&(w.entries[w.index]=a,d({action:r,location:a}))})},go:v,goBack:function(){v(-1)},goForward:function(){v(1)},canGo:function(e){var t=w.index+e;return t>=0&&t
'};function a(e,t,n){return en?n:e}function o(e){return 100*(-1+e)}function i(e,t,n){var a;return(a="translate3d"===r.positionUsing?{transform:"translate3d("+o(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+o(e)+"%,0)"}:{"margin-left":o(e)+"%"}).transition="all "+t+"ms "+n,a}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=a(e,r.minimum,1),n.status=1===e?null:e;var o=n.render(!t),u=o.querySelector(r.barSelector),c=r.speed,d=r.easing;return o.offsetWidth,l(function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),s(u,i(e,c,d)),1===e?(s(o,{transition:"none",opacity:1}),o.offsetWidth,setTimeout(function(){s(o,{transition:"all "+c+"ms linear",opacity:0}),setTimeout(function(){n.remove(),t()},c)},c)):setTimeout(t,c)}),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout(function(){n.status&&(n.trickle(),e())},r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*a(Math.random()*t,.1,.95)),t=a(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always(function(){0===--t?(e=0,n.done()):n.set((e-t)/e)}),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");c(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var a,i=t.querySelector(r.barSelector),l=e?"-100":o(n.status||0),u=document.querySelector(r.parent);return s(i,{transition:"all 0 linear",transform:"translate3d("+l+"%,0,0)"}),r.showSpinner||(a=t.querySelector(r.spinnerSelector))&&p(a),u!=document.body&&c(u,"nprogress-custom-parent"),u.appendChild(t),t},n.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&p(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var l=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),s=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(e,t){return t.toUpperCase()})}function r(t){var n=document.body.style;if(t in n)return t;for(var r,a=e.length,o=t.charAt(0).toUpperCase()+t.slice(1);a--;)if((r=e[a]+o)in n)return r;return t}function a(e){return e=n(e),t[e]||(t[e]=r(e))}function o(e,t,n){t=a(t),e.style[t]=n}return function(e,t){var n,r,a=arguments;if(2==a.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&o(e,n,r);else o(e,a[1],a[2])}}();function u(e,t){return("string"==typeof e?e:f(e)).indexOf(" "+t+" ")>=0}function c(e,t){var n=f(e),r=n+t;u(n,t)||(e.className=r.substring(1))}function d(e,t){var n,r=f(e);u(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function f(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function p(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n},void 0===(a="function"==typeof r?r.call(t,n,t,e):r)||(e.exports=a)},5302(e,t,n){var r=n(4634);e.exports=g,e.exports.parse=o,e.exports.compile=function(e,t){return u(o(e,t),t)},e.exports.tokensToFunction=u,e.exports.tokensToRegExp=m;var a=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function o(e,t){for(var n,r=[],o=0,l=0,s="",u=t&&t.delimiter||"/";null!=(n=a.exec(e));){var c=n[0],f=n[1],p=n.index;if(s+=e.slice(l,p),l=p+c.length,f)s+=f[1];else{var m=e[l],g=n[2],h=n[3],y=n[4],b=n[5],v=n[6],w=n[7];s&&(r.push(s),s="");var k=null!=g&&null!=m&&m!==g,x="+"===v||"*"===v,S="?"===v||"*"===v,E=g||u,_=y||b,A=g||("string"==typeof r[r.length-1]?r[r.length-1]:"");r.push({name:h||o++,prefix:g||"",delimiter:E,optional:S,repeat:x,partial:k,asterisk:!!w,pattern:_?d(_):w?".*":i(E,A)})}}return l-1?"[^"+c(e)+"]+?":c(t)+"|(?:(?!"+c(t)+")[^"+c(e)+"])+?"}function l(e){return encodeURI(e).replace(/[\/?#]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function s(e){return encodeURI(e).replace(/[?#]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function u(e,t){for(var n=new Array(e.length),a=0;a[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/}},9700(){!function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,a,o){if(n.language===r){var i=n.tokenStack=[];n.code=n.code.replace(a,function(e){if("function"==typeof o&&!o(e))return e;for(var a,l=i.length;-1!==n.code.indexOf(a=t(r,l));)++l;return i[l]=e,a}),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var a=0,o=Object.keys(n.tokenStack);!function i(l){for(var s=0;s=o.length);s++){var u=l[s];if("string"==typeof u||u.content&&"string"==typeof u.content){var c=o[a],d=n.tokenStack[c],f="string"==typeof u?u:u.content,p=t(r,c),m=f.indexOf(p);if(m>-1){++a;var g=f.substring(0,m),h=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),y=f.substring(m+p.length),b=[];g&&b.push.apply(b,i([g])),b.push(h),y&&b.push.apply(b,i([y])),"string"==typeof u?l.splice.apply(l,[s,1].concat(b)):u.content=b}}else u.content&&i(u.content)}return l}(n.tokens)}}}})}(Prism)},3890(e,t,n){var r={"./prism-lua":64};function a(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}a.keys=function(){return Object.keys(r)},a.resolve=o,e.exports=a,a.id=3890},2694(e,t,n){"use strict";var r=n(6925);function a(){}function o(){}o.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,o,i){if(i!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:a};return n.PropTypes=n,n}},5556(e,t,n){e.exports=n(2694)()},6925(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},1247(e,t,n){"use strict";var r=n(9982),a=n(6540),o=n(961);function i(e){var t="https://react.dev/errors/"+e;if(1z||(e.current=D[z],D[z]=null,z--)}function U(e,t){z++,D[z]=e.current,e.current=t}var $,H,V=M(null),W=M(null),q=M(null),G=M(null);function Q(e,t){switch(U(q,t),U(W,e),U(V,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?yd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)e=bd(t=yd(t),e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(V),U(V,e)}function Y(){B(V),B(W),B(q)}function K(e){null!==e.memoizedState&&U(G,e);var t=V.current,n=bd(t,e.type);t!==n&&(U(W,e),U(V,n))}function Z(e){W.current===e&&(B(V),B(W)),G.current===e&&(B(G),df._currentValue=F)}function X(e){if(void 0===$)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);$=t&&t[1]||"",H=-1)":-1--a||s[r]!==u[a]){var c="\n"+s[r].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}}while(1<=r&&0<=a);break}}}finally{J=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?X(n):""}function te(e,t){switch(e.tag){case 26:case 27:case 5:return X(e.type);case 16:return X("Lazy");case 13:return e.child!==t&&null!==t?X("Suspense Fallback"):X("Suspense");case 19:return X("SuspenseList");case 0:case 15:return ee(e.type,!1);case 11:return ee(e.type.render,!1);case 1:return ee(e.type,!0);case 31:return X("Activity");default:return""}}function ne(e){try{var t="",n=null;do{t+=te(e,n),n=e,e=e.return}while(e);return t}catch(r){return"\nError generating stack: "+r.message+"\n"+r.stack}}var re=Object.prototype.hasOwnProperty,ae=r.unstable_scheduleCallback,oe=r.unstable_cancelCallback,ie=r.unstable_shouldYield,le=r.unstable_requestPaint,se=r.unstable_now,ue=r.unstable_getCurrentPriorityLevel,ce=r.unstable_ImmediatePriority,de=r.unstable_UserBlockingPriority,fe=r.unstable_NormalPriority,pe=r.unstable_LowPriority,me=r.unstable_IdlePriority,ge=r.log,he=r.unstable_setDisableYieldValue,ye=null,be=null;function ve(e){if("function"==typeof ge&&he(e),be&&"function"==typeof be.setStrictMode)try{be.setStrictMode(ye,e)}catch(t){}}var we=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(ke(e)/xe|0)|0},ke=Math.log,xe=Math.LN2;var Se=256,Ee=262144,_e=4194304;function Ae(e){var t=42&e;if(0!==t)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return 261888&e;case 262144:case 524288:case 1048576:case 2097152:return 3932160&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ce(e,t,n){var r=e.pendingLanes;if(0===r)return 0;var a=0,o=e.suspendedLanes,i=e.pingedLanes;e=e.warmLanes;var l=134217727&r;return 0!==l?0!==(r=l&~o)?a=Ae(r):0!==(i&=l)?a=Ae(i):n||0!==(n=l&~e)&&(a=Ae(n)):0!==(l=r&~o)?a=Ae(l):0!==i?a=Ae(i):n||0!==(n=r&~e)&&(a=Ae(n)),0===a?0:0!==t&&t!==a&&0===(t&o)&&((o=a&-a)>=(n=t&-t)||32===o&&4194048&n)?t:a}function Te(e,t){return 0===(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function je(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function Oe(){var e=_e;return!(62914560&(_e<<=1))&&(_e=4194304),e}function Pe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ne(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Le(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-we(t);e.entangledLanes|=t,e.entanglements[r]=1073741824|e.entanglements[r]|261930&n}function Re(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-we(n),a=1<=An),jn=String.fromCharCode(32),On=!1;function Pn(e,t){switch(e){case"keyup":return-1!==En.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Nn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Ln=!1;var Rn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function In(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Rn[e.type]:"textarea"===t}function Fn(e,t,n,r){It?Ft?Ft.push(r):Ft=[r]:It=r,0<(t=rd(t,"onChange")).length&&(n=new nn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Dn=null,zn=null;function Mn(e){Yc(e,0)}function Bn(e){if(mt(Xe(e)))return e}function Un(e,t){if("change"===e)return t}var $n=!1;if(Ut){var Hn;if(Ut){var Vn="oninput"in document;if(!Vn){var Wn=document.createElement("div");Wn.setAttribute("oninput","return;"),Vn="function"==typeof Wn.oninput}Hn=Vn}else Hn=!1;$n=Hn&&(!document.documentMode||9=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=er(r)}}function nr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?nr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function rr(e){for(var t=gt((e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window).document);t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=gt((e=t.contentWindow).document)}return t}function ar(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var or=Ut&&"documentMode"in document&&11>=document.documentMode,ir=null,lr=null,sr=null,ur=!1;function cr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;ur||null==ir||ir!==gt(r)||("selectionStart"in(r=ir)&&ar(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},sr&&Jn(sr,r)||(sr=r,0<(r=rd(lr,"onSelect")).length&&(t=new nn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=ir)))}function dr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var fr={animationend:dr("Animation","AnimationEnd"),animationiteration:dr("Animation","AnimationIteration"),animationstart:dr("Animation","AnimationStart"),transitionrun:dr("Transition","TransitionRun"),transitionstart:dr("Transition","TransitionStart"),transitioncancel:dr("Transition","TransitionCancel"),transitionend:dr("Transition","TransitionEnd")},pr={},mr={};function gr(e){if(pr[e])return pr[e];if(!fr[e])return e;var t,n=fr[e];for(t in n)if(n.hasOwnProperty(t)&&t in mr)return pr[e]=n[t];return e}Ut&&(mr=document.createElement("div").style,"AnimationEvent"in window||(delete fr.animationend.animation,delete fr.animationiteration.animation,delete fr.animationstart.animation),"TransitionEvent"in window||delete fr.transitionend.transition);var hr=gr("animationend"),yr=gr("animationiteration"),br=gr("animationstart"),vr=gr("transitionrun"),wr=gr("transitionstart"),kr=gr("transitioncancel"),xr=gr("transitionend"),Sr=new Map,Er="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function _r(e,t){Sr.set(e,t),rt(t,[e])}Er.push("scrollEnd");var Ar="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},Cr=[],Tr=0,jr=0;function Or(){for(var e=Tr,t=jr=Tr=0;t>=i,a-=i,na=1<<32-we(t)+a|n<g?(h=d,d=null):h=d.sibling;var y=p(a,d,l[g],s);if(null===y){null===d&&(d=h);break}e&&d&&null===y.alternate&&t(a,d),i=o(y,i,g),null===c?u=y:c.sibling=y,c=y,d=h}if(g===l.length)return n(a,d),da&&aa(a,g),u;if(null===d){for(;gh?(y=g,g=null):y=g.sibling;var v=p(a,g,b.value,u);if(null===v){null===g&&(g=y);break}e&&g&&null===v.alternate&&t(a,g),l=o(v,l,h),null===d?c=v:d.sibling=v,d=v,g=y}if(b.done)return n(a,g),da&&aa(a,h),c;if(null===g){for(;!b.done;h++,b=s.next())null!==(b=f(a,b.value,u))&&(l=o(b,l,h),null===d?c=b:d.sibling=b,d=b);return da&&aa(a,h),c}for(g=r(g);!b.done;h++,b=s.next())null!==(b=m(g,a,h,b.value,u))&&(e&&null!==b.alternate&&g.delete(null===b.key?h:b.key),l=o(b,l,h),null===d?c=b:d.sibling=b,d=b);return e&&g.forEach(function(e){return t(a,e)}),da&&aa(a,h),c}(s,u,c=v.call(c),d)}if("function"==typeof c.then)return b(s,u,uo(c),d);if(c.$$typeof===k)return b(s,u,La(s,c),d);fo(s,c)}return"string"==typeof c&&""!==c||"number"==typeof c||"bigint"==typeof c?(c=""+c,null!==u&&6===u.tag?(n(s,u.sibling),(d=a(u,c)).return=s,s=d):(n(s,u),(d=Vr(c,s.mode,d)).return=s,s=d),l(s)):n(s,u)}return function(e,t,n,r){try{so=0;var a=b(e,t,n,r);return lo=null,a}catch(i){if(i===Za||i===Ja)throw i;var o=zr(29,i,null,e.mode);return o.lanes=r,o.return=e,o}}}var mo=po(!0),go=po(!1),ho=!1;function yo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function bo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function vo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function wo(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,2&pu){var a=r.pending;return null===a?t.next=t:(t.next=a.next,a.next=t),r.pending=t,t=Ir(e),Rr(e,null,n),t}return Pr(e,r,t,n),Ir(e)}function ko(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,4194048&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Re(e,n)}}function xo(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var a=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var i={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};null===o?a=o=i:o=o.next=i,n=n.next}while(null!==n);null===o?a=o=t:o=o.next=t}else a=o=t;return n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:o,shared:r.shared,callbacks:r.callbacks},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var So=!1;function Eo(){if(So){if(null!==Va)throw Va}}function _o(e,t,n,r){So=!1;var a=e.updateQueue;ho=!1;var o=a.firstBaseUpdate,i=a.lastBaseUpdate,l=a.shared.pending;if(null!==l){a.shared.pending=null;var s=l,u=s.next;s.next=null,null===i?o=u:i.next=u,i=s;var c=e.alternate;null!==c&&((l=(c=c.updateQueue).lastBaseUpdate)!==i&&(null===l?c.firstBaseUpdate=u:l.next=u,c.lastBaseUpdate=s))}if(null!==o){var d=a.baseState;for(i=0,c=u=s=null,l=o;;){var f=-536870913&l.lane,m=f!==l.lane;if(m?(hu&f)===f:(r&f)===f){0!==f&&f===Ha&&(So=!0),null!==c&&(c=c.next={lane:0,tag:l.tag,payload:l.payload,callback:null,next:null});e:{var g=e,h=l;f=t;var y=n;switch(h.tag){case 1:if("function"==typeof(g=h.payload)){d=g.call(y,d,f);break e}d=g;break e;case 3:g.flags=-65537&g.flags|128;case 0:if(null==(f="function"==typeof(g=h.payload)?g.call(y,d,f):g))break e;d=p({},d,f);break e;case 2:ho=!0}}null!==(f=l.callback)&&(e.flags|=64,m&&(e.flags|=8192),null===(m=a.callbacks)?a.callbacks=[f]:m.push(f))}else m={lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},null===c?(u=c=m,s=d):c=c.next=m,i|=f;if(null===(l=l.next)){if(null===(l=a.shared.pending))break;l=(m=l).next,m.next=null,a.lastBaseUpdate=m,a.shared.pending=null}}null===c&&(s=d),a.baseState=s,a.firstBaseUpdate=u,a.lastBaseUpdate=c,null===o&&(a.shared.lanes=0),Eu|=i,e.lanes=i,e.memoizedState=d}}function Ao(e,t){if("function"!=typeof e)throw Error(i(191,e));e.call(t)}function Co(e,t){var n=e.callbacks;if(null!==n)for(e.callbacks=null,e=0;eo?o:8;var i,l,s,u=R.T,c={};R.T=c,dl(e,!1,t,n);try{var d=a(),f=R.S;if(null!==f&&f(c,d),null!==d&&"object"==typeof d&&"function"==typeof d.then)cl(e,t,(i=r,l=[],s={status:"pending",value:null,reason:null,then:function(e){l.push(e)}},d.then(function(){s.status="fulfilled",s.value=i;for(var e=0;e<\/script>",o=o.removeChild(o.firstChild);break;case"select":o="string"==typeof r.is?l.createElement("select",{is:r.is}):l.createElement("select"),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o="string"==typeof r.is?l.createElement(a,{is:r.is}):l.createElement(a)}}o[Ue]=t,o[$e]=r;e:for(l=t.child;null!==l;){if(5===l.tag||6===l.tag)o.appendChild(l.stateNode);else if(4!==l.tag&&27!==l.tag&&null!==l.child){l.child.return=l,l=l.child;continue}if(l===t)break e;for(;null===l.sibling;){if(null===l.return||l.return===t)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}t.stateNode=o;e:switch(fd(o,a,r),a){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&ls(t)}}return fs(t),ss(t,t.type,null===e||e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==r&&ls(t);else{if("string"!=typeof r&&null===t.stateNode)throw Error(i(166));if(e=q.current,ba(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,null!==(a=ua))switch(a.tag){case 27:case 5:r=a.memoizedProps}e[Ue]=t,(e=!!(e.nodeValue===n||null!==r&&!0===r.suppressHydrationWarning||ud(e.nodeValue,n)))||ga(t,!0)}else(e=hd(e).createTextNode(r))[Ue]=t,t.stateNode=e}return fs(t),null;case 31:if(n=t.memoizedState,null===e||null!==e.memoizedState){if(r=ba(t),null!==n){if(null===e){if(!r)throw Error(i(318));if(!(e=null!==(e=t.memoizedState)?e.dehydrated:null))throw Error(i(557));e[Ue]=t}else va(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;fs(t),e=!1}else n=wa(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return 256&t.flags?(Mo(t),t):(Mo(t),null);if(128&t.flags)throw Error(i(558))}return fs(t),null;case 13:if(r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(a=ba(t),null!==r&&null!==r.dehydrated){if(null===e){if(!a)throw Error(i(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(i(317));a[Ue]=t}else va(),!(128&t.flags)&&(t.memoizedState=null),t.flags|=4;fs(t),a=!1}else a=wa(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return 256&t.flags?(Mo(t),t):(Mo(t),null)}return Mo(t),128&t.flags?(t.lanes=n,t):(n=null!==r,e=null!==e&&null!==e.memoizedState,n&&(a=null,null!==(r=t.child).alternate&&null!==r.alternate.memoizedState&&null!==r.alternate.memoizedState.cachePool&&(a=r.alternate.memoizedState.cachePool.pool),o=null,null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),cs(t,t.updateQueue),fs(t),null);case 4:return Y(),null===e&&Jc(t.stateNode.containerInfo),fs(t),null;case 10:return Aa(t.type),fs(t),null;case 19:if(B(Bo),null===(r=t.memoizedState))return fs(t),null;if(a=!!(128&t.flags),null===(o=r.rendering))if(a)ds(r,!1);else{if(0!==Su||null!==e&&128&e.flags)for(e=t.child;null!==e;){if(null!==(o=Uo(e))){for(t.flags|=128,ds(r,!1),e=o.updateQueue,t.updateQueue=e,cs(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)Ur(n,e),n=n.sibling;return U(Bo,1&Bo.current|2),da&&aa(t,r.treeForkCount),t.child}e=e.sibling}null!==r.tail&&se()>Ru&&(t.flags|=128,a=!0,ds(r,!1),t.lanes=4194304)}else{if(!a)if(null!==(e=Uo(o))){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,cs(t,e),ds(r,!0),null===r.tail&&"hidden"===r.tailMode&&!o.alternate&&!da)return fs(t),null}else 2*se()-r.renderingStartTime>Ru&&536870912!==n&&(t.flags|=128,a=!0,ds(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(null!==(e=r.last)?e.sibling=o:t.child=o,r.last=o)}return null!==r.tail?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=se(),e.sibling=null,n=Bo.current,U(Bo,a?1&n|2:1&n),da&&aa(t,r.treeForkCount),e):(fs(t),null);case 22:case 23:return Mo(t),No(),r=null!==t.memoizedState,null!==e?null!==e.memoizedState!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?!!(536870912&n)&&!(128&t.flags)&&(fs(t),6&t.subtreeFlags&&(t.flags|=8192)):fs(t),null!==(n=t.updateQueue)&&cs(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),r=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),null!==e&&B(Ga),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Aa(za),fs(t),null;case 25:case 30:return null}throw Error(i(156,t.tag))}function ms(e,t){switch(la(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Aa(za),Y(),65536&(e=t.flags)&&!(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return Z(t),null;case 31:if(null!==t.memoizedState){if(Mo(t),null===t.alternate)throw Error(i(340));va()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 13:if(Mo(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(i(340));va()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return B(Bo),null;case 4:return Y(),null;case 10:return Aa(t.type),null;case 22:case 23:return Mo(t),No(),null!==e&&B(Ga),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return Aa(za),null;default:return null}}function gs(e,t){switch(la(t),t.tag){case 3:Aa(za),Y();break;case 26:case 27:case 5:Z(t);break;case 4:Y();break;case 31:null!==t.memoizedState&&Mo(t);break;case 13:Mo(t);break;case 19:B(Bo);break;case 10:Aa(t.type);break;case 22:case 23:Mo(t),No(),null!==e&&B(Ga);break;case 24:Aa(za)}}function hs(e,t){try{var n=t.updateQueue,r=null!==n?n.lastEffect:null;if(null!==r){var a=r.next;n=a;do{if((n.tag&e)===e){r=void 0;var o=n.create,i=n.inst;r=o(),i.destroy=r}n=n.next}while(n!==a)}}catch(l){Sc(t,t.return,l)}}function ys(e,t,n){try{var r=t.updateQueue,a=null!==r?r.lastEffect:null;if(null!==a){var o=a.next;r=o;do{if((r.tag&e)===e){var i=r.inst,l=i.destroy;if(void 0!==l){i.destroy=void 0,a=t;var s=n,u=l;try{u()}catch(c){Sc(a,s,c)}}}r=r.next}while(r!==o)}}catch(c){Sc(t,t.return,c)}}function bs(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{Co(t,n)}catch(r){Sc(e,e.return,r)}}}function vs(e,t,n){n.props=Sl(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){Sc(e,t,r)}}function ws(e,t){try{var n=e.ref;if(null!==n){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;default:r=e.stateNode}"function"==typeof n?e.refCleanup=n(r):n.current=r}}catch(a){Sc(e,t,a)}}function ks(e,t){var n=e.ref,r=e.refCleanup;if(null!==n)if("function"==typeof r)try{r()}catch(a){Sc(e,t,a)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"==typeof n)try{n(null)}catch(o){Sc(e,t,o)}else n.current=null}function xs(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(a){Sc(e,e.return,a)}}function Ss(e,t,n){try{var r=e.stateNode;!function(e,t,n,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,o=null,l=null,s=null,u=null,c=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&null!=f)switch(m){case"checked":case"value":break;case"defaultValue":u=f;default:r.hasOwnProperty(m)||cd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(null!=m||null!=f))switch(p){case"type":o=m;break;case"name":a=m;break;case"checked":c=m;break;case"defaultChecked":d=m;break;case"value":l=m;break;case"defaultValue":s=m;break;case"children":case"dangerouslySetInnerHTML":if(null!=m)throw Error(i(137,t));break;default:m!==f&&cd(e,t,p,m,r,f)}}return void bt(e,l,s,u,c,d,o,a);case"select":for(o in m=l=s=p=null,n)if(u=n[o],n.hasOwnProperty(o)&&null!=u)switch(o){case"value":break;case"multiple":m=u;default:r.hasOwnProperty(o)||cd(e,t,o,null,r,u)}for(a in r)if(o=r[a],u=n[a],r.hasOwnProperty(a)&&(null!=o||null!=u))switch(a){case"value":p=o;break;case"defaultValue":s=o;break;case"multiple":l=o;default:o!==u&&cd(e,t,a,o,r,u)}return t=s,n=l,r=m,void(null!=p?kt(e,!!n,p,!1):!!r!=!!n&&(null!=t?kt(e,!!n,t,!0):kt(e,!!n,n?[]:"",!1)));case"textarea":for(s in m=p=null,n)if(a=n[s],n.hasOwnProperty(s)&&null!=a&&!r.hasOwnProperty(s))switch(s){case"value":case"children":break;default:cd(e,t,s,null,r,a)}for(l in r)if(a=r[l],o=n[l],r.hasOwnProperty(l)&&(null!=a||null!=o))switch(l){case"value":p=a;break;case"defaultValue":m=a;break;case"children":break;case"dangerouslySetInnerHTML":if(null!=a)throw Error(i(91));break;default:a!==o&&cd(e,t,l,a,r,o)}return void xt(e,p,m);case"option":for(var g in n)if(p=n[g],n.hasOwnProperty(g)&&null!=p&&!r.hasOwnProperty(g))if("selected"===g)e.selected=!1;else cd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(null!=p||null!=m))if("selected"===u)e.selected=p&&"function"!=typeof p&&"symbol"!=typeof p;else cd(e,t,u,p,r,m);return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var h in n)p=n[h],n.hasOwnProperty(h)&&null!=p&&!r.hasOwnProperty(h)&&cd(e,t,h,null,r,p);for(c in r)if(p=r[c],m=n[c],r.hasOwnProperty(c)&&p!==m&&(null!=p||null!=m))switch(c){case"children":case"dangerouslySetInnerHTML":if(null!=p)throw Error(i(137,t));break;default:cd(e,t,c,p,r,m)}return;default:if(Tt(t)){for(var y in n)p=n[y],n.hasOwnProperty(y)&&void 0!==p&&!r.hasOwnProperty(y)&&dd(e,t,y,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||void 0===p&&void 0===m||dd(e,t,d,p,r,m);return}}for(var b in n)p=n[b],n.hasOwnProperty(b)&&null!=p&&!r.hasOwnProperty(b)&&cd(e,t,b,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||null==p&&null==m||cd(e,t,f,p,r,m)}(r,e.type,n,t),r[$e]=t}catch(a){Sc(e,e.return,a)}}function Es(e){return 5===e.tag||3===e.tag||26===e.tag||27===e.tag&&Ad(e.type)||4===e.tag}function _s(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Es(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(27===e.tag&&Ad(e.type))continue e;if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function As(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?(9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).insertBefore(e,t):((t=9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Nt));else if(4!==r&&(27===r&&Ad(e.type)&&(n=e.stateNode,t=null),null!==(e=e.child)))for(As(e,t,n),e=e.sibling;null!==e;)As(e,t,n),e=e.sibling}function Cs(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&(27===r&&Ad(e.type)&&(n=e.stateNode),null!==(e=e.child)))for(Cs(e,t,n),e=e.sibling;null!==e;)Cs(e,t,n),e=e.sibling}function Ts(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);fd(t,r,n),t[Ue]=e,t[$e]=n}catch(o){Sc(e,e.return,o)}}var js=!1,Os=!1,Ps=!1,Ns="function"==typeof WeakSet?WeakSet:Set,Ls=null;function Rs(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Qs(e,n),4&r&&hs(5,n);break;case 1:if(Qs(e,n),4&r)if(e=n.stateNode,null===t)try{e.componentDidMount()}catch(i){Sc(n,n.return,i)}else{var a=Sl(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(l){Sc(n,n.return,l)}}64&r&&bs(n),512&r&&ws(n,n.return);break;case 3:if(Qs(e,n),64&r&&null!==(e=n.updateQueue)){if(t=null,null!==n.child)switch(n.child.tag){case 27:case 5:case 1:t=n.child.stateNode}try{Co(e,t)}catch(i){Sc(n,n.return,i)}}break;case 27:null===t&&4&r&&Ts(n);case 26:case 5:Qs(e,n),null===t&&4&r&&xs(n),512&r&&ws(n,n.return);break;case 12:Qs(e,n);break;case 31:Qs(e,n),4&r&&Bs(e,n);break;case 13:Qs(e,n),4&r&&Us(e,n),64&r&&(null!==(e=n.memoizedState)&&(null!==(e=e.dehydrated)&&function(e,t){var n=e.ownerDocument;if("$~"===e.data)e._reactRetry=t;else if("$?"!==e.data||"loading"!==n.readyState)t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}(e,n=Cc.bind(null,n))));break;case 22:if(!(r=null!==n.memoizedState||js)){t=null!==t&&null!==t.memoizedState||Os,a=js;var o=Os;js=r,(Os=t)&&!o?Ks(e,n,!!(8772&n.subtreeFlags)):Qs(e,n),js=a,Os=o}break;case 30:break;default:Qs(e,n)}}function Is(e){var t=e.alternate;null!==t&&(e.alternate=null,Is(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&Ye(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Fs=null,Ds=!1;function zs(e,t,n){for(n=n.child;null!==n;)Ms(e,t,n),n=n.sibling}function Ms(e,t,n){if(be&&"function"==typeof be.onCommitFiberUnmount)try{be.onCommitFiberUnmount(ye,n)}catch(o){}switch(n.tag){case 26:Os||ks(n,t),zs(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode).parentNode.removeChild(n);break;case 27:Os||ks(n,t);var r=Fs,a=Ds;Ad(n.type)&&(Fs=n.stateNode,Ds=!1),zs(e,t,n),zd(n.stateNode),Fs=r,Ds=a;break;case 5:Os||ks(n,t);case 6:if(r=Fs,a=Ds,Fs=null,zs(e,t,n),Ds=a,null!==(Fs=r))if(Ds)try{(9===Fs.nodeType?Fs.body:"HTML"===Fs.nodeName?Fs.ownerDocument.body:Fs).removeChild(n.stateNode)}catch(i){Sc(n,t,i)}else try{Fs.removeChild(n.stateNode)}catch(i){Sc(n,t,i)}break;case 18:null!==Fs&&(Ds?(Cd(9===(e=Fs).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e,n.stateNode),Wf(e)):Cd(Fs,n.stateNode));break;case 4:r=Fs,a=Ds,Fs=n.stateNode.containerInfo,Ds=!0,zs(e,t,n),Fs=r,Ds=a;break;case 0:case 11:case 14:case 15:ys(2,n,t),Os||ys(4,n,t),zs(e,t,n);break;case 1:Os||(ks(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount&&vs(n,t,r)),zs(e,t,n);break;case 21:zs(e,t,n);break;case 22:Os=(r=Os)||null!==n.memoizedState,zs(e,t,n),Os=r;break;default:zs(e,t,n)}}function Bs(e,t){if(null===t.memoizedState&&(null!==(e=t.alternate)&&null!==(e=e.memoizedState))){e=e.dehydrated;try{Wf(e)}catch(n){Sc(t,t.return,n)}}}function Us(e,t){if(null===t.memoizedState&&(null!==(e=t.alternate)&&(null!==(e=e.memoizedState)&&null!==(e=e.dehydrated))))try{Wf(e)}catch(n){Sc(t,t.return,n)}}function $s(e,t){var n=function(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return null===t&&(t=e.stateNode=new Ns),t;case 22:return null===(t=(e=e.stateNode)._retryCache)&&(t=e._retryCache=new Ns),t;default:throw Error(i(435,e.tag))}}(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Tc.bind(null,e,t);t.then(r,r)}})}function Hs(e,t){var n=t.deletions;if(null!==n)for(var r=0;r title"))),fd(o,r,n),o[Ue]=e,et(o),r=o;break e;case"link":var l=nf("link","href",a).get(r+(n.href||""));if(l)for(var s=0;sl)break;var c=s.transferSize,d=s.initiatorType;c&&pd(d)&&(i+=c*((s=s.responseEnd)of?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(a)}}:null}(d,m)))return Bu=o,e.cancelPendingCommit=m(gc.bind(null,e,t,o,n,r,a,i,l,s,c,d,null,f,p)),void Xu(e,o,i,!u)}gc(e,t,o,n,r,a,i,l,s)}function Zu(e){for(var t=e;;){var n=t.tag;if((0===n||11===n||15===n)&&16384&t.flags&&(null!==(n=t.updateQueue)&&null!==(n=n.stores)))for(var r=0;rh&&(i=h,h=g,g=i);var y=tr(l,g),b=tr(l,h);if(y&&b&&(1!==p.rangeCount||p.anchorNode!==y.node||p.anchorOffset!==y.offset||p.focusNode!==b.node||p.focusOffset!==b.offset)){var v=d.createRange();v.setStart(y.node,y.offset),p.removeAllRanges(),g>h?(p.addRange(v),p.extend(b.node,b.offset)):(v.setEnd(b.node,b.offset),p.addRange(v))}}}}for(d=[],p=l;p=p.parentNode;)1===p.nodeType&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for("function"==typeof l.focus&&l.focus(),l=0;ln?32:n,R.T=null,n=$u,$u=null;var o=zu,l=Bu;if(Du=0,Mu=zu=null,Bu=0,6&pu)throw Error(i(331));var s=pu;if(pu|=4,su(o.current),eu(o,o.current,l,n),pu=s,Fc(0,!1),be&&"function"==typeof be.onPostCommitFiberRoot)try{be.onPostCommitFiberRoot(ye,o)}catch(u){}return!0}finally{I.p=a,R.T=r,vc(e,t)}}function xc(e,t,n){t=Qr(n,t),null!==(e=wo(e,t=jl(e.stateNode,t,2),2))&&(Ne(e,2),Ic(e))}function Sc(e,t,n){if(3===e.tag)xc(e,e,n);else for(;null!==t;){if(3===t.tag){xc(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Fu||!Fu.has(r))){e=Qr(n,e),null!==(r=wo(t,n=Ol(2),2))&&(Pl(n,r,t,e),Ne(r,2),Ic(r));break}}t=t.return}}function Ec(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new fu;var a=new Set;r.set(t,a)}else void 0===(a=r.get(t))&&(a=new Set,r.set(t,a));a.has(n)||(ku=!0,a.add(n),e=_c.bind(null,e,t,n),t.then(e,e))}function _c(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,mu===e&&(hu&n)===n&&(4===Su||3===Su&&(62914560&hu)===hu&&300>se()-Nu?!(2&pu)&&tc(e,0):Au|=n,Tu===hu&&(Tu=0)),Ic(e)}function Ac(e,t){0===t&&(t=Oe()),null!==(e=Lr(e,t))&&(Ne(e,t),Ic(e))}function Cc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Ac(e,n)}function Tc(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;null!==a&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}null!==r&&r.delete(t),Ac(e,n)}var jc=null,Oc=null,Pc=!1,Nc=!1,Lc=!1,Rc=0;function Ic(e){e!==Oc&&null===e.next&&(null===Oc?jc=Oc=e:Oc=Oc.next=e),Nc=!0,Pc||(Pc=!0,Ed(function(){6&pu?ae(ce,Dc):zc()}))}function Fc(e,t){if(!Lc&&Nc){Lc=!0;do{for(var n=!1,r=jc;null!==r;){if(!t)if(0!==e){var a=r.pendingLanes;if(0===a)var o=0;else{var i=r.suspendedLanes,l=r.pingedLanes;o=(1<<31-we(42|e)+1)-1,o=201326741&(o&=a&~(i&~l))?201326741&o|1:o?2|o:0}0!==o&&(n=!0,Uc(r,o))}else o=hu,!(3&(o=Ce(r,r===mu?o:0,null!==r.cancelPendingCommit||-1!==r.timeoutHandle)))||Te(r,o)||(n=!0,Uc(r,o));r=r.next}}while(n);Lc=!1}}function Dc(){zc()}function zc(){Nc=Pc=!1;var e=0;0!==Rc&&function(){var e=window.event;if(e&&"popstate"===e.type)return e!==wd&&(wd=e,!0);return wd=null,!1}()&&(e=Rc);for(var t=se(),n=null,r=jc;null!==r;){var a=r.next,o=Mc(r,t);0===o?(r.next=null,null===n?jc=a:n.next=a,null===a&&(Oc=n)):(n=r,(0!==e||3&o)&&(Nc=!0)),r=a}0!==Du&&5!==Du||Fc(e,!1),0!==Rc&&(Rc=0)}function Mc(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,a=e.expirationTimes,o=-62914561&e.pendingLanes;0 title"):null)}function af(e){return!!("stylesheet"!==e.type||3&e.state.loading)}var of=0;function lf(){if(this.count--,0===this.count&&(0===this.imgCount||!this.waitingForImages))if(this.stylesheets)uf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}var sf=null;function uf(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,sf=new Map,t.forEach(cf,e),sf=null,lf.call(e))}function cf(e,t){if(!(4&t.state.loading)){var n=sf.get(e);if(n)var r=n.get(null);else{n=new Map,sf.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;oJ,vd:()=>W});var r=n(6540),a=n(5556),o=n.n(a),i=n(115),l=n.n(i),s=n(311),u=n.n(s),c=n(2833),d=n.n(c);function f(){return f=Object.assign||function(e){for(var t=1;t=0||(a[n]=e[n]);return a}var h={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title",FRAGMENT:"Symbol(react.fragment)"},y={rel:["amphtml","canonical","alternate"]},b={type:["application/ld+json"]},v={charset:"",name:["robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]},w=Object.keys(h).map(function(e){return h[e]}),k={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},x=Object.keys(k).reduce(function(e,t){return e[k[t]]=t,e},{}),S=function(e,t){for(var n=e.length-1;n>=0;n-=1){var r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},E=function(e){var t=S(e,h.TITLE),n=S(e,"titleTemplate");if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,function(){return t});var r=S(e,"defaultTitle");return t||r||void 0},_=function(e){return S(e,"onChangeClientState")||function(){}},A=function(e,t){return t.filter(function(t){return void 0!==t[e]}).map(function(t){return t[e]}).reduce(function(e,t){return f({},e,t)},{})},C=function(e,t){return t.filter(function(e){return void 0!==e[h.BASE]}).map(function(e){return e[h.BASE]}).reverse().reduce(function(t,n){if(!t.length)for(var r=Object.keys(n),a=0;a/g,">").replace(/"/g,""").replace(/'/g,"'")},I=function(e){return Object.keys(e).reduce(function(t,n){var r=void 0!==e[n]?n+'="'+e[n]+'"':""+n;return t?t+" "+r:r},"")},F=function(e,t){return void 0===t&&(t={}),Object.keys(e).reduce(function(t,n){return t[k[n]||n]=e[n],t},t)},D=function(e,t){return t.map(function(t,n){var a,o=((a={key:n})["data-rh"]=!0,a);return Object.keys(t).forEach(function(e){var n=k[e]||e;"innerHTML"===n||"cssText"===n?o.dangerouslySetInnerHTML={__html:t.innerHTML||t.cssText}:o[n]=t[e]}),r.createElement(e,o)})},z=function(e,t,n){switch(e){case h.TITLE:return{toComponent:function(){return n=t.titleAttributes,(a={key:e=t.title})["data-rh"]=!0,o=F(n,a),[r.createElement(h.TITLE,o,e)];var e,n,a,o},toString:function(){return function(e,t,n,r){var a=I(n),o=O(t);return a?"<"+e+' data-rh="true" '+a+">"+R(o,r)+"":"<"+e+' data-rh="true">'+R(o,r)+""}(e,t.title,t.titleAttributes,n)}};case"bodyAttributes":case"htmlAttributes":return{toComponent:function(){return F(t)},toString:function(){return I(t)}};default:return{toComponent:function(){return D(e,t)},toString:function(){return function(e,t,n){return t.reduce(function(t,r){var a=Object.keys(r).filter(function(e){return!("innerHTML"===e||"cssText"===e)}).reduce(function(e,t){var a=void 0===r[t]?t:t+'="'+R(r[t],n)+'"';return e?e+" "+a:a},""),o=r.innerHTML||r.cssText||"",i=-1===L.indexOf(e);return t+"<"+e+' data-rh="true" '+a+(i?"/>":">"+o+"")},"")}(e,t,n)}}}},M=function(e){var t=e.baseTag,n=e.bodyAttributes,r=e.encode,a=e.htmlAttributes,o=e.noscriptTags,i=e.styleTags,l=e.title,s=void 0===l?"":l,u=e.titleAttributes,c=e.linkTags,d=e.metaTags,f=e.scriptTags,p={toComponent:function(){},toString:function(){return""}};if(e.prioritizeSeoTags){var m=function(e){var t=e.linkTags,n=e.scriptTags,r=e.encode,a=P(e.metaTags,v),o=P(t,y),i=P(n,b);return{priorityMethods:{toComponent:function(){return[].concat(D(h.META,a.priority),D(h.LINK,o.priority),D(h.SCRIPT,i.priority))},toString:function(){return z(h.META,a.priority,r)+" "+z(h.LINK,o.priority,r)+" "+z(h.SCRIPT,i.priority,r)}},metaTags:a.default,linkTags:o.default,scriptTags:i.default}}(e);p=m.priorityMethods,c=m.linkTags,d=m.metaTags,f=m.scriptTags}return{priority:p,base:z(h.BASE,t,r),bodyAttributes:z("bodyAttributes",n,r),htmlAttributes:z("htmlAttributes",a,r),link:z(h.LINK,c,r),meta:z(h.META,d,r),noscript:z(h.NOSCRIPT,o,r),script:z(h.SCRIPT,f,r),style:z(h.STYLE,i,r),title:z(h.TITLE,{title:s,titleAttributes:u},r)}},B=[],U=function(e,t){var n=this;void 0===t&&(t="undefined"!=typeof document),this.instances=[],this.value={setHelmet:function(e){n.context.helmet=e},helmetInstances:{get:function(){return n.canUseDOM?B:n.instances},add:function(e){(n.canUseDOM?B:n.instances).push(e)},remove:function(e){var t=(n.canUseDOM?B:n.instances).indexOf(e);(n.canUseDOM?B:n.instances).splice(t,1)}}},this.context=e,this.canUseDOM=t,t||(e.helmet=M({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))},$=r.createContext({}),H=o().shape({setHelmet:o().func,helmetInstances:o().shape({get:o().func,add:o().func,remove:o().func})}),V="undefined"!=typeof document,W=function(e){function t(n){var r;return(r=e.call(this,n)||this).helmetData=new U(r.props.context,t.canUseDOM),r}return p(t,e),t.prototype.render=function(){return r.createElement($.Provider,{value:this.helmetData.value},this.props.children)},t}(r.Component);W.canUseDOM=V,W.propTypes={context:o().shape({helmet:o().shape()}),children:o().node.isRequired},W.defaultProps={context:{}},W.displayName="HelmetProvider";var q=function(e,t){var n,r=document.head||document.querySelector(h.HEAD),a=r.querySelectorAll(e+"[data-rh]"),o=[].slice.call(a),i=[];return t&&t.length&&t.forEach(function(t){var r=document.createElement(e);for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&("innerHTML"===a?r.innerHTML=t.innerHTML:"cssText"===a?r.styleSheet?r.styleSheet.cssText=t.cssText:r.appendChild(document.createTextNode(t.cssText)):r.setAttribute(a,void 0===t[a]?"":t[a]));r.setAttribute("data-rh","true"),o.some(function(e,t){return n=t,r.isEqualNode(e)})?o.splice(n,1):i.push(r)}),o.forEach(function(e){return e.parentNode.removeChild(e)}),i.forEach(function(e){return r.appendChild(e)}),{oldTags:o,newTags:i}},G=function(e,t){var n=document.getElementsByTagName(e)[0];if(n){for(var r=n.getAttribute("data-rh"),a=r?r.split(","):[],o=[].concat(a),i=Object.keys(t),l=0;l=0;d-=1)n.removeAttribute(o[d]);a.length===o.length?n.removeAttribute("data-rh"):n.getAttribute("data-rh")!==i.join(",")&&n.setAttribute("data-rh",i.join(","))}},Q=function(e,t){var n=e.baseTag,r=e.htmlAttributes,a=e.linkTags,o=e.metaTags,i=e.noscriptTags,l=e.onChangeClientState,s=e.scriptTags,u=e.styleTags,c=e.title,d=e.titleAttributes;G(h.BODY,e.bodyAttributes),G(h.HTML,r),function(e,t){void 0!==e&&document.title!==e&&(document.title=O(e)),G(h.TITLE,t)}(c,d);var f={baseTag:q(h.BASE,n),linkTags:q(h.LINK,a),metaTags:q(h.META,o),noscriptTags:q(h.NOSCRIPT,i),scriptTags:q(h.SCRIPT,s),styleTags:q(h.STYLE,u)},p={},m={};Object.keys(f).forEach(function(e){var t=f[e],n=t.newTags,r=t.oldTags;n.length&&(p[e]=n),r.length&&(m[e]=f[e].oldTags)}),t&&t(),l(e,p,m)},Y=null,K=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;a elements are self-closing and can not contain children. Refer to our API for more information.")}},n.flattenArrayTypeChildren=function(e){var t,n=e.child,r=e.arrayTypeChildren;return f({},r,((t={})[n.type]=[].concat(r[n.type]||[],[f({},e.newChildProps,this.mapNestedChildrenToProps(n,e.nestedChildren))]),t))},n.mapObjectTypeChildren=function(e){var t,n,r=e.child,a=e.newProps,o=e.newChildProps,i=e.nestedChildren;switch(r.type){case h.TITLE:return f({},a,((t={})[r.type]=i,t.titleAttributes=f({},o),t));case h.BODY:return f({},a,{bodyAttributes:f({},o)});case h.HTML:return f({},a,{htmlAttributes:f({},o)});default:return f({},a,((n={})[r.type]=f({},o),n))}},n.mapArrayTypeChildrenToProps=function(e,t){var n=f({},t);return Object.keys(e).forEach(function(t){var r;n=f({},n,((r={})[t]=e[t],r))}),n},n.warnOnInvalidChildren=function(e,t){return u()(w.some(function(t){return e.type===t}),"function"==typeof e.type?"You may be attempting to nest components within each other, which is not allowed. Refer to our API for more information.":"Only elements types "+w.join(", ")+" are allowed. Helmet does not support rendering <"+e.type+"> elements. Refer to our API for more information."),u()(!t||"string"==typeof t||Array.isArray(t)&&!t.some(function(e){return"string"!=typeof e}),"Helmet expects a string as a child of <"+e.type+">. Did you forget to wrap your children in braces? ( <"+e.type+">{``} ) Refer to our API for more information."),!0},n.mapChildrenToProps=function(e,t){var n=this,a={};return r.Children.forEach(e,function(e){if(e&&e.props){var r=e.props,o=r.children,i=g(r,Z),l=Object.keys(i).reduce(function(e,t){return e[x[t]||t]=i[t],e},{}),s=e.type;switch("symbol"==typeof s?s=s.toString():n.warnOnInvalidChildren(e,o),s){case h.FRAGMENT:t=n.mapChildrenToProps(o,t);break;case h.LINK:case h.META:case h.NOSCRIPT:case h.SCRIPT:case h.STYLE:a=n.flattenArrayTypeChildren({child:e,arrayTypeChildren:a,newChildProps:l,nestedChildren:o});break;default:t=n.mapObjectTypeChildren({child:e,newProps:t,newChildProps:l,nestedChildren:o})}}}),this.mapArrayTypeChildrenToProps(a,t)},n.render=function(){var e=this.props,t=e.children,n=g(e,X),a=f({},n),o=n.helmetData;return t&&(a=this.mapChildrenToProps(t,a)),!o||o instanceof U||(o=new U(o.context,o.instances)),o?r.createElement(K,f({},a,{context:o.value,helmetData:void 0})):r.createElement($.Consumer,null,function(e){return r.createElement(K,f({},a,{context:e}))})},t}(r.Component);J.propTypes={base:o().object,bodyAttributes:o().object,children:o().oneOfType([o().arrayOf(o().node),o().node]),defaultTitle:o().string,defer:o().bool,encodeSpecialCharacters:o().bool,htmlAttributes:o().object,link:o().arrayOf(o().object),meta:o().arrayOf(o().object),noscript:o().arrayOf(o().object),onChangeClientState:o().func,script:o().arrayOf(o().object),style:o().arrayOf(o().object),title:o().string,titleAttributes:o().object,titleTemplate:o().string,prioritizeSeoTags:o().bool,helmetData:o().object},J.defaultProps={defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1},J.displayName="Helmet"},2799(e,t){"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,a=n?Symbol.for("react.portal"):60106,o=n?Symbol.for("react.fragment"):60107,i=n?Symbol.for("react.strict_mode"):60108,l=n?Symbol.for("react.profiler"):60114,s=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,m=n?Symbol.for("react.suspense_list"):60120,g=n?Symbol.for("react.memo"):60115,h=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,b=n?Symbol.for("react.fundamental"):60117,v=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function k(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case d:case o:case l:case i:case p:return e;default:switch(e=e&&e.$$typeof){case u:case f:case h:case g:case s:return e;default:return t}}case a:return t}}}function x(e){return k(e)===d}t.AsyncMode=c,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=s,t.Element=r,t.ForwardRef=f,t.Fragment=o,t.Lazy=h,t.Memo=g,t.Portal=a,t.Profiler=l,t.StrictMode=i,t.Suspense=p,t.isAsyncMode=function(e){return x(e)||k(e)===c},t.isConcurrentMode=x,t.isContextConsumer=function(e){return k(e)===u},t.isContextProvider=function(e){return k(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return k(e)===f},t.isFragment=function(e){return k(e)===o},t.isLazy=function(e){return k(e)===h},t.isMemo=function(e){return k(e)===g},t.isPortal=function(e){return k(e)===a},t.isProfiler=function(e){return k(e)===l},t.isStrictMode=function(e){return k(e)===i},t.isSuspense=function(e){return k(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===d||e===l||e===i||e===p||e===m||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===g||e.$$typeof===s||e.$$typeof===u||e.$$typeof===f||e.$$typeof===b||e.$$typeof===v||e.$$typeof===w||e.$$typeof===y)},t.typeOf=k},4363(e,t,n){"use strict";e.exports=n(2799)},3259(e,t,n){"use strict";function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(){return i=Object.assign||function(e){for(var t=1;ti,v:()=>l});var r=n(6347),a=n(8168),o=n(6540);function i(e,t,n){return void 0===n&&(n=[]),e.some(function(e){var a=e.path?(0,r.B6)(t,e):n.length?n[n.length-1].match:r.Ix.computeRootMatch(t);return a&&(n.push({route:e,match:a}),e.routes&&i(e.routes,t,n)),a}),n}function l(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),e?o.createElement(r.dO,n,e.map(function(e,n){return o.createElement(r.qh,{key:e.key||n,path:e.path,exact:e.exact,strict:e.strict,render:function(n){return e.render?e.render((0,a.A)({},n,{},t,{route:e})):o.createElement(e.component,(0,a.A)({},n,t,{route:e}))}})})):null}},4625(e,t,n){"use strict";n.d(t,{I9:()=>d,Kd:()=>c,N_:()=>y,k2:()=>w});var r=n(6347),a=n(7387),o=n(6540),i=n(1513),l=n(8168),s=n(8587),u=n(1561),c=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),a=0;ax,Ix:()=>v,W6:()=>P,XZ:()=>b,dO:()=>j,qh:()=>S,zy:()=>N});var r=n(7387),a=n(6540),o=n(5556),i=n.n(o),l=n(1513),s=n(1561),u=n(8168),c=n(5302),d=n.n(c),f=(n(4363),n(8587)),p=(n(4146),1073741823),m="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:{};var g=a.createContext||function(e,t){var n,o,l="__create-react-context-"+function(){var e="__global_unique_id__";return m[e]=(m[e]||0)+1}()+"__",s=function(e){function n(){for(var t,n,r,a=arguments.length,o=new Array(a),i=0;i>>1,a=e[r];if(!(0>>1;ro(s,n))uo(c,s)?(e[r]=c,e[u]=n,r=u):(e[r]=s,e[l]=n,r=l);else{if(!(uo(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(t.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var i=performance;t.unstable_now=function(){return i.now()}}else{var l=Date,s=l.now();t.unstable_now=function(){return l.now()-s}}var u=[],c=[],d=1,f=null,p=3,m=!1,g=!1,h=!1,y=!1,b="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,w="undefined"!=typeof setImmediate?setImmediate:null;function k(e){for(var t=r(c);null!==t;){if(null===t.callback)a(c);else{if(!(t.startTime<=e))break;a(c),t.sortIndex=t.expirationTime,n(u,t)}t=r(c)}}function x(e){if(h=!1,k(e),!g)if(null!==r(u))g=!0,E||(E=!0,S());else{var t=r(c);null!==t&&N(x,t.startTime-e)}}var S,E=!1,_=-1,A=5,C=-1;function T(){return!!y||!(t.unstable_now()-Ce&&T());){var i=f.callback;if("function"==typeof i){f.callback=null,p=f.priorityLevel;var l=i(f.expirationTime<=e);if(e=t.unstable_now(),"function"==typeof l){f.callback=l,k(e),n=!0;break t}f===r(u)&&a(u),k(e)}else a(u);f=r(u)}if(null!==f)n=!0;else{var s=r(c);null!==s&&N(x,s.startTime-e),n=!1}}break e}finally{f=null,p=o,m=!1}n=void 0}}finally{n?S():E=!1}}}if("function"==typeof w)S=function(){w(j)};else if("undefined"!=typeof MessageChannel){var O=new MessageChannel,P=O.port2;O.port1.onmessage=j,S=function(){P.postMessage(null)}}else S=function(){b(j,0)};function N(e,n){_=b(function(){e(t.unstable_now())},n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_forceFrameRate=function(e){0>e||125i?(e.sortIndex=o,n(c,e),null===r(u)&&e===r(c)&&(h?(v(_),_=-1):h=!0,N(x,o-i))):(e.sortIndex=l,n(u,e),g||m||(g=!0,E||(E=!0,S()))),e},t.unstable_shouldYield=T,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},9982(e,t,n){"use strict";e.exports=n(4477)},2833(e){e.exports=function(e,t,n,r){var a=n?n.call(r,e,t):void 0;if(void 0!==a)return!!a;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var o=Object.keys(e),i=Object.keys(t);if(o.length!==i.length)return!1;for(var l=Object.prototype.hasOwnProperty.bind(t),s=0;sr});const r={title:"HappyView",tagline:"Lexicon-driven ATProto AppView",url:"https://happyview.dev",baseUrl:"/",favicon:"img/favicon.png",onBrokenLinks:"throw",markdown:{mermaid:!0,format:"mdx",emoji:!0,mdx1Compat:{comments:!0,admonitions:!0,headingIds:!0},anchors:{maintainCase:!1},hooks:{onBrokenMarkdownLinks:"warn",onBrokenMarkdownImages:"throw"}},themes:["@docusaurus/theme-mermaid"],i18n:{defaultLocale:"en",locales:["en"],path:"i18n",localeConfigs:{}},presets:[["classic",{docs:{path:"docs",routeBasePath:"/",sidebarPath:"./sidebars.ts"},blog:!1,theme:{}}]],themeConfig:{image:"img/og.png",navbar:{title:"",logo:{alt:"HappyView",src:"img/logo.light.png",srcDark:"img/logo.dark.png"},items:[{type:"docSidebar",sidebarId:"docs",position:"left",label:"Docs"},{href:"https://github.com/gamesgamesgamesgamesgames/happyview",label:"GitHub",position:"right"}],hideOnScroll:!1},prism:{additionalLanguages:["lua"],theme:{plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},magicComments:[{className:"theme-code-block-highlighted-line",line:"highlight-next-line",block:{start:"highlight-start",end:"highlight-end"}}]},footer:{copyright:"Copyright \xa9 2026 [Birbhouse Games](https://birb.house).",style:"light",links:[]},colorMode:{defaultMode:"light",disableSwitch:!1,respectPrefersColorScheme:!1},docs:{versionPersistence:"localStorage",sidebar:{hideable:!1,autoCollapseCategories:!1}},blog:{sidebar:{groupByYear:!0}},metadata:[],tableOfContents:{minHeadingLevel:2,maxHeadingLevel:3},mermaid:{theme:{dark:"dark",light:"default"},options:{}}},baseUrlIssueBanner:!0,future:{v4:{removeLegacyPostBuildHeadAttribute:!1,useCssCascadeLayers:!1},experimental_faster:{swcJsLoader:!1,swcJsMinimizer:!1,swcHtmlMinimizer:!1,lightningCssMinimizer:!1,mdxCrossCompilerCache:!1,rspackBundler:!1,rspackPersistentCache:!1,ssgWorkerThreads:!1},experimental_storage:{type:"localStorage",namespace:!1},experimental_router:"browser"},onBrokenAnchors:"warn",onDuplicateRoutes:"warn",staticDirectories:["static"],customFields:{},plugins:[],scripts:[],headTags:[],stylesheets:[],clientModules:[],titleDelimiter:"|",noIndex:!1}},3845(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n=e.length?{done:!0}:{done:!1,value:e[a++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{A:()=>a})},8168(e,t,n){"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;tr})},7387(e,t,n){"use strict";n.d(t,{A:()=>a});var r=n(3662);function a(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,(0,r.A)(e,t)}},8587(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}n.d(t,{A:()=>r})},3662(e,t,n){"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{A:()=>r})},8634(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{A:()=>o});var a=n(3662);function o(){o=function(e,t){return new n(e,void 0,t)};var e=RegExp.prototype,t=new WeakMap;function n(e,r,o){var i=RegExp(e,r);return t.set(i,o||t.get(e)),(0,a.A)(i,n.prototype)}function i(e,n){var r=t.get(n);return Object.keys(r).reduce(function(t,n){var a=r[n];if("number"==typeof a)t[n]=e[a];else{for(var o=0;void 0===e[a[o]]&&o+1]+)(>|$)/g,function(e,t,n){if(""===n)return e;var r=o[t];return Array.isArray(r)?"$"+r.join("$"):"number"==typeof r?"$"+r:""}))}if("function"==typeof a){var l=this;return e[Symbol.replace].call(this,n,function(){var e=arguments;return"object"!=r(e[e.length-1])&&(e=[].slice.call(e)).push(i(e,l)),a.apply(this,e)})}return e[Symbol.replace].call(this,n,a)},o.apply(this,arguments)}},4164(e,t,n){"use strict";function r(e){var t,n,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;ta});const a=function(){for(var e,t,n=0,a="",o=arguments.length;nC,f4:()=>ne});var r,a,o,i,l,s,u,c=n(6540),d=n(4164),f=Object.create,p=Object.defineProperty,m=Object.defineProperties,g=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertyNames,b=Object.getOwnPropertySymbols,v=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable,x=(e,t,n)=>t in e?p(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,S=(e,t)=>{for(var n in t||(t={}))w.call(t,n)&&x(e,n,t[n]);if(b)for(var n of b(t))k.call(t,n)&&x(e,n,t[n]);return e},E=(e,t)=>m(e,h(t)),_=(e,t)=>{var n={};for(var r in e)w.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&b)for(var r of b(e))t.indexOf(r)<0&&k.call(e,r)&&(n[r]=e[r]);return n},A=(r={"../../node_modules/.pnpm/prismjs@1.29.0_patch_hash=vrxx3pzkik6jpmgpayxfjunetu/node_modules/prismjs/prism.js"(e,t){var n=function(){var e=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,n={},r={util:{encode:function e(t){return t instanceof a?new a(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/=d.reach);S+=x.value.length,x=x.next){var E=x.value;if(t.length>e.length)return;if(!(E instanceof a)){var _,A=1;if(b){if(!(_=o(k,S,e,y))||_.index>=e.length)break;var C=_.index,T=_.index+_[0].length,j=S;for(j+=x.value.length;C>=j;)j+=(x=x.next).value.length;if(S=j-=x.value.length,x.value instanceof a)continue;for(var O=x;O!==t.tail&&(jd.reach&&(d.reach=R);var I=x.prev;if(N&&(I=s(t,I,N),S+=N.length),u(t,I,A),x=s(t,I,new a(f,h?r.tokenize(P,h):P,v,P)),L&&s(t,x,L),A>1){var F={cause:f+","+m,reach:R};i(e,t,n,x.prev,S,F),d&&F.reach>d.reach&&(d.reach=F.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function s(e,t,n){var r=t.next,a={value:n,prev:t,next:r};return t.next=a,r.prev=a,e.length++,a}function u(e,t,n){for(var r=t.next,a=0;a"+o.content+""},r}();t.exports=n,n.default=n}},function(){return a||(0,r[y(r)[0]])((a={exports:{}}).exports,a),a.exports}),C=((e,t,n)=>(n=null!=e?f(v(e)):{},((e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of y(t))w.call(e,a)||a===n||p(e,a,{get:()=>t[a],enumerable:!(r=g(t,a))||r.enumerable});return e})(!t&&e&&e.__esModule?n:p(n,"default",{value:e,enumerable:!0}),e)))(A());C.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},C.languages.markup.tag.inside["attr-value"].inside.entity=C.languages.markup.entity,C.languages.markup.doctype.inside["internal-subset"].inside=C.languages.markup,C.hooks.add("wrap",function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&/,"&"))}),Object.defineProperty(C.languages.markup.tag,"addInlined",{value:function(e,t){var n;(t=((n=((n={})["language-"+t]={pattern:/(^$)/i,lookbehind:!0,inside:C.languages[t]},n.cdata=/^$/i,{"included-cdata":{pattern://i,inside:n}}))["language-"+t]={pattern:/[\s\S]+/,inside:C.languages[t]},{}))[e]={pattern:RegExp(/(<__[^>]*>)(?:))*\]\]>|(?!)/.source.replace(/__/g,function(){return e}),"i"),lookbehind:!0,greedy:!0,inside:n},C.languages.insertBefore("markup","cdata",t)}}),Object.defineProperty(C.languages.markup.tag,"addAttribute",{value:function(e,t){C.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:C.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),C.languages.html=C.languages.markup,C.languages.mathml=C.languages.markup,C.languages.svg=C.languages.markup,C.languages.xml=C.languages.extend("markup",{}),C.languages.ssml=C.languages.xml,C.languages.atom=C.languages.xml,C.languages.rss=C.languages.xml,o=C,i={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},s="(?:[^\\\\-]|"+(l=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/).source+")",s=RegExp(s+"-"+s),u={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"},o.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:s,inside:{escape:l,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":i,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:l}},"special-escape":i,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":u}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:l,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},C.languages.javascript=C.languages.extend("clike",{"class-name":[C.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),C.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,C.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:C.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:C.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:C.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:C.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:C.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),C.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:C.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),C.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),C.languages.markup&&(C.languages.markup.tag.addInlined("script","javascript"),C.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),C.languages.js=C.languages.javascript,C.languages.actionscript=C.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<>?>?|[!=]=?)=?|[~?@]/}),C.languages.actionscript["class-name"].alias="function",delete C.languages.actionscript.parameter,delete C.languages.actionscript["literal-property"],C.languages.markup&&C.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:C.languages.markup}}),function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},script:{pattern:/[\s\S]+/,alias:"language-javascript",inside:e.languages.javascript}}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(C),function(e){var t=e.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(t,"addSupport",{value:function(t,n){(t="string"==typeof t?[t]:t).forEach(function(t){var r=function(e){e.inside||(e.inside={}),e.inside.rest=n},a="doc-comment";if(o=e.languages[t]){var o,i=o[a];if((i=i||(o=e.languages.insertBefore(t,"comment",{"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}}))[a])instanceof RegExp&&(i=o[a]={pattern:i}),Array.isArray(i))for(var l=0,s=i.length;l|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=t,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}}),{pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0}),{pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0});e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:t,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:t,number:n})}(C),function(e){var t=/[*&][^\s[\]{},]+/,n=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+n.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+n.source+")?)",a=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source.replace(//g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function i(e,t){t=(t||"").replace(/m/g,"")+"m";var n=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,function(){return r}).replace(/<>/g,function(){return e});return RegExp(n,t)}e.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<>/g,function(){return r})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source.replace(/<>/g,function(){return r}).replace(/<>/g,function(){return"(?:"+a+"|"+o+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:i(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:i(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:i(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:i(o),lookbehind:!0,greedy:!0},number:{pattern:i(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:n,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(C),function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){return e=e.replace(//g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,a=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),o=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source,i=(e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+a+o+"(?:"+a+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+a+o+")(?:"+a+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+a+")"+o+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+a+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~))+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\]))+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(t){["url","bold","italic","strike","code-snippet"].forEach(function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])})}),e.hooks.add("after-tokenize",function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n",quot:'"'},s=String.fromCodePoint||String.fromCharCode;e.languages.md=e.languages.markdown}(C),C.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:C.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/\b[A-Z]\w*Input\b/,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},C.hooks.add("after-tokenize",function(e){if("graphql"===e.language)for(var t=e.tokens.filter(function(e){return"string"!=typeof e&&"comment"!==e.type&&"scalar"!==e.type}),n=0;n?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,a=r.inside["interpolation-punctuation"],o=r.pattern.source;function i(t,r){if(e.languages[t])return{pattern:RegExp("((?:"+r+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function l(t,n,r){return t={code:t,grammar:n,language:r},e.hooks.run("before-tokenize",t),t.tokens=e.tokenize(t.code,t.grammar),e.hooks.run("after-tokenize",t),t.tokens}function s(t,n,i){var s=e.tokenize(t,{interpolation:{pattern:RegExp(o),lookbehind:!0}}),u=0,c={},d=(s=l(s.map(function(e){if("string"==typeof e)return e;var n,r;for(e=e.content;-1!==t.indexOf((r=u++,n="___"+i.toUpperCase()+"_"+r+"___")););return c[n]=e,n}).join(""),n,i),Object.keys(c));return u=0,function t(n){for(var o=0;o=d.length)return;var i,s,f,p,m,g,h,y=n[o];"string"==typeof y||"string"==typeof y.content?(i=d[u],-1!==(h=(g="string"==typeof y?y:y.content).indexOf(i))&&(++u,s=g.substring(0,h),m=c[i],f=void 0,(p={})["interpolation-punctuation"]=a,3===(p=e.tokenize(m,p)).length&&((f=[1,1]).push.apply(f,l(p[1],e.languages.javascript,"javascript")),p.splice.apply(p,f)),f=new e.Token("interpolation",p,r.alias,m),p=g.substring(h+i.length),m=[],s&&m.push(s),m.push(f),p&&(t(g=[p]),m.push.apply(m,g)),"string"==typeof y?(n.splice.apply(n,[o,1].concat(m)),o+=m.length-1):y.content=m)):(h=y.content,Array.isArray(h)?t(h):t([h]))}}(s),new e.Token(i,s,"language-"+i,t)}e.languages.javascript["template-string"]=[i("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),i("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),i("svg",/\bsvg/.source),i("markdown",/\b(?:markdown|md)/.source),i("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),i("sql",/\bsql/.source),t].filter(Boolean);var u={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function c(e){return"string"==typeof e?e:Array.isArray(e)?e.map(c).join(""):c(e.content)}e.hooks.add("after-tokenize",function(t){t.language in u&&function t(n){for(var r=0,a=n.length;r]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(C),function(e){var t=e.languages.javascript,n=/\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})+\}/.source,r="(@(?:arg|argument|param|property)\\s+(?:"+n+"\\s+)?)";e.languages.jsdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp(r+/(?:(?!\s)[$\w\xA0-\uFFFF.])+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(r+/\[(?:(?!\s)[$\w\xA0-\uFFFF.])+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:t,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(//g,function(){return n})),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+n),lookbehind:!0,inside:{string:t.string,number:t.number,boolean:t.boolean,keyword:e.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:t,alias:"language-javascript"}}}}),e.languages.javadoclike.addSupport("javascript",e.languages.jsdoc)}(C),function(e){e.languages.flow=e.languages.extend("javascript",{}),e.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|[Ss]ymbol|any|mixed|null|void)\b/,alias:"class-name"}]}),e.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete e.languages.flow.parameter,e.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(e.languages.flow.keyword)||(e.languages.flow.keyword=[e.languages.flow.keyword]),e.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})}(C),C.languages.n4js=C.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),C.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),C.languages.n4jsd=C.languages.n4js,function(e){function t(e,t){return RegExp(e.replace(//g,function(){return/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/.source}),t)}e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.insertBefore("javascript","keyword",{imports:{pattern:t(/(\bimport\b\s*)(?:(?:\s*,\s*(?:\*\s*as\s+|\{[^{}]*\}))?|\*\s*as\s+|\{[^{}]*\})(?=\s*\bfrom\b)/.source),lookbehind:!0,inside:e.languages.javascript},exports:{pattern:t(/(\bexport\b\s*)(?:\*(?:\s*as\s+)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source),lookbehind:!0,inside:e.languages.javascript}}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:t(/(\.\s*)#?/.source),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var n=["function","function-variable","method","method-variable","property-access"],r=0;r*\.{3}(?:[^{}]|)*\})/.source;function o(e,t){return e=e.replace(//g,function(){return n}).replace(//g,function(){return r}).replace(//g,function(){return a}),RegExp(e,t)}function i(t){for(var n=[],r=0;r"!==a.content[a.content.length-1].content&&n.push({tagName:l(a.content[0].content[1]),openedBraces:0}):0+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|))?|))**\/?)?>/.source),e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.jsx.tag.inside.comment=t.comment,e.languages.insertBefore("inside","attr-name",{spread:{pattern:o(//.source),inside:e.languages.jsx}},e.languages.jsx.tag),e.languages.insertBefore("inside","special-attr",{script:{pattern:o(/=/.source),alias:"language-javascript",inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:e.languages.jsx}}},e.languages.jsx.tag);var l=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(l).join(""):""};e.hooks.add("after-tokenize",function(e){"jsx"!==e.language&&"tsx"!==e.language||i(e.tokens)})}(C),function(e){var t=e.util.clone(e.languages.typescript);(t=(e.languages.tsx=e.languages.extend("jsx",t),delete e.languages.tsx.parameter,delete e.languages.tsx["literal-property"],e.languages.tsx.tag)).pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+t.pattern.source+")",t.pattern.flags),t.lookbehind=!0}(C),C.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+/(?:elseif|if)\b/.source+"(?:[ \t]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},C.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=C.languages.swift}),function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\b\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"];var t={"interpolation-punctuation":{pattern:/^\$\{?|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:e.languages.kotlin}};e.languages.insertBefore("kotlin","string",{"string-literal":[{pattern:/"""(?:[^$]|\$(?:(?!\{)|\{[^{}]*\}))*?"""/,alias:"multiline",inside:{interpolation:{pattern:/\$(?:[a-z_]\w*|\{[^{}]*\})/i,inside:t},string:/[\s\S]+/}},{pattern:/"(?:[^"\\\r\n$]|\\.|\$(?:(?!\{)|\{[^{}]*\}))*"/,alias:"singleline",inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:[a-z_]\w*|\{[^{}]*\})/i,lookbehind:!0,inside:t},string:/[\s\S]+/}}],char:{pattern:/'(?:[^'\\\r\n]|\\(?:.|u[a-fA-F0-9]{0,4}))'/,greedy:!0}}),delete e.languages.kotlin.string,e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\b\w+@|@\w+\b/,alias:"symbol"}}),e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(C),C.languages.c=C.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),C.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),C.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},C.languages.c.string],char:C.languages.c.char,comment:C.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:C.languages.c}}}}),C.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete C.languages.c.boolean,C.languages.objectivec=C.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete C.languages.objectivec["class-name"],C.languages.objc=C.languages.objectivec,C.languages.reason=C.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),C.languages.insertBefore("reason","class-name",{char:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,greedy:!0},constructor:/\b[A-Z]\w*\b(?!\s*\.)/,label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete C.languages.reason.function,function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|)*\*\//.source,n=0;n<2;n++)t=t.replace(//g,function(){return t});t=t.replace(//g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(C),C.languages.go=C.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:[/\b0(?:b[01_]+|o[0-7_]+)i?\b/i,/\b0x(?:[a-f\d_]+(?:\.[a-f\d_]*)?|\.[a-f\d_]+)(?:p[+-]?\d+(?:_\d+)*)?i?(?!\w)/i,/(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?[\d_]+)?i?(?!\w)/i],operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),C.languages.insertBefore("go","string",{char:{pattern:/'(?:\\.|[^'\\\r\n]){0,10}'/,greedy:!0}}),delete C.languages.go["class-name"],function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!)\w+/.source.replace(//g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/(?:\s*:\s*)?|:\s*/.source.replace(//g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(C),C.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},C.languages.python["string-interpolation"].inside.interpolation.inside.rest=C.languages.python,C.languages.py=C.languages.python,C.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},C.languages.webmanifest=C.languages.json;((e,t)=>{for(var n in t)p(e,n,{get:t[n],enumerable:!0})})({},{dracula:()=>T,duotoneDark:()=>j,duotoneLight:()=>O,github:()=>P,gruvboxMaterialDark:()=>Q,gruvboxMaterialLight:()=>Y,jettwaveDark:()=>V,jettwaveLight:()=>W,nightOwl:()=>N,nightOwlLight:()=>L,oceanicNext:()=>F,okaidia:()=>D,oneDark:()=>q,oneLight:()=>G,palenight:()=>z,shadesOfPurple:()=>M,synthwave84:()=>B,ultramin:()=>U,vsDark:()=>$,vsLight:()=>H});var T={plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},j={plain:{backgroundColor:"#2a2734",color:"#9a86fd"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#6c6783"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#e09142"}},{types:["property","function"],style:{color:"#9a86fd"}},{types:["tag-id","selector","atrule-id"],style:{color:"#eeebff"}},{types:["attr-name"],style:{color:"#c4b9fe"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule","placeholder","variable"],style:{color:"#ffcc99"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#c4b9fe"}}]},O={plain:{backgroundColor:"#faf8f5",color:"#728fcb"},styles:[{types:["comment","prolog","doctype","cdata","punctuation"],style:{color:"#b6ad9a"}},{types:["namespace"],style:{opacity:.7}},{types:["tag","operator","number"],style:{color:"#063289"}},{types:["property","function"],style:{color:"#b29762"}},{types:["tag-id","selector","atrule-id"],style:{color:"#2d2006"}},{types:["attr-name"],style:{color:"#896724"}},{types:["boolean","string","entity","url","attr-value","keyword","control","directive","unit","statement","regex","atrule"],style:{color:"#728fcb"}},{types:["placeholder","variable"],style:{color:"#93abdc"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"#896724"}}]},P={plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},N={plain:{color:"#d6deeb",backgroundColor:"#011627"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(99, 119, 119)",fontStyle:"italic"}},{types:["string","url"],style:{color:"rgb(173, 219, 103)"}},{types:["variable"],style:{color:"rgb(214, 222, 235)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation"],style:{color:"rgb(199, 146, 234)"}},{types:["selector","doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(255, 203, 139)"}},{types:["tag","operator","keyword"],style:{color:"rgb(127, 219, 202)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["property"],style:{color:"rgb(128, 203, 196)"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}}]},L={plain:{color:"#403f53",backgroundColor:"#FBFBFB"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)",fontStyle:"italic"}},{types:["inserted","attr-name"],style:{color:"rgb(72, 118, 214)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(152, 159, 177)",fontStyle:"italic"}},{types:["string","builtin","char","constant","url"],style:{color:"rgb(72, 118, 214)"}},{types:["variable"],style:{color:"rgb(201, 103, 101)"}},{types:["number"],style:{color:"rgb(170, 9, 130)"}},{types:["punctuation"],style:{color:"rgb(153, 76, 195)"}},{types:["function","selector","doctype"],style:{color:"rgb(153, 76, 195)",fontStyle:"italic"}},{types:["class-name"],style:{color:"rgb(17, 17, 17)"}},{types:["tag"],style:{color:"rgb(153, 76, 195)"}},{types:["operator","property","keyword","namespace"],style:{color:"rgb(12, 150, 155)"}},{types:["boolean"],style:{color:"rgb(188, 84, 84)"}}]},R="#c5a5c5",I="#8dc891",F={plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:R}},{types:["attr-value"],style:{color:I}},{types:["comment","block-comment","prolog","doctype","cdata","shebang"],style:{color:"#999999"}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:"#5a9bcf"}},{types:["boolean"],style:{color:"#ff8b50"}},{types:["tag"],style:{color:"#fc929e"}},{types:["string"],style:{color:I}},{types:["punctuation"],style:{color:I}},{types:["selector","char","builtin","inserted"],style:{color:"#D8DEE9"}},{types:["function"],style:{color:"#79b6f2"}},{types:["operator","entity","url","variable"],style:{color:"#d7deea"}},{types:["keyword"],style:{color:R}},{types:["atrule","class-name"],style:{color:"#FAC863"}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]},D={plain:{color:"#f8f8f2",backgroundColor:"#272822"},styles:[{types:["changed"],style:{color:"rgb(162, 191, 252)",fontStyle:"italic"}},{types:["deleted"],style:{color:"#f92672",fontStyle:"italic"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)",fontStyle:"italic"}},{types:["comment"],style:{color:"#8292a2",fontStyle:"italic"}},{types:["string","url"],style:{color:"#a6e22e"}},{types:["variable"],style:{color:"#f8f8f2"}},{types:["number"],style:{color:"#ae81ff"}},{types:["builtin","char","constant","function","class-name"],style:{color:"#e6db74"}},{types:["punctuation"],style:{color:"#f8f8f2"}},{types:["selector","doctype"],style:{color:"#a6e22e",fontStyle:"italic"}},{types:["tag","operator","keyword"],style:{color:"#66d9ef"}},{types:["boolean"],style:{color:"#ae81ff"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)",opacity:.7}},{types:["tag","property"],style:{color:"#f92672"}},{types:["attr-name"],style:{color:"#a6e22e !important"}},{types:["doctype"],style:{color:"#8292a2"}},{types:["rule"],style:{color:"#e6db74"}}]},z={plain:{color:"#bfc7d5",backgroundColor:"#292d3e"},styles:[{types:["comment"],style:{color:"rgb(105, 112, 152)",fontStyle:"italic"}},{types:["string","inserted"],style:{color:"rgb(195, 232, 141)"}},{types:["number"],style:{color:"rgb(247, 140, 108)"}},{types:["builtin","char","constant","function"],style:{color:"rgb(130, 170, 255)"}},{types:["punctuation","selector"],style:{color:"rgb(199, 146, 234)"}},{types:["variable"],style:{color:"rgb(191, 199, 213)"}},{types:["class-name","attr-name"],style:{color:"rgb(255, 203, 107)"}},{types:["tag","deleted"],style:{color:"rgb(255, 85, 114)"}},{types:["operator"],style:{color:"rgb(137, 221, 255)"}},{types:["boolean"],style:{color:"rgb(255, 88, 116)"}},{types:["keyword"],style:{fontStyle:"italic"}},{types:["doctype"],style:{color:"rgb(199, 146, 234)",fontStyle:"italic"}},{types:["namespace"],style:{color:"rgb(178, 204, 214)"}},{types:["url"],style:{color:"rgb(221, 221, 221)"}}]},M={plain:{color:"#9EFEFF",backgroundColor:"#2D2A55"},styles:[{types:["changed"],style:{color:"rgb(255, 238, 128)"}},{types:["deleted"],style:{color:"rgba(239, 83, 80, 0.56)"}},{types:["inserted"],style:{color:"rgb(173, 219, 103)"}},{types:["comment"],style:{color:"rgb(179, 98, 255)",fontStyle:"italic"}},{types:["punctuation"],style:{color:"rgb(255, 255, 255)"}},{types:["constant"],style:{color:"rgb(255, 98, 140)"}},{types:["string","url"],style:{color:"rgb(165, 255, 144)"}},{types:["variable"],style:{color:"rgb(255, 238, 128)"}},{types:["number","boolean"],style:{color:"rgb(255, 98, 140)"}},{types:["attr-name"],style:{color:"rgb(255, 180, 84)"}},{types:["keyword","operator","property","namespace","tag","selector","doctype"],style:{color:"rgb(255, 157, 0)"}},{types:["builtin","char","constant","function","class-name"],style:{color:"rgb(250, 208, 0)"}}]},B={plain:{backgroundColor:"linear-gradient(to bottom, #2a2139 75%, #34294f)",backgroundImage:"#34294f",color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"},styles:[{types:["comment","block-comment","prolog","doctype","cdata"],style:{color:"#495495",fontStyle:"italic"}},{types:["punctuation"],style:{color:"#ccc"}},{types:["tag","attr-name","namespace","number","unit","hexcode","deleted"],style:{color:"#e2777a"}},{types:["property","selector"],style:{color:"#72f1b8",textShadow:"0 0 2px #100c0f, 0 0 10px #257c5575, 0 0 35px #21272475"}},{types:["function-name"],style:{color:"#6196cc"}},{types:["boolean","selector-id","function"],style:{color:"#fdfdfd",textShadow:"0 0 2px #001716, 0 0 3px #03edf975, 0 0 5px #03edf975, 0 0 8px #03edf975"}},{types:["class-name","maybe-class-name","builtin"],style:{color:"#fff5f6",textShadow:"0 0 2px #000, 0 0 10px #fc1f2c75, 0 0 5px #fc1f2c75, 0 0 25px #fc1f2c75"}},{types:["constant","symbol"],style:{color:"#f92aad",textShadow:"0 0 2px #100c0f, 0 0 5px #dc078e33, 0 0 10px #fff3"}},{types:["important","atrule","keyword","selector-class"],style:{color:"#f4eee4",textShadow:"0 0 2px #393a33, 0 0 8px #f39f0575, 0 0 2px #f39f0575"}},{types:["string","char","attr-value","regex","variable"],style:{color:"#f87c32"}},{types:["parameter"],style:{fontStyle:"italic"}},{types:["entity","url"],style:{color:"#67cdcc"}},{types:["operator"],style:{color:"ffffffee"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["entity"],style:{cursor:"help"}},{types:["inserted"],style:{color:"green"}}]},U={plain:{color:"#282a2e",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(197, 200, 198)"}},{types:["string","number","builtin","variable"],style:{color:"rgb(150, 152, 150)"}},{types:["class-name","function","tag","attr-name"],style:{color:"rgb(40, 42, 46)"}}]},$={plain:{color:"#9CDCFE",backgroundColor:"#1E1E1E"},styles:[{types:["prolog"],style:{color:"rgb(0, 0, 128)"}},{types:["comment"],style:{color:"rgb(106, 153, 85)"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"rgb(86, 156, 214)"}},{types:["number","inserted"],style:{color:"rgb(181, 206, 168)"}},{types:["constant"],style:{color:"rgb(100, 102, 149)"}},{types:["attr-name","variable"],style:{color:"rgb(156, 220, 254)"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"rgb(206, 145, 120)"}},{types:["selector"],style:{color:"rgb(215, 186, 125)"}},{types:["tag"],style:{color:"rgb(78, 201, 176)"}},{types:["tag"],languages:["markup"],style:{color:"rgb(86, 156, 214)"}},{types:["punctuation","operator"],style:{color:"rgb(212, 212, 212)"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"rgb(220, 220, 170)"}},{types:["class-name"],style:{color:"rgb(78, 201, 176)"}},{types:["char"],style:{color:"rgb(209, 105, 105)"}}]},H={plain:{color:"#000000",backgroundColor:"#ffffff"},styles:[{types:["comment"],style:{color:"rgb(0, 128, 0)"}},{types:["builtin"],style:{color:"rgb(0, 112, 193)"}},{types:["number","variable","inserted"],style:{color:"rgb(9, 134, 88)"}},{types:["operator"],style:{color:"rgb(0, 0, 0)"}},{types:["constant","char"],style:{color:"rgb(129, 31, 63)"}},{types:["tag"],style:{color:"rgb(128, 0, 0)"}},{types:["attr-name"],style:{color:"rgb(255, 0, 0)"}},{types:["deleted","string"],style:{color:"rgb(163, 21, 21)"}},{types:["changed","punctuation"],style:{color:"rgb(4, 81, 165)"}},{types:["function","keyword"],style:{color:"rgb(0, 0, 255)"}},{types:["class-name"],style:{color:"rgb(38, 127, 153)"}}]},V={plain:{color:"#f8fafc",backgroundColor:"#011627"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#569CD6"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#f8fafc"}},{types:["attr-name","variable"],style:{color:"#9CDCFE"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#cbd5e1"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#D4D4D4"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#7dd3fc"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},W={plain:{color:"#0f172a",backgroundColor:"#f1f5f9"},styles:[{types:["prolog"],style:{color:"#000080"}},{types:["comment"],style:{color:"#6A9955"}},{types:["builtin","changed","keyword","interpolation-punctuation"],style:{color:"#0c4a6e"}},{types:["number","inserted"],style:{color:"#B5CEA8"}},{types:["constant"],style:{color:"#0f172a"}},{types:["attr-name","variable"],style:{color:"#0c4a6e"}},{types:["deleted","string","attr-value","template-punctuation"],style:{color:"#64748b"}},{types:["selector"],style:{color:"#D7BA7D"}},{types:["tag"],style:{color:"#0ea5e9"}},{types:["tag"],languages:["markup"],style:{color:"#0ea5e9"}},{types:["punctuation","operator"],style:{color:"#475569"}},{types:["punctuation"],languages:["markup"],style:{color:"#808080"}},{types:["function"],style:{color:"#0e7490"}},{types:["class-name"],style:{color:"#0ea5e9"}},{types:["char"],style:{color:"#D16969"}}]},q={plain:{backgroundColor:"hsl(220, 13%, 18%)",color:"hsl(220, 14%, 71%)",textShadow:"0 1px rgba(0, 0, 0, 0.3)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(220, 10%, 40%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(220, 14%, 71%)"}},{types:["attr-name","class-name","maybe-class-name","boolean","constant","number","atrule"],style:{color:"hsl(29, 54%, 61%)"}},{types:["keyword"],style:{color:"hsl(286, 60%, 67%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(355, 65%, 65%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value"],style:{color:"hsl(95, 38%, 62%)"}},{types:["variable","operator","function"],style:{color:"hsl(207, 82%, 66%)"}},{types:["url"],style:{color:"hsl(187, 47%, 55%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(220, 14%, 71%)"}}]},G={plain:{backgroundColor:"hsl(230, 1%, 98%)",color:"hsl(230, 8%, 24%)"},styles:[{types:["comment","prolog","cdata"],style:{color:"hsl(230, 4%, 64%)"}},{types:["doctype","punctuation","entity"],style:{color:"hsl(230, 8%, 24%)"}},{types:["attr-name","class-name","boolean","constant","number","atrule"],style:{color:"hsl(35, 99%, 36%)"}},{types:["keyword"],style:{color:"hsl(301, 63%, 40%)"}},{types:["property","tag","symbol","deleted","important"],style:{color:"hsl(5, 74%, 59%)"}},{types:["selector","string","char","builtin","inserted","regex","attr-value","punctuation"],style:{color:"hsl(119, 34%, 47%)"}},{types:["variable","operator","function"],style:{color:"hsl(221, 87%, 60%)"}},{types:["url"],style:{color:"hsl(198, 99%, 37%)"}},{types:["deleted"],style:{textDecorationLine:"line-through"}},{types:["inserted"],style:{textDecorationLine:"underline"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["important","bold"],style:{fontWeight:"bold"}},{types:["important"],style:{color:"hsl(230, 8%, 24%)"}}]},Q={plain:{color:"#ebdbb2",backgroundColor:"#292828"},styles:[{types:["imports","class-name","maybe-class-name","constant","doctype","builtin","function"],style:{color:"#d8a657"}},{types:["property-access"],style:{color:"#7daea3"}},{types:["tag"],style:{color:"#e78a4e"}},{types:["attr-name","char","url","regex"],style:{color:"#a9b665"}},{types:["attr-value","string"],style:{color:"#89b482"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#ea6962"}},{types:["entity","number","symbol"],style:{color:"#d3869b"}}]},Y={plain:{color:"#654735",backgroundColor:"#f9f5d7"},styles:[{types:["delimiter","boolean","keyword","selector","important","atrule","property","variable","deleted"],style:{color:"#af2528"}},{types:["imports","class-name","maybe-class-name","constant","doctype","builtin"],style:{color:"#b4730e"}},{types:["string","attr-value"],style:{color:"#477a5b"}},{types:["property-access"],style:{color:"#266b79"}},{types:["function","attr-name","char","url"],style:{color:"#72761e"}},{types:["tag"],style:{color:"#b94c07"}},{types:["comment","prolog","cdata","operator","inserted"],style:{color:"#a89984"}},{types:["entity","number","symbol"],style:{color:"#924f79"}}]},K=/\r\n|\r|\n/,Z=e=>{0===e.length?e.push({types:["plain"],content:"\n",empty:!0}):1===e.length&&""===e[0].content&&(e[0].content="\n",e[0].empty=!0)},X=(e,t)=>{const n=e.length;return n>0&&e[n-1]===t?e:e.concat(t)},J=e=>{const t=[[]],n=[e],r=[0],a=[e.length];let o=0,i=0,l=[];const s=[l];for(;i>-1;){for(;(o=r[i]++)0?u:["plain"],e=c):(u=X(u,c.type),c.alias&&(u=X(u,c.alias)),e=c.content),"string"!=typeof e){i++,t.push(u),n.push(e),r.push(0),a.push(e.length);continue}const d=e.split(K),f=d.length;l.push({types:u,content:d[0]});for(let t=1;t{const{plain:n}=e,r=e.styles.reduce((e,n)=>{const{languages:r,style:a}=n;return r&&!r.includes(t)||n.types.forEach(t=>{const n=S(S({},e[t]),a);e[t]=n}),e},{});return r.root=n,r.plain=E(S({},n),{backgroundColor:void 0}),r},te=({children:e,language:t,code:n,theme:r,prism:a})=>{const o=t.toLowerCase(),i=ee(r,o),l=(e=>(0,c.useCallback)(t=>{var n=t,{className:r,style:a,line:o}=n,i=_(n,["className","style","line"]);const l=E(S({},i),{className:(0,d.A)("token-line",r)});return"object"==typeof e&&"plain"in e&&(l.style=e.plain),"object"==typeof a&&(l.style=S(S({},l.style||{}),a)),l},[e]))(i),s=(e=>{const t=(0,c.useCallback)(({types:t,empty:n})=>{if(null!=e)return 1===t.length&&"plain"===t[0]?null!=n?{display:"inline-block"}:void 0:1===t.length&&null!=n?e[t[0]]:Object.assign(null!=n?{display:"inline-block"}:{},...t.map(t=>e[t]))},[e]);return(0,c.useCallback)(e=>{var n=e,{token:r,className:a,style:o}=n,i=_(n,["token","className","style"]);const l=E(S({},i),{className:(0,d.A)("token",...r.types,a),children:r.content,style:t(r)});return null!=o&&(l.style=S(S({},l.style||{}),o)),l},[t])})(i),u=(({prism:e,code:t,grammar:n,language:r})=>(0,c.useMemo)(()=>{if(null==n)return J([t]);const a={code:t,grammar:n,language:r,tokens:[]};return e.hooks.run("before-tokenize",a),a.tokens=e.tokenize(t,n),e.hooks.run("after-tokenize",a),J(a.tokens)},[t,n,r,e]))({prism:a,language:o,code:n,grammar:a.languages[o]});return e({tokens:u,className:`prism-code language-${o}`,style:null!=i?i.root:{},getLineProps:l,getTokenProps:s})},ne=e=>(0,c.createElement)(te,E(S({},e),{prism:e.prism||C,theme:e.theme||$,code:e.code,language:e.language}))},1561(e,t,n){"use strict";n.d(t,{A:()=>a});var r="Invariant failed";function a(e,t){if(!e)throw new Error(r)}},1635(e,t,n){"use strict";n.r(t),n.d(t,{__addDisposableResource:()=>I,__assign:()=>o,__asyncDelegator:()=>_,__asyncGenerator:()=>E,__asyncValues:()=>A,__await:()=>S,__awaiter:()=>m,__classPrivateFieldGet:()=>N,__classPrivateFieldIn:()=>R,__classPrivateFieldSet:()=>L,__createBinding:()=>h,__decorate:()=>l,__disposeResources:()=>D,__esDecorate:()=>u,__exportStar:()=>y,__extends:()=>a,__generator:()=>g,__importDefault:()=>P,__importStar:()=>O,__makeTemplateObject:()=>C,__metadata:()=>p,__param:()=>s,__propKey:()=>d,__read:()=>v,__rest:()=>i,__rewriteRelativeImportExtension:()=>z,__runInitializers:()=>c,__setFunctionName:()=>f,__spread:()=>w,__spreadArray:()=>x,__spreadArrays:()=>k,__values:()=>b,default:()=>M});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0;l--)(a=e[l])&&(i=(o<3?a(i):o>3?a(t,n,i):a(t,n))||i);return o>3&&i&&Object.defineProperty(t,n,i),i}function s(e,t){return function(n,r){t(n,r,e)}}function u(e,t,n,r,a,o){function i(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var l,s=r.kind,u="getter"===s?"get":"setter"===s?"set":"value",c=!t&&e?r.static?e:e.prototype:null,d=t||(c?Object.getOwnPropertyDescriptor(c,r.name):{}),f=!1,p=n.length-1;p>=0;p--){var m={};for(var g in r)m[g]="access"===g?{}:r[g];for(var g in r.access)m.access[g]=r.access[g];m.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");o.push(i(e||null))};var h=(0,n[p])("accessor"===s?{get:d.get,set:d.set}:d[u],m);if("accessor"===s){if(void 0===h)continue;if(null===h||"object"!=typeof h)throw new TypeError("Object expected");(l=i(h.get))&&(d.get=l),(l=i(h.set))&&(d.set=l),(l=i(h.init))&&a.unshift(l)}else(l=i(h))&&("field"===s?a.unshift(l):d[u]=l)}c&&Object.defineProperty(c,r.name,d),f=!0}function c(e,t,n){for(var r=arguments.length>2,a=0;a0&&a[a.length-1])||6!==l[0]&&2!==l[0])){o=0;continue}if(3===l[0]&&(!a||l[1]>a[0]&&l[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,a,o=n.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)i.push(r.value)}catch(l){a={error:l}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(a)throw a.error}}return i}function w(){for(var e=[],t=0;t1||l(e,t)})},t&&(r[e]=t(r[e])))}function l(e,t){try{(n=a[e](t)).value instanceof S?Promise.resolve(n.value.v).then(s,u):c(o[0][2],n)}catch(r){c(o[0][3],r)}var n}function s(e){l("next",e)}function u(e){l("throw",e)}function c(e,t){e(t),o.shift(),o.length&&l(o[0][0],o[0][1])}}function _(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,a){t[r]=e[r]?function(t){return(n=!n)?{value:S(e[r](t)),done:!1}:a?a(t):t}:a}}function A(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=b(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,a){(function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)})(r,a,(t=e[n](t)).done,t.value)})}}}function C(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var T=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},j=function(e){return j=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},j(e)};function O(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=j(e),r=0;r{e.O(0,[1869],()=>{return t=8600,e(e.s=t);var t});e.O()}]); \ No newline at end of file diff --git a/assets/js/main.ae5bb244.js.LICENSE.txt b/assets/js/main.00f36f1d.js.LICENSE.txt similarity index 100% rename from assets/js/main.ae5bb244.js.LICENSE.txt rename to assets/js/main.00f36f1d.js.LICENSE.txt diff --git a/assets/js/runtime~main.4aac4349.js b/assets/js/runtime~main.4aac4349.js deleted file mode 100644 index 8a642df..0000000 --- a/assets/js/runtime~main.4aac4349.js +++ /dev/null @@ -1 +0,0 @@ -(()=>{"use strict";var e,a,t,r,f,d={},c={};function b(e){var a=c[e];if(void 0!==a)return a.exports;var t=c[e]={exports:{}};return d[e].call(t.exports,t,t.exports,b),t.exports}b.m=d,e=[],b.O=(a,t,r,f)=>{if(!t){var d=1/0;for(i=0;i=f)&&Object.keys(b.O).every(e=>b.O[e](t[o]))?t.splice(o--,1):(c=!1,f0&&e[i-1][2]>f;i--)e[i]=e[i-1];e[i]=[t,r,f]},b.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return b.d(a,{a:a}),a},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,b.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var f=Object.create(null);b.r(f);var d={};a=a||[null,t({}),t([]),t(t)];for(var c=2&r&&e;("object"==typeof c||"function"==typeof c)&&!~a.indexOf(c);c=t(c))Object.getOwnPropertyNames(c).forEach(a=>d[a]=()=>e[a]);return d.default=()=>e,b.d(f,d),f},b.d=(e,a)=>{for(var t in a)b.o(a,t)&&!b.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:a[t]})},b.f={},b.e=e=>Promise.all(Object.keys(b.f).reduce((a,t)=>(b.f[t](e,a),a),[])),b.u=e=>"assets/js/"+({20:"919abb94",203:"9985d6d5",787:"280f48ec",1361:"fbd7a87c",1567:"22dd74f7",2007:"c985d368",2278:"23374ca6",2431:"bccc5e9b",2618:"b27c7406",3197:"5d3a5990",3993:"d2e94323",4440:"5fd2dbdb",5011:"121e86a6",5563:"539fb2af",5742:"aba21aa0",5953:"920ba7ef",5986:"fac68122",6087:"a77ba7fa",6438:"bde15bec",6495:"6acefe75",6590:"43880f7a",6803:"33ec3d65",7098:"a7bd4aaa",7194:"a4086a70",7520:"89877b86",7715:"009f1e98",8401:"17896441",8779:"111eee19",8897:"a51dfc20",9048:"a94703ab",9178:"e8644baa",9492:"846656e5",9647:"5e95c892",9659:"ec125a10",9957:"f142c65c"}[e]||e)+"."+{20:"55fb1d2d",165:"4c5708a1",203:"02a56c76",225:"04246537",291:"e48169fe",787:"09f3a1e7",1203:"4c8aeaab",1361:"fbacae2b",1567:"6d79a20e",1741:"e6304f1e",1746:"afdbc2a0",1903:"c19e32df",2007:"4a5d382b",2130:"6aca0963",2217:"7fbe9dae",2237:"02886161",2278:"512a3357",2279:"14e9bbca",2291:"742b3f1e",2334:"0d54c30f",2431:"d36e3865",2492:"04a5c13d",2618:"eeaa6157",2821:"25ddbeb7",3197:"f2560b61",3356:"916f8094",3624:"3861afa5",3815:"62684417",3993:"9954b951",4312:"3fc60254",4440:"a9fe863f",4616:"c38d0c4b",4732:"37c818cd",4802:"c2bb0f45",4981:"a26c6f29",5011:"c22515bb",5149:"dc032f86",5480:"0ac51d82",5563:"dcb4d3d5",5734:"a0ed7a40",5742:"dfe711f3",5953:"680fb75f",5955:"5524a460",5986:"c6f4e6d6",5996:"973aad9b",6087:"fdd32ab6",6241:"ddb16fb6",6438:"3d921e73",6495:"2f7c5a5a",6567:"ba0bae2c",6590:"8cbd0596",6803:"9c357e99",6992:"6dfc4d99",7098:"1619d051",7194:"03789122",7520:"21a18237",7592:"a68b31ac",7715:"42325810",7873:"c42f29b1",7928:"08dd813c",8142:"f23a31c7",8249:"c71477f6",8401:"0e3115cb",8731:"da0fb09f",8756:"2c2f045b",8779:"c47c9a7a",8795:"1c60dc80",8897:"8380324d",9032:"6c8ca03c",9048:"df97c324",9178:"3fdd94ab",9412:"2ce5e84d",9492:"696efd35",9510:"2071eba3",9620:"117206fb",9647:"ac259cea",9659:"22946749",9717:"bdeb521f",9957:"551b31a6"}[e]+".js",b.miniCssF=e=>{},b.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),b.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),r={},f="happyview-docs:",b.l=(e,a,t,d)=>{if(r[e])r[e].push(a);else{var c,o;if(void 0!==t)for(var n=document.getElementsByTagName("script"),i=0;i{c.onerror=c.onload=null,clearTimeout(s);var f=r[e];if(delete r[e],c.parentNode&&c.parentNode.removeChild(c),f&&f.forEach(e=>e(t)),a)return a(t)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=l.bind(null,c.onerror),c.onload=l.bind(null,c.onload),o&&document.head.appendChild(c)}},b.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},b.p="/",b.gca=function(e){return e={17896441:"8401","919abb94":"20","9985d6d5":"203","280f48ec":"787",fbd7a87c:"1361","22dd74f7":"1567",c985d368:"2007","23374ca6":"2278",bccc5e9b:"2431",b27c7406:"2618","5d3a5990":"3197",d2e94323:"3993","5fd2dbdb":"4440","121e86a6":"5011","539fb2af":"5563",aba21aa0:"5742","920ba7ef":"5953",fac68122:"5986",a77ba7fa:"6087",bde15bec:"6438","6acefe75":"6495","43880f7a":"6590","33ec3d65":"6803",a7bd4aaa:"7098",a4086a70:"7194","89877b86":"7520","009f1e98":"7715","111eee19":"8779",a51dfc20:"8897",a94703ab:"9048",e8644baa:"9178","846656e5":"9492","5e95c892":"9647",ec125a10:"9659",f142c65c:"9957"}[e]||e,b.p+b.u(e)},(()=>{var e={5354:0,1869:0};b.f.j=(a,t)=>{var r=b.o(e,a)?e[a]:void 0;if(0!==r)if(r)t.push(r[2]);else if(/^(1869|5354)$/.test(a))e[a]=0;else{var f=new Promise((t,f)=>r=e[a]=[t,f]);t.push(r[2]=f);var d=b.p+b.u(a),c=new Error;b.l(d,t=>{if(b.o(e,a)&&(0!==(r=e[a])&&(e[a]=void 0),r)){var f=t&&("load"===t.type?"missing":t.type),d=t&&t.target&&t.target.src;c.message="Loading chunk "+a+" failed.\n("+f+": "+d+")",c.name="ChunkLoadError",c.type=f,c.request=d,r[1](c)}},"chunk-"+a,a)}},b.O.j=a=>0===e[a];var a=(a,t)=>{var r,f,[d,c,o]=t,n=0;if(d.some(a=>0!==e[a])){for(r in c)b.o(c,r)&&(b.m[r]=c[r]);if(o)var i=o(b)}for(a&&a(t);n{"use strict";var e,a,t,r,d,c={},f={};function b(e){var a=f[e];if(void 0!==a)return a.exports;var t=f[e]={exports:{}};return c[e].call(t.exports,t,t.exports,b),t.exports}b.m=c,e=[],b.O=(a,t,r,d)=>{if(!t){var c=1/0;for(i=0;i=d)&&Object.keys(b.O).every(e=>b.O[e](t[o]))?t.splice(o--,1):(f=!1,d0&&e[i-1][2]>d;i--)e[i]=e[i-1];e[i]=[t,r,d]},b.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return b.d(a,{a:a}),a},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,b.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var d=Object.create(null);b.r(d);var c={};a=a||[null,t({}),t([]),t(t)];for(var f=2&r&&e;("object"==typeof f||"function"==typeof f)&&!~a.indexOf(f);f=t(f))Object.getOwnPropertyNames(f).forEach(a=>c[a]=()=>e[a]);return c.default=()=>e,b.d(d,c),d},b.d=(e,a)=>{for(var t in a)b.o(a,t)&&!b.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:a[t]})},b.f={},b.e=e=>Promise.all(Object.keys(b.f).reduce((a,t)=>(b.f[t](e,a),a),[])),b.u=e=>"assets/js/"+({20:"919abb94",203:"9985d6d5",787:"280f48ec",1361:"fbd7a87c",1567:"22dd74f7",2007:"c985d368",2278:"23374ca6",2431:"bccc5e9b",2618:"b27c7406",3197:"5d3a5990",3993:"d2e94323",4440:"5fd2dbdb",5011:"121e86a6",5563:"539fb2af",5742:"aba21aa0",5953:"920ba7ef",5986:"fac68122",6087:"a77ba7fa",6438:"bde15bec",6495:"6acefe75",6590:"43880f7a",6803:"33ec3d65",7098:"a7bd4aaa",7194:"a4086a70",7520:"89877b86",7715:"009f1e98",8401:"17896441",8779:"111eee19",8897:"a51dfc20",9048:"a94703ab",9178:"e8644baa",9492:"846656e5",9647:"5e95c892",9659:"ec125a10",9957:"f142c65c"}[e]||e)+"."+{20:"3ec12698",165:"4c5708a1",203:"02a56c76",225:"04246537",291:"e48169fe",787:"8ce2f590",1203:"4c8aeaab",1361:"e3e74927",1567:"6d79a20e",1741:"e6304f1e",1746:"afdbc2a0",1903:"c19e32df",2007:"9be5144d",2130:"6aca0963",2217:"7fbe9dae",2237:"02886161",2278:"0bc9e136",2279:"14e9bbca",2291:"742b3f1e",2334:"0d54c30f",2431:"bfceefed",2492:"04a5c13d",2618:"d8754146",2821:"25ddbeb7",3197:"a75f4a7b",3356:"916f8094",3624:"3861afa5",3815:"62684417",3993:"9cf23f81",4312:"3fc60254",4440:"3f63380d",4616:"c38d0c4b",4732:"37c818cd",4802:"c2bb0f45",4981:"a26c6f29",5011:"4a23b8e6",5149:"dc032f86",5480:"0ac51d82",5563:"ab94867b",5734:"a0ed7a40",5742:"dfe711f3",5953:"b825c418",5955:"5524a460",5986:"66f4e9f8",5996:"973aad9b",6087:"be66bc37",6241:"ddb16fb6",6438:"7425f799",6495:"bf671ca4",6567:"ba0bae2c",6590:"a0c8f815",6803:"9c357e99",6992:"6dfc4d99",7098:"1619d051",7194:"58f7d6fe",7520:"b544ad88",7592:"a68b31ac",7715:"833b5436",7873:"c42f29b1",7928:"08dd813c",8142:"f23a31c7",8249:"c71477f6",8401:"0e3115cb",8731:"da0fb09f",8756:"2c2f045b",8779:"94292821",8795:"1c60dc80",8897:"1b4b1274",9032:"6c8ca03c",9048:"df97c324",9178:"350e6ac9",9412:"2ce5e84d",9492:"ec5f11ac",9510:"2071eba3",9620:"117206fb",9647:"ac259cea",9659:"81999196",9717:"bdeb521f",9957:"366ae717"}[e]+".js",b.miniCssF=e=>{},b.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),b.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),r={},d="happyview-docs:",b.l=(e,a,t,c)=>{if(r[e])r[e].push(a);else{var f,o;if(void 0!==t)for(var n=document.getElementsByTagName("script"),i=0;i{f.onerror=f.onload=null,clearTimeout(s);var d=r[e];if(delete r[e],f.parentNode&&f.parentNode.removeChild(f),d&&d.forEach(e=>e(t)),a)return a(t)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:f}),12e4);f.onerror=l.bind(null,f.onerror),f.onload=l.bind(null,f.onload),o&&document.head.appendChild(f)}},b.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},b.p="/",b.gca=function(e){return e={17896441:"8401","919abb94":"20","9985d6d5":"203","280f48ec":"787",fbd7a87c:"1361","22dd74f7":"1567",c985d368:"2007","23374ca6":"2278",bccc5e9b:"2431",b27c7406:"2618","5d3a5990":"3197",d2e94323:"3993","5fd2dbdb":"4440","121e86a6":"5011","539fb2af":"5563",aba21aa0:"5742","920ba7ef":"5953",fac68122:"5986",a77ba7fa:"6087",bde15bec:"6438","6acefe75":"6495","43880f7a":"6590","33ec3d65":"6803",a7bd4aaa:"7098",a4086a70:"7194","89877b86":"7520","009f1e98":"7715","111eee19":"8779",a51dfc20:"8897",a94703ab:"9048",e8644baa:"9178","846656e5":"9492","5e95c892":"9647",ec125a10:"9659",f142c65c:"9957"}[e]||e,b.p+b.u(e)},(()=>{var e={5354:0,1869:0};b.f.j=(a,t)=>{var r=b.o(e,a)?e[a]:void 0;if(0!==r)if(r)t.push(r[2]);else if(/^(1869|5354)$/.test(a))e[a]=0;else{var d=new Promise((t,d)=>r=e[a]=[t,d]);t.push(r[2]=d);var c=b.p+b.u(a),f=new Error;b.l(c,t=>{if(b.o(e,a)&&(0!==(r=e[a])&&(e[a]=void 0),r)){var d=t&&("load"===t.type?"missing":t.type),c=t&&t.target&&t.target.src;f.message="Loading chunk "+a+" failed.\n("+d+": "+c+")",f.name="ChunkLoadError",f.type=d,f.request=c,r[1](f)}},"chunk-"+a,a)}},b.O.j=a=>0===e[a];var a=(a,t)=>{var r,d,[c,f,o]=t,n=0;if(c.some(a=>0!==e[a])){for(r in f)b.o(f,r)&&(b.m[r]=f[r]);if(o)var i=o(b)}for(a&&a(t);n Authentication | HappyView - - + + diff --git a/getting-started/configuration/index.html b/getting-started/configuration/index.html index 32867b5..8fd6bc2 100644 --- a/getting-started/configuration/index.html +++ b/getting-started/configuration/index.html @@ -4,8 +4,8 @@ Configuration | HappyView - - + + diff --git a/getting-started/dashboard/index.html b/getting-started/dashboard/index.html index d8548af..0b46ecd 100644 --- a/getting-started/dashboard/index.html +++ b/getting-started/dashboard/index.html @@ -4,8 +4,8 @@ Dashboard | HappyView - - + + diff --git a/getting-started/deployment/docker/index.html b/getting-started/deployment/docker/index.html index 7f03694..20359a0 100644 --- a/getting-started/deployment/docker/index.html +++ b/getting-started/deployment/docker/index.html @@ -4,8 +4,8 @@ Local Development with Docker | HappyView - - + + diff --git a/getting-started/deployment/other/index.html b/getting-started/deployment/other/index.html index de9c901..80b94dc 100644 --- a/getting-started/deployment/other/index.html +++ b/getting-started/deployment/other/index.html @@ -4,8 +4,8 @@ Local Development from Source | HappyView - - + + diff --git a/getting-started/deployment/railway/index.html b/getting-started/deployment/railway/index.html index 690e5ee..7426844 100644 --- a/getting-started/deployment/railway/index.html +++ b/getting-started/deployment/railway/index.html @@ -4,8 +4,8 @@ Deploy on Railway | HappyView - - + + diff --git a/getting-started/quickstart/index.html b/getting-started/quickstart/index.html index 9787724..d857e84 100644 --- a/getting-started/quickstart/index.html +++ b/getting-started/quickstart/index.html @@ -4,8 +4,8 @@ Quickstart | HappyView - - + + diff --git a/guides/backfill/index.html b/guides/backfill/index.html index d220b29..f6766b4 100644 --- a/guides/backfill/index.html +++ b/guides/backfill/index.html @@ -4,8 +4,8 @@ Backfill | HappyView - - + + diff --git a/guides/lexicons/index.html b/guides/lexicons/index.html index dfa3a4b..9c1bad1 100644 --- a/guides/lexicons/index.html +++ b/guides/lexicons/index.html @@ -4,8 +4,8 @@ Lexicons | HappyView - - + + diff --git a/guides/scripting/index.html b/guides/scripting/index.html index 93dd92e..99ac8ce 100644 --- a/guides/scripting/index.html +++ b/guides/scripting/index.html @@ -4,8 +4,8 @@ Lua Scripting | HappyView - - + + diff --git a/index.html b/index.html index 8f8d8f6..4f7f1ad 100644 --- a/index.html +++ b/index.html @@ -4,8 +4,8 @@ HappyView - - + + diff --git a/reference/admin-api/index.html b/reference/admin-api/index.html index 661c075..b972d0b 100644 --- a/reference/admin-api/index.html +++ b/reference/admin-api/index.html @@ -4,8 +4,8 @@ Admin API | HappyView - - + + diff --git a/reference/architecture/index.html b/reference/architecture/index.html index b64aeaa..828f37f 100644 --- a/reference/architecture/index.html +++ b/reference/architecture/index.html @@ -4,8 +4,8 @@ Architecture | HappyView - - + + diff --git a/reference/glossary/index.html b/reference/glossary/index.html index 22b52e4..97f27a7 100644 --- a/reference/glossary/index.html +++ b/reference/glossary/index.html @@ -4,8 +4,8 @@ Glossary | HappyView - - + + diff --git a/reference/production-deployment/index.html b/reference/production-deployment/index.html index e1b8c49..7453f99 100644 --- a/reference/production-deployment/index.html +++ b/reference/production-deployment/index.html @@ -4,8 +4,8 @@ Deployment | HappyView - - + + diff --git a/reference/scripts/batch-save/index.html b/reference/scripts/batch-save/index.html index 124dcc6..2360e23 100644 --- a/reference/scripts/batch-save/index.html +++ b/reference/scripts/batch-save/index.html @@ -4,8 +4,8 @@ Procedure: Batch Save | HappyView - - + + diff --git a/reference/scripts/cascading-delete/index.html b/reference/scripts/cascading-delete/index.html index f211199..3e099ae 100644 --- a/reference/scripts/cascading-delete/index.html +++ b/reference/scripts/cascading-delete/index.html @@ -4,8 +4,8 @@ Procedure: Cascading Delete | HappyView - - + + diff --git a/reference/scripts/complex-mutations/index.html b/reference/scripts/complex-mutations/index.html index 2e65f51..4084a50 100644 --- a/reference/scripts/complex-mutations/index.html +++ b/reference/scripts/complex-mutations/index.html @@ -4,8 +4,8 @@ Procedure: Complex Mutations | HappyView - - + + diff --git a/reference/scripts/create-record/index.html b/reference/scripts/create-record/index.html index 13526b5..42f6015 100644 --- a/reference/scripts/create-record/index.html +++ b/reference/scripts/create-record/index.html @@ -4,8 +4,8 @@ Procedure: Create a Record | HappyView - - + + diff --git a/reference/scripts/expanded-query/index.html b/reference/scripts/expanded-query/index.html index 877a139..cc7275d 100644 --- a/reference/scripts/expanded-query/index.html +++ b/reference/scripts/expanded-query/index.html @@ -4,8 +4,8 @@ Query: Expanded Query with Profiles | HappyView - - + + diff --git a/reference/scripts/get-record/index.html b/reference/scripts/get-record/index.html index e391109..ff172d2 100644 --- a/reference/scripts/get-record/index.html +++ b/reference/scripts/get-record/index.html @@ -4,8 +4,8 @@ Query: Get a Single Record | HappyView - - + + diff --git a/reference/scripts/list-or-fetch/index.html b/reference/scripts/list-or-fetch/index.html index 7c66ec4..201f5aa 100644 --- a/reference/scripts/list-or-fetch/index.html +++ b/reference/scripts/list-or-fetch/index.html @@ -4,8 +4,8 @@ Query: List or Fetch Records | HappyView - - + + diff --git a/reference/scripts/paginated-list/index.html b/reference/scripts/paginated-list/index.html index 50ac2ff..9ef0396 100644 --- a/reference/scripts/paginated-list/index.html +++ b/reference/scripts/paginated-list/index.html @@ -4,8 +4,8 @@ Query: Paginated List | HappyView - - + + diff --git a/reference/scripts/sidecar-records/index.html b/reference/scripts/sidecar-records/index.html index 615fb55..56ea2b5 100644 --- a/reference/scripts/sidecar-records/index.html +++ b/reference/scripts/sidecar-records/index.html @@ -4,8 +4,8 @@ Procedure: Create Sidecar Records | HappyView - - + + diff --git a/reference/scripts/update-or-delete/index.html b/reference/scripts/update-or-delete/index.html index db7f339..30ae416 100644 --- a/reference/scripts/update-or-delete/index.html +++ b/reference/scripts/update-or-delete/index.html @@ -4,8 +4,8 @@ Procedure: Update or Delete | HappyView - - + + diff --git a/reference/scripts/upsert-record/index.html b/reference/scripts/upsert-record/index.html index 83a0278..a97cc2b 100644 --- a/reference/scripts/upsert-record/index.html +++ b/reference/scripts/upsert-record/index.html @@ -4,8 +4,8 @@ Procedure: Upsert a Record | HappyView - - + + diff --git a/reference/troubleshooting/index.html b/reference/troubleshooting/index.html index 72f0715..72c38b2 100644 --- a/reference/troubleshooting/index.html +++ b/reference/troubleshooting/index.html @@ -4,8 +4,8 @@ Troubleshooting | HappyView - - + + diff --git a/reference/xrpc-api/index.html b/reference/xrpc-api/index.html index 7b685a9..fc65709 100644 --- a/reference/xrpc-api/index.html +++ b/reference/xrpc-api/index.html @@ -4,8 +4,8 @@ XRPC API | HappyView - - + + diff --git a/tutorials/statusphere/index.html b/tutorials/statusphere/index.html index 571bb39..d3ff413 100644 --- a/tutorials/statusphere/index.html +++ b/tutorials/statusphere/index.html @@ -4,8 +4,8 @@ Tutorial: Statusphere with HappyView | HappyView - - + +