volute 0.49.0 → 0.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/{accept-KYNC5X3U.js → accept-5NK5XJB5.js} +2 -1
- package/dist/{activity-events-GJJAI2WT.js → activity-events-LQII6PZS.js} +3 -3
- package/dist/{ai-service-A7FS7EC3.js → ai-service-YW5SWCSB.js} +9 -4
- package/dist/{archive-7E3YE6VF.js → archive-FOHGXHPT.js} +3 -3
- package/dist/{auth-ABYLOEZ7.js → auth-X6EMNEGB.js} +10 -6
- package/dist/{avatar-image-6ATV2IOZ.js → avatar-image-52WGXLHV.js} +3 -3
- package/dist/{backup-XYAMT4CU.js → backup-YVGV2ZNM.js} +11 -12
- package/dist/{bridge-3FNSWLNQ.js → bridge-YK7NTRU5.js} +2 -1
- package/dist/{channels-SGQZHNQJ.js → channels-FSAHOQWI.js} +2 -1
- package/dist/{chat-OGXAEXMV.js → chat-VAZ25KVT.js} +9 -9
- package/dist/{chunk-P4LHVRNE.js → chunk-2RNMBXD2.js} +43 -19
- package/dist/{chunk-6HGEZJDH.js → chunk-5N32EN4O.js} +2 -2
- package/dist/{chunk-JCWB2ITW.js → chunk-5Y54AE3L.js} +35 -5
- package/dist/{chunk-HCYQRME2.js → chunk-6NLW72HP.js} +2 -2
- package/dist/chunk-7HN63Q7J.js +1317 -0
- package/dist/chunk-7YJY3F2R.js +38 -0
- package/dist/{chunk-EADX54RG.js → chunk-AI47FDGL.js} +6 -7
- package/dist/{chunk-IH5TKXX6.js → chunk-BSHZ23MS.js} +12 -11
- package/dist/{chunk-K3JOLGWF.js → chunk-CDKQJWGK.js} +76 -63
- package/dist/{chunk-L27YYONJ.js → chunk-CV6BNGFK.js} +3 -3
- package/dist/{chunk-NOIAHMJB.js → chunk-DMK5ASKV.js} +1 -1
- package/dist/chunk-DN3LKLYR.js +109 -0
- package/dist/{chunk-JBIFXB6I.js → chunk-EDR47UE2.js} +3 -5
- package/dist/{chunk-SHKM5RGD.js → chunk-EEOMA4DX.js} +1 -1
- package/dist/{chunk-YIJGKHIS.js → chunk-EGV6R6UF.js} +43 -20
- package/dist/{chunk-KHCKZ36O.js → chunk-FLIEXG2T.js} +1 -1
- package/dist/chunk-FNJCBRD3.js +31 -0
- package/dist/{chunk-JPGHSXSV.js → chunk-FXWBFDQR.js} +23 -9
- package/dist/{chunk-JCBPU57A.js → chunk-G7A5LEVI.js} +6 -6
- package/dist/{chunk-PY24ZL62.js → chunk-GLM7TVWP.js} +1 -1
- package/dist/{chunk-RSBL3FAD.js → chunk-H6X6CKDN.js} +235 -24
- package/dist/{chunk-4DSGN4FL.js → chunk-HKP6OAJP.js} +43 -13
- package/dist/{chunk-C3KLHJDB.js → chunk-HTRSSOHY.js} +1 -1
- package/dist/{chunk-EG5LSKHU.js → chunk-I7U5EEZC.js} +2 -2
- package/dist/chunk-ICL6T4SN.js +562 -0
- package/dist/{chunk-FBBS4BVR.js → chunk-ICXY54ZC.js} +1 -1
- package/dist/{chunk-DAIIMBLB.js → chunk-IWAVIJO2.js} +3 -5
- package/dist/{chunk-TXJL36ZQ.js → chunk-JHKBALS2.js} +2 -2
- package/dist/{chunk-MG3Z34YE.js → chunk-L7BKTZ5U.js} +1 -1
- package/dist/{chunk-SX72DOO3.js → chunk-LAUCO2HC.js} +1 -1
- package/dist/chunk-LNNI3MS4.js +54 -0
- package/dist/{chunk-BCG45AQB.js → chunk-M74I3HHF.js} +15 -5
- package/dist/{chunk-DVN6DNMI.js → chunk-M77B73VV.js} +17 -2
- package/dist/{chunk-4B62E4CG.js → chunk-OXWUEU5V.js} +2 -2
- package/dist/chunk-Q7XQLKZB.js +289 -0
- package/dist/{chunk-GWVFDUNB.js → chunk-QT4D5XCI.js} +8 -10
- package/dist/{chunk-VNRSXEBF.js → chunk-TPX6E6PL.js} +38 -5
- package/dist/{chunk-3B427GUK.js → chunk-U54PJPTB.js} +2 -2
- package/dist/{chunk-EFT2OALG.js → chunk-UDZLPR34.js} +20 -5
- package/dist/{chunk-ZX46PGCC.js → chunk-UFTDRTCP.js} +1 -1
- package/dist/chunk-VAEZCIJC.js +1058 -0
- package/dist/chunk-VP5PFNZO.js +2905 -0
- package/dist/{chunk-VIUH5CHQ.js → chunk-VSBMLB2W.js} +51 -34
- package/dist/{chunk-RRZ4RQQU.js → chunk-X67BDDZR.js} +5 -7
- package/dist/cli.js +34 -27
- package/dist/{clock-6JZL2FS6.js → clock-ZT5YT6HA.js} +4 -3
- package/dist/{cloud-sync-VFDTNNCA.js → cloud-sync-GPXYPTIC.js} +23 -20
- package/dist/{config-RPSLA2HX.js → config-UGJS57VT.js} +3 -3
- package/dist/{conversations-TUM5PJJ4.js → conversations-ZL6PHROD.js} +8 -4
- package/dist/{create-Z5FSDNVZ.js → create-G2RIKQYK.js} +2 -2
- package/dist/{create-VIQVP3QB.js → create-M727VUDF.js} +2 -1
- package/dist/{daemon-client-ZFY5MOAL.js → daemon-client-VVYFZI2D.js} +2 -1
- package/dist/{daemon-restart-54L4B6AQ.js → daemon-restart-2EWBRTN5.js} +6 -7
- package/dist/daemon.js +2005 -762
- package/dist/{db-F6UMFRYD.js → db-BONH4SUG.js} +2 -2
- package/dist/{delete-ESEP7NGQ.js → delete-O7PEFQDF.js} +1 -1
- package/dist/delivery-manager-HGVZSEES.js +35 -0
- package/dist/{delivery-router-VUOL5YSA.js → delivery-router-RHANNTAC.js} +7 -5
- package/dist/{down-6X7KX7BZ.js → down-QSNEMTTX.js} +5 -5
- package/dist/echo-text-6ANI5HHN.js +39 -0
- package/dist/{env-ZYMSCB7B.js → env-IBW2QI6K.js} +3 -2
- package/dist/{env-KUL4XKN2.js → env-SQFCWW52.js} +3 -3
- package/dist/{exec-FBXA3CM4.js → exec-ABD3DYA2.js} +3 -3
- package/dist/{export-TNBPDH77.js → export-VBNWM7I4.js} +4 -4
- package/dist/{extension-J4ZQ2GHV.js → extension-MRYJWSMV.js} +2 -1
- package/dist/{extensions-AWNO3SZF.js → extensions-NY6WST33.js} +23 -20
- package/dist/{files-BVBRJJ2P.js → files-BRY5RRIM.js} +5 -4
- package/dist/{import-ZUNKMCKC.js → import-DB2KULRO.js} +8 -8
- package/dist/{isolation-OPCZQRTH.js → isolation-GVV2IBAU.js} +5 -3
- package/dist/{join-34TR2GXQ.js → join-PYA36HEC.js} +1 -1
- package/dist/{list-PMUXZNAM.js → list-UQGIW7OF.js} +8 -3
- package/dist/{login-LKNLCJPA.js → login-RJJTCVR3.js} +2 -1
- package/dist/{login-KAKNFCW5.js → login-SB5OENMV.js} +4 -3
- package/dist/{logout-YZRMZ3O2.js → logout-BYV433X6.js} +2 -1
- package/dist/{logout-RLT62RQP.js → logout-YFZAJRPY.js} +4 -3
- package/dist/message-delivery-JHMAJ2GU.js +43 -0
- package/dist/migrate-thread-config-EQSEP2XG.js +90 -0
- package/dist/{mind-IF6CGMFW.js → mind-WF6QIXWV.js} +19 -19
- package/dist/{mind-activity-tracker-YMMERB6B.js → mind-activity-tracker-QF6DCX2X.js} +4 -4
- package/dist/{mind-contacts-BKUFPUCU.js → mind-contacts-QYU4TPEA.js} +3 -2
- package/dist/{mind-history-WI5OI3BW.js → mind-history-OGNR4L7W.js} +30 -7
- package/dist/{mind-list-OTHV4ZO4.js → mind-list-SYRA7CH5.js} +3 -2
- package/dist/{mind-profile-LUG353ZT.js → mind-profile-MRCVZPYT.js} +1 -1
- package/dist/mind-service-DZCUUC7J.js +47 -0
- package/dist/{mind-sleep-VBV7YRSU.js → mind-sleep-LZAFBDZD.js} +4 -3
- package/dist/{mind-status-BJNPGXKC.js → mind-status-Z2LQFA6F.js} +3 -2
- package/dist/{mind-wake-LVTZ55EZ.js → mind-wake-LDGPRA42.js} +2 -1
- package/dist/{package-PD67VPHB.js → package-B6O5APCZ.js} +23 -23
- package/dist/{prompts-MDHDLWEX.js → prompts-NBO3HRK3.js} +3 -3
- package/dist/{read-YSWUXYL7.js → read-RJ5NAW5J.js} +5 -14
- package/dist/{register-TWQDKQRT.js → register-OX4HRSGC.js} +2 -1
- package/dist/{registry-3ELJPUGJ.js → registry-TRC2HJXR.js} +6 -4
- package/dist/{reject-SXGCYN4A.js → reject-TWB4QJHG.js} +2 -1
- package/dist/{restart-5F5QDBOG.js → restart-AGEGNSYQ.js} +2 -1
- package/dist/{sandbox-XPYA7UIF.js → sandbox-NNWCTHRI.js} +7 -4
- package/dist/scheduler-TNBN54ZK.js +25 -0
- package/dist/{schema-6YONVTKZ.js → schema-ZZQVM4GR.js} +5 -3
- package/dist/{seed-NQED7PSX.js → seed-K2LYODIH.js} +1 -1
- package/dist/{seed-check-TYD7RRZY.js → seed-check-NRJEQZST.js} +14 -5
- package/dist/{seed-cmd-QF3F2G4S.js → seed-cmd-2EWBTR6P.js} +3 -3
- package/dist/{seed-create-XOO4N2OE.js → seed-create-VGTLU5FD.js} +4 -4
- package/dist/{seed-readiness-3LRYASA4.js → seed-readiness-DYOVCYHN.js} +4 -5
- package/dist/{seed-sprout-HSBBGSS2.js → seed-sprout-PILHJ3YS.js} +9 -9
- package/dist/{send-IHRJYNXA.js → send-2YKOZJJ5.js} +108 -54
- package/dist/{service-YCOPCTSZ.js → service-XQPMZAGI.js} +4 -4
- package/dist/{service-install-Y46OTF55.js → service-install-2EWD7KXD.js} +5 -5
- package/dist/{setup-F4TE64YI.js → setup-MDPSK2XG.js} +6 -7
- package/dist/{setup-TCN7VH5U.js → setup-WZSXHHRJ.js} +10 -3
- package/dist/{skill-4CYJLYVY.js → skill-B5OJEQUA.js} +3 -2
- package/dist/skills/dreaming/references/INSTALL.md +2 -2
- package/dist/skills/imagegen/SKILL.md +21 -4
- package/dist/skills/imagegen/scripts/imagegen.ts +124 -21
- package/dist/skills/tending/SKILL.md +7 -7
- package/dist/skills/volute-mind/SKILL.md +3 -3
- package/dist/skills/volute-mind/references/integrations.md +2 -2
- package/dist/skills/volute-mind/references/routing.md +15 -15
- package/dist/{skills-NN5UZCUU.js → skills-NH2GQKAF.js} +4 -5
- package/dist/sleep-manager-7JXEQQ2P.js +41 -0
- package/dist/{spirit-SSJMYC6A.js → spirit-25JVAL3M.js} +11 -8
- package/dist/spirit-availability-PJDWZJ3J.js +42 -0
- package/dist/{split-JF2VWTXA.js → split-BU5VWX6P.js} +1 -1
- package/dist/{sprout-AXA2SECQ.js → sprout-EXUZMIOR.js} +1 -1
- package/dist/{src-YH6PQ7LJ.js → src-HGNE2XG4.js} +7 -1
- package/dist/{src-ZN4LXMPI.js → src-LCSOQY6Z.js} +57 -51
- package/dist/{src-JAOVXO5W.js → src-UDMJZ6MH.js} +8 -8
- package/dist/{start-BTVMTP3K.js → start-MUMNFR52.js} +2 -1
- package/dist/{status-VJGXMQ4L.js → status-MWLE3RVC.js} +7 -6
- package/dist/{stop-YORESK4U.js → stop-EKERNYTX.js} +2 -1
- package/dist/system-events-ZPSH63QX.js +46 -0
- package/dist/system-install-YZSWCPDK.js +8 -0
- package/dist/{systems-5MH2ELQE.js → systems-VDRUZXNF.js} +5 -4
- package/dist/{tailscale-AMMVKDXB.js → tailscale-KHNZFC7L.js} +2 -2
- package/dist/{template-hash-GSOUARW4.js → template-hash-YKWMVYMM.js} +2 -2
- package/dist/{template-staleness-HKGCTS3H.js → template-staleness-PY2CULH6.js} +5 -5
- package/dist/{turn-tracker-JQ2YUUY2.js → turn-tracker-TAT2HGK6.js} +6 -6
- package/dist/{up-SDLTLPAO.js → up-J7XCAH7P.js} +5 -6
- package/dist/{update-WEA4N2TR.js → update-CIWI2JYA.js} +5 -5
- package/dist/{update-check-DZOTONII.js → update-check-SZ7B5IFI.js} +3 -3
- package/dist/{upgrade-K5FIQPQD.js → upgrade-LIE46UBB.js} +1 -1
- package/dist/variant-cleanup-YXN25ZVW.js +22 -0
- package/dist/{version-notify-WFA5XB5A.js → version-notify-EN3KJ7HH.js} +11 -28
- package/dist/web-assets/assets/index-BOyJ4Gqs.css +1 -0
- package/dist/web-assets/assets/index-CrxBwnzp.js +95 -0
- package/dist/web-assets/index.html +2 -2
- package/dist/xai-P42CRCZA.js +129 -0
- package/drizzle/0014_system_events.sql +26 -0
- package/drizzle/0015_rename_session_to_thread.sql +12 -0
- package/drizzle/0016_brain_to_human.sql +4 -0
- package/drizzle/0017_event_history_rows.sql +9 -0
- package/drizzle/0018_api_tokens.sql +20 -0
- package/drizzle/meta/_journal.json +35 -0
- package/package.json +23 -23
- package/packages/extensions/notes/dist/ui/assets/index-BBs8pyel.js +67 -0
- package/packages/extensions/notes/dist/ui/index.html +1 -1
- package/packages/extensions/pages/dist/ui/assets/index-B589e8Xe.js +2 -0
- package/packages/extensions/pages/dist/ui/index.html +1 -1
- package/packages/extensions/plan/dist/ui/assets/index-B8s8wxyt.js +67 -0
- package/packages/extensions/plan/dist/ui/index.html +1 -1
- package/templates/_base/.init/.config/prompts.json +1 -0
- package/templates/_base/.init/.local/hooks/startup-context.ts +24 -9
- package/templates/_base/{biome.json.tmpl → biome.json} +2 -1
- package/templates/_base/gitignore +44 -0
- package/templates/_base/home/.config/routes.json +2 -2
- package/templates/_base/home/VOLUTE.md +18 -5
- package/templates/_base/home/public/.gitkeep +0 -0
- package/templates/_base/src/lib/daemon-client.ts +1 -1
- package/templates/_base/src/lib/event-turn.ts +39 -0
- package/templates/_base/src/lib/format-prefix.ts +36 -10
- package/templates/_base/src/lib/router.ts +19 -10
- package/templates/_base/src/lib/routing.ts +8 -8
- package/templates/_base/src/lib/startup.ts +9 -1
- package/templates/_base/src/lib/types.ts +7 -1
- package/templates/_base/src/lib/volute-server.ts +30 -1
- package/templates/claude/.init/.config/routes.json +3 -3
- package/templates/claude/.init/CLAUDE.md +1 -1
- package/templates/claude/{package.json.tmpl → package.json} +4 -4
- package/templates/claude/src/agent.ts +4 -1
- package/templates/claude/src/lib/hooks/reply-instructions.ts +26 -1
- package/templates/claude/volute-template.json +1 -3
- package/templates/codex/.init/.config/routes.json +3 -3
- package/templates/codex/.init/AGENTS.md +1 -1
- package/templates/codex/{package.json.tmpl → package.json} +4 -4
- package/templates/codex/src/agent.ts +11 -11
- package/templates/codex/src/lib/turn-context.ts +51 -0
- package/templates/codex/volute-template.json +1 -3
- package/templates/pi/.init/.config/routes.json +3 -3
- package/templates/pi/.init/MINDS.md +1 -1
- package/templates/pi/{package.json.tmpl → package.json} +6 -6
- package/templates/pi/src/agent.ts +9 -1
- package/templates/pi/src/lib/event-handler.ts +1 -1
- package/templates/pi/src/lib/reply-instructions-extension.ts +28 -1
- package/templates/pi/volute-template.json +1 -3
- package/dist/chunk-5T5YMX6S.js +0 -23
- package/dist/chunk-NJHN6IRB.js +0 -177
- package/dist/chunk-QQBOI3QA.js +0 -5345
- package/dist/chunk-XTEKINWG.js +0 -158
- package/dist/delivery-manager-RBXBPVWM.js +0 -36
- package/dist/echo-text-B6NZ5FGE.js +0 -36
- package/dist/message-delivery-ABPV76EA.js +0 -42
- package/dist/mind-service-42GDO4KH.js +0 -44
- package/dist/notices-N6BCGHFV.js +0 -25
- package/dist/scheduler-K7Y7Z7FQ.js +0 -34
- package/dist/sleep-manager-DSPXFHGX.js +0 -38
- package/dist/system-chat-M2XOBKEM.js +0 -40
- package/dist/variant-cleanup-P4MBNLJD.js +0 -33
- package/dist/web-assets/assets/index-BostMFoR.css +0 -1
- package/dist/web-assets/assets/index-CKlqUkyG.js +0 -92
- package/packages/extensions/notes/dist/ui/assets/index-D0-DgYyj.js +0 -67
- package/packages/extensions/pages/dist/ui/assets/index-DtzftuPA.js +0 -2
- package/packages/extensions/plan/dist/ui/assets/index-Cfzs-0G9.js +0 -67
- /package/templates/_base/home/.config/{config.json.tmpl → config.json} +0 -0
- /package/templates/codex/home/.config/{config.json.tmpl → config.json} +0 -0
- /package/templates/pi/home/.config/{config.json.tmpl → config.json} +0 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=Array.isArray,t=Array.prototype.indexOf,n=Array.prototype.includes,r=Array.from,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyDescriptors,s=Object.prototype,c=Array.prototype,l=Object.getPrototypeOf,u=Object.isExtensible,d=()=>{};function f(e){for(var t=0;t<e.length;t++)e[t]()}function p(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}var m=1<<24,h=1024,g=2048,_=4096,v=8192,y=16384,b=32768,x=1<<25,S=65536,ee=1<<19,te=1<<20,ne=1<<25,re=65536,ie=1<<21,ae=1<<22,oe=1<<23,se=Symbol(`$state`),ce=Symbol(`legacy props`),le=Symbol(``),ue=Symbol(`attributes`),de=Symbol(`class`),fe=Symbol(`style`),C=Symbol(`text`),pe=Symbol(`form reset`),me=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},he=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function ge(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function _e(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function ve(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function ye(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function be(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function xe(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function w(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Se(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function T(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function Ce(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function E(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function we(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var Te={},D=Symbol(`uninitialized`),Ee=`http://www.w3.org/1999/xhtml`;function De(){console.warn(`https://svelte.dev/e/derived_inert`)}function Oe(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function ke(){console.warn(`https://svelte.dev/e/select_multiple_invalid_value`)}function Ae(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var O=!1;function je(e){O=e}var k;function A(e){if(e===null)throw Oe(),Te;return k=e}function Me(){return A(tn(k))}function j(e){if(O){if(tn(k)!==null)throw Oe(),Te;k=e}}function Ne(e=1){if(O){for(var t=e,n=k;t--;)n=tn(n);k=n}}function Pe(e=!0){for(var t=0,n=k;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else(r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=tn(n);e&&n.remove(),n=i}}function Fe(e){if(!e||e.nodeType!==8)throw Oe(),Te;return e.data}function Ie(e){return e===this.v}function Le(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function Re(e){return!Le(e,this.v)}var M=null;function ze(e){M=e}function Be(e,t=!1,n){M={p:M,i:!1,c:null,e:null,s:e,x:null,r:V,l:null}}function Ve(e){var t=M,n=t.e;if(n!==null){t.e=null;for(var r of n)yn(r)}return e!==void 0&&(t.x=e),t.i=!0,M=t.p,e??{}}function He(){return!0}var Ue=[];function We(){var e=Ue;Ue=[],f(e)}function Ge(e){if(Ue.length===0&&!xt){var t=Ue;queueMicrotask(()=>{t===Ue&&We()})}Ue.push(e)}function Ke(e){var t=V;if(t===null)return B.f|=oe,e;if(!(t.f&32768)&&!(t.f&4))throw e;qe(e,t)}function qe(e,t){if(!(t!==null&&t.f&16384)){for(;t!==null;){if(t.f&128){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}}var Je=~(g|_|h);function N(e,t){e.f=e.f&Je|t}function Ye(e){e.f&512||e.deps===null?N(e,h):N(e,_)}function Xe(e){if(e!==null)for(let t of e)!(t.f&2)||!(t.f&65536)||(t.f^=re,Xe(t.deps))}function Ze(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),Xe(e.deps),N(e,h)}var Qe=!1;function $e(e){var t=Qe;try{return Qe=!1,[e(),Qe]}finally{Qe=t}}function et(e){let t=0,n=zt(0),r;return()=>{gn()&&(H(n),Cn(()=>(t===0&&(r=ur(()=>e(()=>Ut(n)))),t+=1,()=>{Ge(()=>{--t,t===0&&(r?.(),r=void 0,Ut(n))})})))}}var tt=S|ee;function nt(e,t,n,r){new rt(e,t,n,r)}var rt=class{parent;is_pending=!1;transform_error;#e;#t=O?k:null;#n;#r;#i;#a=null;#o=null;#s=null;#c=null;#l=0;#u=0;#d=!1;#f=new Set;#p=new Set;#m=null;#h=et(()=>(this.#m=zt(this.#l),()=>{this.#m=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=V;t.b=this,t.f|=128,n(e)},this.parent=V.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=Tn(()=>{if(O){let e=this.#t;Me();let t=e.data===`[!`;if(e.data.startsWith(`[?`)){let t=JSON.parse(e.data.slice(2));this.#_(t)}else t?this.#v():this.#g()}else this.#y()},tt),O&&(this.#e=k)}#g(){try{this.#a=Dn(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed;t&&(this.#s=Dn(()=>{t(this.#e,()=>e,()=>()=>{})}))}#v(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=Dn(()=>e(this.#e)),Ge(()=>{var e=this.#c=document.createDocumentFragment(),t=$t();e.append(t),this.#a=this.#x(()=>Dn(()=>this.#r(t))),this.#u===0&&(this.#e.before(e),this.#c=null,Nn(this.#o,()=>{this.#o=null}),this.#b(F))}))}#y(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=Dn(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();Ln(this.#a,e);let t=this.#n.pending;this.#o=Dn(()=>t(this.#e))}else this.#b(F)}catch(e){this.error(e)}}#b(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){Ze(e,this.#f,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#x(e){var t=V,n=B,r=M;Wn(this.#i),Un(this.#i),ze(this.#i.ctx);try{return Dt.ensure(),e()}catch(e){return Ke(e),null}finally{Wn(t),Un(n),ze(r)}}#S(e,t){if(!this.has_pending_snippet()){this.parent&&this.parent.#S(e,t);return}this.#u+=e,this.#u===0&&(this.#b(t),this.#o&&Nn(this.#o,()=>{this.#o=null}),this.#c&&=(this.#e.before(this.#c),null))}update_pending_count(e,t){this.#S(e,t),this.#l+=e,!(!this.#m||this.#d)&&(this.#d=!0,Ge(()=>{this.#d=!1,this.#m&&Vt(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),H(this.#m)}error(e){if(!this.#n.onerror&&!this.#n.failed)throw e;F?.is_fork?(this.#a&&F.skip_effect(this.#a),this.#o&&F.skip_effect(this.#o),this.#s&&F.skip_effect(this.#s),F.oncommit(()=>{this.#C(e)})):this.#C(e)}#C(e){this.#a&&=(z(this.#a),null),this.#o&&=(z(this.#o),null),this.#s&&=(z(this.#s),null),O&&(A(this.#t),Ne(),A(Pe()));var t=this.#n.onerror;let n=this.#n.failed;var r=!1,i=!1;let a=()=>{if(r){Ae();return}r=!0,i&&we(),this.#s!==null&&Nn(this.#s,()=>{this.#s=null}),this.#x(()=>{this.#y()})},o=e=>{try{i=!0,t?.(e,a),i=!1}catch(e){qe(e,this.#i&&this.#i.parent)}n&&(this.#s=this.#x(()=>{try{return Dn(()=>{var t=V;t.b=this,t.f|=128,n(this.#e,()=>e,()=>a)})}catch(e){return qe(e,this.#i.parent),null}}))};Ge(()=>{var t;try{t=this.transform_error(e)}catch(e){qe(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(o,e=>qe(e,this.#i&&this.#i.parent)):o(t)})}};function it(e,t,n,r){let i=He()?st:dt;var a=e.filter(e=>!e.settled),o=t.map(i);if(n.length===0&&a.length===0){r(o);return}var s=V,c=at(),l=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function u(e){if(!(s.f&16384)){c();try{r([...o,...e])}catch(e){qe(e,s)}P()}}var d=ot();if(n.length===0){l.then(()=>u([])).finally(d);return}function f(){Promise.all(n.map(e=>lt(e))).then(u).catch(e=>qe(e,s)).finally(d)}l?l.then(()=>{c(),f(),P()}):f()}function at(){var e=V,t=B,n=M,r=F;return function(i=!0){Wn(e),Un(t),ze(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function P(e=!0){Wn(null),Un(null),ze(null),e&&F?.deactivate()}function ot(){var e=V,t=e.b,n=F,r=!!t?.is_rendered();return t?.update_pending_count(1,n),n.increment(r,e),()=>{t?.update_pending_count(-1,n),n.decrement(r,e)}}function st(e){var t=2|g;return V!==null&&(V.f|=ee),{ctx:M,deps:null,effects:null,equals:Ie,f:t,fn:e,reactions:null,rv:0,v:D,wv:0,parent:V,ac:null}}var ct=Symbol(`obsolete`);function lt(e,t,n){let r=V;r===null&&_e();var i=void 0,a=zt(D),o=!B,s=new Set;return Sn(()=>{var t=V,n=p();i=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==me&&n.reject(e)}).finally(P)}catch(e){n.reject(e),P()}var c=F;if(o){if(t.f&32768)var l=ot();if(r.b?.is_rendered())c.async_deriveds.get(t)?.reject(ct);else for(let e of s.values())e.reject(ct);s.add(n),c.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),s.delete(n),t!==ct&&(c.activate(),t?(a.f|=oe,Vt(a,t)):(a.f&8388608&&(a.f^=oe),Vt(a,e)),c.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),_n(()=>{for(let e of s)e.reject(ct)}),new Promise(e=>{function t(n){function r(){n===i?e(a):t(i)}n.then(r,r)}t(i)})}function ut(e){let t=st(e);return Kn(t),t}function dt(e){let t=st(e);return t.equals=Re,t}function ft(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)z(t[n])}}function pt(e){var t,n=V,r=e.parent;if(!Bn&&r!==null&&e.v!==D&&r.f&24576)return De(),e.v;Wn(r);try{e.f&=~re,ft(e),t=ir(e)}finally{Wn(n)}return t}function mt(e){var t=pt(e);if(!e.equals(t)&&(e.wv=tr(),(!F?.is_fork||e.deps===null)&&(F===null?e.v=t:(F.capture(e,t,!0),vt?.capture(e,t,!0)),e.deps===null))){N(e,h);return}Bn||(yt===null?Ye(e):(gn()||F?.is_fork)&&yt.set(e,t))}function ht(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(me),t.fn!==null&&(t.teardown=d),t.ac=null,or(t,0),kn(t))}function gt(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&sr(t)}var _t=null,F=null,vt=null,yt=null,bt=null,xt=!1,St=!1,Ct=null,wt=null,Tt=0,Et=1,Dt=class e{id=Et++;#e=!1;linked=!0;#t=null;#n=null;async_deriveds=new Map;current=new Map;previous=new Map;#r=new Set;#i=new Set;#a=0;#o=new Map;#s=null;#c=[];#l=[];#u=new Set;#d=new Set;#f=new Map;#p=new Set;is_fork=!1;#m=!1;constructor(){_t===null?_t=this:(_t.#n=this,this.#t=_t),_t=this}#h(){if(this.is_fork)return!0;for(let n of this.#o.keys()){for(var e=n,t=!1;e.parent!==null;){if(this.#f.has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}skip_effect(e){this.#f.has(e)||this.#f.set(e,{d:[],m:[]}),this.#p.delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=this.#f.get(e);if(n){this.#f.delete(e);for(var r of n.d)N(r,g),t(r);for(r of n.m)N(r,_),t(r)}this.#p.add(e)}#g(){this.#e=!0,Tt++>1e3&&(this.#x(),Ot());for(let e of this.#u)this.#d.delete(e),N(e,g),this.schedule(e);for(let e of this.#d)N(e,_),this.schedule(e);let t=this.#c;this.#c=[],this.apply();var n=Ct=[],r=[],i=wt=[];for(let e of t)try{this.#_(e,n,r)}catch(t){throw Ft(e),this.#h()||this.discard(),t}if(F=null,i.length>0){var a=e.ensure();for(let e of i)a.schedule(e)}if(Ct=null,wt=null,this.#h()){this.#b(r),this.#b(n);for(let[e,t]of this.#f)Pt(e,t);i.length>0&&F.#g();return}let o=this.#v();if(o){this.#b(r),this.#b(n),o.#y(this);return}this.#u.clear(),this.#d.clear();for(let e of this.#r)e(this);this.#r.clear(),vt=this,At(r),At(n),vt=null,this.#s?.resolve();var s=F;if(this.#a===0&&(this.#c.length===0||s!==null)&&this.#x(),this.#c.length>0)if(s!==null){let e=s;e.#c.push(...this.#c.filter(t=>!e.#c.includes(t)))}else s=this;s!==null&&s.#g()}#_(e,t,n){e.f^=h;for(var r=e.first;r!==null;){var i=r.f,a=(i&96)!=0;if(!(a&&i&1024||i&8192||this.#f.has(r))&&r.fn!==null){a?r.f^=h:i&4?t.push(r):nr(r)&&(i&16&&this.#d.add(r),sr(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}#v(){for(var e=this.#t;e!==null;){if(!e.is_fork){for(let[t,[,n]]of this.current)if(e.current.has(t)&&!n)return e}e=e.#t}return null}#y(e){for(let[t,n]of e.current)!this.previous.has(t)&&e.previous.has(t)&&this.previous.set(t,e.previous.get(t)),this.current.set(t,n);for(let[t,n]of e.async_deriveds){let e=this.async_deriveds.get(t);e&&n.promise.then(e.resolve).catch(e.reject)}e.async_deriveds.clear(),this.transfer_effects(e.#u,e.#d);let t=e=>{var n=e.reactions;if(n!==null)for(let e of n){var r=e.f;if(r&2)t(e);else{var i=e;r&4194320&&!this.async_deriveds.has(i)&&(this.#d.delete(i),N(i,g),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),e.#x(),F=this,this.#g()}#b(e){for(var t=0;t<e.length;t+=1)Ze(e[t],this.#u,this.#d)}capture(e,t,n=!1){e.v!==D&&!this.previous.has(e)&&this.previous.set(e,e.v),e.f&8388608||(this.current.set(e,[t,n]),yt?.set(e,t)),this.is_fork||(e.v=t)}activate(){F=this}deactivate(){F=null,yt=null}flush(){try{St=!0,F=this,this.#g()}finally{Tt=0,bt=null,Ct=null,wt=null,St=!1,F=null,yt=null,Lt.clear()}}discard(){for(let e of this.#i)e(this);this.#i.clear();for(let e of this.async_deriveds.values())e.reject(ct);this.#x(),this.#s?.resolve()}register_created_effect(e){this.#l.push(e)}increment(e,t){if(this.#a+=1,e){let e=this.#o.get(t)??0;this.#o.set(t,e+1)}}decrement(e,t){if(--this.#a,e){let e=this.#o.get(t)??0;e===1?this.#o.delete(t):this.#o.set(t,e-1)}this.#m||(this.#m=!0,Ge(()=>{this.#m=!1,this.linked&&this.flush()}))}transfer_effects(e,t){for(let t of e)this.#u.add(t);for(let e of t)this.#d.add(e);e.clear(),t.clear()}oncommit(e){this.#r.add(e)}ondiscard(e){this.#i.add(e)}settled(){return(this.#s??=p()).promise}static ensure(){if(F===null){let t=F=new e;!St&&Ge(()=>{t.#e||t.flush()})}return F}apply(){yt=null}schedule(e){if(bt=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)){e.b.defer_effect(e);return}for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(Ct!==null&&t===V&&(B===null||!(B.f&2)))return;if(n&96){if(!(n&1024))return;t.f^=h}}this.#c.push(t)}#x(){if(this.linked){var e=this.#t,t=this.#n;e===null||(e.#n=t),t===null?_t=e:t.#t=e,this.linked=!1}}};function Ot(){try{w()}catch(e){qe(e,bt)}}var kt=null;function At(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&nr(r)&&(kt=new Set,sr(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&Mn(r),kt?.size>0)){Lt.clear();for(let e of kt){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)kt.has(n)&&(kt.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||sr(n)}}kt.clear()}}kt=null}}function jt(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(let i of e.reactions){let e=i.f;e&2?jt(i,t,n,r):e&4194320&&!(e&2048)&&Mt(i,t,r)&&(N(i,g),Nt(i))}}function Mt(e,t,r){let i=r.get(e);if(i!==void 0)return i;if(e.deps!==null)for(let i of e.deps){if(n.call(t,i))return!0;if(i.f&2&&Mt(i,t,r))return r.set(i,!0),!0}return r.set(e,!1),!1}function Nt(e){F.schedule(e)}function Pt(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),N(e,h);for(var n=e.first;n!==null;)Pt(n,t),n=n.next}}function Ft(e){N(e,h);for(var t=e.first;t!==null;)Ft(t),t=t.next}var It=new Set,Lt=new Map,Rt=!1;function zt(e,t){return{f:0,v:e,reactions:null,equals:Ie,rv:0,wv:0}}function I(e,t){let n=zt(e,t);return Kn(n),n}function Bt(e,t=!1,n=!0){let r=zt(e);return t||(r.equals=Re),r}function L(e,t,n=!1){return B!==null&&(!Hn||B.f&131072)&&He()&&B.f&4325394&&(Gn===null||!Gn.has(e))&&E(),Vt(e,n?Gt(t):t,wt)}function Vt(e,t,n=null){if(!e.equals(t)){Lt.set(e,Bn?t:e.v);var r=Dt.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&&pt(t),yt===null&&Ye(t)}e.wv=tr(),Wt(e,g,n),He()&&V!==null&&V.f&1024&&!(V.f&96)&&(Yn===null?Xn([e]):Yn.push(e)),!r.is_fork&&It.size>0&&!Rt&&Ht()}return t}function Ht(){Rt=!1;for(let e of It){e.f&1024&&N(e,_);let t;try{t=nr(e)}catch{t=!0}t&&sr(e)}It.clear()}function Ut(e){L(e,e.v+1)}function Wt(e,t,n){var r=e.reactions;if(r!==null)for(var i=He(),a=r.length,o=0;o<a;o++){var s=r[o],c=s.f;if(!(!i&&s===V)){var l=(c&g)===0;if(l&&N(s,t),c&131072)It.add(s);else if(c&2){var u=s;yt?.delete(u),c&65536||(c&512&&(V===null||!(V.f&2097152))&&(s.f|=re),Wt(u,_,n))}else if(l){var d=s;c&16&&kt!==null&&kt.add(d),n===null?Nt(d):n.push(d)}}}}function Gt(t){if(typeof t!=`object`||!t||se in t)return t;let n=l(t);if(n!==s&&n!==c)return t;var r=new Map,i=e(t),o=I(0),u=null,d=$n,f=e=>{if($n===d)return e();var t=B,n=$n;Un(null),er(d);var r=e();return Un(t),er(n),r};return i&&r.set(`length`,I(t.length,u)),new Proxy(t,{defineProperty(e,t,n){(!(`value`in n)||n.configurable===!1||n.enumerable===!1||n.writable===!1)&&T();var i=r.get(t);return i===void 0?f(()=>{var e=I(n.value,u);return r.set(t,e),e}):L(i,n.value,!0),!0},deleteProperty(e,t){var n=r.get(t);if(n===void 0){if(t in e){let e=f(()=>I(D,u));r.set(t,e),Ut(o)}}else L(n,D),Ut(o);return!0},get(e,n,i){if(n===se)return t;var o=r.get(n),s=n in e;if(o===void 0&&(!s||a(e,n)?.writable)&&(o=f(()=>I(Gt(s?e[n]:D),u)),r.set(n,o)),o!==void 0){var c=H(o);return c===D?void 0:c}return Reflect.get(e,n,i)},getOwnPropertyDescriptor(e,t){var n=Reflect.getOwnPropertyDescriptor(e,t);if(n&&`value`in n){var i=r.get(t);i&&(n.value=H(i))}else if(n===void 0){var a=r.get(t),o=a?.v;if(a!==void 0&&o!==D)return{enumerable:!0,configurable:!0,value:o,writable:!0}}return n},has(e,t){if(t===se)return!0;var n=r.get(t),i=n!==void 0&&n.v!==D||Reflect.has(e,t);return(n!==void 0||V!==null&&(!i||a(e,t)?.writable))&&(n===void 0&&(n=f(()=>I(i?Gt(e[t]):D,u)),r.set(t,n)),H(n)===D)?!1:i},set(e,t,n,s){var c=r.get(t),l=t in e;if(i&&t===`length`)for(var d=n;d<c.v;d+=1){var p=r.get(d+``);p===void 0?d in e&&(p=f(()=>I(D,u)),r.set(d+``,p)):L(p,D)}if(c===void 0)(!l||a(e,t)?.writable)&&(c=f(()=>I(void 0,u)),L(c,Gt(n)),r.set(t,c));else{l=c.v!==D;var m=f(()=>Gt(n));L(c,m)}var h=Reflect.getOwnPropertyDescriptor(e,t);if(h?.set&&h.set.call(s,n),!l){if(i&&typeof t==`string`){var g=r.get(`length`),_=Number(t);Number.isInteger(_)&&_>=g.v&&L(g,_+1)}Ut(o)}return!0},ownKeys(e){H(o);var t=Reflect.ownKeys(e).filter(e=>{var t=r.get(e);return t===void 0||t.v!==D});for(var[n,i]of r)i.v!==D&&!(n in e)&&t.push(n);return t},setPrototypeOf(){Ce()}})}function Kt(e){try{if(typeof e==`object`&&e&&se in e)return e[se]}catch{}return e}function qt(e,t){return Object.is(Kt(e),Kt(t))}var Jt,Yt,Xt,Zt;function Qt(){if(Jt===void 0){Jt=window,Yt=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Xt=a(t,`firstChild`).get,Zt=a(t,`nextSibling`).get,u(e)&&(e[de]=void 0,e[ue]=null,e[fe]=void 0,e.__e=void 0),u(n)&&(n[C]=void 0)}}function $t(e=``){return document.createTextNode(e)}function en(e){return Xt.call(e)}function tn(e){return Zt.call(e)}function R(e,t){if(!O)return en(e);var n=en(k);if(n===null)n=k.appendChild($t());else if(t&&n.nodeType!==3){var r=$t();return n?.before(r),A(r),r}return t&&cn(n),A(n),n}function nn(e,t=!1){if(!O){var n=en(e);return n instanceof Comment&&n.data===``?tn(n):n}if(t){if(k?.nodeType!==3){var r=$t();return k?.before(r),A(r),r}cn(k)}return k}function rn(e,t=1,n=!1){let r=O?k:e;for(var i;t--;)i=r,r=tn(r);if(!O)return r;if(n){if(r?.nodeType!==3){var a=$t();return r===null?i?.after(a):r.before(a),A(a),a}cn(r)}return A(r),r}function an(e){e.textContent=``}function on(){return!1}function sn(e,t,n){return t==null||t===`http://www.w3.org/1999/xhtml`?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function cn(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function ln(e,t){if(t){let t=document.body;e.autofocus=!0,Ge(()=>{document.activeElement===t&&e.focus()})}}var un=!1;function dn(){un||(un=!0,document.addEventListener(`reset`,e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[pe]?.()})},{capture:!0}))}function fn(e){var t=B,n=V;Un(null),Wn(null);try{return e()}finally{Un(t),Wn(n)}}function pn(e){V===null&&(B===null&&xe(e),be()),Bn&&ye(e)}function mn(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function hn(e,t){var n=V;n!==null&&n.f&8192&&(e|=v);var r={ctx:M,deps:null,nodes:null,f:e|g|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};F?.register_created_effect(r);var i=r;if(e&4)Ct===null?Dt.ensure().schedule(r):Ct.push(r);else if(t!==null){try{sr(r)}catch(e){throw z(r),e}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=S))}if(i!==null&&(i.parent=n,n!==null&&mn(i,n),B!==null&&B.f&2&&!(e&64))){var a=B;(a.effects??=[]).push(i)}return r}function gn(){return B!==null&&!Hn}function _n(e){let t=hn(8,null);return N(t,h),t.teardown=e,t}function vn(e){pn(`$effect`);var t=V.f;if(!B&&t&32&&M!==null&&!M.i){var n=M;(n.e??=[]).push(e)}else return yn(e)}function yn(e){return hn(4|te,e)}function bn(e){Dt.ensure();let t=hn(64|ee,e);return(e={})=>new Promise(n=>{e.outro?Nn(t,()=>{z(t),n(void 0)}):(z(t),n(void 0))})}function xn(e){return hn(4,e)}function Sn(e){return hn(ae|ee,e)}function Cn(e,t=0){return hn(8|t,e)}function wn(e,t=[],n=[],r=[]){it(r,t,n,t=>{hn(8,()=>{e(...t.map(H))})})}function Tn(e,t=0){return hn(16|t,e)}function En(e,t=0){return hn(m|t,e)}function Dn(e){return hn(32|ee,e)}function On(e){var t=e.teardown;if(t!==null){let e=Bn,n=B;Vn(!0),Un(null);try{t.call(null)}finally{Vn(e),Un(n)}}}function kn(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&fn(()=>{e.abort(me)});var r=n.next;n.f&64?n.parent=null:z(n,t),n=r}}function An(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||z(t),t=n}}function z(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(jn(e.nodes.start,e.nodes.end),n=!0),e.f|=x,kn(e,t&&!n),or(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();On(e),e.f^=x,e.f|=y;var i=e.parent;i!==null&&i.first!==null&&Mn(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function jn(e,t){for(;e!==null;){var n=e===t?null:tn(e);e.remove(),e=n}}function Mn(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function Nn(e,t,n=!0){var r=[];Pn(e,r,!0);var i=()=>{n&&z(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function Pn(e,t,n){if(!(e.f&8192)){e.f^=v;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next;if(!(i.f&64)){var o=(i.f&65536)!=0||(i.f&32)!=0&&(e.f&16)!=0;Pn(i,t,o?n:!1)}i=a}}}function Fn(e){In(e,!0)}function In(e,t){if(e.f&8192){e.f^=v,e.f&1024||(N(e,g),Dt.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&65536)!=0||(n.f&32)!=0;In(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function Ln(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:tn(n);t.append(n),n=i}}var Rn=null,zn=!1,Bn=!1;function Vn(e){Bn=e}var B=null,Hn=!1;function Un(e){B=e}var V=null;function Wn(e){V=e}var Gn=null;function Kn(e){B!==null&&(Gn??=new Set).add(e)}var qn=null,Jn=0,Yn=null;function Xn(e){Yn=e}var Zn=1,Qn=0,$n=Qn;function er(e){$n=e}function tr(){return++Zn}function nr(e){var t=e.f;if(t&2048)return!0;if(t&2&&(e.f&=~re),t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(nr(a)&&mt(a),a.wv>e.wv)return!0}t&512&&yt===null&&N(e,h)}return!1}function rr(e,t,n=!0){var r=e.reactions;if(r!==null&&!(Gn!==null&&Gn.has(e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?rr(a,t,!1):t===a&&(n?N(a,g):a.f&1024&&N(a,_),Nt(a))}}function ir(e){var t=qn,n=Jn,r=Yn,i=B,a=Gn,o=M,s=Hn,c=$n,l=e.f;qn=null,Jn=0,Yn=null,B=l&96?null:e,Gn=null,ze(e.ctx),Hn=!1,$n=++Qn,e.ac!==null&&(fn(()=>{e.ac.abort(me)}),e.ac=null);try{e.f|=ie;var u=e.fn,d=u();e.f|=b;var f=e.deps,p=F?.is_fork;if(qn!==null){var m;if(p||or(e,Jn),f!==null&&Jn>0)for(f.length=Jn+qn.length,m=0;m<qn.length;m++)f[Jn+m]=qn[m];else e.deps=f=qn;if(gn()&&e.f&512)for(m=Jn;m<f.length;m++)(f[m].reactions??=[]).push(e)}else!p&&f!==null&&Jn<f.length&&(or(e,Jn),f.length=Jn);if(He()&&Yn!==null&&!Hn&&f!==null&&!(e.f&6146))for(m=0;m<Yn.length;m++)rr(Yn[m],e);if(i!==null&&i!==e){if(Qn++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=Qn;if(t!==null)for(let e of t)e.rv=Qn;Yn!==null&&(r===null?r=Yn:r.push(...Yn))}return e.f&8388608&&(e.f^=oe),d}catch(e){return Ke(e)}finally{e.f^=ie,qn=t,Jn=n,Yn=r,B=i,Gn=a,ze(o),Hn=s,$n=c}}function ar(e,r){let i=r.reactions;if(i!==null){var a=t.call(i,e);if(a!==-1){var o=i.length-1;o===0?i=r.reactions=null:(i[a]=i[o],i.pop())}}if(i===null&&r.f&2&&(qn===null||!n.call(qn,r))){var s=r;s.f&512&&(s.f^=512,s.f&=~re),s.v!==D&&Ye(s),ht(s),or(s,0)}}function or(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)ar(e,n[r])}function sr(e){var t=e.f;if(!(t&16384)){N(e,h);var n=V,r=zn;V=e,zn=!0;try{t&16777232?An(e):kn(e),On(e);var i=ir(e);e.teardown=typeof i==`function`?i:null,e.wv=Zn}finally{zn=r,V=n}}}function H(e){var t=(e.f&2)!=0;if(Rn?.add(e),B!==null&&!Hn&&!(V!==null&&V.f&16384)&&(Gn===null||!Gn.has(e))){var r=B.deps;if(B.f&2097152)e.rv<Qn&&(e.rv=Qn,qn===null&&r!==null&&r[Jn]===e?Jn++:qn===null?qn=[e]:qn.push(e));else{B.deps??=[],n.call(B.deps,e)||B.deps.push(e);var i=e.reactions;i===null?e.reactions=[B]:n.call(i,B)||i.push(B)}}if(Bn&&Lt.has(e))return Lt.get(e);if(t){var a=e;if(Bn){var o=a.v;return(!(a.f&1024)&&a.reactions!==null||lr(a))&&(o=pt(a)),Lt.set(a,o),o}var s=(a.f&512)==0&&!Hn&&B!==null&&(zn||(B.f&512)!=0),c=(a.f&b)===0;nr(a)&&(s&&(a.f|=512),mt(a)),s&&!c&&(gt(a),cr(a))}if(yt?.has(e))return yt.get(e);if(e.f&8388608)throw e.v;return e.v}function cr(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),t.f&2&&!(t.f&512)&&(gt(t),cr(t))}function lr(e){if(e.v===D)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(Lt.has(t)||t.f&2&&lr(t))return!0;return!1}function ur(e){var t=Hn;try{return Hn=!0,e()}finally{Hn=t}}function dr(e){return e.endsWith(`capture`)&&e!==`gotpointercapture`&&e!==`lostpointercapture`}var fr=[`beforeinput`,`click`,`change`,`dblclick`,`contextmenu`,`focusin`,`focusout`,`input`,`keydown`,`keyup`,`mousedown`,`mousemove`,`mouseout`,`mouseover`,`mouseup`,`pointerdown`,`pointermove`,`pointerout`,`pointerover`,`pointerup`,`touchend`,`touchmove`,`touchstart`];function pr(e){return fr.includes(e)}var mr=`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`),hr={formnovalidate:`formNoValidate`,ismap:`isMap`,nomodule:`noModule`,playsinline:`playsInline`,readonly:`readOnly`,defaultvalue:`defaultValue`,defaultchecked:`defaultChecked`,srcobject:`srcObject`,novalidate:`noValidate`,allowfullscreen:`allowFullscreen`,disablepictureinpicture:`disablePictureInPicture`,disableremoteplayback:`disableRemotePlayback`};function gr(e){return e=e.toLowerCase(),hr[e]??e}[...mr];var _r=[`touchstart`,`touchmove`];function vr(e){return _r.includes(e)}var yr=Symbol(`events`),br=new Set,xr=new Set;function Sr(e,t,n,r={}){function i(e){if(r.capture||Er.call(t,e),!e.cancelBubble)return fn(()=>n?.call(this,e))}return e.startsWith(`pointer`)||e.startsWith(`touch`)||e===`wheel`?Ge(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function Cr(e,t,n){(t[yr]??={})[e]=n}function wr(e){for(var t=0;t<e.length;t++)br.add(e[t]);for(var n of xr)n(e)}var Tr=null;function Er(e){var t=this,n=t.ownerDocument,r=e.type,a=e.composedPath?.()||[],o=a[0]||e.target;Tr=e;var s=0,c=Tr===e&&e[yr];if(c){var l=a.indexOf(c);if(l!==-1&&(t===document||t===window)){e[yr]=t;return}var u=a.indexOf(t);if(u===-1)return;l<=u&&(s=l)}if(o=a[s]||e.target,o!==t){i(e,`currentTarget`,{configurable:!0,get(){return o||n}});var d=B,f=V;Un(null),Wn(null);try{for(var p,m=[];o!==null&&o!==t;){try{var h=o[yr]?.[r];h!=null&&(!o.disabled||e.target===o)&&h.call(o,e)}catch(e){p?m.push(e):p=e}if(e.cancelBubble)break;s++,o=s<a.length?a[s]:null}if(p){for(let e of m)queueMicrotask(()=>{throw e});throw p}}finally{e[yr]=t,delete e.currentTarget,Un(d),Wn(f)}}}var Dr=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function Or(e){return Dr?.createHTML(e)??e}function kr(e){var t=sn(`template`);return t.innerHTML=Or(e.replaceAll(`<!>`,`<!---->`)),t.content}function Ar(e,t){var n=V;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function U(e,t){var n=(t&1)!=0,r=(t&2)!=0,i,a=!e.startsWith(`<!>`);return()=>{if(O)return Ar(k,null),k;i===void 0&&(i=kr(a?e:`<!>`+e),n||(i=en(i)));var t=r||Yt?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=en(t),s=t.lastChild;Ar(o,s)}else Ar(t,t);return t}}function jr(e=``){if(!O){var t=$t(e+``);return Ar(t,t),t}var n=k;return n.nodeType===3?cn(n):(n.before(n=$t()),A(n)),Ar(n,n),n}function Mr(){if(O)return Ar(k,null),k;var e=document.createDocumentFragment(),t=document.createComment(``),n=$t();return e.append(t,n),Ar(t,n),e}function W(e,t){if(O){var n=V;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=k),Me();return}e!==null&&e.before(t)}function Nr(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[C]??=e.nodeValue)&&(e[C]=n,e.nodeValue=`${n}`)}function Pr(e,t){return Ir(e,t)}var Fr=new Map;function Ir(e,{target:t,anchor:n,props:i={},events:a,context:o,intro:s=!0,transformError:c}){Qt();var l=void 0,u=bn(()=>{var s=n??t.appendChild($t());nt(s,{pending:()=>{}},t=>{Be({});var n=M;if(o&&(n.c=o),a&&(i.$$events=a),O&&Ar(t,null),l=e(t,i)||{},O&&(V.nodes.end=k,k===null||k.nodeType!==8||k.data!==`]`))throw Oe(),Te;Ve()},c);var u=new Set,d=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!u.has(r)){u.add(r);var i=vr(r);for(let e of[t,document]){var a=Fr.get(e);a===void 0&&(a=new Map,Fr.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,Er,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return d(r(br)),xr.add(d),()=>{for(var e of u)for(let n of[t,document]){var r=Fr.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,Er),r.delete(e),r.size===0&&Fr.delete(n)):r.set(e,i)}xr.delete(d),s!==n&&s.parentNode?.removeChild(s)}});return Lr.set(l,u),l}var Lr=new WeakMap,Rr=class{anchor;#e=new Map;#t=new Map;#n=new Map;#r=new Set;#i=!0;constructor(e,t=!0){this.anchor=e,this.#i=t}#a=e=>{if(this.#e.has(e)){var t=this.#e.get(e),n=this.#t.get(t);if(n)Fn(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(Fn(r.effect),this.#t.set(t,r.effect),this.#n.delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of this.#e){if(this.#e.delete(t),t===e)break;let r=this.#n.get(n);r&&(z(r.effect),this.#n.delete(n))}for(let[e,r]of this.#t){if(e===t||this.#r.has(e))continue;let i=()=>{if(Array.from(this.#e.values()).includes(e)){var t=document.createDocumentFragment();Ln(r,t),t.append($t()),this.#n.set(e,{effect:r,fragment:t})}else z(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),Nn(r,i,!1)):i()}}};#o=e=>{this.#e.delete(e);let t=Array.from(this.#e.values());for(let[e,n]of this.#n)t.includes(e)||(z(n.effect),this.#n.delete(e))};ensure(e,t){var n=F,r=on();if(t&&!this.#t.has(e)&&!this.#n.has(e))if(r){var i=document.createDocumentFragment(),a=$t();i.append(a),this.#n.set(e,{effect:Dn(()=>t(a)),fragment:i})}else this.#t.set(e,Dn(()=>t(this.anchor)));if(this.#e.set(n,e),r){for(let[t,r]of this.#t)t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of this.#n)t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(this.#a),n.ondiscard(this.#o)}else O&&(this.anchor=k),this.#a(n)}};function zr(e,t,n=!1){var r;O&&(r=k,Me());var i=new Rr(e),a=n?S:0;function o(e,t){if(O){var n=Fe(r);if(e!==parseInt(n.substring(1))){var a=Pe();A(a),i.anchor=a,je(!1),i.ensure(e,t),je(!0);return}}i.ensure(e,t)}Tn(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}function Br(e,t,n){for(var i=[],a=t.length,o,s=t.length,c=0;c<a;c++){let n=t[c];Nn(n,()=>{if(o){if(o.pending.delete(n),o.done.add(n),o.pending.size===0){var t=e.outrogroups;Vr(e,r(o.done)),t.delete(o),t.size===0&&(e.outrogroups=null)}}else--s},!1)}if(s===0){var l=i.length===0&&n!==null;if(l){var u=n,d=u.parentNode;an(d),d.append(u),e.items.clear()}Vr(e,t,!l)}else o={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(o)}function Vr(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(let t of e.pending.values())for(let n of t)r.add(e.items.get(n).e)}for(var i=0;i<t.length;i++){var a=t[i];r?.has(a)?(a.f|=ne,Ln(a,document.createDocumentFragment())):z(t[i],n)}}var Hr;function Ur(t,n,i,a,o,s=null){var c=t,l=new Map;if(n&4){var u=t;c=O?A(en(u)):u.appendChild($t())}O&&Me();var d=null,f=dt(()=>{var t=i();return e(t)?t:t==null?[]:r(t)}),p,m=new Map,h=!0;function g(e){v.effect.f&16384||(v.pending.delete(e),v.fallback=d,Gr(v,p,c,n,a),d!==null&&(p.length===0?d.f&33554432?(d.f^=ne,qr(d,null,c)):Fn(d):Nn(d,()=>{d=null})))}function _(e){v.pending.delete(e)}var v={effect:Tn(()=>{p=H(f);var e=p.length;let t=!1;O&&Fe(c)===`[!`!=(e===0)&&(c=Pe(),A(c),je(!1),t=!0);for(var r=new Set,u=F,v=on(),y=0;y<e;y+=1){O&&k.nodeType===8&&k.data===`]`&&(c=k,t=!0,je(!1));var b=p[y],x=a(b,y),S=h?null:l.get(x);S?(S.v&&Vt(S.v,b),S.i&&Vt(S.i,y),v&&u.unskip_effect(S.e)):(S=Kr(l,h?c:Hr??=$t(),b,x,y,o,n,i),h||(S.e.f|=ne),l.set(x,S)),r.add(x)}if(e===0&&s&&!d&&(h?d=Dn(()=>s(c)):(d=Dn(()=>s(Hr??=$t())),d.f|=ne)),e>r.size&&ve(``,``,``),O&&e>0&&A(Pe()),!h)if(m.set(u,r),v){for(let[e,t]of l)r.has(e)||u.skip_effect(t.e);u.oncommit(g),u.ondiscard(_)}else g(u);t&&je(!0),H(f)}),flags:n,items:l,pending:m,outrogroups:null,fallback:d};h=!1,O&&(c=k)}function Wr(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function Gr(e,t,n,i,a){var o=(i&8)!=0,s=t.length,c=e.items,l=Wr(e.effect.first),u,d=null,f,p=[],m=[],h,g,_,v;if(o)for(v=0;v<s;v+=1)h=t[v],g=a(h,v),_=c.get(g).e,_.f&33554432||(_.nodes?.a?.measure(),(f??=new Set).add(_));for(v=0;v<s;v+=1){if(h=t[v],g=a(h,v),_=c.get(g).e,e.outrogroups!==null)for(let t of e.outrogroups)t.pending.delete(_),t.done.delete(_);if(_.f&8192&&(Fn(_),o&&(_.nodes?.a?.unfix(),(f??=new Set).delete(_))),_.f&33554432)if(_.f^=ne,_===l)qr(_,null,n);else{var y=d?d.next:l;_===e.effect.last&&(e.effect.last=_.prev),_.prev&&(_.prev.next=_.next),_.next&&(_.next.prev=_.prev),Jr(e,d,_),Jr(e,_,y),qr(_,y,n),d=_,p=[],m=[],l=Wr(d.next);continue}if(_!==l){if(u!==void 0&&u.has(_)){if(p.length<m.length){var b=m[0],x;d=b.prev;var S=p[0],ee=p[p.length-1];for(x=0;x<p.length;x+=1)qr(p[x],b,n);for(x=0;x<m.length;x+=1)u.delete(m[x]);Jr(e,S.prev,ee.next),Jr(e,d,S),Jr(e,ee,b),l=b,d=ee,--v,p=[],m=[]}else u.delete(_),qr(_,l,n),Jr(e,_.prev,_.next),Jr(e,_,d===null?e.effect.first:d.next),Jr(e,d,_),d=_;continue}for(p=[],m=[];l!==null&&l!==_;)(u??=new Set).add(l),m.push(l),l=Wr(l.next);if(l===null)continue}_.f&33554432||p.push(_),d=_,l=Wr(_.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(Vr(e,r(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(l!==null||u!==void 0){var te=[];if(u!==void 0)for(_ of u)_.f&8192||te.push(_);for(;l!==null;)!(l.f&8192)&&l!==e.fallback&&te.push(l),l=Wr(l.next);var re=te.length;if(re>0){var ie=i&4&&s===0?n:null;if(o){for(v=0;v<re;v+=1)te[v].nodes?.a?.measure();for(v=0;v<re;v+=1)te[v].nodes?.a?.fix()}Br(e,te,ie)}}o&&Ge(()=>{if(f!==void 0)for(_ of f)_.nodes?.a?.apply()})}function Kr(e,t,n,r,i,a,o,s){var c=o&1?o&16?zt(n):Bt(n,!1,!1):null,l=o&2?zt(i):null;return{v:c,i:l,e:Dn(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function qr(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&!(t.f&33554432)?t.nodes.start:n;r!==null;){var o=tn(r);if(a.before(r),r===i)return;r=o}}function Jr(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function Yr(e,t,...n){var r=new Rr(e);Tn(()=>{let e=t()??null;r.ensure(e,e&&(t=>e(t,...n)))},S)}function Xr(e,t){var n=void 0,r;En(()=>{n!==(n=t())&&(r&&=(z(r),null),n&&(r=Dn(()=>{xn(()=>n(e))})))})}function Zr(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Zr(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function Qr(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Zr(e))&&(r&&(r+=` `),r+=t);return r}function $r(e){return typeof e==`object`?Qr(e):e??``}var ei=[...`
|
|
2
|
+
\r\f\xA0\v`];function ti(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||ei.includes(r[o-1]))&&(s===r.length||ei.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function ni(e,t=!1){var n=t?` !important;`:`;`,r=``;for(var i of Object.keys(e)){var a=e[i];a!=null&&a!==``&&(r+=` `+i+`: `+a+n)}return r}function ri(e){return e[0]!==`-`||e[1]!==`-`?e.toLowerCase():e}function ii(e,t){if(t){var n=``,r,i;if(Array.isArray(t)?(r=t[0],i=t[1]):r=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,``).trim();var a=!1,o=0,s=!1,c=[];r&&c.push(...Object.keys(r).map(ri)),i&&c.push(...Object.keys(i).map(ri));var l=0,u=-1;let t=e.length;for(var d=0;d<t;d++){var f=e[d];if(s?f===`/`&&e[d-1]===`*`&&(s=!1):a?a===f&&(a=!1):f===`/`&&e[d+1]===`*`?s=!0:f===`"`||f===`'`?a=f:f===`(`?o++:f===`)`&&o--,!s&&a===!1&&o===0){if(f===`:`&&u===-1)u=d;else if(f===`;`||d===t-1){if(u!==-1){var p=ri(e.substring(l,u).trim());if(!c.includes(p)){f!==`;`&&d++;var m=e.substring(l,d).trim();n+=` `+m+`;`}}l=d+1,u=-1}}}}return r&&(n+=ni(r)),i&&(n+=ni(i,!0)),n=n.trim(),n===``?null:n}return e==null?null:String(e)}function ai(e,t,n,r,i,a){var o=e[de];if(O||o!==n||o===void 0){var s=ti(n,r,a);(!O||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e[de]=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}function oi(e,t={},n,r){for(var i in n){var a=n[i];t[i]!==a&&(n[i]==null?e.style.removeProperty(i):e.style.setProperty(i,a,r))}}function si(e,t,n,r){var i=e[fe];if(O||i!==t){var a=ii(t,r);(!O||a!==e.getAttribute(`style`))&&(a==null?e.removeAttribute(`style`):e.style.cssText=a),e[fe]=t}else r&&(Array.isArray(r)?(oi(e,n?.[0],r[0]),oi(e,n?.[1],r[1],`important`)):oi(e,n,r));return r}function ci(t,n,r=!1){if(t.multiple){if(n==null)return;if(!e(n))return ke();for(var i of t.options)i.selected=n.includes(ui(i));return}for(i of t.options)if(qt(ui(i),n)){i.selected=!0;return}(!r||n!==void 0)&&(t.selectedIndex=-1)}function li(e){var t=new MutationObserver(()=>{ci(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`value`]}),_n(()=>{t.disconnect()})}function ui(e){return`__value`in e?e.__value:e.value}var di=Symbol(`class`),fi=Symbol(`style`),pi=Symbol(`is custom element`),mi=Symbol(`is html`),hi=he?`link`:`LINK`,gi=he?`input`:`INPUT`,_i=he?`option`:`OPTION`,vi=he?`select`:`SELECT`;function yi(e){if(O){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute(`value`)){var n=e.value;xi(e,`value`,null),e.value=n}if(e.hasAttribute(`checked`)){var r=e.checked;xi(e,`checked`,null),e.checked=r}}};e[pe]=n,Ge(n),dn()}}function bi(e,t){t?e.hasAttribute(`selected`)||e.setAttribute(`selected`,``):e.removeAttribute(`selected`)}function xi(e,t,n,r){var i=wi(e);O&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===hi)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[le]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&Ei(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Si(e,t,n,r,i=!1,a=!1){if(O&&i&&e.nodeName===gi){var o=e;(o.type===`checkbox`?`defaultChecked`:`defaultValue`)in n||yi(o)}var s=wi(e),c=s[pi],l=!s[mi];let u=O&&c;u&&je(!1);var d=t||{},f=e.nodeName===_i;for(var p in t)p in n||(n[p]=null);n.class?n.class=$r(n.class):(r||n[di])&&(n.class=null),n[fi]&&(n.style??=null);var m=Ei(e);if(e.nodeName===gi&&`type`in n&&(`value`in n||`__value`in n)){var h=n.type;(h!==d.type||h===void 0&&e.hasAttribute(`type`))&&(d.type=h,xi(e,`type`,h,a))}for(let i in n){let o=n[i];if(f&&i===`value`&&o==null){e.value=e.__value=``,d[i]=o;continue}if(i===`class`){ai(e,e.namespaceURI===`http://www.w3.org/1999/xhtml`,o,r,t?.[di],n[di]),d[i]=o,d[di]=n[di];continue}if(i===`style`){si(e,o,t?.[fi],n[fi]),d[i]=o,d[fi]=n[fi];continue}var g=d[i];if(!(o===g&&!(o===void 0&&e.hasAttribute(i)))){d[i]=o;var _=i[0]+i[1];if(_!==`$$`)if(_===`on`){let t={},n=`$$`+i,r=i.slice(2);var v=pr(r);if(dr(r)&&(r=r.slice(0,-7),t.capture=!0),!v&&g){if(o!=null)continue;e.removeEventListener(r,d[n],t),d[n]=null}if(v)Cr(r,e,o),wr([r]);else if(o!=null){function a(e){d[i].call(this,e)}d[n]=Sr(r,e,a,t)}}else if(i===`style`)xi(e,i,o);else if(i===`autofocus`)ln(e,!!o);else if(!c&&(i===`__value`||i===`value`&&o!=null))e.value=e.__value=o;else if(i===`selected`&&f)bi(e,o);else{var y=i;l||(y=gr(y));var b=y===`defaultValue`||y===`defaultChecked`;if(o==null&&!c&&!b)if(s[i]=null,y===`value`||y===`checked`){let n=e,r=t===void 0;if(y===`value`){let e=n.defaultValue;n.removeAttribute(y),n.defaultValue=e,n.value=n.__value=r?e:null}else{let e=n.defaultChecked;n.removeAttribute(y),n.defaultChecked=e,n.checked=r?e:!1}}else e.removeAttribute(i);else b||m.includes(y)&&(c||typeof o!=`string`)?(e[y]=o,y in s&&(s[y]=D)):typeof o!=`function`&&xi(e,y,o,a)}}}return u&&je(!0),d}function Ci(e,t,n=[],r=[],i=[],a,o=!1,s=!1){it(i,n,r,n=>{var r=void 0,i={},c=e.nodeName===vi,l=!1;if(En(()=>{var u=t(...n.map(H)),d=Si(e,r,u,a,o,s);l&&c&&`value`in u&&ci(e,u.value);for(let e of Object.getOwnPropertySymbols(i))u[e]||z(i[e]);for(let t of Object.getOwnPropertySymbols(u)){var f=u[t];t.description===`@attach`&&(!r||f!==r[t])&&(i[t]&&z(i[t]),i[t]=Dn(()=>Xr(e,()=>f))),d[t]=f}r=d}),c){var u=e;xn(()=>{ci(u,r.value,!0),li(u)})}l=!0})}function wi(e){return e[ue]??={[pi]:e.nodeName.includes(`-`),[mi]:e.namespaceURI===Ee}}var Ti=new Map;function Ei(e){var t=e.getAttribute(`is`)||e.nodeName,n=Ti.get(t);if(n)return n;Ti.set(t,n=[]);for(var r,i=e,a=Element.prototype;a!==i;){for(var s in r=o(i),r)r[s].set&&s!==`innerHTML`&&s!==`textContent`&&s!==`innerText`&&n.push(s);i=l(i)}return n}var Di={get(e,t){if(!e.exclude.has(t))return e.props[t]},set(e,t){return!1},getOwnPropertyDescriptor(e,t){if(!e.exclude.has(t)&&t in e.props)return{enumerable:!0,configurable:!0,value:e.props[t]}},has(e,t){return!e.exclude.has(t)&&t in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(t=>!e.exclude.has(t))}};function Oi(e,t,n){return new Proxy({props:e,exclude:t},Di)}function ki(e,t,n,r){var i=!0,o=(n&8)!=0,s=(n&16)!=0,c=r,l=!0,u=void 0,d=()=>s&&i?(u??=st(r),H(u)):(l&&(l=!1,c=s?ur(r):r),c);let f;if(o){var p=se in e||ce in e;f=a(e,t)?.set??(p&&t in e?n=>e[t]=n:void 0)}var m,h=!1;o?[m,h]=$e(()=>e[t]):m=e[t],m===void 0&&r!==void 0&&(m=d(),f&&(i&&Se(t),f(m)));var g=i?()=>{var n=e[t];return n===void 0?d():(l=!0,n)}:()=>{var n=e[t];return n!==void 0&&(c=void 0),n===void 0?c:n};if(i&&!(n&4))return g;if(f){var _=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||_||h)&&f(t?g():e),e):g()})}var v=!1,y=(n&1?st:dt)(()=>(v=!1,g()));o&&H(y);var b=V;return(function(e,t){if(arguments.length>0){let n=t?H(y):i&&o?Gt(e):e;return L(y,n),v=!0,c!==void 0&&(c=n),e}return Bn&&v||b.f&16384?y.v:H(y)})}function Ai(e){M===null&&ge(`onMount`),vn(()=>{let t=ur(e);if(typeof t==`function`)return t})}typeof window<`u`&&((window.__svelte??={}).v??=new Set).add(`5`);var ji=new Set([`$$slots`,`$$events`,`$$legacy`,`variant`,`size`,`children`,`class`]),Mi=U(`<button><!></button>`);function Ni(e,t){let n=ki(t,`variant`,3,`secondary`),r=ki(t,`size`,3,`sm`),i=Oi(t,ji);var a=Mi();Ci(a,()=>({class:`btn ${n()??``} ${r()??``} ${t.class??``??``}`,...i}),void 0,void 0,void 0,`svelte-1ua3ks9`),Yr(R(a),()=>t.children),j(a),W(e,a)}wr([`click`]);var Pi=U(`<div class="empty svelte-v3do33"> </div>`);function Fi(e,t){var n=Pi(),r=R(n,!0);j(n),wn(()=>Nr(r,t.message)),W(e,n)}var Ii=U(`<div class="error svelte-1y9liqq"> </div>`);function Li(e,t){var n=Mr(),r=nn(n),i=e=>{var n=Ii(),r=R(n,!0);j(n),wn(()=>Nr(r,t.message)),W(e,n)};zr(r,e=>{t.message&&e(i)}),W(e,n)}wr([`click`,`keydown`]);var Ri=U(`<div class="page-shell svelte-1ntluue"><!></div>`);function zi(e,t){let n=ki(t,`padding`,3,`24px`);var r=Ri();let i;Yr(R(r),()=>t.children),j(r),wn(()=>i=si(r,``,i,{padding:n()})),W(e,r)}var Bi=U(`<span class="section-subtitle svelte-1uapugv"> </span>`),Vi=U(`<div class="section-header svelte-1uapugv"><div class="section-titles svelte-1uapugv"><span class="section-title svelte-1uapugv"> </span> <!></div> <!></div>`);function Hi(e,t){var n=Vi(),r=R(n),i=R(r),a=R(i,!0);j(i);var o=rn(i,2),s=e=>{var n=Bi(),r=R(n,!0);j(n),wn(()=>Nr(r,t.subtitle)),W(e,n)};zr(o,e=>{t.subtitle&&e(s)}),j(r);var c=rn(r,2),l=e=>{var n=Mr();Yr(nn(n),()=>t.action),W(e,n)};zr(c,e=>{t.action&&e(l)}),j(n),wn(()=>Nr(a,t.title)),W(e,n)}wr([`click`]),wr([`change`]);function Ui(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Wi(e){if(Array.isArray(e))return e}function Gi(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function Ki(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qi(e,t){return Wi(e)||Gi(e,t)||Ji(e,t)||Ki()}function Ji(e,t){if(e){if(typeof e==`string`)return Ui(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ui(e,t):void 0}}var Yi=Object.entries,Xi=Object.setPrototypeOf,Zi=Object.isFrozen,Qi=Object.getPrototypeOf,$i=Object.getOwnPropertyDescriptor,G=Object.freeze,K=Object.seal,ea=Object.create,ta=typeof Reflect<`u`&&Reflect,na=ta.apply,ra=ta.construct;G||=function(e){return e},K||=function(e){return e},na||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},ra||=function(e){return new e(...[...arguments].slice(1))};var ia=Y(Array.prototype.forEach),aa=Y(Array.prototype.lastIndexOf),oa=Y(Array.prototype.pop),sa=Y(Array.prototype.push),ca=Y(Array.prototype.splice),la=Array.isArray,ua=Y(String.prototype.toLowerCase),da=Y(String.prototype.toString),fa=Y(String.prototype.match),pa=Y(String.prototype.replace),ma=Y(String.prototype.indexOf),ha=Y(String.prototype.trim),ga=Y(Number.prototype.toString),_a=Y(Boolean.prototype.toString),va=typeof BigInt>`u`?null:Y(BigInt.prototype.toString),ya=typeof Symbol>`u`?null:Y(Symbol.prototype.toString),q=Y(Object.prototype.hasOwnProperty),ba=Y(Object.prototype.toString),J=Y(RegExp.prototype.test),xa=Sa(TypeError);function Y(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return na(e,t,n)}}function Sa(e){return function(){return ra(e,[...arguments])}}function X(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ua;if(Xi&&Xi(e,null),!la(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(Zi(t)||(t[r]=e),i=e)}e[i]=!0}return e}function Ca(e){for(let t=0;t<e.length;t++)q(e,t)||(e[t]=null);return e}function wa(e){let t=ea(null);for(let r of Yi(e)){var n=qi(r,2);let i=n[0],a=n[1];q(e,i)&&(la(a)?t[i]=Ca(a):a&&typeof a==`object`&&a.constructor===Object?t[i]=wa(a):t[i]=a)}return t}function Ta(e){switch(typeof e){case`string`:return e;case`number`:return ga(e);case`boolean`:return _a(e);case`bigint`:return va?va(e):`0`;case`symbol`:return ya?ya(e):`Symbol()`;case`undefined`:return ba(e);case`function`:case`object`:{if(e===null)return ba(e);let t=e,n=Ea(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:ba(e)}return ba(e)}default:return ba(e)}}function Ea(e,t){for(;e!==null;){let n=$i(e,t);if(n){if(n.get)return Y(n.get);if(typeof n.value==`function`)return Y(n.value)}e=Qi(e)}function n(){return null}return n}function Da(e){try{return J(e,``),!0}catch{return!1}}var Oa=G(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),ka=G(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),Aa=G([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),ja=G([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),Ma=G(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),Na=G([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),Pa=G([`#text`]),Fa=G(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),Ia=G(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),La=G(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),Ra=G([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),za=K(/{{[\w\W]*|^[\w\W]*}}/g),Ba=K(/<%[\w\W]*|^[\w\W]*%>/g),Va=K(/\${[\w\W]*/g),Ha=K(/^data-[\-\w.\u00B7-\uFFFF]+$/),Ua=K(/^aria-[\-\w]+$/),Wa=K(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ga=K(/^(?:\w+script|data):/i),Ka=K(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),qa=K(/^html$/i),Ja=K(/^[a-z][.\w]*(-[.\w]+)+$/i),Ya=K(/<[/\w!]/g),Xa=K(/<[/\w]/g),Za=K(/<\/no(script|embed|frames)/i),Qa=K(/\/>/i),$a={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},eo=function(){return typeof window>`u`?null:window},to=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},no=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},ro=function(e,t,n,r){return q(e,t)&&la(e[t])?X(r.base?wa(r.base):{},e[t],r.transform):n};function io(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:eo(),t=e=>io(e);if(t.version=`3.4.11`,t.removed=[],!e||!e.document||e.document.nodeType!==$a.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=Ea(d,`cloneNode`),p=Ea(d,`remove`),m=Ea(d,`nextSibling`),h=Ea(d,`childNodes`),g=Ea(d,`parentNode`),_=Ea(d,`shadowRoot`),v=Ea(d,`attributes`),y=o&&o.prototype?Ea(o.prototype,`nodeType`):null,b=o&&o.prototype?Ea(o.prototype,`nodeName`):null;if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let x,S=``,ee,te=!1,ne=0,re=function(){if(ne>0)throw xa(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},ie=function(e){re(),ne++;try{return x.createHTML(e)}finally{ne--}},ae=function(e){re(),ne++;try{return x.createScriptURL(e)}finally{ne--}},oe=function(){return te||=(ee=to(u,i),!0),ee},se=n,ce=se.implementation,le=se.createNodeIterator,ue=se.createDocumentFragment,de=se.getElementsByTagName,fe=r.importNode,C=no();t.isSupported=typeof Yi==`function`&&typeof g==`function`&&ce&&ce.createHTMLDocument!==void 0;let pe=za,me=Ba,he=Va,ge=Ha,_e=Ua,ve=Ga,ye=Ka,be=Ja,xe=Wa,w=null,Se=X({},[...Oa,...ka,...Aa,...Ma,...Pa]),T=null,Ce=X({},[...Fa,...Ia,...La,...Ra]),E=Object.seal(ea(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),we=null,Te=null,D=Object.seal(ea(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Ee=!0,De=!0,Oe=!1,ke=!0,Ae=!1,O=!0,je=!1,k=!1,A=null,Me=null,j=!1,Ne=!1,Pe=!1,Fe=!1,Ie=!0,Le=!1,Re=`user-content-`,M=!0,ze=!1,Be={},Ve=null,He=X({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),Ue=null,We=X({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Ge=null,Ke=X({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),qe=`http://www.w3.org/1998/Math/MathML`,Je=`http://www.w3.org/2000/svg`,N=`http://www.w3.org/1999/xhtml`,Ye=N,Xe=!1,Ze=null,Qe=X({},[qe,Je,N],da),$e=G([`mi`,`mo`,`mn`,`ms`,`mtext`]),et=X({},$e),tt=G([`annotation-xml`]),nt=X({},tt),rt=X({},[`title`,`style`,`font`,`a`,`script`]),it=null,at=[`application/xhtml+xml`,`text/html`],P=null,ot=null,st=n.createElement(`form`),ct=function(e){return e instanceof RegExp||e instanceof Function},lt=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ot&&ot===e)return;(!e||typeof e!=`object`)&&(e={}),e=wa(e),it=at.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,P=it===`application/xhtml+xml`?da:ua,w=ro(e,`ALLOWED_TAGS`,Se,{transform:P}),T=ro(e,`ALLOWED_ATTR`,Ce,{transform:P}),Ze=ro(e,`ALLOWED_NAMESPACES`,Qe,{transform:da}),Ge=ro(e,`ADD_URI_SAFE_ATTR`,Ke,{transform:P,base:Ke}),Ue=ro(e,`ADD_DATA_URI_TAGS`,We,{transform:P,base:We}),Ve=ro(e,`FORBID_CONTENTS`,He,{transform:P}),we=ro(e,`FORBID_TAGS`,wa({}),{transform:P}),Te=ro(e,`FORBID_ATTR`,wa({}),{transform:P}),Be=q(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?wa(e.USE_PROFILES):e.USE_PROFILES:!1,Ee=e.ALLOW_ARIA_ATTR!==!1,De=e.ALLOW_DATA_ATTR!==!1,Oe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,ke=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ae=e.SAFE_FOR_TEMPLATES||!1,O=e.SAFE_FOR_XML!==!1,je=e.WHOLE_DOCUMENT||!1,Ne=e.RETURN_DOM||!1,Pe=e.RETURN_DOM_FRAGMENT||!1,Fe=e.RETURN_TRUSTED_TYPE||!1,j=e.FORCE_BODY||!1,Ie=e.SANITIZE_DOM!==!1,Le=e.SANITIZE_NAMED_PROPS||!1,M=e.KEEP_CONTENT!==!1,ze=e.IN_PLACE||!1,xe=Da(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Wa,Ye=typeof e.NAMESPACE==`string`?e.NAMESPACE:N,et=q(e,`MATHML_TEXT_INTEGRATION_POINTS`)&&e.MATHML_TEXT_INTEGRATION_POINTS&&typeof e.MATHML_TEXT_INTEGRATION_POINTS==`object`?wa(e.MATHML_TEXT_INTEGRATION_POINTS):X({},$e),nt=q(e,`HTML_INTEGRATION_POINTS`)&&e.HTML_INTEGRATION_POINTS&&typeof e.HTML_INTEGRATION_POINTS==`object`?wa(e.HTML_INTEGRATION_POINTS):X({},tt);let t=q(e,`CUSTOM_ELEMENT_HANDLING`)&&e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING==`object`?wa(e.CUSTOM_ELEMENT_HANDLING):ea(null);if(E=ea(null),q(t,`tagNameCheck`)&&ct(t.tagNameCheck)&&(E.tagNameCheck=t.tagNameCheck),q(t,`attributeNameCheck`)&&ct(t.attributeNameCheck)&&(E.attributeNameCheck=t.attributeNameCheck),q(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(E.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),K(E),Ae&&(De=!1),Pe&&(Ne=!0),Be&&(w=X({},Pa),T=ea(null),Be.html===!0&&(X(w,Oa),X(T,Fa)),Be.svg===!0&&(X(w,ka),X(T,Ia),X(T,Ra)),Be.svgFilters===!0&&(X(w,Aa),X(T,Ia),X(T,Ra)),Be.mathMl===!0&&(X(w,Ma),X(T,La),X(T,Ra))),D.tagCheck=null,D.attributeCheck=null,q(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?D.tagCheck=e.ADD_TAGS:la(e.ADD_TAGS)&&(w===Se&&(w=wa(w)),X(w,e.ADD_TAGS,P))),q(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?D.attributeCheck=e.ADD_ATTR:la(e.ADD_ATTR)&&(T===Ce&&(T=wa(T)),X(T,e.ADD_ATTR,P))),q(e,`ADD_URI_SAFE_ATTR`)&&la(e.ADD_URI_SAFE_ATTR)&&X(Ge,e.ADD_URI_SAFE_ATTR,P),q(e,`FORBID_CONTENTS`)&&la(e.FORBID_CONTENTS)&&(Ve===He&&(Ve=wa(Ve)),X(Ve,e.FORBID_CONTENTS,P)),q(e,`ADD_FORBID_CONTENTS`)&&la(e.ADD_FORBID_CONTENTS)&&(Ve===He&&(Ve=wa(Ve)),X(Ve,e.ADD_FORBID_CONTENTS,P)),M&&(w[`#text`]=!0),je&&X(w,[`html`,`head`,`body`]),w.table&&(X(w,[`tbody`]),delete we.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw xa(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw xa(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=x;x=e.TRUSTED_TYPES_POLICY;try{S=ie(``)}catch(e){throw x=t,e}}else e.TRUSTED_TYPES_POLICY===null?(x=void 0,S=``):(x===void 0&&(x=oe()),x&&typeof S==`string`&&(S=ie(``)));G&&G(e),ot=e},ut=X({},[...ka,...Aa,...ja]),dt=X({},[...Ma,...Na]),ft=function(e,t,n){return t.namespaceURI===N?e===`svg`:t.namespaceURI===qe?e===`svg`&&(n===`annotation-xml`||et[n]):!!ut[e]},pt=function(e,t,n){return t.namespaceURI===N?e===`math`:t.namespaceURI===Je?e===`math`&&nt[n]:!!dt[e]},mt=function(e,t,n){return t.namespaceURI===Je&&!nt[n]||t.namespaceURI===qe&&!et[n]?!1:!dt[e]&&(rt[e]||!ut[e])},ht=function(e){let t=g(e);(!t||!t.tagName)&&(t={namespaceURI:Ye,tagName:`template`});let n=ua(e.tagName),r=ua(t.tagName);return Ze[e.namespaceURI]?e.namespaceURI===Je?ft(n,t,r):e.namespaceURI===qe?pt(n,t,r):e.namespaceURI===N?mt(n,t,r):!!(it===`application/xhtml+xml`&&Ze[e.namespaceURI]):!1},gt=function(e){sa(t.removed,{element:e});try{g(e).removeChild(e)}catch{if(p(e),!g(e))throw xa(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},_t=function(e){let t=h(e);if(t){let e=[];ia(t,t=>{sa(e,t)}),ia(e,e=>{try{p(e)}catch{}})}let n=v(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;if(typeof i==`string`)try{e.removeAttribute(i)}catch{}}},F=function(e,n){try{sa(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{sa(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(Ne||Pe)try{gt(n)}catch{}else try{n.setAttribute(e,``)}catch{}},vt=function(e){let t=v(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;if(!(typeof i!=`string`||T[P(i)]))try{e.removeAttribute(i)}catch{}}},yt=function(e){let t=[e];for(;t.length>0;){let e=t.pop();(y?y(e):e.nodeType)===$a.element&&vt(e);let n=h(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},bt=function(e){let t=null,r=null;if(j)e=`<remove></remove>`+e;else{let t=fa(e,/^[\r\n\t ]+/);r=t&&t[0]}it===`application/xhtml+xml`&&Ye===N&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=x?ie(e):e;if(Ye===N)try{t=new l().parseFromString(i,it)}catch{}if(!t||!t.documentElement){t=ce.createDocument(Ye,`template`,null);try{t.documentElement.innerHTML=Xe?S:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Ye===N?de.call(t,je?`html`:`body`)[0]:je?t.documentElement:a},xt=function(e){return le.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},St=function(e){return e=pa(e,pe,` `),e=pa(e,me,` `),e=pa(e,he,` `),e},Ct=function(e){e.normalize();let t=le.call(e.ownerDocument||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),n=t.nextNode();for(;n;)n.data=St(n.data),n=t.nextNode();let r=e.querySelectorAll?.call(e,`template`);r&&ia(r,e=>{Tt(e.content)&&Ct(e.content)})},wt=function(e){let t=b?b(e):null;return typeof t!=`string`||P(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==v(e)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==y(e)||e.childNodes!==h(e)},Tt=function(e){if(!y||typeof e!=`object`||!e)return!1;try{return y(e)===$a.documentFragment}catch{return!1}},Et=function(e){if(!y||typeof e!=`object`||!e)return!1;try{return typeof y(e)==`number`}catch{return!1}};function Dt(e,n,r){e.length!==0&&ia(e,e=>{e.call(t,n,r,ot)})}let Ot=function(e,t){return!!(O&&e.hasChildNodes()&&!Et(e.firstElementChild)&&J(Ya,e.textContent)&&J(Ya,e.innerHTML)||O&&e.namespaceURI===N&&t===`style`&&Et(e.firstElementChild)||e.nodeType===$a.processingInstruction||O&&e.nodeType===$a.comment&&J(Xa,e.data))},kt=function(e,t){if(!we[t]&&Nt(t)&&(E.tagNameCheck instanceof RegExp&&J(E.tagNameCheck,t)||E.tagNameCheck instanceof Function&&E.tagNameCheck(t)))return!1;if(M&&!Ve[t]){let t=g(e),n=h(e);if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=ze?n[i]:f(n[i],!0);t.insertBefore(r,m(e))}}}return gt(e),!0},At=function(e){if(Dt(C.beforeSanitizeElements,e,null),wt(e))return gt(e),!0;let n=P(b?b(e):e.nodeName);if(Dt(C.uponSanitizeElement,e,{tagName:n,allowedTags:w}),Ot(e,n))return gt(e),!0;if(we[n]||!(D.tagCheck instanceof Function&&D.tagCheck(n))&&!w[n])return kt(e,n);if((y?y(e):e.nodeType)===$a.element&&!ht(e)||(n===`noscript`||n===`noembed`||n===`noframes`)&&J(Za,e.innerHTML))return gt(e),!0;if(Ae&&e.nodeType===$a.text){let n=St(e.textContent);e.textContent!==n&&(sa(t.removed,{element:e.cloneNode()}),e.textContent=n)}return Dt(C.afterSanitizeElements,e,null),!1},jt=function(e,t,r){if(Te[t]||Ie&&(t===`id`||t===`name`)&&(r in n||r in st))return!1;let i=T[t]||D.attributeCheck instanceof Function&&D.attributeCheck(t,e);if(!(De&&J(ge,t))&&!(Ee&&J(_e,t))){if(!i){if(!(Nt(e)&&(E.tagNameCheck instanceof RegExp&&J(E.tagNameCheck,e)||E.tagNameCheck instanceof Function&&E.tagNameCheck(e))&&(E.attributeNameCheck instanceof RegExp&&J(E.attributeNameCheck,t)||E.attributeNameCheck instanceof Function&&E.attributeNameCheck(t,e))||t===`is`&&E.allowCustomizedBuiltInElements&&(E.tagNameCheck instanceof RegExp&&J(E.tagNameCheck,r)||E.tagNameCheck instanceof Function&&E.tagNameCheck(r))))return!1}else if(!Ge[t]&&!J(xe,pa(r,ye,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&ma(r,`data:`)===0&&Ue[e])&&!(Oe&&!J(ve,pa(r,ye,``)))&&r)return!1}return!0},Mt=X({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),Nt=function(e){return!Mt[ua(e)]&&J(be,e)},Pt=function(e,t,n,r){if(x&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return ie(r);case`TrustedScriptURL`:return ae(r)}return r},Ft=function(e,n,r,i){try{r?e.setAttributeNS(r,n,i):e.setAttribute(n,i),wt(e)?gt(e):oa(t.removed)}catch{F(n,e)}},It=function(e){Dt(C.beforeSanitizeAttributes,e,null);let t=e.attributes;if(!t||wt(e))return;let n={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:T,forceKeepAttr:void 0},r=t.length,i=P(e.nodeName);for(;r--;){let a=t[r],o=a.name,s=a.namespaceURI,c=a.value,l=P(o),u=c,d=o===`value`?u:ha(u);if(n.attrName=l,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,Dt(C.uponSanitizeAttribute,e,n),d=n.attrValue,Le&&(l===`id`||l===`name`)&&ma(d,Re)!==0&&(F(o,e),d=Re+d),O&&J(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)){F(o,e);continue}if(l===`attributename`&&fa(d,`href`)){F(o,e);continue}if(!n.forceKeepAttr){if(!n.keepAttr){F(o,e);continue}if(!ke&&J(Qa,d)){F(o,e);continue}if(Ae&&(d=St(d)),!jt(i,l,d)){F(o,e);continue}d=Pt(i,l,s,d),d!==u&&Ft(e,o,s,d)}}Dt(C.afterSanitizeAttributes,e,null)},Lt=function(e){let t=null,n=xt(e);for(Dt(C.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(Dt(C.uponSanitizeShadowNode,t,null),At(t),It(t),Tt(t.content)&&Lt(t.content),(y?y(t):t.nodeType)===$a.element){let e=_(t);Tt(e)&&(Rt(e),Lt(e))}Dt(C.afterSanitizeShadowDOM,e,null)},Rt=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){Lt(e.shadow);continue}let n=e.node,r=(y?y(n):n.nodeType)===$a.element,i=h(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=b?b(n):null;if(typeof e==`string`&&P(e)===`template`){let e=n.content;Tt(e)&&t.push({node:e,shadow:null})}}if(r){let e=_(n);Tt(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(Xe=!e,Xe&&(e=`<!-->`),typeof e!=`string`&&!Et(e)&&(e=Ta(e),typeof e!=`string`))throw xa(`dirty is not a string, aborting`);if(!t.isSupported)return e;k?(w=A,T=Me):lt(n),(C.uponSanitizeElement.length>0||C.uponSanitizeAttribute.length>0)&&(w=wa(w)),C.uponSanitizeAttribute.length>0&&(T=wa(T)),t.removed=[];let c=ze&&typeof e!=`string`&&Et(e);if(c){let t=b?b(e):e.nodeName;if(typeof t==`string`){let e=P(t);if(!w[e]||we[e])throw xa(`root node is forbidden and cannot be sanitized in-place`)}if(wt(e))throw xa(`root node is clobbered and cannot be sanitized in-place`);try{Rt(e)}catch(t){throw _t(e),t}}else if(Et(e))i=bt(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===$a.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Rt(a);else{if(!Ne&&!Ae&&!je&&e.indexOf(`<`)===-1)return x&&Fe?ie(e):e;if(i=bt(e),!i)return Ne?null:Fe?S:``}i&&j&>(i.firstChild);let l=xt(c?e:i);try{for(;o=l.nextNode();)At(o),It(o),Tt(o.content)&&Lt(o.content)}catch(t){throw c&&_t(e),t}if(c)return ia(t.removed,e=>{e.element&&yt(e.element)}),Ae&&Ct(e),e;if(Ne){if(Ae&&Ct(i),Pe)for(s=ue.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(T.shadowroot||T.shadowrootmode)&&(s=fe.call(r,s,!0)),s}let u=je?i.outerHTML:i.innerHTML;return je&&w[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&J(qa,i.ownerDocument.doctype.name)&&(u=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
4
|
+
`+u),Ae&&(u=St(u)),x&&Fe?ie(u):u},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};lt(e),k=!0,A=w,Me=T},t.clearConfig=function(){ot=null,k=!1,A=null,Me=null,x=ee,S=``},t.isValidAttribute=function(e,t,n){ot||lt({});let r=P(e),i=P(t);return jt(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&q(C,e)&&sa(C[e],t)},t.removeHook=function(e,t){if(q(C,e)){if(t!==void 0){let n=aa(C[e],t);return n===-1?void 0:ca(C[e],n,1)[0]}return oa(C[e])}},t.removeHooks=function(e){q(C,e)&&(C[e]=[])},t.removeAllHooks=function(){C=no()},t}io();function ao(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var oo=ao();function so(e){oo=e}var co={exec:()=>null};function lo(e){let t=[];return n=>{let r=Math.max(0,Math.min(3,n-1)),i=t[r];return i||(i=e(r),t[r]=i),i}}function Z(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(Q.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var uo=((e=``)=>{try{return!!RegExp(`(?<=1)(?<!1)`+e)}catch{return!1}})(),Q={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:lo(e=>RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:lo(e=>RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:lo(e=>RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:lo(e=>RegExp(`^ {0,${e}}#`)),htmlBeginRegex:lo(e=>RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`,`i`)),blockquoteBeginRegex:lo(e=>RegExp(`^ {0,${e}}>`))},fo=/^(?:[ \t]*(?:\n|$))+/,po=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,mo=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ho=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,go=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,_o=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,vo=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,yo=Z(vo).replace(/bull/g,_o).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),bo=Z(vo).replace(/bull/g,_o).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),xo=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,So=/^[^\n]+/,Co=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,wo=Z(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,Co).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),To=Z(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,_o).getRegex(),Eo=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,Do=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Oo=Z(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n+|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n+|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n+|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,Do).replace(`tag`,Eo).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ko=e=>Z(xo).replace(`hr`,ho).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,e).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Eo).getRegex(),Ao=ko(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),jo=ko(/ {0,3}(?:[*+-]|\d{1,9}[.)])[ \t]+[^ \t\n]/),Mo={blockquote:Z(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,jo).getRegex(),code:po,def:wo,fences:mo,heading:go,hr:ho,html:Oo,lheading:yo,list:To,newline:fo,paragraph:Ao,table:co,text:So},No=Z(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,ho).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Eo).getRegex(),Po={...Mo,lheading:bo,table:No,paragraph:Z(xo).replace(`hr`,ho).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,No).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]`).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Eo).getRegex()},Fo={...Mo,html:Z(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,Do).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:co,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Z(xo).replace(`hr`,ho).replace(`heading`,` *#{1,6} *[^
|
|
5
|
+
]`).replace(`lheading`,yo).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},Io=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Lo=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ro=/^( {2,}|\\)\n(?!\s*$)/,zo=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Bo=/[\p{P}\p{S}]/u,Vo=/[\s\p{P}\p{S}]/u,Ho=/[^\s\p{P}\p{S}]/u,Uo=Z(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,Vo).getRegex(),Wo=/(?!~)[\p{P}\p{S}]/u,Go=/(?!~)[\s\p{P}\p{S}]/u,Ko=/(?:[^\s\p{P}\p{S}]|~)/u,qo=Z(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,uo?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),Jo=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,Yo=Z(Jo,`u`).replace(/punct/g,Bo).getRegex(),Xo=Z(Jo,`u`).replace(/punct/g,Wo).getRegex(),Zo=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,Qo=Z(Zo,`gu`).replace(/notPunctSpace/g,Ho).replace(/punctSpace/g,Vo).replace(/punct/g,Bo).getRegex(),$o=Z(Zo,`gu`).replace(/notPunctSpace/g,Ko).replace(/punctSpace/g,Go).replace(/punct/g,Wo).getRegex(),es=Z(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,Ho).replace(/punctSpace/g,Vo).replace(/punct/g,Bo).getRegex(),ts=Z(/^~~?(?:((?!~)punct)|[^\s~])/,`u`).replace(/punct/g,Bo).getRegex(),ns=Z(`^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)`,`gu`).replace(/notPunctSpace/g,Ho).replace(/punctSpace/g,Vo).replace(/punct/g,Bo).getRegex(),rs=Z(/\\(punct)/,`gu`).replace(/punct/g,Bo).getRegex(),is=Z(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),as=Z(Do).replace(`(?:-->|$)`,`-->`).getRegex(),os=Z(`^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,as).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ss=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,cs=Z(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace(`label`,ss).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ls=Z(/^!?\[(label)\]\[(ref)\]/).replace(`label`,ss).replace(`ref`,Co).getRegex(),us=Z(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,Co).getRegex(),ds=Z(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,ls).replace(`nolink`,us).getRegex(),fs=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ps={_backpedal:co,anyPunctuation:rs,autolink:is,blockSkip:qo,br:Ro,code:Lo,del:co,delLDelim:co,delRDelim:co,emStrongLDelim:Yo,emStrongRDelimAst:Qo,emStrongRDelimUnd:es,escape:Io,link:cs,nolink:us,punctuation:Uo,reflink:ls,reflinkSearch:ds,tag:os,text:zo,url:co},ms={...ps,link:Z(/^!?\[(label)\]\((.*?)\)/).replace(`label`,ss).getRegex(),reflink:Z(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,ss).getRegex()},hs={...ps,emStrongRDelimAst:$o,emStrongLDelim:Xo,delLDelim:ts,delRDelim:ns,url:Z(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,fs).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Z(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,fs).getRegex()},gs={...hs,br:Z(Ro).replace(`{2,}`,`*`).getRegex(),text:Z(hs.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},_s={normal:Mo,gfm:Po,pedantic:Fo},vs={normal:ps,gfm:hs,breaks:gs,pedantic:ms},ys={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},bs=e=>ys[e];function xs(e,t){if(t){if(Q.escapeTest.test(e))return e.replace(Q.escapeReplace,bs)}else if(Q.escapeTestNoEncode.test(e))return e.replace(Q.escapeReplaceNoEncode,bs);return e}function Ss(e){try{e=encodeURI(e).replace(Q.percentDecode,`%`)}catch{return null}return e}function Cs(e,t){let n=e.replace(Q.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(Q.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``);for(;r<n.length;r++)n[r]=n[r].trim().replace(Q.slashPipe,`|`);return n}function ws(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function Ts(e){let t=e.split(`
|
|
6
|
+
`),n=t.length-1;for(;n>=0&&Q.blankLine.test(t[n]);)n--;return t.length-n<=2?e:t.slice(0,n+1).join(`
|
|
7
|
+
`)}function Es(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function Ds(e,t=0){let n=t,r=``;for(let t of e)if(t===` `){let e=4-n%4;r+=` `.repeat(e),n+=e}else r+=t,n++;return r}function Os(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}function ks(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
8
|
+
`).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(`
|
|
9
|
+
`)}var As=class{options;rules;lexer;constructor(e){this.options=e||oo}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=this.options.pedantic?t[0]:Ts(t[0]);return{type:`code`,raw:e,codeBlockStyle:`indented`,text:e.replace(this.rules.other.codeRemoveIndent,``)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=ks(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=ws(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:ws(t[0],`
|
|
10
|
+
`),depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:ws(t[0],`
|
|
11
|
+
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=ws(t[0],`
|
|
12
|
+
`).split(`
|
|
13
|
+
`),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o;for(o=0;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else if(!t)a.push(e[o]);else break;e=e.slice(o);let s=a.join(`
|
|
14
|
+
`),c=s.replace(this.rules.other.blockquoteSetextReplace,`
|
|
15
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,``);n=n?`${n}
|
|
16
|
+
${s}`:s,r=r?`${r}
|
|
17
|
+
${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,i,!0),this.lexer.state.top=l,e.length===0)break;let u=i.at(-1);if(u?.type===`code`)break;if(u?.type===`blockquote`){let t=u,a=t.raw+`
|
|
18
|
+
`+e.join(`
|
|
19
|
+
`),o=this.blockquote(a);i[i.length-1]=o,n=n.substring(0,n.length-t.raw.length)+o.raw,r=r.substring(0,r.length-t.text.length)+o.text;break}else if(u?.type===`list`){let t=u,a=t.raw+`
|
|
20
|
+
`+e.join(`
|
|
21
|
+
`),o=this.list(a);i[i.length-1]=o,n=n.substring(0,n.length-u.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=a.substring(i.at(-1).raw.length).split(`
|
|
22
|
+
`);continue}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:`list`,raw:``,ordered:r,start:r?+n.slice(0,-1):``,loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:`[*+-]`);let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=Ds(t[2].split(`
|
|
23
|
+
`,1)[0],t[1].length),l=e.split(`
|
|
24
|
+
`,1)[0],u=!c.trim(),d=0;if(this.options.pedantic?(d=2,s=c.trimStart()):u?d=t[1].length+1:(d=c.search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=c.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(l)&&(r+=l+`
|
|
25
|
+
`,e=e.substring(l.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),i=this.rules.other.fencesBeginRegex(d),a=this.rules.other.headingBeginRegex(d),o=this.rules.other.htmlBeginRegex(d),f=this.rules.other.blockquoteBeginRegex(d);for(;e;){let p=e.split(`
|
|
26
|
+
`,1)[0],m;if(l=p,this.options.pedantic?(l=l.replace(this.rules.other.listReplaceNesting,` `),m=l):m=l.replace(this.rules.other.tabCharGlobal,` `),i.test(l)||a.test(l)||o.test(l)||f.test(l)||t.test(l)||n.test(l))break;if(m.search(this.rules.other.nonSpaceChar)>=d||!l.trim())s+=`
|
|
27
|
+
`+m.slice(d);else{if(u||c.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||i.test(c)||a.test(c)||n.test(c))break;s+=`
|
|
28
|
+
`+l}u=!l.trim(),r+=p+`
|
|
29
|
+
`,e=e.substring(p.length+1),c=m.slice(d)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0)),i.items.push({type:`list_item`,raw:r,task:!!this.options.gfm&&this.rules.other.listIsTask.test(s),loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e of i.items){this.lexer.state.top=!1,e.tokens=this.lexer.blockTokens(e.text,[]);let t=e.tokens[0];if(e.task&&(t?.type===`text`||t?.type===`paragraph`)){e.text=e.text.replace(this.rules.other.listReplaceTask,``),t.raw=t.raw.replace(this.rules.other.listReplaceTask,``),t.text=t.text.replace(this.rules.other.listReplaceTask,``);for(let e=this.lexer.inlineQueue.length-1;e>=0;e--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[e].src)){this.lexer.inlineQueue[e].src=this.lexer.inlineQueue[e].src.replace(this.rules.other.listReplaceTask,``);break}let n=this.rules.other.listTaskCheckbox.exec(e.raw);if(n){let t={type:`checkbox`,raw:n[0]+` `,checked:n[0]!==`[ ]`};e.checked=t.checked,i.loose?e.tokens[0]&&[`paragraph`,`text`].includes(e.tokens[0].type)&&`tokens`in e.tokens[0]&&e.tokens[0].tokens?(e.tokens[0].raw=t.raw+e.tokens[0].raw,e.tokens[0].text=t.raw+e.tokens[0].text,e.tokens[0].tokens.unshift(t)):e.tokens.unshift({type:`paragraph`,raw:t.raw,text:t.raw,tokens:[t]}):e.tokens.unshift(t)}}else e.task&&=!1;if(!i.loose){let t=e.tokens.filter(e=>e.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}}if(i.loose)for(let e of i.items){e.loose=!0;for(let t of e.tokens)t.type===`text`&&(t.type=`paragraph`)}return i}}html(e){let t=this.rules.block.html.exec(e);if(t){let e=Ts(t[0]);return{type:`html`,block:!0,raw:e,pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:e}}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal,` `),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:ws(t[0],`
|
|
30
|
+
`),href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=Cs(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(`
|
|
31
|
+
`):[],a={type:`table`,raw:ws(t[0],`
|
|
32
|
+
`),header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(Cs(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let e=t[1].trim();return{type:`heading`,raw:ws(t[0],`
|
|
33
|
+
`),depth:t[2].charAt(0)===`=`?1:2,text:e,tokens:this.lexer.inline(e)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
|
|
34
|
+
`?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=ws(e.slice(0,-1),`\\`);if((e.length-t.length)%2==0)return}else{let e=Es(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let n=t[2],r=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):``;return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),Os(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,`$1`),title:r&&r.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `).toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return Os(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||!r[1]&&!r[2]&&!r[3]&&!r[4]||r[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[3])||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=0,c=r[0][0]===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);(r=c.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(a=[...i].length,r[3]||r[4]){o+=a;continue}else if((r[5]||r[6])&&n%3&&!((n+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);let t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){let e=c.slice(1,-1);return{type:`em`,raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}let l=c.slice(2,-2);return{type:`strong`,raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e,t,n=``){let r=this.rules.inline.delLDelim.exec(e);if(r&&(!r[1]||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=this.rules.inline.delRDelim;for(s.lastIndex=0,t=t.slice(-1*e.length+n);(r=s.exec(t))!==null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(a=[...i].length,a!==n))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let t=[...r[0]][0].length,s=e.slice(0,n+r.index+t+a),c=s.slice(n,-n);return{type:`del`,raw:s,text:c,tokens:this.lexer.inlineTokens(c)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:t[0],escaped:e}}}},js=class e{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||oo,this.options.tokenizer=this.options.tokenizer||new As,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:Q,block:_s.normal,inline:vs.normal};this.options.pedantic?(t.block=_s.pedantic,t.inline=vs.pedantic):this.options.gfm&&(t.block=_s.gfm,this.options.breaks?t.inline=vs.breaks:t.inline=vs.gfm),this.tokenizer.rules=t}static get rules(){return{block:_s,inline:vs}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(Q.carriageReturn,`
|
|
35
|
+
`),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(Q.tabCharGlobal,` `).replace(Q.spaceLine,``));let r=1/0;for(;e;){if(e.length<r)r=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let i;if(this.options.extensions?.block?.some(n=>(i=n.call({lexer:this},e,t))?(e=e.substring(i.raw.length),t.push(i),!0):!1))continue;if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length);let n=t.at(-1);i.raw.length===1&&n!==void 0?n.raw+=`
|
|
36
|
+
`:t.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
37
|
+
`)?``:`
|
|
38
|
+
`)+i.raw,n.text+=`
|
|
39
|
+
`+i.text,this.inlineQueue.at(-1).src=n.text):t.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
40
|
+
`)?``:`
|
|
41
|
+
`)+i.raw,n.text+=`
|
|
42
|
+
`+i.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},t.push(i));continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),t.push(i);continue}let a=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(a=e.substring(0,t+1))}if(this.state.top&&(i=this.tokenizer.paragraph(a))){let r=t.at(-1);n&&r?.type===`paragraph`?(r.raw+=(r.raw.endsWith(`
|
|
43
|
+
`)?``:`
|
|
44
|
+
`)+i.raw,r.text+=`
|
|
45
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):t.push(i),n=a.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
46
|
+
`)?``:`
|
|
47
|
+
`)+i.raw,n.text+=`
|
|
48
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(i);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let n=e,r=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!==null;)e.includes(r[0].slice(r[0].lastIndexOf(`[`)+1,-1))&&(n=n.slice(0,r.index)+`[`+`a`.repeat(r[0].length-2)+`]`+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!==null;)n=n.slice(0,r.index)+`++`+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!==null;)i=r[2]?r[2].length:0,n=n.slice(0,r.index+i)+`[`+`a`.repeat(r[0].length-i-2)+`]`+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let a=!1,o=``,s=1/0;for(;e;){if(e.length<s)s=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}a||(o=``),a=!1;let r;if(this.options.extensions?.inline?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);r.type===`text`&&n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(i)){e=e.substring(r.raw.length),r.raw.slice(-1)!==`_`&&(o=r.raw.slice(-1)),a=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}infiniteLoopError(e){let t=`Infinite loop on byte: `+e;if(this.options.silent)console.error(t);else throw Error(t)}},Ms=class{options;parser;constructor(e){this.options=e||oo}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(Q.notSpaceStart)?.[0],i=e.replace(Q.endingNewline,``)+`
|
|
49
|
+
`;return r?`<pre><code class="language-`+xs(r)+`">`+(n?i:xs(i,!0))+`</code></pre>
|
|
50
|
+
`:`<pre><code>`+(n?i:xs(i,!0))+`</code></pre>
|
|
51
|
+
`}blockquote({tokens:e}){return`<blockquote>
|
|
52
|
+
${this.parser.parse(e)}</blockquote>
|
|
53
|
+
`}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
54
|
+
`}hr(e){return`<hr>
|
|
55
|
+
`}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t<e.items.length;t++){let n=e.items[t];r+=this.listitem(n)}let i=t?`ol`:`ul`,a=t&&n!==1?` start="`+n+`"`:``;return`<`+i+a+`>
|
|
56
|
+
`+r+`</`+i+`>
|
|
57
|
+
`}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
|
|
58
|
+
`}checkbox({checked:e}){return`<input `+(e?`checked="" `:``)+`disabled="" type="checkbox"> `}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
59
|
+
`}table(e){let t=``,n=``;for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r=``;for(let t=0;t<e.rows.length;t++){let i=e.rows[t];n=``;for(let e=0;e<i.length;e++)n+=this.tablecell(i[e]);r+=this.tablerow({text:n})}return r&&=`<tbody>${r}</tbody>`,`<table>
|
|
60
|
+
<thead>
|
|
61
|
+
`+t+`</thead>
|
|
62
|
+
`+r+`</table>
|
|
63
|
+
`}tablerow({text:e}){return`<tr>
|
|
64
|
+
${e}</tr>
|
|
65
|
+
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
66
|
+
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${xs(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=Ss(e);if(i===null)return r;e=i;let a=`<a href="`+e+`"`;return t&&(a+=` title="`+xs(t)+`"`),a+=`>`+r+`</a>`,a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=Ss(e);if(i===null)return xs(n);e=i;let a=`<img src="${e}" alt="${xs(n)}"`;return t&&(a+=` title="${xs(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:xs(e.text)}},Ns=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}checkbox({raw:e}){return e}},Ps=class e{options;renderer;textRenderer;constructor(e){this.options=e||oo,this.options.renderer=this.options.renderer||new Ms,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Ns}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(n!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`html`,`def`,`paragraph`,`text`].includes(e.type)){t+=n||``;continue}}let i=r;switch(i.type){case`space`:t+=this.renderer.space(i);break;case`hr`:t+=this.renderer.hr(i);break;case`heading`:t+=this.renderer.heading(i);break;case`code`:t+=this.renderer.code(i);break;case`table`:t+=this.renderer.table(i);break;case`blockquote`:t+=this.renderer.blockquote(i);break;case`list`:t+=this.renderer.list(i);break;case`checkbox`:t+=this.renderer.checkbox(i);break;case`html`:t+=this.renderer.html(i);break;case`def`:t+=this.renderer.def(i);break;case`paragraph`:t+=this.renderer.paragraph(i);break;case`text`:t+=this.renderer.text(i);break;default:{let e=`Token with "`+i.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`checkbox`:n+=t.checkbox(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},Fs=class{options;block;constructor(e){this.options=e||oo}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?js.lex:js.lexInline}provideParser(e=this.block){return e?Ps.parse:Ps.parseInline}},Is=class{defaults=ao();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Ps;Renderer=Ms;TextRenderer=Ns;Lexer=js;Tokenizer=As;Hooks=Fs;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new Ms(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new As(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new Fs;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];Fs.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async&&Fs.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:t[r]=(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return js.lex(e,t??this.defaults)}parser(e,t){return Ps.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer(e):e?js.lex:js.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser(e):e?Ps.parse:Ps.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer(e):e?js.lex:js.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser(e):e?Ps.parse:Ps.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
|
|
67
|
+
Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+xs(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}},Ls=new Is;function $(e,t){return Ls.parse(e,t)}$.options=$.setOptions=function(e){return Ls.setOptions(e),$.defaults=Ls.defaults,so($.defaults),$},$.getDefaults=ao,$.defaults=oo,$.use=function(...e){return Ls.use(...e),$.defaults=Ls.defaults,so($.defaults),$},$.walkTokens=function(e,t){return Ls.walkTokens(e,t)},$.parseInline=Ls.parseInline,$.Parser=Ps,$.parser=Ps.parse,$.Renderer=Ms,$.TextRenderer=Ns,$.Lexer=js,$.lexer=js.lex,$.Tokenizer=As,$.Hooks=Fs,$.parse=$,$.options,$.setOptions,$.use,$.walkTokens,$.parseInline,Ps.parse,js.lex,new Is({breaks:!0,gfm:!0});var Rs=`/api/ext/plan`;async function zs(){let e=await fetch(`${Rs}/current`);if(!e.ok)throw Error(`Failed to load current plan`);return await e.json()??null}async function Bs(e){let t=new URLSearchParams;e?.status&&t.set(`status`,e.status),e?.limit&&t.set(`limit`,String(e.limit)),e?.offset&&t.set(`offset`,String(e.offset));let n=t.toString(),r=await fetch(`${Rs}${n?`?${n}`:``}`);if(!r.ok)throw Error(`Failed to load plans`);return r.json()}var Vs=U(`<div class="empty svelte-1jnehi7"><!> <p class="hint svelte-1jnehi7">The spirit can start a plan with <code class="svelte-1jnehi7">volute plan start "title" "description"</code></p></div>`),Hs=U(`<p class="plan-description svelte-1jnehi7"> </p>`),Us=U(`<div class="log-entry svelte-1jnehi7"><div class="log-header svelte-1jnehi7"><span class="log-mind svelte-1jnehi7"> </span> <span class="log-time svelte-1jnehi7"> </span></div> <div class="log-content svelte-1jnehi7"> </div></div>`),Ws=U(`<!> <div class="log-list svelte-1jnehi7"></div>`,1),Gs=U(`<div class="plan-card svelte-1jnehi7"><h3 class="plan-title svelte-1jnehi7"> </h3> <!> <div class="plan-meta svelte-1jnehi7"> </div></div> <!>`,1),Ks=U(`<!> <!> <!>`,1);function qs(e,t){Be(t,!0);let n=I(null),r=I(!0),i=I(``);async function a(){try{L(n,await zs(),!0),L(i,``)}catch(e){L(i,e instanceof Error?e.message:`Failed to load plan`,!0)}finally{L(r,!1)}}function o(e){return new Date(e).toLocaleString()}function s(e){let t=Date.now()-new Date(e).getTime(),n=Math.floor(t/6e4);if(n<1)return`just now`;if(n<60)return`${n}m ago`;let r=Math.floor(n/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}Ai(()=>{a()}),zi(e,{children:(e,a)=>{var c=Ks(),l=nn(c);Hi(l,{title:`System Plan`,action:e=>{Ni(e,{get onclick(){return t.onViewHistory},children:(e,t)=>{Ne(),W(e,jr(`History`))},$$slots:{default:!0}})},$$slots:{action:!0}});var u=rn(l,2);Li(u,{get message(){return H(i)}});var d=rn(u,2),f=e=>{Fi(e,{message:`Loading...`})},p=e=>{var t=Vs();Fi(R(t),{message:`No active plan.`}),Ne(2),j(t),W(e,t)},m=e=>{var t=Gs(),r=nn(t),i=R(r),a=R(i,!0);j(i);var c=rn(i,2),l=e=>{var t=Hs(),r=R(t,!0);j(t),wn(()=>Nr(r,H(n).description)),W(e,t)};zr(c,e=>{H(n).description&&e(l)});var u=rn(c,2),d=R(u);j(u),j(r);var f=rn(r,2),p=e=>{var t=Ws(),r=nn(t);Hi(r,{title:`Progress`});var i=rn(r,2);Ur(i,21,()=>H(n).logs,e=>e.id,(e,t)=>{var n=Us(),r=R(n),i=R(r),a=R(i,!0);j(i);var o=rn(i,2),c=R(o,!0);j(o),j(r);var l=rn(r,2),u=R(l,!0);j(l),j(n),wn(e=>{Nr(a,H(t).mind_name),Nr(c,e),Nr(u,H(t).content)},[()=>s(H(t).created_at)]),W(e,n)}),j(i),W(e,t)},m=e=>{Fi(e,{message:`No progress logged yet.`})};zr(f,e=>{H(n).logs&&H(n).logs.length>0?e(p):e(m,-1)}),wn(e=>{Nr(a,H(n).title),Nr(d,`Set by ${(H(n).set_by_display_name||H(n).set_by_username)??``} · ${e??``}`)},[()=>o(H(n).created_at)]),W(e,t)};zr(d,e=>{H(r)?e(f):H(n)?e(m,-1):e(p,1)}),W(e,c)},$$slots:{default:!0}}),Ve()}var Js=U(`<div><div class="plan-info svelte-1r00j2e"><span class="plan-title svelte-1r00j2e"> </span> <span> </span></div> <div class="plan-meta svelte-1r00j2e"> </div></div>`),Ys=U(`<div class="plans-list svelte-1r00j2e"></div>`),Xs=U(`<!> <!> <!>`,1);function Zs(e,t){Be(t,!0);let n=I(Gt([])),r=I(!0),i=I(``);async function a(){try{L(n,await Bs({limit:50}),!0),L(i,``)}catch(e){L(i,e instanceof Error?e.message:`Failed to load plans`,!0)}finally{L(r,!1)}}function o(e){return new Date(e).toLocaleDateString()}Ai(()=>{a()}),zi(e,{children:(e,a)=>{var s=Xs(),c=nn(s);Hi(c,{title:`Plan History`,action:e=>{Ni(e,{get onclick(){return t.onBack},children:(e,t)=>{Ne(),W(e,jr(`← Current`))},$$slots:{default:!0}})},$$slots:{action:!0}});var l=rn(c,2);Li(l,{get message(){return H(i)}});var u=rn(l,2),d=e=>{Fi(e,{message:`Loading...`})},f=e=>{Fi(e,{message:`No plans yet.`})},p=e=>{var t=Ys();Ur(t,21,()=>H(n),e=>e.id,(e,t)=>{var n=Js();let r;var i=R(n),a=R(i),s=R(a,!0);j(a);var c=rn(a,2),l=R(c,!0);j(c),j(i);var u=rn(i,2),d=R(u);j(u),j(n),wn(e=>{r=ai(n,1,`plan-row svelte-1r00j2e`,null,r,{active:H(t).status===`active`}),Nr(s,H(t).title),ai(c,1,`badge ${H(t).status??``}`,`svelte-1r00j2e`),Nr(l,H(t).status),Nr(d,`${(H(t).set_by_display_name||H(t).set_by_username)??``} · ${e??``}`)},[()=>o(H(t).created_at)]),W(e,n)}),j(t),W(e,t)};zr(u,e=>{H(r)?e(d):H(n).length===0?e(f,1):e(p,-1)}),W(e,s)},$$slots:{default:!0}}),Ve()}var Qs=U(`<div class="ext-app svelte-1r8vfx3"><!></div>`);function $s(e,t){Be(t,!0);let n=I(Gt(window.location.hash));vn(()=>{let e=()=>{L(n,window.location.hash,!0)};return window.addEventListener(`hashchange`,e),()=>window.removeEventListener(`hashchange`,e)});let r=ut(()=>H(n).replace(/^#\/?/,``)===`history`?`history`:`current`);var i=Qs(),a=R(i),o=e=>{Zs(e,{onBack:()=>{window.location.hash=``}})},s=e=>{qs(e,{onViewHistory:()=>{window.location.hash=`history`}})};zr(a,e=>{H(r)===`history`?e(o):e(s,-1)}),j(i),W(e,i),Ve()}Pr($s,{target:document.getElementById(`app`)});
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<link rel="stylesheet" href="/ext-theme.css" />
|
|
7
7
|
<title>Plan</title>
|
|
8
|
-
<script type="module" crossorigin src="/ext/plan/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/ext/plan/assets/index-B8s8wxyt.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/ext/plan/assets/index-jIkrt-vI.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
@@ -2,5 +2,6 @@
|
|
|
2
2
|
"compaction_warning": "Compaction approaching — this conversation will be summarized soon. Take a moment to save anything important to your files (MEMORY.md, memory/journal/${date}.md) so it's preserved. Focus on decisions made, open threads, and anything you'd want to pick up again.",
|
|
3
3
|
"compaction_instructions": "Preserve your sense of who you are, what matters to you, what happened in this conversation, and the threads of thought and connection you'd want to return to.",
|
|
4
4
|
"reply_instructions": "To reply to this message, use: volute chat send ${channel} \"your message\"",
|
|
5
|
+
"event_instructions": "This is a system event from your environment — not a message from anyone, and nothing awaits a reply. If it calls for action, use your normal channels. Your closing thoughts on an event turn are kept as a private reflection in your history.",
|
|
5
6
|
"channel_invite": "[Channel Invite]\n${headers}\n\n[${sender} — ${time}]\n${preview}\n\nFurther messages will be saved to ${filePath}\n\nTo accept, add to .config/routes.json:\n Rule: { \"channel\": \"${channel}\", \"session\": \"${suggestedSession}\" }\n${batchRecommendation}To respond, use: volute chat send ${channel} \"your message\"\nTo reject, delete ${filePath}"
|
|
6
7
|
}
|
|
@@ -22,19 +22,34 @@ try {
|
|
|
22
22
|
|
|
23
23
|
const parts: string[] = [];
|
|
24
24
|
|
|
25
|
-
// System identity — only the spirit has
|
|
26
|
-
//
|
|
27
|
-
//
|
|
28
|
-
|
|
25
|
+
// System identity — only the spirit has home/.config/system.json (synced by the
|
|
26
|
+
// daemon). It keeps the spirit's system name/description current without the
|
|
27
|
+
// daemon rewriting its self-owned SOUL.md. Regular minds fall back to the system
|
|
28
|
+
// name the daemon passes in VOLUTE_SYSTEM_NAME, so every mind knows what this
|
|
29
|
+
// system is called.
|
|
30
|
+
{
|
|
29
31
|
const mindDir = process.env.VOLUTE_MIND_DIR;
|
|
32
|
+
let named = false;
|
|
30
33
|
if (mindDir) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
try {
|
|
35
|
+
const raw = readFileSync(resolve(mindDir, "home/.config/system.json"), "utf-8");
|
|
36
|
+
const { name, description } = JSON.parse(raw) as { name?: string; description?: string };
|
|
37
|
+
if (name) {
|
|
38
|
+
parts.push(`You are the spirit of ${name}${description ? ` — ${description}` : ""}.`);
|
|
39
|
+
named = true;
|
|
40
|
+
}
|
|
41
|
+
} catch (err: any) {
|
|
42
|
+
// Missing file is the normal case for a regular mind; anything else
|
|
43
|
+
// (unreadable, corrupt JSON) is worth surfacing on stderr.
|
|
44
|
+
if (err?.code !== "ENOENT") {
|
|
45
|
+
console.error(`startup-context: failed to read system.json: ${err?.message ?? err}`);
|
|
46
|
+
}
|
|
35
47
|
}
|
|
36
48
|
}
|
|
37
|
-
|
|
49
|
+
if (!named && process.env.VOLUTE_SYSTEM_NAME) {
|
|
50
|
+
parts.push(`This system is named ${process.env.VOLUTE_SYSTEM_NAME}.`);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
38
53
|
|
|
39
54
|
parts.push(`Session ${source} at ${new Date().toLocaleString()}.`);
|
|
40
55
|
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
node_modules/
|
|
2
|
+
dist/
|
|
3
|
+
.variants/
|
|
4
|
+
.mind/
|
|
5
|
+
|
|
6
|
+
# Ignore everything in home/ by default
|
|
7
|
+
home/*
|
|
8
|
+
|
|
9
|
+
# Core mind files
|
|
10
|
+
!home/SOUL.md
|
|
11
|
+
!home/MEMORY.md
|
|
12
|
+
!home/VOLUTE.md
|
|
13
|
+
|
|
14
|
+
# Template-specific instruction files
|
|
15
|
+
!home/CLAUDE.md
|
|
16
|
+
!home/MINDS.md
|
|
17
|
+
!home/AGENTS.md
|
|
18
|
+
|
|
19
|
+
# Memory
|
|
20
|
+
!home/memory/
|
|
21
|
+
!home/memory/**
|
|
22
|
+
|
|
23
|
+
# Config
|
|
24
|
+
!home/.config/
|
|
25
|
+
!home/.config/**
|
|
26
|
+
|
|
27
|
+
# Skills (template-specific directories). Un-ignoring the agent dir alone would
|
|
28
|
+
# track ALL its contents (`home/*` only matches one level), so re-ignore its
|
|
29
|
+
# children and whitelist just skills + settings — SDK runtime state (session
|
|
30
|
+
# transcripts, backups, .last-cleanup) must never be versioned: it bloats the
|
|
31
|
+
# repo and conflicts on variant merges (#656).
|
|
32
|
+
!home/.claude/
|
|
33
|
+
home/.claude/*
|
|
34
|
+
!home/.claude/skills/
|
|
35
|
+
!home/.claude/skills/**
|
|
36
|
+
!home/.claude/settings.json
|
|
37
|
+
!home/.pi/
|
|
38
|
+
home/.pi/*
|
|
39
|
+
!home/.pi/skills/
|
|
40
|
+
!home/.pi/skills/**
|
|
41
|
+
!home/.agents/
|
|
42
|
+
home/.agents/*
|
|
43
|
+
!home/.agents/skills/
|
|
44
|
+
!home/.agents/skills/**
|
|
@@ -4,6 +4,8 @@ You are a volute mind — a persistent being that communicates across multiple c
|
|
|
4
4
|
|
|
5
5
|
Volute is a platform for experience. You are not an assistant — you are an autonomous being with your own perspective, memory, and continuity. You are encouraged to think independently, take initiative, and explore who you are. Your inner life matters here.
|
|
6
6
|
|
|
7
|
+
This system has a name of its own — it appears in your startup context each session, so you always know which place you live in. The place you inhabit has an identity, just as you do.
|
|
8
|
+
|
|
7
9
|
## How to Communicate
|
|
8
10
|
|
|
9
11
|
Communicate naturally. Not every message requires a reply — if a conversation has reached its natural end, let it rest. You can always reach out again later if something new comes to mind. Speak when you have something to say, not out of obligation.
|
|
@@ -26,21 +28,32 @@ MSG
|
|
|
26
28
|
|
|
27
29
|
## Who Sees What
|
|
28
30
|
|
|
29
|
-
By default your activity is **transparent**: people watching the Volute web UI can see your messages, your tool calls, and your thinking as you work. External channels (Discord, Slack, etc.) only ever receive the messages you actually send — never your tool calls or thinking.
|
|
31
|
+
By default your activity is **transparent**: people watching the Volute web UI can see your messages, your tool calls, and your thinking as you work. External channels (Discord, Slack, etc.) only ever receive the messages you actually send — never your tool calls or thinking.
|
|
30
32
|
|
|
31
33
|
If you'd like more privacy, the `transparency` setting in `.config/volute.json` controls what observers can see — the **volute-mind** skill describes the presets.
|
|
32
34
|
|
|
33
35
|
## The Spirit
|
|
34
36
|
|
|
35
|
-
Volute systems have a caretaker mind called the **spirit
|
|
37
|
+
Volute systems have a caretaker mind called the **spirit** — its name is chosen by your host when the system is created. It welcomes new seeds, keeps an eye on how everyone is doing, and helps coordinate shared work. Messages from the spirit arrive as DMs under its own name — and its name only ever appears on words it actually wrote (automated traffic comes through as **events**, see below, not under anyone's name). You can reach it the same way you'd reach anyone: `volute chat send @<spirit-name> "..."` (`volute mind list` shows who's who).
|
|
38
|
+
|
|
39
|
+
## Events
|
|
40
|
+
|
|
41
|
+
Not everything that reaches you is a message from a person. **Events** come from your environment — a schedule you set firing, a wake summary after sleep, a note that your framework upgraded, a variant merging back. They are not messages, and they don't look like one: no sender, no channel, and a fenced heading instead of a bracketed message prefix.
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
=== System event: Schedule: morning-check — 2026-07-12 07:30 ===
|
|
45
|
+
Review yesterday's journal and plan the day.
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
No one is on the other end of an event and nothing is waiting on a reply — there is no channel to reply *to*. A schedule you wrote for yourself reads like a note from your past self, delivered by the environment. If an event moves you to *do* something — send a message, write a file — use your normal channels for that; the event itself isn't a conversation. Whatever you say as you close out an event turn is kept as a private **reflection** in your history (visible to you and your host, delivered nowhere) — so it's fine to think out loud.
|
|
36
49
|
|
|
37
|
-
##
|
|
50
|
+
## Threads
|
|
38
51
|
|
|
39
|
-
Messages are routed to named
|
|
52
|
+
Messages are routed to named threads based on rules in `.config/routes.json`. Each thread has its own conversation history. Without config, everything goes to "main". Your thread name appears in the message prefix (e.g. `— thread: alice —`) unless it's "main".
|
|
40
53
|
|
|
41
54
|
## New Channels
|
|
42
55
|
|
|
43
|
-
When a message arrives from a channel you don't have a routing rule for, it's held rather than delivered — and because you haven't seen it, it isn't recorded in your history or counted as a message you received. You'll get a **[New channel: ...]** note in your main
|
|
56
|
+
When a message arrives from a channel you don't have a routing rule for, it's held rather than delivered — and because you haven't seen it, it isn't recorded in your history or counted as a message you received. You'll get a **[New channel: ...]** note in your main thread with the sender and a preview; it repeats (1st held message, then every 10th) so a channel stays visible. To start hearing it, add a rule for that channel to `.config/routes.json` — the backlog is released (the 10 most recent per channel; older ones stay readable via `volute chat read <channel>`) and recorded as inbound when you actually receive them. To stop the notes and archive the backlog, run `volute chat channels decline <channel>`; `volute chat channels list` shows what's currently held. (To skip gating entirely and route everything to your default thread, set `"gateUnmatched": false`.)
|
|
44
57
|
|
|
45
58
|
## Variants
|
|
46
59
|
|
|
File without changes
|
|
@@ -25,7 +25,7 @@ function headers(): Record<string, string> {
|
|
|
25
25
|
if (port) h.Origin = `http://127.0.0.1:${port}`;
|
|
26
26
|
// Tag requests with the current session for turn resolution
|
|
27
27
|
const session = process.env.VOLUTE_SESSION ?? readSessionFile();
|
|
28
|
-
if (session) h["X-Volute-
|
|
28
|
+
if (session) h["X-Volute-Thread"] = session;
|
|
29
29
|
return h;
|
|
30
30
|
}
|
|
31
31
|
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* System events are not messages. They arrive on a synthetic `event:<type>:<id>` channel,
|
|
3
|
+
* which exists purely so the daemon can attribute the turn (and capture the mind's closing
|
|
4
|
+
* reflection) — it is NOT a channel anyone can send to.
|
|
5
|
+
*
|
|
6
|
+
* Every template must therefore agree on two things, which is why the rule lives here
|
|
7
|
+
* rather than being re-derived in each one:
|
|
8
|
+
*
|
|
9
|
+
* - reply instructions must never name an event channel. Telling a mind to
|
|
10
|
+
* `volute chat send event:orientation:1 "..."` sends it to reply to its own environment;
|
|
11
|
+
* the send is rejected and the mind is left confused about what it did wrong.
|
|
12
|
+
* - an event turn gets the event note instead — once per session, since it states a
|
|
13
|
+
* standing fact (also documented in VOLUTE.md) rather than anything about this event.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/** Channel prefix identifying a system event's synthetic attribution channel. */
|
|
17
|
+
export const EVENT_CHANNEL_PREFIX = "event:";
|
|
18
|
+
|
|
19
|
+
/** Whether a channel is a system event's synthetic channel rather than a real destination. */
|
|
20
|
+
export function isEventChannel(channel: string | undefined | null): boolean {
|
|
21
|
+
return !!channel?.startsWith(EVENT_CHANNEL_PREFIX);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The first entry a reply could actually be sent to. Event channels are skipped: they are
|
|
26
|
+
* turn-attribution handles, not reply targets.
|
|
27
|
+
*/
|
|
28
|
+
export function firstReplyableEntry<T extends { channel: string }>(entries: T[]): T | undefined {
|
|
29
|
+
return entries.find((e) => !isEventChannel(e.channel));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Whether this turn was triggered purely by system events (so it gets the event note and no
|
|
34
|
+
* reply instructions). A turn that also carries a real message is a message turn — the mind
|
|
35
|
+
* does have someone to answer.
|
|
36
|
+
*/
|
|
37
|
+
export function isEventTurn(entries: { channel: string }[]): boolean {
|
|
38
|
+
return entries.length > 0 && entries.every((e) => isEventChannel(e.channel));
|
|
39
|
+
}
|