executor 1.1.9 → 1.1.10-beta.5

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.
Files changed (35) hide show
  1. package/README.md +17 -7
  2. package/bin/emscripten-module.wasm +0 -0
  3. package/bin/executor.mjs +367034 -157926
  4. package/bin/impl/edit.js +201 -0
  5. package/bin/impl/format.js +275 -0
  6. package/bin/impl/parser.js +682 -0
  7. package/bin/impl/scanner.js +456 -0
  8. package/bin/impl/string-intern.js +42 -0
  9. package/bin/openapi-extractor-wasm/openapi_extractor_bg.wasm +0 -0
  10. package/package.json +1 -4
  11. package/resources/web/assets/__vite-browser-external-BIHI7g3E.js +1 -0
  12. package/resources/web/assets/{highlighted-body-TPN3WLV5-D2YQWXND.js → highlighted-body-TPN3WLV5-CNtoUE2O.js} +1 -1
  13. package/resources/web/assets/{index-BnjZoxRo.js → index-Dyhx5qgf.js} +2 -2
  14. package/resources/web/assets/mermaid-O7DHMXV3-CfqEcqYS.js +658 -0
  15. package/resources/web/assets/mermaid-O7DHMXV3-D1toCiZx.css +1 -0
  16. package/resources/web/assets/openapi_extractor_bg-IMRXzuHp.wasm +0 -0
  17. package/resources/web/index.html +1 -1
  18. package/bin/pglite.data +0 -0
  19. package/bin/pglite.wasm +0 -0
  20. package/bin/postinstall.js +0 -38
  21. package/resources/migrations/20260306091536_abnormal_martin_li/migration.sql +0 -158
  22. package/resources/migrations/20260306091536_abnormal_martin_li/snapshot.json +0 -1937
  23. package/resources/migrations/20260306094249_large_giant_girl/migration.sql +0 -39
  24. package/resources/migrations/20260306094249_large_giant_girl/snapshot.json +0 -2425
  25. package/resources/migrations/20260307090915_blue_bullseye/migration.sql +0 -70
  26. package/resources/migrations/20260307090915_blue_bullseye/snapshot.json +0 -3122
  27. package/resources/migrations/20260307134000_openapi_tool_identity/migration.sql +0 -37
  28. package/resources/migrations/20260307152000_source_document_text/migration.sql +0 -1
  29. package/resources/migrations/20260308041000_credentials_model/migration.sql +0 -41
  30. package/resources/migrations/20260308120000_search_and_indexes/migration.sql +0 -16
  31. package/resources/migrations/20260308140000_secret_materials_name/migration.sql +0 -1
  32. package/resources/migrations/20260309103000_policy_scope_and_interaction_purpose/migration.sql +0 -17
  33. package/resources/web/assets/mermaid-O7DHMXV3-37jaM6li.js +0 -393
  34. package/resources/web/assets/mermaid-O7DHMXV3-DgCU8P81.css +0 -1
  35. package/resources/web/assets/openapi_extractor_bg-DZrbVm4x.wasm +0 -0
@@ -1,393 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-6NEUuZou.js","assets/html-DBrZJmtb.js","assets/javascript-XPxc2APE.js","assets/css-BSK200cd.js","assets/angular-ts-BfBSdvnY.js","assets/scss-Dk05w39G.js","assets/apl-C-KxP0FL.js","assets/xml-DtyAt_xK.js","assets/java-B2AjWfgk.js","assets/json-CjLXzM_z.js","assets/astro-OEl6i-aI.js","assets/typescript-DttGkNCf.js","assets/postcss-BSGhOJ4k.js","assets/tsx-Dio8iE-N.js","assets/blade-DrbQMUV-.js","assets/html-derivative-DgyNW28a.js","assets/sql-CKXjX23X.js","assets/bsl-C4qeDxuX.js","assets/sdbl-C5Q1usnU.js","assets/cairo-C_mOTUpN.js","assets/python-DgE28U1V.js","assets/cobol-CELfDnG_.js","assets/coffee-CSg58a7P.js","assets/cpp-C28rag7_.js","assets/regexp-BW_zLBm-.js","assets/glsl-Bk7TyU8J.js","assets/c-CyUOlKFr.js","assets/crystal-kLfOnxTY.js","assets/shellscript-CE-5zpiL.js","assets/edge-C9mkmEUa.js","assets/elixir-B1OcFvXE.js","assets/elm-BX_9EnK8.js","assets/erb-C0Gc-WV-.js","assets/ruby-DsIP2xqq.js","assets/haml-C-C08OMF.js","assets/graphql-By4-2MiP.js","assets/jsx-BGEKFWBk.js","assets/lua-JmSlR1pZ.js","assets/yaml-B92AUxDB.js","assets/erlang-Dh270pQQ.js","assets/markdown-CKXSK5AY.js","assets/fortran-fixed-form-B5hFr6Yn.js","assets/fortran-free-form-BuX3zftO.js","assets/fsharp-B6CigNpP.js","assets/gdresource-ChoLB09i.js","assets/gdshader-MbeiIFWW.js","assets/gdscript-BajwJ0jS.js","assets/git-commit-BicZTByO.js","assets/diff-BlzBhZx2.js","assets/git-rebase-Bzlpfr7M.js","assets/glimmer-js-cZi37nA1.js","assets/glimmer-ts-BY3QTAW9.js","assets/hack-Ce3HFLQu.js","assets/handlebars-BFxKmXBZ.js","assets/http-D0p2QOuJ.js","assets/hurl-CeF7EoTQ.js","assets/csv-AZNL9t8Q.js","assets/hxml-B_SuSTPP.js","assets/haxe-n0Q_eay_.js","assets/jinja-DlBE7Xgz.js","assets/jison-DRGa8fbr.js","assets/julia-BxjEHQ54.js","assets/r-BcofxrH1.js","assets/just-Abn-AdSa.js","assets/perl-Djxv1YJ9.js","assets/latex-C-qBiGC3.js","assets/tex-BLPnQt1V.js","assets/liquid-DdraCjph.js","assets/marko-CQjc_OQE.js","assets/less-C76OjOdF.js","assets/mdc-CqpcwBMx.js","assets/nextflow-DCuLxrAx.js","assets/nextflow-groovy-COOIDLZf.js","assets/nginx-bBKbG2uI.js","assets/nim-Cm6-Nayq.js","assets/php-DczsLzXi.js","assets/pug-ClQUpJlV.js","assets/qml-BEkX6VoX.js","assets/razor-DnCvuKPj.js","assets/csharp-DieIJxYJ.js","assets/rst-BQ8kJ8ZW.js","assets/cmake-Cv5ljclQ.js","assets/sas-BZeeyq_z.js","assets/shaderlab-DNkMdb2B.js","assets/hlsl-Pefxhtaj.js","assets/shellsession-BhddCRKA.js","assets/soy-C6ERzLIv.js","assets/sparql-CHK3vDkL.js","assets/turtle-whXsfw69.js","assets/stata-BJqnY-gO.js","assets/surrealql-CYeReaNr.js","assets/svelte-xWy8v8x_.js","assets/templ-Bod2PxCB.js","assets/go-Dn4lI1Tv.js","assets/ts-tags-eLBrqaVN.js","assets/twig-LEyH1z5E.js","assets/vue-DiyPqOwP.js","assets/vue-html-BM4TQ0nH.js","assets/vue-vine-CcuWFpUQ.js","assets/stylus-CHekGIgu.js","assets/xsl-Btrj9DhN.js","assets/highlighted-body-TPN3WLV5-D2YQWXND.js","assets/index-CRuElBS1.js","assets/angular-html-CU67Zn6k.js","assets/html-GMplVEZG.js","assets/javascript-wDzz0qaB.js","assets/css-DPfMkruS.js","assets/angular-ts-BwZT4LLn.js","assets/scss-OYdSNvt2.js","assets/apl-dKokRX4l.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-CbQHKStN.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-D4QpJJKB.js","assets/html-derivative-BFtXZ54Q.js","assets/sql-BLtJtn59.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-nwyudZeR.js","assets/coffee-Ch7k5sss.js","assets/cpp-CofmeUqb.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-tKQVLTB8.js","assets/shellscript-Yzrsuije.js","assets/edge-BkV0erSs.js","assets/elixir-CDX3lj18.js","assets/elm-DbKCFpqz.js","assets/erb-B12qg9BL.js","assets/ruby-Dw2BHqvy.js","assets/haml-B8DHNrY2.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BaeVxFsk.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-CkoXwp7k.js","assets/fortran-free-form-BxgE0vQu.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-BOOCDP_w.js","assets/gdshader-DkwncUOv.js","assets/gdscript-C5YyOfLZ.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-Rg0-pVw9.js","assets/glimmer-ts-U6CK756n.js","assets/hack-CaT9iCJl.js","assets/handlebars-BL8al0AC.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-4LBKfQ-Z.js","assets/jison-wvAkD_A8.js","assets/julia-CxzCAyBv.js","assets/r-Dspwwk_N.js","assets/just-Cw27pwNe.js","assets/perl-C0TMdlhV.js","assets/latex-CWtU0Tv5.js","assets/tex-idrVyKtj.js","assets/liquid-DYVedYrR.js","assets/marko-CnJfTvn9.js","assets/less-B1dDrJ26.js","assets/mdc-BMNejdWA.js","assets/nextflow-Zz6hmt5N.js","assets/nextflow-groovy-BeH2EWoN.js","assets/nginx-BpAMiNFr.js","assets/nim-CVrawwO9.js","assets/php-Dhbhpdrm.js","assets/pug-CGlum2m_.js","assets/qml-3beO22l8.js","assets/razor-Uh8Bk_45.js","assets/csharp-COcwbKMJ.js","assets/rst-BrH8l1NY.js","assets/cmake-D1j8_8rp.js","assets/sas-cz2c8ADy.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-Brmx7dQM.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-BH5u7GGu.js","assets/surrealql-Bq5Q-fJD.js","assets/svelte-C_ipcX3V.js","assets/templ-P3uqSqPl.js","assets/go-CxLEBnE3.js","assets/ts-tags-zn1MmPIZ.js","assets/twig-DNn4PbVi.js","assets/vue-DN_0RTcg.js","assets/vue-html-AaS7Mt5G.js","assets/vue-vine-CQOfvN7w.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js"])))=>i.map(i=>d[i]);
2
- import{a as gx,j as b,b as hq,r as mq,_ as x}from"./index-CRuElBS1.js";function t_(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var O=gx();const Bh=t_(O);var Jt=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(Jt||{});function m$({update:e,notify:t,unwatched:n}){return{link:r,unlink:s,propagate:i,checkDirty:a,shallowPropagate:o};function r(u,l,d){const f=l.depsTail;if(f!==void 0&&f.dep===u)return;const h=f!==void 0?f.nextDep:l.deps;if(h!==void 0&&h.dep===u){h.version=d,l.depsTail=h;return}const m=u.subsTail;if(m!==void 0&&m.version===d&&m.sub===l)return;const y=l.depsTail=u.subsTail={version:d,dep:u,sub:l,prevDep:f,nextDep:h,prevSub:m,nextSub:void 0};h!==void 0&&(h.prevDep=y),f!==void 0?f.nextDep=y:l.deps=y,m!==void 0?m.nextSub=y:u.subs=y}function s(u,l=u.sub){const d=u.dep,f=u.prevDep,h=u.nextDep,m=u.nextSub,y=u.prevSub;return h!==void 0?h.prevDep=f:l.depsTail=f,f!==void 0?f.nextDep=h:l.deps=h,m!==void 0?m.prevSub=y:d.subsTail=y,y!==void 0?y.nextSub=m:(d.subs=m)===void 0&&n(d),h}function i(u){let l=u.nextSub,d;e:do{const f=u.sub;let h=f.flags;if(h&60?h&12?h&4?!(h&48)&&c(u,f)?(f.flags=h|40,h&=1):h=0:f.flags=h&-9|32:h=0:f.flags=h|32,h&2&&t(f),h&1){const m=f.subs;if(m!==void 0){const y=(u=m).nextSub;y!==void 0&&(d={value:l,prev:d},l=y);continue}}if((u=l)!==void 0){l=u.nextSub;continue}for(;d!==void 0;)if(u=d.value,d=d.prev,u!==void 0){l=u.nextSub;continue e}break}while(!0)}function a(u,l){let d,f=0,h=!1;e:do{const m=u.dep,y=m.flags;if(l.flags&16)h=!0;else if((y&17)===17){if(e(m)){const g=m.subs;g.nextSub!==void 0&&o(g),h=!0}}else if((y&33)===33){(u.nextSub!==void 0||u.prevSub!==void 0)&&(d={value:u,prev:d}),u=m.deps,l=m,++f;continue}if(!h){const g=u.nextDep;if(g!==void 0){u=g;continue}}for(;f--;){const g=l.subs,p=g.nextSub!==void 0;if(p?(u=d.value,d=d.prev):u=g,h){if(e(l)){p&&o(g),l=u.sub;continue}h=!1}else l.flags&=-33;l=u.sub;const _=u.nextDep;if(_!==void 0){u=_;continue e}}return h}while(!0)}function o(u){do{const l=u.sub,d=l.flags;(d&48)===32&&(l.flags=d|16,(d&6)===2&&t(l))}while((u=u.nextSub)!==void 0)}function c(u,l){let d=l.depsTail;for(;d!==void 0;){if(d===u)return!0;d=d.prevDep}return!1}}let bx=0,dc=0,ah=0;const Ta=[],{link:DFe,unlink:p$,propagate:$Fe,checkDirty:pq,shallowPropagate:MFe}=m$({update(e){return e.depsTail!==void 0?_q(e):kq(e)},notify(e){let t=ah,n=t;do if(Ta[t++]=e,e.flags&=-3,e=e.subs?.sub,e===void 0||!(e.flags&2))break;while(!0);for(ah=t;n<--t;){const r=Ta[n];Ta[n++]=Ta[t],Ta[t]=r}},unwatched(e){e.flags&1?e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,n_(e)):Sq.call(e)}});function gq(){return bx}function bq(){++bx}function yq(){--bx||wq()}function _q(e){e.depsTail=void 0,e.flags=5;try{const t=e.value;return t!==(e.value=e.getter(t))}finally{e.flags&=-5,n_(e)}}function kq(e){return e.flags=1,e.currentValue!==(e.currentValue=e.pendingValue)}function Eq(e){const t=e.flags;if(t&16||t&32&&pq(e.deps,e)){e.depsTail=void 0,e.flags=6;try{e.fn()}finally{e.flags&=-5,n_(e)}}else e.flags=2}function wq(){try{for(;dc<ah;){const e=Ta[dc];Ta[dc++]=void 0,Eq(e)}}finally{for(;dc<ah;){const e=Ta[dc];Ta[dc++]=void 0,e.flags|=10}dc=0,ah=0}}function Sq(){this.depsTail=void 0,this.flags=0,n_(this);const e=this.subs;e!==void 0&&p$(e)}function n_(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=p$(n,e)}function yx(e,t,n){const r=typeof e=="object",s=r?e:void 0;return{next:(r?e.next:e)?.bind(s),error:(r?e.error:t)?.bind(s),complete:(r?e.complete:n)?.bind(s)}}const Rw=[];let p0=0;const{link:h2,unlink:vq,propagate:xq,checkDirty:g$,shallowPropagate:m2}=m$({update(e){return e._update()},notify(e){Rw[Ow++]=e,e.flags&=~Jt.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Jt.Mutable|Jt.Dirty,rb(e))}});let $p=0,Ow=0,Mi;function rb(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=vq(n,e)}function b$(){if(!(gq()>0)){for(;$p<Ow;){const e=Rw[$p];Rw[$p++]=void 0,e.notify()}$p=0,Ow=0}}function y$(e,t){const n=typeof e=="function",r=e,s={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?Jt.None:Jt.Mutable,get(){return Mi!==void 0&&h2(s,Mi,p0),s._snapshot},subscribe(i){const a=yx(i),o={current:!1},c=Tq(()=>{s.get(),o.current?a.next?.(s._snapshot):o.current=!0});return{unsubscribe:()=>{c.stop()}}},_update(i){const a=Mi,o=Object.is;if(n)Mi=s,++p0,s.depsTail=void 0;else if(i===void 0)return!1;n&&(s.flags=Jt.Mutable|Jt.RecursedCheck);try{const c=s._snapshot,u=typeof i=="function"?i(c):i===void 0&&n?r(c):i;return c===void 0||!o(c,u)?(s._snapshot=u,!0):!1}finally{Mi=a,n&&(s.flags&=~Jt.RecursedCheck),rb(s)}}};return n?(s.flags=Jt.Mutable|Jt.Dirty,s.get=function(){const i=s.flags;if(i&Jt.Dirty||i&Jt.Pending&&g$(s.deps,s)){if(s._update()){const a=s.subs;a!==void 0&&m2(a)}}else i&Jt.Pending&&(s.flags=i&~Jt.Pending);return Mi!==void 0&&h2(s,Mi,p0),s._snapshot}):s.set=function(i){if(s._update(i)){const a=s.subs;a!==void 0&&(xq(a),m2(a),b$())}},s}function Tq(e){const t=()=>{const r=Mi;Mi=n,++p0,n.depsTail=void 0,n.flags=Jt.Watching|Jt.RecursedCheck;try{return e()}finally{Mi=r,n.flags&=~Jt.RecursedCheck,rb(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Jt.Watching|Jt.RecursedCheck,notify(){const r=this.flags;r&Jt.Dirty||r&Jt.Pending&&g$(this.deps,this)?t():this.flags=Jt.Watching},stop(){this.flags=Jt.None,this.depsTail=void 0,rb(this)}};return t(),n}class Iq{constructor(t){this.atom=y$(t)}setState(t){this.atom.set(t)}get state(){return this.atom.get()}get(){return this.state}subscribe(t){return this.atom.subscribe(yx(t))}}class Aq{constructor(t){this.atom=y$(t)}get state(){return this.atom.get()}get(){return this.state}subscribe(t){return this.atom.subscribe(yx(t))}}function Cq(e){return typeof e=="function"?new Aq(e):new Iq(e)}function Pq(e){try{bq(),e()}finally{yq(),b$()}}const yo="__TSR_index",p2="popstate",g2="beforeunload";function Nq(e){let t=e.getLocation();const n=new Set,r=a=>{t=e.getLocation(),n.forEach(o=>o({location:t,action:a}))},s=a=>{e.notifyOnIndexChange??!0?r(a):t=e.getLocation()},i=async({task:a,navigateOpts:o,...c})=>{if(o?.ignoreBlocker??!1){a();return}const l=e.getBlockers?.()??[],d=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&l.length&&d)for(const f of l){const h=sb(c.path,c.state);if(await f.blockerFn({currentLocation:t,nextLocation:h,action:c.type})){e.onBlocked?.();return}}a()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:a=>(n.add(a),()=>{n.delete(a)}),push:(a,o,c)=>{const u=t.state[yo];o=b2(u+1,o),i({task:()=>{e.pushState(a,o),r({type:"PUSH"})},navigateOpts:c,type:"PUSH",path:a,state:o})},replace:(a,o,c)=>{const u=t.state[yo];o=b2(u,o),i({task:()=>{e.replaceState(a,o),r({type:"REPLACE"})},navigateOpts:c,type:"REPLACE",path:a,state:o})},go:(a,o)=>{i({task:()=>{e.go(a),s({type:"GO",index:a})},navigateOpts:o,type:"GO"})},back:a=>{i({task:()=>{e.back(a?.ignoreBlocker??!1),s({type:"BACK"})},navigateOpts:a,type:"BACK"})},forward:a=>{i({task:()=>{e.forward(a?.ignoreBlocker??!1),s({type:"FORWARD"})},navigateOpts:a,type:"FORWARD"})},canGoBack:()=>t.state[yo]!==0,createHref:a=>e.createHref(a),block:a=>{if(!e.setBlockers)return()=>{};const o=e.getBlockers?.()??[];return e.setBlockers([...o,a]),()=>{const c=e.getBlockers?.()??[];e.setBlockers?.(c.filter(u=>u!==a))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function b2(e,t){t||(t={});const n=_x();return{...t,key:n,__TSR_key:n,[yo]:e}}function Rq(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let s=[];const i=()=>s,a=I=>s=I,o=(I=>I),c=(()=>sb(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const I=_x();t.history.replaceState({[yo]:0,key:I,__TSR_key:I},"")}let u=c(),l,d=!1,f=!1,h=!1,m=!1;const y=()=>u;let g,p;const _=()=>{g&&(T._ignoreSubscribers=!0,(g.isPush?t.history.pushState:t.history.replaceState)(g.state,"",g.href),T._ignoreSubscribers=!1,g=void 0,p=void 0,l=void 0)},k=(I,$,R)=>{const z=o($);p||(l=u),u=sb($,R),g={href:z,state:R,isPush:g?.isPush||I==="push"},p||(p=Promise.resolve().then(()=>_()))},v=I=>{u=c(),T.notify({type:I})},w=async()=>{if(f){f=!1;return}const I=c(),$=I.state[yo]-u.state[yo],R=$===1,z=$===-1,V=!R&&!z||d;d=!1;const H=V?"GO":z?"BACK":"FORWARD",G=V?{type:"GO",index:$}:{type:z?"BACK":"FORWARD"};if(h)h=!1;else{const Q=i();if(typeof document<"u"&&Q.length){for(const re of Q)if(await re.blockerFn({currentLocation:u,nextLocation:I,action:H})){f=!0,t.history.go(1),T.notify(G);return}}}u=c(),T.notify(G)},S=I=>{if(m){m=!1;return}let $=!1;const R=i();if(typeof document<"u"&&R.length)for(const z of R){const V=z.enableBeforeUnload??!0;if(V===!0){$=!0;break}if(typeof V=="function"&&V()===!0){$=!0;break}}if($)return I.preventDefault(),I.returnValue=""},T=Nq({getLocation:y,getLength:()=>t.history.length,pushState:(I,$)=>k("push",I,$),replaceState:(I,$)=>k("replace",I,$),back:I=>(I&&(h=!0),m=!0,t.history.back()),forward:I=>{I&&(h=!0),m=!0,t.history.forward()},go:I=>{d=!0,t.history.go(I)},createHref:I=>o(I),flush:_,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(g2,S,{capture:!0}),t.removeEventListener(p2,w)},onBlocked:()=>{l&&u!==l&&(u=l)},getBlockers:i,setBlockers:a,notifyOnIndexChange:!1});return t.addEventListener(g2,S,{capture:!0}),t.addEventListener(p2,w),t.history.pushState=function(...I){const $=n.apply(t.history,I);return T._ignoreSubscribers||v("PUSH"),$},t.history.replaceState=function(...I){const $=r.apply(t.history,I);return T._ignoreSubscribers||v("REPLACE"),$},T}function Oq(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function sb(e,t){const n=Oq(e),r=n.indexOf("#"),s=n.indexOf("?"),i=_x();return{href:n,pathname:n.substring(0,r>0?s>0?Math.min(r,s):r:s>0?s:n.length),hash:r>-1?n.substring(r):"",search:s>-1?n.slice(s,r===-1?void 0:r):"",state:t||{[yo]:0,key:i,__TSR_key:i}}}function _x(){return(Math.random()+1).toString(36).substring(7)}const Lq=!1;function oh(e){let t;return Pq(()=>{t=e()}),t}function zh(e){return e[e.length-1]}function Dq(e){return typeof e=="function"}function lo(e,t){return Dq(e)?e(t):e}const $q=Object.prototype.hasOwnProperty,y2=Object.prototype.propertyIsEnumerable;function ls(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=t,s=E2(e)&&E2(r);if(!s&&!(ib(e)&&ib(r)))return r;const i=s?e:_2(e);if(!i)return r;const a=s?r:_2(r);if(!a)return r;const o=i.length,c=a.length,u=s?new Array(c):{};let l=0;for(let d=0;d<c;d++){const f=s?d:a[d],h=e[f],m=r[f];if(h===m){u[f]=h,(s?d<o:$q.call(e,f))&&l++;continue}if(h===null||m===null||typeof h!="object"||typeof m!="object"){u[f]=m;continue}const y=ls(h,m,n+1);u[f]=y,y===h&&l++}return o===c&&l===o?e:u}function _2(e){const t=Object.getOwnPropertyNames(e);for(const s of t)if(!y2.call(e,s))return!1;const n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;const r=t;for(const s of n){if(!y2.call(e,s))return!1;r.push(s)}return r}function ib(e){if(!k2(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!k2(n)||!n.hasOwnProperty("isPrototypeOf"))}function k2(e){return Object.prototype.toString.call(e)==="[object Object]"}function E2(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Vc(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,s=e.length;r<s;r++)if(!Vc(e[r],t[r],n))return!1;return!0}if(ib(e)&&ib(t)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const a in t)if((!r||t[a]!==void 0)&&!Vc(e[a],t[a],n))return!1;return!0}let s=0;if(!r)s=Object.keys(e).length;else for(const a in e)e[a]!==void 0&&s++;let i=0;for(const a in t)if((!r||t[a]!==void 0)&&(i++,i>s||!Vc(e[a],t[a],n)))return!1;return s===i}return!1}function Yl(e){let t,n;const r=new Promise((s,i)=>{t=s,n=i});return r.status="pending",r.resolve=s=>{r.status="resolved",r.value=s,t(s),e?.(s)},r.reject=s=>{r.status="rejected",n(s)},r}function Uh(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function Mq(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function w2(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return Mq(t)}const jq=["http:","https:","mailto:","tel:"];function ab(e,t){if(!e)return!1;try{const n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function cf(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const t=/%25|%5C/gi;let n=0,r="",s;for(;(s=t.exec(e))!==null;)r+=w2(e.slice(n,s.index))+s[0],n=t.lastIndex;r=r+w2(n?e.slice(n):e);let i=!1;return r.startsWith("//")&&(i=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:i}}function Fq(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}var Bq="Invariant failed";function Ro(e,t){if(!e)throw new Error(Bq)}function ob(e){const t=new Map;let n,r;const s=i=>{i.next&&(i.prev?(i.prev.next=i.next,i.next.prev=i.prev,i.next=void 0,r&&(r.next=i,i.prev=r)):(i.next.prev=void 0,n=i.next,i.next=void 0,r&&(i.prev=r,r.next=i)),r=i)};return{get(i){const a=t.get(i);if(a)return s(a),a.value},set(i,a){if(t.size>=e&&n){const c=n;t.delete(c.key),c.next&&(n=c.next,c.next.prev=void 0),c===r&&(r=void 0)}const o=t.get(i);if(o)o.value=a,s(o);else{const c={key:i,value:a,prev:r};r&&(r.next=c),r=c,n||(n=c),t.set(i,c)}},clear(){t.clear(),n=void 0,r=void 0}}}const Ql=0,ru=1,su=2,Vh=3,Rc=4,_$=5;function zq(e){const t=e.indexOf("{");if(t===-1)return null;const n=e.indexOf("}",t);return n===-1||t+1>=e.length?null:[t,n]}function kx(e,t,n=new Uint16Array(6)){const r=e.indexOf("/",t),s=r===-1?e.length:r,i=e.substring(t,s);if(!i||!i.includes("$"))return n[0]=Ql,n[1]=t,n[2]=t,n[3]=s,n[4]=s,n[5]=s,n;if(i==="$"){const o=e.length;return n[0]=su,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n}if(i.charCodeAt(0)===36)return n[0]=ru,n[1]=t,n[2]=t+1,n[3]=s,n[4]=s,n[5]=s,n;const a=zq(i);if(a){const[o,c]=a,u=i.charCodeAt(o+1);if(u===45){if(o+2<i.length&&i.charCodeAt(o+2)===36){const l=o+3,d=c;if(l<d)return n[0]=Vh,n[1]=t+o,n[2]=t+l,n[3]=t+d,n[4]=t+c+1,n[5]=s,n}}else if(u===36){const l=o+1,d=o+2;return d===c?(n[0]=su,n[1]=t+o,n[2]=t+l,n[3]=t+d,n[4]=t+c+1,n[5]=e.length,n):(n[0]=ru,n[1]=t+o,n[2]=t+d,n[3]=t+c,n[4]=t+c+1,n[5]=s,n)}}return n[0]=Ql,n[1]=t,n[2]=t,n[3]=s,n[4]=s,n[5]=s,n}function r_(e,t,n,r,s,i,a){a?.(n);let o=r;{const c=n.fullPath??n.from,u=c.length,l=n.options?.caseSensitive??e,d=!!(n.options?.params?.parse&&n.options?.skipRouteOnParseError?.params);for(;o<u;){const h=kx(c,o,t);let m;const y=o,g=h[5];switch(o=g+1,i++,h[0]){case Ql:{const _=c.substring(h[2],h[3]);if(l){const k=s.static?.get(_);if(k)m=k;else{s.static??=new Map;const v=Oc(n.fullPath??n.from);v.parent=s,v.depth=i,m=v,s.static.set(_,v)}}else{const k=_.toLowerCase(),v=s.staticInsensitive?.get(k);if(v)m=v;else{s.staticInsensitive??=new Map;const w=Oc(n.fullPath??n.from);w.parent=s,w.depth=i,m=w,s.staticInsensitive.set(k,w)}}break}case ru:{const _=c.substring(y,h[1]),k=c.substring(h[4],g),v=l&&!!(_||k),w=_?v?_:_.toLowerCase():void 0,S=k?v?k:k.toLowerCase():void 0,T=!d&&s.dynamic?.find(I=>!I.skipOnParamError&&I.caseSensitive===v&&I.prefix===w&&I.suffix===S);if(T)m=T;else{const I=Ek(ru,n.fullPath??n.from,v,w,S);m=I,I.depth=i,I.parent=s,s.dynamic??=[],s.dynamic.push(I)}break}case Vh:{const _=c.substring(y,h[1]),k=c.substring(h[4],g),v=l&&!!(_||k),w=_?v?_:_.toLowerCase():void 0,S=k?v?k:k.toLowerCase():void 0,T=!d&&s.optional?.find(I=>!I.skipOnParamError&&I.caseSensitive===v&&I.prefix===w&&I.suffix===S);if(T)m=T;else{const I=Ek(Vh,n.fullPath??n.from,v,w,S);m=I,I.parent=s,I.depth=i,s.optional??=[],s.optional.push(I)}break}case su:{const _=c.substring(y,h[1]),k=c.substring(h[4],g),v=l&&!!(_||k),w=_?v?_:_.toLowerCase():void 0,S=k?v?k:k.toLowerCase():void 0,T=Ek(su,n.fullPath??n.from,v,w,S);m=T,T.parent=s,T.depth=i,s.wildcard??=[],s.wildcard.push(T)}}s=m}if(d&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const h=Oc(n.fullPath??n.from);h.kind=_$,h.parent=s,i++,h.depth=i,s.pathless??=[],s.pathless.push(h),s=h}const f=(n.path||!n.children)&&!n.isRoot;if(f&&c.endsWith("/")){const h=Oc(n.fullPath??n.from);h.kind=Rc,h.parent=s,i++,h.depth=i,s.index=h,s=h}s.parse=n.options?.params?.parse??null,s.skipOnParamError=d,s.parsingPriority=n.options?.skipRouteOnParseError?.priority??0,f&&!s.route&&(s.route=n,s.fullPath=n.fullPath??n.from)}if(n.children)for(const c of n.children)r_(e,t,c,o,s,i,a)}function kk(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function oo(e){if(e.pathless)for(const t of e.pathless)oo(t);if(e.static)for(const t of e.static.values())oo(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())oo(t);if(e.dynamic?.length){e.dynamic.sort(kk);for(const t of e.dynamic)oo(t)}if(e.optional?.length){e.optional.sort(kk);for(const t of e.optional)oo(t)}if(e.wildcard?.length){e.wildcard.sort(kk);for(const t of e.wildcard)oo(t)}}function Oc(e){return{kind:Ql,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function Ek(e,t,n,r,s){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:n,prefix:r,suffix:s}}function Uq(e,t){const n=Oc("/"),r=new Uint16Array(6);for(const s of e)r_(!1,r,s,1,n,0);oo(n),t.masksTree=n,t.flatCache=ob(1e3)}function Vq(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const r=Ex(e,t.masksTree);return t.flatCache.set(e,r),r}function Hq(e,t,n,r,s){e||="/",r||="/";const i=t?`case\0${e}`:e;let a=s.singleCache.get(i);if(!a){a=Oc("/");const o=new Uint16Array(6);r_(t,o,{from:e},1,a,0),s.singleCache.set(i,a)}return Ex(r,a,n)}function qq(e,t,n=!1){const r=n?e:`nofuzz\0${e}`,s=t.matchCache.get(r);if(s!==void 0)return s;e||="/";let i;try{i=Ex(e,t.segmentTree,n)}catch(a){if(a instanceof URIError)i=null;else throw a}return i&&(i.branch=Wq(i.route)),t.matchCache.set(r,i),i}function Gq(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function Kq(e,t=!1,n){const r=Oc(e.fullPath),s=new Uint16Array(6),i={},a={};let o=0;return r_(t,s,e,1,r,0,u=>{if(n?.(u,o),Ro(!(u.id in i),`Duplicate routes found with id: ${String(u.id)}`),i[u.id]=u,o!==0&&u.path){const l=Gq(u.fullPath);(!a[l]||u.fullPath.endsWith("/"))&&(a[l]=u)}o++}),oo(r),{processedTree:{segmentTree:r,singleCache:ob(1e3),matchCache:ob(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:a}}function Ex(e,t,n=!1){const r=e.split("/"),s=Yq(e,r,t,n);if(!s)return null;const[i]=k$(e,r,s);return{route:s.node.route,rawParams:i,parsedParams:s.parsedParams}}function k$(e,t,n){const r=Jq(n.node);let s=null;const i={};let a=n.extract?.part??0,o=n.extract?.node??0,c=n.extract?.path??0,u=n.extract?.segment??0;for(;o<r.length;a++,o++,c++,u++){const l=r[o];if(l.kind===Rc)break;if(l.kind===_$){u--,a--,c--;continue}const d=t[a],f=c;if(d&&(c+=d.length),l.kind===ru){s??=n.node.fullPath.split("/");const h=s[u],m=l.prefix?.length??0;if(h.charCodeAt(m)===123){const g=l.suffix?.length??0,p=h.substring(m+2,h.length-g-1),_=d.substring(m,d.length-g);i[p]=decodeURIComponent(_)}else{const g=h.substring(1);i[g]=decodeURIComponent(d)}}else if(l.kind===Vh){if(n.skipped&1<<o){a--,c=f-1;continue}s??=n.node.fullPath.split("/");const h=s[u],m=l.prefix?.length??0,y=l.suffix?.length??0,g=h.substring(m+3,h.length-y-1),p=l.suffix||l.prefix?d.substring(m,d.length-y):d;p&&(i[g]=decodeURIComponent(p))}else if(l.kind===su){const h=l,m=e.substring(f+(h.prefix?.length??0),e.length-(h.suffix?.length??0)),y=decodeURIComponent(m);i["*"]=y,i._splat=y;break}}return n.rawParams&&Object.assign(i,n.rawParams),[i,{part:a,node:o,path:c,segment:u}]}function Wq(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Jq(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Yq(e,t,n,r){if(e==="/"&&n.index)return{node:n.index,skipped:0};const s=!zh(t),i=s&&e!=="/",a=t.length-(s?1:0),o=[{node:n,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let c=null,u=null,l=null;for(;o.length;){const d=o.pop(),{node:f,index:h,skipped:m,depth:y,statics:g,dynamics:p,optionals:_}=d;let{extract:k,rawParams:v,parsedParams:w}=d;if(f.skipOnParamError){if(!wk(e,t,d))continue;v=d.rawParams,k=d.extract,w=d.parsedParams}r&&f.route&&f.kind!==Rc&&uf(u,d)&&(u=d);const S=h===a;if(S&&(f.route&&!i&&uf(l,d)&&(l=d),!f.optional&&!f.wildcard&&!f.index&&!f.pathless))continue;const T=S?void 0:t[h];let I;if(S&&f.index){const $={node:f.index,index:h,skipped:m,depth:y+1,statics:g,dynamics:p,optionals:_,extract:k,rawParams:v,parsedParams:w};let R=!0;if(f.index.skipOnParamError&&(wk(e,t,$)||(R=!1)),R){if(g===a&&!p&&!_&&!m)return $;uf(l,$)&&(l=$)}}if(f.wildcard&&uf(c,d))for(const $ of f.wildcard){const{prefix:R,suffix:z}=$;if(R&&(S||!($.caseSensitive?T:I??=T.toLowerCase()).startsWith(R)))continue;if(z){if(S)continue;const H=t.slice(h).join("/").slice(-z.length);if(($.caseSensitive?H:H.toLowerCase())!==z)continue}const V={node:$,index:a,skipped:m,depth:y,statics:g,dynamics:p,optionals:_,extract:k,rawParams:v,parsedParams:w};if(!($.skipOnParamError&&!wk(e,t,V))){c=V;break}}if(f.optional){const $=m|1<<y,R=y+1;for(let z=f.optional.length-1;z>=0;z--){const V=f.optional[z];o.push({node:V,index:h,skipped:$,depth:R,statics:g,dynamics:p,optionals:_,extract:k,rawParams:v,parsedParams:w})}if(!S)for(let z=f.optional.length-1;z>=0;z--){const V=f.optional[z],{prefix:H,suffix:G}=V;if(H||G){const Q=V.caseSensitive?T:I??=T.toLowerCase();if(H&&!Q.startsWith(H)||G&&!Q.endsWith(G))continue}o.push({node:V,index:h+1,skipped:m,depth:R,statics:g,dynamics:p,optionals:_+1,extract:k,rawParams:v,parsedParams:w})}}if(!S&&f.dynamic&&T)for(let $=f.dynamic.length-1;$>=0;$--){const R=f.dynamic[$],{prefix:z,suffix:V}=R;if(z||V){const H=R.caseSensitive?T:I??=T.toLowerCase();if(z&&!H.startsWith(z)||V&&!H.endsWith(V))continue}o.push({node:R,index:h+1,skipped:m,depth:y+1,statics:g,dynamics:p+1,optionals:_,extract:k,rawParams:v,parsedParams:w})}if(!S&&f.staticInsensitive){const $=f.staticInsensitive.get(I??=T.toLowerCase());$&&o.push({node:$,index:h+1,skipped:m,depth:y+1,statics:g+1,dynamics:p,optionals:_,extract:k,rawParams:v,parsedParams:w})}if(!S&&f.static){const $=f.static.get(T);$&&o.push({node:$,index:h+1,skipped:m,depth:y+1,statics:g+1,dynamics:p,optionals:_,extract:k,rawParams:v,parsedParams:w})}if(f.pathless){const $=y+1;for(let R=f.pathless.length-1;R>=0;R--){const z=f.pathless[R];o.push({node:z,index:h,skipped:m,depth:$,statics:g,dynamics:p,optionals:_,extract:k,rawParams:v,parsedParams:w})}}}if(l&&c)return uf(c,l)?l:c;if(l)return l;if(c)return c;if(r&&u){let d=u.index;for(let h=0;h<u.index;h++)d+=t[h].length;const f=d===e.length?"/":e.slice(d);return u.rawParams??={},u.rawParams["**"]=decodeURIComponent(f),u}return null}function wk(e,t,n){try{const[r,s]=k$(e,t,n);n.rawParams=r,n.extract=s;const i=n.node.parse(r);return n.parsedParams=Object.assign({},n.parsedParams,i),!0}catch{return null}}function uf(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===Rc)>(e.node.kind===Rc)||t.node.kind===Rc==(e.node.kind===Rc)&&t.depth>e.depth))):!0}function g0(e){return wx(e.filter(t=>t!==void 0).join("/"))}function wx(e){return e.replace(/\/{2,}/g,"/")}function E$(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function _o(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function w$(e){return _o(E$(e))}function cb(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function Qq(e,t,n){return cb(e,n)===cb(t,n)}function Xq({base:e,to:t,trailingSlash:n="never",cache:r}){const s=t.startsWith("/"),i=!s&&t===".";let a;if(r){a=s?t:i?e:e+"\0"+t;const d=r.get(a);if(d)return d}let o;if(i)o=e.split("/");else if(s)o=t.split("/");else{for(o=e.split("/");o.length>1&&zh(o)==="";)o.pop();const d=t.split("/");for(let f=0,h=d.length;f<h;f++){const m=d[f];m===""?f?f===h-1&&o.push(m):o=[m]:m===".."?o.pop():m==="."||o.push(m)}}o.length>1&&(zh(o)===""?n==="never"&&o.pop():n==="always"&&o.push(""));let c,u="";for(let d=0;d<o.length;d++){d>0&&(u+="/");const f=o[d];if(!f)continue;c=kx(f,0,c);const h=c[0];if(h===Ql){u+=f;continue}const m=c[5],y=f.substring(0,c[1]),g=f.substring(c[4],m),p=f.substring(c[2],c[3]);h===ru?u+=y||g?`${y}{$${p}}${g}`:`$${p}`:h===su?u+=y||g?`${y}{$}${g}`:"$":u+=`${y}{-$${p}}${g}`}u=wx(u);const l=u||"/";return a&&r&&r.set(a,l),l}function Zq(e){const t=new Map(e.map(s=>[encodeURIComponent(s),s])),n=Array.from(t.keys()).map(s=>s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(n,"g");return s=>s.replace(r,i=>t.get(i)??i)}function Sk(e,t,n){const r=t[e];return typeof r!="string"?r:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(s=>v2(s,n)).join("/"):v2(r,n)}function S2({path:e,params:t,decoder:n,...r}){let s=!1;const i={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:i,isMissingParams:s};if(!e.includes("$"))return{interpolatedPath:e,usedParams:i,isMissingParams:s};const a=e.length;let o=0,c,u="";for(;o<a;){const d=o;c=kx(e,d,c);const f=c[5];if(o=f+1,d===f)continue;const h=c[0];if(h===Ql){u+="/"+e.substring(d,f);continue}if(h===su){const m=t._splat;i._splat=m,i["*"]=m;const y=e.substring(d,c[1]),g=e.substring(c[4],f);if(!m){s=!0,(y||g)&&(u+="/"+y+g);continue}const p=Sk("_splat",t,n);u+="/"+y+p+g;continue}if(h===ru){const m=e.substring(c[2],c[3]);!s&&!(m in t)&&(s=!0),i[m]=t[m];const y=e.substring(d,c[1]),g=e.substring(c[4],f),p=Sk(m,t,n)??"undefined";u+="/"+y+p+g;continue}if(h===Vh){const m=e.substring(c[2],c[3]),y=t[m];if(y==null)continue;i[m]=y;const g=e.substring(d,c[1]),p=e.substring(c[4],f),_=Sk(m,t,n)??"";u+="/"+g+_+p;continue}}return e.endsWith("/")&&(u+="/"),{usedParams:i,interpolatedPath:u||"/",isMissingParams:s}}function v2(e,t){const n=encodeURIComponent(e);return t?.(n)??n}function Qr(e){return!!e?.isNotFound}function eG(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const Lw="tsr-scroll-restoration-v1_3",tG=(e,t)=>{let n;return(...r)=>{n||(n=setTimeout(()=>{e(...r),n=null},t))}};function nG(){const e=eG();if(!e)return null;const t=e.getItem(Lw);let n=t?JSON.parse(t):{};return{state:n,set:r=>{n=lo(r,n)||n;try{e.setItem(Lw,JSON.stringify(n))}catch{console.warn("[ts-router] Could not persist scroll restoration state to sessionStorage.")}}}}const Mp=nG(),rG=e=>e.state.__TSR_key||e.href;function sG(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}let ub=!1;function iG({storageKey:e,key:t,behavior:n,shouldScrollRestoration:r,scrollToTopSelectors:s,location:i}){let a;try{a=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(u){console.error(u);return}const o=t||window.history.state?.__TSR_key,c=a[o];ub=!0;e:{if(r&&c&&Object.keys(c).length>0){for(const d in c){const f=c[d];if(d==="window")window.scrollTo({top:f.scrollY,left:f.scrollX,behavior:n});else if(d){const h=document.querySelector(d);h&&(h.scrollLeft=f.scrollX,h.scrollTop=f.scrollY)}}break e}const u=(i??window.location).hash.split("#",2)[1];if(u){const d=window.history.state?.__hashScrollIntoViewOptions??!0;if(d){const f=document.getElementById(u);f&&f.scrollIntoView(d)}break e}const l={top:0,left:0,behavior:n};if(window.scrollTo(l),s)for(const d of s){if(d==="window")continue;const f=typeof d=="function"?d():document.querySelector(d);f&&f.scrollTo(l)}}ub=!1}function aG(e,t){if(!Mp||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!Mp))return;e.isScrollRestorationSetup=!0,ub=!1;const r=e.options.getScrollRestorationKey||rG;window.history.scrollRestoration="manual";const s=i=>{if(ub||!e.isScrollRestoring)return;let a="";if(i.target===document||i.target===window)a="window";else{const c=i.target.getAttribute("data-scroll-restoration-id");c?a=`[data-scroll-restoration-id="${c}"]`:a=sG(i.target)}const o=r(e.state.location);Mp.set(c=>{const u=c[o]||={},l=u[a]||={};if(a==="window")l.scrollX=window.scrollX||0,l.scrollY=window.scrollY||0;else if(a){const d=document.querySelector(a);d&&(l.scrollX=d.scrollLeft||0,l.scrollY=d.scrollTop||0)}return c})};typeof document<"u"&&document.addEventListener("scroll",tG(s,100),!0),e.subscribe("onRendered",i=>{const a=r(i.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(iG({storageKey:Lw,key:a,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&Mp.set(o=>(o[a]||={},o)))})}function oG(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}function cG(e,t=String){const n=new URLSearchParams;for(const r in e){const s=e[r];s!==void 0&&n.set(r,t(s))}return n.toString()}function vk(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function uG(e){const t=new URLSearchParams(e),n={};for(const[r,s]of t.entries()){const i=n[r];i==null?n[r]=vk(s):Array.isArray(i)?i.push(vk(s)):n[r]=[i,vk(s)]}return n}const lG=fG(JSON.parse),dG=hG(JSON.stringify,JSON.parse);function fG(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=uG(t);for(const r in n){const s=n[r];if(typeof s=="string")try{n[r]=e(s)}catch{}}return n}}function hG(e,t){const n=typeof t=="function";function r(s){if(typeof s=="object"&&s!==null)try{return e(s)}catch{}else if(n&&typeof s=="string")try{return t(s),e(s)}catch{}return s}return s=>{const i=cG(s,r);return i?`?${i}`:""}}const Ps="__root__";function mG(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function ms(e){return e instanceof Response&&!!e.options}const Dw=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},s_=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),Dl=(e,t,n=!0)=>{const r={...e.router.options.context??{}},s=n?t:t-1;for(let i=0;i<=s;i++){const a=e.matches[i];if(!a)continue;const o=e.router.getMatch(a.id);o&&Object.assign(r,o.__routeContext,o.__beforeLoadContext)}return r},x2=(e,t)=>{if(!e.matches.length)return;const n=t.routeId,r=e.matches.findIndex(a=>a.routeId===e.router.routeTree.id),s=r>=0?r:0;let i=n?e.matches.findIndex(a=>a.routeId===n):e.firstBadMatchIndex??e.matches.length-1;i<0&&(i=s);for(let a=i;a>=0;a--){const o=e.matches[a];if(e.router.looseRoutesById[o.routeId].options.notFoundComponent)return a}return n?i:s},fo=(e,t,n)=>{if(!(!ms(n)&&!Qr(n)))throw ms(n)&&n.redirectHandled&&!n.options.reloadDocument||(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,r=>({...r,status:ms(n)?"redirected":r.status==="pending"?"success":r.status,context:Dl(e,t.index),isFetching:!1,error:n})),Qr(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),ms(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n))),n},S$=(e,t)=>!!e.router.getMatch(t)._nonReactive.dehydrated,lf=(e,t,n,r)=>{const{id:s,routeId:i}=e.matches[t],a=e.router.looseRoutesById[i];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??=t,fo(e,e.router.getMatch(s),n);try{a.options.onError?.(n)}catch(o){n=o,fo(e,e.router.getMatch(s),n)}e.updateMatch(s,o=>(o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,o._nonReactive.loadPromise?.resolve(),{...o,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!ms(n)&&!Qr(n)&&(e.serialError??=n)},v$=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const s=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!s_(e,t)&&(n.options.loader||n.options.beforeLoad||T$(n))&&typeof s=="number"&&s!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const a=setTimeout(()=>{Dw(e)},s);r._nonReactive.pendingTimeout=a}},pG=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;v$(e,t,n,r);const s=()=>{const i=e.router.getMatch(t);i.preload&&(i.status==="redirected"||i.status==="notFound")&&fo(e,i,i.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(s):s()},gG=(e,t,n,r)=>{const s=e.router.getMatch(t),i=s._nonReactive.loadPromise;s._nonReactive.loadPromise=Yl(()=>{i?.resolve()});const{paramsError:a,searchError:o}=s;a&&lf(e,n,a,"PARSE_PARAMS"),o&&lf(e,n,o,"VALIDATE_SEARCH"),v$(e,t,r,s);const c=new AbortController;let u=!1;const l=()=>{u||(u=!0,e.updateMatch(t,v=>({...v,isFetching:"beforeLoad",fetchCount:v.fetchCount+1,abortController:c})))},d=()=>{s._nonReactive.beforeLoadPromise?.resolve(),s._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,v=>({...v,isFetching:!1}))};if(!r.options.beforeLoad){oh(()=>{l(),d()});return}s._nonReactive.beforeLoadPromise=Yl();const f={...Dl(e,n,!1),...s.__routeContext},{search:h,params:m,cause:y}=s,g=s_(e,t),p={search:h,abortController:c,params:m,preload:g,context:f,location:e.location,navigate:v=>e.router.navigate({...v,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:g?"preload":y,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},_=v=>{if(v===void 0){oh(()=>{l(),d()});return}(ms(v)||Qr(v))&&(l(),lf(e,n,v,"BEFORE_LOAD")),oh(()=>{l(),e.updateMatch(t,w=>({...w,__beforeLoadContext:v})),d()})};let k;try{if(k=r.options.beforeLoad(p),Uh(k))return l(),k.catch(v=>{lf(e,n,v,"BEFORE_LOAD")}).then(_)}catch(v){l(),lf(e,n,v,"BEFORE_LOAD")}_(k)},bG=(e,t)=>{const{id:n,routeId:r}=e.matches[t],s=e.router.looseRoutesById[r],i=()=>o(),a=()=>gG(e,n,t,s),o=()=>{if(S$(e,n))return;const c=pG(e,n,s);return Uh(c)?c.then(a):a()};return i()},yG=(e,t,n)=>{const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const s={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(s),n.options.scripts?.(s),n.options.headers?.(s)]).then(([i,a,o])=>{const c=i?.meta,u=i?.links,l=i?.scripts,d=i?.styles;return{meta:c,links:u,headScripts:l,headers:o,scripts:a,styles:d}})},x$=(e,t,n,r,s)=>{const i=t[r-1],{params:a,loaderDeps:o,abortController:c,cause:u}=e.router.getMatch(n),l=Dl(e,r),d=s_(e,n);return{params:a,deps:o,preload:!!d,parentMatchPromise:i,abortController:c,context:l,location:e.location,navigate:f=>e.router.navigate({...f,_fromLocation:e.location}),cause:d?"preload":u,route:s,...e.router.options.additionalContext}},T2=async(e,t,n,r,s)=>{try{const i=e.router.getMatch(n);try{(!(Lq??e.router.isServer)||i.ssr===!0)&&lb(s);const a=s.options.loader?.(x$(e,t,n,r,s)),o=s.options.loader&&Uh(a);if((o||s._lazyPromise||s._componentsPromise||s.options.head||s.options.scripts||s.options.headers||i._nonReactive.minPendingPromise)&&e.updateMatch(n,l=>({...l,isFetching:"loader"})),s.options.loader){const l=o?await a:a;fo(e,e.router.getMatch(n),l),l!==void 0&&e.updateMatch(n,d=>({...d,loaderData:l}))}s._lazyPromise&&await s._lazyPromise;const u=i._nonReactive.minPendingPromise;u&&await u,s._componentsPromise&&await s._componentsPromise,e.updateMatch(n,l=>({...l,error:void 0,context:Dl(e,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(a){let o=a;if(o?.name==="AbortError"){if(i.abortController.signal.aborted){i._nonReactive.loaderPromise?.resolve(),i._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,u=>({...u,status:u.status==="pending"?"success":u.status,isFetching:!1,context:Dl(e,r)}));return}const c=i._nonReactive.minPendingPromise;c&&await c,Qr(a)&&await s.options.notFoundComponent?.preload?.(),fo(e,e.router.getMatch(n),a);try{s.options.onError?.(a)}catch(u){o=u,fo(e,e.router.getMatch(n),u)}e.updateMatch(n,u=>({...u,error:o,context:Dl(e,r),status:"error",isFetching:!1}))}}catch(i){const a=e.router.getMatch(n);a&&(a._nonReactive.loaderPromise=void 0),fo(e,a,i)}},_G=async(e,t,n)=>{async function r(d,f,h,m){const y=Date.now()-f.updatedAt,g=d?m.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:m.options.staleTime??e.router.options.defaultStaleTime??0,p=m.options.shouldReload,_=typeof p=="function"?p(x$(e,t,s,n,m)):p,{status:k,invalid:v}=h;a=k==="success"&&(v||(_??y>g)),d&&m.options.preload===!1||(a&&!e.sync?(o=!0,(async()=>{try{await T2(e,t,s,n,m);const w=e.router.getMatch(s);w._nonReactive.loaderPromise?.resolve(),w._nonReactive.loadPromise?.resolve(),w._nonReactive.loaderPromise=void 0}catch(w){ms(w)&&await e.router.navigate(w.options)}})()):(k!=="success"||a&&e.sync)&&await T2(e,t,s,n,m))}const{id:s,routeId:i}=e.matches[n];let a=!1,o=!1;const c=e.router.looseRoutesById[i];if(!S$(e,s)){const d=e.router.getMatch(s),f=s_(e,s);if(d._nonReactive.loaderPromise){if(d.status==="success"&&!e.sync&&!d.preload)return d;await d._nonReactive.loaderPromise;const h=e.router.getMatch(s),m=h._nonReactive.error||h.error;m&&fo(e,h,m),h.status==="pending"&&await r(f,d,h,c)}else{const h=f&&!e.router.state.matches.some(y=>y.id===s),m=e.router.getMatch(s);m._nonReactive.loaderPromise=Yl(),h!==m.preload&&e.updateMatch(s,y=>({...y,preload:h})),await r(f,d,m,c)}}const u=e.router.getMatch(s);o||(u._nonReactive.loaderPromise?.resolve(),u._nonReactive.loadPromise?.resolve()),clearTimeout(u._nonReactive.pendingTimeout),u._nonReactive.pendingTimeout=void 0,o||(u._nonReactive.loaderPromise=void 0),u._nonReactive.dehydrated=void 0;const l=o?u.isFetching:!1;return l!==u.isFetching||u.invalid!==!1?(e.updateMatch(s,d=>({...d,isFetching:l,invalid:!1})),e.router.getMatch(s)):u};async function I2(e){const t=e,n=[];t.router.state.matches.some(f=>f._forcePending)&&Dw(t);let r;for(let f=0;f<t.matches.length;f++){try{const h=bG(t,f);Uh(h)&&await h}catch(h){if(ms(h))throw h;if(Qr(h))r=h;else if(!t.preload)throw h;break}if(t.serialError)break}const s=t.firstBadMatchIndex??t.matches.length,i=r&&!t.preload?x2(t,r):void 0,a=r&&t.preload?0:i!==void 0?Math.min(i+1,s):s;let o,c;for(let f=0;f<a;f++)n.push(_G(t,n,f));try{await Promise.all(n)}catch{const f=await Promise.allSettled(n);for(const h of f){if(h.status!=="rejected")continue;const m=h.reason;if(ms(m))throw m;Qr(m)?o??=m:c??=m}if(c!==void 0)throw c}const u=o??(r&&!t.preload?r:void 0);let l=t.serialError?t.firstBadMatchIndex??0:t.matches.length-1;if(!u&&r&&t.preload)return t.matches;if(u){const f=x2(t,u);Ro(f!==void 0);const h=t.matches[f],m=t.router.looseRoutesById[h.routeId],y=t.router.options?.defaultNotFoundComponent;!m.options.notFoundComponent&&y&&(m.options.notFoundComponent=y),u.routeId=h.routeId;const g=h.routeId===t.router.routeTree.id;t.updateMatch(h.id,p=>({...p,...g?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:u},isFetching:!1})),l=f,await lb(m)}else if(!t.preload){const f=t.matches[0];f.globalNotFound||t.router.getMatch(f.id)?.globalNotFound&&t.updateMatch(f.id,m=>({...m,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const f=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await lb(f)}for(let f=0;f<=l;f++){const h=t.matches[f],{id:m,routeId:y}=h,g=t.router.looseRoutesById[y];try{const p=yG(t,m,g);if(p){const _=await p;t.updateMatch(m,k=>({...k,..._}))}}catch(p){console.error(`Error executing head for route ${y}:`,p)}}const d=Dw(t);if(Uh(d)&&await d,u)throw u;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}async function lb(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{const{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{const n=[];for(const r of I$){const s=e.options[r]?.preload;s&&n.push(s())}if(n.length)return Promise.all(n).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function T$(e){for(const t of I$)if(e.options[t]?.preload)return!0;return!1}const I$=["component","errorComponent","pendingComponent","notFoundComponent"];function kG(e){return{input:({url:t})=>{for(const n of e)t=$w(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=A$(e[n],t);return t}}}function EG(e){const t=w$(e.basepath),n=`/${t}`,r=`${n}/`,s=e.caseSensitive?n:n.toLowerCase(),i=e.caseSensitive?r:r.toLowerCase();return{input:({url:a})=>{const o=e.caseSensitive?a.pathname:a.pathname.toLowerCase();return o===s?a.pathname="/":o.startsWith(i)&&(a.pathname=a.pathname.slice(n.length)),a},output:({url:a})=>(a.pathname=g0(["/",t,a.pathname]),a)}}function $w(e,t){const n=e?.input?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function A$(e,t){const n=e?.output?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function Hc(e){const t=e.resolvedLocation,n=e.location,r=t?.pathname!==n.pathname,s=t?.href!==n.href,i=t?.hash!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:r,hrefChanged:s,hashChanged:i}}function wG(e){const t=e.filter(n=>n.status!=="redirected");return t.length===e.length?e:t}class SG{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{const r=this.options,s=this.basepath??r?.basepath??"/",i=this.basepath===void 0,a=r?.rewrite;if(this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=Zq(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=Rq()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let f;this.resolvePathCache=ob(1e3),f=this.buildRouteTree(),this.setRoutes(f)}!this.__store&&this.latestLocation&&(this.__store=Cq(xG(this.latestLocation)),aG(this));let o=!1;const c=this.options.basepath??"/",u=this.options.rewrite;if(i||s!==c||a!==u){this.basepath=c;const f=[],h=w$(c);h&&h!=="/"&&f.push(EG({basepath:c})),u&&f.push(u),this.rewrite=f.length===0?void 0:f.length===1?f[0]:kG(f),this.history&&this.updateLatestLocation(),o=!0}o&&this.__store&&this.__store.setState(f=>({...f,location:this.latestLocation})),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const n=Kq(this.routeTree,this.options.caseSensitive,(r,s)=>{r.init({originalIndex:s})});return this.options.routeMasks&&Uq(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,r)=>{const s={eventType:n,fn:r};return this.subscribers.add(s),()=>{this.subscribers.delete(s)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const s=({pathname:c,search:u,hash:l,href:d,state:f})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(c)){const _=this.options.parseSearch(u),k=this.options.stringifySearch(_);return{href:c+k+l,publicHref:d,pathname:cf(c).path,external:!1,searchStr:k,search:ls(r?.search,_),hash:cf(l.slice(1)).path,state:ls(r?.state,f)}}const h=new URL(d,this.origin),m=$w(this.rewrite,h),y=this.options.parseSearch(m.search),g=this.options.stringifySearch(y);return m.search=g,{href:m.href.replace(m.origin,""),publicHref:d,pathname:cf(m.pathname).path,external:!!this.rewrite&&m.origin!==this.origin,searchStr:g,search:ls(r?.search,y),hash:cf(m.hash.slice(1)).path,state:ls(r?.state,f)}},i=s(n),{__tempLocation:a,__tempKey:o}=i.state;if(a&&(!o||o===this.tempLocationKey)){const c=s(a);return c.state.key=i.state.key,c.state.__TSR_key=i.state.__TSR_key,delete c.state.__tempLocation,{...c,maskedLocation:i}}return i},this.resolvePathWithBase=(n,r)=>Xq({base:n,to:wx(r),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,s)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},s):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>TG({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const n=this.state.matches.filter(i=>i.status==="pending"),r=this.state.matches.filter(i=>i.isFetching==="loader");new Set([...this.state.pendingMatches??[],...n,...r]).forEach(i=>{this.cancelMatch(i.id)})},this.buildLocation=n=>{const r=(i={})=>{const a=i._fromLocation||this.pendingBuiltLocation||this.latestLocation,o=this.matchRoutesLightweight(a);i.from;const c=i.unsafeRelative==="path"?a.pathname:i.from??o.fullPath,u=this.resolvePathWithBase(c,"."),l=o.search,d={...o.params},f=i.to?this.resolvePathWithBase(u,`${i.to}`):this.resolvePathWithBase(u,"."),h=i.params===!1||i.params===null?{}:(i.params??!0)===!0?d:Object.assign(d,lo(i.params,d)),m=this.getMatchedRoutes(f);let y=m.matchedRoutes;if((!m.foundRoute||m.foundRoute.path!=="/"&&m.routeParams["**"])&&this.options.notFoundRoute&&(y=[...y,this.options.notFoundRoute]),Object.keys(h).length>0)for(const z of y){const V=z.options.params?.stringify??z.options.stringifyParams;if(V)try{Object.assign(h,V(h))}catch{}}const p=n.leaveParams?f:cf(S2({path:f,params:h,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let _=l;if(n._includeValidateSearch&&this.options.search?.strict){const z={};y.forEach(V=>{if(V.options.validateSearch)try{Object.assign(z,b0(V.options.validateSearch,{...z,..._}))}catch{}}),_=z}_=IG({search:_,dest:i,destRoutes:y,_includeValidateSearch:n._includeValidateSearch}),_=ls(l,_);const k=this.options.stringifySearch(_),v=i.hash===!0?a.hash:i.hash?lo(i.hash,a.hash):void 0,w=v?`#${v}`:"";let S=i.state===!0?a.state:i.state?lo(i.state,a.state):{};S=ls(a.state,S);const T=`${p}${k}${w}`;let I,$,R=!1;if(this.rewrite){const z=new URL(T,this.origin),V=A$(this.rewrite,z);I=z.href.replace(z.origin,""),V.origin!==this.origin?($=V.href,R=!0):$=V.pathname+V.search+V.hash}else I=Fq(T),$=I;return{publicHref:$,href:I,pathname:p,search:_,searchStr:k,state:S,hash:v??"",external:R,unmaskOnReload:i.unmaskOnReload}},s=(i={},a)=>{const o=r(i);let c=a?r(a):void 0;if(!c){const u={};if(this.options.routeMasks){const l=Vq(o.pathname,this.processedTree);if(l){Object.assign(u,l.rawParams);const{from:d,params:f,...h}=l.route,m=f===!1||f===null?{}:(f??!0)===!0?u:Object.assign(u,lo(f,u));a={from:n.from,...h,params:m},c=r(a)}}}return c&&(o.maskedLocation=c),o};return n.mask?s(n,{from:n.from,...n.mask}):s(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:r,...s})=>{const i=()=>{const c=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];c.forEach(l=>{s.state[l]=this.latestLocation.state[l]});const u=Vc(s.state,this.latestLocation.state);return c.forEach(l=>{delete s.state[l]}),u},a=_o(this.latestLocation.href)===_o(s.href),o=this.commitLocationPromise;if(this.commitLocationPromise=Yl(()=>{o?.resolve()}),a&&i())this.load();else{let{maskedLocation:c,hashScrollIntoView:u,...l}=s;c&&(l={...c,state:{...c.state,__tempKey:void 0,__tempLocation:{...l,search:l.searchStr,state:{...l.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(l.unmaskOnReload??this.options.unmaskOnReload??!1)&&(l.state.__tempKey=this.tempLocationKey)),l.state.__hashScrollIntoViewOptions=u??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[s.replace?"replace":"push"](l.publicHref,l.state,{ignoreBlocker:r})}return this.resetNextScroll=s.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:s,viewTransition:i,ignoreBlocker:a,href:o,...c}={})=>{if(o){const d=this.history.location.state.__TSR_index,f=sb(o,{__TSR_index:n?d:d+1}),h=new URL(f.pathname,this.origin),m=$w(this.rewrite,h);c.to=m.pathname,c.search=this.options.parseSearch(f.search),c.hash=f.hash.slice(1)}const u=this.buildLocation({...c,_includeValidateSearch:!0});this.pendingBuiltLocation=u;const l=this.commitLocation({...u,viewTransition:i,replace:n,resetScroll:r,hashScrollIntoView:s,ignoreBlocker:a});return Promise.resolve().then(()=>{this.pendingBuiltLocation===u&&(this.pendingBuiltLocation=void 0)}),l},this.navigate=async({to:n,reloadDocument:r,href:s,publicHref:i,...a})=>{let o=!1;if(s)try{new URL(`${s}`),o=!0}catch{}if(o&&!r&&(r=!0),r){if(n!==void 0||!s){const u=this.buildLocation({to:n,...a});s=s??u.publicHref,i=i??u.publicHref}const c=!o&&i?i:s;if(ab(c,this.protocolAllowlist))return Promise.resolve();if(!a.ignoreBlocker){const l=this.history.getBlockers?.()??[];for(const d of l)if(d?.blockerFn&&await d.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return a.replace?window.location.replace(c):window.location.href=c,Promise.resolve()}return this.buildAndCommitLocation({...a,href:s,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const n=this.matchRoutes(this.latestLocation);this.__store.setState(r=>({...r,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:n,cachedMatches:r.cachedMatches.filter(s=>!n.some(i=>i.id===s.id))}))},this.load=async n=>{let r,s,i;for(i=new Promise(o=>{this.startTransition(async()=>{try{this.beforeLoad();const c=this.latestLocation,u=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...Hc({resolvedLocation:u,location:c})}),this.emit({type:"onBeforeLoad",...Hc({resolvedLocation:u,location:c})}),await I2({router:this,sync:n?.sync,matches:this.state.pendingMatches,location:c,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let l=[],d=[],f=[],h=[];oh(()=>{this.__store.setState(m=>{const y=m.matches,g=m.pendingMatches||m.matches;return l=y.filter(p=>!g.some(_=>_.id===p.id)),d=y.filter(p=>!g.some(_=>_.routeId===p.routeId)),f=g.filter(p=>!y.some(_=>_.routeId===p.routeId)),h=g.filter(p=>y.some(_=>_.routeId===p.routeId)),{...m,isLoading:!1,loadedAt:Date.now(),matches:g,pendingMatches:void 0,cachedMatches:[...m.cachedMatches,...l.filter(p=>p.status!=="error"&&p.status!=="notFound"&&p.status!=="redirected")]}}),this.clearExpiredCache()}),[[d,"onLeave"],[f,"onEnter"],[h,"onStay"]].forEach(([m,y])=>{m.forEach(g=>{this.looseRoutesById[g.routeId].options[y]?.(g)})})})})}})}catch(c){ms(c)?(r=c,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):Qr(c)&&(s=c),this.__store.setState(u=>({...u,statusCode:r?r.status:s?404:u.matches.some(l=>l.status==="error")?500:200,redirect:r}))}this.latestLoadPromise===i&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),o()})}),this.latestLoadPromise=i,await i;this.latestLoadPromise&&i!==this.latestLoadPromise;)await this.latestLoadPromise;let a;this.hasNotFoundMatch()?a=404:this.__store.state.matches.some(o=>o.status==="error")&&(a=500),a!==void 0&&this.__store.setState(o=>({...o,statusCode:a}))},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let s;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const i=this.latestLocation,a=this.state.resolvedLocation,o=typeof r.types=="function"?r.types(Hc({resolvedLocation:a,location:i})):r.types;if(o===!1){n();return}s={update:n,types:o}}else s=n;document.startViewTransition(s)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{const s=this.state.pendingMatches?.some(i=>i.id===n)?"pendingMatches":this.state.matches.some(i=>i.id===n)?"matches":this.state.cachedMatches.some(i=>i.id===n)?"cachedMatches":"";s&&(s==="cachedMatches"?this.__store.setState(i=>({...i,cachedMatches:wG(i.cachedMatches.map(a=>a.id===n?r(a):a))})):this.__store.setState(i=>({...i,[s]:i[s]?.map(a=>a.id===n?r(a):a)})))})},this.getMatch=n=>{const r=s=>s.id===n;return this.state.cachedMatches.find(r)??this.state.pendingMatches?.find(r)??this.state.matches.find(r)},this.invalidate=n=>{const r=s=>n?.filter?.(s)??!0?{...s,invalid:!0,...n?.forcePending||s.status==="error"||s.status==="notFound"?{status:"pending",error:void 0}:void 0}:s;return this.__store.setState(s=>({...s,matches:s.matches.map(r),cachedMatches:s.cachedMatches.map(r),pendingMatches:s.pendingMatches?.map(r)})),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.getParsedLocationHref=n=>n.publicHref||"/",this.resolveRedirect=n=>{const r=n.headers.get("Location");if(!n.options.href||n.options._builtLocation){const s=n.options._builtLocation??this.buildLocation(n.options),i=this.getParsedLocationHref(s);n.options.href=i,n.headers.set("Location",i)}else if(r)try{const s=new URL(r);if(this.origin&&s.origin===this.origin){const i=s.pathname+s.search+s.hash;n.options.href=i,n.headers.set("Location",i)}}catch{}if(n.options.href&&!n.options._builtLocation&&ab(n.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n?.filter;r!==void 0?this.__store.setState(s=>({...s,cachedMatches:s.cachedMatches.filter(i=>!r(i))})):this.__store.setState(s=>({...s,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=r=>{const s=this.looseRoutesById[r.routeId];if(!s.options.loader)return!0;const i=(r.preload?s.options.preloadGcTime??this.options.defaultPreloadGcTime:s.options.gcTime??this.options.defaultGcTime)??300*1e3;return r.status==="error"?!0:Date.now()-r.updatedAt>=i};this.clearCache({filter:n})},this.loadRouteChunk=lb,this.preloadRoute=async n=>{const r=n._builtLocation??this.buildLocation(n);let s=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const i=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(o=>o.id)),a=new Set([...i,...this.state.cachedMatches.map(o=>o.id)]);oh(()=>{s.forEach(o=>{a.has(o.id)||this.__store.setState(c=>({...c,cachedMatches:[...c.cachedMatches,o]}))})});try{return s=await I2({router:this,matches:s,location:r,preload:!0,updateMatch:(o,c)=>{i.has(o)?s=s.map(u=>u.id===o?c(u):u):this.updateMatch(o,c)}}),s}catch(o){if(ms(o))return o.options.reloadDocument?void 0:await this.preloadRoute({...o.options,_fromLocation:r});Qr(o)||console.error(o);return}},this.matchRoute=(n,r)=>{const s={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},i=this.buildLocation(s);if(r?.pending&&this.state.status!=="pending")return!1;const o=(r?.pending===void 0?!this.state.isLoading:r.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,c=Hq(i.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,o.pathname,this.processedTree);return!c||n.params&&!Vc(c.rawParams,n.params,{partial:!0})?!1:r?.includeSearch??!0?Vc(o.search,i.search,{partial:!0})?c.rawParams:!1:c.rawParams},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??dG,parseSearch:t.parseSearch??lG,protocolAllowlist:t.protocolAllowlist??jq}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}setRoutes({routesById:t,routesByPath:n,processedTree:r}){this.routesById=t,this.routesByPath=n,this.processedTree=r;const s=this.options.notFoundRoute;s&&(s.init({originalIndex:99999999999}),this.routesById[s.id]=s)}get looseRoutesById(){return this.routesById}getParentContext(t){return t?.id?t.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(t,n){const r=this.getMatchedRoutes(t.pathname),{foundRoute:s,routeParams:i,parsedParams:a}=r;let{matchedRoutes:o}=r,c=!1;(s?s.path!=="/"&&i["**"]:_o(t.pathname))&&(this.options.notFoundRoute?o=[...o,this.options.notFoundRoute]:c=!0);const u=c?CG(this.options.notFoundMode,o):void 0,l=new Array(o.length),d=new Map(this.state.matches.map(f=>[f.routeId,f]));for(let f=0;f<o.length;f++){const h=o[f],m=l[f-1];let y,g,p;{const G=m?.search??t.search,Q=m?._strictSearch??void 0;try{const re=b0(h.options.validateSearch,{...G})??void 0;y={...G,...re},g={...Q,...re},p=void 0}catch(re){let me=re;if(re instanceof db||(me=new db(re.message,{cause:re})),n?.throwOnError)throw me;y=G,g={},p=me}}const _=h.options.loaderDeps?.({search:y})??"",k=_?JSON.stringify(_):"",{interpolatedPath:v,usedParams:w}=S2({path:h.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),S=h.id+v+k,T=this.getMatch(S),I=d.get(h.id),$=T?._strictParams??w;let R;if(!T)try{A2(h,w,a,$)}catch(G){if(Qr(G)||ms(G)?R=G:R=new vG(G.message,{cause:G}),n?.throwOnError)throw R}Object.assign(i,$);const z=I?"stay":"enter";let V;if(T)V={...T,cause:z,params:I?.params??i,_strictParams:$,search:ls(I?I.search:T.search,y),_strictSearch:g};else{const G=h.options.loader||h.options.beforeLoad||h.lazyFn||T$(h)?"pending":"success";V={id:S,ssr:h.options.ssr,index:f,routeId:h.id,params:I?.params??i,_strictParams:$,pathname:v,updatedAt:Date.now(),search:I?ls(I.search,y):y,_strictSearch:g,searchError:void 0,status:G,isFetching:!1,error:void 0,paramsError:R,__routeContext:void 0,_nonReactive:{loadPromise:Yl()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:z,loaderDeps:I?ls(I.loaderDeps,_):_,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:h.options.staticData||{},fullPath:h.fullPath}}n?.preload||(V.globalNotFound=u===h.id),V.searchError=p;const H=this.getParentContext(m);V.context={...H,...V.__routeContext,...V.__beforeLoadContext},l[f]=V}for(let f=0;f<l.length;f++){const h=l[f],m=this.looseRoutesById[h.routeId],y=this.getMatch(h.id),g=d.get(h.routeId);if(h.params=g?ls(g.params,i):i,!y){const p=l[f-1],_=this.getParentContext(p);if(m.options.context){const k={deps:h.loaderDeps,params:h.params,context:_??{},location:t,navigate:v=>this.navigate({...v,_fromLocation:t}),buildLocation:this.buildLocation,cause:h.cause,abortController:h.abortController,preload:!!h.preload,matches:l,routeId:m.id};h.__routeContext=m.options.context(k)??void 0}h.context={..._,...h.__routeContext,...h.__beforeLoadContext}}}return l}matchRoutesLightweight(t){const{matchedRoutes:n,routeParams:r,parsedParams:s}=this.getMatchedRoutes(t.pathname),i=zh(n),a={...t.search};for(const l of n)try{Object.assign(a,b0(l.options.validateSearch,a))}catch{}const o=zh(this.state.matches),c=o&&o.routeId===i.id&&t.pathname===this.state.location.pathname;let u;if(c)u=o.params;else{const l={...r};for(const d of n)try{A2(d,r,s??{},l)}catch{}u=l}return{matchedRoutes:n,fullPath:i.fullPath,search:a,params:u}}}class db extends Error{}class vG extends Error{}function xG(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function b0(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new db("Async validation not supported");if(n.issues)throw new db(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function TG({pathname:e,routesById:t,processedTree:n}){const r={},s=_o(e);let i,a;const o=qq(s,n,!0);return o&&(i=o.route,Object.assign(r,o.rawParams),a=Object.assign({},o.parsedParams)),{matchedRoutes:o?.branch||[t[Ps]],routeParams:r,foundRoute:i,parsedParams:a}}function IG({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return AG(n)(e,t,r??!1)}function AG(e){const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const s of e){if("search"in s.options)s.options.search?.middlewares&&t.middlewares.push(...s.options.search.middlewares);else if(s.options.preSearchFilters||s.options.postSearchFilters){const i=({search:a,next:o})=>{let c=a;"preSearchFilters"in s.options&&s.options.preSearchFilters&&(c=s.options.preSearchFilters.reduce((l,d)=>d(l),a));const u=o(c);return"postSearchFilters"in s.options&&s.options.postSearchFilters?s.options.postSearchFilters.reduce((l,d)=>d(l),u):u};t.middlewares.push(i)}if(s.options.validateSearch){const i=({search:a,next:o})=>{const c=o(a);if(!t._includeValidateSearch)return c;try{return{...c,...b0(s.options.validateSearch,c)??void 0}}catch{return c}};t.middlewares.push(i)}}const n=({search:s})=>{const i=t.dest;return i.search?i.search===!0?s:lo(i.search,s):{}};t.middlewares.push(n);const r=(s,i,a)=>{if(s>=a.length)return i;const o=a[s];return o({search:i,next:u=>r(s+1,u,a)})};return function(i,a,o){return t.dest=a,t._includeValidateSearch=o,r(0,i,t.middlewares)}}function CG(e,t){if(e!=="root")for(let n=t.length-1;n>=0;n--){const r=t[n];if(r.children)return r.id}return Ps}function A2(e,t,n,r){const s=e.options.params?.parse??e.options.parseParams;if(s)if(e.options.skipRouteOnParseError)for(const i in t)i in n&&(r[i]=n[i]);else{const i=s(r);Object.assign(r,i)}}const PG="Error preloading route! ☝️";class C${constructor(t){if(this.init=n=>{this.originalIndex=n.originalIndex;const r=this.options,s=!r?.path&&!r?.id;this.parentRoute=this.options.getParentRoute?.(),s?this._path=Ps:this.parentRoute||Ro(!1);let i=s?Ps:r?.path;i&&i!=="/"&&(i=E$(i));const a=r?.id||i;let o=s?Ps:g0([this.parentRoute.id===Ps?"":this.parentRoute.id,a]);i===Ps&&(i="/"),o!==Ps&&(o=g0(["/",o]));const c=o===Ps?"/":g0([this.parentRoute.fullPath,i]);this._path=i,this._id=o,this._fullPath=c,this._to=_o(c)},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.redirect=n=>mG({from:this.fullPath,...n}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class NG extends C${constructor(t){super(t)}}const jp=typeof window<"u"?O.useLayoutEffect:O.useEffect;function xk(e){const t=O.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function RG(e,t,n={},r={}){O.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const s=new IntersectionObserver(([i])=>{t(i)},n);return s.observe(e.current),()=>{s.disconnect()}},[t,n,r.disabled,e])}function OG(e){const t=O.useRef(null);return O.useImperativeHandle(e,()=>t.current,[]),t}function Sx(e){const t=e.errorComponent??vx;return b.jsx(LG,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?O.createElement(t,{error:n,reset:r}):e.children})}class LG extends O.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function vx({error:e}){const[t,n]=O.useState(!1);return b.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[b.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),b.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:t?"Hide Error":"Show Error"})]}),b.jsx("div",{style:{height:".25rem"}}),t?b.jsx("div",{children:b.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?b.jsx("code",{children:e.message}):null})}):null]})}function DG({children:e,fallback:t=null}){return P$()?b.jsx(Bh.Fragment,{children:e}):b.jsx(Bh.Fragment,{children:t})}function P$(){return Bh.useSyncExternalStore($G,()=>!0,()=>!1)}function $G(){return()=>{}}var Tk={exports:{}},Ik={},Ak={exports:{}},Ck={};var C2;function MG(){if(C2)return Ck;C2=1;var e=gx();function t(d,f){return d===f&&(d!==0||1/d===1/f)||d!==d&&f!==f}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,s=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function o(d,f){var h=f(),m=r({inst:{value:h,getSnapshot:f}}),y=m[0].inst,g=m[1];return i(function(){y.value=h,y.getSnapshot=f,c(y)&&g({inst:y})},[d,h,f]),s(function(){return c(y)&&g({inst:y}),d(function(){c(y)&&g({inst:y})})},[d]),a(h),h}function c(d){var f=d.getSnapshot;d=d.value;try{var h=f();return!n(d,h)}catch{return!0}}function u(d,f){return f()}var l=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:o;return Ck.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:l,Ck}var P2;function jG(){return P2||(P2=1,Ak.exports=MG()),Ak.exports}var N2;function FG(){if(N2)return Ik;N2=1;var e=gx(),t=jG();function n(u,l){return u===l&&(u!==0||1/u===1/l)||u!==u&&l!==l}var r=typeof Object.is=="function"?Object.is:n,s=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,o=e.useMemo,c=e.useDebugValue;return Ik.useSyncExternalStoreWithSelector=function(u,l,d,f,h){var m=i(null);if(m.current===null){var y={hasValue:!1,value:null};m.current=y}else y=m.current;m=o(function(){function p(S){if(!_){if(_=!0,k=S,S=f(S),h!==void 0&&y.hasValue){var T=y.value;if(h(T,S))return v=T}return v=S}if(T=v,r(k,S))return T;var I=f(S);return h!==void 0&&h(T,I)?(k=S,T):(k=S,v=I)}var _=!1,k,v,w=d===void 0?null:d;return[function(){return p(l())},w===null?void 0:function(){return p(w())}]},[l,d,f,h]);var g=s(u,m[0],m[1]);return a(function(){y.hasValue=!0,y.value=g},[g]),c(g),g},Ik}var R2;function BG(){return R2||(R2=1,Tk.exports=FG()),Tk.exports}var zG=BG();function UG(e,t){return e===t}function VG(e,t,n=UG){const r=O.useCallback(a=>{if(!e)return()=>{};const{unsubscribe:o}=e.subscribe(a);return o},[e]),s=O.useCallback(()=>e?.get(),[e]);return zG.useSyncExternalStoreWithSelector(r,s,s,t,n)}const N$=O.createContext(null);function ws(e){const t=O.useContext(N$);return e?.warn,t}function ps(e){const t=ws({warn:e?.router===void 0}),n=e?.router||t,r=O.useRef(void 0);return VG(n.__store,s=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const i=ls(r.current,e.select(s));return r.current=i,i}return e.select(s)}return s})}const i_=O.createContext(void 0),HG=O.createContext(void 0);function Qi(e){const t=O.useContext(e.from?HG:i_);return ps({select:r=>{const s=r.matches.find(i=>e.from?e.from===i.routeId:i.id===t);if(Ro(!((e.shouldThrow??!0)&&!s),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),s!==void 0)return e.select?e.select(s):s},structuralSharing:e.structuralSharing})}function xx(e){return Qi({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Tx(e){const{select:t,...n}=e;return Qi({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function Ix(e){return Qi({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function Ax(e){return Qi({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function vd(e){const t=ws();return O.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}var Cx=hq();function qG(e,t){const n=ws(),r=OG(t),{activeProps:s,inactiveProps:i,activeOptions:a,to:o,preload:c,preloadDelay:u,hashScrollIntoView:l,replace:d,startTransition:f,resetScroll:h,viewTransition:m,children:y,target:g,disabled:p,style:_,className:k,onClick:v,onBlur:w,onFocus:S,onMouseEnter:T,onMouseLeave:I,onTouchStart:$,ignoreBlocker:R,params:z,search:V,hash:H,state:G,mask:Q,reloadDocument:re,unsafeRelative:me,from:ke,_fromLocation:tt,...C}=e,M=P$(),K=ps({select:X=>{const ae=X.matches[X.matches.length-1];return{search:ae?.search,hash:X.location.hash,path:ae?.pathname}},structuralSharing:!0}),A=e.from,P=O.useMemo(()=>({...e,from:A}),[n,K,A,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),B=O.useMemo(()=>n.buildLocation({...P}),[n,P]),J=B.maskedLocation?B.maskedLocation.publicHref:B.publicHref,be=B.maskedLocation?B.maskedLocation.external:B.external,ge=O.useMemo(()=>QG(J,be,n.history,p),[p,be,J,n.history]),Ee=O.useMemo(()=>{if(ge?.external)return ab(ge.href,n.protocolAllowlist)?void 0:ge.href;if(!XG(o)&&!(typeof o!="string"||o.indexOf(":")===-1))try{return new URL(o),ab(o,n.protocolAllowlist)?void 0:o}catch{}},[o,ge,n.protocolAllowlist]),Oe=ps({select:X=>{if(Ee)return!1;if(a?.exact){if(!Qq(X.location.pathname,B.pathname,n.basepath))return!1}else{const ae=cb(X.location.pathname,n.basepath),Ae=cb(B.pathname,n.basepath);if(!(ae.startsWith(Ae)&&(ae.length===Ae.length||ae[Ae.length]==="/")))return!1}return(a?.includeSearch??!0)&&!Vc(X.location.search,B.search,{partial:!a?.exact,ignoreUndefined:!a?.explicitUndefined})?!1:a?.includeHash?M&&X.location.hash===B.hash:!0}}),q=Oe?lo(s,{})??GG:Pk,W=Oe?Pk:lo(i,{})??Pk,se=[k,q.className,W.className].filter(Boolean).join(" "),le=(_||q.style||W.style)&&{..._,...q.style,...W.style},[we,Fe]=O.useState(!1),Ie=O.useRef(!1),Me=e.reloadDocument||Ee?!1:c??n.options.defaultPreload,gt=u??n.options.defaultPreloadDelay??0,it=O.useCallback(()=>{n.preloadRoute({...P,_builtLocation:B}).catch(X=>{console.warn(X),console.warn(PG)})},[n,P,B]),Ct=O.useCallback(X=>{X?.isIntersecting&&it()},[it]);RG(r,Ct,YG,{disabled:!!p||Me!=="viewport"}),O.useEffect(()=>{Ie.current||!p&&Me==="render"&&(it(),Ie.current=!0)},[p,it,Me]);const zr=X=>{const ae=X.currentTarget.getAttribute("target"),Ae=g!==void 0?g:ae;if(!p&&!ZG(X)&&!X.defaultPrevented&&(!Ae||Ae==="_self")&&X.button===0){X.preventDefault(),Cx.flushSync(()=>{Fe(!0)});const xe=n.subscribe("onResolved",()=>{xe(),Fe(!1)});n.navigate({...P,replace:d,resetScroll:h,hashScrollIntoView:l,startTransition:f,viewTransition:m,ignoreBlocker:R})}};if(Ee)return{...C,ref:r,href:Ee,...y&&{children:y},...g&&{target:g},...p&&{disabled:p},..._&&{style:_},...k&&{className:k},...v&&{onClick:v},...w&&{onBlur:w},...S&&{onFocus:S},...T&&{onMouseEnter:T},...I&&{onMouseLeave:I},...$&&{onTouchStart:$}};const pn=X=>{if(p||Me!=="intent")return;if(!gt){it();return}const ae=X.currentTarget;if(df.has(ae))return;const Ae=setTimeout(()=>{df.delete(ae),it()},gt);df.set(ae,Ae)},Gs=X=>{p||Me!=="intent"||it()},ss=X=>{if(p||!Me||!gt)return;const ae=X.currentTarget,Ae=df.get(ae);Ae&&(clearTimeout(Ae),df.delete(ae))};return{...C,...q,...W,href:ge?.href,ref:r,onClick:Ku([v,zr]),onBlur:Ku([w,ss]),onFocus:Ku([S,pn]),onMouseEnter:Ku([T,pn]),onMouseLeave:Ku([I,ss]),onTouchStart:Ku([$,Gs]),disabled:!!p,target:g,...le&&{style:le},...se&&{className:se},...p&&KG,...Oe&&WG,...M&&we&&JG}}const Pk={},GG={className:"active"},KG={role:"link","aria-disabled":!0},WG={"data-status":"active","aria-current":"page"},JG={"data-transitioning":"transitioning"},df=new WeakMap,YG={rootMargin:"100px"},Ku=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function QG(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function XG(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}const $r=O.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:s,...i}=qG(r,t),a=typeof r.children=="function"?r.children({isActive:i["data-status"]==="active"}):r.children;if(!n){const{disabled:o,...c}=i;return O.createElement("a",c,a)}return O.createElement(n,i,a)});function ZG(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}class eK extends C${constructor(t){super(t),this.useMatch=n=>Qi({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Qi({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Ax({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>Ix({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Tx({...n,from:this.id}),this.useLoaderData=n=>xx({...n,from:this.id}),this.useNavigate=()=>vd({from:this.fullPath}),this.Link=Bh.forwardRef((n,r)=>b.jsx($r,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function Iu(e){return new eK(e)}class tK extends NG{constructor(t){super(t),this.useMatch=n=>Qi({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Qi({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Ax({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>Ix({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Tx({...n,from:this.id}),this.useLoaderData=n=>xx({...n,from:this.id}),this.useNavigate=()=>vd({from:this.fullPath}),this.Link=Bh.forwardRef((n,r)=>b.jsx($r,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function nK(e){return new tK(e)}function O2(e){return typeof e=="object"?new L2(e,{silent:!0}).createRoute(e):new L2(e,{silent:!0}).createRoute}class L2{constructor(t,n){this.path=t,this.createRoute=r=>{const s=Iu(r);return s.isRoot=!1,s},this.silent=n?.silent}}class D2{constructor(t){this.useMatch=n=>Qi({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>Qi({from:this.options.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Ax({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>Ix({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>Tx({...n,from:this.options.id}),this.useLoaderData=n=>xx({...n,from:this.options.id}),this.useNavigate=()=>{const n=ws();return vd({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function $2(e){return typeof e=="object"?new D2(e):t=>new D2({id:e,...t})}function rK(){const e=ws(),t=O.useRef({router:e,mounted:!1}),[n,r]=O.useState(!1),{hasPendingMatches:s,isLoading:i}=ps({select:d=>({isLoading:d.isLoading,hasPendingMatches:d.matches.some(f=>f.status==="pending")}),structuralSharing:!0}),a=xk(i),o=i||n||s,c=xk(o),u=i||s,l=xk(u);return e.startTransition=d=>{r(!0),O.startTransition(()=>{d(),r(!1)})},O.useEffect(()=>{const d=e.history.subscribe(e.load),f=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return _o(e.latestLocation.publicHref)!==_o(f.publicHref)&&e.commitLocation({...f,replace:!0}),()=>{d()}},[e,e.history]),jp(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(f){console.error(f)}})()},[e]),jp(()=>{a&&!i&&e.emit({type:"onLoad",...Hc(e.state)})},[a,e,i]),jp(()=>{l&&!u&&e.emit({type:"onBeforeRouteMount",...Hc(e.state)})},[u,l,e]),jp(()=>{if(c&&!o){const d=Hc(e.state);e.emit({type:"onResolved",...d}),e.__store.setState(f=>({...f,status:"idle",resolvedLocation:f.location})),d.hrefChanged&&oG(e)}},[o,c,e]),null}function sK(e){const t=ps({select:n=>`not-found-${n.location.pathname}-${n.status}`});return b.jsx(Sx,{getResetKey:()=>t,onCatch:(n,r)=>{if(Qr(n))e.onCatch?.(n,r);else throw n},errorComponent:({error:n})=>{if(Qr(n))return e.fallback?.(n);throw n},children:e.children})}function iK(){return b.jsx("p",{children:"Not Found"})}function hl(e){return b.jsx(b.Fragment,{children:e.children})}function R$(e,t,n){return t.options.notFoundComponent?b.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?b.jsx(e.options.defaultNotFoundComponent,{...n}):b.jsx(iK,{})}function aK(){return ws().isScrollRestoring,null}const O$=O.memo(function({matchId:t}){const n=ws(),r=ps({select:y=>{const g=y.matches.findIndex(_=>_.id===t),p=y.matches[g];return Ro(p),{routeId:p.routeId,ssr:p.ssr,_displayPending:p._displayPending,resetKey:y.loadedAt,parentRouteId:y.matches[g-1]?.routeId}},structuralSharing:!0}),s=n.routesById[r.routeId],i=s.options.pendingComponent??n.options.defaultPendingComponent,a=i?b.jsx(i,{}):null,o=s.options.errorComponent??n.options.defaultErrorComponent,c=s.options.onCatch??n.options.defaultOnCatch,u=s.isRoot?s.options.notFoundComponent??n.options.notFoundRoute?.options.component:s.options.notFoundComponent,l=r.ssr===!1||r.ssr==="data-only",d=(!s.isRoot||s.options.wrapInSuspense||l)&&(s.options.wrapInSuspense??i??(s.options.errorComponent?.preload||l))?O.Suspense:hl,f=o?Sx:hl,h=u?sK:hl,m=s.isRoot?s.options.shellComponent??hl:hl;return b.jsxs(m,{children:[b.jsx(i_.Provider,{value:t,children:b.jsx(d,{fallback:a,children:b.jsx(f,{getResetKey:()=>r.resetKey,errorComponent:o||vx,onCatch:(y,g)=>{if(Qr(y))throw y;c?.(y,g)},children:b.jsx(h,{fallback:y=>{if(!u||y.routeId&&y.routeId!==r.routeId||!y.routeId&&!s.isRoot)throw y;return O.createElement(u,y)},children:l||r._displayPending?b.jsx(DG,{fallback:a,children:b.jsx(M2,{matchId:t})}):b.jsx(M2,{matchId:t})})})})}),r.parentRouteId===Ps&&n.options.scrollRestoration?b.jsxs(b.Fragment,{children:[b.jsx(oK,{}),b.jsx(aK,{})]}):null]})});function oK(){const e=ws(),t=O.useRef(void 0);return b.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...Hc(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const M2=O.memo(function({matchId:t}){const n=ws(),{match:r,key:s,routeId:i}=ps({select:c=>{const u=c.matches.find(m=>m.id===t),l=u.routeId,f=(n.routesById[l].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:l,loaderDeps:u.loaderDeps,params:u._strictParams,search:u._strictSearch});return{key:f?JSON.stringify(f):void 0,routeId:l,match:{id:u.id,status:u.status,error:u.error,invalid:u.invalid,_forcePending:u._forcePending,_displayPending:u._displayPending}}},structuralSharing:!0}),a=n.routesById[i],o=O.useMemo(()=>{const c=a.options.component??n.options.defaultComponent;return c?b.jsx(c,{},s):b.jsx(L$,{})},[s,a.options.component,n.options.defaultComponent]);if(r._displayPending)throw n.getMatch(r.id)?._nonReactive.displayPendingPromise;if(r._forcePending)throw n.getMatch(r.id)?._nonReactive.minPendingPromise;if(r.status==="pending"){const c=a.options.pendingMinMs??n.options.defaultPendingMinMs;if(c){const u=n.getMatch(r.id);if(u&&!u._nonReactive.minPendingPromise){const l=Yl();u._nonReactive.minPendingPromise=l,setTimeout(()=>{l.resolve(),u._nonReactive.minPendingPromise=void 0},c)}}throw n.getMatch(r.id)?._nonReactive.loadPromise}if(r.status==="notFound")return Ro(Qr(r.error)),R$(n,a,r.error);if(r.status==="redirected")throw Ro(ms(r.error)),n.getMatch(r.id)?._nonReactive.loadPromise;if(r.status==="error")throw r.error;return o}),L$=O.memo(function(){const t=ws(),n=O.useContext(i_),r=ps({select:u=>u.matches.find(l=>l.id===n)?.routeId}),s=t.routesById[r],i=ps({select:u=>{const d=u.matches.find(f=>f.id===n);return Ro(d),d.globalNotFound}}),a=ps({select:u=>{const l=u.matches,d=l.findIndex(f=>f.id===n);return l[d+1]?.id}}),o=t.options.defaultPendingComponent?b.jsx(t.options.defaultPendingComponent,{}):null;if(i)return R$(t,s,void 0);if(!a)return null;const c=b.jsx(O$,{matchId:a});return r===Ps?b.jsx(O.Suspense,{fallback:o,children:c}):c});function cK(){const e=ws(),n=e.routesById[Ps].options.pendingComponent??e.options.defaultPendingComponent,r=n?b.jsx(n,{}):null,s=typeof document<"u"&&e.ssr?hl:O.Suspense,i=b.jsxs(s,{fallback:r,children:[b.jsx(rK,{}),b.jsx(uK,{})]});return e.options.InnerWrap?b.jsx(e.options.InnerWrap,{children:i}):i}function uK(){const e=ws(),t=ps({select:s=>s.matches[0]?.id}),n=ps({select:s=>s.loadedAt}),r=t?b.jsx(O$,{matchId:t}):null;return b.jsx(i_.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:b.jsx(Sx,{getResetKey:()=>n,errorComponent:vx,onCatch:void 0,children:r})})}function lK(){const e=ws();return ps({select:t=>[t.location.href,t.resolvedLocation?.href,t.status],structuralSharing:!0}),O.useCallback(t=>{const{pending:n,caseSensitive:r,fuzzy:s,includeSearch:i,...a}=t;return e.matchRoute(a,{pending:n,caseSensitive:r,fuzzy:s,includeSearch:i})},[e])}const dK=e=>new fK(e);class fK extends SG{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=O2,globalThis.createLazyFileRoute=$2):typeof window<"u"&&(window.createFileRoute=O2,window.createLazyFileRoute=$2);function hK({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=b.jsx(N$.Provider,{value:e,children:t});return e.options.Wrap?b.jsx(e.options.Wrap,{children:r}):r}function mK({router:e,...t}){return b.jsx(hK,{router:e,...t,children:b.jsx(cK,{})})}const pK=e=>typeof e=="function",N=function(e,t){if(typeof e=="function")return function(){return e(arguments)?t.apply(this,arguments):n=>t(n,...arguments)};switch(e){case 0:case 1:throw new RangeError(`Invalid arity ${e}`);case 2:return function(n,r){return arguments.length>=2?t(n,r):function(s){return t(s,n)}};case 3:return function(n,r,s){return arguments.length>=3?t(n,r,s):function(i){return t(i,n,r)}};case 4:return function(n,r,s,i){return arguments.length>=4?t(n,r,s,i):function(a){return t(a,n,r,s)}};case 5:return function(n,r,s,i,a){return arguments.length>=5?t(n,r,s,i,a):function(o){return t(o,n,r,s,i)}};default:return function(){if(arguments.length>=e)return t.apply(this,arguments);const n=arguments;return function(r){return t(r,...n)}}}},ze=e=>e,a_=e=>()=>e,j2=a_(!0),La=a_(!1),D$=a_(void 0),Xl=D$;function F(e,t,n,r,s,i,a,o,c){switch(arguments.length){case 1:return e;case 2:return t(e);case 3:return n(t(e));case 4:return r(n(t(e)));case 5:return s(r(n(t(e))));case 6:return i(s(r(n(t(e)))));case 7:return a(i(s(r(n(t(e))))));case 8:return o(a(i(s(r(n(t(e)))))));case 9:return c(o(a(i(s(r(n(t(e))))))));default:{let u=arguments[0];for(let l=1;l<arguments.length;l++)u=arguments[l](u);return u}}}const F2="effect/GlobalValue";let ff;const $e=(e,t)=>(ff||(globalThis[F2]??=new Map,ff=globalThis[F2]),ff.has(e)||ff.set(e,t()),ff.get(e)),kn=e=>typeof e=="string",pi=e=>typeof e=="number",Oo=e=>typeof e=="boolean",o_=e=>typeof e=="bigint",fb=e=>typeof e=="symbol",xd=pK,gK=e=>e===void 0,bK=e=>!1,Px=e=>typeof e=="object"&&e!==null,_s=e=>Px(e)||xd(e),Ne=N(2,(e,t)=>_s(e)&&t in e),$$=N(2,(e,t)=>Ne(e,"_tag")&&e._tag===t),Wu=e=>e==null,yK=e=>e!=null,_K=e=>e instanceof Uint8Array,M$=e=>e instanceof Date,j$=e=>typeof e=="string"||Ne(e,Symbol.iterator),Hh=e=>Px(e)&&!Array.isArray(e),kK=e=>Ne(e,"then")&&xd(e.then),c_=e=>`BUG: ${e} - please report an issue at https://github.com/Effect-TS/effect/issues`;let F$=class B${self;called=!1;constructor(t){this.self=t}next(t){return this.called?{value:t,done:!0}:(this.called=!0,{value:this.self,done:!1})}return(t){return{value:t,done:!0}}throw(t){throw t}[Symbol.iterator](){return new B$(this.self)}};const EK=335903614,wK=4150755663,SK=1481765933,vK=1284865837,xK=9007199254740992,TK=134217728;class IK{_state;constructor(t,n,r,s){return Wu(n)&&Wu(t)?(n=Math.random()*4294967295>>>0,t=0):Wu(n)&&(n=t,t=0),Wu(s)&&Wu(r)?(s=this._state?this._state[3]:wK,r=this._state?this._state[2]:EK):Wu(s)&&(s=r,r=0),this._state=new Int32Array([0,0,r>>>0,((s||0)|1)>>>0]),this._next(),B2(this._state,this._state[0],this._state[1],t>>>0,n>>>0),this._next(),this}getState(){return[this._state[0],this._state[1],this._state[2],this._state[3]]}setState(t){this._state[0]=t[0],this._state[1]=t[1],this._state[2]=t[2],this._state[3]=t[3]|1}integer(t){return Math.round(this.number()*Number.MAX_SAFE_INTEGER)%t}number(){const t=(this._next()&67108863)*1,n=(this._next()&134217727)*1;return(t*TK+n)/xK}_next(){const t=this._state[0]>>>0,n=this._state[1]>>>0;AK(this._state,t,n,SK,vK),B2(this._state,this._state[0],this._state[1],this._state[2],this._state[3]);let r=t>>>18,s=(n>>>18|t<<14)>>>0;r=(r^t)>>>0,s=(s^n)>>>0;const i=(s>>>27|r<<5)>>>0,a=t>>>27,o=(-a>>>0&31)>>>0;return(i>>>a|i<<o)>>>0}}function AK(e,t,n,r,s){let i=(n>>>16)*(s&65535)>>>0,a=(n&65535)*(s>>>16)>>>0,o=(n&65535)*(s&65535)>>>0,c=(n>>>16)*(s>>>16)+((a>>>16)+(i>>>16))>>>0;a=a<<16>>>0,o=o+a>>>0,o>>>0<a>>>0&&(c=c+1>>>0),i=i<<16>>>0,o=o+i>>>0,o>>>0<i>>>0&&(c=c+1>>>0),c=c+Math.imul(n,r)>>>0,c=c+Math.imul(t,s)>>>0,e[0]=c,e[1]=o}function B2(e,t,n,r,s){let i=t+r>>>0;const a=n+s>>>0;a>>>0<n>>>0&&(i=i+1|0),e[0]=i,e[1]=a}const Mw=Symbol.for("effect/Utils/YieldWrap");class Rm{#e;constructor(t){this.#e=t}[Mw](){return this.#e}}function CK(e){if(typeof e=="object"&&e!==null&&Mw in e)return e[Mw]();throw new Error(c_("yieldWrapGet"))}const Ts=$e("effect/Utils/isStructuralRegion",()=>({enabled:!1,tester:void 0})),z$={effect_internal_function:e=>e()},PK={effect_internal_function:e=>e()},NK=z$.effect_internal_function(()=>new Error().stack)?.includes("effect_internal_function")===!0,or=NK?z$.effect_internal_function:PK.effect_internal_function,Nk=$e(Symbol.for("effect/Hash/randomHashCache"),()=>new WeakMap),We=Symbol.for("effect/Hash"),Ce=e=>{if(Ts.enabled===!0)return 0;switch(typeof e){case"number":return Rx(e);case"bigint":return Xt(e.toString(10));case"boolean":return Xt(String(e));case"symbol":return Xt(String(e));case"string":return Xt(e);case"undefined":return Xt("undefined");case"function":case"object":return e===null?Xt("null"):e instanceof Date?Number.isNaN(e.getTime())?Xt("Invalid Date"):Ce(e.toISOString()):e instanceof URL?Ce(e.href):RK(e)?e[We]():Nx(e);default:throw new Error(`BUG: unhandled typeof ${typeof e} - please report an issue at https://github.com/Effect-TS/effect/issues`)}},Nx=e=>(Nk.has(e)||Nk.set(e,Rx(Math.floor(Math.random()*Number.MAX_SAFE_INTEGER))),Nk.get(e)),ut=e=>t=>t*53^e,u_=e=>e&3221225471|e>>>1&1073741824,RK=e=>Ne(e,We),Rx=e=>{if(e!==e||e===1/0)return 0;let t=e|0;for(t!==e&&(t^=e*4294967295);e>4294967295;)t^=e/=4294967295;return u_(t)},Xt=e=>{let t=5381,n=e.length;for(;n;)t=t*33^e.charCodeAt(--n);return u_(t)},OK=(e,t)=>{let n=12289;for(let r=0;r<t.length;r++)n^=F(Xt(t[r]),ut(Ce(e[t[r]])));return u_(n)},U$=e=>OK(e,Object.keys(e)),Om=e=>{let t=6151;for(let n=0;n<e.length;n++)t=F(t,ut(Ce(e[n])));return u_(t)},qt=function(){if(arguments.length===1){const n=arguments[0];return function(r){return Object.defineProperty(n,We,{value(){return r},enumerable:!1}),r}}const e=arguments[0],t=arguments[1];return Object.defineProperty(e,We,{value(){return t},enumerable:!1}),t},Je=Symbol.for("effect/Equal");function je(){return arguments.length===1?e=>hb(e,arguments[0]):hb(arguments[0],arguments[1])}function hb(e,t){if(e===t)return!0;const n=typeof e;if(n!==typeof t)return!1;if(n==="object"||n==="function"){if(e!==null&&t!==null){if(qh(e)&&qh(t))return Ce(e)===Ce(t)&&e[Je](t)?!0:Ts.enabled&&Ts.tester?Ts.tester(e,t):!1;if(e instanceof Date&&t instanceof Date){const r=e.getTime(),s=t.getTime();return r===s||Number.isNaN(r)&&Number.isNaN(s)}else if(e instanceof URL&&t instanceof URL)return e.href===t.href}if(Ts.enabled){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every((r,s)=>hb(r,t[s]));if(Object.getPrototypeOf(e)===Object.prototype&&Object.getPrototypeOf(t)===Object.prototype){const r=Object.keys(e),s=Object.keys(t);if(r.length===s.length){for(const i of r)if(!(i in t&&hb(e[i],t[i])))return Ts.tester?Ts.tester(e,t):!1;return!0}}return Ts.tester?Ts.tester(e,t):!1}}return Ts.enabled&&Ts.tester?Ts.tester(e,t):!1}const qh=e=>Ne(e,Je),Ox=()=>je,yt=Symbol.for("nodejs.util.inspect.custom"),Yt=e=>{try{if(Ne(e,"toJSON")&&xd(e.toJSON)&&e.toJSON.length===0)return e.toJSON();if(Array.isArray(e))return e.map(Yt)}catch{return{}}return Lx(e)},Rk="[Circular]";function V$(e){try{return e.toISOString()}catch{return"Invalid Date"}}function LK(e){try{const t=e.toString();return typeof t=="string"?t:String(t)}catch{return"[toString threw]"}}function Lm(e){return kn(e)?JSON.stringify(e):String(e)}function za(e,t){const n=new WeakSet,r=(a,o)=>{const c=a?.constructor;return c&&c!==Object.prototype.constructor&&c.name?`${c.name}(${o})`:o},s=a=>{try{return Reflect.ownKeys(a)}catch{return["[ownKeys threw]"]}};function i(a,o=0){if(Array.isArray(a))return n.has(a)?Rk:(n.add(a),`[${a.map(c=>i(c,o)).join(",")}]`);if(M$(a))return V$(a);if(Ne(a,"toString")&&xd(a.toString)&&a.toString!==Object.prototype.toString&&a.toString!==Array.prototype.toString){const c=LK(a);return a instanceof Error&&a.cause?`${c} (cause: ${i(a.cause,o)})`:c}if(kn(a))return JSON.stringify(a);if(pi(a)||a==null||Oo(a)||fb(a))return String(a);if(o_(a))return String(a)+"n";if(a instanceof Set||a instanceof Map)return n.has(a)?Rk:(n.add(a),`${a.constructor.name}(${i(Array.from(a),o)})`);if(_s(a)){if(n.has(a))return Rk;n.add(a);const c=s(a);{const u=`{${c.map(l=>`${Lm(l)}:${i(a[l],o)}`).join(",")}}`;return r(a,u)}}return String(a)}return i(e,0)}const Mt=e=>JSON.stringify(e,null,2),l_={toJSON(){return Yt(this)},[yt](){return this.toJSON()},toString(){return Mt(this.toJSON())}};let DK=class{[yt](){return this.toJSON()}toString(){return Mt(this.toJSON())}};const Zl=(e,t=2)=>{if(typeof e=="string")return e;try{return typeof e=="object"?H$(e,t):String(e)}catch{return String(e)}},H$=(e,t)=>{let n=[];const r=JSON.stringify(e,(s,i)=>typeof i=="object"&&i!==null?n.includes(i)?void 0:n.push(i)&&(qc.fiberRefs!==void 0&&q$(i)?i[d_](qc.fiberRefs):i):i,t);return n=void 0,r},d_=Symbol.for("effect/Inspectable/Redactable"),q$=e=>typeof e=="object"&&e!==null&&d_ in e,qc=$e("effect/Inspectable/redactableState",()=>({fiberRefs:void 0})),$K=(e,t)=>{const n=qc.fiberRefs;qc.fiberRefs=e;try{return t()}finally{qc.fiberRefs=n}},Lx=e=>q$(e)&&qc.fiberRefs!==void 0?e[d_](qc.fiberRefs):e,Se=(e,t)=>{switch(t.length){case 0:return e;case 1:return t[0](e);case 2:return t[1](t[0](e));case 3:return t[2](t[1](t[0](e)));case 4:return t[3](t[2](t[1](t[0](e))));case 5:return t[4](t[3](t[2](t[1](t[0](e)))));case 6:return t[5](t[4](t[3](t[2](t[1](t[0](e))))));case 7:return t[6](t[5](t[4](t[3](t[2](t[1](t[0](e)))))));case 8:return t[7](t[6](t[5](t[4](t[3](t[2](t[1](t[0](e))))))));case 9:return t[8](t[7](t[6](t[5](t[4](t[3](t[2](t[1](t[0](e)))))))));default:{let n=e;for(let r=0,s=t.length;r<s;r++)n=t[r](n);return n}}},ch="Async",f_="Commit",Qn="Failure",y0="OnFailure",mb="OnSuccess",pb="OnSuccessAndFailure",Xn="Success",G$="Sync",MK="Tag",Td="UpdateRuntimeFlags",gb="While",uh="Iterator",K$="WithRuntime",_0="Yield",Dx="RevertFlags";let jK="3.19.19";const $x=()=>jK,FK=Symbol.for("effect/Effect"),BK=Symbol.for("effect/Stream"),zK=Symbol.for("effect/Sink"),UK=Symbol.for("effect/Channel"),ed={_R:e=>e,_E:e=>e,_A:e=>e,_V:$x()},VK={_A:e=>e,_In:e=>e,_L:e=>e,_E:e=>e,_R:e=>e},HK={_Env:e=>e,_InErr:e=>e,_InElem:e=>e,_InDone:e=>e,_OutErr:e=>e,_OutElem:e=>e,_OutDone:e=>e},Dm={[FK]:ed,[BK]:ed,[zK]:VK,[UK]:HK,[Je](e){return this===e},[We](){return qt(this,Nx(this))},[Symbol.iterator](){return new F$(new Rm(this))},pipe(){return Se(this,arguments)}},Mx={[We](){return qt(this,U$(this))},[Je](e){const t=Object.keys(this),n=Object.keys(e);if(t.length!==n.length)return!1;for(const r of t)if(!(r in e&&je(this[r],e[r])))return!1;return!0}},$m={...Dm,_op:f_},qK={...$m,...Mx},GK=(function(){function e(){}return e.prototype=$m,e})(),W$=Symbol.for("effect/Option"),J$={...Dm,[W$]:{_A:e=>e},[yt](){return this.toJSON()},toString(){return Mt(this.toJSON())}},KK=Object.assign(Object.create(J$),{_tag:"Some",_op:"Some",[Je](e){return Y$(e)&&Q$(e)&&je(this.value,e.value)},[We](){return qt(this,ut(Ce(this._tag))(Ce(this.value)))},toJSON(){return{_id:"Option",_tag:this._tag,value:Yt(this.value)}}}),WK=Ce("None"),JK=Object.assign(Object.create(J$),{_tag:"None",_op:"None",[Je](e){return Y$(e)&&jx(e)},[We](){return WK},toJSON(){return{_id:"Option",_tag:this._tag}}}),Y$=e=>Ne(e,W$),jx=e=>e._tag==="None",Q$=e=>e._tag==="Some",h_=Object.create(JK),Gh=e=>{const t=Object.create(KK);return t.value=e,t},X$=Symbol.for("effect/Context/Tag"),bb=Symbol.for("effect/Context/Reference"),YK="effect/STM",QK=Symbol.for(YK),Fx={...Dm,_op:"Tag",[QK]:ed,[X$]:{_Service:e=>e,_Identifier:e=>e},toString(){return Mt(this.toJSON())},toJSON(){return{_id:"Tag",key:this.key,stack:this.stack}},[yt](){return this.toJSON()},of(e){return e},context(e){return nM(this,e)}},XK={...Fx,[bb]:bb},ZK=e=>{const t=Error.stackTraceLimit;Error.stackTraceLimit=2;const n=new Error;Error.stackTraceLimit=t;const r=Object.create(Fx);return Object.defineProperty(r,"stack",{get(){return n.stack}}),r.key=e,r},eW=e=>()=>{const t=Error.stackTraceLimit;Error.stackTraceLimit=2;const n=new Error;Error.stackTraceLimit=t;function r(){}return Object.setPrototypeOf(r,Fx),r.key=e,Object.defineProperty(r,"stack",{get(){return n.stack}}),r},tW=()=>(e,t)=>{const n=Error.stackTraceLimit;Error.stackTraceLimit=2;const r=new Error;Error.stackTraceLimit=n;function s(){}return Object.setPrototypeOf(s,XK),s.key=e,s.defaultValue=t.defaultValue,Object.defineProperty(s,"stack",{get(){return r.stack}}),s},Z$=Symbol.for("effect/Context"),nW={[Z$]:{_Services:e=>e},[Je](e){if(eM(e)&&this.unsafeMap.size===e.unsafeMap.size){for(const t of this.unsafeMap.keys())if(!e.unsafeMap.has(t)||!je(this.unsafeMap.get(t),e.unsafeMap.get(t)))return!1;return!0}return!1},[We](){return qt(this,Rx(this.unsafeMap.size))},pipe(){return Se(this,arguments)},toString(){return Mt(this.toJSON())},toJSON(){return{_id:"Context",services:Array.from(this.unsafeMap).map(Yt)}},[yt](){return this.toJSON()}},Lo=e=>{const t=Object.create(nW);return t.unsafeMap=e,t},rW=e=>{const t=new Error(`Service not found${e.key?`: ${String(e.key)}`:""}`);if(e.stack){const n=e.stack.split(`
3
- `);if(n.length>2){const r=n[2].match(/at (.*)/);r&&(t.message=t.message+` (defined at ${r[1]})`)}}if(t.stack){const n=t.stack.split(`
4
- `);n.splice(1,3),t.stack=n.join(`
5
- `)}return t},eM=e=>Ne(e,Z$),sW=e=>Ne(e,X$),tM=e=>Ne(e,bb),iW=Lo(new Map),aW=()=>iW,nM=(e,t)=>Lo(new Map([[e.key,t]])),oW=N(3,(e,t,n)=>{const r=new Map(e.unsafeMap);return r.set(t.key,n),Lo(r)}),Ok=$e("effect/Context/defaultValueCache",()=>new Map),m_=e=>{if(Ok.has(e.key))return Ok.get(e.key);const t=e.defaultValue();return Ok.set(e.key,t),t},cW=(e,t)=>e.unsafeMap.has(t.key)?e.unsafeMap.get(t.key):m_(t),rM=N(2,(e,t)=>{if(!e.unsafeMap.has(t.key)){if(bb in t)return m_(t);throw rW(t)}return e.unsafeMap.get(t.key)}),uW=rM,lW=N(3,(e,t,n)=>e.unsafeMap.has(t.key)?e.unsafeMap.get(t.key):tM(t)?m_(t):n()),dW=N(2,(e,t)=>e.unsafeMap.has(t.key)?Gh(e.unsafeMap.get(t.key)):tM(t)?Gh(m_(t)):h_),fW=N(2,(e,t)=>{const n=new Map(e.unsafeMap);for(const[r,s]of t.unsafeMap)n.set(r,s);return Lo(n)}),hW=(...e)=>{const t=new Map;for(let n=0;n<e.length;n++)e[n].unsafeMap.forEach((r,s)=>{t.set(s,r)});return Lo(t)},Jo=ZK,mW=Lo,pW=eM,sM=sW,gi=aW,Bx=nM,ds=oW,ci=uW,hf=lW,iM=rM,Yo=dW,Zr=fW,gW=hW,Fr=eW,Au=tW,zx=e=>(t,n)=>t===n||e(t,n),bW=(e,t)=>e===t,yW=()=>bW,_W=yW(),aM=N(2,(e,t)=>zx((n,r)=>e(t(n),t(r)))),kW=aM(_W,e=>e.getTime()),EW=e=>zx((t,n)=>{if(t.length!==n.length)return!1;for(let r=0;r<t.length;r++)if(!e(t[r],n[r]))return!1;return!0}),Ux=Symbol.for("effect/Either"),oM={...Dm,[Ux]:{_R:e=>e},[yt](){return this.toJSON()},toString(){return Mt(this.toJSON())}},wW=Object.assign(Object.create(oM),{_tag:"Right",_op:"Right",[Je](e){return Vx(e)&&cM(e)&&je(this.right,e.right)},[We](){return ut(Ce(this._tag))(Ce(this.right))},toJSON(){return{_id:"Either",_tag:this._tag,right:Yt(this.right)}}}),SW=Object.assign(Object.create(oM),{_tag:"Left",_op:"Left",[Je](e){return Vx(e)&&Hx(e)&&je(this.left,e.left)},[We](){return ut(Ce(this._tag))(Ce(this.left))},toJSON(){return{_id:"Either",_tag:this._tag,left:Yt(this.left)}}}),Vx=e=>Ne(e,Ux),Hx=e=>e._tag==="Left",cM=e=>e._tag==="Right",uM=e=>{const t=Object.create(SW);return t.left=e,t},lM=e=>{const t=Object.create(wW);return t.right=e,t},vW=e=>Hx(e)?h_:Gh(e.right),xW=N(2,(e,t)=>jx(e)?uM(t()):lM(e.value)),TW=Ux,He=lM,Be=uM,IW=xW,AW=e=>{if(xd(e))try{return He(e())}catch(t){return Be(t)}else try{return He(e.try())}catch(t){return Be(e.catch(t))}},CW=Vx,ir=Hx,Bi=cM,PW=N(2,(e,t)=>ir(e)?Be(t(e.left)):He(e.right)),NW=N(2,(e,t)=>Bi(e)?He(t(e.right)):Be(e.left)),Wr=N(2,(e,{onLeft:t,onRight:n})=>ir(e)?t(e.left):n(e.right)),RW=Wr({onLeft:ze,onRight:ze}),dM=N(2,(e,t)=>{if(Bi(e))return e.right;throw t(e.left)}),fM=dM(()=>new Error("getOrThrow called on a Left")),hM=e=>e.length>0,mM=e=>(t,n)=>t===n?0:e(t,n),OW=mM((e,t)=>e<t?-1:1),pM=N(2,(e,t)=>mM((n,r)=>e(t(n),t(r)))),LW=e=>N(2,(t,n)=>e(t,n)===1),DW=Symbol.for("effect/Option"),fe=()=>h_,ye=Gh,Tn=jx,mt=Q$,hn=N(2,(e,{onNone:t,onSome:n})=>Tn(e)?t():n(e.value)),$W=vW,Kt=N(2,(e,t)=>Tn(e)?t():e.value),Gi=N(2,(e,t)=>Tn(e)?t():e),MW=N(2,(e,t)=>Tn(e)?ye(t()):e),Id=e=>e==null?fe():ye(e),Nr=Kt(D$),jW=e=>(...t)=>{try{return ye(e(...t))}catch{return fe()}},gM=N(2,(e,t)=>{if(mt(e))return e.value;throw t()}),FW=gM(()=>new Error("getOrThrow called on a None")),Jr=N(2,(e,t)=>Tn(e)?fe():ye(t(e.value))),Qo=N(2,(e,t)=>Tn(e)?fe():t(e.value)),bM=N(2,(e,t)=>Tn(e)?fe():Id(t(e.value))),BW=Qo,yM=N(2,(e,t)=>BW(e,n=>t(n)?Gh(n):h_)),zW=e=>N(2,(t,n)=>Tn(t)?!1:e(t.value,n)),UW=Ox(),VW=zW(UW),HW=N(2,(e,t)=>Tn(e)?!1:t(e.value)),qW=(...e)=>e,GW=N(2,(e,t)=>{let n=0;for(const r of e){const s=t(r,n);if(Oo(s)){if(s)return ye(r)}else if(mt(s))return s;n++}return fe()}),KW=()=>({}),WW=e=>_M(e).length===0,JW=N(2,(e,t)=>Object.prototype.hasOwnProperty.call(e,t)),wl=N(2,(e,t)=>{const n={...e};for(const r of _M(e))n[r]=t(e[r],r);return n}),_M=e=>Object.keys(e),YW=N(3,(e,t,n)=>({...e,[t]:n})),p_=e=>new Array(e),QW=N(2,(e,t)=>{const n=Math.max(1,Math.floor(e)),r=new Array(n);for(let s=0;s<n;s++)r[s]=t(s);return r}),It=e=>Array.isArray(e)?e:Array.from(e),XW=e=>Array.isArray(e)?e:[e],ZW=N(2,(e,{onEmpty:t,onNonEmpty:n})=>Qt(e)?n(e):t()),eJ=N(2,(e,{onEmpty:t,onNonEmpty:n})=>Qt(e)?n(Dr(e),iu(e)):t()),yb=N(2,(e,t)=>[t,...e]),tJ=N(2,(e,t)=>[...e,t]),qx=N(2,(e,t)=>It(e).concat(It(t))),nJ=Array.isArray,rJ=e=>e.length===0,sJ=rJ,$l=hM,Qt=hM,kM=(e,t)=>e<0||e>=t.length,iJ=(e,t)=>Math.floor(Math.min(Math.max(0,e),t.length)),aJ=N(2,(e,t)=>{const n=Math.floor(t);return kM(n,e)?fe():ye(e[n])}),EM=N(2,(e,t)=>{const n=Math.floor(t);if(kM(n,e))throw new Error(`Index ${n} out of bounds`);return e[n]}),lh=aJ(0),Dr=EM(0),oJ=e=>Qt(e)?ye(wM(e)):fe(),wM=e=>e[e.length-1],iu=e=>e.slice(1),cJ=(e,t)=>{let n=0;for(const r of e){if(!t(r,n))break;n++}return n},uJ=N(2,(e,t)=>SM(e,cJ(e,t))),lJ=N(2,(e,t)=>{const n=It(e);return n.slice(iJ(t,n),n.length)}),dJ=GW,z2=e=>Array.from(e).reverse(),Kh=N(2,(e,t)=>{const n=Array.from(e);return n.sort(t),n}),U2=N(2,(e,t)=>fJ(e,t,qW)),fJ=N(3,(e,t,n)=>{const r=It(e),s=It(t);if(Qt(r)&&Qt(s)){const i=[n(Dr(r),Dr(s))],a=Math.min(r.length,s.length);for(let o=1;o<a;o++)i[o]=n(r[o],s[o]);return i}return[]}),hJ=Ox(),SM=N(2,(e,t)=>{const n=Array.from(e),r=Math.floor(t);return Qt(n)?r>=1?mJ(n,r):[[],n]:[n,[]]}),mJ=N(2,(e,t)=>{const n=Math.max(1,Math.floor(t));return n>=e.length?[zf(e),[]]:[yb(e.slice(1,n),Dr(e)),e.slice(n)]}),zf=e=>e.slice(),pJ=N(3,(e,t,n)=>{const r=It(e),s=It(t);return Qt(r)?Qt(s)?TM(n)(qx(r,s)):r:s}),k0=N(2,(e,t)=>pJ(e,t,hJ)),Do=()=>[],Qs=e=>[e],Gc=N(2,(e,t)=>e.map(t)),_b=N(2,(e,t)=>{if(sJ(e))return[];const n=[];for(let r=0;r<e.length;r++){const s=t(e[r],r);for(let i=0;i<s.length;i++)n.push(s[i])}return n}),vM=_b(ze),xM=N(2,(e,t)=>{const n=It(e),r=[];for(let s=0;s<n.length;s++){const i=t(n[s],s);mt(i)&&r.push(i.value)}return r}),gJ=N(2,(e,t)=>{const n=It(e),r=[];for(let s=0;s<n.length;s++)t(n[s],s)&&r.push(n[s]);return r}),Gx=N(3,(e,t,n)=>It(e).reduce((r,s,i)=>n(r,s,i),t)),V2=(e,t)=>{const n=[];let r=e,s;for(;mt(s=t(r));){const[i,a]=s.value;n.push(i),r=a}return n},g_=EW,TM=N(2,(e,t)=>{const n=It(e);if(Qt(n)){const r=[Dr(n)],s=iu(n);for(const i of s)r.every(a=>!t(i,a))&&r.push(i);return r}return[]}),bJ=e=>TM(e,Ox()),Ad=N(2,(e,t)=>It(e).join(t)),IM=Symbol.for("effect/Chunk");function yJ(e,t,n,r,s){for(let i=t;i<Math.min(e.length,t+s);i++)n[r+i-t]=e[i];return n}const AM=[],_J=e=>zx((t,n)=>t.length===n.length&&Fs(t).every((r,s)=>e(r,ko(n,s)))),kJ=_J(je),EJ={[IM]:{_A:e=>e},toString(){return Mt(this.toJSON())},toJSON(){return{_id:"Chunk",values:Fs(this).map(Yt)}},[yt](){return this.toJSON()},[Je](e){return Kx(e)&&kJ(this,e)},[We](){return qt(this,Om(Fs(this)))},[Symbol.iterator](){switch(this.backing._tag){case"IArray":return this.backing.array[Symbol.iterator]();case"IEmpty":return AM[Symbol.iterator]();default:return Fs(this)[Symbol.iterator]()}},pipe(){return Se(this,arguments)}},tn=e=>{const t=Object.create(EJ);switch(t.backing=e,e._tag){case"IEmpty":{t.length=0,t.depth=0,t.left=t,t.right=t;break}case"IConcat":{t.length=e.left.length+e.right.length,t.depth=1+Math.max(e.left.depth,e.right.depth),t.left=e.left,t.right=e.right;break}case"IArray":{t.length=e.array.length,t.depth=0,t.left=Zs,t.right=Zs;break}case"ISingleton":{t.length=1,t.depth=0,t.left=Zs,t.right=Zs;break}case"ISlice":{t.length=e.length,t.depth=e.chunk.depth+1,t.left=Zs,t.right=Zs;break}}return t},Kx=e=>Ne(e,IM),Zs=tn({_tag:"IEmpty"}),dr=()=>Zs,Lk=(...e)=>vJ(e),An=e=>tn({_tag:"ISingleton",a:e}),td=e=>Kx(e)?e:Ar(It(e)),jw=(e,t,n)=>{switch(e.backing._tag){case"IArray":{yJ(e.backing.array,0,t,n,e.length);break}case"IConcat":{jw(e.left,t,n),jw(e.right,t,n+e.left.length);break}case"ISingleton":{t[n]=e.backing.a;break}case"ISlice":{let r=0,s=n;for(;r<e.length;)t[s]=ko(e,r),r+=1,s+=1;break}}},wJ=e=>{switch(e.backing._tag){case"IEmpty":return AM;case"IArray":return e.backing.array;default:{const t=new Array(e.length);return jw(e,t,0),e.backing={_tag:"IArray",array:t},e.left=Zs,e.right=Zs,e.depth=0,t}}},Fs=wJ,SJ=e=>{switch(e.backing._tag){case"IEmpty":case"ISingleton":return e;case"IArray":return tn({_tag:"IArray",array:z2(e.backing.array)});case"IConcat":return tn({_tag:"IConcat",left:ja(e.backing.right),right:ja(e.backing.left)});case"ISlice":return Ar(z2(Fs(e)))}},ja=SJ,CM=N(2,(e,t)=>t<0||t>=e.length?fe():ye(ko(e,t))),Ar=e=>e.length===0?dr():e.length===1?An(e[0]):tn({_tag:"IArray",array:e}),vJ=e=>Ar(e),ko=N(2,(e,t)=>{switch(e.backing._tag){case"IEmpty":throw new Error("Index out of bounds");case"ISingleton":{if(t!==0)throw new Error("Index out of bounds");return e.backing.a}case"IArray":{if(t>=e.length||t<0)throw new Error("Index out of bounds");return e.backing.array[t]}case"IConcat":return t<e.left.length?ko(e.left,t):ko(e.right,t-e.left.length);case"ISlice":return ko(e.backing.chunk,t+e.backing.offset)}}),Fw=N(2,(e,t)=>Sn(e,An(t))),wr=N(2,(e,t)=>Sn(An(t),e)),kb=N(2,(e,t)=>{if(t<=0)return Zs;if(t>=e.length)return e;switch(e.backing._tag){case"ISlice":return tn({_tag:"ISlice",chunk:e.backing.chunk,length:t,offset:e.backing.offset});case"IConcat":return t>e.left.length?tn({_tag:"IConcat",left:e.left,right:kb(e.right,t-e.left.length)}):kb(e.left,t);default:return tn({_tag:"ISlice",chunk:e,offset:0,length:t})}}),ho=N(2,(e,t)=>{if(t<=0)return e;if(t>=e.length)return Zs;switch(e.backing._tag){case"ISlice":return tn({_tag:"ISlice",chunk:e.backing.chunk,offset:e.backing.offset+t,length:e.backing.length-t});case"IConcat":return t>e.left.length?ho(e.right,t-e.left.length):tn({_tag:"IConcat",left:ho(e.left,t),right:e.right});default:return tn({_tag:"ISlice",chunk:e,offset:t,length:e.length-t})}}),Sn=N(2,(e,t)=>{if(e.backing._tag==="IEmpty")return t;if(t.backing._tag==="IEmpty")return e;const n=t.depth-e.depth;if(Math.abs(n)<=1)return tn({_tag:"IConcat",left:e,right:t});if(n<-1)if(e.left.depth>=e.right.depth){const r=Sn(e.right,t);return tn({_tag:"IConcat",left:e.left,right:r})}else{const r=Sn(e.right.right,t);if(r.depth===e.depth-3){const s=tn({_tag:"IConcat",left:e.right.left,right:r});return tn({_tag:"IConcat",left:e.left,right:s})}else{const s=tn({_tag:"IConcat",left:e.left,right:e.right.left});return tn({_tag:"IConcat",left:s,right:r})}}else if(t.right.depth>=t.left.depth){const r=Sn(e,t.left);return tn({_tag:"IConcat",left:r,right:t.right})}else{const r=Sn(e,t.left.left);if(r.depth===t.depth-3){const s=tn({_tag:"IConcat",left:r,right:t.left.right});return tn({_tag:"IConcat",left:s,right:t.right})}else{const s=tn({_tag:"IConcat",left:t.left.right,right:t.right});return tn({_tag:"IConcat",left:r,right:s})}}}),Wx=N(2,(e,t)=>Ar(gJ(e,t))),Jx=e=>e.length===0,Fa=e=>e.length>0,Yx=CM(0),Qx=e=>ko(e,0),zi=Qx,xJ=e=>CM(e,e.length-1),TJ=N(2,(e,t)=>e.backing._tag==="ISingleton"?An(t(e.backing.a,0)):Ar(F(Fs(e),Gc((n,r)=>t(n,r))))),Ca=e=>ho(e,1),IJ=N(2,(e,t)=>ho(e,e.length-t)),AJ=Gx,au=5,Xx=Math.pow(2,au),CJ=Xx-1,PJ=Xx/2,NJ=Xx/4;function RJ(e){return e-=e>>1&1431655765,e=(e&858993459)+(e>>2&858993459),e=e+(e>>4)&252645135,e+=e>>8,e+=e>>16,e&127}function nd(e,t){return t>>>e&CJ}function Sl(e){return 1<<e}function PM(e,t){return RJ(e&t-1)}const OJ=(e,t)=>({value:e,previous:t});function Ml(e,t,n,r){let s=r;if(!e){const i=r.length;s=new Array(i);for(let a=0;a<i;++a)s[a]=r[a]}return s[t]=n,s}function NM(e,t,n){const r=n.length-1;let s=0,i=0,a=n;if(e)s=i=t;else for(a=new Array(r);s<t;)a[i++]=n[s++];for(++s;s<=r;)a[i++]=n[s++];return e&&(a.length=r),a}function LJ(e,t,n,r){const s=r.length;if(e){let c=s;for(;c>=t;)r[c--]=r[c];return r[t]=n,r}let i=0,a=0;const o=new Array(s+1);for(;i<t;)o[a++]=r[i++];for(o[t]=n;i<s;)o[++a]=r[i++];return o}class $o{_tag="EmptyNode";modify(t,n,r,s,i,a){const o=r(fe());return Tn(o)?new $o:(++a.value,new Kc(t,s,i,o))}}function ai(e){return $$(e,"EmptyNode")}function DJ(e){return ai(e)||e._tag==="LeafNode"||e._tag==="CollisionNode"}function b_(e,t){return ai(e)?!1:t===e.edit}class Kc{edit;hash;key;value;_tag="LeafNode";constructor(t,n,r,s){this.edit=t,this.hash=n,this.key=r,this.value=s}modify(t,n,r,s,i,a){if(je(i,this.key)){const c=r(this.value);return c===this.value?this:Tn(c)?(--a.value,new $o):b_(this,t)?(this.value=c,this):new Kc(t,s,i,c)}const o=r(fe());return Tn(o)?this:(++a.value,RM(t,n,this.hash,this,s,new Kc(t,s,i,o)))}}class Zx{edit;hash;children;_tag="CollisionNode";constructor(t,n,r){this.edit=t,this.hash=n,this.children=r}modify(t,n,r,s,i,a){if(s===this.hash){const c=b_(this,t),u=this.updateCollisionList(c,t,this.hash,this.children,r,i,a);return u===this.children?this:u.length>1?new Zx(t,this.hash,u):u[0]}const o=r(fe());return Tn(o)?this:(++a.value,RM(t,n,this.hash,this,s,new Kc(t,s,i,o)))}updateCollisionList(t,n,r,s,i,a,o){const c=s.length;for(let l=0;l<c;++l){const d=s[l];if("key"in d&&je(a,d.key)){const f=d.value,h=i(f);return h===f?s:Tn(h)?(--o.value,NM(t,l,s)):Ml(t,l,new Kc(n,r,a,h),s)}}const u=i(fe());return Tn(u)?s:(++o.value,Ml(t,c,new Kc(n,r,a,u),s))}}class rd{edit;mask;children;_tag="IndexedNode";constructor(t,n,r){this.edit=t,this.mask=n,this.children=r}modify(t,n,r,s,i,a){const o=this.mask,c=this.children,u=nd(n,s),l=Sl(u),d=PM(o,l),f=o&l,h=b_(this,t);if(!f){const _=new $o().modify(t,n+au,r,s,i,a);return _?c.length>=PJ?MJ(t,u,_,o,c):new rd(t,o|l,LJ(h,d,_,c)):this}const m=c[d],y=m.modify(t,n+au,r,s,i,a);if(m===y)return this;let g=o,p;if(ai(y)){if(g&=~l,!g)return new $o;if(c.length<=2&&DJ(c[d^1]))return c[d^1];p=NM(h,d,c)}else p=Ml(h,d,y,c);return h?(this.mask=g,this.children=p,this):new rd(t,g,p)}}class eT{edit;size;children;_tag="ArrayNode";constructor(t,n,r){this.edit=t,this.size=n,this.children=r}modify(t,n,r,s,i,a){let o=this.size;const c=this.children,u=nd(n,s),l=c[u],d=(l||new $o).modify(t,n+au,r,s,i,a);if(l===d)return this;const f=b_(this,t);let h;if(ai(l)&&!ai(d))++o,h=Ml(f,u,d,c);else if(!ai(l)&&ai(d)){if(--o,o<=NJ)return $J(t,o,u,c);h=Ml(f,u,new $o,c)}else h=Ml(f,u,d,c);return f?(this.size=o,this.children=h,this):new eT(t,o,h)}}function $J(e,t,n,r){const s=new Array(t-1);let i=0,a=0;for(let o=0,c=r.length;o<c;++o)if(o!==n){const u=r[o];u&&!ai(u)&&(s[i++]=u,a|=1<<o)}return new rd(e,a,s)}function MJ(e,t,n,r,s){const i=[];let a=r,o=0;for(let c=0;a;++c)a&1&&(i[c]=s[o++]),a>>>=1;return i[t]=n,new eT(e,o+1,i)}function jJ(e,t,n,r,s,i){if(n===s)return new Zx(e,n,[i,r]);const a=nd(t,n),o=nd(t,s);if(a===o)return c=>new rd(e,Sl(a)|Sl(o),[c]);{const c=a<o?[r,i]:[i,r];return new rd(e,Sl(a)|Sl(o),c)}}function RM(e,t,n,r,s,i){let a,o=t;for(;;){const c=jJ(e,o,n,r,s,i);if(typeof c=="function")a=OJ(c,a),o=o+au;else{let u=c;for(;a!=null;)u=a.value(u),a=a.previous;return u}}}const OM="effect/HashMap",Bw=Symbol.for(OM),FJ={[Bw]:Bw,[Symbol.iterator](){return new y_(this,(e,t)=>[e,t])},[We](){let e=Ce(OM);for(const t of this)e^=F(Ce(t[0]),ut(Ce(t[1])));return qt(this,e)},[Je](e){if(UJ(e)){if(e._size!==this._size)return!1;for(const t of this){const n=F(e,nT(t[0],Ce(t[0])));if(Tn(n))return!1;if(!je(t[1],n.value))return!1}return!0}return!1},toString(){return Mt(this.toJSON())},toJSON(){return{_id:"HashMap",values:Array.from(this).map(Yt)}},[yt](){return this.toJSON()},pipe(){return Se(this,arguments)}},tT=(e,t,n,r)=>{const s=Object.create(FJ);return s._editable=e,s._edit=t,s._root=n,s._size=r,s};class y_{map;f;v;constructor(t,n){this.map=t,this.f=n,this.v=LM(this.map._root,this.f,void 0)}next(){if(Tn(this.v))return{done:!0,value:void 0};const t=this.v.value;return this.v=Eb(t.cont),{done:!1,value:t.value}}[Symbol.iterator](){return new y_(this.map,this.f)}}const Eb=e=>e?DM(e[0],e[1],e[2],e[3],e[4]):fe(),LM=(e,t,n=void 0)=>{switch(e._tag){case"LeafNode":return mt(e.value)?ye({value:t(e.key,e.value.value),cont:n}):Eb(n);case"CollisionNode":case"ArrayNode":case"IndexedNode":{const r=e.children;return DM(r.length,r,0,t,n)}default:return Eb(n)}},DM=(e,t,n,r,s)=>{for(;n<e;){const i=t[n++];if(i&&!ai(i))return LM(i,r,[e,t,n,r,s])}return Eb(s)},BJ=tT(!1,0,new $o,0),__=()=>BJ,zJ=e=>{const t=MM(__());for(const n of e)Wh(t,n[0],n[1]);return KJ(t)},UJ=e=>Ne(e,Bw),VJ=e=>e&&ai(e._root),HJ=N(2,(e,t)=>nT(e,t,Ce(t))),nT=N(3,(e,t,n)=>{let r=e._root,s=0;for(;;)switch(r._tag){case"LeafNode":return je(t,r.key)?r.value:fe();case"CollisionNode":{if(n===r.hash){const i=r.children;for(let a=0,o=i.length;a<o;++a){const c=i[a];if("key"in c&&je(t,c.key))return c.value}}return fe()}case"IndexedNode":{const i=nd(s,n),a=Sl(i);if(r.mask&a){r=r.children[PM(r.mask,a)],s+=au;break}return fe()}case"ArrayNode":{if(r=r.children[nd(s,n)],r){s+=au;break}return fe()}default:return fe()}}),qJ=N(2,(e,t)=>mt(nT(e,t,Ce(t)))),Wh=N(3,(e,t,n)=>rT(e,t,()=>ye(n))),GJ=N(3,(e,t,n)=>e._editable?(e._root=t,e._size=n,e):t===e._root?e:tT(e._editable,e._edit,t,n)),$M=e=>new y_(e,t=>t),zw=e=>e._size,MM=e=>tT(!0,e._edit+1,e._root,e._size),KJ=e=>(e._editable=!1,e),rT=N(3,(e,t,n)=>WJ(e,t,Ce(t),n)),WJ=N(4,(e,t,n,r)=>{const s={value:e._size},i=e._root.modify(e._editable?e._edit:NaN,0,r,n,t,s);return F(e,GJ(i,s.value))}),H2=N(2,(e,t)=>rT(e,t,fe)),JJ=N(2,(e,t)=>k_(e,__(),(n,r,s)=>Wh(n,s,t(r,s)))),jM=N(2,(e,t)=>k_(e,void 0,(n,r,s)=>t(r,s))),k_=N(3,(e,t,n)=>{const r=e._root;if(r._tag==="LeafNode")return mt(r.value)?n(t,r.value.value,r.key):t;if(r._tag==="EmptyNode")return t;const s=[r.children];let i;for(;i=s.pop();)for(let a=0,o=i.length;a<o;){const c=i[a++];c&&!ai(c)&&(c._tag==="LeafNode"?mt(c.value)&&(t=n(t,c.value.value,c.key)):s.push(c.children))}return t}),FM="effect/HashSet",Uw=Symbol.for(FM),YJ={[Uw]:Uw,[Symbol.iterator](){return $M(this._keyMap)},[We](){return qt(this,ut(Ce(this._keyMap))(Ce(FM)))},[Je](e){return QJ(e)?zw(this._keyMap)===zw(e._keyMap)&&je(this._keyMap,e._keyMap):!1},toString(){return Mt(this.toJSON())},toJSON(){return{_id:"HashSet",values:Array.from(this).map(Yt)}},[yt](){return this.toJSON()},pipe(){return Se(this,arguments)}},E_=e=>{const t=Object.create(YJ);return t._keyMap=e,t},QJ=e=>Ne(e,Uw),XJ=E_(__()),w_=()=>XJ,ZJ=e=>{const t=sT(w_());for(const n of e)Jh(t,n);return iT(t)},eY=(...e)=>{const t=sT(w_());for(const n of e)Jh(t,n);return iT(t)},tY=N(2,(e,t)=>qJ(e._keyMap,t)),nY=e=>zw(e._keyMap),sT=e=>E_(MM(e._keyMap)),iT=e=>(e._keyMap._editable=!1,e),BM=N(2,(e,t)=>{const n=sT(e);return t(n),iT(n)}),Jh=N(2,(e,t)=>e._keyMap._editable?(Wh(t,!0)(e._keyMap),e):E_(Wh(t,!0)(e._keyMap))),zM=N(2,(e,t)=>e._keyMap._editable?(H2(t)(e._keyMap),e):E_(H2(t)(e._keyMap))),rY=N(2,(e,t)=>BM(e,n=>{for(const r of t)zM(n,r)})),sY=N(2,(e,t)=>BM(w_(),n=>{iY(e,r=>Jh(n,r));for(const r of t)Jh(n,r)})),iY=N(2,(e,t)=>jM(e._keyMap,(n,r)=>t(r))),aY=N(3,(e,t,n)=>k_(e._keyMap,t,(r,s,i)=>n(r,i))),ou=w_,oY=ZJ,aT=eY,UM=tY,oT=nY,dh=Jh,VM=zM,q2=rY,Yh=sY,Qh=aY,Cd="Die",cu="Empty",Cu="Fail",Pd="Interrupt",sd="Parallel",id="Sequential",HM="effect/Cause",qM=Symbol.for(HM),cY={_E:e=>e},Nd={[qM]:cY,[We](){return F(Ce(HM),ut(Ce(_Y(this))),qt(this))},[Je](e){return uY(e)&&yY(this,e)},pipe(){return Se(this,arguments)},toJSON(){switch(this._tag){case"Empty":return{_id:"Cause",_tag:this._tag};case"Die":return{_id:"Cause",_tag:this._tag,defect:Yt(this.defect)};case"Interrupt":return{_id:"Cause",_tag:this._tag,fiberId:this.fiberId.toJSON()};case"Fail":return{_id:"Cause",_tag:this._tag,failure:Yt(this.error)};case"Sequential":case"Parallel":return{_id:"Cause",_tag:this._tag,left:Yt(this.left),right:Yt(this.right)}}},toString(){return Rd(this)},[yt](){return this.toJSON()}},Mo=(()=>{const e=Object.create(Nd);return e._tag=cu,e})(),uu=e=>{const t=Object.create(Nd);return t._tag=Cu,t.error=e,t},Bs=e=>{const t=Object.create(Nd);return t._tag=Cd,t.defect=e,t},ni=e=>{const t=Object.create(Nd);return t._tag=Pd,t.fiberId=e,t},jo=(e,t)=>{const n=Object.create(Nd);return n._tag=sd,n.left=e,n.right=t,n},br=(e,t)=>{const n=Object.create(Nd);return n._tag=id,n.left=e,n.right=t,n},uY=e=>Ne(e,qM),lY=e=>e._tag===cu,dY=e=>e._tag===Cu,GM=e=>e._tag===Cd,fY=e=>e._tag===cu?!0:ad(e,!0,(t,n)=>{switch(n._tag){case cu:return ye(t);case Cd:case Cu:case Pd:return ye(!1);default:return fe()}}),KM=e=>mt(mY(e)),S_=e=>v_(void 0,EY)(e),hY=e=>ja(ad(e,dr(),(t,n)=>n._tag===Cu?ye(F(t,wr(n.error))):fe())),WM=e=>ja(ad(e,dr(),(t,n)=>n._tag===Cd?ye(F(t,wr(n.defect))):fe())),cT=e=>ad(e,ou(),(t,n)=>n._tag===Pd?ye(F(t,dh(n.fiberId))):fe()),JM=e=>uT(e,t=>t._tag===Cu?ye(t.error):fe()),YM=e=>{const t=JM(e);switch(t._tag){case"None":return He(e);case"Some":return Be(t.value)}},mY=e=>uT(e,t=>t._tag===Pd?ye(t.fiberId):fe()),G2=e=>lT(e,{onEmpty:Mo,onFail:()=>Mo,onDie:Bs,onInterrupt:ni,onSequential:br,onParallel:jo}),pY=e=>lT(e,{onEmpty:Mo,onFail:Bs,onDie:Bs,onInterrupt:ni,onSequential:br,onParallel:jo}),gY=N(2,(e,t)=>bY(e,n=>uu(t(n)))),bY=N(2,(e,t)=>lT(e,{onEmpty:Mo,onFail:n=>t(n),onDie:n=>Bs(n),onInterrupt:n=>ni(n),onSequential:(n,r)=>br(n,r),onParallel:(n,r)=>jo(n,r)})),yY=(e,t)=>{let n=An(e),r=An(t);for(;Fa(n)&&Fa(r);){const[s,i]=F(zi(n),ad([ou(),dr()],([c,u],l)=>{const[d,f]=Vw(l);return ye([F(c,Yh(d)),F(u,Sn(f))])})),[a,o]=F(zi(r),ad([ou(),dr()],([c,u],l)=>{const[d,f]=Vw(l);return ye([F(c,Yh(d)),F(u,Sn(f))])}));if(!je(s,a))return!1;n=i,r=o}return!0},_Y=e=>kY(An(e),dr()),kY=(e,t)=>{for(;;){const[n,r]=F(e,Gx([ou(),dr()],([i,a],o)=>{const[c,u]=Vw(o);return[F(i,Yh(c)),F(a,Sn(u))]})),s=oT(n)>0?F(t,wr(n)):t;if(Jx(r))return ja(s);e=r,t=s}throw new Error(c_("Cause.flattenCauseLoop"))},uT=N(2,(e,t)=>{const n=[e];for(;n.length>0;){const r=n.pop(),s=t(r);switch(s._tag){case"None":{switch(r._tag){case id:case sd:{n.push(r.right),n.push(r.left);break}}break}case"Some":return s}}return fe()}),Vw=e=>{let t=e;const n=[];let r=ou(),s=dr();for(;t!==void 0;)switch(t._tag){case cu:{if(n.length===0)return[r,s];t=n.pop();break}case Cu:{if(r=dh(r,Lk(t._tag,t.error)),n.length===0)return[r,s];t=n.pop();break}case Cd:{if(r=dh(r,Lk(t._tag,t.defect)),n.length===0)return[r,s];t=n.pop();break}case Pd:{if(r=dh(r,Lk(t._tag,t.fiberId)),n.length===0)return[r,s];t=n.pop();break}case id:{switch(t.left._tag){case cu:{t=t.right;break}case id:{t=br(t.left.left,br(t.left.right,t.right));break}case sd:{t=jo(br(t.left.left,t.right),br(t.left.right,t.right));break}default:{s=wr(s,t.right),t=t.left;break}}break}case sd:{n.push(t.right),t=t.left;break}}throw new Error(c_("Cause.evaluateCauseLoop"))},EY={emptyCase:j2,failCase:La,dieCase:La,interruptCase:j2,sequentialCase:(e,t,n)=>t&&n,parallelCase:(e,t,n)=>t&&n},K2="SequentialCase",W2="ParallelCase",lT=N(2,(e,{onDie:t,onEmpty:n,onFail:r,onInterrupt:s,onParallel:i,onSequential:a})=>v_(e,void 0,{emptyCase:()=>n,failCase:(o,c)=>r(c),dieCase:(o,c)=>t(c),interruptCase:(o,c)=>s(c),sequentialCase:(o,c,u)=>a(c,u),parallelCase:(o,c,u)=>i(c,u)})),ad=N(3,(e,t,n)=>{let r=t,s=e;const i=[];for(;s!==void 0;){const a=n(r,s);switch(r=mt(a)?a.value:r,s._tag){case id:{i.push(s.right),s=s.left;break}case sd:{i.push(s.right),s=s.left;break}default:{s=void 0;break}}s===void 0&&i.length>0&&(s=i.pop())}return r}),v_=N(3,(e,t,n)=>{const r=[e],s=[];for(;r.length>0;){const a=r.pop();switch(a._tag){case cu:{s.push(He(n.emptyCase(t)));break}case Cu:{s.push(He(n.failCase(t,a.error)));break}case Cd:{s.push(He(n.dieCase(t,a.defect)));break}case Pd:{s.push(He(n.interruptCase(t,a.fiberId)));break}case id:{r.push(a.right),r.push(a.left),s.push(Be({_tag:K2}));break}case sd:{r.push(a.right),r.push(a.left),s.push(Be({_tag:W2}));break}}}const i=[];for(;s.length>0;){const a=s.pop();switch(a._tag){case"Left":{switch(a.left._tag){case K2:{const o=i.pop(),c=i.pop(),u=n.sequentialCase(t,o,c);i.push(u);break}case W2:{const o=i.pop(),c=i.pop(),u=n.parallelCase(t,o,c);i.push(u);break}}break}case"Right":{i.push(a.right);break}}}if(i.length===0)throw new Error("BUG: Cause.reduceWithContext - please report an issue at https://github.com/Effect-TS/effect/issues");return i.pop()}),Rd=(e,t)=>S_(e)?"All fibers interrupted without errors.":XM(e).map(function(n){return t?.renderErrorCause!==!0||n.cause===void 0?n.stack:`${n.stack} {
6
- ${QM(n.cause," ")}
7
- }`}).join(`
8
- `),QM=(e,t)=>{const n=e.stack.split(`
9
- `);let r=`${t}[cause]: ${n[0]}`;for(let s=1,i=n.length;s<i;s++)r+=`
10
- ${t}${n[s]}`;return e.cause&&(r+=` {
11
- ${QM(e.cause,`${t} `)}
12
- ${t}}`),r};class wb extends globalThis.Error{span=void 0;constructor(t){const n=typeof t=="object"&&t!==null,r=Error.stackTraceLimit;Error.stackTraceLimit=1,super(wY(t),n&&"cause"in t&&typeof t.cause<"u"?{cause:new wb(t.cause)}:void 0),this.message===""&&(this.message="An error has occurred"),Error.stackTraceLimit=r,this.name=t instanceof Error?t.name:"Error",n&&(od in t&&(this.span=t[od]),Object.keys(t).forEach(s=>{s in this||(this[s]=t[s])})),this.stack=vY(`${this.name}: ${this.message}`,t instanceof Error&&t.stack?t.stack:"",this.span)}}const wY=e=>{if(typeof e=="string")return e;if(typeof e=="object"&&e!==null&&e instanceof Error)return e.message;try{if(Ne(e,"toString")&&xd(e.toString)&&e.toString!==Object.prototype.toString&&e.toString!==globalThis.Array.prototype.toString)return e.toString()}catch{}return H$(e)},SY=/\((.*)\)/g,Sb=$e("effect/Tracer/spanToTrace",()=>new WeakMap),vY=(e,t,n)=>{const r=[e],s=t.startsWith(e)?t.slice(e.length).split(`
13
- `):t.split(`
14
- `);for(let i=1;i<s.length;i++){if(s[i].includes(" at new BaseEffectError")||s[i].includes(" at new YieldableError")){i++;continue}if(s[i].includes("Generator.next")||s[i].includes("effect_internal_function"))break;r.push(s[i].replace(/at .*effect_instruction_i.*\((.*)\)/,"at $1").replace(/EffectPrimitive\.\w+/,"<anonymous>"))}if(n){let i=n,a=0;for(;i&&i._tag==="Span"&&a<10;){const o=Sb.get(i);if(typeof o=="function"){const c=o();if(typeof c=="string"){const u=c.matchAll(SY);let l=!1;for(const[,d]of u)l=!0,r.push(` at ${i.name} (${d})`);l||r.push(` at ${i.name} (${c.replace(/^at /,"")})`)}else r.push(` at ${i.name}`)}else r.push(` at ${i.name}`);i=Nr(i.parent),a++}}return r.join(`
15
- `)},od=Symbol.for("effect/SpanAnnotation"),XM=e=>v_(e,void 0,{emptyCase:()=>[],dieCase:(t,n)=>[new wb(n)],failCase:(t,n)=>[new wb(n)],interruptCase:()=>[],parallelCase:(t,n,r)=>[...n,...r],sequentialCase:(t,n,r)=>[...n,...r]}),Hw=Symbol.for("effect/Duration"),ZM=BigInt(0),J2=BigInt(24),Fp=BigInt(60),qw=BigInt(1e3),Y2=BigInt(1e6),Q2=BigInt(1e9),xY=/^(-?\d+(?:\.\d+)?)\s+(nanos?|micros?|millis?|seconds?|minutes?|hours?|days?|weeks?)$/,bi=e=>{if(e6(e))return e;if(pi(e))return ud(e);if(o_(e))return Dk(e);if(Array.isArray(e)&&e.length===2&&e.every(pi))return e[0]===-1/0||e[1]===-1/0||Number.isNaN(e[0])||Number.isNaN(e[1])?cd:e[0]===1/0||e[1]===1/0?PY:Dk(BigInt(Math.round(e[0]*1e9))+BigInt(Math.round(e[1])));if(kn(e)){const t=xY.exec(e);if(t){const[n,r,s]=t,i=Number(r);switch(s){case"nano":case"nanos":return Dk(BigInt(r));case"micro":case"micros":return NY(BigInt(r));case"milli":case"millis":return ud(i);case"second":case"seconds":return t6(i);case"minute":case"minutes":return RY(i);case"hour":case"hours":return OY(i);case"day":case"days":return LY(i);case"week":case"weeks":return DY(i)}}}throw new Error("Invalid DurationInput")},X2={_tag:"Millis",millis:0},TY={_tag:"Infinity"},IY={[Hw]:Hw,[We](){return qt(this,U$(this.value))},[Je](e){return e6(e)&&UY(this,e)},toString(){return`Duration(${HY(this)})`},toJSON(){switch(this.value._tag){case"Millis":return{_id:"Duration",_tag:"Millis",millis:this.value.millis};case"Nanos":return{_id:"Duration",_tag:"Nanos",hrtime:MY(this)};case"Infinity":return{_id:"Duration",_tag:"Infinity"}}},[yt](){return this.toJSON()},pipe(){return Se(this,arguments)}},ea=e=>{const t=Object.create(IY);return pi(e)?isNaN(e)||e<=0?t.value=X2:Number.isFinite(e)?Number.isInteger(e)?t.value={_tag:"Millis",millis:e}:t.value={_tag:"Nanos",nanos:BigInt(Math.round(e*1e6))}:t.value=TY:e<=ZM?t.value=X2:t.value={_tag:"Nanos",nanos:e},t},e6=e=>Ne(e,Hw),AY=e=>e.value._tag!=="Infinity",CY=e=>{switch(e.value._tag){case"Millis":return e.value.millis===0;case"Nanos":return e.value.nanos===ZM;case"Infinity":return!1}},cd=ea(0),PY=ea(1/0),Dk=e=>ea(e),NY=e=>ea(e*qw),ud=e=>ea(e),t6=e=>ea(e*1e3),RY=e=>ea(e*6e4),OY=e=>ea(e*36e5),LY=e=>ea(e*864e5),DY=e=>ea(e*6048e5),vb=e=>jY(e,{onMillis:t=>t,onNanos:t=>Number(t)/1e6}),$Y=e=>{const t=bi(e);switch(t.value._tag){case"Infinity":throw new Error("Cannot convert infinite duration to nanos");case"Nanos":return t.value.nanos;case"Millis":return BigInt(Math.round(t.value.millis*1e6))}},MY=e=>{const t=bi(e);switch(t.value._tag){case"Infinity":return[1/0,0];case"Nanos":return[Number(t.value.nanos/Q2),Number(t.value.nanos%Q2)];case"Millis":return[Math.floor(t.value.millis/1e3),Math.round(t.value.millis%1e3*1e6)]}},jY=N(2,(e,t)=>{const n=bi(e);switch(n.value._tag){case"Nanos":return t.onNanos(n.value.nanos);case"Infinity":return t.onMillis(1/0);case"Millis":return t.onMillis(n.value.millis)}}),dT=N(3,(e,t,n)=>{const r=bi(e),s=bi(t);if(r.value._tag==="Infinity"||s.value._tag==="Infinity")return n.onMillis(vb(r),vb(s));if(r.value._tag==="Nanos"||s.value._tag==="Nanos"){const i=r.value._tag==="Nanos"?r.value.nanos:BigInt(Math.round(r.value.millis*1e6)),a=s.value._tag==="Nanos"?s.value.nanos:BigInt(Math.round(s.value.millis*1e6));return n.onNanos(i,a)}return n.onMillis(r.value.millis,s.value.millis)}),FY=(e,t)=>dT(e,t,{onMillis:(n,r)=>n===r,onNanos:(n,r)=>n===r}),BY=N(2,(e,t)=>dT(e,t,{onMillis:(n,r)=>n<=r,onNanos:(n,r)=>n<=r})),zY=N(2,(e,t)=>dT(e,t,{onMillis:(n,r)=>n>=r,onNanos:(n,r)=>n>=r})),UY=N(2,(e,t)=>FY(bi(e),bi(t))),VY=e=>{const t=bi(e);if(t.value._tag==="Infinity")return{days:1/0,hours:1/0,minutes:1/0,seconds:1/0,millis:1/0,nanos:1/0};const n=$Y(t),r=n/Y2,s=r/qw,i=s/Fp,a=i/Fp,o=a/J2;return{days:Number(o),hours:Number(a%J2),minutes:Number(i%Fp),seconds:Number(s%Fp),millis:Number(r%qw),nanos:Number(n%Y2)}},HY=e=>{const t=bi(e);if(t.value._tag==="Infinity")return"Infinity";if(CY(t))return"0";const n=VY(t),r=[];return n.days!==0&&r.push(`${n.days}d`),n.hours!==0&&r.push(`${n.hours}h`),n.minutes!==0&&r.push(`${n.minutes}m`),n.seconds!==0&&r.push(`${n.seconds}s`),n.millis!==0&&r.push(`${n.millis}ms`),n.nanos!==0&&r.push(`${n.nanos}ns`),r.join(" ")},Z2=Symbol.for("effect/MutableRef"),qY={[Z2]:Z2,toString(){return Mt(this.toJSON())},toJSON(){return{_id:"MutableRef",current:Yt(this.current)}},[yt](){return this.toJSON()},pipe(){return Se(this,arguments)}},Mm=e=>{const t=Object.create(qY);return t.current=e,t},GY=N(3,(e,t,n)=>je(t,e.current)?(e.current=n,!0):!1),Nn=e=>e.current,jm=N(2,(e,t)=>(e.current=t,e)),x_="effect/FiberId",lu=Symbol.for(x_),ld="None",Gw="Runtime",Kw="Composite",KY=Xt(`${x_}-${ld}`);let WY=class{[lu]=lu;_tag=ld;id=-1;startTimeMillis=-1;[We](){return KY}[Je](t){return fT(t)&&t._tag===ld}toString(){return Mt(this.toJSON())}toJSON(){return{_id:"FiberId",_tag:this._tag}}[yt](){return this.toJSON()}};class n6{id;startTimeMillis;[lu]=lu;_tag=Gw;constructor(t,n){this.id=t,this.startTimeMillis=n}[We](){return qt(this,Xt(`${x_}-${this._tag}-${this.id}-${this.startTimeMillis}`))}[Je](t){return fT(t)&&t._tag===Gw&&this.id===t.id&&this.startTimeMillis===t.startTimeMillis}toString(){return Mt(this.toJSON())}toJSON(){return{_id:"FiberId",_tag:this._tag,id:this.id,startTimeMillis:this.startTimeMillis}}[yt](){return this.toJSON()}}let JY=class{left;right;[lu]=lu;_tag=Kw;constructor(t,n){this.left=t,this.right=n}_hash;[We](){return F(Xt(`${x_}-${this._tag}`),ut(Ce(this.left)),ut(Ce(this.right)),qt(this))}[Je](t){return fT(t)&&t._tag===Kw&&je(this.left,t.left)&&je(this.right,t.right)}toString(){return Mt(this.toJSON())}toJSON(){return{_id:"FiberId",_tag:this._tag,left:Yt(this.left),right:Yt(this.right)}}[yt](){return this.toJSON()}};const r6=new WY,fT=e=>Ne(e,lu),s6=N(2,(e,t)=>e._tag===ld?t:t._tag===ld?e:new JY(e,t)),YY=e=>F(e,Qh(r6,(t,n)=>s6(n)(t))),xb=e=>{switch(e._tag){case ld:return ou();case Gw:return aT(e.id);case Kw:return F(xb(e.left),Yh(xb(e.right)))}},eP=$e(Symbol.for("effect/Fiber/Id/_fiberCounter"),()=>Mm(0)),QY=(e,t)=>new n6(e,t),i6=e=>Array.from(xb(e)).map(n=>`#${n}`).join(","),XY=()=>{const e=Nn(eP);return F(eP,jm(e+1)),new n6(e,Date.now())},gs=r6,fh=s6,ZY=YY,a6=xb,eQ=QY,tQ=i6,o6=XY,T_=__,nQ=zJ,rQ=VJ,c6=HJ,u6=Wh,l6=$M,sQ=rT,iQ=JJ,aQ=jM,d6=k_,Xh=Symbol.for("effect/List"),Ww=e=>It(e),oQ=e=>aM(g_(e),Ww),cQ=oQ(je),uQ={[Xh]:Xh,_tag:"Cons",toString(){return Mt(this.toJSON())},toJSON(){return{_id:"List",_tag:"Cons",values:Ww(this).map(Yt)}},[yt](){return this.toJSON()},[Je](e){return h6(e)&&this._tag===e._tag&&cQ(this,e)},[We](){return qt(this,Om(Ww(this)))},[Symbol.iterator](){let e=!1,t=this;return{next(){if(e)return this.return();if(t._tag==="Nil")return e=!0,this.return();const n=t.head;return t=t.tail,{done:e,value:n}},return(n){return e||(e=!0),{done:!0,value:n}}}},pipe(){return Se(this,arguments)}},Tb=(e,t)=>{const n=Object.create(uQ);return n.head=e,n.tail=t,n},lQ=Xt("Nil"),dQ={[Xh]:Xh,_tag:"Nil",toString(){return Mt(this.toJSON())},toJSON(){return{_id:"List",_tag:"Nil"}},[yt](){return this.toJSON()},[We](){return lQ},[Je](e){return h6(e)&&this._tag===e._tag},[Symbol.iterator](){return{next(){return{done:!0,value:void 0}}}},pipe(){return Se(this,arguments)}},f6=Object.create(dQ),h6=e=>Ne(e,Xh),Da=e=>e._tag==="Nil",fQ=e=>e._tag==="Cons",hQ=()=>f6,du=(e,t)=>Tb(e,t),dd=hQ,hT=e=>Tb(e,f6),mQ=N(2,(e,t)=>gQ(t,e)),pQ=N(2,(e,t)=>du(t,e)),gQ=N(2,(e,t)=>{if(Da(e))return t;if(Da(t))return e;{const n=Tb(t.head,e);let r=n,s=t.tail;for(;!Da(s);){const i=Tb(s.head,e);r.tail=i,r=i,s=s.tail}return n}}),bQ=N(3,(e,t,n)=>{let r=t,s=e;for(;!Da(s);)r=n(r,s.head),s=s.tail;return r}),yQ=e=>{let t=dd(),n=e;for(;!Da(n);)t=pQ(t,n.head),n=n.tail;return t},mT=(function(){function e(t){t&&Object.assign(this,t)}return e.prototype=Mx,e})(),_Q=Symbol.for("effect/DifferContextPatch");function tP(e){return e}const Fm={...mT.prototype,[_Q]:{_Value:tP,_Patch:tP}},kQ=Object.assign(Object.create(Fm),{_tag:"Empty"}),EQ=Object.create(kQ),m6=()=>EQ,wQ=Object.assign(Object.create(Fm),{_tag:"AndThen"}),SQ=(e,t)=>{const n=Object.create(wQ);return n.first=e,n.second=t,n},vQ=Object.assign(Object.create(Fm),{_tag:"AddService"}),xQ=(e,t)=>{const n=Object.create(vQ);return n.key=e,n.service=t,n},TQ=Object.assign(Object.create(Fm),{_tag:"RemoveService"}),IQ=e=>{const t=Object.create(TQ);return t.key=e,t},AQ=Object.assign(Object.create(Fm),{_tag:"UpdateService"}),CQ=(e,t)=>{const n=Object.create(AQ);return n.key=e,n.update=t,n},PQ=(e,t)=>{const n=new Map(e.unsafeMap);let r=m6();for(const[s,i]of t.unsafeMap.entries())if(n.has(s)){const a=n.get(s);n.delete(s),je(a,i)||(r=E0(CQ(s,()=>i))(r))}else n.delete(s),r=E0(xQ(s,i))(r);for(const[s]of n.entries())r=E0(IQ(s))(r);return r},E0=N(2,(e,t)=>SQ(e,t)),NQ=N(2,(e,t)=>{if(e._tag==="Empty")return t;let n=!1,r=An(e);const s=new Map(t.unsafeMap);for(;Fa(r);){const a=zi(r),o=Ca(r);switch(a._tag){case"Empty":{r=o;break}case"AddService":{s.set(a.key,a.service),r=o;break}case"AndThen":{r=wr(wr(o,a.second),a.first);break}case"RemoveService":{s.delete(a.key),r=o;break}case"UpdateService":{s.set(a.key,a.update(s.get(a.key))),n=!0,r=o;break}}}if(!n)return Lo(s);const i=new Map;for(const[a]of t.unsafeMap)s.has(a)&&(i.set(a,s.get(a)),s.delete(a));for(const[a,o]of s)i.set(a,o);return Lo(i)}),RQ=Symbol.for("effect/DifferHashSetPatch");function $k(e){return e}const I_={...mT.prototype,[RQ]:{_Value:$k,_Key:$k,_Patch:$k}},OQ=Object.assign(Object.create(I_),{_tag:"Empty"}),LQ=Object.create(OQ),p6=()=>LQ,DQ=Object.assign(Object.create(I_),{_tag:"AndThen"}),$Q=(e,t)=>{const n=Object.create(DQ);return n.first=e,n.second=t,n},MQ=Object.assign(Object.create(I_),{_tag:"Add"}),jQ=e=>{const t=Object.create(MQ);return t.value=e,t},FQ=Object.assign(Object.create(I_),{_tag:"Remove"}),BQ=e=>{const t=Object.create(FQ);return t.value=e,t},zQ=(e,t)=>{const[n,r]=Qh([e,p6()],([s,i],a)=>UM(a)(s)?[VM(a)(s),i]:[s,Jw(jQ(a))(i)])(t);return Qh(r,(s,i)=>Jw(BQ(i))(s))(n)},Jw=N(2,(e,t)=>$Q(e,t)),UQ=N(2,(e,t)=>{if(e._tag==="Empty")return t;let n=t,r=An(e);for(;Fa(r);){const s=zi(r),i=Ca(r);switch(s._tag){case"Empty":{r=i;break}case"AndThen":{r=wr(s.first)(wr(s.second)(i));break}case"Add":{n=dh(s.value)(n),r=i;break}case"Remove":n=VM(s.value)(n),r=i}}return n}),VQ=Symbol.for("effect/DifferReadonlyArrayPatch");function nP(e){return e}const Bm={...mT.prototype,[VQ]:{_Value:nP,_Patch:nP}},HQ=Object.assign(Object.create(Bm),{_tag:"Empty"}),qQ=Object.create(HQ),g6=()=>qQ,GQ=Object.assign(Object.create(Bm),{_tag:"AndThen"}),KQ=(e,t)=>{const n=Object.create(GQ);return n.first=e,n.second=t,n},WQ=Object.assign(Object.create(Bm),{_tag:"Append"}),JQ=e=>{const t=Object.create(WQ);return t.values=e,t},YQ=Object.assign(Object.create(Bm),{_tag:"Slice"}),QQ=(e,t)=>{const n=Object.create(YQ);return n.from=e,n.until=t,n},XQ=Object.assign(Object.create(Bm),{_tag:"Update"}),ZQ=(e,t)=>{const n=Object.create(XQ);return n.index=e,n.patch=t,n},eX=e=>{let t=0,n=g6();for(;t<e.oldValue.length&&t<e.newValue.length;){const r=e.oldValue[t],s=e.newValue[t],i=e.differ.diff(r,s);je(i,e.differ.empty)||(n=w0(n,ZQ(t,i))),t=t+1}return t<e.oldValue.length&&(n=w0(n,QQ(0,t))),t<e.newValue.length&&(n=w0(n,JQ(lJ(t)(e.newValue)))),n},w0=N(2,(e,t)=>KQ(e,t)),tX=N(3,(e,t,n)=>{if(e._tag==="Empty")return t;let r=t.slice(),s=Qs(e);for(;$l(s);){const i=Dr(s),a=iu(s);switch(i._tag){case"Empty":{s=a;break}case"AndThen":{a.unshift(i.first,i.second),s=a;break}case"Append":{for(const o of i.values)r.push(o);s=a;break}case"Slice":{r=r.slice(i.from,i.until),s=a;break}case"Update":{r[i.index]=n.patch(i.patch,r[i.index]),s=a;break}}}return r}),nX=Symbol.for("effect/Differ"),rX={[nX]:{_P:ze,_V:ze},pipe(){return Se(this,arguments)}},Od=e=>{const t=Object.create(rX);return t.empty=e.empty,t.diff=e.diff,t.combine=e.combine,t.patch=e.patch,t},sX=()=>Od({empty:m6(),combine:(e,t)=>E0(t)(e),diff:(e,t)=>PQ(e,t),patch:(e,t)=>NQ(t)(e)}),iX=()=>Od({empty:p6(),combine:(e,t)=>Jw(t)(e),diff:(e,t)=>zQ(e,t),patch:(e,t)=>UQ(t)(e)}),aX=e=>Od({empty:g6(),combine:(t,n)=>w0(t,n),diff:(t,n)=>eX({oldValue:t,newValue:n,differ:e}),patch:(t,n)=>tX(t,n,e)}),b6=()=>oX((e,t)=>t),oX=e=>Od({empty:ze,combine:(t,n)=>t===ze?n:n===ze?t:r=>n(t(r)),diff:(t,n)=>je(t,n)?ze:a_(n),patch:(t,n)=>e(n,t(n))}),Zh=255,y6=8,Yw=e=>e&Zh,Qw=e=>e>>y6&Zh,zm=(e,t)=>(e&Zh)+((t&e&Zh)<<y6),cX=zm(0,0),uX=e=>zm(e,e),lX=e=>zm(e,0),dX=N(2,(e,t)=>zm(Yw(e)&~t,Qw(e))),fX=N(2,(e,t)=>e|t),hX=e=>~e>>>0&Zh,mX=0,Pu=1,pX=2,_6=4,Xw=16,k6=32,gX=e=>A_(e,k6),bX=N(2,(e,t)=>e&~t),yX=N(2,(e,t)=>e|t),co=e=>E6(e)&&!kX(e),E6=e=>A_(e,Pu),A_=N(2,(e,t)=>(e&t)!==0),w6=(...e)=>e.reduce((t,n)=>t|n,0),_X=w6(mX),rP=e=>A_(e,_6),kX=e=>A_(e,Xw),Eo=N(2,(e,t)=>zm(e^t,t)),jl=N(2,(e,t)=>e&(hX(Yw(t))|Qw(t))|Yw(t)&Qw(t)),sP=Od({empty:cX,diff:(e,t)=>Eo(e,t),combine:(e,t)=>fX(t)(e),patch:(e,t)=>jl(t,e)}),EX=uX,S6=lX,iP=dX,v6=(e,t)=>({_tag:"Par",left:e,right:t}),Bp=(e,t)=>({_tag:"Seq",left:e,right:t}),wX=e=>{let t=hT(e),n=dd();for(;;){const[r,s]=bQ(t,[x6(),dd()],([i,a],o)=>{const[c,u]=SX(o);return[AX(i,c),mQ(a,u)]});if(n=vX(n,r),Da(s))return yQ(n);t=s}throw new Error("BUG: BlockedRequests.flatten - please report an issue at https://github.com/Effect-TS/effect/issues")},SX=e=>{let t=e,n=x6(),r=dd(),s=dd();for(;;)switch(t._tag){case"Empty":{if(Da(r))return[n,s];t=r.head,r=r.tail;break}case"Par":{r=du(t.right,r),t=t.left;break}case"Seq":{const i=t.left,a=t.right;switch(i._tag){case"Empty":{t=a;break}case"Par":{const o=i.left,c=i.right;t=v6(Bp(o,a),Bp(c,a));break}case"Seq":{const o=i.left,c=i.right;t=Bp(o,Bp(c,a));break}case"Single":{t=i,s=du(a,s);break}}break}case"Single":{if(n=IX(n,t),Da(r))return[n,s];t=r.head,r=r.tail;break}}throw new Error("BUG: BlockedRequests.step - please report an issue at https://github.com/Effect-TS/effect/issues")},vX=(e,t)=>{if(Da(e))return hT(Mk(t));if(CX(t))return e;const n=DX(e.head),r=PX(t);return n.length===1&&r.length===1&&je(n[0],r[0])?du(LX(e.head,Mk(t)),e.tail):du(Mk(t),e)},xX=Symbol.for("effect/RequestBlock/RequestBlockParallel"),TX={_R:e=>e};class pT{map;[xX]=TX;constructor(t){this.map=t}}const x6=()=>new pT(T_()),IX=(e,t)=>new pT(sQ(e.map,t.dataSource,n=>MW(Jr(n,Fw(t.blockedRequest)),()=>An(t.blockedRequest)))),AX=(e,t)=>new pT(d6(e.map,t.map,(n,r,s)=>u6(n,s,hn(c6(n,s),{onNone:()=>r,onSome:i=>Sn(r,i)})))),CX=e=>rQ(e.map),PX=e=>Array.from(l6(e.map)),Mk=e=>OX(iQ(e.map,t=>An(t))),NX=Symbol.for("effect/RequestBlock/RequestBlockSequential"),RX={_R:e=>e};class T6{map;[NX]=RX;constructor(t){this.map=t}}const OX=e=>new T6(e),LX=(e,t)=>new T6(d6(t.map,e.map,(n,r,s)=>u6(n,s,hn(c6(n,s),{onNone:()=>dr(),onSome:i=>Sn(i,r)})))),DX=e=>Array.from(l6(e.map)),$X=e=>Array.from(e.map),Um="Pending",C_="Done",MX="effect/Deferred",jX=Symbol.for(MX),FX={_E:e=>e,_A:e=>e},BX=e=>({_tag:Um,joiners:e}),I6=e=>({_tag:C_,effect:e});class Vm{self;called=!1;constructor(t){this.self=t}next(t){return this.called?{value:t,done:!0}:(this.called=!0,{value:this.self,done:!1})}return(t){return{value:t,done:!0}}throw(t){throw t}[Symbol.iterator](){return new Vm(this.self)}}const A6=(e,t)=>{const n=new Cn("Blocked");return n.effect_instruction_i0=e,n.effect_instruction_i1=t,n},zX=e=>{const t=new Cn("RunBlocked");return t.effect_instruction_i0=e,t},fu=Symbol.for("effect/Effect");class UX{patch;op;_op=Dx;constructor(t,n){this.patch=t,this.op=n}}class Cn{_op;effect_instruction_i0=void 0;effect_instruction_i1=void 0;effect_instruction_i2=void 0;trace=void 0;[fu]=ed;constructor(t){this._op=t}[Je](t){return this===t}[We](){return qt(this,Nx(this))}pipe(){return Se(this,arguments)}toJSON(){return{_id:"Effect",_op:this._op,effect_instruction_i0:Yt(this.effect_instruction_i0),effect_instruction_i1:Yt(this.effect_instruction_i1),effect_instruction_i2:Yt(this.effect_instruction_i2)}}toString(){return Mt(this.toJSON())}[yt](){return this.toJSON()}[Symbol.iterator](){return new Vm(new Rm(this))}}class C6{_op;effect_instruction_i0=void 0;effect_instruction_i1=void 0;effect_instruction_i2=void 0;trace=void 0;[fu]=ed;constructor(t){this._op=t,this._tag=t}[Je](t){return F_(t)&&t._op==="Failure"&&je(this.effect_instruction_i0,t.effect_instruction_i0)}[We](){return F(Xt(this._tag),ut(Ce(this.effect_instruction_i0)),qt(this))}get cause(){return this.effect_instruction_i0}pipe(){return Se(this,arguments)}toJSON(){return{_id:"Exit",_tag:this._op,cause:this.cause.toJSON()}}toString(){return Mt(this.toJSON())}[yt](){return this.toJSON()}[Symbol.iterator](){return new Vm(new Rm(this))}}class P6{_op;effect_instruction_i0=void 0;effect_instruction_i1=void 0;effect_instruction_i2=void 0;trace=void 0;[fu]=ed;constructor(t){this._op=t,this._tag=t}[Je](t){return F_(t)&&t._op==="Success"&&je(this.effect_instruction_i0,t.effect_instruction_i0)}[We](){return F(Xt(this._tag),ut(Ce(this.effect_instruction_i0)),qt(this))}get value(){return this.effect_instruction_i0}pipe(){return Se(this,arguments)}toJSON(){return{_id:"Exit",_tag:this._op,value:Yt(this.value)}}toString(){return Mt(this.toJSON())}[yt](){return this.toJSON()}[Symbol.iterator](){return new Vm(new Rm(this))}}const Ua=e=>Ne(e,fu),Et=e=>{const t=new Cn(K$);return t.effect_instruction_i0=e,t},N6=N(3,(e,t,n)=>_i(r=>ue(e,s=>ue(wo(Ke(()=>r(t(s)))),i=>Ke(()=>n(s,i)).pipe(Us({onFailure:a=>{switch(i._tag){case Qn:return Mn(br(i.effect_instruction_i0,a));case Xn:return Mn(a)}},onSuccess:()=>i})))))),Mr=N(2,(e,t)=>ue(e,()=>_e(t))),Vs=e=>Mr(e,void 0),R6=function(){const e=new Cn(f_);switch(arguments.length){case 2:{e.effect_instruction_i0=arguments[0],e.commit=arguments[1];break}case 3:{e.effect_instruction_i0=arguments[0],e.effect_instruction_i1=arguments[1],e.commit=arguments[2];break}case 4:{e.effect_instruction_i0=arguments[0],e.effect_instruction_i1=arguments[1],e.effect_instruction_i2=arguments[2],e.commit=arguments[3];break}default:throw new Error(c_("you're not supposed to end up here"))}return e},Ib=(e,t=gs)=>{const n=new Cn(ch);let r;return n.effect_instruction_i0=s=>{r=e(s)},n.effect_instruction_i1=t,qm(n,s=>Ua(r)?r:Ot)},mo=(e,t=gs)=>Ke(()=>Ib(e,t)),yi=(e,t=gs)=>R6(e,function(){let n,r;function s(c){n?n(c):r===void 0&&(r=c)}const i=new Cn(ch);i.effect_instruction_i0=c=>{n=c,r&&c(r)},i.effect_instruction_i1=t;let a,o;return this.effect_instruction_i0.length!==1?(o=new AbortController,a=or(()=>this.effect_instruction_i0(s,o.signal))):a=or(()=>this.effect_instruction_i0(s)),a||o?qm(i,c=>(o&&o.abort(),a??Ot)):i}),O6=N(2,(e,t)=>{const n=new Cn(y0);return n.effect_instruction_i0=e,n.effect_instruction_i1=t,n}),em=N(2,(e,t)=>Ba(e,{onFailure:t,onSuccess:_e})),aP=Symbol.for("effect/OriginalAnnotation"),gT=(e,t)=>mt(t)?new Proxy(e,{has(n,r){return r===od||r===aP||r in n},get(n,r){return r===od?t.value:r===aP?e:n[r]}}):e,po=e=>_s(e)&&!(od in e)?Et(t=>Mn(Bs(gT(e,NT(t))))):Mn(Bs(e)),L6=e=>D6(()=>Bs(new EZ(e))),fd=e=>Ba(e,{onFailure:t=>_e(Be(t)),onSuccess:t=>_e(He(t))}),wo=e=>$6(e,{onFailure:Nt,onSuccess:Rt}),ln=e=>_s(e)&&!(od in e)?Et(t=>Mn(uu(gT(e,NT(t))))):Mn(uu(e)),P_=e=>ue(pe(e),ln),Mn=e=>{const t=new C6(Qn);return t.effect_instruction_i0=e,t},D6=e=>ue(pe(e),Mn),N_=Et(e=>_e(e.id())),Hm=e=>Et(t=>e(t.id())),ue=N(2,(e,t)=>{const n=new Cn(mb);return n.effect_instruction_i0=e,n.effect_instruction_i1=t,n}),VX=e=>{const t=new Cn("OnStep");return t.effect_instruction_i0=e,t},R_=e=>ue(e,ze),$6=N(2,(e,t)=>Us(e,{onFailure:n=>_e(t.onFailure(n)),onSuccess:n=>_e(t.onSuccess(n))})),Us=N(2,(e,t)=>{const n=new Cn(pb);return n.effect_instruction_i0=e,n.effect_instruction_i1=t.onFailure,n.effect_instruction_i2=t.onSuccess,n}),Ba=N(2,(e,t)=>Us(e,{onFailure:n=>{if(WM(n).length>0)return Mn(pY(n));const s=hY(n);return s.length>0?t.onFailure(Qx(s)):Mn(n)},onSuccess:t.onSuccess})),Pa=N(2,(e,t)=>Ke(()=>{const n=It(e),r=p_(n.length);let s=0;return Mr(kT({while:()=>s<n.length,body:()=>t(n[s],s),step:i=>{r[s++]=i}}),r)})),O_=N(2,(e,t)=>Ke(()=>{const n=It(e);let r=0;return kT({while:()=>r<n.length,body:()=>t(n[r],r),step:()=>{r++}})})),Ea=ue(N_,e=>M6(e)),M6=e=>Mn(ni(e)),bT=e=>{const t=new Cn(Td);return t.effect_instruction_i0=EX(Pu),t.effect_instruction_i1=()=>e,t},j6=N(2,(e,t)=>_i(n=>ue(wo(n(e)),r=>tj(t,r)))),Ze=N(2,(e,t)=>ue(e,n=>pe(()=>t(n)))),F6=N(2,(e,t)=>Ba(e,{onFailure:n=>P_(()=>t.onFailure(n)),onSuccess:n=>pe(()=>t.onSuccess(n))})),L_=N(2,(e,t)=>Us(e,{onFailure:n=>{const r=YM(n);switch(r._tag){case"Left":return P_(()=>t(r.left));case"Right":return Mn(r.right)}},onSuccess:_e})),hu=N(2,(e,t)=>_i(n=>Us(n(e),{onFailure:r=>{const s=Nt(r);return Us(t(s),{onFailure:i=>Nt(br(r,i)),onSuccess:()=>s})},onSuccess:r=>{const s=Rt(r);return sn(t(s),s)}}))),qm=N(2,(e,t)=>hu(e,B_({onFailure:n=>S_(n)?Vs(t(cT(n))):Ot,onSuccess:()=>Ot}))),HX=e=>qX(e,ze),qX=N(2,(e,t)=>Ba(e,{onFailure:n=>po(t(n)),onSuccess:_e})),GX=Et((e,t)=>_e(t.runtimeFlags)),_e=e=>{const t=new P6(Xn);return t.effect_instruction_i0=e,t},Ke=e=>{const t=new Cn(f_);return t.commit=e,t},pe=e=>{const t=new Cn(G$);return t.effect_instruction_i0=e,t},yT=N(e=>e.length===3||e.length===2&&!(_s(e[1])&&"onlyEffect"in e[1]),(e,t)=>ue(e,n=>{const r=typeof t=="function"?t(n):t;return Ua(r)?Mr(r,n):kK(r)?Ib(s=>{r.then(i=>s(_e(n)),i=>s(ln(new TT(i,"An unknown error occurred in Effect.tap"))))}):_e(n)})),KX=e=>Et(t=>{const n=t.getFiberRef(tS),r=F(n,Kt(()=>t.scope()));return e(Ld(tS,ye(r)))}),Gm=e=>{const t=new Cn(Td);return t.effect_instruction_i0=S6(Pu),t.effect_instruction_i1=()=>e,t},_i=e=>R6(e,function(){const t=new Cn(Td);return t.effect_instruction_i0=S6(Pu),t.effect_instruction_i1=n=>E6(n)?or(()=>this.effect_instruction_i0(bT)):or(()=>this.effect_instruction_i0(Gm)),t}),Ot=_e(void 0),B6=e=>{const t=new Cn(Td);return t.effect_instruction_i0=e,t.effect_instruction_i1=void 0,t},_T=N(2,(e,t)=>ue(t,n=>n?F(e,Ze(ye)):_e(fe()))),kT=e=>{const t=new Cn(gb);return t.effect_instruction_i0=e.while,t.effect_instruction_i1=e.body,t.effect_instruction_i2=e.step,t},Zw=e=>Ke(()=>{const t=new Cn(uh);return t.effect_instruction_i0=e(),t}),z6=function(){const e=arguments.length===1?arguments[0]:arguments[1].bind(arguments[0]);return Zw(()=>e(F))},U6=(e,...t)=>Object.defineProperty(t.length===0?function(...n){return Zw(()=>e.apply(this,n))}:function(...n){let r=Zw(()=>e.apply(this,n));for(const s of t)r=s(r,...n);return r},"length",{value:e.length,configurable:!0}),WX=N(2,(e,t)=>{const n=new Cn(Td);return n.effect_instruction_i0=t,n.effect_instruction_i1=()=>e,n}),ET=e=>{const t=new Cn(_0);return typeof e?.priority<"u"?fZ(t,e.priority):t},D_=N(2,(e,t)=>ue(e,n=>Ze(t,r=>[n,r]))),$_=N(2,(e,t)=>ue(e,n=>Mr(t,n))),sn=N(2,(e,t)=>ue(e,()=>t)),V6=N(3,(e,t,n)=>ue(e,r=>Ze(t,s=>n(r,s)))),JX=mo(()=>{const e=setInterval(()=>{},2147483647);return pe(()=>clearInterval(e))}),wT=e=>ue(N_,t=>F(e,tm(t))),tm=N(2,(e,t)=>ue(e.interruptAsFork(t),()=>e.await)),YX={_tag:"All",syslog:0,label:"ALL",ordinal:Number.MIN_SAFE_INTEGER,pipe(){return Se(this,arguments)}},QX={_tag:"Fatal",syslog:2,label:"FATAL",ordinal:5e4,pipe(){return Se(this,arguments)}},XX={_tag:"Error",syslog:3,label:"ERROR",ordinal:4e4,pipe(){return Se(this,arguments)}},H6={_tag:"Warning",syslog:4,label:"WARN",ordinal:3e4,pipe(){return Se(this,arguments)}},q6={_tag:"Info",syslog:6,label:"INFO",ordinal:2e4,pipe(){return Se(this,arguments)}},G6={_tag:"Debug",syslog:7,label:"DEBUG",ordinal:1e4,pipe(){return Se(this,arguments)}},ZX={_tag:"Trace",syslog:7,label:"TRACE",ordinal:0,pipe(){return Se(this,arguments)}},eZ={_tag:"None",syslog:7,label:"OFF",ordinal:Number.MAX_SAFE_INTEGER,pipe(){return Se(this,arguments)}},tZ="effect/FiberRef",nZ=Symbol.for(tZ),rZ={_A:e=>e},ST=e=>Et(t=>Rt(t.getFiberRef(e))),M_=N(2,(e,t)=>ue(ST(e),t)),oP=N(2,(e,t)=>sZ(e,()=>[void 0,t])),sZ=N(2,(e,t)=>Et(n=>{const[r,s]=t(n.getFiberRef(e));return n.setFiberRef(e,s),_e(r)})),Ld=N(3,(e,t,n)=>N6($_(ST(t),oP(t,n)),()=>e,r=>oP(t,r))),iZ=N(3,(e,t,n)=>M_(t,r=>Ld(e,t,n(r)))),Fn=(e,t)=>Dd(e,{differ:b6(),fork:t?.fork??ze,join:t?.join}),aZ=e=>{const t=iX();return Dd(e,{differ:t,fork:t.empty})},oZ=e=>{const t=aX(b6());return Dd(e,{differ:t,fork:t.empty})},K6=e=>{const t=sX();return Dd(e,{differ:t,fork:t.empty})},Dd=(e,t)=>({...$m,[nZ]:rZ,initial:e,commit(){return ST(this)},diff:(r,s)=>t.differ.diff(r,s),combine:(r,s)=>t.differ.combine(r,s),patch:r=>s=>t.differ.patch(r,s),fork:t.fork,join:t.join??((r,s)=>s)}),cZ=e=>Dd(e,{differ:sP,fork:sP.empty}),ta=$e(Symbol.for("effect/FiberRef/currentContext"),()=>K6(gi())),$d=$e(Symbol.for("effect/FiberRef/currentSchedulingPriority"),()=>Fn(0)),W6=$e(Symbol.for("effect/FiberRef/currentMaxOpsBeforeYield"),()=>Fn(2048)),uZ=$e(Symbol.for("effect/FiberRef/currentLogAnnotation"),()=>Fn(T_())),lZ=$e(Symbol.for("effect/FiberRef/currentLogLevel"),()=>Fn(q6)),dZ=$e(Symbol.for("effect/FiberRef/currentLogSpan"),()=>Fn(dd())),fZ=N(2,(e,t)=>Ld(e,$d,t)),hZ=$e(Symbol.for("effect/FiberRef/currentConcurrency"),()=>Fn("unbounded")),mZ=$e(Symbol.for("effect/FiberRef/currentRequestBatching"),()=>Fn(!0)),pZ=$e(Symbol.for("effect/FiberRef/currentUnhandledErrorLogLevel"),()=>Fn(ye(G6))),gZ=$e(Symbol.for("effect/FiberRef/versionMismatchErrorLogLevel"),()=>Fn(ye(H6))),eS=$e(Symbol.for("effect/FiberRef/currentMetricLabels"),()=>oZ(Do())),tS=$e(Symbol.for("effect/FiberRef/currentForkScopeOverride"),()=>Fn(fe(),{fork:()=>fe(),join:(e,t)=>e})),zp=$e(Symbol.for("effect/FiberRef/currentInterruptedCause"),()=>Fn(Mo,{fork:()=>Mo,join:(e,t)=>e})),J6=$e(Symbol.for("effect/FiberRef/currentTracerEnabled"),()=>Fn(!0)),Y6=$e(Symbol.for("effect/FiberRef/currentTracerTiming"),()=>Fn(!0)),bZ=$e(Symbol.for("effect/FiberRef/currentTracerSpanAnnotations"),()=>Fn(T_())),yZ=$e(Symbol.for("effect/FiberRef/currentTracerSpanLinks"),()=>Fn(dr())),cP=Symbol.for("effect/Scope"),uP=Symbol.for("effect/CloseableScope"),Q6=(e,t)=>e.addFinalizer(()=>Vs(t)),Ab=(e,t)=>e.addFinalizer(t),nS=(e,t)=>e.close(t),Ia=(e,t)=>e.fork(t),_Z=e=>kZ(ze)(e),kZ=N(2,(e,t)=>{const n=F(e,JM,Jr(t));switch(n._tag){case"None":return F(WM(e),Yx,hn({onNone:()=>{const r=It(cT(e)).flatMap(s=>It(a6(s)).map(i=>`#${i}`));return new wZ(r?`Interrupted by fibers: ${r.join(", ")}`:void 0)},onSome:ze}));case"Some":return n.value}}),vT=(function(){class e extends globalThis.Error{commit(){return ln(this)}toJSON(){const n={...this};return this.message&&(n.message=this.message),this.cause&&(n.cause=this.cause),n}[yt](){return this.toString!==globalThis.Error.prototype.toString?this.stack?`${this.toString()}
16
- ${this.stack.split(`
17
- `).slice(1).join(`
18
- `)}`:this.toString():"Bun"in globalThis?Rd(uu(this),{renderErrorCause:!0}):this}}return Object.assign(e.prototype,qK),e})(),xT=(e,t)=>{class n extends vT{_tag=t}return Object.assign(n.prototype,e),n.prototype.name=t,n},lP=Symbol.for("effect/Cause/errors/RuntimeException"),EZ=xT({[lP]:lP},"RuntimeException"),rS=Symbol.for("effect/Cause/errors/InterruptedException"),wZ=xT({[rS]:rS},"InterruptedException"),SZ=e=>Ne(e,rS),dP=Symbol.for("effect/Cause/errors/NoSuchElement"),j_=xT({[dP]:dP},"NoSuchElementException"),fP=Symbol.for("effect/Cause/errors/UnknownException"),TT=(function(){class e extends vT{_tag="UnknownException";error;constructor(n,r){super(r??"An unknown error occurred",{cause:n}),this.error=n}}return Object.assign(e.prototype,{[fP]:fP,name:"UnknownException"}),e})(),F_=e=>Ua(e)&&"_tag"in e&&(e._tag==="Success"||e._tag==="Failure"),X6=e=>e._tag==="Failure",vZ=e=>e._tag==="Success",S0=N(2,(e,t)=>{switch(e._tag){case Qn:return Nt(e.effect_instruction_i0);case Xn:return Rt(t)}}),jk=e=>S0(e,void 0),Fl=(e,t)=>CZ(e,t?.parallel?jo:br),Z6=e=>Nt(Bs(e)),nm=e=>Nt(uu(e)),Nt=e=>{const t=new C6(Qn);return t.effect_instruction_i0=e,t},xZ=N(2,(e,t)=>{switch(e._tag){case Qn:return Nt(e.effect_instruction_i0);case Xn:return t(e.effect_instruction_i0)}}),TZ=e=>F(e,xZ(ze)),IZ=e=>Nt(ni(e)),v0=N(2,(e,t)=>{switch(e._tag){case Qn:return Nt(e.effect_instruction_i0);case Xn:return Rt(t(e.effect_instruction_i0))}}),B_=N(2,(e,{onFailure:t,onSuccess:n})=>{switch(e._tag){case Qn:return t(e.effect_instruction_i0);case Xn:return n(e.effect_instruction_i0)}}),sS=N(2,(e,{onFailure:t,onSuccess:n})=>{switch(e._tag){case Qn:return t(e.effect_instruction_i0);case Xn:return n(e.effect_instruction_i0)}}),Rt=e=>{const t=new P6(Xn);return t.effect_instruction_i0=e,t},yr=Rt(void 0),AZ=N(2,(e,t)=>IT(e,t,{onSuccess:(n,r)=>[n,r],onFailure:br})),ej=N(2,(e,t)=>IT(e,t,{onSuccess:(n,r)=>r,onFailure:br})),IT=N(3,(e,t,{onFailure:n,onSuccess:r})=>{switch(e._tag){case Qn:switch(t._tag){case Xn:return Nt(e.effect_instruction_i0);case Qn:return Nt(n(e.effect_instruction_i0,t.effect_instruction_i0))}case Xn:switch(t._tag){case Xn:return Rt(r(e.effect_instruction_i0,t.effect_instruction_i0));case Qn:return Nt(t.effect_instruction_i0)}}}),CZ=(e,t)=>{const n=td(e);return Fa(n)?F(Ca(n),Gx(F(zi(n),v0(An)),(r,s)=>F(r,IT(s,{onSuccess:(i,a)=>F(i,wr(a)),onFailure:t}))),v0(ja),v0(r=>Fs(r)),ye):fe()},z_=e=>({...$m,[jX]:FX,state:Mm(BX([])),commit(){return Fo(this)},blockingOn:e}),U_=()=>ue(N_,e=>PZ(e)),PZ=e=>pe(()=>z_(e)),Fo=e=>mo(t=>{const n=Nn(e.state);switch(n._tag){case C_:return t(n.effect);case Um:return n.joiners.push(t),RZ(e,t)}},e.blockingOn),V_=N(2,(e,t)=>pe(()=>{const n=Nn(e.state);switch(n._tag){case C_:return!1;case Um:{jm(e.state,I6(t));for(let r=0,s=n.joiners.length;r<s;r++)n.joiners[r](t);return!0}}})),tj=N(2,(e,t)=>V_(e,t)),nj=N(2,(e,t)=>V_(e,Mn(t))),rj=N(2,(e,t)=>V_(e,M6(t))),NZ=e=>pe(()=>Nn(e.state)._tag===C_),AT=N(2,(e,t)=>V_(e,_e(t))),H_=(e,t)=>{const n=Nn(e.state);if(n._tag===Um){jm(e.state,I6(t));for(let r=0,s=n.joiners.length;r<s;r++)n.joiners[r](t)}},RZ=(e,t)=>pe(()=>{const n=Nn(e.state);if(n._tag===Um){const r=n.joiners.indexOf(t);r>=0&&n.joiners.splice(r,1)}}),OZ=Et(e=>Rt(e.currentContext)),CT=()=>OZ,Nu=e=>ue(CT(),e),q_=N(2,(e,t)=>Ld(ta,t)(e)),PT=N(2,(e,t)=>iZ(ta,n=>Zr(n,t))(e)),sj=N(2,(e,t)=>Nu(n=>q_(e,t(n)))),NT=e=>{const t=e.currentSpan;return t!==void 0&&t._tag==="Span"?ye(t):fe()},LZ={_tag:"Span",spanId:"noop",traceId:"noop",sampled:!1,status:{_tag:"Ended",startTime:BigInt(0),endTime:BigInt(0),exit:yr},attributes:new Map,links:[],kind:"internal",attribute(){},event(){},end(){},addLinks(){}},DZ=e=>Object.assign(Object.create(LZ),e),$Z="effect/Clock",hP=Symbol.for($Z),Md=Jo("effect/Clock"),MZ=2**31-1,mP={unsafeSchedule(e,t){const n=vb(t);if(n>MZ)return La;let r=!1;const s=setTimeout(()=>{r=!0,e()},n);return()=>(clearTimeout(s),!r)}},pP=(function(){const e=BigInt(1e6);if(typeof performance>"u"||typeof performance.now!="function")return()=>BigInt(Date.now())*e;let t;return()=>(t===void 0&&(t=BigInt(Date.now())*e-BigInt(Math.round(performance.now()*1e6))),t+BigInt(Math.round(performance.now()*1e6)))})(),jZ=(function(){const e=typeof process=="object"&&"hrtime"in process&&typeof process.hrtime.bigint=="function"?process.hrtime:void 0;if(!e)return pP;const t=pP()-e.bigint();return()=>t+e.bigint()})();class FZ{[hP]=hP;unsafeCurrentTimeMillis(){return Date.now()}unsafeCurrentTimeNanos(){return jZ()}currentTimeMillis=pe(()=>this.unsafeCurrentTimeMillis());currentTimeNanos=pe(()=>this.unsafeCurrentTimeNanos());scheduler(){return _e(mP)}sleep(t){return yi(n=>{const r=mP.unsafeSchedule(()=>n(Ot),t);return Vs(pe(r))})}}const BZ=()=>new FZ,hd=OW,Cb=e=>e.replace(/[/\\^$*+?.()|[\]{}]/g,"\\$&"),ij="And",aj="Or",oj="InvalidData",cj="MissingData",uj="SourceUnavailable",lj="Unsupported",zZ="effect/ConfigError",gP=Symbol.for(zZ),jd={_tag:"ConfigError",[gP]:gP},dj=(e,t)=>{const n=Object.create(jd);return n._op=ij,n.left=e,n.right=t,Object.defineProperty(n,"toString",{enumerable:!1,value(){return`${this.left} and ${this.right}`}}),Object.defineProperty(n,"message",{enumerable:!1,get(){return this.toString()}}),n},fj=(e,t)=>{const n=Object.create(jd);return n._op=aj,n.left=e,n.right=t,Object.defineProperty(n,"toString",{enumerable:!1,value(){return`${this.left} or ${this.right}`}}),Object.defineProperty(n,"message",{enumerable:!1,get(){return this.toString()}}),n},UZ=(e,t,n={pathDelim:"."})=>{const r=Object.create(jd);return r._op=oj,r.path=e,r.message=t,Object.defineProperty(r,"toString",{enumerable:!1,value(){return`(Invalid data at ${F(this.path,Ad(n.pathDelim))}: "${this.message}")`}}),r},mu=(e,t,n={pathDelim:"."})=>{const r=Object.create(jd);return r._op=cj,r.path=e,r.message=t,Object.defineProperty(r,"toString",{enumerable:!1,value(){return`(Missing data at ${F(this.path,Ad(n.pathDelim))}: "${this.message}")`}}),r},VZ=(e,t,n,r={pathDelim:"."})=>{const s=Object.create(jd);return s._op=uj,s.path=e,s.message=t,s.cause=n,Object.defineProperty(s,"toString",{enumerable:!1,value(){return`(Source unavailable at ${F(this.path,Ad(r.pathDelim))}: "${this.message}")`}}),s},HZ=(e,t,n={pathDelim:"."})=>{const r=Object.create(jd);return r._op=lj,r.path=e,r.message=t,Object.defineProperty(r,"toString",{enumerable:!1,value(){return`(Unsupported operation at ${F(this.path,Ad(n.pathDelim))}: "${this.message}")`}}),r},Lc=N(2,(e,t)=>{switch(e._op){case ij:return dj(Lc(e.left,t),Lc(e.right,t));case aj:return fj(Lc(e.left,t),Lc(e.right,t));case oj:return UZ([...t,...e.path],e.message);case cj:return mu([...t,...e.path],e.message);case uj:return VZ([...t,...e.path],e.message,e.cause);case lj:return HZ([...t,...e.path],e.message)}}),qZ={_tag:"Empty"},Fk=N(2,(e,t)=>{let n=hT(t),r=e;for(;fQ(n);){const s=n.head;switch(s._tag){case"Empty":{n=n.tail;break}case"AndThen":{n=du(s.first,du(s.second,n.tail));break}case"MapName":{r=Gc(r,s.f),n=n.tail;break}case"Nested":{r=yb(r,s.name),n=n.tail;break}case"Unnested":{if(F(lh(r),VW(s.name)))r=iu(r),n=n.tail;else return Be(mu(r,`Expected ${s.name} to be in path in ConfigProvider#unnested`));break}}}return He(r)}),GZ="Constant",KZ="Fail",WZ="Fallback",JZ="Described",YZ="Lazy",QZ="MapOrFail",XZ="Nested",ZZ="Primitive",eee="Sequence",tee="HashMap",nee="ZipWith";var bP={};const Pb=(e,t)=>[...e,...t],ree="effect/ConfigProvider",yP=Symbol.for(ree),see=Jo("effect/ConfigProvider"),iee="effect/ConfigProviderFlat",_P=Symbol.for(iee),aee=e=>({[yP]:yP,pipe(){return Se(this,arguments)},...e}),oee=e=>({[_P]:_P,patch:e.patch,load:(t,n,r=!0)=>e.load(t,n,r),enumerateChildren:e.enumerateChildren}),cee=e=>aee({load:t=>ue(Is(e,Do(),t,!1),n=>hn(lh(n),{onNone:()=>ln(mu(Do(),`Expected a single value having structure: ${t}`)),onSome:_e})),flattened:e}),uee=e=>{const{pathDelim:t,seqDelim:n}=Object.assign({},{pathDelim:"_",seqDelim:","},e),r=c=>F(c,Ad(t)),s=c=>c.split(t),i=()=>typeof process<"u"&&"env"in process&&typeof bP=="object"?bP:{};return cee(oee({load:(c,u,l=!0)=>{const d=r(c),f=i(),h=d in f?ye(f[d]):fe();return F(h,L_(()=>mu(c,`Expected ${d} to exist in the process context`)),ue(m=>mee(m,c,u,n,l)))},enumerateChildren:c=>pe(()=>{const u=i(),f=Object.keys(u).map(h=>s(h.toUpperCase())).filter(h=>{for(let m=0;m<c.length;m++){const y=F(c,EM(m)),g=h[m];if(g===void 0||y!==g)return!1}return!0}).flatMap(h=>h.slice(c.length,c.length+1));return oY(f)}),patch:qZ}))},lee=(e,t,n,r)=>{const s=V2(n.length,c=>c>=r.length?fe():ye([e(c),c+1])),i=V2(r.length,c=>c>=n.length?fe():ye([t(c),c+1])),a=Pb(n,s),o=Pb(r,i);return[a,o]},dee=(e,t)=>{let n=t;if(n._tag==="Nested"){const r=e.slice();for(;n._tag==="Nested";)r.push(n.name),n=n.config;return r}return e},Is=(e,t,n,r)=>{const s=n;switch(s._tag){case GZ:return _e(Qs(s.value));case JZ:return Ke(()=>Is(e,t,s.config,r));case KZ:return ln(mu(t,s.message));case WZ:return F(Ke(()=>Is(e,t,s.first,r)),em(i=>s.condition(i)?F(Is(e,t,s.second,r),em(a=>ln(fj(i,a)))):ln(i)));case YZ:return Ke(()=>Is(e,t,s.config(),r));case QZ:return Ke(()=>F(Is(e,t,s.original,r),ue(Pa(i=>F(s.mapOrFail(i),L_(Lc(dee(t,s.original))))))));case XZ:return Ke(()=>Is(e,Pb(t,Qs(s.name)),s.config,r));case ZZ:return F(Fk(t,e.patch),ue(i=>F(e.load(i,s,r),ue(a=>{if(a.length===0){const o=F(oJ(i),Kt(()=>"<n/a>"));return ln(mu([],`Expected ${s.description} with name ${o}`))}return _e(a)}))));case eee:return F(Fk(t,e.patch),ue(i=>F(e.enumerateChildren(i),ue(gee),ue(a=>a.length===0?Ke(()=>Ze(Is(e,t,s.config,!0),Qs)):F(Pa(a,o=>Is(e,tJ(t,`[${o}]`),s.config,!0)),Ze(o=>{const c=vM(o);return c.length===0?Qs(Do()):Qs(c)}))))));case tee:return Ke(()=>F(Fk(t,e.patch),ue(i=>F(e.enumerateChildren(i),ue(a=>F(a,Pa(o=>Is(e,Pb(i,Qs(o)),s.valueConfig,r)),Ze(o=>o.length===0?Qs(T_()):F(pee(o),Gc(c=>nQ(U2(It(a),c)))))))))));case nee:return Ke(()=>F(Is(e,t,s.left,r),fd,ue(i=>F(Is(e,t,s.right,r),fd,ue(a=>{if(ir(i)&&ir(a))return ln(dj(i.left,a.left));if(ir(i)&&Bi(a))return ln(i.left);if(Bi(i)&&ir(a))return ln(a.left);if(Bi(i)&&Bi(a)){const o=F(t,Ad(".")),c=fee(t,o),[u,l]=lee(c,c,F(i.right,Gc(He)),F(a.right,Gc(He)));return F(u,U2(l),Pa(([d,f])=>F(D_(d,f),Ze(([h,m])=>s.zip(h,m)))))}throw new Error("BUG: ConfigProvider.fromFlatLoop - please report an issue at https://github.com/Effect-TS/effect/issues")})))))}},fee=(e,t)=>n=>Be(mu(e,`The element at index ${n} in a sequence at path "${t}" was missing`)),hee=(e,t)=>e.split(new RegExp(`\\s*${Cb(t)}\\s*`)),mee=(e,t,n,r,s)=>s?F(hee(e,r),Pa(i=>n.parse(i.trim())),L_(Lc(t))):F(n.parse(e),F6({onFailure:Lc(t),onSuccess:Qs})),pee=e=>Object.keys(e[0]).map(t=>e.map(n=>n[t])),gee=e=>F(Pa(e,yee),F6({onFailure:()=>Do(),onSuccess:Kh(hd)}),fd,Ze(RW)),bee=/^(\[(\d+)\])$/,yee=e=>{const t=e.match(bee);if(t!==null){const n=t[2];return F(n!==void 0&&n.length>0?ye(n):fe(),Qo(_ee))}return fe()},_ee=e=>{const t=Number.parseInt(e);return Number.isNaN(t)?fe():ye(t)},kP=Symbol.for("effect/Console"),hj=Jo("effect/Console"),kee={[kP]:kP,assert(e,...t){return pe(()=>{console.assert(e,...t)})},clear:pe(()=>{console.clear()}),count(e){return pe(()=>{console.count(e)})},countReset(e){return pe(()=>{console.countReset(e)})},debug(...e){return pe(()=>{console.debug(...e)})},dir(e,t){return pe(()=>{console.dir(e,t)})},dirxml(...e){return pe(()=>{console.dirxml(...e)})},error(...e){return pe(()=>{console.error(...e)})},group(e){return e?.collapsed?pe(()=>console.groupCollapsed(e?.label)):pe(()=>console.group(e?.label))},groupEnd:pe(()=>{console.groupEnd()}),info(...e){return pe(()=>{console.info(...e)})},log(...e){return pe(()=>{console.log(...e)})},table(e,t){return pe(()=>{console.table(e,t)})},time(e){return pe(()=>console.time(e))},timeEnd(e){return pe(()=>console.timeEnd(e))},timeLog(e,...t){return pe(()=>{console.timeLog(e,...t)})},trace(...e){return pe(()=>{console.trace(...e)})},warn(...e){return pe(()=>{console.warn(...e)})},unsafe:console},Eee="effect/Random",EP=Symbol.for(Eee),wee=Jo("effect/Random");class See{seed;[EP]=EP;PRNG;constructor(t){this.seed=t,this.PRNG=new IK(t)}get next(){return pe(()=>this.PRNG.number())}get nextBoolean(){return Ze(this.next,t=>t>.5)}get nextInt(){return pe(()=>this.PRNG.integer(Number.MAX_SAFE_INTEGER))}nextRange(t,n){return Ze(this.next,r=>(n-t)*r+t)}nextIntBetween(t,n){return pe(()=>this.PRNG.integer(n-t)+t)}shuffle(t){return vee(t,n=>this.nextIntBetween(0,n))}}const vee=(e,t)=>Ke(()=>F(pe(()=>Array.from(e)),ue(n=>{const r=[];for(let s=n.length;s>=2;s=s-1)r.push(s);return F(r,O_(s=>F(t(s),Ze(i=>xee(n,s-1,i)))),Mr(td(n)))}))),xee=(e,t,n)=>{const r=e[t];return e[t]=e[n],e[n]=r,e},Tee=e=>new See(Ce(e)),wP=Symbol.for("effect/Tracer"),Iee=e=>({[wP]:wP,...e}),RT=Jo("effect/Tracer"),G_=Jo("effect/ParentSpan"),SP=(function(){const e="abcdef0123456789",t=e.length;return function(n){let r="";for(let s=0;s<n;s++)r+=e.charAt(Math.floor(Math.random()*t));return r}})();class Aee{name;parent;context;startTime;kind;_tag="Span";spanId;traceId="native";sampled=!0;status;attributes;events=[];links;constructor(t,n,r,s,i,a){this.name=t,this.parent=n,this.context=r,this.startTime=i,this.kind=a,this.status={_tag:"Started",startTime:i},this.attributes=new Map,this.traceId=n._tag==="Some"?n.value.traceId:SP(32),this.spanId=SP(16),this.links=Array.from(s)}end(t,n){this.status={_tag:"Ended",endTime:t,exit:n,startTime:this.status.startTime}}attribute(t,n){this.attributes.set(t,n)}event(t,n,r){this.events.push([t,n,r??{}])}addLinks(t){this.links.push(...t)}}const Cee=Iee({span:(e,t,n,r,s,i)=>new Aee(e,t,n,r,s,i),context:e=>e()}),Pee=e=>{if(e?.captureStackTrace===!1)return e;if(e?.captureStackTrace!==void 0&&typeof e.captureStackTrace!="boolean")return e;const t=Error.stackTraceLimit;Error.stackTraceLimit=3;const n=new Error;Error.stackTraceLimit=t;let r=!1;return{...e,captureStackTrace:()=>{if(r!==!1)return r;if(n.stack!==void 0){const s=n.stack.split(`
19
- `);if(s[3]!==void 0)return r=s[3].trim(),r}}}},iS=Au()("effect/Tracer/DisablePropagation",{defaultValue:La}),Nee=F(gi(),ds(Md,BZ()),ds(hj,kee),ds(wee,Tee(Math.random())),ds(see,uee()),ds(RT,Cee)),md=$e(Symbol.for("effect/DefaultServices/currentServices"),()=>K6(Nee)),Ree=e=>{const t=bi(e);return mj(n=>n.sleep(t))},Oee=e=>Et(t=>e(t.currentDefaultServices)),mj=e=>Oee(t=>e(t.unsafeMap.get(Md.key))),Lee=mj(e=>e.currentTimeMillis),Dee=Dm,$ee=GK;class Fd extends $ee{}const pj="Sequential",gj="Parallel",Mee="ParallelN",Wc={_tag:pj},aS={_tag:gj},jee=e=>({_tag:Mee,parallelism:e}),Fee=e=>e._tag===pj,Bee=e=>e._tag===gj,Nb=Wc,oS=aS,cS=jee;function zee(e){return new Bo(e)}function Uee(){return zee(new Map)}const vP=Symbol.for("effect/FiberRefs");class Bo{locals;[vP]=vP;constructor(t){this.locals=t}pipe(){return Se(this,arguments)}}const Vee=(e,t,n,r=!1)=>{const s=e;let i=t,a=n,o=r,c;for(;c===void 0;)if(Qt(i)&&Qt(a)){const u=Dr(i)[0],l=iu(i),d=Dr(a)[0],f=Dr(a)[1],h=iu(a);u.startTimeMillis<d.startTimeMillis?(a=h,o=!0):u.startTimeMillis>d.startTimeMillis?i=l:u.id<d.id?(a=h,o=!0):u.id>d.id?i=l:c=[f,o]}else c=[s.initial,!0];return c},Hee=N(3,(e,t,n)=>{const r=new Map(e.locals);return n.locals.forEach((s,i)=>{const a=s[0][1];if(!s[0][0][Je](t)){if(!r.has(i)){if(je(a,i.initial))return;r.set(i,[[t,i.join(i.initial,a)]]);return}const o=r.get(i),[c,u]=Vee(i,o,s);if(u){const l=i.diff(c,a),d=o[0][1],f=i.join(d,i.patch(l)(d));if(!je(d,f)){let h;const m=o[0][0];m[Je](t)?h=[[m,f],...o.slice(1)]:h=[[t,f],...o],r.set(i,h)}}}}),new Bo(r)}),qee=N(2,(e,t)=>{const n=new Map;return bj(e,n,t),new Bo(n)}),bj=(e,t,n)=>{e.locals.forEach((r,s)=>{const i=r[0][1],a=s.patch(s.fork)(i);je(i,a)?t.set(s,r):t.set(s,[[n,a],...r])})},yj=N(2,(e,t)=>{const n=new Map(e.locals);return n.delete(t),new Bo(n)}),_j=N(2,(e,t)=>e.locals.has(t)?ye(Dr(e.locals.get(t))[1]):fe()),rm=N(2,(e,t)=>F(_j(e,t),Kt(()=>t.initial))),uS=N(2,(e,{fiberId:t,fiberRef:n,value:r})=>{if(e.locals.size===0)return new Bo(new Map([[n,[[t,r]]]]));const s=new Map(e.locals);return lS(s,t,n,r),new Bo(s)}),lS=(e,t,n,r)=>{const s=e.get(n)??[];let i;if(Qt(s)){const[a,o]=Dr(s);if(a[Je](t)){if(je(o,r))return;i=[[t,r],...s.slice(1)]}else i=[[t,r],...s]}else i=[[t,r]];e.set(n,i)},Gee=N(2,(e,{entries:t,forkAs:n})=>{if(e.locals.size===0)return new Bo(new Map(t));const r=new Map(e.locals);return n!==void 0&&bj(e,r,n),t.forEach(([s,i])=>{i.length===1?lS(r,i[0][0],s,i[0][1]):i.forEach(([a,o])=>{lS(r,a,s,o)})}),new Bo(r)}),xP=_j,kj=rm,Kee=Gee,Wee=Uee,Ej="Empty",wj="Add",Sj="Remove",vj="Update",xj="AndThen",Jee={_tag:Ej},OT=(e,t)=>{const n=new Map(e.locals);let r=Jee;for(const[s,i]of t.locals.entries()){const a=Dr(i)[1],o=n.get(s);if(o!==void 0){const c=Dr(o)[1];je(c,a)||(r=Bk({_tag:vj,fiberRef:s,patch:s.diff(c,a)})(r))}else r=Bk({_tag:wj,fiberRef:s,value:a})(r);n.delete(s)}for(const[s]of n.entries())r=Bk({_tag:Sj,fiberRef:s})(r);return r},Bk=N(2,(e,t)=>({_tag:xj,first:e,second:t})),Tj=N(3,(e,t,n)=>{let r=n,s=Qs(e);for(;Qt(s);){const i=Dr(s),a=iu(s);switch(i._tag){case Ej:{s=a;break}case wj:{r=uS(r,{fiberId:t,fiberRef:i.fiberRef,value:i.value}),s=a;break}case Sj:{r=yj(r,i.fiberRef),s=a;break}case vj:{const o=rm(r,i.fiberRef);r=uS(r,{fiberId:t,fiberRef:i.fiberRef,value:i.fiberRef.patch(i.patch)(o)}),s=a;break}case xj:{s=yb(i.first)(yb(i.second)(a));break}}}return r}),sm=OT,im=Tj,K_="effect/FiberStatus",pu=Symbol.for(K_),Rb="Done",TP="Running",IP="Suspended",Yee=Xt(`${K_}-${Rb}`);let Qee=class{[pu]=pu;_tag=Rb;[We](){return Yee}[Je](t){return LT(t)&&t._tag===Rb}};class Xee{runtimeFlags;[pu]=pu;_tag=TP;constructor(t){this.runtimeFlags=t}[We](){return F(Ce(K_),ut(Ce(this._tag)),ut(Ce(this.runtimeFlags)),qt(this))}[Je](t){return LT(t)&&t._tag===TP&&this.runtimeFlags===t.runtimeFlags}}class Zee{runtimeFlags;blockingOn;[pu]=pu;_tag=IP;constructor(t,n){this.runtimeFlags=t,this.blockingOn=n}[We](){return F(Ce(K_),ut(Ce(this._tag)),ut(Ce(this.runtimeFlags)),ut(Ce(this.blockingOn)),qt(this))}[Je](t){return LT(t)&&t._tag===IP&&this.runtimeFlags===t.runtimeFlags&&je(this.blockingOn,t.blockingOn)}}const ete=new Qee,tte=e=>new Xee(e),nte=(e,t)=>new Zee(e,t),LT=e=>Ne(e,pu),rte=e=>e._tag===Rb,ste=ete,Ij=tte,ite=nte,ate=rte,ote=YX,cte=QX,ute=XX,lte=H6,dte=q6,fte=G6,hte=ZX,mte=eZ,pte=F(hd,pM(e=>e.ordinal)),gte=LW(pte),bte=e=>{switch(e){case"All":return ote;case"Debug":return fte;case"Error":return ute;case"Fatal":return cte;case"Info":return dte;case"Trace":return hte;case"None":return mte;case"Warning":return lte}},yte=Symbol.for("effect/Micro"),Ob=Symbol.for("effect/Micro/MicroExit"),AP=Symbol.for("effect/Micro/MicroCause"),_te={_E:ze};class Aj extends globalThis.Error{_tag;traces;[AP];constructor(t,n,r){const s=`MicroCause.${t}`;let i,a,o;if(n instanceof globalThis.Error){i=`(${s}) ${n.name}`,a=n.message;const c=a.split(`
20
- `).length;o=n.stack?`(${s}) ${n.stack.split(`
21
- `).slice(0,c+3).join(`
22
- `)}`:`${i}: ${a}`}else i=s,a=Zl(n,0),o=`${i}: ${a}`;r.length>0&&(o+=`
23
- ${r.join(`
24
- `)}`),super(a),this._tag=t,this.traces=r,this[AP]=_te,this.name=i,this.stack=o}pipe(){return Se(this,arguments)}toString(){return this.stack}[yt](){return this.stack}}class kte extends Aj{defect;constructor(t,n=[]){super("Die",t,n),this.defect=t}}const Ete=(e,t=[])=>new kte(e,t);let wte=class extends Aj{constructor(t=[]){super("Interrupt","interrupted",t)}};const Ste=(e=[])=>new wte(e),vte=e=>e._tag==="Interrupt",CP=Symbol.for("effect/Micro/MicroFiber"),xte={_A:ze,_E:ze};class Tte{context;interruptible;[CP];_stack=[];_observers=[];_exit;_children;currentOpCount=0;constructor(t,n=!0){this.context=t,this.interruptible=n,this[CP]=xte}getRef(t){return cW(this.context,t)}addObserver(t){return this._exit?(t(this._exit),Xl):(this._observers.push(t),()=>{const n=this._observers.indexOf(t);n>=0&&this._observers.splice(n,1)})}_interrupted=!1;unsafeInterrupt(){this._exit||(this._interrupted=!0,this.interruptible&&this.evaluate(FT))}unsafePoll(){return this._exit}evaluate(t){if(this._exit)return;if(this._yielded!==void 0){const s=this._yielded;this._yielded=void 0,s()}const n=this.runLoop(t);if(n===Up)return;const r=PP.interruptChildren&&PP.interruptChildren(this);if(r!==void 0)return this.evaluate(Db(r,()=>n));this._exit=n;for(let s=0;s<this._observers.length;s++)this._observers[s](n);this._observers.length=0}runLoop(t){let n=!1,r=t;this.currentOpCount=0;try{for(;;){if(this.currentOpCount++,!n&&this.getRef(BT).shouldYield(this)){n=!0;const s=r;r=Db(Nte,()=>s)}if(r=r[dS](this),r===Up){const s=this._yielded;return Ob in s?(this._yielded=void 0,s):Up}}}catch(s){return Ne(r,dS)?fS(s):fS(`MicroFiber.runLoop: Not a valid effect: ${String(r)}`)}}getCont(t){for(;;){const n=this._stack.pop();if(!n)return;const r=n[Lb]&&n[Lb](this);if(r)return{[t]:r};if(n[t])return n}}_yielded=void 0;yieldWith(t){return this._yielded=t,Up}children(){return this._children??=new Set}}const PP=$e("effect/Micro/fiberMiddleware",()=>({interruptChildren:void 0})),Cj=Symbol.for("effect/Micro/identifier"),Dn=Symbol.for("effect/Micro/args"),dS=Symbol.for("effect/Micro/evaluate"),pd=Symbol.for("effect/Micro/successCont"),Bl=Symbol.for("effect/Micro/failureCont"),Lb=Symbol.for("effect/Micro/ensureCont"),Up=Symbol.for("effect/Micro/Yield"),Ite={_A:ze,_E:ze,_R:ze},Ate={...Dee,_op:"Micro",[yte]:Ite,pipe(){return Se(this,arguments)},[Symbol.iterator](){return new F$(new Rm(this))},toJSON(){return{_id:"Micro",op:this[Cj],...Dn in this?{args:this[Dn]}:void 0}},toString(){return Mt(this)},[yt](){return Mt(this)}};function Cte(e){return fS("Micro.evaluate: Not implemented")}const W_=e=>({...Ate,[Cj]:e.op,[dS]:e.eval??Cte,[pd]:e.contA,[Bl]:e.contE,[Lb]:e.ensure}),DT=e=>{const t=W_(e);return function(){const n=Object.create(t);return n[Dn]=e.single===!1?arguments:arguments[0],n}},Pj=e=>{const t={...W_(e),[Ob]:Ob,_tag:e.op,get[e.prop](){return this[Dn]},toJSON(){return{_id:"MicroExit",_tag:e.op,[e.prop]:this[Dn]}},[Je](n){return Lte(n)&&n._tag===e.op&&je(this[Dn],n[Dn])},[We](){return qt(this,ut(Xt(e.op))(Ce(this[Dn])))}};return function(n){const r=Object.create(t);return r[Dn]=n,r[pd]=void 0,r[Bl]=void 0,r[Lb]=void 0,r}},$T=Pj({op:"Success",prop:"value",eval(e){const t=e.getCont(pd);return t?t[pd](this[Dn],e):e.yieldWith(this)}}),Nj=Pj({op:"Failure",prop:"cause",eval(e){let t=e.getCont(Bl);for(;vte(this[Dn])&&t&&e.interruptible;)t=e.getCont(Bl);return t?t[Bl](this[Dn],e):e.yieldWith(this)}}),Pte=DT({op:"Yield",eval(e){let t=!1;return e.getRef(BT).scheduleTask(()=>{t||e.evaluate(Dte)},this[Dn]??0),e.yieldWith(()=>{t=!0})}}),Nte=Pte(0),Rte=$T(void 0),MT=DT({op:"WithMicroFiber",eval(e){return this[Dn](e)}}),Db=N(2,(e,t)=>{const n=Object.create(Ote);return n[Dn]=e,n[pd]=t,n}),Ote=W_({op:"OnSuccess",eval(e){return e._stack.push(this),this[Dn]}}),Lte=e=>Ne(e,Ob),Rj=$T,jT=Nj,FT=jT(Ste()),fS=e=>jT(Ete(e)),Dte=Rj(void 0),$te="setImmediate"in globalThis?globalThis.setImmediate:e=>setTimeout(e,0);class Oj{tasks=[];running=!1;scheduleTask(t,n){this.tasks.push(t),this.running||(this.running=!0,$te(this.afterScheduled))}afterScheduled=()=>{this.running=!1,this.runTasks()};runTasks(){const t=this.tasks;this.tasks=[];for(let n=0,r=t.length;n<r;n++)t[n]()}shouldYield(t){return t.currentOpCount>=t.getRef(Fte)}flush(){for(;this.tasks.length>0;)this.runTasks()}}const Mte=N(2,(e,t)=>MT(n=>{const r=n.context;return n.context=t(r),Ute(e,()=>(n.context=r,Rte))})),jte=N(2,(e,t)=>Mte(e,Zr(t)));class Fte extends Au()("effect/Micro/currentMaxOpsBeforeYield",{defaultValue:()=>2048}){}class BT extends Au()("effect/Micro/currentScheduler",{defaultValue:()=>new Oj}){}const Bte=N(2,(e,t)=>{const n=Object.create(zte);return n[Dn]=e,n[pd]=t.onSuccess,n[Bl]=t.onFailure,n}),zte=W_({op:"OnSuccessAndFailure",eval(e){return e._stack.push(this),this[Dn]}}),Ute=N(2,(e,t)=>Hte(n=>Bte(n(e),{onFailure:r=>Db(t(jT(r)),()=>Nj(r)),onSuccess:r=>Db(t(Rj(r)),()=>$T(r))}))),Lj=DT({op:"SetInterruptible",ensure(e){if(e.interruptible=this[Dn],e._interrupted&&e.interruptible)return()=>FT}}),Vte=e=>MT(t=>t.interruptible?e:(t.interruptible=!0,t._stack.push(Lj(!1)),t._interrupted?FT:e)),Hte=e=>MT(t=>t.interruptible?(t.interruptible=!1,t._stack.push(Lj(!0)),e(Vte)):e(ze)),qte=(e,t)=>{const n=new Tte(BT.context(new Oj));return n.evaluate(e),n},$b=Symbol.for("effect/Readable"),Dj=Symbol.for("effect/Ref"),$j={_A:e=>e};class Gte extends Fd{ref;commit(){return this.get}[Dj]=$j;[$b]=$b;constructor(t){super(),this.ref=t,this.get=pe(()=>Nn(this.ref))}get;modify(t){return pe(()=>{const n=Nn(this.ref),[r,s]=t(n);return n!==s&&jm(s)(this.ref),r})}}const zT=e=>new Gte(Mm(e)),Mb=e=>pe(()=>zT(e)),Ki=e=>e.get,zl=N(2,(e,t)=>e.modify(()=>[void 0,t])),Kte=N(2,(e,t)=>e.modify(n=>[n,t])),Mj=N(2,(e,t)=>e.modify(t)),jb=N(2,(e,t)=>e.modify(n=>[void 0,t(n)])),UT=Mb,Wte=Ki,Jte=Kte,mf=Mj,Yte=zl,Qte=jb;class jj{buckets=[];scheduleTask(t,n){const r=this.buckets.length;let s,i=0;for(;i<r&&this.buckets[i][0]<=n;i++)s=this.buckets[i];s&&s[0]===n?s[1].push(t):i===r?this.buckets.push([n,[t]]):this.buckets.splice(i,0,[n,[t]])}}class Xte{maxNextTickBeforeTimer;running=!1;tasks=new jj;constructor(t){this.maxNextTickBeforeTimer=t}starveInternal(t){const n=this.tasks.buckets;this.tasks.buckets=[];for(const[r,s]of n)for(let i=0;i<s.length;i++)s[i]();this.tasks.buckets.length===0?this.running=!1:this.starve(t)}starve(t=0){t>=this.maxNextTickBeforeTimer?setTimeout(()=>this.starveInternal(0),0):Promise.resolve(void 0).then(()=>this.starveInternal(t+1))}shouldYield(t){return t.currentOpCount>t.getFiberRef(W6)?t.getFiberRef($d):!1}scheduleTask(t,n){this.tasks.scheduleTask(t,n),this.running||(this.running=!0,this.starve())}}const Fj=$e(Symbol.for("effect/Scheduler/defaultScheduler"),()=>new Xte(2048));class J_{tasks=new jj;deferred=!1;scheduleTask(t,n){this.deferred?Fj.scheduleTask(t,n):this.tasks.scheduleTask(t,n)}shouldYield(t){return t.currentOpCount>t.getFiberRef(W6)?t.getFiberRef($d):!1}flush(){for(;this.tasks.buckets.length>0;){const t=this.tasks.buckets;this.tasks.buckets=[];for(const[n,r]of t)for(let s=0;s<r.length;s++)r[s]()}this.deferred=!0}}const VT=$e(Symbol.for("effect/FiberRef/currentScheduler"),()=>Fn(Fj)),Bj=$e(Symbol.for("effect/FiberRef/currentRequestMap"),()=>Fn(new Map)),NP=(e,t,n,r)=>{switch(e){case void 0:return t();case"unbounded":return n();case"inherit":return M_(hZ,s=>s==="unbounded"?n():s>1?r(s):t());default:return e>1?r(e):t()}},Zte=Ree,ene=Lee,tne=Md,zj=e=>e.replace(/[\s="]/g,"_"),nne=e=>t=>`${zj(t.label)}=${e-t.startTime}ms`,Uj="effect/MetricLabel",hS=Symbol.for(Uj);class rne{key;value;[hS]=hS;_hash;constructor(t,n){this.key=t,this.value=n,this._hash=Xt(Uj+this.key+this.value)}[We](){return this._hash}[Je](t){return ine(t)&&this.key===t.key&&this.value===t.value}pipe(){return Se(this,arguments)}}const sne=(e,t)=>new rne(e,t),ine=e=>Ne(e,hS),ane=e=>Ze(e,ye),Vj=e=>{let t,n;return typeof e=="function"?t=e:(t=e.try,n=e.catch),Ke(()=>{try{return _e(or(t))}catch(r){return ln(n?or(()=>n(r)):new TT(r,"An unknown error occurred in Effect.try"))}})},one=e=>Wj(e,qj,OT),cne=e=>Wj(e,D_(qj,GX),([t,n],[r,s])=>[OT(t,r),Eo(n,s)]),Hj=N(2,(e,t)=>Ba(e,{onFailure:n=>_e(t.onFailure(n)),onSuccess:n=>_e(t.onSuccess(n))})),qj=Et(e=>_e(e.getFiberRefs())),une=e=>Hj(e,{onFailure:Xl,onSuccess:Xl}),RP=N(2,(e,t)=>Us(e,{onFailure:n=>D6(()=>t(n)),onSuccess:_e})),lne=e=>F(U_(),ue(t=>F(cne(e),j6(t),fne,Ze(n=>sn(n,F(Fo(t),ue(([r,s])=>Mr(D_(Gj(r[0]),B6(r[1])),s)))))))),dne=e=>Ze(e,t=>!t),fne=e=>Ze(UT(!0),t=>Vs(_T(e,Jte(t,!1)))),Gj=e=>_ne((t,n)=>F(e,Tj(t,n))),hne=e=>e.length>=1?yi((t,n)=>{try{e(n).then(r=>t(_e(r)),r=>t(po(r)))}catch(r){t(po(r))}}):yi(t=>{try{e().then(n=>t(_e(n)),n=>t(po(n)))}catch(n){t(po(n))}}),Kj=N(3,(e,t,n)=>Nu(r=>q_(e,ds(r,t,n)))),OP=N(3,(e,t,n)=>Nu(r=>ue(n,s=>q_(e,F(r,ds(t,s)))))),mne=Zte,pne=_e(fe()),Wj=N(3,(e,t,n)=>ue(t,r=>ue(e,s=>Ze(t,i=>[n(r,i),s])))),gne=N(2,(e,t)=>Us(e,{onFailure:n=>sn(t(n),Mn(n)),onSuccess:_e})),bne=e=>{let t,n;typeof e=="function"?t=e:(t=e.try,n=e.catch);const r=s=>n?P_(()=>n(s)):ln(new TT(s,"An unknown error occurred in Effect.tryPromise"));return t.length>=1?yi((s,i)=>{try{t(i).then(a=>s(_e(a)),a=>s(r(a)))}catch(a){s(r(a))}}):yi(s=>{try{t().then(i=>s(_e(i)),i=>s(r(i)))}catch(i){s(r(i))}})},yne=N(2,(e,t)=>ue(e,n=>Vj({try:()=>t.try(n),catch:t.catch}))),_ne=e=>Et(t=>(t.setFiberRefs(e(t.id(),t.getFiberRefs())),Ot)),kne=N(2,(e,t)=>Ke(()=>t()?Ze(e,ye):_e(fe()))),Ene=e=>new Proxy({},{get(t,n,r){return(...s)=>ue(e,i=>i[n](...s))}}),Jj=BigInt(0),Yj=Qo(e=>ci(e.context,iS)?e._tag==="Span"?Yj(e.parent):fe():ye(e)),wne=(e,t,n)=>{const r=!e.getFiberRef(J6)||n.context&&ci(n.context,iS),s=e.getFiberRef(ta),i=n.parent?ye(n.parent):n.root?fe():Yj(Yo(s,G_));let a;if(r)a=DZ({name:t,parent:i,context:ds(n.context??gi(),iS,!0)});else{const o=e.getFiberRef(md),c=ci(o,RT),u=ci(o,tne),l=e.getFiberRef(Y6),d=e.getFiberRefs(),f=xP(d,bZ),h=xP(d,yZ),m=h._tag==="Some"?n.links!==void 0?[...Fs(h.value),...n.links??[]]:Fs(h.value):n.links??Do();a=c.span(t,i,n.context??gi(),m,l?u.unsafeCurrentTimeNanos():Jj,n.kind??"internal",n),f._tag==="Some"&&aQ(f.value,(y,g)=>a.attribute(g,y)),n.attributes!==void 0&&Object.entries(n.attributes).forEach(([y,g])=>a.attribute(y,g))}return typeof n.captureStackTrace=="function"&&Sb.set(a,n.captureStackTrace),a},Sne=(e,t,n,r)=>pe(()=>{e.status._tag!=="Ended"&&(X6(t)&&Sb.has(e)&&e.attribute("code.stacktrace",Sb.get(e)()),e.end(r?n.unsafeCurrentTimeNanos():Jj,t))}),vne=(e,...t)=>{const n=Pee(t.length===1?void 0:t[0]),r=t[t.length-1];return Et(s=>{const i=wne(s,e,n),a=s.getFiberRef(Y6),o=ci(s.getFiberRef(md),Md);return hu(r(i),c=>Sne(i,c,o,a))})},xne=N(2,(e,t)=>Kj(e,G_,t)),HT=X6,qT=vZ,Tne=Fl,Ine=Z6,Fb=nm,_r=Nt,Ane=TZ,Cne=v0,Na=B_,fs=Rt,GT=yr,LP=AZ,am=ej,KT="InterruptSignal",WT="Stateful",JT="Resume",YT="YieldNow",zk=e=>({_tag:KT,cause:e}),x0=e=>({_tag:WT,onFiber:e}),Ju=e=>({_tag:JT,effect:e}),Pne=()=>({_tag:YT}),Nne="effect/FiberScope",Bb=Symbol.for(Nne);class Rne{[Bb]=Bb;fiberId=gs;roots=new Set;add(t,n){this.roots.add(n),n.addObserver(()=>{this.roots.delete(n)})}}class One{fiberId;parent;[Bb]=Bb;constructor(t,n){this.fiberId=t,this.parent=n}add(t,n){this.parent.tell(x0(r=>{r.addChild(n),n.addObserver(()=>{r.removeChild(n)})}))}}const Lne=e=>new One(e.id(),e),Y_=$e(Symbol.for("effect/FiberScope/Global"),()=>new Rne),Dne="effect/Fiber",$ne=Symbol.for(Dne),Mne={_E:e=>e,_A:e=>e},jne="effect/Fiber",Fne=Symbol.for(jne),Bne=e=>e.await,zne=e=>e.inheritAll,om=e=>$_(R_(e.await),e.inheritAll);({...$m});const to="effect/FiberCurrent",Une=()=>Id(globalThis[to]),Vne="effect/Logger",Hne=Symbol.for(Vne),qne={_Message:e=>e,_Output:e=>e},QT=e=>({[Hne]:qne,log:e,pipe(){return Se(this,arguments)}}),Gne=/^[^\s"=]*$/,Kne=(e,t)=>({annotations:n,cause:r,date:s,fiberId:i,logLevel:a,message:o,spans:c})=>{const u=m=>m.match(Gne)?m:e(m),l=(m,y)=>`${zj(m)}=${u(y)}`,d=(m,y)=>" "+l(m,y);let f=l("timestamp",s.toISOString());f+=d("level",a.label),f+=d("fiber",i6(i));const h=XW(o);for(let m=0;m<h.length;m++)f+=d("message",Zl(h[m],t));lY(r)||(f+=d("cause",Rd(r,{renderErrorCause:!0})));for(const m of c)f+=" "+nne(s.getTime())(m);for(const[m,y]of n)f+=d(m,Zl(y,t));return f},Wne=e=>`"${e.replace(/\\([\s\S])|(")/g,"\\$1$2")}"`,Jne=QT(Kne(Wne)),Yne=typeof process=="object"&&process!==null&&typeof process.stdout=="object"&&process.stdout!==null;Yne&&process.stdout.isTTY;const Qj="effect/MetricBoundaries",mS=Symbol.for(Qj);class Qne{values;[mS]=mS;constructor(t){this.values=t,this._hash=F(Xt(Qj),ut(Om(this.values)))}_hash;[We](){return this._hash}[Je](t){return Xne(t)&&je(this.values,t.values)}pipe(){return Se(this,arguments)}}const Xne=e=>Ne(e,mS),Zne=e=>{const t=F(e,qx(An(Number.POSITIVE_INFINITY)),bJ);return new Qne(t)},ere=e=>F(QW(e.count-1,t=>e.start*Math.pow(e.factor,t)),Ar,Zne),tre="effect/MetricKeyType",Xj=Symbol.for(tre),Zj="effect/MetricKeyType/Counter",pS=Symbol.for(Zj),nre="effect/MetricKeyType/Frequency",rre=Symbol.for(nre),sre="effect/MetricKeyType/Gauge",ire=Symbol.for(sre),e4="effect/MetricKeyType/Histogram",gS=Symbol.for(e4),are="effect/MetricKeyType/Summary",ore=Symbol.for(are),t4={_In:e=>e,_Out:e=>e};class cre{incremental;bigint;[Xj]=t4;[pS]=pS;constructor(t,n){this.incremental=t,this.bigint=n,this._hash=Xt(Zj)}_hash;[We](){return this._hash}[Je](t){return n4(t)}pipe(){return Se(this,arguments)}}class ure{boundaries;[Xj]=t4;[gS]=gS;constructor(t){this.boundaries=t,this._hash=F(Xt(e4),ut(Ce(this.boundaries)))}_hash;[We](){return this._hash}[Je](t){return r4(t)&&je(this.boundaries,t.boundaries)}pipe(){return Se(this,arguments)}}const lre=e=>new cre(e?.incremental??!1,e?.bigint??!1),dre=e=>new ure(e),n4=e=>Ne(e,pS),fre=e=>Ne(e,rre),hre=e=>Ne(e,ire),r4=e=>Ne(e,gS),mre=e=>Ne(e,ore),pre="effect/MetricKey",s4=Symbol.for(pre),gre={_Type:e=>e},bre=g_(je);class XT{name;keyType;description;tags;[s4]=gre;constructor(t,n,r,s=[]){this.name=t,this.keyType=n,this.description=r,this.tags=s,this._hash=F(Xt(this.name+this.description),ut(Ce(this.keyType)),ut(Om(this.tags)))}_hash;[We](){return this._hash}[Je](t){return yre(t)&&this.name===t.name&&je(this.keyType,t.keyType)&&je(this.description,t.description)&&bre(this.tags,t.tags)}pipe(){return Se(this,arguments)}}const yre=e=>Ne(e,s4),_re=(e,t)=>new XT(e,lre(t),Id(t?.description)),kre=(e,t,n)=>new XT(e,dre(t),Id(n)),Ere=N(2,(e,t)=>t.length===0?e:new XT(e.name,e.keyType,e.description,k0(e.tags,t))),DP=Symbol.for("effect/MutableHashMap"),wre={[DP]:DP,[Symbol.iterator](){return new ZT(this)},toString(){return Mt(this.toJSON())},toJSON(){return{_id:"MutableHashMap",values:Array.from(this).map(Yt)}},[yt](){return this.toJSON()},pipe(){return Se(this,arguments)}};class ZT{self;referentialIterator;bucketIterator;constructor(t){this.self=t,this.referentialIterator=t.referential[Symbol.iterator]()}next(){if(this.bucketIterator!==void 0)return this.bucketIterator.next();const t=this.referentialIterator.next();return t.done?(this.bucketIterator=new Sre(this.self.buckets.values()),this.next()):t}[Symbol.iterator](){return new ZT(this.self)}}class Sre{backing;constructor(t){this.backing=t}currentBucket;next(){if(this.currentBucket===void 0){const n=this.backing.next();if(n.done)return n;this.currentBucket=n.value[Symbol.iterator]()}const t=this.currentBucket.next();return t.done?(this.currentBucket=void 0,this.next()):t}}const bS=()=>{const e=Object.create(wre);return e.referential=new Map,e.buckets=new Map,e.bucketsSize=0,e},Sa=N(2,(e,t)=>{if(qh(t)===!1)return e.referential.has(t)?ye(e.referential.get(t)):fe();const n=t[We](),r=e.buckets.get(n);return r===void 0?fe():vre(e,r,t)}),vre=(e,t,n,r=!1)=>{for(let s=0,i=t.length;s<i;s++)if(n[Je](t[s][0])){const a=t[s][1];return r&&(t.splice(s,1),e.bucketsSize--),ye(a)}return fe()},pf=N(2,(e,t)=>mt(Sa(e,t))),Tc=N(3,(e,t,n)=>{if(qh(t)===!1)return e.referential.set(t,n),e;const r=t[We](),s=e.buckets.get(r);return s===void 0?(e.buckets.set(r,[[t,n]]),e.bucketsSize++,e):(i4(e,s,t),s.push([t,n]),e.bucketsSize++,e)}),i4=(e,t,n)=>{for(let r=0,s=t.length;r<s;r++)if(n[Je](t[r][0])){t.splice(r,1),e.bucketsSize--;return}},xre=N(2,(e,t)=>{if(qh(t)===!1)return e.referential.delete(t),e;const n=t[We](),r=e.buckets.get(n);return r===void 0||(i4(e,r,t),r.length===0&&e.buckets.delete(n)),e}),Tre="effect/MetricState",Km=Symbol.for(Tre),a4="effect/MetricState/Counter",yS=Symbol.for(a4),o4="effect/MetricState/Frequency",_S=Symbol.for(o4),c4="effect/MetricState/Gauge",kS=Symbol.for(c4),u4="effect/MetricState/Histogram",ES=Symbol.for(u4),l4="effect/MetricState/Summary",wS=Symbol.for(l4),Wm={_A:e=>e};class Ire{count;[Km]=Wm;[yS]=yS;constructor(t){this.count=t}[We](){return F(Ce(a4),ut(Ce(this.count)),qt(this))}[Je](t){return jre(t)&&this.count===t.count}pipe(){return Se(this,arguments)}}const Are=g_(je);class Cre{occurrences;[Km]=Wm;[_S]=_S;constructor(t){this.occurrences=t}_hash;[We](){return F(Xt(o4),ut(Om(It(this.occurrences.entries()))),qt(this))}[Je](t){return Fre(t)&&Are(It(this.occurrences.entries()),It(t.occurrences.entries()))}pipe(){return Se(this,arguments)}}class Pre{value;[Km]=Wm;[kS]=kS;constructor(t){this.value=t}[We](){return F(Ce(c4),ut(Ce(this.value)),qt(this))}[Je](t){return Bre(t)&&this.value===t.value}pipe(){return Se(this,arguments)}}class Nre{buckets;count;min;max;sum;[Km]=Wm;[ES]=ES;constructor(t,n,r,s,i){this.buckets=t,this.count=n,this.min=r,this.max=s,this.sum=i}[We](){return F(Ce(u4),ut(Ce(this.buckets)),ut(Ce(this.count)),ut(Ce(this.min)),ut(Ce(this.max)),ut(Ce(this.sum)),qt(this))}[Je](t){return zre(t)&&je(this.buckets,t.buckets)&&this.count===t.count&&this.min===t.min&&this.max===t.max&&this.sum===t.sum}pipe(){return Se(this,arguments)}}class Rre{error;quantiles;count;min;max;sum;[Km]=Wm;[wS]=wS;constructor(t,n,r,s,i,a){this.error=t,this.quantiles=n,this.count=r,this.min=s,this.max=i,this.sum=a}[We](){return F(Ce(l4),ut(Ce(this.error)),ut(Ce(this.quantiles)),ut(Ce(this.count)),ut(Ce(this.min)),ut(Ce(this.max)),ut(Ce(this.sum)),qt(this))}[Je](t){return Ure(t)&&this.error===t.error&&je(this.quantiles,t.quantiles)&&this.count===t.count&&this.min===t.min&&this.max===t.max&&this.sum===t.sum}pipe(){return Se(this,arguments)}}const Ore=e=>new Ire(e),Lre=e=>new Cre(e),Dre=e=>new Pre(e),$re=e=>new Nre(e.buckets,e.count,e.min,e.max,e.sum),Mre=e=>new Rre(e.error,e.quantiles,e.count,e.min,e.max,e.sum),jre=e=>Ne(e,yS),Fre=e=>Ne(e,_S),Bre=e=>Ne(e,kS),zre=e=>Ne(e,ES),Ure=e=>Ne(e,wS),Vre="effect/MetricHook",Hre=Symbol.for(Vre),qre={_In:e=>e,_Out:e=>e},Jm=e=>({[Hre]:qre,pipe(){return Se(this,arguments)},...e}),$P=BigInt(0),Gre=e=>{let t=e.keyType.bigint?$P:0;const n=e.keyType.incremental?e.keyType.bigint?s=>s>=$P:s=>s>=0:s=>!0,r=s=>{n(s)&&(t=t+s)};return Jm({get:()=>Ore(t),update:r,modify:r})},Kre=e=>{const t=new Map;for(const r of e.keyType.preregisteredWords)t.set(r,0);const n=r=>{const s=t.get(r)??0;t.set(r,s+1)};return Jm({get:()=>Lre(t),update:n,modify:n})},Wre=(e,t)=>{let n=t;return Jm({get:()=>Dre(n),update:r=>{n=r},modify:r=>{n=n+r}})},Jre=e=>{const t=e.keyType.boundaries.values,n=t.length,r=new Uint32Array(n+1),s=new Float64Array(n);let i=0,a=0,o=Number.MAX_VALUE,c=Number.MIN_VALUE;F(t,Kh(hd),Gc((d,f)=>{s[f]=d}));const u=d=>{let f=0,h=n;for(;f!==h;){const m=Math.floor(f+(h-f)/2),y=s[m];d<=y?h=m:f=m,h===f+1&&(d<=s[f]?h=f:f=h)}r[f]=r[f]+1,i=i+1,a=a+d,d<o&&(o=d),d>c&&(c=d)},l=()=>{const d=p_(n);let f=0;for(let h=0;h<n;h++){const m=s[h],y=r[h];f=f+y,d[h]=[m,f]}return d};return Jm({get:()=>$re({buckets:l(),count:i,min:o,max:c,sum:a}),update:u,modify:u})},Yre=e=>{const{error:t,maxAge:n,maxSize:r,quantiles:s}=e.keyType,i=F(s,Kh(hd)),a=p_(r);let o=0,c=0,u=0,l=0,d=0;const f=m=>{const y=[];let g=0;for(;g!==r-1;){const p=a[g];if(p!=null){const[_,k]=p,v=ud(m-_);zY(v,cd)&&BY(v,n)&&y.push(k)}g=g+1}return Qre(t,i,Kh(y,hd))},h=(m,y)=>{if(r>0){o=o+1;const g=o%r;a[g]=[y,m]}l=c===0?m:Math.min(l,m),d=c===0?m:Math.max(d,m),c=c+1,u=u+m};return Jm({get:()=>Mre({error:t,quantiles:f(Date.now()),count:c,min:l,max:d,sum:u}),update:([m,y])=>h(m,y),modify:([m,y])=>h(m,y)})},Qre=(e,t,n)=>{const r=n.length;if(!Qt(t))return Do();const s=t[0],i=t.slice(1),a=MP(e,r,fe(),0,s,n),o=Qs(a);return i.forEach(c=>{o.push(MP(e,r,a.value,a.consumed,c,a.rest))}),Gc(o,c=>[c.quantile,c.value])},MP=(e,t,n,r,s,i)=>{let a=e,o=t,c=n,u=r,l=s,d=i,f=e,h=t,m=n,y=r,g=s,p=i;for(;;){if(!Qt(d))return{quantile:l,value:fe(),consumed:u,rest:[]};if(l===1)return{quantile:l,value:ye(wM(d)),consumed:u+d.length,rest:[]};const _=Dr(d),k=uJ(d,I=>I===_),v=l*o,w=a/2*v,S=u+k[0].length,T=Math.abs(S-v);if(S<v-w){f=a,h=o,m=lh(d),y=S,g=l,p=k[1],a=f,o=h,c=m,u=y,l=g,d=p;continue}if(S>v+w){const I=Tn(c)?ye(_):c;return{quantile:l,value:I,consumed:u,rest:d}}switch(c._tag){case"None":{f=a,h=o,m=lh(d),y=S,g=l,p=k[1],a=f,o=h,c=m,u=y,l=g,d=p;continue}case"Some":{const I=Math.abs(v-c.value);if(T<I){f=a,h=o,m=lh(d),y=S,g=l,p=k[1],a=f,o=h,c=m,u=y,l=g,d=p;continue}return{quantile:l,value:ye(c.value),consumed:u,rest:d}}}}throw new Error("BUG: MetricHook.resolveQuantiles - please report an issue at https://github.com/Effect-TS/effect/issues")},Xre="effect/MetricPair",Zre=Symbol.for(Xre),ese={_Type:e=>e},tse=(e,t)=>({[Zre]:ese,metricKey:e,metricState:t,pipe(){return Se(this,arguments)}}),nse="effect/MetricRegistry",jP=Symbol.for(nse);class rse{[jP]=jP;map=bS();snapshot(){const t=[];for(const[n,r]of this.map)t.push(tse(n,r.get()));return t}get(t){const n=F(this.map,Sa(t),Nr);if(n==null){if(n4(t.keyType))return this.getCounter(t);if(hre(t.keyType))return this.getGauge(t);if(fre(t.keyType))return this.getFrequency(t);if(r4(t.keyType))return this.getHistogram(t);if(mre(t.keyType))return this.getSummary(t);throw new Error("BUG: MetricRegistry.get - unknown MetricKeyType - please report an issue at https://github.com/Effect-TS/effect/issues")}else return n}getCounter(t){let n=F(this.map,Sa(t),Nr);if(n==null){const r=Gre(t);F(this.map,pf(t))||F(this.map,Tc(t,r)),n=r}return n}getFrequency(t){let n=F(this.map,Sa(t),Nr);if(n==null){const r=Kre(t);F(this.map,pf(t))||F(this.map,Tc(t,r)),n=r}return n}getGauge(t){let n=F(this.map,Sa(t),Nr);if(n==null){const r=Wre(t,t.keyType.bigint?BigInt(0):0);F(this.map,pf(t))||F(this.map,Tc(t,r)),n=r}return n}getHistogram(t){let n=F(this.map,Sa(t),Nr);if(n==null){const r=Jre(t);F(this.map,pf(t))||F(this.map,Tc(t,r)),n=r}return n}getSummary(t){let n=F(this.map,Sa(t),Nr);if(n==null){const r=Yre(t);F(this.map,pf(t))||F(this.map,Tc(t,r)),n=r}return n}}const sse=()=>new rse,ise="effect/Metric",ase=Symbol.for(ise),ose={_Type:e=>e,_In:e=>e,_Out:e=>e},FP=$e(Symbol.for("effect/Metric/globalMetricRegistry"),()=>sse()),d4=function(e,t,n,r){const s=Object.assign(i=>yT(i,a=>dse(s,a)),{[ase]:ose,keyType:e,unsafeUpdate:t,unsafeValue:n,unsafeModify:r,register(){return this.unsafeValue([]),this},pipe(){return Se(this,arguments)}});return s},Q_=(e,t)=>f4(_re(e,t)),f4=e=>{let t;const n=new WeakMap,r=s=>{if(s.length===0)return t!==void 0||(t=FP.get(e)),t;let i=n.get(s);return i!==void 0||(i=FP.get(Ere(e,s)),n.set(s,i)),i};return d4(e.keyType,(s,i)=>r(i).update(s),s=>r(s).get(),(s,i)=>r(i).modify(s))},cse=(e,t,n)=>f4(kre(e,t,n)),use=N(3,(e,t,n)=>lse(e,[sne(t,n)])),lse=N(2,(e,t)=>d4(e.keyType,(n,r)=>e.unsafeUpdate(n,k0(t,r)),n=>e.unsafeValue(k0(t,n)),(n,r)=>e.unsafeModify(n,k0(t,r)))),dse=N(2,(e,t)=>M_(eS,n=>pe(()=>e.unsafeUpdate(t,n))));({...Mx});const fse=N(2,(e,t)=>M_(Bj,n=>pe(()=>{if(n.has(e)){const r=n.get(e);r.state.completed||(r.state.completed=!0,H_(r.result,t))}}))),hse="effect/Supervisor",X_=Symbol.for(hse),eI={_T:e=>e};class Z_{underlying;value0;[X_]=eI;constructor(t,n){this.underlying=t,this.value0=n}get value(){return this.value0}onStart(t,n,r,s){this.underlying.onStart(t,n,r,s)}onEnd(t,n){this.underlying.onEnd(t,n)}onEffect(t,n){this.underlying.onEffect(t,n)}onSuspend(t){this.underlying.onSuspend(t)}onResume(t){this.underlying.onResume(t)}map(t){return new Z_(this,F(this.value,Ze(t)))}zip(t){return new e1(this,t)}}class e1{left;right;_tag="Zip";[X_]=eI;constructor(t,n){this.left=t,this.right=n}get value(){return D_(this.left.value,this.right.value)}onStart(t,n,r,s){this.left.onStart(t,n,r,s),this.right.onStart(t,n,r,s)}onEnd(t,n){this.left.onEnd(t,n),this.right.onEnd(t,n)}onEffect(t,n){this.left.onEffect(t,n),this.right.onEffect(t,n)}onSuspend(t){this.left.onSuspend(t),this.right.onSuspend(t)}onResume(t){this.left.onResume(t),this.right.onResume(t)}map(t){return new Z_(this,F(this.value,Ze(t)))}zip(t){return new e1(this,t)}}const h4=e=>Ne(e,X_)&&$$(e,"Zip");class mse{effect;[X_]=eI;constructor(t){this.effect=t}get value(){return this.effect}onStart(t,n,r,s){}onEnd(t,n){}onEffect(t,n){}onSuspend(t){}onResume(t){}map(t){return new Z_(this,F(this.value,Ze(t)))}zip(t){return new e1(this,t)}onRun(t,n){return t()}}const pse=e=>new mse(e),t1=$e("effect/Supervisor/none",()=>pse(Ot)),gse=Od,m4="Empty",p4="AddSupervisor",g4="RemoveSupervisor",b4="AndThen",hh={_tag:m4},T0=(e,t)=>({_tag:b4,first:e,second:t}),bse=(e,t)=>yse(t,An(e)),yse=(e,t)=>{let n=e,r=t;for(;Fa(r);){const s=zi(r);switch(s._tag){case m4:{r=Ca(r);break}case p4:{n=n.zip(s.supervisor),r=Ca(r);break}case g4:{n=SS(n,s.supervisor),r=Ca(r);break}case b4:{r=wr(s.first)(wr(s.second)(Ca(r)));break}}}return n},SS=(e,t)=>je(e,t)?t1:h4(e)?SS(e.left,t).zip(SS(e.right,t)):e,zb=e=>je(e,t1)?ou():h4(e)?F(zb(e.left),Yh(zb(e.right))):aT(e),_se=(e,t)=>{if(je(e,t))return hh;const n=zb(e),r=zb(t),s=F(r,q2(n),Qh(hh,(a,o)=>T0(a,{_tag:p4,supervisor:o}))),i=F(n,q2(r),Qh(hh,(a,o)=>T0(a,{_tag:g4,supervisor:o})));return T0(s,i)},kse=gse({empty:hh,patch:bse,combine:T0,diff:_se}),Ese=Q_("effect_fiber_started",{incremental:!0}),BP=Q_("effect_fiber_active"),wse=Q_("effect_fiber_successes",{incremental:!0}),Sse=Q_("effect_fiber_failures",{incremental:!0}),vse=use(cse("effect_fiber_lifetimes",ere({start:.5,factor:2,count:35})),"time_unit","milliseconds"),gf="Continue",xse="Done",zP="Yield",Tse={_E:e=>e,_A:e=>e},Vp=e=>{throw new Error(`BUG: FiberRuntime - ${Zl(e)} - please report an issue at https://github.com/Effect-TS/effect/issues`)},la=Symbol.for("effect/internal/fiberRuntime/YieldedOp"),da=$e("effect/internal/fiberRuntime/yieldedOpChannel",()=>({currentOp:null})),bf={[mb]:(e,t,n)=>or(()=>t.effect_instruction_i1(n)),OnStep:(e,t,n)=>Rt(Rt(n)),[pb]:(e,t,n)=>or(()=>t.effect_instruction_i2(n)),[Dx]:(e,t,n)=>(e.patchRuntimeFlags(e.currentRuntimeFlags,t.patch),co(e.currentRuntimeFlags)&&e.isInterrupted()?Nt(e.getInterruptedCause()):Rt(n)),[gb]:(e,t,n)=>(or(()=>t.effect_instruction_i2(n)),or(()=>t.effect_instruction_i0())?(e.pushStack(t),or(()=>t.effect_instruction_i1())):Ot),[uh]:(e,t,n)=>{for(;;){const r=or(()=>t.effect_instruction_i0.next(n));if(r.done)return Rt(r.value);const s=CK(r.value);if(F_(s)){if(s._tag==="Failure")return s}else return e.pushStack(t),s;n=s.value}}},Ise={[KT]:(e,t,n,r)=>(e.processNewInterruptSignal(r.cause),co(t)?Nt(r.cause):n),[JT]:(e,t,n,r)=>{throw new Error("It is illegal to have multiple concurrent run loops in a single fiber")},[WT]:(e,t,n,r)=>(r.onFiber(e,Ij(t)),n),[YT]:(e,t,n,r)=>ue(ET(),()=>n)},Ase=e=>O_(wX(e),t=>Wi($X(t),([n,r])=>{const s=new Map,i=[];for(const o of r){i.push(Fs(o));for(const c of o)s.set(c.request,c)}const a=i.flat();return Ld(Qse(n.runAll(i),a,()=>a.forEach(o=>{o.listeners.interrupted=!0})),Bj,s)},!1,!1)),Cse=$x();class y4 extends Fd{[$ne]=Mne;[Fne]=Tse;_fiberRefs;_fiberId;_queue=new Array;_children=null;_observers=new Array;_running=!1;_stack=[];_asyncInterruptor=null;_asyncBlockingOn=null;_exitValue=null;_steps=[];_isYielding=!1;currentRuntimeFlags;currentOpCount=0;currentSupervisor;currentScheduler;currentTracer;currentSpan;currentContext;currentDefaultServices;constructor(t,n,r){if(super(),this.currentRuntimeFlags=r,this._fiberId=t,this._fiberRefs=n,rP(r)){const s=this.getFiberRef(eS);Ese.unsafeUpdate(1,s),BP.unsafeUpdate(1,s)}this.refreshRefCache()}commit(){return om(this)}id(){return this._fiberId}resume(t){this.tell(Ju(t))}get status(){return this.ask((t,n)=>n)}get runtimeFlags(){return this.ask((t,n)=>ate(n)?t.currentRuntimeFlags:n.runtimeFlags)}scope(){return Lne(this)}get children(){return this.ask(t=>Array.from(t.getChildren()))}getChildren(){return this._children===null&&(this._children=new Set),this._children}getInterruptedCause(){return this.getFiberRef(zp)}fiberRefs(){return this.ask(t=>t.getFiberRefs())}ask(t){return Ke(()=>{const n=z_(this._fiberId);return this.tell(x0((r,s)=>{H_(n,pe(()=>t(r,s)))})),Fo(n)})}tell(t){this._queue.push(t),this._running||(this._running=!0,this.drainQueueLaterOnExecutor())}get await(){return yi(t=>{const n=r=>t(_e(r));if(this._exitValue!==null){n(this._exitValue);return}return this.tell(x0((r,s)=>{r._exitValue!==null?n(this._exitValue):r.addObserver(n)})),pe(()=>this.tell(x0((r,s)=>{r.removeObserver(n)})))},this.id())}get inheritAll(){return Et((t,n)=>{const r=t.id(),s=t.getFiberRefs(),i=n.runtimeFlags,a=this.getFiberRefs(),o=Hee(s,r,a);t.setFiberRefs(o);const c=t.getFiberRef(qP),u=F(Eo(i,c),iP(Pu),iP(Xw));return B6(u)})}get poll(){return pe(()=>Id(this._exitValue))}unsafePoll(){return this._exitValue}interruptAsFork(t){return pe(()=>this.tell(zk(ni(t))))}unsafeInterruptAsFork(t){this.tell(zk(ni(t)))}addObserver(t){this._exitValue!==null?t(this._exitValue):this._observers.push(t)}removeObserver(t){this._observers=this._observers.filter(n=>n!==t)}getFiberRefs(){return this.setFiberRef(qP,this.currentRuntimeFlags),this._fiberRefs}unsafeDeleteFiberRef(t){this._fiberRefs=yj(this._fiberRefs,t)}getFiberRef(t){return this._fiberRefs.locals.has(t)?this._fiberRefs.locals.get(t)[0][1]:t.initial}setFiberRef(t,n){this._fiberRefs=uS(this._fiberRefs,{fiberId:this._fiberId,fiberRef:t,value:n}),this.refreshRefCache()}refreshRefCache(){this.currentDefaultServices=this.getFiberRef(md),this.currentTracer=this.currentDefaultServices.unsafeMap.get(RT.key),this.currentSupervisor=this.getFiberRef(Wse),this.currentScheduler=this.getFiberRef(VT),this.currentContext=this.getFiberRef(ta),this.currentSpan=this.currentContext.unsafeMap.get(G_.key)}setFiberRefs(t){this._fiberRefs=t,this.refreshRefCache()}addChild(t){this.getChildren().add(t)}removeChild(t){this.getChildren().delete(t)}transferChildren(t){const n=this._children;if(this._children=null,n!==null&&n.size>0)for(const r of n)r._exitValue===null&&t.add(this.currentRuntimeFlags,r)}drainQueueOnCurrentThread(){let t=!0;for(;t;){let n=gf;const r=globalThis[to];globalThis[to]=this;try{for(;n===gf;)n=this._queue.length===0?xse:this.evaluateMessageWhileSuspended(this._queue.splice(0,1)[0])}finally{this._running=!1,globalThis[to]=r}this._queue.length>0&&!this._running?(this._running=!0,n===zP?(this.drainQueueLaterOnExecutor(),t=!1):t=!0):t=!1}}drainQueueLaterOnExecutor(){this.currentScheduler.scheduleTask(this.run,this.getFiberRef($d))}drainQueueWhileRunning(t,n){let r=n;for(;this._queue.length>0;){const s=this._queue.splice(0,1)[0];r=Ise[s._tag](this,t,r,s)}return r}isInterrupted(){return!fY(this.getFiberRef(zp))}addInterruptedCause(t){const n=this.getFiberRef(zp);this.setFiberRef(zp,br(n,t))}processNewInterruptSignal(t){this.addInterruptedCause(t),this.sendInterruptSignalToAllChildren()}sendInterruptSignalToAllChildren(){if(this._children===null||this._children.size===0)return!1;let t=!1;for(const n of this._children)n.tell(zk(ni(this.id()))),t=!0;return t}interruptAllChildren(){if(this.sendInterruptSignalToAllChildren()){const t=this._children.values();this._children=null;let n=!1;return kT({while:()=>!n,body:()=>{const s=t.next();return s.done?pe(()=>{n=!0}):Vs(s.value.await)},step:()=>{}})}return null}reportExitValue(t){if(rP(this.currentRuntimeFlags)){const n=this.getFiberRef(eS),r=this.id().startTimeMillis,s=Date.now();switch(vse.unsafeUpdate(s-r,n),BP.unsafeUpdate(-1,n),t._tag){case Xn:{wse.unsafeUpdate(1,n);break}case Qn:{Sse.unsafeUpdate(1,n);break}}}if(t._tag==="Failure"){const n=this.getFiberRef(pZ);!S_(t.cause)&&n._tag==="Some"&&this.log("Fiber terminated with an unhandled error",t.cause,n)}}setExitValue(t){this._exitValue=t,this.reportExitValue(t);for(let n=this._observers.length-1;n>=0;n--)this._observers[n](t);this._observers=[]}getLoggers(){return this.getFiberRef(Lse)}log(t,n,r){const s=mt(r)?r.value:this.getFiberRef(lZ),i=this.getFiberRef(Pse);if(gte(i,s))return;const a=this.getFiberRef(dZ),o=this.getFiberRef(uZ),c=this.getLoggers(),u=this.getFiberRefs();if(oT(c)>0){const l=ci(this.getFiberRef(md),Md),d=new Date(l.unsafeCurrentTimeMillis());$K(u,()=>{for(const f of c)f.log({fiberId:this.id(),logLevel:s,message:t,cause:n,context:u,spans:a,annotations:o,date:d})})}}evaluateMessageWhileSuspended(t){switch(t._tag){case YT:return zP;case KT:return this.processNewInterruptSignal(t.cause),this._asyncInterruptor!==null&&(this._asyncInterruptor(Nt(t.cause)),this._asyncInterruptor=null),gf;case JT:return this._asyncInterruptor=null,this._asyncBlockingOn=null,this.evaluateEffect(t.effect),gf;case WT:return t.onFiber(this,this._exitValue!==null?ste:ite(this.currentRuntimeFlags,this._asyncBlockingOn)),gf;default:return Vp(t)}}evaluateEffect(t){this.currentSupervisor.onResume(this);try{let n=co(this.currentRuntimeFlags)&&this.isInterrupted()?Nt(this.getInterruptedCause()):t;for(;n!==null;){const r=n,s=this.runLoop(r);if(s===la){const i=da.currentOp;da.currentOp=null,i._op===_0?gX(this.currentRuntimeFlags)?(this.tell(Pne()),this.tell(Ju(yr)),n=null):n=yr:i._op===ch&&(n=null)}else{this.currentRuntimeFlags=F(this.currentRuntimeFlags,yX(Xw));const i=this.interruptAllChildren();i!==null?n=ue(i,()=>s):(this._queue.length===0?this.setExitValue(s):this.tell(Ju(s)),n=null)}}}finally{this.currentSupervisor.onSuspend(this)}}start(t){if(this._running)this.tell(Ju(t));else{this._running=!0;const n=globalThis[to];globalThis[to]=this;try{this.evaluateEffect(t)}finally{this._running=!1,globalThis[to]=n,this._queue.length>0&&this.drainQueueLaterOnExecutor()}}}startFork(t){this.tell(Ju(t))}patchRuntimeFlags(t,n){const r=jl(t,n);return globalThis[to]=this,this.currentRuntimeFlags=r,r}initiateAsync(t,n){let r=!1;const s=i=>{r||(r=!0,this.tell(Ju(i)))};co(t)&&(this._asyncInterruptor=s);try{n(s)}catch(i){s(Mn(Bs(i)))}}pushStack(t){this._stack.push(t),t._op==="OnStep"&&this._steps.push({refs:this.getFiberRefs(),flags:this.currentRuntimeFlags})}popStack(){const t=this._stack.pop();if(t)return t._op==="OnStep"&&this._steps.pop(),t}getNextSuccessCont(){let t=this.popStack();for(;t;){if(t._op!==y0)return t;t=this.popStack()}}getNextFailCont(){let t=this.popStack();for(;t;){if(t._op!==mb&&t._op!==gb&&t._op!==uh)return t;t=this.popStack()}}[MK](t){return pe(()=>iM(this.currentContext,t))}Left(t){return ln(t.left)}None(t){return ln(new j_)}Right(t){return Rt(t.right)}Some(t){return Rt(t.value)}Micro(t){return Ib(n=>{let r=n;const s=qte(jte(t,this.currentContext));return s.addObserver(i=>{if(i._tag==="Success")return r(Rt(i.value));switch(i.cause._tag){case"Interrupt":return r(Nt(ni(gs)));case"Fail":return r(ln(i.cause.error));case"Die":return r(po(i.cause.defect))}}),Ib(i=>{r=a=>{i(Ot)},s.unsafeInterrupt()})})}[G$](t){const n=or(()=>t.effect_instruction_i0()),r=this.getNextSuccessCont();return r!==void 0?(r._op in bf||Vp(r),bf[r._op](this,r,n)):(da.currentOp=Rt(n),la)}[Xn](t){const n=t,r=this.getNextSuccessCont();return r!==void 0?(r._op in bf||Vp(r),bf[r._op](this,r,n.effect_instruction_i0)):(da.currentOp=n,la)}[Qn](t){const n=t.effect_instruction_i0,r=this.getNextFailCont();if(r!==void 0)switch(r._op){case y0:case pb:return co(this.currentRuntimeFlags)&&this.isInterrupted()?Nt(G2(n)):or(()=>r.effect_instruction_i1(n));case"OnStep":return co(this.currentRuntimeFlags)&&this.isInterrupted()?Nt(G2(n)):Rt(Nt(n));case Dx:return this.patchRuntimeFlags(this.currentRuntimeFlags,r.patch),co(this.currentRuntimeFlags)&&this.isInterrupted()?Nt(br(n,this.getInterruptedCause())):Nt(n);default:Vp(r)}else return da.currentOp=Nt(n),la}[K$](t){return or(()=>t.effect_instruction_i0(this,Ij(this.currentRuntimeFlags)))}Blocked(t){const n=this.getFiberRefs(),r=this.currentRuntimeFlags;if(this._steps.length>0){const s=[],i=this._steps[this._steps.length-1];let a=this.popStack();for(;a&&a._op!=="OnStep";)s.push(a),a=this.popStack();this.setFiberRefs(i.refs),this.currentRuntimeFlags=i.flags;const o=sm(i.refs,n),c=Eo(i.flags,r);return Rt(A6(t.effect_instruction_i0,Et(u=>{for(;s.length>0;)u.pushStack(s.pop());return u.setFiberRefs(im(u.id(),u.getFiberRefs())(o)),u.currentRuntimeFlags=jl(c)(u.currentRuntimeFlags),t.effect_instruction_i1})))}return _i(s=>ue(tI(zX(t.effect_instruction_i0)),()=>s(t.effect_instruction_i1)))}RunBlocked(t){return Ase(t.effect_instruction_i0)}[Td](t){const n=t.effect_instruction_i0,r=this.currentRuntimeFlags,s=jl(r,n);if(co(s)&&this.isInterrupted())return Nt(this.getInterruptedCause());if(this.patchRuntimeFlags(this.currentRuntimeFlags,n),t.effect_instruction_i1){const i=Eo(s,r);return this.pushStack(new UX(i,t)),or(()=>t.effect_instruction_i1(r))}else return yr}[mb](t){return this.pushStack(t),t.effect_instruction_i0}OnStep(t){return this.pushStack(t),t.effect_instruction_i0}[y0](t){return this.pushStack(t),t.effect_instruction_i0}[pb](t){return this.pushStack(t),t.effect_instruction_i0}[ch](t){return this._asyncBlockingOn=t.effect_instruction_i1,this.initiateAsync(this.currentRuntimeFlags,t.effect_instruction_i0),da.currentOp=t,la}[_0](t){return this._isYielding=!1,da.currentOp=t,la}[gb](t){const n=t.effect_instruction_i0,r=t.effect_instruction_i1;return n()?(this.pushStack(t),r()):yr}[uh](t){return bf[uh](this,t,void 0)}[f_](t){return or(()=>t.commit())}runLoop(t){let n=t;for(this.currentOpCount=0;;){if((this.currentRuntimeFlags&pX)!==0&&this.currentSupervisor.onEffect(this,n),this._queue.length>0&&(n=this.drainQueueWhileRunning(this.currentRuntimeFlags,n)),!this._isYielding){this.currentOpCount+=1;const r=this.currentScheduler.shouldYield(this);if(r!==!1){this._isYielding=!0,this.currentOpCount=0;const s=n;n=ue(ET({priority:r}),()=>s)}}try{if(n=this.currentTracer.context(()=>{if(Cse!==n[fu]._V){const r=this.getFiberRef(gZ);if(r._tag==="Some"){const s=n[fu]._V;this.log(`Executing an Effect versioned ${s} with a Runtime of version ${$x()}, you may want to dedupe the effect dependencies, you can use the language service plugin to detect this at compile time: https://github.com/Effect-TS/language-service`,Mo,r)}}return this[n._op](n)},this),n===la){const r=da.currentOp;return r._op===_0||r._op===ch?la:(da.currentOp=null,r._op===Xn||r._op===Qn?r:Nt(Bs(r)))}}catch(r){n!==la&&!Ne(n,"_op")||!(n._op in this)?n=L6(`Not a valid effect: ${Zl(n)}`):SZ(r)?n=Nt(br(Bs(r),ni(gs))):n=po(r)}}}run=()=>{this.drainQueueOnCurrentThread()}}const Pse=$e("effect/FiberRef/currentMinimumLogLevel",()=>Fn(bte("Info"))),Nse=e=>QT(t=>{const n=kj(t.context,md);ci(n,hj).unsafe.log(e.log(t))}),Rse=$e(Symbol.for("effect/Logger/defaultLogger"),()=>Nse(Jne)),Ose=$e(Symbol.for("effect/Logger/tracerLogger"),()=>QT(({annotations:e,cause:t,context:n,fiberId:r,logLevel:s,message:i})=>{const a=Yo(rm(n,ta),G_);if(a._tag==="None"||a.value._tag==="ExternalSpan")return;const o=iM(rm(n,md),Md),c={};for(const[u,l]of e)c[u]=l;c["effect.fiberId"]=tQ(r),c["effect.logLevel"]=s.label,t!==null&&t._tag!=="Empty"&&(c["effect.cause"]=Rd(t,{renderErrorCause:!0})),a.value.event(Zl(Array.isArray(i)&&i.length===1?i[0]:i),o.unsafeCurrentTimeNanos(),c)})),Lse=$e(Symbol.for("effect/FiberRef/currentLoggers"),()=>aZ(aT(Rse,Ose))),Dse=N(e=>Ua(e[0]),(e,t)=>Gm(yT(e,n=>$se(r=>t(n,r))))),$se=e=>Et(t=>{const n=t.getFiberRefs(),r=bX(t.currentRuntimeFlags,Pu);return ue(v4,s=>Ab(s,i=>Et(a=>{const o=a.getFiberRefs(),c=a.currentRuntimeFlags,u=sm(o,n),l=Eo(c,r),d=sm(n,o);return a.setFiberRefs(im(u,a.id(),n)),cm(WX(e(i),l),pe(()=>{a.setFiberRefs(im(d,a.id(),a.getFiberRefs()))}))})))}),Mse=e=>{if(Array.isArray(e)||j$(e))return[e,fe()];const t=Object.keys(e),n=t.length;return[t.map(r=>e[r]),ye(r=>{const s={};for(let i=0;i<n;i++)s[t[i]]=r[i];return s})]},jse=(e,t,n)=>{const r=[];for(const s of e)r.push(fd(s));return ue(gd(r,ze,{concurrency:n?.concurrency,batching:n?.batching,concurrentFinalizers:n?.concurrentFinalizers}),s=>{const i=fe(),a=s.length,o=new Array(a),c=new Array(a);let u=!1;for(let l=0;l<a;l++){const d=s[l];d._tag==="Left"?(o[l]=ye(d.left),u=!0):(c[l]=d.right,o[l]=i)}return u?t._tag==="Some"?ln(t.value(o)):ln(o):n?.discard?Ot:t._tag==="Some"?_e(t.value(c)):_e(c)})},Fse=(e,t,n)=>{const r=[];for(const s of e)r.push(fd(s));return n?.discard?gd(r,ze,{concurrency:n?.concurrency,batching:n?.batching,discard:!0,concurrentFinalizers:n?.concurrentFinalizers}):Ze(gd(r,ze,{concurrency:n?.concurrency,batching:n?.batching,concurrentFinalizers:n?.concurrentFinalizers}),s=>t._tag==="Some"?t.value(s):s)},_4=(e,t)=>{const[n,r]=Mse(e);return t?.mode==="validate"?jse(n,r,t):t?.mode==="either"?Fse(n,r,t):t?.discard!==!0&&r._tag==="Some"?Ze(gd(n,ze,t),r.value):gd(n,ze,t)},gd=N(e=>j$(e[0]),(e,t,n)=>Et(r=>{const s=n?.batching===!0||n?.batching==="inherit"&&r.getFiberRef(mZ);return n?.discard?NP(n.concurrency,()=>Yu(Nb,n?.concurrentFinalizers)(i=>s?Wi(e,(a,o)=>i(t(a,o)),!0,!1,1):O_(e,(a,o)=>i(t(a,o)))),()=>Yu(oS,n?.concurrentFinalizers)(i=>Wi(e,(a,o)=>i(t(a,o)),s,!1)),i=>Yu(cS(i),n?.concurrentFinalizers)(a=>Wi(e,(o,c)=>a(t(o,c)),s,!1,i))):NP(n?.concurrency,()=>Yu(Nb,n?.concurrentFinalizers)(i=>s?vS(e,1,(a,o)=>i(t(a,o)),!0):Pa(e,(a,o)=>i(t(a,o)))),()=>Yu(oS,n?.concurrentFinalizers)(i=>k4(e,(a,o)=>i(t(a,o)),s)),i=>Yu(cS(i),n?.concurrentFinalizers)(a=>vS(e,i,(o,c)=>a(t(o,c)),s)))})),k4=(e,t,n)=>Ke(()=>{const r=It(e),s=new Array(r.length);return sn(Wi(r,(a,o)=>ue(t(a,o),c=>pe(()=>s[o]=c)),n,!1),_e(s))}),Wi=(e,t,n,r,s)=>_i(i=>KX(a=>Et(o=>{let c=Array.from(e).reverse(),u=c.length;if(u===0)return Ot;let l=0,d=!1;const f=s?Math.min(c.length,s):c.length,h=new Set,m=new Array,y=()=>h.forEach(I=>{I.currentScheduler.scheduleTask(()=>{I.unsafeInterruptAsFork(o.id())},0)}),g=new Array,p=new Array,_=new Array,k=()=>{const I=m.filter(({exit:$})=>$._tag==="Failure").sort(($,R)=>$.index<R.index?-1:$.index===R.index?0:1).map(({exit:$})=>$);return I.length===0&&I.push(yr),I},v=(I,$=!1)=>{const R=Gm(a(I)),z=Bse(R,o,o.currentRuntimeFlags,Y_);return o.currentScheduler.scheduleTask(()=>{$&&z.unsafeInterruptAsFork(o.id()),z.resume(R)},0),z},w=()=>{r||(u-=c.length,c=[]),d=!0,y()},S=n?VX:wo,T=v(yi(I=>{const $=(z,V)=>{z._op==="Blocked"?_.push(z):(m.push({index:V,exit:z}),z._op==="Failure"&&!d&&w())},R=()=>{if(c.length>0){const z=c.pop();let V=l++;const H=()=>{const me=c.pop();return V=l++,ue(ET(),()=>ue(S(i(t(me,V))),G))},G=me=>c.length>0&&($(me,V),c.length>0)?H():_e(me),Q=ue(S(i(t(z,V))),G),re=v(Q);g.push(re),h.add(re),d&&re.currentScheduler.scheduleTask(()=>{re.unsafeInterruptAsFork(o.id())},0),re.addObserver(me=>{let ke;if(me._op==="Failure"?ke=me:ke=me.effect_instruction_i0,p.push(re),h.delete(re),$(ke,V),m.length===u)I(_e(Kt(Fl(k(),{parallel:!0}),()=>yr)));else if(_.length+m.length===u){const tt=k(),C=_.map(M=>M.effect_instruction_i0).reduce(v6);I(_e(A6(C,Wi([Kt(Fl(tt,{parallel:!0}),()=>yr),..._.map(M=>M.effect_instruction_i1)],M=>M,n,!0,s))))}else R()})}};for(let z=0;z<f;z++)R()}));return Vs(hu(R_(i(om(T))),B_({onFailure:I=>{w();const $=_.length+1,R=Math.min(typeof s=="number"?s:_.length,_.length),z=Array.from(_);return yi(V=>{let H=0,G=0;const Q=(me,ke)=>tt=>{H++,H===$&&V(Rt(Nt(I))),z.length>0&&ke&&re()},re=()=>{v(z.pop(),!0).addObserver(Q(G,!0)),G++};T.addObserver(Q(G,!1)),G++;for(let me=0;me<R;me++)re()})},onSuccess:()=>Pa(p,I=>I.inheritAll)})))}))),vS=(e,t,n,r)=>Ke(()=>{const s=It(e),i=new Array(s.length);return sn(Wi(s,(o,c)=>Ze(n(o,c),u=>i[c]=u),r,!1,t),_e(i))}),tI=e=>zse(e,Y_),E4=(e,t,n,r=null)=>{const s=Ub(e,t,n,r);return s.resume(e),s},Bse=(e,t,n,r=null)=>Ub(e,t,n,r),Ub=(e,t,n,r=null)=>{const s=o6(),i=t.getFiberRefs(),a=qee(i,s),o=new y4(s,a,n),c=rm(a,ta),u=o.currentSupervisor;return u.onStart(c,e,ye(t),o),o.addObserver(d=>u.onEnd(d,o)),(r!==null?r:F(t.getFiberRef(tS),Kt(()=>t.scope()))).add(n,o),o},zse=(e,t)=>Et((n,r)=>_e(E4(e,n,r.runtimeFlags,t))),UP=e=>Nu(t=>hn(Yo(t,Xo),{onNone:()=>e,onSome:n=>{switch(n.strategy._tag){case"Parallel":return e;case"Sequential":case"ParallelN":return ue(Ia(n,oS),r=>Qm(e,r))}}})),VP=e=>t=>Nu(n=>hn(Yo(n,Xo),{onNone:()=>t,onSome:r=>r.strategy._tag==="ParallelN"&&r.strategy.parallelism===e?t:ue(Ia(r,cS(e)),s=>Qm(t,s))})),Yu=(e,t)=>n=>Nu(r=>hn(Yo(r,Xo),{onNone:()=>n(ze),onSome:s=>{if(t===!0){const i=e._tag==="Parallel"?UP:e._tag==="Sequential"?HP:VP(e.parallelism);switch(s.strategy._tag){case"Parallel":return i(n(UP));case"Sequential":return i(n(HP));case"ParallelN":return i(n(VP(s.strategy.parallelism)))}}else return n(ze)}})),w4=e=>ue(Xo,e),S4=e=>ue(nI(),t=>hu(e(t),n=>t.close(n))),HP=e=>Nu(t=>hn(Yo(t,Xo),{onNone:()=>e,onSome:n=>{switch(n.strategy._tag){case"Sequential":return e;case"Parallel":case"ParallelN":return ue(Ia(n,Nb),r=>Qm(e,r))}}})),Use=N(e=>Ua(e[1]),(e,t,n)=>Ym(e,t,(r,s)=>[r,s],n)),Vse=N(e=>Ua(e[1]),(e,t,n)=>n?.concurrent!==!0&&(n?.batching===void 0||n.batching===!1)?$_(e,t):Ym(e,t,(r,s)=>r,n)),Hse=N(e=>Ua(e[1]),(e,t,n)=>n?.concurrent!==!0&&(n?.batching===void 0||n.batching===!1)?sn(e,t):Ym(e,t,(r,s)=>s,n)),Ym=N(e=>Ua(e[1]),(e,t,n,r)=>Ze(_4([e,t],{concurrency:r?.concurrent?2:1,batching:r?.batching,concurrentFinalizers:r?.concurrentFinalizers}),([s,i])=>n(s,i))),Xo=Jo("effect/Scope"),v4=Xo,qse=(e,t)=>{e.state._tag==="Open"&&e.state.finalizers.set({},t)},Gse={[cP]:cP,[uP]:uP,pipe(){return Se(this,arguments)},fork(e){return pe(()=>{const t=x4(e);if(this.state._tag==="Closed")return t.state=this.state,t;const n={},r=s=>t.close(s);return this.state.finalizers.set(n,r),qse(t,s=>pe(()=>{this.state._tag==="Open"&&this.state.finalizers.delete(n)})),t})},close(e){return Ke(()=>{if(this.state._tag==="Closed")return Ot;const t=Array.from(this.state.finalizers.values()).reverse();return this.state={_tag:"Closed",exit:e},t.length===0?Ot:Fee(this.strategy)?F(Pa(t,n=>wo(n(e))),ue(n=>F(Fl(n),Jr(jk),Kt(()=>yr)))):Bee(this.strategy)?F(k4(t,n=>wo(n(e)),!1),ue(n=>F(Fl(n,{parallel:!0}),Jr(jk),Kt(()=>yr)))):F(vS(t,this.strategy.parallelism,n=>wo(n(e)),!1),ue(n=>F(Fl(n,{parallel:!0}),Jr(jk),Kt(()=>yr))))})},addFinalizer(e){return Ke(()=>this.state._tag==="Closed"?e(this.state.exit):(this.state.finalizers.set({},e),Ot))}},x4=(e=Wc)=>{const t=Object.create(Gse);return t.strategy=e,t.state={_tag:"Open",finalizers:new Map},t},nI=(e=Wc)=>pe(()=>x4(e)),Qm=N(2,(e,t)=>sj(e,Zr(Bx(Xo,t)))),Kse=e=>Dd(e,{differ:kse,fork:hh}),qP=cZ(_X),Wse=Kse(t1),T4=N(3,(e,t,n)=>Yse(e,t,{onSelfWin:(r,s)=>ue(r.await,i=>{switch(i._tag){case Xn:return ue(r.inheritAll,()=>n.onSelfDone(i,s));case Qn:return n.onSelfDone(i,s)}}),onOtherWin:(r,s)=>ue(r.await,i=>{switch(i._tag){case Xn:return ue(r.inheritAll,()=>n.onOtherDone(i,s));case Qn:return n.onOtherDone(i,s)}})})),Jse=N(2,(e,t)=>Hm(n=>T4(e,t,{onSelfDone:(r,s)=>sS(r,{onFailure:i=>F(om(s),RP(a=>jo(i,a))),onSuccess:i=>F(s,tm(n),Mr(i))}),onOtherDone:(r,s)=>sS(r,{onFailure:i=>F(om(s),RP(a=>jo(a,i))),onSuccess:i=>F(s,tm(n),Mr(i))})}))),Yse=N(3,(e,t,n)=>Et((r,s)=>{const i=s.runtimeFlags,a=Mm(!0),o=Ub(e,r,i,n.selfScope),c=Ub(t,r,i,n.otherScope);return yi(u=>{o.addObserver(()=>GP(o,c,n.onSelfWin,a,u)),c.addObserver(()=>GP(c,o,n.onOtherWin,a,u)),o.startFork(e),c.startFork(t)},fh(o.id(),c.id()))})),GP=(e,t,n,r,s)=>{GY(!0,!1)(r)&&s(n(e,t))},cm=N(2,(e,t)=>_i(n=>Us(n(e),{onFailure:r=>Us(t,{onFailure:s=>Mn(br(r,s)),onSuccess:()=>Mn(r)}),onSuccess:r=>Mr(t,r)}))),Qse=(e,t,n)=>Hm(r=>ue(ue(tI(bT(e)),s=>yi(i=>{const a=t.map(u=>u.listeners.count),o=()=>{a.every(u=>u===0)&&t.every(u=>u.result.state.current._tag==="Pending"?!0:!!(u.result.state.current._tag==="Done"&&F_(u.result.state.current.effect)&&u.result.state.current.effect._tag==="Failure"&&KM(u.result.state.current.effect.cause)))&&(c.forEach(u=>u()),n?.(),i(wT(s)))};s.addObserver(u=>{c.forEach(l=>l()),i(u)});const c=t.map((u,l)=>{const d=f=>{a[l]=f,o()};return u.listeners.addObserver(d),()=>u.listeners.removeObserver(d)});return o(),pe(()=>{c.forEach(u=>u())})})),()=>Ke(()=>{const s=t.flatMap(i=>i.state.completed?[]:[i]);return O_(s,i=>fse(i.request,IZ(r)))}))),Xse=Mo,I4=uu,xS=Bs,A4=ni,Zse=jo,eie=dY,tie=GM,Vb=KM,nie=S_,rie=cT,sie=YM,iie=gY,C4=_Z,aie=v_,Bd=j_,Xm=Rd,oie="effect/ScheduleInterval",Hb=Symbol.for(oie),P4={[Hb]:Hb,startMillis:0,endMillis:0},N4=(e,t)=>e>t?P4:{[Hb]:Hb,startMillis:e,endMillis:t},cie=N(2,(e,t)=>uie(e,t)===e),uie=N(2,(e,t)=>e.endMillis<=t.startMillis?e:t.endMillis<=e.startMillis?t:e.startMillis<t.startMillis?e:t.startMillis<e.startMillis?t:e.endMillis<=t.endMillis?e:t),lie=e=>e.startMillis>=e.endMillis,die=N(2,(e,t)=>{const n=Math.max(e.startMillis,t.startMillis),r=Math.min(e.endMillis,t.endMillis);return N4(n,r)}),fie=e=>N4(e,Number.POSITIVE_INFINITY),R4=P4,hie=cie,mie=lie,pie=die,gie=fie,bie="effect/ScheduleIntervals",KP=Symbol.for(bie),O4=e=>({[KP]:KP,intervals:e}),yie=N(2,(e,t)=>_ie(e.intervals,t.intervals,dr())),_ie=(e,t,n)=>{let r=e,s=t,i=n;for(;Fa(r)&&Fa(s);){const a=F(zi(r),pie(zi(s))),o=mie(a)?i:F(i,wr(a));F(zi(r),hie(zi(s)))?r=Ca(r):s=Ca(s),i=o}return O4(ja(i))},TS=e=>F(e.intervals,Yx,Kt(()=>R4)).startMillis,kie=e=>F(e.intervals,Yx,Kt(()=>R4)).endMillis,Eie=N(2,(e,t)=>TS(e)<TS(t)),wie=e=>Fa(e.intervals),Sie=O4,vie=yie,xie=TS,WP=kie,Tie=Eie,Iie=wie,rI="Continue",L4="Done",Aie=e=>({_tag:rI,intervals:e}),Cie=e=>({_tag:rI,intervals:Sie(An(e))}),Pie={_tag:L4},Nie=e=>e._tag===rI,Rie=e=>e._tag===L4,Oie=Aie,Lie=Cie,um=Pie,JP=Nie,qb=Rie,Die=Xo,Gb=Q6,$ie=Ab,Kb=nS,Mie=Qm,D4=Ia,$4=nI;class jie{permits;waiters=new Set;taken=0;constructor(t){this.permits=t}get free(){return this.permits-this.taken}take=t=>mo(n=>{if(this.free<t){const r=()=>{this.free<t||(this.waiters.delete(r),n(Ke(()=>this.free<t?this.take(t):(this.taken+=t,_e(t)))))};return this.waiters.add(r),pe(()=>{this.waiters.delete(r)})}n(Ke(()=>this.free<t?this.take(t):(this.taken+=t,_e(t))))});updateTakenUnsafe(t,n){return this.taken=n(this.taken),this.waiters.size>0&&t.getFiberRef(VT).scheduleTask(()=>{const r=this.waiters.values();let s=r.next();for(;s.done===!1&&this.free>0;)s.value(),s=r.next()},t.getFiberRef($d)),_e(this.free)}updateTaken(t){return Et(n=>this.updateTakenUnsafe(n,t))}resize=t=>Vs(Et(n=>(this.permits=t,this.free<0?Ot:this.updateTakenUnsafe(n,r=>r))));release=t=>this.updateTaken(n=>n-t);releaseAll=this.updateTaken(t=>0);withPermits=t=>n=>_i(r=>ue(r(this.take(t)),s=>cm(r(n),this.release(s))));withPermitsIfAvailable=t=>n=>_i(r=>Ke(()=>this.free<t?pne:(this.taken+=t,cm(r(ane(n)),this.release(t)))))}const sI=e=>new jie(e),Fie=e=>pe(()=>sI(e));class Bie extends Fd{isOpen;waiters=[];scheduled=!1;constructor(t){super(),this.isOpen=t}commit(){return this.await}unsafeSchedule(t){return this.scheduled||this.waiters.length===0||(this.scheduled=!0,t.currentScheduler.scheduleTask(this.flushWaiters,t.getFiberRef($d))),Ot}flushWaiters=()=>{this.scheduled=!1;const t=this.waiters;this.waiters=[];for(let n=0;n<t.length;n++)t[n](yr)};open=Et(t=>this.isOpen?Ot:(this.isOpen=!0,this.unsafeSchedule(t)));unsafeOpen(){this.isOpen||(this.isOpen=!0,this.flushWaiters())}release=Et(t=>this.isOpen?Ot:this.unsafeSchedule(t));await=mo(t=>this.isOpen?t(Ot):(this.waiters.push(t),pe(()=>{const n=this.waiters.indexOf(t);n!==-1&&this.waiters.splice(n,1)})));unsafeClose(){this.isOpen=!1}close=pe(()=>{this.isOpen=!1});whenOpen=t=>sn(this.await,t)}const zie=e=>new Bie(e??!1),Uie=N(2,(e,t)=>Et((n,r)=>{const s=t,i=E4(e,n,r.runtimeFlags,Y_);if(s.state._tag==="Open"){const a=()=>Hm(c=>je(c,i.id())?Ot:Vs(wT(i))),o={};s.state.finalizers.set(o,a),i.addObserver(()=>{s.state._tag!=="Closed"&&s.state.finalizers.delete(o)})}else i.unsafeInterruptAsFork(n.id());return _e(i)})),Vie="effect/Ref/SynchronizedRef",Hie=Symbol.for(Vie),qie={_A:e=>e};class Gie extends Fd{ref;withLock;[Hie]=qie;[Dj]=$j;[$b]=$b;constructor(t,n){super(),this.ref=t,this.withLock=n,this.get=Ki(this.ref)}get;commit(){return this.get}modify(t){return this.modifyEffect(n=>_e(t(n)))}modifyEffect(t){return this.withLock(F(ue(Ki(this.ref),t),ue(([n,r])=>Mr(zl(this.ref,r),n))))}}const Kie=e=>pe(()=>M4(e)),M4=e=>{const t=zT(e),n=sI(1);return new Gie(t,n.withPermits(1))},Wie=Symbol.for("effect/ManagedRuntime"),Jie="Fresh",Yie="FromEffect",Qie="Scoped",Xie="Suspend",Zie="Provide",j4="ProvideMerge",eae="MergeAll",F4=Bne,tae=Une,YP=zne,So=wT,iI=tm,QP=om,zd=e=>function(){if(arguments.length===1){const t=arguments[0];return(n,...r)=>e(t,n,...r)}return e.apply(this,arguments)},Zm=zd((e,t,n)=>{const r=o6(),s=[[ta,[[r,e.context]]]];n?.scheduler&&s.push([VT,[[r,n.scheduler]]]);let i=Kee(e.fiberRefs,{entries:s,forkAs:r});n?.updateRefs&&(i=n.updateRefs(i,r));const a=new y4(r,i,e.runtimeFlags);let o=t;n?.scope&&(o=ue(D4(n.scope,Wc),u=>sn(Q6(u,Hm(l=>je(l,a.id())?Ot:tm(a,l))),hu(t,l=>Kb(u,l)))));const c=a.currentSupervisor;return c!==t1&&(c.onStart(e.context,o,fe(),a),a.addObserver(u=>c.onEnd(u,a))),Y_.add(e.runtimeFlags,a),n?.immediate===!1?a.resume(o):a.start(o),a}),B4=zd((e,t,n={})=>{const r=Zm(e,t,n);return n.onExit&&r.addObserver(s=>{n.onExit(s)}),(s,i)=>B4(e)(F(r,iI(s??gs)),{...i,onExit:i?.onExit?a=>i.onExit(Ane(a)):void 0})}),z4=zd((e,t)=>{const n=aae(e)(t);if(n._tag==="Failure")throw U4(n.effect_instruction_i0);return n.effect_instruction_i0});class nae extends Error{fiber;_tag="AsyncFiberException";constructor(t){super(`Fiber #${t.id().id} cannot be resolved synchronously. This is caused by using runSync on an effect that performs async work`),this.fiber=t,this.name=this._tag,this.stack=this.message}}const rae=e=>{const t=Error.stackTraceLimit;Error.stackTraceLimit=0;const n=new nae(e);return Error.stackTraceLimit=t,n},I0=Symbol.for("effect/Runtime/FiberFailure"),Uf=Symbol.for("effect/Runtime/FiberFailure/Cause");class sae extends Error{[I0];[Uf];constructor(t){const n=XM(t)[0];super(n?.message||"An error has occurred"),this[I0]=I0,this[Uf]=t,this.name=n?`(FiberFailure) ${n.name}`:"FiberFailure",n?.stack&&(this.stack=n.stack)}toJSON(){return{_id:"FiberFailure",cause:this[Uf].toJSON()}}toString(){return"(FiberFailure) "+Rd(this[Uf],{renderErrorCause:!0})}[yt](){return this.toString()}}const U4=e=>{const t=Error.stackTraceLimit;Error.stackTraceLimit=0;const n=new sae(e);return Error.stackTraceLimit=t,n},iae=e=>Ne(e,I0),V4=e=>{const t=e;switch(t._op){case"Failure":case"Success":return t;case"Left":return nm(t.left);case"Right":return Rt(t.right);case"Some":return Rt(t.value);case"None":return nm(new j_)}},aae=zd((e,t)=>{const n=V4(t);if(n)return n;const r=new J_,s=Zm(e)(t,{scheduler:r});r.flush();const i=s.unsafePoll();return i||Z6(gT(rae(s),NT(s)))}),oae=zd((e,t,n)=>H4(e,t,n).then(r=>{switch(r._tag){case Xn:return r.effect_instruction_i0;case Qn:throw U4(r.effect_instruction_i0)}})),H4=zd((e,t,n)=>new Promise(r=>{const s=V4(t);s&&r(s);const i=Zm(e)(t);i.addObserver(a=>{r(a)}),n?.signal!==void 0&&(n.signal.aborted?i.unsafeInterruptAsFork(i.id()):n.signal.addEventListener("abort",()=>{i.unsafeInterruptAsFork(i.id())},{once:!0}))}));class q4{context;runtimeFlags;fiberRefs;constructor(t,n,r){this.context=t,this.runtimeFlags=n,this.fiberRefs=r}pipe(){return Se(this,arguments)}}const G4=e=>new q4(e.context,e.runtimeFlags,e.fiberRefs),cae=()=>Et((e,t)=>_e(new q4(e.getFiberRef(ta),t.runtimeFlags,e.getFiberRefs()))),uae=w6(Pu,k6,_6),gu=G4({context:gi(),runtimeFlags:uae,fiberRefs:Wee()}),lae=Zm(gu),dae=oae(gu),fae=H4(gu),hae=z4(gu),mae=N(2,(e,t)=>e.modifyEffect(t)),pae="effect/Layer",K4=Symbol.for(pae),gae={_RIn:e=>e,_E:e=>e,_ROut:e=>e},bu={[K4]:gae,pipe(){return Se(this,arguments)}},bae="effect/Layer/MemoMap",Uk=Symbol.for(bae),yae=Au()("effect/Layer/CurrentMemoMap",{defaultValue:()=>Eae()}),_ae=e=>Ne(e,K4),kae=e=>e._op_layer===Jie;class W4{ref;[Uk];constructor(t){this.ref=t,this[Uk]=Uk}getOrElseMemoize(t,n){return F(mae(this.ref,r=>{const s=r.get(t);if(s!==void 0){const[i,a]=s,o=F(i,ue(([c,u])=>F(Gj(c),Mr(u))),hu(B_({onFailure:()=>Ot,onSuccess:()=>Ab(n,a)})));return _e([o,r])}return F(Mb(0),ue(i=>F(U_(),ue(a=>F(Mb(()=>Ot),Ze(o=>{const c=_i(l=>F(nI(),ue(d=>F(l(ue(X4(t,d,!0),f=>one(f(this)))),wo,ue(f=>{switch(f._tag){case Qn:return F(nj(a,f.effect_instruction_i0),sn(nS(d,f)),sn(Mn(f.effect_instruction_i0)));case Xn:return F(zl(o,h=>F(nS(d,h),_T(Mj(i,m=>[m===1,m-1])),Vs)),sn(jb(i,h=>h+1)),sn(Ab(n,h=>F(pe(()=>r.delete(t)),sn(Ki(o)),ue(m=>m(h))))),sn(AT(a,f.effect_instruction_i0)),Mr(f.effect_instruction_i0[1]))}}))))),u=[F(Fo(a),hu(sS({onFailure:()=>Ot,onSuccess:()=>jb(i,l=>l+1)}))),l=>F(Ki(o),ue(d=>d(l)))];return[c,kae(t)?r:r.set(t,u)]}))))))}),R_)}}const J4=Ke(()=>Ze(Kie(new Map),e=>new W4(e))),Eae=()=>new W4(M4(new Map)),Y4=N(2,(e,t)=>ue(J4,n=>Q4(e,n,t))),Q4=N(3,(e,t,n)=>ue(X4(e,n),r=>Kj(r(t),yae,t))),X4=(e,t,n=!1)=>{const r=e;switch(r._op_layer){case"Locally":return pe(()=>s=>r.f(s.getOrElseMemoize(r.self,t)));case"ExtendScope":return pe(()=>s=>w4(i=>s.getOrElseMemoize(r.layer,i)));case"Fold":return pe(()=>s=>F(s.getOrElseMemoize(r.layer,t),Us({onFailure:i=>s.getOrElseMemoize(r.failureK(i),t),onSuccess:i=>s.getOrElseMemoize(r.successK(i),t)})));case"Fresh":return pe(()=>s=>F(r.layer,Y4(t)));case"FromEffect":return pe(n?()=>s=>r.effect:()=>s=>s.getOrElseMemoize(e,t));case"Provide":return pe(()=>s=>F(s.getOrElseMemoize(r.first,t),ue(i=>F(s.getOrElseMemoize(r.second,t),q_(i)))));case"Scoped":return pe(n?()=>s=>Qm(r.effect,t):()=>s=>s.getOrElseMemoize(e,t));case"Suspend":return pe(()=>s=>s.getOrElseMemoize(r.evaluate(),t));case"ProvideMerge":return pe(()=>s=>F(s.getOrElseMemoize(r.first,t),V6(s.getOrElseMemoize(r.second,t),r.zipK)));case"ZipWith":return z6(function*(){const s=yield*Ia(t,aS),i=yield*Ia(s,Wc),a=yield*Ia(s,Wc);return o=>F(o.getOrElseMemoize(r.first,i),Ym(o.getOrElseMemoize(r.second,a),r.zipK,{concurrent:!0}))});case"MergeAll":{const s=r.layers;return Ze(Ia(t,aS),i=>a=>{const o=new Array(s.length);return Ze(Wi(s,U6(function*(c,u){const l=yield*Ia(i,Wc),d=yield*a.getOrElseMemoize(c,l);o[u]=d}),!1,!1),()=>gW(...o))})}}},wae=()=>Z4(CT()),Sae=N(2,(e,t)=>{const n=sM(e),r=n?e:t;return Z4(Ze(n?t:e,i=>Bx(r,i)))});function Z4(e){const t=Object.create(bu);return t._op_layer=Yie,t.effect=e,t}const e5=(...e)=>{const t=Object.create(bu);return t._op_layer=eae,t.layers=e,t},vae=N(2,(e,t)=>{const n=sM(e),r=n?e:t;return xae(Ze(n?t:e,i=>Bx(r,i)))}),xae=e=>{const t=Object.create(bu);return t._op_layer=Qie,t.effect=e,t},Tae=e=>{const t=Object.create(bu);return t._op_layer=Xie,t.evaluate=e,t},t5=N(2,(e,t)=>Tae(()=>{const n=Object.create(bu);return n._op_layer=Zie,n.first=Object.create(bu,{_op_layer:{value:j4,enumerable:!0},first:{value:wae(),enumerable:!0},second:{value:Array.isArray(t)?e5(...t):t},zipK:{value:(r,s)=>F(r,Zr(s))}}),n.second=e,n})),Iae=N(2,(e,t)=>{const n=Object.create(bu);return n._op_layer=j4,n.first=t,n.second=t5(e,t),n.zipK=(r,s)=>F(r,Zr(s)),n}),XP=N(2,(e,t)=>S4(n=>ue(Y4(t,n),r=>PT(e,r)))),ZP=N(2,(e,t)=>{const n=sm(gu.fiberRefs,t.fiberRefs),r=Eo(gu.runtimeFlags,t.runtimeFlags);return _i(s=>Et(i=>{const a=i.getFiberRef(ta),o=i.getFiberRefs(),c=im(i.id(),o)(n),u=i.currentRuntimeFlags,l=jl(r)(u),d=sm(c,o),f=Eo(l,u);return i.setFiberRefs(c),i.currentRuntimeFlags=l,cm(PT(s(e),Zr(a,t.context)),Et(h=>(h.setFiberRefs(im(h.id(),h.getFiberRefs())(d)),h.currentRuntimeFlags=jl(f)(h.currentRuntimeFlags),Ot)))}))}),Aae=N(2,(e,t)=>Array.isArray(t)?XP(e,e5(...t)):_ae(t)?XP(e,t):pW(t)?PT(e,t):Wie in t?ue(t.runtimeEffect,n=>ZP(e,n)):ZP(e,t)),aI=(function(){const e=Symbol.for("effect/Data/Error/plainArgs");return{BaseEffectError:class extends vT{constructor(n){super(n?.message,n?.cause?{cause:n.cause}:void 0),n&&(Object.assign(this,n),Object.defineProperty(this,e,{value:n,enumerable:!1}))}toJSON(){return{...this[e],...this}}}}.BaseEffectError})(),ep=e=>{const t={BaseEffectError:class extends aI{_tag=e}};return t.BaseEffectError.prototype.name=e,t.BaseEffectError},Cae="effect/Schedule",n5=Symbol.for(Cae),Pae=e=>Ne(e,n5),Nae="effect/ScheduleDriver",Rae=Symbol.for(Nae),IS={start:0,now:0,input:void 0,output:void 0,elapsed:cd,elapsedSincePrevious:cd,recurrence:0},eN=Au()("effect/Schedule/CurrentIterationMetadata",{defaultValue:()=>IS}),Oae={_Out:e=>e,_In:e=>e,_R:e=>e},Lae={_Out:e=>e,_In:e=>e,_R:e=>e};class Dae{initial;step;[n5]=Oae;constructor(t,n){this.initial=t,this.step=n}pipe(){return Se(this,arguments)}}const tN=(e,t,n,r)=>jb(e,s=>s.recurrence===0?{now:t,input:n,output:r,recurrence:s.recurrence+1,elapsed:cd,elapsedSincePrevious:cd,start:t}:{now:t,input:n,output:r,recurrence:s.recurrence+1,elapsed:ud(t-s.start),elapsedSincePrevious:ud(t-s.now),start:s.start});class $ae{schedule;ref;[Rae]=Lae;constructor(t,n){this.schedule=t,this.ref=n}get state(){return Ze(Ki(this.ref),t=>t[1])}get last(){return ue(Ki(this.ref),([t,n])=>{switch(t._tag){case"None":return P_(()=>new j_);case"Some":return _e(t.value)}})}iterationMeta=zT(IS);get reset(){return zl(this.ref,[fe(),this.schedule.initial]).pipe($_(zl(this.iterationMeta,IS)))}next(t){return F(Ze(Ki(this.ref),n=>n[1]),ue(n=>F(ene,ue(r=>F(Ke(()=>this.schedule.step(r,t,n)),ue(([s,i,a])=>{const o=zl(this.ref,[ye(i),s]);if(qb(a))return o.pipe(sn(ln(fe())));const c=xie(a.intervals)-r;if(c<=0)return o.pipe(sn(tN(this.iterationMeta,r,t,i)),Mr(i));const u=ud(c);return F(o,sn(tN(this.iterationMeta,r,t,i)),sn(mne(u)),Mr(i))}))))))}}const tp=(e,t)=>new Dae(e,t),Mae=N(2,(e,t)=>oI(e,(n,r)=>pe(()=>t(n,r)))),oI=N(2,(e,t)=>tp(e.initial,(n,r,s)=>ue(e.step(n,r,s),([i,a,o])=>qb(o)?_e([i,a,um]):Ze(t(r,a),c=>c?[i,a,o]:[i,a,um])))),jae=e=>F(Mb([fe(),e.initial]),Ze(t=>new $ae(e,t))),Fae=N(2,(e,t)=>Bae(e,t,vie)),Bae=N(3,(e,t,n)=>tp([e.initial,t.initial],(r,s,i)=>F(V6(e.step(r,s,i[0]),t.step(r,s,i[1]),(a,o)=>[a,o]),ue(([[a,o,c],[u,l,d]])=>JP(c)&&JP(d)?AS(e,t,s,a,o,c.intervals,u,l,d.intervals,n):_e([[a,u],[o,l],um]))))),AS=(e,t,n,r,s,i,a,o,c,u)=>{const l=u(i,c);return Iie(l)?_e([[r,a],[s,o],Oie(l)]):F(i,Tie(c))?ue(e.step(WP(i),n,r),([d,f,h])=>qb(h)?_e([[d,a],[f,o],um]):AS(e,t,n,d,f,h.intervals,a,o,c,u)):ue(t.step(WP(c),n,a),([d,f,h])=>qb(h)?_e([[r,d],[s,f],um]):AS(e,t,n,r,s,i,d,f,h.intervals,u))},zae=N(2,(e,t)=>Uae(e,n=>pe(()=>t(n)))),Uae=N(2,(e,t)=>tp(e.initial,(n,r,s)=>ue(e.step(n,r,s),([i,a,o])=>Ze(t(a),c=>[i,c,o])))),Vae=e=>tp(e.initial,(t,n,r)=>F(e.step(t,n,r),Ze(([s,i,a])=>[s,n,a]))),Hae=e=>Wae(s5,t=>t<e),qae=(e,t)=>tp(e,(n,r,s)=>pe(()=>[t(s),s,Lie(gie(n))])),Gae=N(2,(e,t)=>oI(e,(n,r)=>dne(t(n)))),Kae=N(2,(e,t)=>oI(e,(n,r)=>t(n))),Wae=N(2,(e,t)=>Mae(e,(n,r)=>t(r))),A0=Symbol.for("effect/Schedule/ScheduleDefect");class Jae{error;[A0];constructor(t){this.error=t,this[A0]=A0}}const Yae=e=>Ne(e,A0),nN=e=>em(e,t=>po(new Jae(t))),Qae=e=>hn(uT(e,t=>GM(t)&&Yae(t.defect)?ye(t.defect):fe()),{onNone:()=>e,onSome:t=>uu(t.error)}),Xae=e=>O6(e,t=>Mn(Qae(t))),rN=N(2,(e,t)=>eoe(e,t,(n,r)=>ln(n))),Zae=N(2,(e,t)=>{if(Pae(t))return rN(e,t);const n=t.schedule??Vae(s5),r=t.while?Kae(n,a=>{const o=t.while(a);return typeof o=="boolean"?_e(o):nN(o)}):n,s=t.until?Gae(r,a=>{const o=t.until(a);return typeof o=="boolean"?_e(o):nN(o)}):r,i=t.times?Fae(s,Hae(t.times)).pipe(zae(a=>a[0])):s;return Xae(rN(e,i))}),eoe=N(3,(e,t,n)=>ue(jae(t),r=>Ba(e,{onFailure:s=>n(s,fe()),onSuccess:s=>r5(OP(e,eN,Ki(r.iterationMeta)),r,(i,a)=>OP(n(i,a),eN,Ki(r.iterationMeta)),s)}))),r5=(e,t,n,r)=>Ba(t.next(r),{onFailure:()=>HX(t.last),onSuccess:s=>Ba(e,{onFailure:i=>n(i,ye(s)),onSuccess:i=>r5(e,t,n,i)})}),s5=qae(0,e=>e+1),Ui=U_,Rr=Fo,toe=tj,noe=nj,CS=NZ,Ra=AT,roe=H_,sN=Symbol.for("effect/MutableList"),soe={[sN]:sN,[Symbol.iterator](){let e=!1,t=this.head;return{next(){if(e)return this.return();if(t==null)return e=!0,this.return();const n=t.value;return t=t.next,{done:e,value:n}},return(n){return e||(e=!0),{done:!0,value:n}}}},toString(){return Mt(this.toJSON())},toJSON(){return{_id:"MutableList",values:Array.from(this).map(Yt)}},[yt](){return this.toJSON()},pipe(){return Se(this,arguments)}},ioe=e=>({value:e,removed:!1,prev:void 0,next:void 0}),aoe=()=>{const e=Object.create(soe);return e.head=void 0,e.tail=void 0,e._length=0,e},i5=e=>cI(e)===0,cI=e=>e._length,ooe=N(2,(e,t)=>{const n=ioe(t);return e.head===void 0&&(e.head=n),e.tail===void 0||(e.tail.next=n,n.prev=e.tail),e.tail=n,e._length+=1,e}),coe=e=>{const t=e.head;if(t!==void 0)return uoe(e,t),t.value},uoe=(e,t)=>{t.removed||(t.removed=!0,t.prev!==void 0&&t.next!==void 0?(t.prev.next=t.next,t.next.prev=t.prev):t.prev!==void 0?(e.tail=t.prev,t.prev.next=void 0):t.next!==void 0?(e.head=t.next,t.next.prev=void 0):(e.tail=void 0,e.head=void 0),e._length>0&&(e._length-=1))},iN=Symbol.for("effect/MutableQueue"),qr=Symbol.for("effect/mutable/MutableQueue/Empty"),loe={[iN]:iN,[Symbol.iterator](){return Array.from(this.queue)[Symbol.iterator]()},toString(){return Mt(this.toJSON())},toJSON(){return{_id:"MutableQueue",values:Array.from(this).map(Yt)}},[yt](){return this.toJSON()},pipe(){return Se(this,arguments)}},a5=e=>{const t=Object.create(loe);return t.queue=aoe(),t.capacity=e,t},doe=e=>a5(e),uI=()=>a5(void 0),lI=e=>cI(e.queue),PS=e=>i5(e.queue),foe=e=>e.capacity===void 0?1/0:e.capacity,lm=N(2,(e,t)=>{const n=cI(e.queue);return e.capacity!==void 0&&n===e.capacity?!1:(ooe(t)(e.queue),!0)}),o5=N(2,(e,t)=>{const n=t[Symbol.iterator]();let r,s=dr(),i=!0;for(;i&&(r=n.next())&&!r.done;)i=lm(r.value)(e);for(;r!=null&&!r.done;)s=wr(r.value)(s),r=n.next();return ja(s)}),vo=N(2,(e,t)=>i5(e.queue)?t:coe(e.queue)),dI=N(2,(e,t)=>{let n=dr(),r=0;for(;r<t;){const s=vo(qr)(e);if(s===qr)break;n=wr(s)(n),r+=1}return ja(n)}),NS=fu,Zo=Ua,Vk=lne,hoe=_4,Ji=gd,RS=yi,Wb=Et,na=ln,ui=Mn,moe=L6,Ul=z6,Jc=JX,poe=hne,Dt=_e,dn=Ke,Ft=pe,bt=Ot,c5=em,fI=O6,goe=une,boe=Vj,yoe=yne,Vl=bne,wc=Ea,ri=bT,_oe=qm,Vf=Gm,Jb=_i,Hk=Mr,hI=Vs,At=Ze,mI=L_,Yb=Dse,koe=N6,vl=cm,n1=v4,Eoe=w4,OS=S4,woe=Hm,Soe=tI,Yc=Uie,u5=CT,l5=sj,dm=Aae,voe=Ene,Qu=fd,ur=wo,d5=j6,xoe=kne,Le=ue,ml=R_,qk=Jse,f5=T4,h5=yT,m5=gne,aN=Zae,Toe=Ld,Ioe=Hj,LS=$6,si=Us,Aoe=Ba,np=cae,Coe=sI,Poe=Fie,Noe=zie,r1=lae,Roe=dae,Ooe=fae,zs=hae,Qb=Use,pI=Vse,cr=Hse,s1=Ym,Loe=vne,Doe=xne,$oe=U6,i1=Zm,Moe=z4,joe=B4,a1=gu,gI=G4,Foe=Uf,Boe=iae,DS=Symbol.for("effect/FiberHandle"),zoe=e=>Ne(e,DS),Uoe={[DS]:DS,toString(){return Mt(this.toJSON())},toJSON(){return{_id:"FiberHandle",state:this.state}},[yt](){return this.toJSON()},pipe(){return Se(this,arguments)}},Voe=e=>{const t=Object.create(Uoe);return t.state={_tag:"Open",fiber:void 0},t.deferred=e,t},Hoe=()=>Yb(At(Ui(),e=>Voe(e)),e=>Wb(t=>{const n=e.state;return n._tag==="Closed"?bt:(e.state={_tag:"Closed"},n.fiber?d5(hI(iI(n.fiber,fh(t.id(),C0))),e.deferred):toe(e.deferred,GT))})),qoe=()=>Le(Hoe(),e=>Woe(e)()),p5=-1,C0=eQ(p5,0),Goe=aie(void 0,{emptyCase:La,failCase:La,dieCase:La,interruptCase:(e,t)=>UM(a6(t),p5),sequentialCase:(e,t,n)=>t||n,parallelCase:(e,t,n)=>t||n}),Koe=N(e=>zoe(e[0]),(e,t,n)=>{if(e.state._tag==="Closed"){t.unsafeInterruptAsFork(fh(n?.interruptAs??gs,C0));return}else if(e.state.fiber!==void 0){if(n?.onlyIfMissing===!0){t.unsafeInterruptAsFork(fh(n?.interruptAs??gs,C0));return}else if(e.state.fiber===t)return;e.state.fiber.unsafeInterruptAsFork(fh(n?.interruptAs??gs,C0)),e.state.fiber=void 0}e.state.fiber=t,t.addObserver(r=>{e.state._tag==="Open"&&t===e.state.fiber&&(e.state.fiber=void 0),HT(r)&&(n?.propagateInterruption===!0?!Goe(r.cause):!nie(r.cause))&&roe(e.deferred,r)})}),oN=(function(){let e;return()=>(e===void 0&&(e=r1(wc)),e)})(),Woe=e=>()=>At(np(),t=>{const n=i1(t);return(r,s)=>{if(e.state._tag==="Closed")return oN();if(e.state.fiber!==void 0&&s?.onlyIfMissing===!0)return oN();const i=n(r,s);return Koe(e,i,s),i}}),Joe=Sae,Yoe=vae,Qoe=t5,Gk=Iae,Xoe=J4,cN=Q4,bI=Fn,g5=ta,Zoe=J6,ece="effect/QueueEnqueue",tce=Symbol.for(ece),nce="effect/QueueDequeue",rce=Symbol.for(nce),sce="effect/QueueStrategy",b5=Symbol.for(sce),ice="effect/BackingQueue",ace=Symbol.for(ice),y5={_A:e=>e},oce={_A:e=>e},cce={_In:e=>e},uce={_Out:e=>e};class lce extends Fd{queue;takers;shutdownHook;shutdownFlag;strategy;[tce]=cce;[rce]=uce;constructor(t,n,r,s,i){super(),this.queue=t,this.takers=n,this.shutdownHook=r,this.shutdownFlag=s,this.strategy=i}pipe(){return Se(this,arguments)}commit(){return this.take}capacity(){return this.queue.capacity()}get size(){return Ke(()=>em(this.unsafeSize(),()=>Ea))}unsafeSize(){return Nn(this.shutdownFlag)?fe():ye(this.queue.length()-lI(this.takers)+this.strategy.surplusSize())}get isEmpty(){return Ze(this.size,t=>t<=0)}get isFull(){return Ze(this.size,t=>t>=this.capacity())}get shutdown(){return Gm(Et(t=>(F(this.shutdownFlag,jm(!0)),F(Wi(Hl(this.takers),n=>rj(n,t.id()),!1,!1),sn(this.strategy.shutdown),_T(AT(this.shutdownHook,void 0)),Vs))))}get isShutdown(){return pe(()=>Nn(this.shutdownFlag))}get awaitShutdown(){return Fo(this.shutdownHook)}isActive(){return!Nn(this.shutdownFlag)}unsafeOffer(t){if(Nn(this.shutdownFlag))return!1;let n;if(this.queue.length()===0){const s=F(this.takers,vo(qr));s!==qr?(Qc(s,t),n=!0):n=!1}else n=!1;if(n)return!0;const r=this.queue.offer(t);return xl(this.strategy,this.queue,this.takers),r}offer(t){return Ke(()=>{if(Nn(this.shutdownFlag))return Ea;let n;if(this.queue.length()===0){const s=F(this.takers,vo(qr));s!==qr?(Qc(s,t),n=!0):n=!1}else n=!1;if(n)return _e(!0);const r=this.queue.offer(t);return xl(this.strategy,this.queue,this.takers),r?_e(!0):this.strategy.handleSurplus([t],this.queue,this.takers,this.shutdownFlag)})}offerAll(t){return Ke(()=>{if(Nn(this.shutdownFlag))return Ea;const n=It(t),r=this.queue.length()===0?It(Tce(this.takers,n.length)):Do,[s,i]=F(n,SM(r.length));for(let o=0;o<r.length;o++){const c=r[o],u=s[o];Qc(c,u)}if(i.length===0)return _e(!0);const a=this.queue.offerAll(i);return xl(this.strategy,this.queue,this.takers),Jx(a)?_e(!0):this.strategy.handleSurplus(a,this.queue,this.takers,this.shutdownFlag)})}get take(){return Et(t=>{if(Nn(this.shutdownFlag))return Ea;const n=this.queue.poll(qr);if(n!==qr)return this.strategy.unsafeOnQueueEmptySpace(this.queue,this.takers),_e(n);{const r=z_(t.id());return F(Ke(()=>(F(this.takers,lm(r)),xl(this.strategy,this.queue,this.takers),Nn(this.shutdownFlag)?Ea:Fo(r))),qm(()=>pe(()=>Ice(this.takers,r))))}})}get takeAll(){return Ke(()=>Nn(this.shutdownFlag)?Ea:pe(()=>{const t=this.queue.pollUpTo(Number.POSITIVE_INFINITY);return this.strategy.unsafeOnQueueEmptySpace(this.queue,this.takers),td(t)}))}takeUpTo(t){return Ke(()=>Nn(this.shutdownFlag)?Ea:pe(()=>{const n=this.queue.pollUpTo(t);return this.strategy.unsafeOnQueueEmptySpace(this.queue,this.takers),td(n)}))}takeBetween(t,n){return Ke(()=>_5(this,t,n,dr()))}}const _5=(e,t,n,r)=>n<t?_e(r):F(kce(e,n),ue(s=>{const i=t-s.length;return i===1?F($S(e),Ze(a=>F(r,Sn(s),Fw(a)))):i>1?F($S(e),ue(a=>_5(e,i-1,n-s.length-1,F(r,Sn(s),Fw(a))))):_e(F(r,Sn(s)))})),dce=e=>F(pe(()=>doe(e)),ue(t=>k5(E5(t),wce()))),fce=()=>F(pe(()=>uI()),ue(e=>k5(E5(e),Sce()))),hce=(e,t,n,r,s)=>new lce(e,t,n,r,s),k5=(e,t)=>F(U_(),Ze(n=>hce(e,uI(),n,Mm(!1),t)));class mce{mutable;[ace]=oce;constructor(t){this.mutable=t}poll(t){return vo(this.mutable,t)}pollUpTo(t){return dI(this.mutable,t)}offerAll(t){return o5(this.mutable,t)}offer(t){return lm(this.mutable,t)}capacity(){return foe(this.mutable)}length(){return lI(this.mutable)}}const E5=e=>new mce(e),pce=e=>e.size,gce=e=>e.isShutdown,bce=e=>e.shutdown,yce=N(2,(e,t)=>e.offer(t)),_ce=N(2,(e,t)=>e.unsafeOffer(t)),$S=e=>e.take,kce=N(2,(e,t)=>e.takeUpTo(t)),Ece=N(3,(e,t,n)=>e.takeBetween(t,n)),wce=()=>new vce,Sce=()=>new xce;class vce{[b5]=y5;putters=uI();surplusSize(){return lI(this.putters)}onCompleteTakersWithEmptyQueue(t){for(;!PS(this.putters)&&!PS(t);){const n=vo(t,void 0),r=vo(this.putters,void 0);r[2]&&Qc(r[1],!0),Qc(n,r[0])}}get shutdown(){return F(N_,ue(t=>F(pe(()=>Hl(this.putters)),ue(n=>Wi(n,([r,s,i])=>i?F(rj(s,t),Vs):Ot,!1,!1)))))}handleSurplus(t,n,r,s){return Et(i=>{const a=z_(i.id());return F(Ke(()=>(this.unsafeOffer(t,a),this.unsafeOnQueueEmptySpace(n,r),xl(this,n,r),Nn(s)?Ea:Fo(a))),qm(()=>pe(()=>this.unsafeRemove(a))))})}unsafeOnQueueEmptySpace(t,n){let r=!0;for(;r&&(t.capacity()===Number.POSITIVE_INFINITY||t.length()<t.capacity());){const s=F(this.putters,vo(qr));if(s===qr)r=!1;else{const i=t.offer(s[0]);i&&s[2]?Qc(s[1],!0):i||Xb(this.putters,F(Hl(this.putters),wr(s))),xl(this,t,n)}}}unsafeOffer(t,n){const r=It(t);for(let s=0;s<r.length;s++){const i=r[s];s===r.length-1?F(this.putters,lm([i,n,!0])):F(this.putters,lm([i,n,!1]))}}unsafeRemove(t){Xb(this.putters,F(Hl(this.putters),Wx(([,n])=>n!==t)))}}class xce{[b5]=y5;surplusSize(){return 0}get shutdown(){return Ot}onCompleteTakersWithEmptyQueue(){}handleSurplus(t,n,r,s){return _e(!1)}unsafeOnQueueEmptySpace(t,n){}}const Qc=(e,t)=>H_(e,_e(t)),Xb=(e,t)=>F(e,o5(t)),Hl=e=>F(e,dI(Number.POSITIVE_INFINITY)),Tce=(e,t)=>F(e,dI(t)),Ice=(e,t)=>{Xb(e,F(Hl(e),Wx(n=>t!==n)))},xl=(e,t,n)=>{let r=!0;for(;r&&t.length()!==0;){const s=F(n,vo(qr));if(s!==qr){const i=t.poll(qr);i!==qr?(Qc(s,i),e.unsafeOnQueueEmptySpace(t,n)):Xb(n,F(Hl(n),wr(s))),r=!0}else r=!1}r&&t.length()===0&&!PS(n)&&e.onCompleteTakersWithEmptyQueue(n)},Ace=N(2,(e,t)=>e.publish(t)),Cce=Ace,w5=dce,Pce=fce,Nce=pce,Rce=gce,Zb=bce,Xu=yce,Oce=_ce,uN=$S,Lce=Ece,S5="Continue",Dce="Close",$ce="Yield",Mce="effect/ChannelChildExecutorDecision",lN=Symbol.for(Mce),jce={[lN]:lN},v5=e=>{const t=Object.create(jce);return t._tag=S5,t},P0="ContinuationK",Fce="ContinuationFinalizer",x5=Symbol.for("effect/ChannelContinuation"),T5={_Env:e=>e,_InErr:e=>e,_InElem:e=>e,_InDone:e=>e,_OutErr:e=>e,_OutDone:e=>e,_OutErr2:e=>e,_OutElem:e=>e,_OutDone2:e=>e};class I5{onSuccess;onHalt;_tag=P0;[x5]=T5;constructor(t,n){this.onSuccess=t,this.onHalt=n}onExit(t){return HT(t)?this.onHalt(t.cause):this.onSuccess(t.value)}}class Bce{finalizer;_tag=Fce;[x5]=T5;constructor(t){this.finalizer=t}}const A5="PullAfterNext",zce="PullAfterAllEnqueued",Uce="effect/ChannelUpstreamPullStrategy",Vce=Symbol.for(Uce),Hce={_A:e=>e},qce={[Vce]:Hce},C5=e=>{const t=Object.create(qce);return t._tag=A5,t.emitSeparator=e,t},P5="BracketOut",N5="Bridge",yI="ConcatAll",R5="Emit",O5="Ensuring",L5="Fail",D5="Fold",$5="FromEffect",M5="PipeTo",Gce="Provide",j5="Read",F5="Succeed",B5="SucceedNow",z5="Suspend",Kce="effect/Channel",U5=Symbol.for(Kce),Wce={_Env:e=>e,_InErr:e=>e,_InElem:e=>e,_InDone:e=>e,_OutErr:e=>e,_OutElem:e=>e,_OutDone:e=>e},ns={[U5]:Wce,pipe(){return Se(this,arguments)}},V5=e=>Ne(e,U5)||Zo(e),Jce=N(2,(e,t)=>{const n=Object.create(ns);return n._tag=P5,n.acquire=()=>e,n.finalizer=t,n}),H5=(e,t,n)=>{const r=Object.create(ns);return r._tag=yI,r.combineInners=t,r.combineAll=n,r.onPull=()=>C5(fe()),r.onEmit=()=>v5,r.value=()=>e,r.k=ze,r},Yce=N(4,(e,t,n,r)=>{const s=Object.create(ns);return s._tag=yI,s.combineInners=n,s.combineAll=r,s.onPull=()=>C5(fe()),s.onEmit=()=>v5,s.value=()=>e,s.k=t,s}),q5=N(2,(e,t)=>{const n=Object.create(ns);return n._tag=N5,n.input=t,n.channel=e,n}),Qce=N(2,(e,t)=>{const n=Object.create(ns);return n._tag=O5,n.channel=e,n.finalizer=t,n}),_I=e=>bs(I4(e)),bs=e=>Xce(()=>e),Xce=e=>{const t=Object.create(ns);return t._tag=L5,t.error=e,t},vn=N(2,(e,t)=>{const n=Object.create(ns);return n._tag=D5,n.channel=e,n.k=new I5(t,bs),n}),Cr=e=>{const t=Object.create(ns);return t._tag=$5,t.effect=()=>e,t},li=N(2,(e,t)=>{const n=Object.create(ns);return n._tag=M5,n.left=()=>e,n.right=()=>t,n}),G5=e=>Ud({onInput:e.onInput,onFailure:t=>Wr(sie(t),{onLeft:e.onFailure,onRight:bs}),onDone:e.onDone}),Ud=e=>{const t=Object.create(ns);return t._tag=j5,t.more=e.onInput,t.done=new I5(e.onDone,e.onFailure),t},K5=e=>EI(()=>e),fm=e=>{const t=Object.create(ns);return t._tag=B5,t.terminal=e,t},kI=e=>{const t=Object.create(ns);return t._tag=z5,t.channel=e,t},EI=e=>{const t=Object.create(ns);return t._tag=F5,t.evaluate=e,t},Va=fm(void 0),lr=e=>{const t=Object.create(ns);return t._tag=R5,t.out=e,t},rp="Done",sp="Emit",Vd="FromEffect",ip="Read",Zce=Symbol.for("effect/ChannelState"),eue={_E:e=>e,_R:e=>e},o1={[Zce]:eue},Zu=()=>{const e=Object.create(o1);return e._tag=rp,e},Kk=()=>{const e=Object.create(o1);return e._tag=sp,e},yf=e=>{const t=Object.create(o1);return t._tag=Vd,t.effect=e,t},Wk=(e,t,n,r)=>{const s=Object.create(o1);return s._tag=ip,s.upstream=e,s.onEffect=t,s.onEmit=n,s.onDone=r,s},ey=e=>e._tag===Vd,tue=e=>ey(e)?e.effect:bt,dN=e=>ey(e)?goe(e.effect):void 0,W5="PullFromChild",MS="PullFromUpstream",jS="DrainChildExecutors",J5="Emit";class Hp{childExecutor;parentSubexecutor;onEmit;_tag=W5;constructor(t,n,r){this.childExecutor=t,this.parentSubexecutor=n,this.onEmit=r}close(t){const n=this.childExecutor.close(t),r=this.parentSubexecutor.close(t);return n!==void 0&&r!==void 0?s1(ur(n),ur(r),(s,i)=>F(s,am(i))):n!==void 0?n:r!==void 0?r:void 0}enqueuePullFromChild(t){return this}}class Ic{upstreamExecutor;createChild;lastDone;activeChildExecutors;combineChildResults;combineWithChildResult;onPull;onEmit;_tag=MS;constructor(t,n,r,s,i,a,o,c){this.upstreamExecutor=t,this.createChild=n,this.lastDone=r,this.activeChildExecutors=s,this.combineChildResults=i,this.combineWithChildResult=a,this.onPull=o,this.onEmit=c}close(t){const n=this.upstreamExecutor.close(t),s=[...this.activeChildExecutors.map(i=>i!==void 0?i.childExecutor.close(t):void 0),n].reduce((i,a)=>i!==void 0&&a!==void 0?s1(i,ur(a),(o,c)=>am(o,c)):i!==void 0?i:a!==void 0?ur(a):void 0,void 0);return s}enqueuePullFromChild(t){return new Ic(this.upstreamExecutor,this.createChild,this.lastDone,[...this.activeChildExecutors,t],this.combineChildResults,this.combineWithChildResult,this.onPull,this.onEmit)}}class Tl{upstreamExecutor;lastDone;activeChildExecutors;upstreamDone;combineChildResults;combineWithChildResult;onPull;_tag=jS;constructor(t,n,r,s,i,a,o){this.upstreamExecutor=t,this.lastDone=n,this.activeChildExecutors=r,this.upstreamDone=s,this.combineChildResults=i,this.combineWithChildResult=a,this.onPull=o}close(t){const n=this.upstreamExecutor.close(t),s=[...this.activeChildExecutors.map(i=>i!==void 0?i.childExecutor.close(t):void 0),n].reduce((i,a)=>i!==void 0&&a!==void 0?s1(i,ur(a),(o,c)=>am(o,c)):i!==void 0?i:a!==void 0?ur(a):void 0,void 0);return s}enqueuePullFromChild(t){return new Tl(this.upstreamExecutor,this.lastDone,[...this.activeChildExecutors,t],this.upstreamDone,this.combineChildResults,this.combineWithChildResult,this.onPull)}}class Jk{value;next;_tag=J5;constructor(t,n){this.value=t,this.next=n}close(t){const n=this.next.close(t);return n}enqueuePullFromChild(t){return this}}const nue="Pulled",rue="NoUpstream",sue="effect/ChannelUpstreamPullRequest",iue=Symbol.for(sue),aue={_A:e=>e},Y5={[iue]:aue},fN=e=>{const t=Object.create(Y5);return t._tag=nue,t.value=e,t},oue=e=>{const t=Object.create(Y5);return t._tag=rue,t.activeDownstreamCount=e,t};class Dc{_activeSubexecutor=void 0;_cancelled=void 0;_closeLastSubstream=void 0;_currentChannel;_done=void 0;_doneStack=[];_emitted=void 0;_executeCloseLastSubstream;_input=void 0;_inProgressFinalizer=void 0;_providedEnv;constructor(t,n,r){this._currentChannel=t,this._executeCloseLastSubstream=r,this._providedEnv=n}run(){let t;for(;t===void 0;)if(this._cancelled!==void 0)t=this.processCancellation();else if(this._activeSubexecutor!==void 0)t=this.runSubexecutor();else try{if(this._currentChannel===void 0)t=Zu();else switch(Zo(this._currentChannel)&&(this._currentChannel=Cr(this._currentChannel)),this._currentChannel._tag){case P5:{t=this.runBracketOut(this._currentChannel);break}case N5:{const n=this._currentChannel.input;if(this._currentChannel=this._currentChannel.channel,this._input!==void 0){const r=this._input;this._input=void 0;const s=()=>Le(n.awaitRead(),()=>dn(()=>{const i=r.run();switch(i._tag){case rp:return Na(r.getDone(),{onFailure:a=>n.error(a),onSuccess:a=>n.done(a)});case sp:return Le(n.emit(r.getEmit()),()=>s());case Vd:return si(i.effect,{onFailure:a=>n.error(a),onSuccess:()=>s()});case ip:return wI(i,()=>s(),a=>n.error(a))}}));t=yf(Le(Soe(ri(s())),i=>Ft(()=>this.addFinalizer(a=>Le(So(i),()=>dn(()=>{const o=this.restorePipe(a,r);return o!==void 0?o:bt}))))))}break}case yI:{const n=new Dc(this._currentChannel.value(),this._providedEnv,s=>Ft(()=>{const i=this._closeLastSubstream===void 0?bt:this._closeLastSubstream;this._closeLastSubstream=F(i,cr(s))}));n._input=this._input;const r=this._currentChannel;this._activeSubexecutor=new Ic(n,s=>r.k(s),void 0,[],(s,i)=>r.combineInners(s,i),(s,i)=>r.combineAll(s,i),s=>r.onPull(s),s=>r.onEmit(s)),this._closeLastSubstream=void 0,this._currentChannel=void 0;break}case R5:{this._emitted=this._currentChannel.out,this._currentChannel=this._activeSubexecutor!==void 0?void 0:Va,t=Kk();break}case O5:{this.runEnsuring(this._currentChannel);break}case L5:{t=this.doneHalt(this._currentChannel.error());break}case D5:{this._doneStack.push(this._currentChannel.k),this._currentChannel=this._currentChannel.channel;break}case $5:{const n=this._providedEnv===void 0?this._currentChannel.effect():F(this._currentChannel.effect(),dm(this._providedEnv));t=yf(si(n,{onFailure:r=>{const s=this.doneHalt(r);return s!==void 0&&ey(s)?s.effect:bt},onSuccess:r=>{const s=this.doneSucceed(r);return s!==void 0&&ey(s)?s.effect:bt}}));break}case M5:{const n=this._input,r=new Dc(this._currentChannel.left(),this._providedEnv,s=>this._executeCloseLastSubstream(s));r._input=n,this._input=r,this.addFinalizer(s=>{const i=this.restorePipe(s,n);return i!==void 0?i:bt}),this._currentChannel=this._currentChannel.right();break}case Gce:{const n=this._providedEnv;this._providedEnv=this._currentChannel.context(),this._currentChannel=this._currentChannel.inner,this.addFinalizer(()=>Ft(()=>{this._providedEnv=n}));break}case j5:{const n=this._currentChannel;t=Wk(this._input,ze,r=>{try{this._currentChannel=n.more(r)}catch(s){this._currentChannel=n.done.onExit(Ine(s))}},r=>{const s=i=>n.done.onExit(i);this._currentChannel=s(r)});break}case F5:{t=this.doneSucceed(this._currentChannel.evaluate());break}case B5:{t=this.doneSucceed(this._currentChannel.terminal);break}case z5:{this._currentChannel=this._currentChannel.channel();break}}}catch(n){this._currentChannel=bs(xS(n))}return t}getDone(){return this._done}getEmit(){return this._emitted}cancelWith(t){this._cancelled=t}clearInProgressFinalizer(){this._inProgressFinalizer=void 0}storeInProgressFinalizer(t){this._inProgressFinalizer=t}popAllFinalizers(t){const n=[];let r=this._doneStack.pop();for(;r;)r._tag==="ContinuationFinalizer"&&n.push(r.finalizer),r=this._doneStack.pop();const s=n.length===0?bt:Qk(n,t);return this.storeInProgressFinalizer(s),s}popNextFinalizers(){const t=[];for(;this._doneStack.length!==0;){const n=this._doneStack[this._doneStack.length-1];if(n._tag===P0)return t;t.push(n),this._doneStack.pop()}return t}restorePipe(t,n){const r=this._input;return this._input=n,r!==void 0?r.close(t):bt}close(t){let n;const r=this._inProgressFinalizer;r!==void 0&&(n=F(r,vl(Ft(()=>this.clearInProgressFinalizer()))));let s;const i=this.popAllFinalizers(t);i!==void 0&&(s=F(i,vl(Ft(()=>this.clearInProgressFinalizer()))));const a=this._activeSubexecutor===void 0?void 0:this._activeSubexecutor.close(t);if(!(a===void 0&&n===void 0&&s===void 0))return F(ur(Yk(a)),Qb(ur(Yk(n))),Qb(ur(Yk(s))),At(([[o,c],u])=>F(o,am(c),am(u))),Vf,Le(o=>dn(()=>o)))}doneSucceed(t){if(this._doneStack.length===0)return this._done=fs(t),this._currentChannel=void 0,Zu();const n=this._doneStack[this._doneStack.length-1];if(n._tag===P0){this._doneStack.pop(),this._currentChannel=n.onSuccess(t);return}const r=this.popNextFinalizers();if(this._doneStack.length===0)return this._doneStack=r.reverse(),this._done=fs(t),this._currentChannel=void 0,Zu();const s=Qk(r.map(a=>a.finalizer),fs(t));this.storeInProgressFinalizer(s);const i=F(s,vl(Ft(()=>this.clearInProgressFinalizer())),Vf,Le(()=>Ft(()=>this.doneSucceed(t))));return yf(i)}doneHalt(t){if(this._doneStack.length===0)return this._done=_r(t),this._currentChannel=void 0,Zu();const n=this._doneStack[this._doneStack.length-1];if(n._tag===P0){this._doneStack.pop();try{this._currentChannel=n.onHalt(t)}catch(a){this._currentChannel=bs(xS(a))}return}const r=this.popNextFinalizers();if(this._doneStack.length===0)return this._doneStack=r.reverse(),this._done=_r(t),this._currentChannel=void 0,Zu();const s=Qk(r.map(a=>a.finalizer),_r(t));this.storeInProgressFinalizer(s);const i=F(s,vl(Ft(()=>this.clearInProgressFinalizer())),Vf,Le(()=>Ft(()=>this.doneHalt(t))));return yf(i)}processCancellation(){return this._currentChannel=void 0,this._done=this._cancelled,this._cancelled=void 0,Zu()}runBracketOut(t){const n=Vf(si(this.provide(t.acquire()),{onFailure:r=>Ft(()=>{this._currentChannel=bs(r)}),onSuccess:r=>Ft(()=>{this.addFinalizer(s=>this.provide(t.finalizer(r,s))),this._currentChannel=lr(r)})}));return yf(n)}provide(t){return this._providedEnv===void 0?t:F(t,dm(this._providedEnv))}runEnsuring(t){this.addFinalizer(t.finalizer),this._currentChannel=t.channel}addFinalizer(t){this._doneStack.push(new Bce(t))}runSubexecutor(){const t=this._activeSubexecutor;switch(t._tag){case W5:return this.pullFromChild(t.childExecutor,t.parentSubexecutor,t.onEmit,t);case MS:return this.pullFromUpstream(t);case jS:return this.drainChildExecutors(t);case J5:return this._emitted=t.value,this._activeSubexecutor=t.next,Kk()}}replaceSubexecutor(t){this._currentChannel=void 0,this._activeSubexecutor=t}finishWithExit(t){const n=Na(t,{onFailure:r=>this.doneHalt(r),onSuccess:r=>this.doneSucceed(r)});return this._activeSubexecutor=void 0,n===void 0?bt:tue(n)}finishSubexecutorWithCloseEffect(t,...n){this.addFinalizer(()=>F(n,Ji(s=>F(Ft(()=>s(t)),Le(i=>i!==void 0?i:bt)),{discard:!0})));const r=F(t,Na({onFailure:s=>this.doneHalt(s),onSuccess:s=>this.doneSucceed(s)}));return this._activeSubexecutor=void 0,r}applyUpstreamPullStrategy(t,n,r){switch(r._tag){case A5:{const s=!t||n.some(i=>i!==void 0);return[r.emitSeparator,s?[void 0,...n]:n]}case zce:{const s=!t||n.some(i=>i!==void 0);return[r.emitSeparator,s?[...n,void 0]:n]}}}pullFromChild(t,n,r,s){return Wk(t,ze,i=>{const a=r(i);switch(a._tag){case S5:break;case Dce:{this.finishWithDoneValue(t,n,a.value);break}case $ce:{const o=n.enqueuePullFromChild(s);this.replaceSubexecutor(o);break}}this._activeSubexecutor=new Jk(i,this._activeSubexecutor)},Na({onFailure:i=>{const a=this.handleSubexecutorFailure(t,n,i);return a===void 0?void 0:dN(a)},onSuccess:i=>{this.finishWithDoneValue(t,n,i)}}))}finishWithDoneValue(t,n,r){const s=n;switch(s._tag){case MS:{const i=new Ic(s.upstreamExecutor,s.createChild,s.lastDone!==void 0?s.combineChildResults(s.lastDone,r):r,s.activeChildExecutors,s.combineChildResults,s.combineWithChildResult,s.onPull,s.onEmit);this._closeLastSubstream=t.close(fs(r)),this.replaceSubexecutor(i);break}case jS:{const i=new Tl(s.upstreamExecutor,s.lastDone!==void 0?s.combineChildResults(s.lastDone,r):r,s.activeChildExecutors,s.upstreamDone,s.combineChildResults,s.combineWithChildResult,s.onPull);this._closeLastSubstream=t.close(fs(r)),this.replaceSubexecutor(i);break}}}handleSubexecutorFailure(t,n,r){return this.finishSubexecutorWithCloseEffect(_r(r),s=>n.close(s),s=>t.close(s))}pullFromUpstream(t){if(t.activeChildExecutors.length===0)return this.performPullFromUpstream(t);const n=t.activeChildExecutors[0],r=new Ic(t.upstreamExecutor,t.createChild,t.lastDone,t.activeChildExecutors.slice(1),t.combineChildResults,t.combineWithChildResult,t.onPull,t.onEmit);if(n===void 0)return this.performPullFromUpstream(r);this.replaceSubexecutor(new Hp(n.childExecutor,r,n.onEmit))}performPullFromUpstream(t){return Wk(t.upstreamExecutor,n=>{const r=this._closeLastSubstream===void 0?bt:this._closeLastSubstream;return this._closeLastSubstream=void 0,F(this._executeCloseLastSubstream(r),cr(n))},n=>{if(this._closeLastSubstream!==void 0){const a=this._closeLastSubstream;return this._closeLastSubstream=void 0,F(this._executeCloseLastSubstream(a),At(()=>{const o=new Dc(t.createChild(n),this._providedEnv,this._executeCloseLastSubstream);o._input=this._input;const[c,u]=this.applyUpstreamPullStrategy(!1,t.activeChildExecutors,t.onPull(fN(n)));this._activeSubexecutor=new Hp(o,new Ic(t.upstreamExecutor,t.createChild,t.lastDone,u,t.combineChildResults,t.combineWithChildResult,t.onPull,t.onEmit),t.onEmit),mt(c)&&(this._activeSubexecutor=new Jk(c.value,this._activeSubexecutor))}))}const r=new Dc(t.createChild(n),this._providedEnv,this._executeCloseLastSubstream);r._input=this._input;const[s,i]=this.applyUpstreamPullStrategy(!1,t.activeChildExecutors,t.onPull(fN(n)));this._activeSubexecutor=new Hp(r,new Ic(t.upstreamExecutor,t.createChild,t.lastDone,i,t.combineChildResults,t.combineWithChildResult,t.onPull,t.onEmit),t.onEmit),mt(s)&&(this._activeSubexecutor=new Jk(s.value,this._activeSubexecutor))},n=>{if(t.activeChildExecutors.some(i=>i!==void 0)){const i=new Tl(t.upstreamExecutor,t.lastDone,[void 0,...t.activeChildExecutors],t.upstreamExecutor.getDone(),t.combineChildResults,t.combineWithChildResult,t.onPull);if(this._closeLastSubstream!==void 0){const a=this._closeLastSubstream;return this._closeLastSubstream=void 0,F(this._executeCloseLastSubstream(a),At(()=>this.replaceSubexecutor(i)))}this.replaceSubexecutor(i);return}const r=this._closeLastSubstream,s=this.finishSubexecutorWithCloseEffect(F(n,Cne(i=>t.combineWithChildResult(t.lastDone,i))),()=>r,i=>t.upstreamExecutor.close(i));return s===void 0?void 0:dN(s)})}drainChildExecutors(t){if(t.activeChildExecutors.length===0){const i=this._closeLastSubstream;return i!==void 0&&this.addFinalizer(()=>Dt(i)),this.finishSubexecutorWithCloseEffect(t.upstreamDone,()=>i,a=>t.upstreamExecutor.close(a))}const n=t.activeChildExecutors[0],r=t.activeChildExecutors.slice(1);if(n===void 0){const[i,a]=this.applyUpstreamPullStrategy(!0,r,t.onPull(oue(r.reduce((o,c)=>c!==void 0?o+1:o,0))));return this.replaceSubexecutor(new Tl(t.upstreamExecutor,t.lastDone,a,t.upstreamDone,t.combineChildResults,t.combineWithChildResult,t.onPull)),mt(i)?(this._emitted=i.value,Kk()):void 0}const s=new Tl(t.upstreamExecutor,t.lastDone,r,t.upstreamDone,t.combineChildResults,t.combineWithChildResult,t.onPull);this.replaceSubexecutor(new Hp(n.childExecutor,s,n.onEmit))}}const Yk=e=>e!==void 0?e:bt,Qk=(e,t)=>F(Ji(e,n=>ur(n(t))),At(n=>F(Tne(n),Kt(()=>GT))),Le(n=>dn(()=>n))),wI=(e,t,n)=>{const r=[e],s=()=>{const i=r.pop();if(i===void 0||i.upstream===void 0)return moe("Unexpected end of input for channel execution");const a=i.upstream.run();switch(a._tag){case sp:{const o=i.onEmit(i.upstream.getEmit());return r.length===0?o===void 0?dn(t):F(o,si({onFailure:n,onSuccess:t})):o===void 0?dn(()=>s()):F(o,si({onFailure:n,onSuccess:()=>s()}))}case rp:{const o=i.onDone(i.upstream.getDone());return r.length===0?o===void 0?dn(t):F(o,si({onFailure:n,onSuccess:t})):o===void 0?dn(()=>s()):F(o,si({onFailure:n,onSuccess:()=>s()}))}case Vd:return r.push(i),F(i.onEffect(a.effect),fI(o=>dn(()=>{const c=i.onDone(_r(o));return c===void 0?bt:c})),si({onFailure:n,onSuccess:()=>s()}));case ip:return r.push(i),r.push(a),dn(()=>s())}};return s()},cue=N(2,(e,t)=>{const n=(r,s,i)=>koe(Ft(()=>new Dc(e,void 0,ze)),a=>dn(()=>N0(a.run(),a).pipe(d5(r),cr(Rr(r)),pI(Rr(s)))),(a,o)=>{const c=a.close(o);return c===void 0?bt:m5(c,u=>Gb(i,ui(u)))});return Jb(r=>hoe([D4(t,Nb),Ui(),Ui()]).pipe(Le(([s,i,a])=>r(n(i,a,s)).pipe(Yc(t),Le(o=>t.addFinalizer(c=>{const u=HT(c)?rie(c.cause):void 0;return CS(i).pipe(Le(l=>l?Ra(a,void 0).pipe(cr(F4(o)),cr(YP(o))):Ra(a,void 0).pipe(cr(u&&oT(u)>0?iI(o,ZY(u)):So(o)),cr(YP(o)))))}).pipe(cr(r(Rr(i)))))))))}),N0=(e,t)=>{const n=e;switch(n._tag){case Vd:return F(n.effect,Le(()=>N0(t.run(),t)));case sp:return N0(t.run(),t);case rp:return dn(()=>t.getDone());case ip:return wI(n,()=>N0(t.run(),t),ui)}},uue="Done",lue="Await",due="effect/ChannelMergeDecision",fue=Symbol.for(due),hue={[fue]:{_R:e=>e,_E0:e=>e,_Z0:e=>e,_E:e=>e,_Z:e=>e}},hN=e=>{const t=Object.create(hue);return t._tag=lue,t.f=e,t},Q5="BothRunning",X5="LeftDone",Z5="RightDone",mue="effect/ChannelMergeState",mN=Symbol.for(mue),SI={[mN]:mN},Xk=(e,t)=>{const n=Object.create(SI);return n._tag=Q5,n.left=e,n.right=t,n},pN=e=>{const t=Object.create(SI);return t._tag=X5,t.f=e,t},gN=e=>{const t=Object.create(SI);return t._tag=Z5,t.f=e,t},eF="BackPressure",tF="BufferSliding",pue="effect/ChannelMergeStrategy",bN=Symbol.for(pue),nF={[bN]:bN},gue=e=>{const t=Object.create(nF);return t._tag=eF,t},bue=e=>{const t=Object.create(nF);return t._tag=tF,t},yue=N(2,(e,{onBackPressure:t,onBufferSliding:n})=>{switch(e._tag){case eF:return t();case tF:return n()}}),pl="Empty",Hf="Emit",qf="Error",Gf="Done",rF=e=>({_tag:pl,notifyProducer:e}),Zk=e=>({_tag:Hf,notifyConsumers:e}),_ue=e=>({_tag:qf,cause:e}),kue=e=>({_tag:Gf,done:e});class Eue{ref;constructor(t){this.ref=t}awaitRead(){return ml(mf(this.ref,t=>t._tag===pl?[Rr(t.notifyProducer),t]:[bt,t]))}get close(){return woe(t=>this.error(A4(t)))}done(t){return ml(mf(this.ref,n=>{switch(n._tag){case pl:return[Rr(n.notifyProducer),n];case Hf:return[Ji(n.notifyConsumers,r=>Ra(r,Be(t)),{discard:!0}),kue(t)];case qf:return[wc,n];case Gf:return[wc,n]}}))}emit(t){return Le(Ui(),n=>ml(mf(this.ref,r=>{switch(r._tag){case pl:return[Rr(r.notifyProducer),r];case Hf:{const s=r.notifyConsumers[0],i=r.notifyConsumers.slice(1);if(s!==void 0)return[Ra(s,He(t)),i.length===0?rF(n):Zk(i)];throw new Error("Bug: Channel.SingleProducerAsyncInput.emit - Queue was empty! please report an issue at https://github.com/Effect-TS/effect/issues")}case qf:return[wc,r];case Gf:return[wc,r]}})))}error(t){return ml(mf(this.ref,n=>{switch(n._tag){case pl:return[Rr(n.notifyProducer),n];case Hf:return[Ji(n.notifyConsumers,r=>noe(r,t),{discard:!0}),_ue(t)];case qf:return[wc,n];case Gf:return[wc,n]}}))}get take(){return this.takeWith(t=>_r(iie(t,Be)),t=>fs(t),t=>Fb(He(t)))}takeWith(t,n,r){return Le(Ui(),s=>ml(mf(this.ref,i=>{switch(i._tag){case pl:return[cr(Ra(i.notifyProducer,void 0),LS(Rr(s),{onFailure:t,onSuccess:Wr({onLeft:r,onRight:n})})),Zk([s])];case Hf:return[LS(Rr(s),{onFailure:t,onSuccess:Wr({onLeft:r,onRight:n})}),Zk([...i.notifyConsumers,s])];case qf:return[Dt(t(i.cause)),i];case Gf:return[Dt(r(i.done)),i]}})))}}const sF=()=>F(Ui(),Le(e=>UT(rF(e))),At(e=>new Eue(e))),FS=N(2,(e,t)=>Yce(e,t,()=>{},()=>{})),wue=e=>{const t=Ud({onInput:()=>t,onFailure:bs,onDone:K5});return li(e,t)},iF=N(2,(e,t)=>Qce(e,()=>t)),Sue=e=>vn(e,ze),vI=e=>xo(e.takeWith(bs,t=>vn(lr(t),()=>vI(e)),K5)),aF=N(2,(e,t)=>vn(e,n=>EI(()=>t(n)))),oF=N(2,(e,t)=>{const n=G5({onInput:r=>vn(lr(t(r)),()=>n),onFailure:_I,onDone:fm});return li(e,n)}),vue=e=>t=>xue(e)(t,Xl),xue=({bufferSize:e=16,concurrency:t,mergeStrategy:n=gue()})=>(r,s)=>dF(i=>Ul(function*(){const a=t==="unbounded"?Number.MAX_SAFE_INTEGER:t,o=yield*sF(),c=vI(o),u=yield*w5(e);yield*Gb(i,Zb(u));const l=yield*Pce();yield*Gb(i,Zb(l));const d=yield*UT(fe()),f=yield*Ui(),h=(yield*Poe(a)).withPermits,m=yield*ql(li(c,r),i);function y(p){return p.pipe(Le(Wr({onLeft:_=>Dt(ye(_)),onRight:_=>Hk(Xu(u,Dt(He(_))),fe())})),aN({until:_=>mt(_)}),Le(_=>Qte(d,hn({onNone:()=>ye(_.value),onSome:k=>ye(s(k,_.value))}))),fI(_=>Vb(_)?ui(_):Xu(u,ui(_)).pipe(cr(Ra(f,void 0)),hI)))}yield*m.pipe(si({onFailure:p=>Xu(u,ui(p)).pipe(cr(Dt(!1))),onSuccess:Wr({onLeft:p=>f5(ri(Rr(f)),ri(h(a)(bt)),{onSelfDone:(_,k)=>Hk(So(k),!1),onOtherDone:(_,k)=>cr(So(k),Wte(d).pipe(Le(hn({onNone:()=>Xu(u,Dt(Be(p))),onSome:v=>Xu(u,Dt(Be(s(v,p))))})),Hk(!1)))}),onRight:p=>yue(n,{onBackPressure:()=>Ul(function*(){const _=yield*Ui(),k=OS(w=>ql(li(c,p),w).pipe(Le(S=>qk(ur(y(S)),ur(ri(Rr(f))))),Le(ze)));return yield*Ra(_,void 0).pipe(cr(k),h(1),Yc(i)),yield*Rr(_),!(yield*CS(f))}),onBufferSliding:()=>Ul(function*(){const _=yield*Ui(),k=yield*Ui(),v=yield*Nce(l);yield*uN(l).pipe(Le(T=>Ra(T,void 0)),xoe(()=>v>=a)),yield*Xu(l,_);const w=OS(T=>ql(li(c,p),T).pipe(Le(I=>ur(y(I)).pipe(qk(ur(ri(Rr(f)))),qk(ur(ri(Rr(_)))))),Le(ze)));return yield*Ra(k,void 0).pipe(cr(w),h(1),Yc(i)),yield*Rr(k),!(yield*CS(f))})})})}),aN({while:p=>p}),Yc(i));const g=F(uN(u),ml,LS({onFailure:bs,onSuccess:Wr({onLeft:fm,onRight:p=>vn(lr(p),()=>g)})}),xo);return q5(g,o)})),cF=N(3,(e,t,n)=>vue(n)(oF(e,t))),Tue=N(2,(e,t)=>{function n(r){return Ul(function*(){const s=yield*sF(),i=vI(s),a=yield*ql(li(i,e),r),o=yield*ql(li(i,t.other),r);function c(l,d,f){return(h,m,y)=>{function g(p){const _=p;return _._tag===uue?Dt(Cr(cr(So(d),_.effect))):At(F4(d),Na({onFailure:k=>Cr(_.f(_r(k))),onSuccess:Wr({onLeft:k=>Cr(_.f(fs(k))),onRight:k=>xI(lr(k),u(y(_.f)))})}))}return Na(l,{onFailure:p=>g(h(_r(p))),onSuccess:Wr({onLeft:p=>g(h(fs(p))),onRight:p=>Dt(vn(lr(p),()=>vn(Cr(Yc(ri(f),r)),_=>u(m(_,d)))))})})}}function u(l){switch(l._tag){case Q5:{const d=ri(QP(l.left)),f=ri(QP(l.right));return xo(f5(d,f,{onSelfDone:(h,m)=>cr(So(m),c(h,l.right,a)(t.onSelfDone,Xk,y=>pN(y))),onOtherDone:(h,m)=>cr(So(m),c(h,l.left,o)(t.onOtherDone,(y,g)=>Xk(g,y),y=>gN(y)))}))}case X5:return xo(At(ur(o),Na({onFailure:d=>Cr(l.f(_r(d))),onSuccess:Wr({onLeft:d=>Cr(l.f(fs(d))),onRight:d=>vn(lr(d),()=>u(pN(l.f)))})})));case Z5:return xo(At(ur(a),Na({onFailure:d=>Cr(l.f(_r(d))),onSuccess:Wr({onLeft:d=>Cr(l.f(fs(d))),onRight:d=>vn(lr(d),()=>u(gN(l.f)))})})))}}return Cr(Wb(l=>{const d=Wb(m=>(m.transferChildren(l.scope()),bt)),f=ri(a).pipe(vl(d),Yc(r)),h=ri(o).pipe(vl(d),Yc(r));return s1(f,h,(m,y)=>Xk(m,y))})).pipe(vn(u),q5(s))})}return dF(n)}),Iue=N(2,(e,t)=>kI(()=>{let n;const r=G5({onInput:i=>vn(lr(i),()=>r),onFailure:i=>(n=Oue(i),bs(xS(n))),onDone:fm}),s=Ud({onInput:i=>F(lr(i),vn(()=>s)),onFailure:i=>tie(i)&&Lue(i.defect)&&je(i.defect,n)?_I(i.defect.error):bs(i),onDone:fm});return li(li(li(e,r),t),s)})),Aue=e=>OS(t=>cue(e,t)),uF=e=>Aue(wue(e)),lF=e=>xo(Jb(t=>At($4(),n=>Jce(m5(t(Mie(e,n)),r=>Kb(n,_r(r))),(r,s)=>Kb(n,s))))),Cue=e=>Nue(At(n1,t=>vn(Cr(e(t)),lr))),Pue=e=>Le(n1,t=>ql(e,t)),ql=N(2,(e,t)=>Qb(Ft(()=>new Dc(e,void 0,ze)),np()).pipe(h5(([n,r])=>$ie(t,s=>{const i=n.close(s);return i!==void 0?dm(i,r):bt})),Vf,At(([n])=>dn(()=>BS(n.run(),n))))),BS=(e,t)=>{const n=e;switch(n._tag){case rp:return Na(t.getDone(),{onFailure:ui,onSuccess:r=>Dt(Be(r))});case sp:return Dt(He(t.getEmit()));case Vd:return F(n.effect,Le(()=>BS(t.run(),t)));case ip:return wI(n,()=>BS(t.run(),t),r=>ui(r))}},xo=e=>Sue(Cr(e)),Nue=e=>H5(lF(e),(t,n)=>t,(t,n)=>t),dF=e=>H5(Cue(e),(t,n)=>t,(t,n)=>t),fF=e=>hF(0,e.length,e),hF=(e,t,n)=>e===t?Va:F(lr(F(n,ko(e))),vn(()=>hF(e+1,t,n))),Rue=N(e=>V5(e[1]),(e,t,n)=>n?.concurrent?Tue(e,{other:t,onSelfDone:r=>hN(s=>dn(()=>LP(r,s))),onOtherDone:r=>hN(s=>dn(()=>LP(s,r)))}):vn(e,r=>aF(t,s=>[r,s]))),xI=N(e=>V5(e[1]),(e,t,n)=>n?.concurrent?aF(Rue(e,t,{concurrent:!0}),r=>r[1]):vn(e,()=>t)),zS=Symbol.for("effect/Channel/ChannelException"),Oue=e=>({_tag:"ChannelException",[zS]:zS,error:e}),Lue=e=>Ne(e,zS),Due=Symbol.for("effect/Sink"),$ue={_A:e=>e,_In:e=>e,_L:e=>e,_E:e=>e,_R:e=>e};class TI{channel;[Due]=$ue;constructor(t){this.channel=t}pipe(){return Se(this,arguments)}}const Mue=e=>{const t=Ud({onInput:n=>F(Cr(Ji(n,r=>e(r),{discard:!0})),vn(()=>t)),onFailure:bs,onDone:()=>Va});return new TI(t)},jue=e=>{const t=Ud({onInput:n=>F(Cr(e(n)),vn(()=>t)),onFailure:bs,onDone:()=>Va});return new TI(t)},Fue=e=>new TI(Cr(e)),mF=e=>Zo(e)?mF(Fue(e)):e.channel,Bue=()=>na(fe()),zue=e=>mI(ui(e),ye),Uue="effect/Stream",II=Symbol.for(Uue),Vue={_R:e=>e,_E:e=>e,_A:e=>e};class ki{channel;[II]=Vue;constructor(t){this.channel=t}pipe(){return Se(this,arguments)}}const c1=e=>Ne(e,II)||Zo(e),Hue=4096,pF=N(2,(e,t)=>new ki(F($s(e),iF(t)))),que=e=>yF(na(ye(e))),Gue=e=>bF(ui(e)),Kue=N(2,(e,t)=>Zue(e,Wx(t))),gF=N(e=>c1(e[0]),(e,t,n)=>{const r=n?.bufferSize??16;return n?.switch?yN(n?.concurrency,()=>_N(e,1,r,t),s=>_N(e,s,r,t)):yN(n?.concurrency,()=>new ki(FS($s(e),s=>F(s,TJ(i=>$s(t(i))),AJ(Va,(i,a)=>F(i,xI(a)))))),s=>new ki(F($s(e),FS(fF),cF(i=>$s(t(i)),n))))}),yN=(e,t,n)=>{switch(e){case void 0:return t();case"unbounded":return n(Number.MAX_SAFE_INTEGER);default:return e>1?n(e):t()}},_N=N(4,(e,t,n,r)=>new ki(F($s(e),FS(fF),cF(s=>$s(r(s)),{concurrency:t,mergeStrategy:bue(),bufferSize:n})))),Wue=N(e=>c1(e[0]),(e,t)=>gF(e,ze,t)),Jue=e=>new ki(e),$s=e=>{if("channel"in e)return e.channel;if(Zo(e))return $s(bF(e));throw new TypeError("Expected a Stream.")},Yue=e=>new ki(Jx(e)?Va:lr(e)),bF=e=>F(e,mI(ye),yF),yF=e=>new ki(xo(Ioe(e,{onFailure:hn({onNone:()=>Va,onSome:_I}),onSuccess:t=>lr(An(t))}))),Que=(e,t)=>F(Lce(e,1,t?.maxChunkSize??Hue),fI(n=>F(Rce(e),Le(r=>r&&Vb(n)?Bue():zue(n)))),_F,t?.shutdown?pF(Zb(e)):ze),Xue=(...e)=>{const t=e.length===1?e[0].evaluate:e[0],n=e.length===1?e[0].onError:e[1],r=e.length===1?e[0].releaseLockOnEnd===!0:!1;return wF(At(Yb(Ft(()=>t().getReader()),s=>r?Ft(()=>s.releaseLock()):poe(()=>s.cancel())),s=>ele(Le(Vl({try:()=>s.read(),catch:i=>ye(n(i))}),({done:i,value:a})=>i?na(fe()):Dt(a)))))},Zue=N(2,(e,t)=>new ki(F($s(e),oF(t)))),_F=e=>ole(e,t=>F(At(t,n=>ye([n,t])),c5(hn({onNone:()=>Dt(fe()),onSome:na})))),ele=e=>_F(F(e,At(An))),kF=N(2,(e,t)=>$s(e).pipe(Iue(mF(t)),uF)),tle=N(2,(e,t)=>kF(e,Mue(t))),nle=N(2,(e,t)=>kF(e,jue(t))),rle=e=>new ki(iF(lF(F(e,At(An))),bt)),sle=e=>Yue(An(e)),EF=e=>new ki(kI(()=>$s(e()))),ile=N(e=>c1(e[0]),(e,t)=>At(np(),n=>ale(e,n,t))),ale=N(e=>c1(e[0]),(e,t,n)=>{const r=i1(t);let s,i;const a=Noe(!1);return new ReadableStream({start(o){i=r(nle(e,c=>c.length===0?bt:a.whenOpen(Ft(()=>{a.unsafeClose();for(const u of c)o.enqueue(u);s(),s=void 0})))),i.addObserver(c=>{try{c._tag==="Failure"?o.error(C4(c.cause)):o.close()}catch{}})},pull(){return new Promise(o=>{s=o,zs(a.open)})},cancel(){if(i)return Roe(hI(So(i)))}},n?.strategy)}),ole=(e,t)=>EF(()=>{const n=r=>xo(At(t(r),hn({onNone:()=>Va,onSome:([s,i])=>vn(lr(s),()=>n(i))})));return new ki(n(e))}),wF=e=>Wue(rle(e)),kN=Symbol.for("effect/Mailbox"),EN=Symbol.for("effect/Mailbox/ReadonlyMailbox"),Ac=dr(),wN=Rt(Ac),qp=Rt(!1),Gp=Rt(!0),SN=[Ac,!0];class cle extends Fd{scheduler;capacity;strategy;[kN]=kN;[EN]=EN;state={_tag:"Open",takers:new Set,offers:new Set,awaiters:new Set};messages=[];messagesChunk=dr();constructor(t,n,r){super(),this.scheduler=t,this.capacity=n,this.strategy=r}offer(t){return Ke(()=>{if(this.state._tag!=="Open")return qp;if(this.messages.length+this.messagesChunk.length>=this.capacity)switch(this.strategy){case"dropping":return qp;case"suspend":return this.capacity<=0&&this.state.takers.size>0?(this.messages.push(t),this.releaseTaker(),Gp):this.offerRemainingSingle(t);case"sliding":return this.unsafeTake(),this.messages.push(t),Gp}return this.messages.push(t),this.scheduleReleaseTaker(),Gp})}unsafeOffer(t){return this.state._tag!=="Open"?!1:this.messages.length+this.messagesChunk.length>=this.capacity?this.strategy==="sliding"?(this.unsafeTake(),this.messages.push(t),!0):this.capacity<=0&&this.state.takers.size>0?(this.messages.push(t),this.releaseTaker(),!0):!1:(this.messages.push(t),this.scheduleReleaseTaker(),!0)}offerAll(t){return Ke(()=>{if(this.state._tag!=="Open")return _e(td(t));const n=this.unsafeOfferAllArray(t);return n.length===0?wN:this.strategy==="dropping"?_e(Ar(n)):this.offerRemainingArray(n)})}unsafeOfferAll(t){return Ar(this.unsafeOfferAllArray(t))}unsafeOfferAllArray(t){if(this.state._tag!=="Open")return It(t);if(this.capacity===Number.POSITIVE_INFINITY||this.strategy==="sliding")return this.messages.length>0&&(this.messagesChunk=Sn(this.messagesChunk,Ar(this.messages))),this.strategy==="sliding"?this.messagesChunk=this.messagesChunk.pipe(Sn(td(t)),IJ(this.capacity)):Kx(t)?this.messagesChunk=Sn(this.messagesChunk,t):this.messages=It(t),this.scheduleReleaseTaker(),[];const n=this.capacity<=0?this.state.takers.size:this.capacity-this.messages.length-this.messagesChunk.length;if(n===0)return It(t);const r=[];let s=0;for(const i of t)s<n?this.messages.push(i):r.push(i),s++;return this.scheduleReleaseTaker(),r}fail(t){return this.done(nm(t))}failCause(t){return this.done(Nt(t))}unsafeDone(t){return this.state._tag!=="Open"?!1:this.state.offers.size===0&&this.messages.length===0&&this.messagesChunk.length===0?(this.finalize(t),!0):(this.state={...this.state,_tag:"Closing",exit:t},!0)}shutdown=pe(()=>{if(this.state._tag==="Done")return!0;this.messages=[],this.messagesChunk=Ac;const t=this.state.offers;if(this.finalize(this.state._tag==="Open"?yr:this.state.exit),t.size>0){for(const n of t)n._tag==="Single"?n.resume(qp):n.resume(Rt(Ar(n.remaining.slice(n.offset))));t.clear()}return!0});done(t){return pe(()=>this.unsafeDone(t))}end=this.done(yr);clear=Ke(()=>{if(this.state._tag==="Done")return S0(this.state.exit,Ac);const t=this.unsafeTakeAll();return this.releaseCapacity(),_e(t)});takeAll=Ke(()=>{if(this.state._tag==="Done")return S0(this.state.exit,SN);const t=this.unsafeTakeAll();return t.length===0?sn(this.awaitTake,this.takeAll):_e([t,this.releaseCapacity()])});takeN(t){return Ke(()=>{if(this.state._tag==="Done")return S0(this.state.exit,SN);if(t<=0)return _e([Ac,!1]);t=Math.min(t,this.capacity);let n;if(t<=this.messagesChunk.length)n=kb(this.messagesChunk,t),this.messagesChunk=ho(this.messagesChunk,t);else if(t<=this.messages.length+this.messagesChunk.length)this.messagesChunk=Sn(this.messagesChunk,Ar(this.messages)),this.messages=[],n=kb(this.messagesChunk,t),this.messagesChunk=ho(this.messagesChunk,t);else return sn(this.awaitTake,this.takeN(t));return _e([n,this.releaseCapacity()])})}unsafeTake(){if(this.state._tag==="Done")return ej(this.state.exit,nm(new Bd));let t;if(this.messagesChunk.length>0)t=Qx(this.messagesChunk),this.messagesChunk=ho(this.messagesChunk,1);else if(this.messages.length>0)t=this.messages[0],this.messagesChunk=ho(Ar(this.messages),1),this.messages=[];else return this.capacity<=0&&this.state.offers.size>0?(this.capacity=1,this.releaseCapacity(),this.capacity=0,this.messages.length>0?Rt(this.messages.pop()):void 0):void 0;return this.releaseCapacity(),Rt(t)}take=Ke(()=>this.unsafeTake()??sn(this.awaitTake,this.take));await=mo(t=>this.state._tag==="Done"?t(this.state.exit):(this.state.awaiters.add(t),pe(()=>{this.state._tag!=="Done"&&this.state.awaiters.delete(t)})));unsafeSize(){const t=this.messages.length+this.messagesChunk.length;return this.state._tag==="Done"?fe():ye(t)}size=pe(()=>this.unsafeSize());commit(){return this.takeAll}pipe(){return Se(this,arguments)}toJSON(){return{_id:"effect/Mailbox",state:this.state._tag,size:this.unsafeSize().toJSON()}}toString(){return Mt(this)}[yt](){return Mt(this)}offerRemainingSingle(t){return mo(n=>{if(this.state._tag!=="Open")return n(qp);const r={_tag:"Single",message:t,resume:n};return this.state.offers.add(r),pe(()=>{this.state._tag==="Open"&&this.state.offers.delete(r)})})}offerRemainingArray(t){return mo(n=>{if(this.state._tag!=="Open")return n(Rt(Ar(t)));const r={_tag:"Array",remaining:t,offset:0,resume:n};return this.state.offers.add(r),pe(()=>{this.state._tag==="Open"&&this.state.offers.delete(r)})})}releaseCapacity(){if(this.state._tag==="Done")return this.state.exit._tag==="Success";if(this.state.offers.size===0)return this.state._tag==="Closing"&&this.messages.length===0&&this.messagesChunk.length===0?(this.finalize(this.state.exit),this.state.exit._tag==="Success"):!1;let t=this.capacity-this.messages.length-this.messagesChunk.length;for(const n of this.state.offers){if(t===0)return!1;if(n._tag==="Single")this.messages.push(n.message),t--,n.resume(Gp),this.state.offers.delete(n);else{for(;n.offset<n.remaining.length;n.offset++){if(t===0)return!1;this.messages.push(n.remaining[n.offset]),t--}n.resume(wN),this.state.offers.delete(n)}}return!1}awaitTake=mo(t=>this.state._tag==="Done"?t(this.state.exit):(this.state.takers.add(t),pe(()=>{this.state._tag!=="Done"&&this.state.takers.delete(t)})));scheduleRunning=!1;scheduleReleaseTaker(){this.scheduleRunning||(this.scheduleRunning=!0,this.scheduler.scheduleTask(this.releaseTaker,0))}releaseTaker=()=>{if(this.scheduleRunning=!1,this.state._tag!=="Done"&&this.state.takers.size!==0){for(const t of this.state.takers)if(this.state.takers.delete(t),t(yr),this.messages.length+this.messagesChunk.length===0)break}};unsafeTakeAll(){if(this.messagesChunk.length>0){const t=this.messages.length>0?Sn(this.messagesChunk,Ar(this.messages)):this.messagesChunk;return this.messagesChunk=Ac,this.messages=[],t}else if(this.messages.length>0){const t=Ar(this.messages);return this.messages=[],t}else if(this.state._tag!=="Done"&&this.state.offers.size>0)return this.capacity=1,this.releaseCapacity(),this.capacity=0,An(this.messages.pop());return Ac}finalize(t){if(this.state._tag==="Done")return;const n=this.state;this.state={_tag:"Done",exit:t};for(const r of n.takers)r(t);n.takers.clear();for(const r of n.awaiters)r(t);n.awaiters.clear()}}const ule=e=>Et(t=>_e(new cle(t.currentScheduler,typeof e=="number"?e:e?.capacity??Number.POSITIVE_INFINITY,typeof e=="number"?"suspend":e?.strategy??"suspend"))),lle=e=>{const t=vn(e.takeAll,([n,r])=>r?n.length===0?Va:lr(n):xI(lr(n),t));return t},dle=e=>Jue(lle(e)),fle=ule,hle=dle,eE=II,SF=pF,mle=que,ple=Gue,gle=Kue,ble=gF,vF=$s,yle=Que,_le=Xue,kle=tle,Ele=sle,wle=EF,Sle=ile,xF=wF;class ap extends Fr("@effect/experimental/Reactivity")(){}const vle=Ft(()=>{const e=new Map,t=o=>{if(Array.isArray(o))for(let c=0;c<o.length;c++){const u=e.get(US(o[c]));if(u!==void 0)for(const l of u)l()}else{const c=o;for(const u in c){const l=TF(u,c[u]);for(let f=0;f<l.length;f++){const h=e.get(l[f]);if(h!==void 0)for(const m of h)m()}const d=e.get(u);if(d!==void 0)for(const f of d)f()}}},n=o=>Ft(()=>t(o)),r=(o,c)=>pI(c,n(o)),s=(o,c)=>{const u=Array.isArray(o)?o.map(US):Ile(o);for(let l=0;l<u.length;l++){let d=e.get(u[l]);d===void 0&&(d=new Set,e.set(u[l],d)),d.add(c)}return()=>{for(let l=0;l<u.length;l++){const d=e.get(u[l]);d.delete(c),d.size===0&&e.delete(u[l])}}},i=(o,c)=>Ul(function*(){const u=yield*n1,l=yield*fle(),d=yield*qoe();let f=!1,h=!1;const m=p=>{p._tag==="Failure"?l.unsafeDone(_r(p.cause)):l.unsafeOffer(p.value),h?(h=!1,d(c).addObserver(m)):f=!1};function y(){if(f){h=!0;return}f=!0,d(c).addObserver(m)}const g=s(o,y);return yield*Gb(u,Ft(g)),y(),l}),a=(o,c)=>i(o,c).pipe(At(hle),xF);return ap.of({mutation:r,query:i,stream:a,unsafeInvalidate:t,invalidate:n,unsafeRegister:s})}),xle=N(2,(e,t)=>Le(ap,n=>n.mutation(t,e))),Tle=e=>Le(ap,t=>t.invalidate(e)),tE=Yoe(ap,vle);function US(e){return typeof e=="string"?e:Ce(e)}const TF=(e,t)=>{const n=new Array(t.length);for(let r=0;r<t.length;r++)n[r]=`${e}:${US(t[r])}`;return n},Ile=e=>{const t=[];for(const n in e){t.push(n);for(const r of TF(n,e[n]))t.push(r)}return t},Ale=e=>{try{return e.trim()===""?fe():ye(BigInt(e))}catch{return fe()}},IF="effect/Redacted",R0=$e("effect/Redacted/redactedRegistry",()=>new WeakMap),AF=Symbol.for(IF),Cle={[AF]:{_A:e=>e},pipe(){return Se(this,arguments)},toString(){return"<redacted>"},toJSON(){return"<redacted>"},[yt](){return"<redacted>"},[We](){return F(Ce(IF),ut(Ce(R0.get(this))),qt(this))},[Je](e){return Ple(e)&&je(R0.get(this),R0.get(e))}},Ple=e=>Ne(e,AF),Nle=e=>{const t=Object.create(Cle);return R0.set(t,e),t},CF=(e,t)=>{switch(t._tag){case"StringKeyword":case"TemplateLiteral":return Object.keys(e);case"SymbolKeyword":return Object.getOwnPropertySymbols(e);case"Refinement":return CF(e,t.from)}},PF=e=>{let t=!1,n;return()=>(t||(n=e(),t=!0),n)},AI=e=>Array.isArray(e),Rle=e=>!Array.isArray(e),vN=e=>`[${Lm(e)}]`,NF=e=>AI(e)?e.map(vN).join(""):vN(e),Ss=(e,t,n,r)=>{let s=e;return n&&Qt(n)&&(s+=`
25
- at path: ${NF(n)}`),t!==void 0&&(s+=`
26
- details: ${t}`),r&&(s+=`
27
- schema (${r._tag}): ${r}`),s},Ole=e=>Ss("Invalid Argument",e),Lle=(e,t,n)=>Ss("Unsupported schema",e,t,n),RF=(e,t,n)=>Ss("Missing annotation",e,t,n),xN=(e,t)=>RF('Generating a JSON Schema for this schema requires a "jsonSchema" annotation',e,t),Dle=(e,t)=>RF('Generating a JSON Schema for this schema requires an "identifier" annotation',e,t),$le=e=>Ss("Generating a JSON Schema for post-rest elements is not currently supported. You're welcome to contribute by submitting a Pull Request",void 0,e),Mle=(e,t)=>Ss("Unsupported key",`Cannot encode ${Lm(e)} key to JSON Schema`,t),OF=(e,t,n)=>Ss("Unsupported schema or overlapping types",`cannot extend ${e} with ${t}`,n),ty=e=>Lle(void 0,void 0,e),jle=e=>Ss("Unsupported key schema",void 0,void 0,e),Fle=e=>Ss("Unsupported literal",`literal value: ${za(e)}`),TN=e=>Ss("Duplicate index signature",`${e} index signature`),Ble=Ss("Unsupported index signature parameter","An index signature parameter type must be `string`, `symbol`, a template literal type or a refinement of the previous types"),zle=Ss("Invalid element","A required element cannot follow an optional element. ts(1257)"),IN=e=>Ss("Duplicate property signature transformation",`Duplicate key ${za(e)}`),LF=e=>Ss("Duplicate property signature",`Duplicate key ${za(e)}`),Ule=Symbol.for("effect/SchemaId/DateFromSelf"),Vle=Symbol.for("effect/SchemaId/GreaterThanOrEqualTo"),Hle=Symbol.for("effect/SchemaId/LessThanOrEqualTo"),DF=Symbol.for("effect/SchemaId/Int"),qle=Symbol.for("effect/SchemaId/GreaterThanOrEqualToBigint"),Gle=Symbol.for("effect/SchemaId/LessThanOrEqualToBigint"),Kle=Symbol.for("effect/SchemaId/MinLength"),Wle=Symbol.for("effect/SchemaId/MaxLength"),Jle=Symbol.for("effect/SchemaId/Length"),Yle=Symbol.for("effect/SchemaId/ItemsCount"),Qle=Symbol.for("effect/annotation/TypeConstructor"),$F=Symbol.for("effect/annotation/Brand"),CI=Symbol.for("effect/annotation/SchemaId"),MF=Symbol.for("effect/annotation/Message"),PI=Symbol.for("effect/annotation/MissingMessage"),Hd=Symbol.for("effect/annotation/Identifier"),Br=Symbol.for("effect/annotation/Title"),Gl=Symbol.for("effect/annotation/AutoTitle"),ra=Symbol.for("effect/annotation/Description"),NI=Symbol.for("effect/annotation/Examples"),RI=Symbol.for("effect/annotation/Default"),OI=Symbol.for("effect/annotation/JSONSchema"),jF=Symbol.for("effect/annotation/Arbitrary"),FF=Symbol.for("effect/annotation/Pretty"),BF=Symbol.for("effect/annotation/Equivalence"),Xle=Symbol.for("effect/annotation/Documentation"),zF=Symbol.for("effect/annotation/Concurrency"),UF=Symbol.for("effect/annotation/Batching"),VF=Symbol.for("effect/annotation/ParseIssueTitle"),HF=Symbol.for("effect/annotation/ParseOptions"),qF=Symbol.for("effect/annotation/DecodingFallback"),ny=Symbol.for("effect/annotation/Surrogate"),GF=Symbol.for("effect/annotation/StableFilter"),Zn=N(2,(e,t)=>Object.prototype.hasOwnProperty.call(e.annotations,t)?ye(e.annotations[t]):fe()),KF=Zn($F),Zle=Zn(MF),ede=Zn(PI),LI=Zn(Br),WF=Zn(Gl),op=Zn(Hd),DI=Zn(ra),tde=Zn(NI),nde=Zn(RI),JF=Zn(OI),rde=Zn(zF),sde=Zn(UF),ide=Zn(VF),ade=Zn(HF),ode=Zn(qF),qd=Zn(ny),cde=Zn(GF),ude=e=>HW(cde(e),t=>t===!0),YF=Symbol.for("effect/annotation/JSONIdentifier"),lde=Zn(YF),QF=e=>Gi(lde(e),()=>op(e)),XF=Symbol.for("effect/schema/ParseJson");class u1{typeParameters;decodeUnknown;encodeUnknown;annotations;_tag="Declaration";constructor(t,n,r,s={}){this.typeParameters=t,this.decodeUnknown=n,this.encodeUnknown=r,this.annotations=s}toString(){return Kt(Xi(this),()=>"<declaration schema>")}toJSON(){return{_tag:this._tag,typeParameters:this.typeParameters.map(t=>t.toJSON()),annotations:en(this.annotations)}}}const vs=e=>t=>t._tag===e,dde=vs("Declaration");let ry=class{literal;annotations;_tag="Literal";constructor(t,n={}){this.literal=t,this.annotations=n}toString(){return Kt(Xi(this),()=>za(this.literal))}toJSON(){return{_tag:this._tag,literal:o_(this.literal)?String(this.literal):this.literal,annotations:en(this.annotations)}}};const mh=vs("Literal"),fde=new ry(null);class hde{symbol;annotations;_tag="UniqueSymbol";constructor(t,n={}){this.symbol=t,this.annotations=n}toString(){return Kt(Xi(this),()=>za(this.symbol))}toJSON(){return{_tag:this._tag,symbol:String(this.symbol),annotations:en(this.annotations)}}}class mde{annotations;_tag="UndefinedKeyword";constructor(t={}){this.annotations=t}toString(){return Si(this)}toJSON(){return{_tag:this._tag,annotations:en(this.annotations)}}}const hm=new mde({[Br]:"undefined"});class pde{annotations;_tag="VoidKeyword";constructor(t={}){this.annotations=t}toString(){return Si(this)}toJSON(){return{_tag:this._tag,annotations:en(this.annotations)}}}const gde=new pde({[Br]:"void"}),bde=vs("VoidKeyword");class yde{annotations;_tag="NeverKeyword";constructor(t={}){this.annotations=t}toString(){return Si(this)}toJSON(){return{_tag:this._tag,annotations:en(this.annotations)}}}const cp=new yde({[Br]:"never"}),ZF=vs("NeverKeyword");class _de{annotations;_tag="UnknownKeyword";constructor(t={}){this.annotations=t}toString(){return Si(this)}toJSON(){return{_tag:this._tag,annotations:en(this.annotations)}}}const eB=new _de({[Br]:"unknown"});class kde{annotations;_tag="AnyKeyword";constructor(t={}){this.annotations=t}toString(){return Si(this)}toJSON(){return{_tag:this._tag,annotations:en(this.annotations)}}}const tB=new kde({[Br]:"any"});class Ede{annotations;_tag="StringKeyword";constructor(t={}){this.annotations=t}toString(){return Si(this)}toJSON(){return{_tag:this._tag,annotations:en(this.annotations)}}}const sy=new Ede({[Br]:"string",[ra]:"a string"}),VS=vs("StringKeyword");class wde{annotations;_tag="NumberKeyword";constructor(t={}){this.annotations=t}toString(){return Si(this)}toJSON(){return{_tag:this._tag,annotations:en(this.annotations)}}}const iy=new wde({[Br]:"number",[ra]:"a number"}),AN=vs("NumberKeyword");class Sde{annotations;_tag="BooleanKeyword";constructor(t={}){this.annotations=t}toString(){return Si(this)}toJSON(){return{_tag:this._tag,annotations:en(this.annotations)}}}const ay=new Sde({[Br]:"boolean",[ra]:"a boolean"}),CN=vs("BooleanKeyword");class vde{annotations;_tag="BigIntKeyword";constructor(t={}){this.annotations=t}toString(){return Si(this)}toJSON(){return{_tag:this._tag,annotations:en(this.annotations)}}}const xde=new vde({[Br]:"bigint",[ra]:"a bigint"});class Tde{annotations;_tag="SymbolKeyword";constructor(t={}){this.annotations=t}toString(){return Si(this)}toJSON(){return{_tag:this._tag,annotations:en(this.annotations)}}}const Ide=new Tde({[Br]:"symbol",[ra]:"a symbol"}),nB=vs("SymbolKeyword");class Ade{annotations;_tag="ObjectKeyword";constructor(t={}){this.annotations=t}toString(){return Si(this)}toJSON(){return{_tag:this._tag,annotations:en(this.annotations)}}}const Cde=new Ade({[Br]:"object",[ra]:"an object in the TypeScript meaning, i.e. the `object` type"});let up=class{type;annotations;constructor(t,n={}){this.type=t,this.annotations=n}toJSON(){return{type:this.type.toJSON(),annotations:en(this.annotations)}}toString(){return String(this.type)}};class Ru extends up{isOptional;constructor(t,n,r={}){super(t,r),this.isOptional=n}toJSON(){return{type:this.type.toJSON(),isOptional:this.isOptional,annotations:en(this.annotations)}}toString(){return String(this.type)+(this.isOptional?"?":"")}}const $I=e=>e.map(t=>t.type);class l1{elements;rest;isReadonly;annotations;_tag="TupleType";constructor(t,n,r,s={}){this.elements=t,this.rest=n,this.isReadonly=r,this.annotations=s;let i=!1,a=!1;for(const o of t)if(o.isOptional)i=!0;else if(i){a=!0;break}if(a||i&&n.length>1)throw new Error(zle)}toString(){return Kt(Xi(this),()=>Pde(this))}toJSON(){return{_tag:this._tag,elements:this.elements.map(t=>t.toJSON()),rest:this.rest.map(t=>t.toJSON()),isReadonly:this.isReadonly,annotations:en(this.annotations)}}}const Pde=e=>{const t=e.elements.map(String).join(", ");return eJ(e.rest,{onEmpty:()=>`readonly [${t}]`,onNonEmpty:(n,r)=>{const s=String(n),i=s.includes(" | ")?`(${s})`:s;if(r.length>0){const a=r.map(String).join(", ");return e.elements.length>0?`readonly [${t}, ...${i}[], ${a}]`:`readonly [...${i}[], ${a}]`}else return e.elements.length>0?`readonly [${t}, ...${i}[]]`:`ReadonlyArray<${s}>`}})};class nn extends Ru{name;isReadonly;constructor(t,n,r,s,i){super(n,r,i),this.name=t,this.isReadonly=s}toString(){return(this.isReadonly?"readonly ":"")+String(this.name)+(this.isOptional?"?":"")+": "+this.type}toJSON(){return{name:String(this.name),type:this.type.toJSON(),isOptional:this.isOptional,isReadonly:this.isReadonly,annotations:en(this.annotations)}}}const rB=e=>{switch(e._tag){case"StringKeyword":case"SymbolKeyword":case"TemplateLiteral":return!0;case"Refinement":return rB(e.from)}return!1};class lp{type;isReadonly;parameter;constructor(t,n,r){if(this.type=n,this.isReadonly=r,rB(t))this.parameter=t;else throw new Error(Ble)}toString(){return(this.isReadonly?"readonly ":"")+`[x: ${this.parameter}]: ${this.type}`}toJSON(){return{parameter:this.parameter.toJSON(),type:this.type.toJSON(),isReadonly:this.isReadonly}}}class di{annotations;_tag="TypeLiteral";propertySignatures;indexSignatures;constructor(t,n,r={}){this.annotations=r;const s={};for(let a=0;a<t.length;a++){const o=t[a].name;if(Object.prototype.hasOwnProperty.call(s,o))throw new Error(LF(o));s[o]=null}const i={string:!1,symbol:!1};for(let a=0;a<n.length;a++){const o=ly(n[a].parameter);if(VS(o)){if(i.string)throw new Error(TN("string"));i.string=!0}else if(nB(o)){if(i.symbol)throw new Error(TN("symbol"));i.symbol=!0}}this.propertySignatures=t,this.indexSignatures=n}toString(){return Kt(Xi(this),()=>Nde(this))}toJSON(){return{_tag:this._tag,propertySignatures:this.propertySignatures.map(t=>t.toJSON()),indexSignatures:this.indexSignatures.map(t=>t.toJSON()),annotations:en(this.annotations)}}}const PN=e=>e.map(String).join("; "),Nde=e=>{if(e.propertySignatures.length>0){const t=e.propertySignatures.map(String).join("; ");return e.indexSignatures.length>0?`{ ${t}; ${PN(e.indexSignatures)} }`:`{ ${t} }`}else return e.indexSignatures.length>0?`{ ${PN(e.indexSignatures)} }`:"{}"},HS=vs("TypeLiteral"),Rde=Kh(pM(hd,e=>{switch(e._tag){case"AnyKeyword":return 0;case"UnknownKeyword":return 1;case"ObjectKeyword":return 2;case"StringKeyword":case"NumberKeyword":case"BooleanKeyword":case"BigIntKeyword":case"SymbolKeyword":return 3}return 4})),Ode={string:"StringKeyword",number:"NumberKeyword",boolean:"BooleanKeyword",bigint:"BigIntKeyword"},sB=e=>_b(e,t=>d1(t)?sB(t.types):[t]),Lde=e=>{const t=Rde(e),n=[],r={},s=[];for(const i of t)switch(i._tag){case"NeverKeyword":break;case"AnyKeyword":return[tB];case"UnknownKeyword":return[eB];case"ObjectKeyword":case"UndefinedKeyword":case"VoidKeyword":case"StringKeyword":case"NumberKeyword":case"BooleanKeyword":case"BigIntKeyword":case"SymbolKeyword":{r[i._tag]||(r[i._tag]=i,n.push(i));break}case"Literal":{const a=typeof i.literal;switch(a){case"string":case"number":case"bigint":case"boolean":{const o=Ode[a];!r[o]&&!s.includes(i.literal)&&(s.push(i.literal),n.push(i));break}case"object":{s.includes(i.literal)||(s.push(i.literal),n.push(i));break}}break}case"UniqueSymbol":{!r.SymbolKeyword&&!s.includes(i.symbol)&&(s.push(i.symbol),n.push(i));break}case"TupleType":{r.ObjectKeyword||n.push(i);break}case"TypeLiteral":{i.propertySignatures.length===0&&i.indexSignatures.length===0?r["{}"]||(r["{}"]=i,n.push(i)):r.ObjectKeyword||n.push(i);break}default:n.push(i)}return n};let Kn=class qS{types;annotations;static make=(t,n)=>MI(t)?new qS(t,n):t.length===1?t[0]:cp;static unify=(t,n)=>qS.make(Lde(sB(t)),n);_tag="Union";constructor(t,n={}){this.types=t,this.annotations=n}toString(){return Kt(Xi(this),()=>this.types.map(String).join(" | "))}toJSON(){return{_tag:this._tag,types:this.types.map(t=>t.toJSON()),annotations:en(this.annotations)}}};const Dde=(e,t)=>e.map(t),MI=e=>e.length>1,d1=vs("Union"),nE=$e(Symbol.for("effect/Schema/AST/toJSONMemoMap"),()=>new WeakMap);class mm{f;annotations;_tag="Suspend";constructor(t,n={}){this.f=t,this.annotations=n,this.f=PF(t)}toString(){return Xi(this).pipe(Gi(()=>Qo(jW(this.f)(),t=>Xi(t))),Kt(()=>"<suspended schema>"))}toJSON(){const t=this.f();let n=nE.get(t);return n||(nE.set(t,{_tag:this._tag}),n={_tag:this._tag,ast:t.toJSON(),annotations:en(this.annotations)},nE.set(t,n),n)}}const iB=vs("Suspend");let jI=class{from;filter;annotations;_tag="Refinement";constructor(t,n,r={}){this.from=t,this.filter=n,this.annotations=r}toString(){return op(this).pipe(Kt(()=>hn(fB(this),{onNone:()=>`{ ${this.from} | filter }`,onSome:t=>Xc(this.from)?String(this.from)+" & "+t:t})))}toJSON(){return{_tag:this._tag,from:this.from.toJSON(),annotations:en(this.annotations)}}};const Xc=vs("Refinement"),rE={};let Vi=class{from;to;transformation;annotations;_tag="Transformation";constructor(t,n,r,s={}){this.from=t,this.to=n,this.transformation=r,this.annotations=s}toString(){return Kt(Xi(this),()=>`(${String(this.from)} <-> ${String(this.to)})`)}toJSON(){return{_tag:this._tag,from:this.from.toJSON(),to:this.to.toJSON(),annotations:en(this.annotations)}}};const aB=vs("Transformation");class oB{decode;encode;_tag="FinalTransformation";constructor(t,n){this.decode=t,this.encode=n}}const $de=e=>t=>t._tag===e;class Mde{_tag="ComposeTransformation"}const FI=new Mde;let jde=class{from;to;decode;encode;constructor(t,n,r,s){this.from=t,this.to=n,this.decode=r,this.encode=s}};const Fde=e=>e.decode===ze&&e.encode===ze;class oy{propertySignatureTransformations;_tag="TypeLiteralTransformation";constructor(t){this.propertySignatureTransformations=t;const n={},r={};for(const s of t){const i=s.from;if(n[i])throw new Error(IN(i));n[i]=!0;const a=s.to;if(r[a])throw new Error(IN(a));r[a]=!0}}}const GS=$de("TypeLiteralTransformation"),Gd=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={...e.annotations};delete r[Hd];const s={...r,...t},i=qd(e);return mt(i)&&(s[ny]=Gd(i.value,t)),n.annotations.value=s,Object.create(Object.getPrototypeOf(e),n)},Bde="[\\s\\S]*?",zde="[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?",cB=(e,t)=>{switch(e._tag){case"Literal":return Cb(String(e.literal));case"StringKeyword":return Bde;case"NumberKeyword":return zde;case"TemplateLiteral":return uB(e);case"Union":return e.types.map(n=>cB(n)).join("|")}},Ude=(e,t,n,r)=>d1(e)?`(${t})`:t,uB=(e,t,n)=>{let r="";if(e.head!==""){const s=Cb(e.head);r+=s}for(const s of e.spans){const i=cB(s.type);if(r+=Ude(s.type,i),s.literal!==""){const a=Cb(s.literal);r+=a}}return r},cy=e=>new RegExp(`^${uB(e)}$`),lB=(e,t)=>{const n=dJ(e.propertySignatures,r=>r.name===t);if(mt(n))return n.value;if(kn(t)){let r;for(const s of e.indexSignatures){const i=ly(s.parameter);switch(i._tag){case"TemplateLiteral":{if(cy(i).test(t))return new nn(t,s.type,!1,!0);break}case"StringKeyword":r===void 0&&(r=new nn(t,s.type,!1,!0))}}if(r)return r}else if(fb(t))for(const r of e.indexSignatures){const s=ly(r.parameter);if(nB(s))return new nn(t,r.type,!1,!0)}},Kf=(e,t)=>{const n=qd(e);if(mt(n))return Kf(n.value,t);switch(e._tag){case"TypeLiteral":{const r=lB(e,t);if(r)return r;break}case"Union":return new nn(t,Kn.make(e.types.map(r=>Kf(r,t).type)),!1,!0);case"Suspend":return Kf(e.f(),t);case"Refinement":return Kf(e.from,t)}throw new Error(ty(e))},NN=(e,t)=>{const n=[],r=[],s=i=>{switch(i._tag){case"NeverKeyword":break;case"StringKeyword":case"SymbolKeyword":case"TemplateLiteral":case"Refinement":r.push(new lp(i,t,!0));break;case"Literal":if(kn(i.literal)||pi(i.literal))n.push(new nn(i.literal,t,!1,!0));else throw new Error(Fle(i.literal));break;case"Enums":{for(const[a,o]of i.enums)n.push(new nn(o,t,!1,!0));break}case"UniqueSymbol":n.push(new nn(i.symbol,t,!1,!0));break;case"Union":i.types.forEach(s);break;default:throw new Error(jle(i))}};return s(e),{propertySignatures:n,indexSignatures:r}},_a=(e,t)=>{const n=qd(e);if(mt(n))return _a(n.value,t);switch(e._tag){case"TypeLiteral":{const r=[],s={};for(const i of e.propertySignatures)s[i.name]=null,t.includes(i.name)&&r.push(i);for(const i of t)if(!(i in s)){const a=lB(e,i);a&&r.push(a)}return new di(r,[])}case"Union":return new di(t.map(r=>Kf(e,r)),[]);case"Suspend":return _a(e.f(),t);case"Refinement":return _a(e.from,t);case"Transformation":switch(e.transformation._tag){case"ComposeTransformation":return new Vi(_a(e.from,t),_a(e.to,t),FI);case"TypeLiteralTransformation":{const r=[],s=[];for(const i of t){const a=e.transformation.propertySignatureTransformations.find(o=>o.to===i);a?(r.push(a),s.push(a.from)):s.push(i)}return Qt(r)?new Vi(_a(e.from,s),_a(e.to,t),new oy(r)):_a(e.from,s)}}}throw new Error(ty(e))},sE=e=>Kn.make([e,hm]),Wf=(e,t)=>{const n=t?.exact===!0;switch(e._tag){case"TupleType":return new l1(e.elements.map(r=>new Ru(n?r.type:sE(r.type),!0)),ZW(e.rest,{onEmpty:()=>e.rest,onNonEmpty:r=>[new up(Kn.make([...$I(r),hm]))]}),e.isReadonly);case"TypeLiteral":return new di(e.propertySignatures.map(r=>new nn(r.name,n?r.type:sE(r.type),!0,r.isReadonly,r.annotations)),e.indexSignatures.map(r=>new lp(r.parameter,sE(r.type),r.isReadonly)));case"Union":return Kn.make(e.types.map(r=>Wf(r,t)));case"Suspend":return new mm(()=>Wf(e.f(),t));case"Declaration":case"Refinement":throw new Error(ty(e));case"Transformation":{if(GS(e.transformation)&&e.transformation.propertySignatureTransformations.every(Fde))return new Vi(Wf(e.from,t),Wf(e.to,t),e.transformation);throw new Error(ty(e))}}return e},dB=e=>t=>{let n;for(const r of e)Object.prototype.hasOwnProperty.call(t.annotations,r)&&(n===void 0&&(n={}),n[r]=t.annotations[r]);return n},Vde=e=>t=>{const n={...t.annotations};for(const r of e)delete n[r];return n},Hde=dB([NI,RI,OI,jF,FF,BF]),_n=e=>{switch(e._tag){case"Declaration":{const t=Ns(e.typeParameters,_n);return t===e.typeParameters?e:new u1(t,e.decodeUnknown,e.encodeUnknown,e.annotations)}case"TupleType":{const t=Ns(e.elements,s=>{const i=_n(s.type);return i===s.type?s:new Ru(i,s.isOptional)}),n=$I(e.rest),r=Ns(n,_n);return t===e.elements&&r===n?e:new l1(t,r.map(s=>new up(s)),e.isReadonly,e.annotations)}case"TypeLiteral":{const t=Ns(e.propertySignatures,r=>{const s=_n(r.type);return s===r.type?r:new nn(r.name,s,r.isOptional,r.isReadonly)}),n=Ns(e.indexSignatures,r=>{const s=_n(r.type);return s===r.type?r:new lp(r.parameter,s,r.isReadonly)});return t===e.propertySignatures&&n===e.indexSignatures?e:new di(t,n,e.annotations)}case"Union":{const t=Ns(e.types,_n);return t===e.types?e:Kn.make(t,e.annotations)}case"Suspend":return new mm(()=>_n(e.f()),e.annotations);case"Refinement":{const t=_n(e.from);return t===e.from?e:new jI(t,e.filter,e.annotations)}case"Transformation":{const t=Hde(e);return _n(t!==void 0?Gd(e.to,t):e.to)}}return e};function Ns(e,t){let n=!1;const r=p_(e.length);for(let s=0;s<e.length;s++){const i=e[s],a=t(i);a!==i&&(n=!0),r[s]=a}return n?r:e}const KS=e=>{switch(e._tag){case"Transformation":return e.from;case"Refinement":return KS(e.from);case"Suspend":return KS(e.f())}},Pi=(e,t)=>{switch(e._tag){case"Declaration":{const n=Ns(e.typeParameters,r=>Pi(r));return n===e.typeParameters?e:new u1(n,e.decodeUnknown,e.encodeUnknown)}case"TupleType":{const n=Ns(e.elements,i=>{const a=Pi(i.type);return a===i.type?i:new Ru(a,i.isOptional)}),r=$I(e.rest),s=Ns(r,i=>Pi(i));return n===e.elements&&s===r?e:new l1(n,s.map(i=>new up(i)),e.isReadonly)}case"TypeLiteral":{const n=Ns(e.propertySignatures,s=>{const i=Pi(s.type);return i===s.type?s:new nn(s.name,i,s.isOptional,s.isReadonly)}),r=Ns(e.indexSignatures,s=>{const i=Pi(s.type);return i===s.type?s:new lp(s.parameter,i,s.isReadonly)});return n===e.propertySignatures&&r===e.indexSignatures?e:new di(n,r)}case"Union":{const n=Ns(e.types,r=>Pi(r));return n===e.types?e:Kn.make(n)}case"Suspend":{let n;const r=QF(e);return mt(r)&&(n={[YF]:`${r.value}Encoded`}),new mm(()=>Pi(e.f()),n)}case"Refinement":return Pi(e.from);case"Transformation":return Pi(e.from)}return e},uy=e=>Pi(e),en=e=>{const t={};for(const n of Object.getOwnPropertySymbols(e))t[String(n)]=e[n];return t},ly=e=>{switch(e._tag){case"StringKeyword":case"SymbolKeyword":case"TemplateLiteral":return e;case"Refinement":return ly(e.from)}},qde=(e,t)=>new Vi(e,t,FI),Si=e=>Kt(Xi(e),()=>e._tag);function Gde(e){return hn(KF(e),{onNone:()=>"",onSome:t=>t.map(n=>` & Brand<${za(n)}>`).join("")})}const fB=e=>LI(e).pipe(Gi(()=>DI(e)),Gi(()=>WF(e)),Jr(t=>t+Gde(e))),Xi=e=>Gi(op(e),()=>fB(e)),Kde=(e,t,n)=>{switch(e._tag){case"UndefinedKeyword":return cp;case"Union":{const r=[];let s=!1;for(const i of e.types){const a=t(i);a?(s=!0,ZF(a)||r.push(a)):r.push(i)}if(s)return Kn.make(r);break}case"Suspend":return t(e.f());case"Transformation":return n(e)}};class rr{path;actual;issue;_tag="Pointer";constructor(t,n,r){this.path=t,this.actual=n,this.issue=r}}class RN{actual;message;_tag="Unexpected";constructor(t,n){this.actual=t,this.message=n}}class _f{ast;message;_tag="Missing";actual=void 0;constructor(t,n){this.ast=t,this.message=n}}class on{ast;actual;issues;output;_tag="Composite";constructor(t,n,r,s){this.ast=t,this.actual=n,this.issues=r,this.output=s}}class iE{ast;actual;kind;issue;_tag="Refinement";constructor(t,n,r,s){this.ast=t,this.actual=n,this.kind=r,this.issue=s}}class aE{ast;actual;kind;issue;_tag="Transformation";constructor(t,n,r,s){this.ast=t,this.actual=n,this.kind=r,this.issue=s}}class xn{ast;actual;message;_tag="Type";constructor(t,n,r){this.ast=t,this.actual=n,this.message=r}}class WS{ast;actual;message;_tag="Forbidden";constructor(t,n,r){this.ast=t,this.actual=n,this.message=r}}const ON=Symbol.for("effect/Schema/ParseErrorTypeId");class Wde extends ep("ParseError"){[ON]=ON;get message(){return this.toString()}toString(){return gh.formatIssueSync(this.issue)}toJSON(){return{_id:"ParseError",message:this.toString()}}[yt](){return this.toJSON()}}const BI=e=>new Wde({issue:e}),Yr=He,$c=Be,dy=AW,Jde=IW,Pr=CW,oi=N(2,(e,t)=>Pr(e)?Wr(e,{onLeft:Be,onRight:t}):Le(e,t)),ar=N(2,(e,t)=>Pr(e)?NW(e,t):At(e,t)),ph=N(2,(e,t)=>Pr(e)?PW(e,t):mI(e,t)),hB=N(2,(e,t)=>Pr(e)?Wr(e,{onLeft:t,onRight:He}):c5(e,t)),f1=(e,t)=>t===void 0||pi(t)?e:e===void 0?t:{...e,...t},mB=(e,t,n)=>{const r=Vn(e,t);return(s,i)=>r(s,f1(n,i))},Yde=(e,t,n)=>{const r=mB(e,t,n);return(s,i)=>dM(r(s,i),BI)},pB=(e,t,n)=>{const r=mB(e,t,n);return(s,i)=>$W(r(s,i))},gB=(e,t,n)=>{const r=Vn(e,t);return(s,i)=>r(s,{...f1(n,i),isEffectAllowed:!0})},bB=(e,t)=>gB(e.ast,!0,t),yB=(e,t)=>gB(e.ast,!1,t),h1=(e,t)=>Yde(_n(e.ast),!0,t),Qde=(e,t)=>{const n=Vn(_n(e.ast),!0);return(r,s)=>Bi(n(r,{exact:!0,...f1(t,s)}))},Xde=$e(Symbol.for("effect/ParseResult/decodeMemoMap"),()=>new WeakMap),Zde=$e(Symbol.for("effect/ParseResult/encodeMemoMap"),()=>new WeakMap),Vn=(e,t)=>{const n=t?Xde:Zde,r=n.get(e);if(r)return r;const s=efe(e,t),i=ade(e),a=mt(i)?(u,l)=>s(u,f1(l,i.value)):s,o=ode(e),c=t&&mt(o)?(u,l)=>Yf(hB(a(u,l),o.value),e,u,l):a;return n.set(e,c),c},oE=e=>Nr(rde(e)),cE=e=>Nr(sde(e)),efe=(e,t)=>{switch(e._tag){case"Refinement":if(t){const n=Vn(e.from,!0);return(r,s)=>{s=s??rE;const i=s?.errors==="all",a=oi(hB(n(r,s),o=>{const c=new iE(e,r,"From",o);return i&&ude(e)&&wB(o)?hn(e.filter(r,s,e),{onNone:()=>Be(c),onSome:u=>Be(new on(e,r,[c,new iE(e,r,"Predicate",u)]))}):Be(c)}),o=>hn(e.filter(o,s,e),{onNone:()=>He(o),onSome:c=>Be(new iE(e,r,"Predicate",c))}));return Yf(a,e,r,s)}}else{const n=Vn(_n(e),!0),r=Vn(_B(e.from),!1);return(s,i)=>Yf(oi(n(s,i),a=>r(a,i)),e,s,i)}case"Transformation":{const n=rfe(e.transformation,t),r=t?Vn(e.from,!0):Vn(e.to,!1),s=t?Vn(e.to,!0):Vn(e.from,!1);return(i,a)=>Yf(oi(ph(r(i,a),o=>new aE(e,i,t?"Encoded":"Type",o)),o=>oi(ph(n(o,a??rE,e,i),c=>new aE(e,i,"Transformation",c)),c=>ph(s(c,a),u=>new aE(e,i,t?"Type":"Encoded",u)))),e,i,a)}case"Declaration":{const n=t?e.decodeUnknown(...e.typeParameters):e.encodeUnknown(...e.typeParameters);return(r,s)=>Yf(n(r,s??rE,e),e,r,s)}case"Literal":return as(e,n=>n===e.literal);case"UniqueSymbol":return as(e,n=>n===e.symbol);case"UndefinedKeyword":return as(e,gK);case"NeverKeyword":return as(e,bK);case"UnknownKeyword":case"AnyKeyword":case"VoidKeyword":return He;case"StringKeyword":return as(e,kn);case"NumberKeyword":return as(e,pi);case"BooleanKeyword":return as(e,Oo);case"BigIntKeyword":return as(e,o_);case"SymbolKeyword":return as(e,fb);case"ObjectKeyword":return as(e,_s);case"Enums":return as(e,n=>e.enums.some(([r,s])=>s===n));case"TemplateLiteral":{const n=cy(e);return as(e,r=>kn(r)&&n.test(r))}case"TupleType":{const n=e.elements.map(u=>Vn(u.type,t)),r=e.rest.map(u=>Vn(u.type,t));let s=e.elements.filter(u=>!u.isOptional);e.rest.length>0&&(s=s.concat(e.rest.slice(1)));const i=s.length,a=e.elements.length>0?e.elements.map((u,l)=>l).join(" | "):"never",o=oE(e),c=cE(e);return(u,l)=>{if(!nJ(u))return Be(new xn(e,u));const d=l?.errors==="all",f=[];let h=0;const m=[],y=u.length;for(let k=y;k<=i-1;k++){const v=new rr(k,u,new _f(s[k-y]));if(d){f.push([h++,v]);continue}else return Be(new on(e,u,v,m))}if(e.rest.length===0)for(let k=e.elements.length;k<=y-1;k++){const v=new rr(k,u,new RN(u[k],`is unexpected, expected: ${a}`));if(d){f.push([h++,v]);continue}else return Be(new on(e,u,v,m))}let g=0,p;for(;g<n.length;g++)if(y<g+1){if(e.elements[g].isOptional)continue}else{const k=n[g],v=k(u[g],l);if(Pr(v)){if(ir(v)){const w=new rr(g,u,v.left);if(d){f.push([h++,w]);continue}else return Be(new on(e,u,w,Ks(m)))}m.push([h++,v.right])}else{const w=h++,S=g;p||(p=[]),p.push(({es:T,output:I})=>Le(Qu(v),$=>{if(ir($)){const R=new rr(S,u,$.left);return d?(T.push([w,R]),bt):Be(new on(e,u,R,Ks(I)))}return I.push([w,$.right]),bt}))}}if(Qt(r)){const[k,...v]=r;for(;g<y-v.length;g++){const w=k(u[g],l);if(Pr(w))if(ir(w)){const S=new rr(g,u,w.left);if(d){f.push([h++,S]);continue}else return Be(new on(e,u,S,Ks(m)))}else m.push([h++,w.right]);else{const S=h++,T=g;p||(p=[]),p.push(({es:I,output:$})=>Le(Qu(w),R=>{if(ir(R)){const z=new rr(T,u,R.left);return d?(I.push([S,z]),bt):Be(new on(e,u,z,Ks($)))}else return $.push([S,R.right]),bt}))}}for(let w=0;w<v.length;w++)if(g+=w,!(y<g+1)){const S=v[w](u[g],l);if(Pr(S)){if(ir(S)){const T=new rr(g,u,S.left);if(d){f.push([h++,T]);continue}else return Be(new on(e,u,T,Ks(m)))}m.push([h++,S.right])}else{const T=h++,I=g;p||(p=[]),p.push(({es:$,output:R})=>Le(Qu(S),z=>{if(ir(z)){const V=new rr(I,u,z.left);return d?($.push([T,V]),bt):Be(new on(e,u,V,Ks(R)))}return R.push([T,z.right]),bt}))}}}const _=({es:k,output:v})=>$l(k)?Be(new on(e,u,Ks(k),Ks(v))):He(Ks(v));if(p&&p.length>0){const k=p;return dn(()=>{const v={es:zf(f),output:zf(m)};return Le(Ji(k,w=>w(v),{concurrency:o,batching:c,discard:!0}),()=>_(v))})}return _({output:m,es:f})}}case"TypeLiteral":{if(e.propertySignatures.length===0&&e.indexSignatures.length===0)return as(e,yK);const n=[],r={},s=[];for(const l of e.propertySignatures)n.push([Vn(l.type,t),l]),r[l.name]=null,s.push(l.name);const i=e.indexSignatures.map(l=>[Vn(l.parameter,t),Vn(l.type,t),l.parameter]),a=Kn.make(e.indexSignatures.map(l=>l.parameter).concat(s.map(l=>fb(l)?new hde(l):new ry(l)))),o=Vn(a,t),c=oE(e),u=cE(e);return(l,d)=>{if(!Hh(l))return Be(new xn(e,l));const f=d?.errors==="all",h=[];let m=0;const y=d?.onExcessProperty==="error",g=d?.onExcessProperty==="preserve",p={};let _;if(y||g){_=Reflect.ownKeys(l);for(const S of _){const T=o(S,d);if(Pr(T)&&ir(T))if(y){const I=new rr(S,l,new RN(l[S],`is unexpected, expected: ${String(a)}`));if(f){h.push([m++,I]);continue}else return Be(new on(e,l,I,p))}else p[S]=l[S]}}let k;const v=d?.exact===!0;for(let S=0;S<n.length;S++){const T=n[S][1],I=T.name,$=Object.prototype.hasOwnProperty.call(l,I);if(!$){if(T.isOptional)continue;if(v){const V=new rr(I,l,new _f(T));if(f){h.push([m++,V]);continue}else return Be(new on(e,l,V,p))}}const R=n[S][0],z=R(l[I],d);if(Pr(z)){if(ir(z)){const V=new rr(I,l,$?z.left:new _f(T));if(f){h.push([m++,V]);continue}else return Be(new on(e,l,V,p))}p[I]=z.right}else{const V=m++,H=I;k||(k=[]),k.push(({es:G,output:Q})=>Le(Qu(z),re=>{if(ir(re)){const me=new rr(H,l,$?re.left:new _f(T));return f?(G.push([V,me]),bt):Be(new on(e,l,me,Q))}return Q[H]=re.right,bt}))}}for(let S=0;S<i.length;S++){const T=i[S],I=T[0],$=T[1],R=CF(l,T[2]);for(const z of R){const V=I(z,d);if(Pr(V)&&Bi(V)){const H=$(l[z],d);if(Pr(H))if(ir(H)){const G=new rr(z,l,H.left);if(f){h.push([m++,G]);continue}else return Be(new on(e,l,G,p))}else Object.prototype.hasOwnProperty.call(r,z)||(p[z]=H.right);else{const G=m++,Q=z;k||(k=[]),k.push(({es:re,output:me})=>Le(Qu(H),ke=>{if(ir(ke)){const tt=new rr(Q,l,ke.left);return f?(re.push([G,tt]),bt):Be(new on(e,l,tt,me))}else return Object.prototype.hasOwnProperty.call(r,z)||(me[z]=ke.right),bt}))}}}}const w=({es:S,output:T})=>{if($l(S))return Be(new on(e,l,Ks(S),T));if(d?.propertyOrder==="original"){const I=_||Reflect.ownKeys(l);for(const R of s)I.indexOf(R)===-1&&I.push(R);const $={};for(const R of I)Object.prototype.hasOwnProperty.call(T,R)&&($[R]=T[R]);return He($)}return He(T)};if(k&&k.length>0){const S=k;return dn(()=>{const T={es:zf(h),output:Object.assign({},p)};return Le(Ji(S,I=>I(T),{concurrency:c,batching:u,discard:!0}),()=>w(T))})}return w({es:h,output:p})}}case"Union":{const n=tfe(e.types,t),r=Reflect.ownKeys(n.keys),s=r.length,i=e.types.length,a=new Map;for(let u=0;u<i;u++)a.set(e.types[u],Vn(e.types[u],t));const o=oE(e)??1,c=cE(e);return(u,l)=>{const d=[];let f=0,h=[];if(s>0)if(Px(u))for(let g=0;g<s;g++){const p=r[g],_=n.keys[p].buckets;if(Object.prototype.hasOwnProperty.call(u,p)){const k=String(u[p]);if(Object.prototype.hasOwnProperty.call(_,k))h=h.concat(_[k]);else{const{candidates:v,literals:w}=n.keys[p],S=Kn.make(w),T=v.length===i?new di([new nn(p,S,!1,!0)],[]):Kn.make(v);d.push([f++,new on(T,u,new rr(p,u,new xn(S,u[p])))])}}else{const{candidates:k,literals:v}=n.keys[p],w=new nn(p,Kn.make(v),!1,!0),S=k.length===i?new di([w],[]):Kn.make(k);d.push([f++,new on(S,u,new rr(p,u,new _f(w)))])}}else{const g=n.candidates.length===i?e:Kn.make(n.candidates);d.push([f++,new xn(g,u)])}n.otherwise.length>0&&(h=h.concat(n.otherwise));let m;for(let g=0;g<h.length;g++){const p=h[g],_=a.get(p)(u,l);if(Pr(_)&&(!m||m.length===0)){if(Bi(_))return _;d.push([f++,_.left])}else{const k=f++;m||(m=[]),m.push(v=>dn(()=>"finalResult"in v?bt:Le(Qu(_),w=>(Bi(w)?v.finalResult=w:v.es.push([k,w.left]),bt))))}}const y=g=>$l(g)?g.length===1&&g[0][1]._tag==="Type"?Be(g[0][1]):Be(new on(e,u,Ks(g))):Be(new xn(e,u));if(m&&m.length>0){const g=m;return dn(()=>{const p={es:zf(d)};return Le(Ji(g,_=>_(p),{concurrency:o,batching:c,discard:!0}),()=>"finalResult"in p?p.finalResult:y(p.es))})}return y(d)}}case"Suspend":{const n=PF(()=>Vn(e.f(),t));return(r,s)=>n()(r,s)}}},as=(e,t)=>n=>t(n)?He(n):Be(new xn(e,n)),Jf=(e,t)=>{switch(e._tag){case"Declaration":{const n=qd(e);if(mt(n))return Jf(n.value,t);break}case"TypeLiteral":{const n=[];for(let r=0;r<e.propertySignatures.length;r++){const s=e.propertySignatures[r],i=t?uy(s.type):_n(s.type);mh(i)&&!s.isOptional&&n.push([s.name,i])}return n}case"TupleType":{const n=[];for(let r=0;r<e.elements.length;r++){const s=e.elements[r],i=t?uy(s.type):_n(s.type);mh(i)&&!s.isOptional&&n.push([r,i])}return n}case"Refinement":return Jf(e.from,t);case"Suspend":return Jf(e.f(),t);case"Transformation":return Jf(t?e.from:e.to,t)}return[]},tfe=(e,t)=>{const n={},r=[],s=[];for(let i=0;i<e.length;i++){const a=e[i],o=Jf(a,t);if(o.length>0){s.push(a);for(let c=0;c<o.length;c++){const[u,l]=o[c],d=String(l.literal);n[u]=n[u]||{buckets:{},literals:[],candidates:[]};const f=n[u].buckets;if(Object.prototype.hasOwnProperty.call(f,d)){if(c<o.length-1)continue;f[d].push(a),n[u].literals.push(l),n[u].candidates.push(a)}else{f[d]=[a],n[u].literals.push(l),n[u].candidates.push(a);break}}}else r.push(a)}return{keys:n,otherwise:r,candidates:s}},_B=e=>Xc(e)?_B(e.from):e,Yf=(e,t,n,r)=>{if(r?.isEffectAllowed===!0||Pr(e))return e;const s=new J_,i=r1(e,{scheduler:s});s.flush();const a=i.unsafePoll();if(a){if(qT(a))return He(a.value);const o=a.cause;return eie(o)?Be(o.error):Be(new WS(t,n,Xm(o)))}return Be(new WS(t,n,"cannot be be resolved synchronously, this is caused by using runSync on an effect that performs async work"))},nfe=([e],[t])=>e>t?1:e<t?-1:0;function Ks(e){return e.sort(nfe).map(t=>t[1])}const rfe=(e,t)=>{switch(e._tag){case"FinalTransformation":return t?e.decode:e.encode;case"ComposeTransformation":return He;case"TypeLiteralTransformation":return n=>{let r=He(n);for(const s of e.propertySignatureTransformations){const[i,a]=t?[s.from,s.to]:[s.to,s.from],o=t?s.decode:s.encode;r=ar(r,u=>{const l=o(Object.prototype.hasOwnProperty.call(u,i)?ye(u[i]):fe());return delete u[i],mt(l)&&(u[a]=l.value),u})}return r}}},Tr=(e,t=[])=>({value:e,forest:t}),gh={formatIssue:e=>ar(gl(e),sfe),formatIssueSync:e=>{const t=gh.formatIssue(e);return Pr(t)?fM(t):zs(t)},formatError:e=>gh.formatIssue(e.issue),formatErrorSync:e=>gh.formatIssueSync(e.issue)},sfe=e=>e.value+kB(`
28
- `,e.forest),kB=(e,t)=>{let n="";const r=t.length;let s;for(let i=0;i<r;i++){s=t[i];const a=i===r-1;n+=e+(a?"└":"├")+"─ "+s.value,n+=kB(e+(r>1&&!a?"│ ":" "),s.forest)}return n},ife=e=>{switch(e){case"Encoded":return"Encoded side transformation failure";case"Transformation":return"Transformation process failure";case"Type":return"Type side transformation failure"}},afe=e=>{switch(e){case"From":return"From side refinement failure";case"Predicate":return"Predicate refinement failure"}},EB=e=>"ast"in e?ye(e.ast):fe(),JS=He(void 0),ofe=e=>EB(e).pipe(Qo(Zle),hn({onNone:()=>JS,onSome:t=>{const n=t(e);return kn(n)?He({message:n,override:!1}):Zo(n)?At(n,r=>({message:r,override:!1})):kn(n.message)?He({message:n.message,override:n.override}):At(n.message,r=>({message:r,override:n.override}))}})),zI=e=>t=>t._tag===e,wB=zI("Composite"),LN=zI("Refinement"),DN=zI("Transformation"),To=e=>oi(ofe(e),t=>t!==void 0?!t.override&&(wB(e)||LN(e)&&e.kind==="From"||DN(e)&&e.kind!=="Transformation")?DN(e)||LN(e)?To(e.issue):JS:He(t.message):JS),SB=e=>EB(e).pipe(Qo(ide),bM(t=>t(e)),Nr);function cfe(e){return DI(e).pipe(Gi(()=>LI(e)),Gi(()=>WF(e)),Gi(()=>op(e)),Kt(()=>`{ ${e.from} | filter }`))}function ufe(e){return e.message!==void 0?e.message:`Expected ${Xc(e.ast)?cfe(e.ast):String(e.ast)}, actual ${za(e.actual)}`}const vB=e=>ar(To(e),t=>t??SB(e)??ufe(e)),Kp=e=>SB(e)??String(e.ast),xB=e=>e.message??"is forbidden",TB=e=>e.message??"is unexpected",IB=e=>{const t=ede(e.ast);if(mt(t)){const n=t.value();return kn(n)?He(n):n}return He(e.message??"is missing")},gl=e=>{switch(e._tag){case"Type":return ar(vB(e),Tr);case"Forbidden":return He(Tr(Kp(e),[Tr(xB(e))]));case"Unexpected":return He(Tr(TB(e)));case"Missing":return ar(IB(e),Tr);case"Transformation":return oi(To(e),t=>t!==void 0?He(Tr(t)):ar(gl(e.issue),n=>Tr(Kp(e),[Tr(ife(e.kind),[n])])));case"Refinement":return oi(To(e),t=>t!==void 0?He(Tr(t)):ar(gl(e.issue),n=>Tr(Kp(e),[Tr(afe(e.kind),[n])])));case"Pointer":return ar(gl(e.issue),t=>Tr(NF(e.path),[t]));case"Composite":return oi(To(e),t=>{if(t!==void 0)return He(Tr(t));const n=Kp(e);return AI(e.issues)?ar(Ji(e.issues,gl),r=>Tr(n,r)):ar(gl(e.issues),r=>Tr(n,[r]))})}},fc=(e,t,n)=>({_tag:e,path:t,message:n}),bh={formatIssue:e=>bl(e,void 0,[]),formatIssueSync:e=>{const t=bh.formatIssue(e);return Pr(t)?fM(t):zs(t)},formatError:e=>bh.formatIssue(e.issue),formatErrorSync:e=>bh.formatIssueSync(e.issue)},bl=(e,t,n)=>{const r=e._tag;switch(r){case"Type":return ar(vB(e),s=>[fc(t??r,n,s)]);case"Forbidden":return He([fc(r,n,xB(e))]);case"Unexpected":return He([fc(r,n,TB(e))]);case"Missing":return ar(IB(e),s=>[fc(r,n,s)]);case"Pointer":return bl(e.issue,void 0,n.concat(e.path));case"Composite":return oi(To(e),s=>s!==void 0?He([fc(r,n,s)]):AI(e.issues)?ar(Ji(e.issues,i=>bl(i,void 0,n)),vM):bl(e.issues,void 0,n));case"Refinement":return oi(To(e),s=>s!==void 0?He([fc(r,n,s)]):bl(e.issue,e.kind==="Predicate"?r:void 0,n));case"Transformation":return oi(To(e),s=>s!==void 0?He([fc(r,n,s)]):bl(e.issue,e.kind==="Transformation"?r:void 0,n))}},$N=Nle,lfe=N(e=>_s(e[0]),(e,...t)=>{const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}),AB=N(e=>_s(e[0]),(e,...t)=>{const n={...e};for(const r of t)delete n[r];return n}),bd=Symbol.for("effect/Schema");function vt(e){return class{[bd]=YS;static ast=e;static annotations(n){return vt(vi(this.ast,n))}static pipe(){return Se(this,arguments)}static toString(){return String(e)}static Type;static Encoded;static Context;static[bd]=YS}}const YS={_A:e=>e,_I:e=>e,_R:e=>e},MN=e=>qT(e)?e.value:dfe(Xm(e.cause)),dfe=e=>({issues:[{message:e}]}),ffe=e=>At(bh.formatIssue(e),t=>({issues:t.map(n=>({path:n.path,message:n.message}))})),ec=(e,t)=>{const n=bB(e,{errors:"all"});return class extends vt(e.ast){static"~standard"={version:1,vendor:"effect",validate(s){const i=new J_,a=r1(Aoe(n(s,t),{onFailure:ffe,onSuccess:c=>Dt({value:c})}),{scheduler:i});i.flush();const o=a.unsafePoll();return o?MN(o):new Promise(c=>{a.addObserver(u=>{c(MN(u))})})}}}},jN={typeConstructor:Qle,schemaId:CI,message:MF,missingMessage:PI,identifier:Hd,title:Br,description:ra,examples:NI,default:RI,documentation:Xle,jsonSchema:OI,arbitrary:jF,pretty:FF,equivalence:BF,concurrency:zF,batching:UF,parseIssueTitle:VF,parseOptions:HF,decodingFallback:qF},Ou=e=>{if(!e)return{};const t={...e};for(const n in jN)if(n in e){const r=jN[n];t[r]=e[n],delete t[n]}return t},vi=(e,t)=>Gd(e,Ou(t)),hfe=e=>vt(uy(e.ast)),FN=e=>vt(_n(e.ast)),kf=(e,t)=>{const n=yB(e,t);return(r,s)=>ph(n(r,s),BI)},CB=(e,t)=>{const n=bB(e,t);return(r,s)=>ph(n(r,s),BI)},mfe=CB,jr=e=>Ne(e,bd)&&_s(e[bd]);function pfe(e){return MI(e)?Kn.make(Dde(e,t=>new ry(t))):new ry(e[0])}function PB(e,t=pfe(e)){return class extends vt(t){static annotations(r){return PB(this.literals,vi(this.ast,r))}static literals=[...e]}}function Re(...e){return Qt(e)?PB(e):pm}const gfe=(e,t,n)=>UI(e,new u1(e.map(r=>r.ast),(...r)=>t.decode(...r.map(vt)),(...r)=>t.encode(...r.map(vt)),Ou(n))),bfe=(e,t)=>{const n=()=>(s,i,a)=>e(s)?Yr(s):$c(new xn(a,s)),r=n;return UI([],new u1([],n,r,Ou(t)))};function UI(e,t){return class extends vt(t){static annotations(r){return UI(this.typeParameters,vi(this.ast,r))}static typeParameters=[...e]}}const dp=function(){if(Array.isArray(arguments[0])){const n=arguments[0],r=arguments[1],s=arguments[2];return gfe(n,r,s)}const e=arguments[0],t=arguments[1];return bfe(e,t)},BN=Symbol.for("effect/SchemaId/InstanceOf"),yfe=(e,t)=>dp(n=>n instanceof e,{title:e.name,description:`an instance of ${e.name}`,pretty:()=>String,schemaId:BN,[BN]:{constructor:e},...t});class _fe extends vt(hm){}class kfe extends vt(gde){}class NB extends vt(fde){}class pm extends vt(cp){}class fp extends vt(eB){}class zo extends vt(tB){}class VI extends vt(xde){}class Efe extends vt(Ide){}class D extends vt(sy){}class lt extends vt(iy){}class zt extends vt(ay){}class wfe extends vt(Cde){}const Sfe=e=>Kn.make(e.map(t=>t.ast));function RB(e,t=Sfe(e)){return class extends vt(t){static annotations(r){return RB(this.members,vi(this.ast,r))}static members=[...e]}}function Hs(...e){return MI(e)?RB(e):Qt(e)?e[0]:pm}const ee=e=>Hs(e,NB),OB=e=>Hs(e,_fe),vfe=(e,t)=>new l1(e.map(n=>jr(n)?new Ru(n.ast,!1):n.ast),t.map(n=>jr(n)?new up(n.ast):n.ast),!0);function fy(e,t,n=vfe(e,t)){return class extends vt(n){static annotations(s){return fy(this.elements,this.rest,vi(this.ast,s))}static elements=[...e];static rest=[...t]}}function QS(...e){return Array.isArray(e[0])?fy(e[0],e.slice(1)):fy(e,[])}function LB(e,t){return class extends fy([],[e],t){static annotations(r){return LB(this.value,vi(this.ast,r))}static value=e}}const Qe=e=>LB(e),XS=e=>e?'"?:"':'":"';class m1 extends Ru{isReadonly;defaultValue;_tag="PropertySignatureDeclaration";constructor(t,n,r,s,i){super(t,n,s),this.isReadonly=r,this.defaultValue=i}toString(){const t=XS(this.isOptional),n=String(this.type);return`PropertySignature<${t}, ${n}, never, ${t}, ${n}>`}}class DB extends Ru{isReadonly;defaultValue;constructor(t,n,r,s,i){super(t,n,s),this.isReadonly=r,this.defaultValue=i}}const xfe=e=>e===void 0?"never":kn(e)?JSON.stringify(e):String(e);class $B{from;to;decode;encode;_tag="PropertySignatureTransformation";constructor(t,n,r,s){this.from=t,this.to=n,this.decode=r,this.encode=s}toString(){return`PropertySignature<${XS(this.to.isOptional)}, ${this.to.type}, ${xfe(this.from.fromKey)}, ${XS(this.from.isOptional)}, ${this.from.type}>`}}const MB=(e,t)=>{switch(e._tag){case"PropertySignatureDeclaration":return new m1(e.type,e.isOptional,e.isReadonly,{...e.annotations,...t},e.defaultValue);case"PropertySignatureTransformation":return new $B(e.from,new DB(e.to.type,e.to.isOptional,e.to.isReadonly,{...e.to.annotations,...t},e.to.defaultValue),e.decode,e.encode)}},jB=Symbol.for("effect/PropertySignature"),HI=e=>Ne(e,jB);class p1{ast;[bd];[jB]=null;_TypeToken;_Key;_EncodedToken;_HasDefault;constructor(t){this.ast=t}pipe(){return Se(this,arguments)}annotations(t){return new p1(MB(this.ast,Ou(t)))}toString(){return String(this.ast)}}const zN=e=>new p1(e);class g1 extends p1{from;constructor(t,n){super(t),this.from=n}annotations(t){return new g1(MB(this.ast,Ou(t)),this.from)}}const yh=e=>new g1(new m1(e.ast,!1,!0,{},void 0),e),FB=N(2,(e,t)=>{const n=e.ast;switch(n._tag){case"PropertySignatureDeclaration":return zN(new m1(n.type,n.isOptional,n.isReadonly,n.annotations,t));case"PropertySignatureTransformation":return zN(new $B(n.from,new DB(n.to.type,n.to.isOptional,n.to.isReadonly,n.to.annotations,t),n.decode,n.encode))}}),Z=e=>{const t=e.ast===hm||e.ast===cp?hm:OB(e).ast;return new g1(new m1(t,!0,!0,{},void 0),e)},Tfe=dB([PI]),Ife=(e,t)=>{const n=Reflect.ownKeys(e),r=[];if(n.length>0){const i=[],a=[],o=[];for(let c=0;c<n.length;c++){const u=n[c],l=e[u];if(HI(l)){const d=l.ast;switch(d._tag){case"PropertySignatureDeclaration":{const f=d.type,h=d.isOptional,m=d.annotations;i.push(new nn(u,f,h,!0,Tfe(d))),a.push(new nn(u,_n(f),h,!0,m)),r.push(new nn(u,f,h,!0,m));break}case"PropertySignatureTransformation":{const f=d.from.fromKey??u;i.push(new nn(f,d.from.type,d.from.isOptional,!0,d.from.annotations)),a.push(new nn(u,d.to.type,d.to.isOptional,!0,d.to.annotations)),o.push(new jde(f,u,d.decode,d.encode));break}}}else i.push(new nn(u,l.ast,!1,!0)),a.push(new nn(u,_n(l.ast),!1,!0)),r.push(new nn(u,l.ast,!1,!0))}if(Qt(o)){const c=[],u=[];for(const l of t){const{indexSignatures:d,propertySignatures:f}=NN(l.key.ast,l.value.ast);f.forEach(h=>{i.push(h),a.push(new nn(h.name,_n(h.type),h.isOptional,h.isReadonly,h.annotations))}),d.forEach(h=>{c.push(h),u.push(new lp(h.parameter,_n(h.type),h.isReadonly))})}return new Vi(new di(i,c,{[Gl]:"Struct (Encoded side)"}),new di(a,u,{[Gl]:"Struct (Type side)"}),new oy(o))}}const s=[];for(const i of t){const{indexSignatures:a,propertySignatures:o}=NN(i.key.ast,i.value.ast);o.forEach(c=>r.push(c)),a.forEach(c=>s.push(c))}return new di(r,s)},BB=(e,t)=>{const n=Reflect.ownKeys(e);for(const r of n){const s=e[r];if(t[r]===void 0&&HI(s)){const i=s.ast,a=i._tag==="PropertySignatureDeclaration"?i.defaultValue:i.to.defaultValue;a!==void 0&&(t[r]=a())}}return t};function qI(e,t,n=Ife(e,t)){return class extends vt(n){static annotations(s){return qI(this.fields,this.records,vi(this.ast,s))}static fields={...e};static records=[...t];static make=(s,i)=>{const a=BB(e,{...s});return E1(i)?a:h1(this)(a)};static pick(...s){return ce(lfe(e,...s))}static omit(...s){return ce(AB(e,...s))}}}function ce(e,...t){return qI(e,t)}const Afe=e=>Re(e).pipe(yh,FB(()=>e)),Cfe=(e,t)=>ce({_tag:Afe(e),...t});function zB(e,t,n){return class extends qI({},[{key:e,value:t}],n){static annotations(s){return zB(e,t,vi(this.ast,s))}static key=e;static value=t}}const b1=e=>zB(e.key,e.value),GI=(...e)=>t=>vt(_a(t.ast,e));function UB(e,t){return class extends vt(t){static annotations(r){return UB(this.from,vi(this.ast,r))}static make=(r,s)=>E1(s)?r:h1(this)(r);static from=e}}const qs=(e,t)=>n=>{const r=hn(KF(n.ast),{onNone:()=>[e],onSome:i=>[...i,e]}),s=Gd(n.ast,Ou({[$F]:r,...t}));return UB(n,s)},VB=N(e=>jr(e[0]),(e,t)=>vt(Wf(e.ast,t))),Ef=(e,t,n)=>{if(HS(e)&&HS(t)){const r=[...e.propertySignatures];for(const s of t.propertySignatures){const i=s.name,a=r.findIndex(o=>o.name===i);if(a===-1)r.push(s);else{const{isOptional:o,type:c}=r[a];r[a]=new nn(i,hy(c,s.type,n.concat(i)),o,!0)}}return new di(r,e.indexSignatures.concat(t.indexSignatures))}throw new Error(OF(e,t,n))},Pfe=Vde([Hd]),wf=(e,t)=>t.map(n=>new jI(n,e.filter,Pfe(e))),hy=(e,t,n)=>Kn.make(ka([e],[t],n)),hc=e=>d1(e)?e.types:[e],ka=(e,t,n)=>_b(e,r=>_b(t,s=>{switch(s._tag){case"Literal":{if(kn(s.literal)&&VS(r)||pi(s.literal)&&AN(r)||Oo(s.literal)&&CN(r))return[s];break}case"StringKeyword":{if(s===sy){if(VS(r)||mh(r)&&kn(r.literal))return[r];if(Xc(r))return wf(r,ka(hc(r.from),[s],n))}else if(r===sy)return[s];break}case"NumberKeyword":{if(s===iy){if(AN(r)||mh(r)&&pi(r.literal))return[r];if(Xc(r))return wf(r,ka(hc(r.from),[s],n))}else if(r===iy)return[s];break}case"BooleanKeyword":{if(s===ay){if(CN(r)||mh(r)&&Oo(r.literal))return[r];if(Xc(r))return wf(r,ka(hc(r.from),[s],n))}else if(r===ay)return[s];break}case"Union":return ka(hc(r),s.types,n);case"Suspend":return[new mm(()=>hy(r,s.f(),n))];case"Refinement":return wf(s,ka(hc(r),hc(s.from),n));case"TypeLiteral":{switch(r._tag){case"Union":return ka(r.types,[s],n);case"Suspend":return[new mm(()=>hy(r.f(),s,n))];case"Refinement":return wf(r,ka(hc(r.from),[s],n));case"TypeLiteral":return[Ef(r,s,n)];case"Transformation":{const i=r.transformation,a=Ef(r.from,s,n),o=Ef(r.to,_n(s),n);switch(i._tag){case"TypeLiteralTransformation":return[new Vi(a,o,new oy(i.propertySignatureTransformations))];case"ComposeTransformation":return[new Vi(a,o,FI)];case"FinalTransformation":return[new Vi(a,o,new oB((c,u,l,d)=>ar(i.decode(c,u,l,d),f=>({...c,...f})),(c,u,l,d)=>ar(i.encode(c,u,l,d),f=>({...c,...f}))))]}}}break}case"Transformation":{if(aB(r)){if(GS(s.transformation)&&GS(r.transformation))return[new Vi(Ef(r.from,s.from,n),Ef(r.to,s.to,n),new oy(s.transformation.propertySignatureTransformations.concat(r.transformation.propertySignatureTransformations)))]}else return ka([s],[r],n);break}}throw new Error(OF(r,s,n))})),y1=N(2,(e,t)=>vt(hy(e.ast,t.ast,[]))),Mc=N(e=>jr(e[1]),(e,t)=>KI(e,t,qde(e.ast,t.ast))),HB=Symbol.for("effect/SchemaId/Refine");function qB(e,t,n){return class extends vt(n){static annotations(s){return qB(this.from,this.filter,vi(this.ast,s))}static[HB]=e;static from=e;static filter=t;static make=(s,i)=>E1(i)?s:h1(this)(s)}}const UN=(e,t,n)=>{if(Oo(e))return e?fe():ye(new xn(t,n));if(kn(e))return ye(new xn(t,n,e));if(e!==void 0){if("_tag"in e)return ye(e);const r=new xn(t,n,e.message);return ye(Qt(e.path)?new rr(e.path,n,r):r)}return fe()},Nfe=(e,t,n)=>{if(Rle(e))return UN(e,t,n);if(Qt(e)){const r=xM(e,s=>UN(s,t,n));if(Qt(r))return ye(r.length===1?r[0]:new on(t,n,r))}return fe()};function es(e,t){return n=>{function r(i,a,o){return Nfe(e(i,a,o),o,i)}const s=new jI(n.ast,r,Ou(t));return qB(n,r,s)}}function KI(e,t,n){return class extends vt(n){static annotations(s){return KI(this.from,this.to,vi(this.ast,s))}static from=e;static to=t}}const Uo=N(e=>jr(e[0])&&jr(e[1]),(e,t,n)=>KI(e,t,new Vi(e.ast,t.ast,new oB(n.decode,n.encode)))),Ha=N(e=>jr(e[0])&&jr(e[1]),(e,t,n)=>Uo(e,t,{strict:!0,decode:(r,s,i,a)=>Yr(n.decode(r,a)),encode:(r,s,i,a)=>Yr(n.encode(r,a))})),Rfe=Symbol.for("effect/SchemaId/Trimmed"),Ofe=e=>t=>t.pipe(es(n=>n===n.trim(),{schemaId:Rfe,title:"trimmed",description:"a string with no leading or trailing whitespace",jsonSchema:{pattern:"^\\S[\\s\\S]*\\S$|^\\S$|^$"},...e})),Lfe=Wle,Dfe=(e,t)=>n=>n.pipe(es(r=>r.length<=e,{schemaId:Lfe,title:`maxLength(${e})`,description:`a string at most ${e} character(s) long`,jsonSchema:{maxLength:e},...t})),$fe=Kle,Mfe=(e,t)=>n=>n.pipe(es(r=>r.length>=e,{schemaId:$fe,title:`minLength(${e})`,description:`a string at least ${e} character(s) long`,jsonSchema:{minLength:e},...t})),VN=Jle,jfe=(e,t)=>n=>{const r=_s(e)?Math.max(0,Math.floor(e.min)):Math.max(0,Math.floor(e)),s=_s(e)?Math.max(r,Math.floor(e.max)):r;return r!==s?n.pipe(es(i=>i.length>=r&&i.length<=s,{schemaId:VN,title:`length({ min: ${r}, max: ${s})`,description:`a string at least ${r} character(s) and at most ${s} character(s) long`,jsonSchema:{minLength:r,maxLength:s},...t})):n.pipe(es(i=>i.length===r,{schemaId:VN,title:`length(${r})`,description:r===1?"a single character":`a string ${r} character(s) long`,jsonSchema:{minLength:r,maxLength:r},...t}))},HN=Symbol.for("effect/SchemaId/Pattern"),GB=(e,t)=>n=>{const r=e.source;return n.pipe(es(s=>(e.lastIndex=0,e.test(s)),{schemaId:HN,[HN]:{regex:e},description:`a string matching the pattern ${r}`,jsonSchema:{pattern:r},...t}))},Ffe=e=>Mfe(1,{title:"nonEmptyString",description:"a non empty string",...e});class Bfe extends D.pipe(Ofe({identifier:"Trimmed"})){}class zfe extends Ha(D.annotations({description:"a string that will be trimmed"}),Bfe,{strict:!0,decode:t=>t.trim(),encode:ze}).annotations({identifier:"Trim"}){}const qN=e=>e instanceof Error?e.message:String(e),Ufe=e=>Uo(D.annotations({description:"a string to be decoded into JSON"}),fp,{strict:!0,decode:(t,n,r)=>dy({try:()=>JSON.parse(t,e?.reviver),catch:s=>new xn(r,t,qN(s))}),encode:(t,n,r)=>dy({try:()=>JSON.stringify(t,e?.replacer,e?.space),catch:s=>new xn(r,t,qN(s))})}).annotations({title:"parseJson",schemaId:XF}),KB=(e,t)=>jr(e)?Mc(KB(t),e):Ufe(e),Vfe=Symbol.for("effect/SchemaId/UUID"),GN=/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i;class Hfe extends D.pipe(GB(GN,{schemaId:Vfe,identifier:"UUID",jsonSchema:{format:"uuid",pattern:GN.source},description:"a Universally Unique Identifier",arbitrary:()=>t=>t.uuid()})){}const qfe=Vle,Gfe=(e,t)=>n=>n.pipe(es(r=>r>=e,{schemaId:qfe,title:`greaterThanOrEqualTo(${e})`,description:e===0?"a non-negative number":`a number greater than or equal to ${e}`,jsonSchema:{minimum:e},...t})),Kfe=DF,Wfe=e=>t=>t.pipe(es(n=>Number.isSafeInteger(n),{schemaId:Kfe,title:"int",description:"an integer",jsonSchema:{type:"integer"},...e})),Jfe=Hle,Yfe=(e,t)=>n=>n.pipe(es(r=>r<=e,{schemaId:Jfe,title:`lessThanOrEqualTo(${e})`,description:e===0?"a non-positive number":`a number less than or equal to ${e}`,jsonSchema:{maximum:e},...t}));class Qfe extends lt.pipe(Wfe({identifier:"Int"})){}const Xfe=(e,t)=>{const n=Symbol.keyFor(e);return n===void 0?$c(new xn(t,e,`Unable to encode a unique symbol ${String(e)} into a string`)):Yr(n)},Zfe=e=>Yr(Symbol.for(e)),KN=qle,_1=(e,t)=>n=>n.pipe(es(r=>r>=e,{schemaId:KN,[KN]:{min:e},title:`greaterThanOrEqualToBigInt(${e})`,description:e===0n?"a non-negative bigint":`a bigint greater than or equal to ${e}n`,...t})),WN=Gle,k1=(e,t)=>n=>n.pipe(es(r=>r<=e,{schemaId:WN,[WN]:{max:e},title:`lessThanOrEqualToBigInt(${e})`,description:e===0n?"a non-positive bigint":`a bigint less than or equal to ${e}n`,...t}));class WB extends Uo(D.annotations({description:"a string to be decoded into a bigint"}),VI,{strict:!0,decode:(t,n,r)=>Jde(Ale(t),()=>new xn(r,t,`Unable to decode ${JSON.stringify(t)} into a bigint`)),encode:t=>Yr(String(t))}).annotations({identifier:"BigInt"}){}class ehe extends dp(_K,{typeConstructor:{_tag:"Uint8Array"},identifier:"Uint8ArrayFromSelf",pretty:()=>t=>`new Uint8Array(${JSON.stringify(Array.from(t))})`,arbitrary:()=>t=>t.uint8Array(),equivalence:()=>g_(je)}){}const the=Yle,uE=(e,t)=>n=>{const r=Math.floor(e);if(r<0)throw new Error(Ole(`Expected an integer greater than or equal to 0, actual ${e}`));return n.pipe(es(s=>s.length===r,{schemaId:the,title:`itemsCount(${r})`,description:`an array of exactly ${r} item(s)`,jsonSchema:{minItems:r,maxItems:r},[GF]:!0,...t}))},JN=Symbol.for("effect/SchemaId/ValidDate"),nhe=e=>t=>t.pipe(es(n=>!Number.isNaN(n.getTime()),{schemaId:JN,[JN]:{noInvalidDate:!0},title:"validDate",description:"a valid Date",...e})),YN=Ule;class rhe extends dp(M$,{typeConstructor:{_tag:"Date"},identifier:"DateFromSelf",schemaId:YN,[YN]:{noInvalidDate:!1},description:"a potentially invalid Date instance",pretty:()=>t=>`new Date(${JSON.stringify(t)})`,arbitrary:()=>t=>t.date({noInvalidDate:!1}),equivalence:()=>kW}){}class she extends Ha(D.annotations({description:"a string to be decoded into a Date"}),rhe,{strict:!0,decode:t=>new Date(t),encode:t=>V$(t)}).annotations({identifier:"DateFromString"}){}class ihe extends she.pipe(nhe({identifier:"Date"})){}const ahe=e=>jr(e)||HI(e),JB=e=>Reflect.ownKeys(e).every(t=>ahe(e[t])),WI=e=>"fields"in e?e.fields:WI(e[HB]),YB=e=>JB(e)?ce(e):jr(e)?e:ce(WI(e)),QB=e=>JB(e)?e:WI(e),ohe=e=>FB(yh(Re(e)),()=>e),Kd=e=>(t,n,r)=>{class s extends aI{}s.prototype.name=t;const i=QB(n),a=YB(n),o={_tag:ohe(t)},c=O0(o,i),u="message"in c;class l extends L0({kind:"TaggedError",identifier:t,schema:y1(a,ce(o)),fields:c,Base:s,annotations:r,disableToString:!0}){static _tag=t}return u||Object.defineProperty(l.prototype,"message",{get(){return`{ ${Reflect.ownKeys(i).map(d=>`${Lm(d)}: ${za(this[d])}`).join(", ")} }`},enumerable:!1,configurable:!0}),l},O0=(e,t)=>{const n={...e};for(const r of Reflect.ownKeys(t)){if(r in e)throw new Error(LF(r));n[r]=t[r]}return n};function E1(e){return Oo(e)?e:e?.disableValidation??!1}const QN=$e("effect/Schema/astCache",()=>new WeakMap),che=e=>e===void 0?[]:Array.isArray(e)?e:[e],L0=({Base:e,annotations:t,disableToString:n,fields:r,identifier:s,kind:i,schema:a})=>{const o=Symbol.for(`effect/Schema/${i}/${s}`),[c,u,l]=che(t),d=FN(a),f=d.annotations({identifier:s,...c}),h=d.annotations({[Gl]:`${s} (Type side)`,...c}),m=a.annotations({[Gl]:`${s} (Constructor)`,...c}),y=a.annotations({[Gl]:`${s} (Encoded side)`,...l}),g=a.annotations({...l,...c,...u}),p=k=>Ne(k,o)&&Qde(h)(k),_=class extends e{constructor(k={},v=!1){k={...k},delete k._tag,k=BB(r,k),E1(v)||(k=h1(m)(k)),super(k,!0)}static[bd]=YS;static get ast(){let k=QN.get(this);if(k)return k;const v=dp([a],{decode:()=>(w,S,T)=>w instanceof this||p(w)?Yr(w):$c(new xn(T,w)),encode:()=>(w,S)=>w instanceof this?Yr(w):ar(yB(h)(w,S),T=>new this(T,!0))},{identifier:s,pretty:w=>S=>`${s}(${w(S)})`,arbitrary:w=>S=>w(S).map(T=>new this(T)),equivalence:ze,[ny]:f.ast,...c});return k=Ha(y,v,{strict:!0,decode:w=>new this(w,!0),encode:ze}).annotations({[ny]:g.ast,...u}).ast,QN.set(this,k),k}static pipe(){return Se(this,arguments)}static annotations(k){return vt(this.ast).annotations(k)}static toString(){return`(${String(y)} <-> ${s})`}static make(...k){return new this(...k)}static fields={...r};static identifier=s;static extend(k){return(v,w)=>{const S=QB(v),T=YB(v),I=O0(r,S);return L0({kind:i,identifier:k,schema:y1(a,T),fields:I,Base:this,annotations:w})}}static transformOrFail(k){return(v,w,S)=>{const T=O0(r,v);return L0({kind:i,identifier:k,schema:Uo(a,FN(ce(T)),w),fields:T,Base:this,annotations:S})}}static transformOrFailFrom(k){return(v,w,S)=>{const T=O0(r,v);return L0({kind:i,identifier:k,schema:Uo(hfe(a),ce(T),w),fields:T,Base:this,annotations:S})}}get[o](){return o}};return n!==!0&&Object.defineProperty(_.prototype,"toString",{value(){return`${s}({ ${Reflect.ownKeys(r).map(k=>`${Lm(k)}: ${za(this[k])}`).join(", ")} })`},configurable:!0,writable:!0}),_},XN=Cfe("symbol",{key:D}).annotations({description:"an object to be decoded into a globally shared symbol"}),uhe=Uo(XN,Efe,{strict:!0,decode:e=>Zfe(e.key),encode:(e,t,n)=>ar(Xfe(e,n),r=>XN.make({key:r}))});class lhe extends Hs(D,lt,uhe).annotations({identifier:"PropertyKey"}){}class dhe extends ce({_tag:yh(Re("Pointer","Unexpected","Missing","Composite","Refinement","Transformation","Type","Forbidden")).annotations({description:"The tag identifying the type of parse issue"}),path:yh(Qe(lhe)).annotations({description:"The path to the property where the issue occurred"}),message:yh(D).annotations({description:"A descriptive message explaining the issue"})}).annotations({identifier:"ArrayFormatterIssue",description:"Represents an issue returned by the ArrayFormatter formatter"}){}const XB=(e,t)=>{class n extends aI{_tag=t}return n.prototype[e]=e,n.prototype.name=t,n},fhe=li,hhe=Ud,mhe=uF,phe=kI,ZN=EI,ghe=Pue,ZB=Symbol.for("effect/Subscribable"),e8=e=>Ne(e,ZB),bhe="effect/SubscriptionRef",yhe=Symbol.for(bhe),_he=N(2,(e,t)=>F(Yte(e.ref,t),pI(Cce(e.pubsub,t)),e.semaphore.withPermits(1))),ZS=yhe,eR=_he,khe="~effect-atom/atom/Result",w1={[khe]:{E:ze,A:ze},pipe(){return Se(this,arguments)},[Je](e){if(this._tag!==e._tag||this.waiting!==e.waiting)return!1;switch(this._tag){case"Initial":return!0;case"Success":return je(this.value,e.value);case"Failure":return je(this.cause,e.cause)}},[We](){const e=Xt(`${this._tag}:${this.waiting}`);return this._tag==="Initial"?qt(this,e):qt(this,ut(e)(this._tag==="Success"?Ce(this.value):Ce(this.cause)))}},t8=(e,t)=>e._tag==="Success"?Vo(e.value):hp(e.cause,{previous:t}),JI=e=>e._tag==="None"?Io(!0):S1(e.value),Ehe=e=>e._tag!=="Initial",Io=(e=!1)=>{const t=Object.create(w1);return t._tag="Initial",t.waiting=e,t},yu=e=>e._tag==="Success",Vo=(e,t)=>{const n=Object.create(w1);return n._tag="Success",n.value=e,n.waiting=t?.waiting??!1,n.timestamp=t?.timestamp??Date.now(),n},n8=e=>e._tag==="Failure",whe=(e,t)=>{const n=Object.create(w1);return n._tag="Failure",n.cause=e,n.previousSuccess=t?.previousSuccess??fe(),n.waiting=t?.waiting??!1,n},hp=(e,t)=>whe(e,{previousSuccess:Qo(t.previous,n=>yu(n)?ye(n):n8(n)?n.previousSuccess:fe()),waiting:t.waiting}),She=(e,t)=>hp(I4(e),t),S1=(e,t)=>{if(e.waiting)return t?.touch?vhe(e):e;const n=Object.assign(Object.create(w1),e);return n.waiting=!0,n},vhe=e=>yu(e)?Vo(e.value,{waiting:e.waiting}):e,Qf=(e,t)=>e._tag==="Failure"?hp(e.cause,{previous:t,waiting:e.waiting}):e,r8=e=>e._tag==="Success"?ye(e.value):e._tag==="Failure"?Jr(e.previousSuccess,t=>t.value):fe(),ev=e=>gM(r8(e),()=>new Bd("Result.getOrThrow: no value found")),tR=e=>{switch(e._tag){case"Success":return fs(e.value);case"Failure":return _r(e.cause);default:return Fb(new Bd)}},xhe={immediate:!0},The=e=>{e()},lE="~effect-atom/atom/Registry",Ihe=e=>new Ahe(e?.initialValues,e?.scheduleTask,e?.timeoutResolution,e?.defaultIdleTTL),tv="~effect-atom/atom/Atom/Serializable",Sf=e=>tv in e?e[tv].key:e;class Ahe{scheduleTask;defaultIdleTTL;[lE];timeoutResolution;constructor(t,n=i=>queueMicrotask(i),r,s){if(this.scheduleTask=n,this.defaultIdleTTL=s,this[lE]=lE,r===void 0&&s!==void 0?this.timeoutResolution=Math.round(s/2):this.timeoutResolution=r??1e3,t!==void 0)for(const[i,a]of t)this.ensureNode(i).setValue(a)}nodes=new Map;preloadedSerializable=new Map;timeoutBuckets=new Map;nodeTimeoutBucket=new Map;disposed=!1;getNodes(){return this.nodes}get(t){return this.ensureNode(t).value()}set(t,n){t.write(this.ensureNode(t).writeContext,n)}setSerializable(t,n){this.preloadedSerializable.set(t,n)}modify(t,n){const r=this.ensureNode(t),s=n(r.value());return t.write(r.writeContext,s[1]),s[0]}update(t,n){const r=this.ensureNode(t);t.write(r.writeContext,n(r.value()))}refresh=t=>{t.refresh!==void 0?t.refresh(this.refresh):this.invalidateAtom(t)};subscribe(t,n,r){const s=this.ensureNode(t);r?.immediate&&n(s.value());const i=s.subscribe(function(){n(s._value)});return()=>{i(),s.canBeRemoved&&this.scheduleNodeRemoval(s)}}mount(t){return this.subscribe(t,Xl,xhe)}atomHasTtl(t){return!t.keepAlive&&t.idleTTL!==0&&(t.idleTTL!==void 0||this.defaultIdleTTL!==void 0)}ensureNode(t){const n=Sf(t);let r=this.nodes.get(n);if(r===void 0?(r=this.createNode(t),this.nodes.set(n,r)):this.atomHasTtl(t)&&this.removeNodeTimeout(r),typeof n=="string"&&this.preloadedSerializable.has(n)){const s=this.preloadedSerializable.get(n);this.preloadedSerializable.delete(n);const i=t[tv].decode(s);r.setValue(i)}return r}createNode(t){if(this.disposed)throw new Error(`Cannot access Atom ${t}: registry is disposed`);return t.keepAlive||this.scheduleAtomRemoval(t),new Che(this,t)}invalidateAtom=t=>{this.ensureNode(t).invalidate()};scheduleAtomRemoval(t){this.scheduleTask(()=>{const n=this.nodes.get(Sf(t));n!==void 0&&n.canBeRemoved&&this.removeNode(n)})}scheduleNodeRemoval(t){this.scheduleTask(()=>{t.canBeRemoved&&this.removeNode(t)})}removeNode(t){this.atomHasTtl(t.atom)?this.setNodeTimeout(t):(this.nodes.delete(Sf(t.atom)),t.remove())}setNodeTimeout(t){if(this.nodeTimeoutBucket.has(t))return;let n=t.atom.idleTTL??this.defaultIdleTTL;if(this.#e!==null&&(n-=this.#e,n<=0)){this.nodes.delete(Sf(t.atom)),t.remove();return}const r=Math.ceil(n/this.timeoutResolution)*this.timeoutResolution,s=Date.now()+r,i=s-s%this.timeoutResolution+this.timeoutResolution;let a=this.timeoutBuckets.get(i);a===void 0&&(a=[new Set,setTimeout(()=>this.sweepBucket(i),i-Date.now())],this.timeoutBuckets.set(i,a)),a[0].add(t),this.nodeTimeoutBucket.set(t,i)}removeNodeTimeout(t){const n=this.nodeTimeoutBucket.get(t);if(n===void 0)return;this.nodeTimeoutBucket.delete(t),this.scheduleNodeRemoval(t);const[r,s]=this.timeoutBuckets.get(n);r.delete(t),r.size===0&&(clearTimeout(s),this.timeoutBuckets.delete(n))}#e=null;sweepBucket(t){const n=this.timeoutBuckets.get(t)[0];this.timeoutBuckets.delete(t),n.forEach(r=>{this.nodeTimeoutBucket.delete(r),r.canBeRemoved&&(this.nodes.delete(Sf(r.atom)),this.#e=r.atom.idleTTL??this.defaultIdleTTL,r.remove(),this.#e=null)})}reset(){this.timeoutBuckets.forEach(([,t])=>clearTimeout(t)),this.timeoutBuckets.clear(),this.nodeTimeoutBucket.clear(),this.nodes.forEach(t=>t.remove()),this.nodes.clear()}dispose(){this.disposed=!0,this.reset()}}var Il;(function(e){e[e.alive=1]="alive",e[e.initialized=2]="initialized",e[e.waitingForValue=4]="waitingForValue"})(Il||(Il={}));var ei;(function(e){e[e.uninitialized=5]="uninitialized",e[e.stale=7]="stale",e[e.valid=3]="valid",e[e.removed=0]="removed"})(ei||(ei={}));class Che{registry;atom;constructor(t,n){this.registry=t,this.atom=n,this.writeContext=new Ohe(t,this)}state=ei.uninitialized;lifetime;writeContext;parents=[];previousParents;children=[];listeners=new Set;skipInvalidation=!1;get canBeRemoved(){return!this.atom.keepAlive&&this.listeners.size===0&&this.children.length===0&&this.state!==0}_value=void 0;value(){if((this.state&Il.waitingForValue)!==0){this.lifetime=Rhe(this);const t=this.atom.read(this.lifetime);if((this.state&Il.waitingForValue)!==0&&this.setValue(t),this.previousParents){const n=this.previousParents;this.previousParents=void 0;for(let r=0;r<n.length;r++)n[r].removeChild(this),n[r].canBeRemoved&&this.registry.scheduleNodeRemoval(n[r])}}return this._value}valueOption(){return(this.state&Il.initialized)===0?fe():ye(this._value)}setValue(t){if((this.state&Il.initialized)===0){this.state=ei.valid,this._value=t,yn.phase===Hi.collect?yn.notify.add(this):this.notify();return}this.state=ei.valid,!je(this._value,t)&&(this._value=t,this.skipInvalidation?this.skipInvalidation=!1:this.invalidateChildren(),this.listeners.size>0&&(yn.phase===Hi.collect?yn.notify.add(this):this.notify()))}addParent(t){if(this.parents.push(t),this.previousParents!==void 0){const n=this.previousParents.indexOf(t);n!==-1&&(this.previousParents[n]=this.previousParents[this.previousParents.length-1],this.previousParents.pop()===void 0&&(this.previousParents=void 0))}t.children.indexOf(this)===-1&&(t.children.push(this),t.skipInvalidation&&(t.skipInvalidation=!1))}removeChild(t){const n=this.children.indexOf(t);n!==-1&&(this.children[n]=this.children[this.children.length-1],this.children.pop())}invalidate(){this.state===ei.valid&&(this.state=ei.stale,this.disposeLifetime()),yn.phase===Hi.collect?yn.stale.push(this):this.atom.lazy&&this.listeners.size===0&&!Phe(this.children)?(this.invalidateChildren(),this.skipInvalidation=!0):this.value()}invalidateChildren(){if(this.children.length===0)return;const t=this.children;this.children=[];for(let n=0;n<t.length;n++)t[n].invalidate()}notify(){this.listeners.forEach(The),yn.phase===Hi.commit&&yn.notify.delete(this)}disposeLifetime(){this.lifetime!==void 0&&(this.lifetime.dispose(),this.lifetime=void 0),this.parents.length!==0&&(this.previousParents=this.parents,this.parents=[])}remove(){if(this.state=ei.removed,this.listeners.clear(),this.lifetime===void 0||(this.disposeLifetime(),this.previousParents===void 0))return;const t=this.previousParents;this.previousParents=void 0;for(let n=0;n<t.length;n++)t[n].removeChild(this),t[n].canBeRemoved&&this.registry.removeNode(t[n])}subscribe(t){return this.listeners.add(t),()=>this.listeners.delete(t)}}function Phe(e){if(e.length===0)return!1;let t=e,n,r=0;for(;t!==void 0;){for(let s=0,i=t.length;s<i;s++){const a=t[s];if(!a.atom.lazy||a.listeners.size>0)return!0;a.children.length>0&&(n===void 0?n=[a.children]:n.push(a.children))}t=n?.[r++]}return!1}const sr=e=>new Error(`Cannot use context of disposed Atom: ${e}`),Nhe={get registry(){return this.node.registry},addFinalizer(e){if(this.disposed)throw sr(this.node.atom);this.finalizers??=[],this.finalizers.push(e)},get(e){if(this.disposed)throw sr(this.node.atom);const t=this.node.registry.ensureNode(e);return this.node.addParent(t),t.value()},result(e,t){if(this.disposed)throw sr(this.node.atom);if(this.isFn)return this.resultOnce(e,t);const n=this.get(e);if(t?.suspendOnWaiting&&n.waiting)return Jc;switch(n._tag){case"Initial":return Jc;case"Failure":return _r(n.cause);case"Success":return Dt(n.value)}},resultOnce(e,t){if(this.disposed)throw sr(this.node.atom);return RS(n=>{const r=this.once(e);if(r._tag!=="Initial"&&!(t?.suspendOnWaiting&&r.waiting))return n(tR(r));const s=this.node.registry.subscribe(e,i=>{i._tag==="Initial"||t?.suspendOnWaiting&&i.waiting||(s(),n(tR(i)))},{immediate:!1});return Ft(s)})},setResult(e,t){if(this.disposed)throw sr(this.node.atom);return this.node.registry.set(e,t),this.resultOnce(e,{suspendOnWaiting:!0})},some(e){if(this.disposed)throw sr(this.node.atom);if(this.isFn)return this.someOnce(e);const t=this.get(e);return t._tag==="None"?Jc:Dt(t.value)},someOnce(e){if(this.disposed)throw sr(this.node.atom);return RS(t=>{const n=this.once(e);if(mt(n))return t(Dt(n.value));const r=this.node.registry.subscribe(e,s=>{Tn(s)||(r(),t(Dt(s.value)))},{immediate:!1});return Ft(r)})},once(e){if(this.disposed)throw sr(this.node.atom);return this.node.registry.get(e)},self(){if(this.disposed)throw sr(this.node.atom);return this.node.valueOption()},refresh(e){if(this.disposed)throw sr(this.node.atom);this.node.registry.refresh(e)},refreshSelf(){if(this.disposed)throw sr(this.node.atom);this.node.invalidate()},mount(e){if(this.disposed)throw sr(this.node.atom);this.addFinalizer(this.node.registry.mount(e))},subscribe(e,t,n){if(this.disposed)throw sr(this.node.atom);this.addFinalizer(this.node.registry.subscribe(e,t,n))},setSelf(e){if(this.disposed)throw sr(this.node.atom);this.node.setValue(e)},set(e,t){if(this.disposed)throw sr(this.node.atom);this.node.registry.set(e,t)},stream(e,t){if(this.disposed)throw sr(this.node.atom);return F(Yb(w5(t?.bufferSize??16),Zb),h5(n=>Yb(Ft(()=>this.node.registry.subscribe(e,r=>{Oce(n,r)},{immediate:t?.withoutInitialValue!==!0})),r=>Ft(r))),At(n=>yle(n)),xF)},streamResult(e,t){return F(this.stream(e,t),gle(Ehe),ble(n=>n._tag==="Success"?Ele(n.value):ple(n.cause)))},dispose(){if(this.disposed=!0,this.finalizers===void 0)return;const e=this.finalizers;this.finalizers=void 0;for(let t=e.length-1;t>=0;t--)e[t]()}},Rhe=e=>{function t(n){if(t.disposed)throw sr(n);if(t.isFn)return e.registry.get(n);const r=e.registry.ensureNode(n),s=r.value();return e.addParent(r),s}return Object.setPrototypeOf(t,Nhe),t.isFn=!1,t.disposed=!1,t.finalizers=void 0,t.node=e,t};class Ohe{registry;node;constructor(t,n){this.registry=t,this.node=n}get(t){return this.registry.get(t)}set(t,n){return this.registry.set(t,n)}setSelf(t){return this.node.setValue(t)}refreshSelf(){return this.node.invalidate()}}var Hi;(function(e){e[e.disabled=0]="disabled",e[e.collect=1]="collect",e[e.commit=2]="commit"})(Hi||(Hi={}));const yn=$e("@effect-atom/atom/Registry/batchState",()=>({phase:Hi.disabled,depth:0,stale:[],notify:new Set}));function Lhe(e){yn.phase=Hi.collect,yn.depth++;try{if(e(),yn.depth===1){for(let t=0;t<yn.stale.length;t++)s8(yn.stale[t]);yn.phase=Hi.commit;for(const t of yn.notify)t.notify();yn.notify.clear()}}finally{yn.depth--,yn.depth===0&&(yn.phase=Hi.disabled,yn.stale=[])}}function s8(e){if(e.state!==ei.valid){for(let t=0;t<e.parents.length;t++){const n=e.parents[t];n.state!==ei.valid&&s8(n)}e.state!==ei.valid&&e.value()}}const Dhe=e=>{const t=e;switch(t._tag){case"Failure":case"Success":return t;case"Left":return Fb(t.left);case"Right":return fs(t.right);case"Some":return fs(t.value);case"None":return Fb(new Bd)}},YI=e=>{const t=i1(e);return(n,r,s=!1)=>{const i=Dhe(n);if(i){r(i);return}const a=new J_,o=t(n,{scheduler:a});a.flush();const c=o.unsafePoll();if(c){r(c);return}o.addObserver(r);function u(){o.removeObserver(r),s||o.unsafeInterruptAsFork(gs)}return u}},i8=Ihe;class a8 extends Fr("@effect/atom/Registry/CurrentRegistry")(){}const nv="~effect-atom/atom/Atom",rv="~effect-atom/atom/Atom/Writable",$he=N(2,(e,t)=>{const n=bi(t),r=AY(n);return Object.assign(Object.create(Object.getPrototypeOf(e)),{...e,keepAlive:!r,idleTTL:r?vb(n):void 0})}),gm=$he(0),QI={[nv]:nv,pipe(){return Se(this,arguments)},toJSON(){return{_id:"Atom",keepAlive:this.keepAlive,lazy:this.lazy,label:this.label}},toString(){return Mt(this)},[yt](){return this.toJSON()}},Mhe={...QI,atom(e,t){const n=o8(e,t);return qi(r=>{const s=r.self(),i=r(this);return i._tag!=="Success"?Qf(i,s):n(r,i.value)})},fn(e,t){return arguments.length===0?(n,r)=>nR(this,n,r):nR(this,e,t)},pull(e,t){const n=gm(my(0)),r=qi(s=>{const i=s.self(),a=s(this);return a._tag!=="Success"?Qf(a,i):_h(s,Jhe(s,n,e,t),Io(!0),a.value)});return Yhe(n,r)},subscriptionRef(e){return Hhe(gm(qi(t=>{const n=t.self(),r=t(this);if(r._tag!=="Success")return Qf(r,n);const s=typeof e=="function"?e(t):e;return ZS in s?s:_h(t,s,Io(!0),r.value)})),(t,n)=>{const r=ev(t(this));return iR(t,n,r)})},subscribable(e){return qhe(qi(t=>{const n=t.self(),r=t(this);if(r._tag!=="Success")return Qf(r,n);const s=typeof e=="function"?e(t):e;return e8(s)?s:_h(t,s,Io(!0),r.value)}),(t,n)=>{const r=ev(t(this));return iR(t,n,r)})}},nR=(e,t,n)=>{const[r,s,i]=Khe(n?.reactivityKeys?(a,o)=>{const c=t(a,o);return Zo(c)?xle(c,n.reactivityKeys):SF(c,Tle(n.reactivityKeys))}:t,n);return mp(a=>{a.get(i);const o=a.self(),c=a.get(e);return c._tag!=="Success"?Qf(c,o):r(a,c.value)},s)},jhe={...QI,[rv]:rv},Fhe=e=>rv in e,qi=(e,t)=>{const n=Object.create(QI);return n.keepAlive=!1,n.lazy=!0,n.read=e,n.refresh=t,n},mp=(e,t,n)=>{const r=Object.create(jhe);return r.keepAlive=!1,r.lazy=!0,r.read=e,r.write=t,r.refresh=n,r};function Bhe(e,t){e.setSelf(t)}const qa=(e,t)=>{const n=o8(e,t);return nv in n?n:qi(n)},rR=e=>DW in e||TW in e,o8=(e,t)=>{if(typeof e=="function"&&!Zo(e)&&!(eE in e)){const n=e;return function(r,s){const i=n(r);if(_s(i)){if(rR(i))return i;if(NS in i)return sv(r,i,t,s);if(eE in i)return sR(r,i,t,s)}return i}}else if(_s(e)){if(rR(e))return my(e);if(NS in e)return function(n,r){return sv(n,e,t,r)};if(eE in e)return function(n,r){return sR(n,e,t,r)}}return my(e)},my=e=>mp(function(t){return e},Bhe),sv=(e,t,n,r)=>{const s=n?.initialValue!==void 0?Vo(n.initialValue):Io();return _h(e,t,s,r,n?.uninterruptible)};function _h(e,t,n,r=a1,s=!1){const i=e.self(),a=zs($4());e.addFinalizer(()=>{r1(Kb(a,GT))});const o=new Map(r.context.unsafeMap);o.set(Die.key,a),o.set(a8.key,e.registry);const c=gI({context:mW(o),fiberRefs:r.fiberRefs,runtimeFlags:r.runtimeFlags});let u,l=!1;const d=YI(c)(t,function(f){u=t8(f,i),l&&e.setSelf(u)},s);return l=!0,d!==void 0&&e.addFinalizer(d),u!==void 0?u:i._tag==="Some"?JI(i):S1(n)}const zhe=e=>{let t=tE;function n(s){const i=Object.create(Mhe);i.keepAlive=!1,i.lazy=!0,i.refresh=void 0,i.factory=n;const a=Ga(qi(typeof s=="function"?o=>Gk(s(o),t):()=>Gk(s,t)));return i.layer=a,i.read=function(c){const u=c(a),l=Le(Le(n1,d=>cN(u,e.memoMap,d)),d=>dm(np(),d));return sv(c,l,{uninterruptible:!0})},i}n.memoMap=e.memoMap,n.addGlobalLayer=s=>{t=Gk(t,Qoe(s,tE))};const r=gm(qa(Eoe(s=>cN(tE,e.memoMap,s)).pipe(At(ci(ap)))));return n.withReactivity=s=>i=>Qhe(i,a=>{const o=ev(a(r));return a.addFinalizer(o.unsafeRegister(s,()=>{a.refresh(i)})),a.subscribe(i,c=>a.setSelf(c)),a.once(i)}),n},Uhe=$e("@effect-atom/atom/Atom/defaultMemoMap",()=>zs(Xoe)),Vhe=$e("@effect-atom/atom/Atom/defaultContext",()=>zhe({memoMap:Uhe}));Vhe.withReactivity;const sR=(e,t,n,r)=>{const s=n?.initialValue!==void 0?Vo(n.initialValue):Io();return XI(e,t,s,r)};function XI(e,t,n,r=a1){const s=e.self(),i=hhe({onInput(c){return phe(()=>{const u=xJ(c);return u._tag==="Some"&&e.setSelf(Vo(u.value,{waiting:!0})),i})},onFailure(c){return ZN(()=>{e.setSelf(hp(c,{previous:e.self()}))})},onDone(c){return ZN(()=>{F(e.self(),Qo(r8),hn({onNone:()=>e.setSelf(She(new Bd,{previous:e.self()})),onSome:u=>e.setSelf(Vo(u))}))})}}),a=gI({context:ds(r.context,a8,e.registry),fiberRefs:r.fiberRefs,runtimeFlags:r.runtimeFlags}),o=YI(a)(mhe(fhe(vF(t),i)),Xl,!1);return o!==void 0&&e.addFinalizer(o),s._tag==="Some"?JI(s):S1(n)}const iR=(e,t,n=a1)=>ZB in t?(e.addFinalizer(t.changes.pipe(kle(r=>(e.setSelf(r),bt)),joe(n))),Moe(n)(t.get)):t._tag!=="Success"?t:XI(e,t.value.changes,Io(!0),n),Hhe=(e,t)=>{function n(r,s){const i=r.get(e);ZS in i?zs(eR(i,s)):yu(i)&&zs(eR(i.value,s))}return mp(r=>{const s=r(e);return ZS in s||yu(s)?t(r,s):s},n)},qhe=(e,t)=>qi(n=>{const r=n(e);return e8(r)||yu(r)?t(n,r):r}),Ghe=Symbol.for("@effect-atom/atom/Atom/Reset"),dE=Symbol.for("@effect-atom/atom/Atom/Interrupt");function Khe(e,t){const n=gm(my([0,void 0])),r=t?.initialValue!==void 0?Vo(t.initialValue):Io(),s=t?.concurrent?gm(qi(o=>{const c=new Set;return o.addFinalizer(()=>c.forEach(u=>u.unsafeInterruptAsFork(gs))),c})):void 0;function i(o,c){const u=s?o(s):void 0;o.isFn=!0;const[l,d]=o.get(n);if(l===0)return r;if(d===dE)return hp(A4(gs),{previous:o.self()});let f=e(d,o);if(NS in f){if(u){const h=f;f=Le(np(),m=>{const y=i1(m,h);u.add(y);const g=Array.from(u);return y.addObserver(()=>u.delete(y)),Whe(g)})}return _h(o,f,r,c,!1)}return XI(o,f,r,c)}function a(o,c){Xhe(()=>{c===Ghe?o.set(n,[0,void 0]):c===dE?o.set(n,[o.get(n)[0]+1,dE]):o.set(n,[o.get(n)[0]+1,c]),o.refreshSelf()})}return[i,a,n]}const Whe=e=>RS(t=>{let n=0,r,s;function i(o,c=!1){o._tag==="Failure"?r=r?Zse(o.cause,r):o.cause:r||(s=o),n++,c||a()}function a(){for(;n<e.length;){const o=e[n],c=o.unsafePoll();if(!c)return o.addObserver(i);i(c,!0)}t(r?_r(r):s||_r(Xse))}return a(),Ft(()=>{n<e.length&&e[n].removeObserver(i)})}),Jhe=(e,t,n,r)=>Le(ghe(vF(typeof n=="function"?n(e):n)),s=>{const i=Coe(1),a=FW(tae()),o=a.currentContext;let c=dr();const u=Le(Toe(dn(()=>s),g5,o),Wr({onLeft:()=>{const h=Fs(c);return $l(h)?Dt({done:!0,items:h}):na(new Bd("Atom.pull: no items"))},onRight(h){let m;r?.disableAccumulation?m=h:(m=Sn(c,h),c=m);const y=Fs(m);return $l(y)?Dt({done:!1,items:y}):u}})),l=i.withPermits(1)(u),d=YI(gI({context:o,fiberRefs:a.getFiberRefs(),runtimeFlags:a1.runtimeFlags})),f=new Set;return e.addFinalizer(()=>{for(const h of f)h()}),e.once(t),e.subscribe(t,()=>{e.setSelf(JI(e.self()));let h;h=d(l,m=>{h&&f.delete(h);const y=t8(m,e.self()),g=f.size>0;e.setSelf(g?S1(y):y)}),h&&f.add(h)}),u}),Yhe=(e,t)=>mp(t.read,function(n,r){n.set(e,n.get(e)+1)}),pp=typeof WeakRef>"u"||typeof FinalizationRegistry>"u"?e=>{const t=bS();return function(n){const r=Sa(t,n);if(r._tag==="Some")return r.value;const s=e(n);return Tc(t,n,s),s}}:e=>{const t=bS(),n=new FinalizationRegistry(r=>{xre(t,r)});return function(r){const s=Sa(t,r).pipe(bM(a=>a.deref()));if(s._tag==="Some")return s.value;const i=e(r);return Tc(t,r,new WeakRef(i)),n.register(i,r),i}},Ga=e=>Object.assign(Object.create(Object.getPrototypeOf(e)),{...e,keepAlive:!0}),Qhe=N(2,(e,t)=>Fhe(e)?mp(t,function(n,r){n.set(e,r)},e.refresh??function(n){n(e)}):qi(t,e.refresh??function(n){n(e)})),Xhe=Lhe,aR="~effect-atom/atom/Atom/ServerValue",Zhe=N(2,(e,t)=>aR in e?e[aR](n=>t.get(n)):t.get(e)),D0=Symbol.for("@effect/platform/HttpApiSchema/AnnotationMultipart"),$0=Symbol.for("@effect/platform/HttpApiSchema/AnnotationMultipartStream"),kh=Symbol.for("@effect/platform/HttpApiSchema/AnnotationStatus"),M0=Symbol.for("@effect/platform/HttpApiSchema/AnnotationEmptyDecodeable"),Eh=Symbol.for("@effect/platform/HttpApiSchema/AnnotationEncoding"),wh=Symbol.for("@effect/platform/HttpApiSchema/AnnotationParam"),c8=e=>{const t={};return kh in e&&(t[kh]=e[kh]),M0 in e&&(t[M0]=e[M0]),Eh in e&&(t[Eh]=e[Eh]),wh in e&&(t[wh]=e[wh]),D0 in e&&(t[D0]=e[D0]),$0 in e&&(t[$0]=e[$0]),t},eme=e=>e._tag==="Transformation"?{...e.to.annotations,...e.annotations}:e.annotations,gp=(e,t)=>eme(e)[t],u8=(e,t)=>gp(e,kh)??t,l8=e=>gp(e,M0)??!1,tme=e=>gp(e,D0),nme=e=>gp(e,$0),rme={kind:"Json",contentType:"application/json"},bp=(e,t=rme)=>gp(e,Eh)??t,sme=e=>(e._tag==="PropertySignatureTransformation"?e.to.annotations:e.annotations)[wh]?.name,Ei=e=>{const t=AB(e,"status");return e.status!==void 0&&(t[kh]=e.status),t},iv=e=>{switch(e._tag){case"VoidKeyword":return!0;case"Transformation":return iv(e.from);case"Suspend":return iv(e.f());default:return!1}},ime=e=>u8(e,iv(e)?204:200),fE=e=>u8(e,500),av=e=>{function t(r){if(d1(r))for(const s of r.types)t(s);else n.push(r)}const n=[];return t(e),n},d8=(e,t)=>Kn.make(Array.from(new Set([...av(e),...av(t)]))),Ao=(e,t)=>vt(d8(e.ast,t.ast)),Sr=N(2,(e,t)=>{const n={[wh]:{name:e,schema:t}};if(jr(t)){const r=op(t.ast);mt(r)&&(n[Hd]=r.value)}return t.annotations(n)}),ame=e=>kfe.annotations(Ei({status:e})),ov=ame(204),ome=e=>{switch(e){case"Json":return"application/json";case"UrlParams":return"application/x-www-form-urlencoded";case"Uint8Array":return"application/octet-stream";case"Text":return"text/plain"}},cme=N(2,(e,t)=>e.annotations({[Eh]:{kind:t.kind,contentType:t.contentType??ome(t.kind)},...t.kind==="Uint8Array"?{jsonSchema:{type:"string",format:"binary"}}:void 0})),f8=e=>cme(D,{kind:"Text",...e});class ume extends dhe.annotations({identifier:"Issue",description:"Represents an error encountered while parsing a value to match the schema"}){}class py extends Kd()("HttpApiDecodeError",{issues:Qe(ume),message:D},Ei({status:400,description:"The request did not match the expected schema"})){static fromParseError(t){return bh.formatError(t).pipe(Qb(gh.formatError(t)),At(([n,r])=>new py({issues:n,message:r})))}static refailParseError(t){return Le(py.fromParseError(t),na)}}const oR=Symbol.for("@effect/platform/HttpApi"),lme={[oR]:oR,pipe(){return Se(this,arguments)},add(e){return no({identifier:this.identifier,groups:YW(this.groups,e.identifier,e),errorSchema:this.errorSchema,annotations:this.annotations,middlewares:this.middlewares})},addHttpApi(e){const t={...this.groups};for(const n in e.groups){const r=e.groups[n].annotateContext(gi());r.annotations=Zr(e.annotations,r.annotations),r.middlewares=new Set([...e.middlewares,...r.middlewares]),t[n]=r}return no({identifier:this.identifier,groups:t,errorSchema:Ao(this.errorSchema,e.errorSchema),annotations:this.annotations,middlewares:this.middlewares})},addError(e,t){return no({identifier:this.identifier,groups:this.groups,errorSchema:Ao(this.errorSchema,t?.status?e.annotations(Ei({status:t.status})):e),annotations:this.annotations,middlewares:this.middlewares})},prefix(e){return no({identifier:this.identifier,groups:wl(this.groups,t=>t.prefix(e)),errorSchema:this.errorSchema,annotations:this.annotations,middlewares:this.middlewares})},middleware(e){return no({identifier:this.identifier,groups:this.groups,errorSchema:Ao(this.errorSchema,e.failure),annotations:this.annotations,middlewares:new Set([...this.middlewares,e])})},annotate(e,t){return no({identifier:this.identifier,groups:this.groups,errorSchema:this.errorSchema,annotations:ds(this.annotations,e,t),middlewares:this.middlewares})},annotateContext(e){return no({identifier:this.identifier,groups:this.groups,errorSchema:this.errorSchema,annotations:Zr(this.annotations,e),middlewares:this.middlewares})}},no=e=>{function t(){}return Object.setPrototypeOf(t,lme),t.groups=e.groups,t.errorSchema=e.errorSchema,t.annotations=e.annotations,t.middlewares=e.middlewares,t},dme=e=>no({groups:new Map,errorSchema:py,annotations:gi(),middlewares:new Set}),h8=(e,t)=>{const n=Wp(e.errorSchema.ast,new Map,fE),r=Object.values(e.groups);for(const s of r){const i=Wp(s.errorSchema.ast,n,fE),a=Zr(e.annotations,s.annotations);t.onGroup({group:s,mergedAnnotations:a});const o=Object.values(s.endpoints);for(const c of o){if(t.predicate&&!t.predicate({endpoint:c,group:s}))continue;const u=Wp(c.errorSchema.ast,i,fE);t.onEndpoint({group:s,endpoint:c,middleware:new Set([...s.middlewares,...c.middlewares]),mergedAnnotations:Zr(a,c.annotations),payloads:c.payloadSchema._tag==="Some"?hme(c.payloadSchema.value.ast):fme,successes:Wp(c.successSchema.ast,new Map,ime),errors:u})}}},fme=new Map,Wp=(e,t,n)=>{const r=new Map(t);function s(i){if(ZF(i))return;const a=c8(e.annotations);WW(a)||(i=Gd(i,{...a,...i.annotations}));const o=n(i),c=l8(i),u=r.get(o);r.set(o,{description:(u?u.description:fe()).pipe(Gi(()=>mme(i))),ast:(u?u.ast:fe()).pipe(Jr(l=>d8(l,i)),Gi(()=>!c&&bde(uy(i))?fe():ye(i)))})}return av(e).forEach(s),r},hme=e=>{const t=new Map;function n(r){if(r._tag==="NeverKeyword")return;r=Gd(r,{...c8(e.annotations),...r.annotations});const s=bp(r),i=tme(r)||nme(r)?"multipart/form-data":s.contentType,a=t.get(i);a===void 0?t.set(i,{encoding:s,ast:r}):a.ast=Kn.make([a.ast,r])}if(e._tag==="Union")for(const r of e.types)n(r);else n(e);return t},mme=e=>{const t="to"in e?{...e.to.annotations,...e.annotations}:e.annotations;return Id(t[ra]??t[Hd])};class pme extends Fr("@effect/platform/HttpApi/AdditionalSchemas")(){}const Lu=e=>{const t=m8(e),n=[];for(let r=0;r<t.length;r++)if(Array.isArray(t[r][0])){const[s,i]=t[r];n.push([`${s[0]}[${s.slice(1).join("][")}]`,i])}else n.push(t[r]);return n},m8=e=>{const t=Symbol.iterator in e?It(e):Object.entries(e),n=[];for(const[r,s]of t)if(Array.isArray(s))for(let i=0;i<s.length;i++)s[i]!==void 0&&n.push([r,String(s[i])]);else if(typeof s=="object"){const i=m8(s);for(const[a,o]of i)n.push([[r,...typeof a=="string"?[a]:a],o])}else s!==void 0&&n.push([r,String(s)]);return n},p8=Qe(QS(D,D)).annotations({identifier:"UrlParams"}),gme=[],bme=N(2,(e,t)=>{const n=Lu(t),r=new Set;for(let s=0;s<n.length;s++)r.add(n[s][0]);for(let s=0;s<e.length;s++)r.has(e[s][0])||n.push(e[s]);return n}),yme=N(2,(e,t)=>qx(e,Lu(t))),_me=(e,t,n)=>{try{const r=new URL(e,kme());for(let s=0;s<t.length;s++){const[i,a]=t[s];a!==void 0&&r.searchParams.append(i,a)}return n._tag==="Some"&&(r.hash=n.value),He(r)}catch(r){return Be(r)}},g8=e=>new URLSearchParams(e).toString(),kme=()=>{if("location"in globalThis&&globalThis.location!==void 0&&globalThis.location.origin!==void 0&&globalThis.location.pathname!==void 0)return location.origin+location.pathname},Eme=e=>{const t=Object.create(null);for(const[n,r]of e){const s=t[n];s===void 0?t[n]=r:typeof s=="string"?t[n]=[s,r]:s.push(r)}return{...t}},wme=Ha(D,p8,{decode(e){return Lu(new URLSearchParams(e))},encode(e){return g8(e)}}),Sme=e=>Ha(p8,e,{decode(t){return Eme(t)},encode(t){return Lu(t)}}),vme=e=>Mc(wme,Sme(e)),j0=Symbol.for("@effect/platform/HttpBody");class ZI{[j0];constructor(){this[j0]=j0}[yt](){return this.toJSON()}toString(){return Mt(this)}}class xme extends ZI{_tag="Empty";toJSON(){return{_id:"@effect/platform/HttpBody",_tag:"Empty"}}}const Tme=new xme;class Ime extends ZI{body;contentType;_tag="Uint8Array";constructor(t,n){super(),this.body=t,this.contentType=n}get contentLength(){return this.body.length}toJSON(){return{_id:"@effect/platform/HttpBody",_tag:"Uint8Array",body:this.contentType.startsWith("text/")||this.contentType.endsWith("json")?new TextDecoder().decode(this.body):`Uint8Array(${this.body.length})`,contentType:this.contentType,contentLength:this.contentLength}}}const b8=(e,t)=>new Ime(e,t??"application/octet-stream"),Ame=new TextEncoder,y8=(e,t)=>b8(Ame.encode(e),t??"text/plain"),Cme=(e,t)=>y8(g8(e),t??"application/x-www-form-urlencoded");class Pme extends ZI{formData;_tag="FormData";constructor(t){super(),this.formData=t}toJSON(){return{_id:"@effect/platform/HttpBody",_tag:"FormData",formData:this.formData}}}const Nme=e=>new Pme(e),Rme=j0,Ome=e=>Ne(e,Rme),Lme=b8,cR=y8,Dme=Cme,uR=Symbol.for("@effect/platform/Cookies"),lR=Symbol.for("@effect/platform/Cookies/Cookie"),$me={[uR]:uR,...l_,toJSON(){return{_id:"@effect/platform/Cookies",cookies:wl(this.cookies,e=>e.toJSON())}},pipe(){return Se(this,arguments)}},Mme=e=>{const t=Object.create($me);return t.cookies=e,t},jme=e=>{const t={};for(const n of e)t[n.name]=n;return Mme(t)},Fme=e=>{const t=typeof e=="string"?[e]:e,n=[];for(const r of t){const s=Bme(r.trim());mt(s)&&n.push(s.value)}return jme(n)};function Bme(e){const t=e.split(";").map(o=>o.trim()).filter(o=>o!=="");if(t.length===0)return fe();const n=t[0].indexOf("=");if(n===-1)return fe();const r=t[0].slice(0,n);if(!zme.test(r))return fe();const s=t[0].slice(n+1),i=Ume(s);if(t.length===1)return ye(Object.assign(Object.create(dR),{name:r,value:i,valueEncoded:s}));const a={};for(let o=1;o<t.length;o++){const c=t[o],u=c.indexOf("="),l=u===-1?c:c.slice(0,u).trim(),d=u===-1?void 0:c.slice(u+1).trim();switch(l.toLowerCase()){case"domain":{if(d===void 0)break;const f=d.trim().replace(/^\./,"");f&&(a.domain=f);break}case"expires":{if(d===void 0)break;const f=new Date(d);isNaN(f.getTime())||(a.expires=f);break}case"max-age":{if(d===void 0)break;const f=parseInt(d,10);isNaN(f)||(a.maxAge=t6(f));break}case"path":{if(d===void 0)break;d[0]==="/"&&(a.path=d);break}case"priority":{if(d===void 0)break;switch(d.toLowerCase()){case"low":a.priority="low";break;case"medium":a.priority="medium";break;case"high":a.priority="high";break}break}case"httponly":{a.httpOnly=!0;break}case"secure":{a.secure=!0;break}case"partitioned":{a.partitioned=!0;break}case"samesite":{if(d===void 0)break;switch(d.toLowerCase()){case"lax":a.sameSite="lax";break;case"strict":a.sameSite="strict";break;case"none":a.sameSite="none";break}break}}}return ye(Object.assign(Object.create(dR),{name:r,value:i,valueEncoded:s,options:Object.keys(a).length>0?a:void 0}))}const zme=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,dR={[lR]:lR,...l_,toJSON(){return{_id:"@effect/platform/Cookies/Cookie",name:this.name,value:this.value,options:this.options}}},Ume=e=>{try{return decodeURIComponent(e)}catch{return e}},fR=Symbol.for("@effect/platform/Headers"),bm=Object.assign(Object.create(null),{[fR]:fR,[d_](e){return uv(this,kj(e,k8))}}),v1=e=>Object.assign(Object.create(bm),e),_8=Object.create(bm),eA=e=>{if(e===void 0)return _8;if(Symbol.iterator in e){const n=Object.create(bm);for(const[r,s]of e)n[r.toLowerCase()]=s;return n}const t=Object.create(bm);for(const[n,r]of Object.entries(e))Array.isArray(r)?t[n.toLowerCase()]=r.join(", "):r!==void 0&&(t[n.toLowerCase()]=r);return t},Vme=e=>Object.setPrototypeOf(e,bm),cv=N(3,(e,t,n)=>{const r=v1(e);return r[t.toLowerCase()]=n,r}),Hme=N(2,(e,t)=>v1({...e,...eA(t)})),qme=N(2,(e,t)=>{const n=v1(e);return Object.assign(n,t),n}),Gme=N(2,(e,t)=>{const n=v1(e),r=s=>{if(typeof s=="string"){const i=s.toLowerCase();i in e&&delete n[i]}else for(const i in e)s.test(i)&&delete n[i]};if(Array.isArray(t))for(let s=0;s<t.length;s++)r(t[s]);else r(t);return n}),uv=N(2,(e,t)=>{const n={...e},r=s=>{if(typeof s=="string"){const i=s.toLowerCase();i in e&&(n[i]=$N(e[i]))}else for(const i in e)s.test(i)&&(n[i]=$N(e[i]))};if(Array.isArray(t))for(let s=0;s<t.length;s++)r(t[s]);else r(t);return n}),k8=$e("@effect/platform/Headers/currentRedactedNames",()=>bI(["authorization","cookie","set-cookie","x-api-key"])),Kme=Symbol.for("@effect/platform/HttpClientError"),E8=Kme;class w8 extends XB(E8,"RequestError"){get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){return this.description?`${this.reason}: ${this.description} (${this.methodAndUrl})`:`${this.reason} error (${this.methodAndUrl})`}}class wa extends XB(E8,"ResponseError"){get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){const t=`${this.response.status} ${this.methodAndUrl}`;return this.description?`${this.reason}: ${this.description} (${t})`:`${this.reason} error (${t})`}}const Sh=Symbol.for("@effect/platform/HttpIncomingMessage"),Wme=(e,t)=>{const n=e.headers["content-type"]??"";let r;if(n.includes("application/json"))try{r=zs(e.json)}catch{}else if(n.includes("text/")||n.includes("urlencoded"))try{r=zs(e.text)}catch{}const s={...t,headers:Lx(e.headers),remoteAddress:e.remoteAddress.toJSON()};return r!==void 0&&(s.body=r),s},Jme=e=>Vme({b3:`${e.traceId}-${e.spanId}-${e.sampled?"1":"0"}${e.parent._tag==="Some"?`-${e.parent.value.spanId}`:""}`,traceparent:`00-${e.traceId}-${e.spanId}-${e.sampled?"01":"00"}`}),hR=Symbol.for("@effect/platform/HttpClientRequest"),Yme={[hR]:hR,...l_,toJSON(){return{_id:"@effect/platform/HttpClientRequest",method:this.method,url:this.url,urlParams:this.urlParams,hash:this.hash,headers:Lx(this.headers),body:this.body.toJSON()}},pipe(){return Se(this,arguments)}};function wi(e,t,n,r,s,i){const a=Object.create(Yme);return a.method=e,a.url=t,a.urlParams=n,a.hash=r,a.headers=s,a.body=i,a}const Qme=wi("GET","",gme,fe(),_8,Tme),tc=e=>(t,n)=>ipe(Qme,{method:e,url:t,...n??void 0}),Xme=tc("GET"),Zme=tc("POST"),epe=tc("PUT"),tpe=tc("PATCH"),npe=tc("DELETE"),rpe=tc("HEAD"),spe=tc("OPTIONS"),ipe=N(2,(e,t)=>{let n=e;return t.method&&(n=ope(n,t.method)),t.url&&(n=x8(n,t.url)),t.headers&&(n=tA(n,t.headers)),t.urlParams&&(n=T8(n,t.urlParams)),t.hash&&(n=lpe(n,t.hash)),t.body&&(n=nA(n,t.body)),t.accept&&(n=v8(n,t.accept)),t.acceptJson&&(n=ape(n)),n}),S8=N(3,(e,t,n)=>wi(e.method,e.url,e.urlParams,e.hash,cv(e.headers,t,n),e.body)),tA=N(2,(e,t)=>wi(e.method,e.url,e.urlParams,e.hash,Hme(e.headers,t),e.body)),v8=N(2,(e,t)=>S8(e,"Accept",t)),ape=v8("application/json"),ope=N(2,(e,t)=>wi(t,e.url,e.urlParams,e.hash,e.headers,e.body)),x8=N(2,(e,t)=>{if(typeof t=="string")return wi(e.method,t,e.urlParams,e.hash,e.headers,e.body);const n=new URL(t.toString()),r=Lu(n.searchParams),s=n.hash?ye(n.hash.slice(1)):fe();return n.search="",n.hash="",wi(e.method,n.toString(),r,s,e.headers,e.body)}),cpe=N(2,(e,t)=>wi(e.method,t.endsWith("/")&&e.url.startsWith("/")?t+e.url.slice(1):t+e.url,e.urlParams,e.hash,e.headers,e.body)),upe=N(2,(e,t)=>wi(e.method,e.url,yme(e.urlParams,t),e.hash,e.headers,e.body)),T8=N(2,(e,t)=>wi(e.method,e.url,bme(e.urlParams,t),e.hash,e.headers,e.body)),lpe=N(2,(e,t)=>wi(e.method,e.url,e.urlParams,ye(t),e.headers,e.body)),nA=N(2,(e,t)=>{let n=e.headers;if(t._tag==="Empty"||t._tag==="FormData")n=Gme(n,["Content-type","Content-length"]);else{const r=t.contentType;r&&(n=cv(n,"content-type",r));const s=t.contentLength;s&&(n=cv(n,"content-length",s.toString()))}return wi(e.method,e.url,e.urlParams,e.hash,n,t)}),dpe=N(2,(e,t)=>nA(e,Nme(t))),vh=Symbol.for("@effect/platform/HttpClientResponse"),fpe=(e,t)=>new hpe(e,t);class hpe extends DK{request;source;[Sh];[vh];constructor(t,n){super(),this.request=t,this.source=n,this[Sh]=Sh,this[vh]=vh}toJSON(){return Wme(this,{_id:"@effect/platform/HttpClientResponse",request:this.request.toJSON(),status:this.status})}get status(){return this.source.status}get headers(){return eA(this.source.headers)}cachedCookies;get cookies(){return this.cachedCookies?this.cachedCookies:this.cachedCookies=Fme(this.source.headers.getSetCookie())}get remoteAddress(){return fe()}get stream(){return this.source.body?_le(()=>this.source.body,t=>new wa({request:this.request,response:this,reason:"Decode",cause:t})):mle(new wa({request:this.request,response:this,reason:"EmptyBody",description:"can not create stream from empty body"}))}get json(){return yoe(this.text,{try:t=>t===""?null:JSON.parse(t),catch:t=>new wa({request:this.request,response:this,reason:"Decode",cause:t})})}textBody;get text(){return this.textBody??=Vl({try:()=>this.source.text(),catch:t=>new wa({request:this.request,response:this,reason:"Decode",cause:t})}).pipe(Vk,zs)}get urlParamsBody(){return Le(this.text,t=>boe({try:()=>Lu(new URLSearchParams(t)),catch:n=>new wa({request:this.request,response:this,reason:"Decode",cause:n})}))}formDataBody;get formData(){return this.formDataBody??=Vl({try:()=>this.source.formData(),catch:t=>new wa({request:this.request,response:this,reason:"Decode",cause:t})}).pipe(Vk,zs)}arrayBufferBody;get arrayBuffer(){return this.arrayBufferBody??=Vl({try:()=>this.source.arrayBuffer(),catch:t=>new wa({request:this.request,response:this,reason:"Decode",cause:t})}).pipe(Vk,zs)}}const mpe=N(2,(e,t)=>{const n=e.status;return t[n]?t[n](e):n>=200&&n<300&&t["2xx"]?t["2xx"](e):n>=300&&n<400&&t["3xx"]?t["3xx"](e):n>=400&&n<500&&t["4xx"]?t["4xx"](e):n>=500&&n<600&&t["5xx"]?t["5xx"](e):t.orElse(e)}),ppe=e=>`http.request.header.${e}`,gpe="http.request.method",bpe=e=>`http.response.header.${e}`,ype="http.response.status_code",_pe="server.address",kpe="server.port",Epe="url.full",wpe="url.path",Spe="url.scheme",vpe="url.query",mR=Symbol.for("@effect/platform/HttpClient"),rA=Jo("@effect/platform/HttpClient"),xpe=$e(Symbol.for("@effect/platform/HttpClient/tracerDisabledWhen"),()=>bI(La)),Tpe=$e(Symbol.for("@effect/platform/HttpClient/currentTracerPropagation"),()=>bI(!0)),Ipe=Au()("@effect/platform/HttpClient/SpanNameGenerator",{defaultValue:()=>e=>`http.client ${e.method}`}),Ape={[mR]:mR,pipe(){return Se(this,arguments)},...l_,toJSON(){return{_id:"@effect/platform/HttpClient"}},get(e,t){return this.execute(Xme(e,t))},head(e,t){return this.execute(rpe(e,t))},post(e,t){return this.execute(Zme(e,t))},put(e,t){return this.execute(epe(e,t))},patch(e,t){return this.execute(tpe(e,t))},del(e,t){return this.execute(npe(e,t))},options(e,t){return this.execute(spe(e,t))}},sA=(e,t)=>{const n=Object.create(Ape);return n.preprocess=t,n.postprocess=e,n.execute=function(r){return e(t(r))},n},gy=$e("@effect/platform/HttpClient/responseRegistry",()=>{if("FinalizationRegistry"in globalThis&&globalThis.FinalizationRegistry){const t=new FinalizationRegistry(n=>{n.abort()});return{register(n,r){t.register(n,r,n)},unregister(n){t.unregister(n)}}}const e=new Map;return{register(t,n){e.set(t,setTimeout(()=>n.abort(),5e3))},unregister(t){const n=e.get(t);n!==void 0&&(clearTimeout(n),e.delete(t))}}}),Cpe=$e("@effect/platform/HttpClient/scopedRequests",()=>new WeakMap),Ppe=e=>sA(t=>Le(t,n=>Wb(r=>{const s=Cpe.get(n),i=s??new AbortController,a=_me(n.url,n.urlParams,n.hash);if(a._tag==="Left")return na(new w8({request:n,reason:"InvalidUrl",cause:a.left}));const o=a.right;if(!r.getFiberRef(Zoe)||r.getFiberRef(xpe)(n)){const l=e(n,o,i.signal,r);return s?l:Jb(d=>si(d(l),{onSuccess(f){return gy.register(f,i),Dt(new pR(f,i))},onFailure(f){return Vb(f)&&i.abort(),ui(f)}}))}const u=ci(r.currentContext,Ipe);return Loe(u(n),{kind:"client",captureStackTrace:!1},l=>{l.attribute(gpe,n.method),l.attribute(_pe,o.origin),o.port!==""&&l.attribute(kpe,+o.port),l.attribute(Epe,o.toString()),l.attribute(wpe,o.pathname),l.attribute(Spe,o.protocol.slice(0,-1));const d=o.search.slice(1);d!==""&&l.attribute(vpe,d);const f=r.getFiberRef(k8),h=uv(n.headers,f);for(const m in h)l.attribute(ppe(m),String(h[m]));return n=r.getFiberRef(Tpe)?tA(n,Jme(l)):n,Jb(m=>m(e(n,o,i.signal,r)).pipe(Doe(l),si({onSuccess:y=>{l.attribute(ype,y.status);const g=uv(y.headers,f);for(const p in g)l.attribute(bpe(p),String(g[p]));return s?Dt(y):(gy.register(y,i),Dt(new pR(y,i)))},onFailure(y){return!s&&Vb(y)&&i.abort(),ui(y)}})))})})),Dt);class pR{original;controller;constructor(t,n){this.original=t,this.controller=n}[vh]=vh;[Sh]=Sh;applyInterrupt(t){return dn(()=>(gy.unregister(this.original),_oe(t,()=>Ft(()=>{this.controller.abort()}))))}get request(){return this.original.request}get status(){return this.original.status}get headers(){return this.original.headers}get cookies(){return this.original.cookies}get remoteAddress(){return this.original.remoteAddress}get formData(){return this.applyInterrupt(this.original.formData)}get text(){return this.applyInterrupt(this.original.text)}get json(){return this.applyInterrupt(this.original.json)}get urlParamsBody(){return this.applyInterrupt(this.original.urlParamsBody)}get arrayBuffer(){return this.applyInterrupt(this.original.arrayBuffer)}get stream(){return wle(()=>(gy.unregister(this.original),SF(this.original.stream,Ft(()=>{this.controller.abort()}))))}toJSON(){return this.original.toJSON()}[yt](){return this.original[yt]()}}const{del:aBe,execute:oBe,get:cBe,head:uBe,options:lBe,patch:dBe,post:fBe,put:hBe}=voe(rA),Npe=N(2,(e,t)=>{const n=e;return sA(r=>t(n.postprocess(r)),n.preprocess)}),Rpe=N(2,(e,t)=>{const n=e;return sA(n.postprocess,r=>At(n.preprocess(r),t))}),Ope=e=>Joe(rA,Le(u5(),t=>At(e,n=>Npe(n,l5(r=>Zr(t,r)))))),Lpe=rA,I8=Rpe,Dpe=tc,$pe=S8,Mpe=tA,jpe=x8,Fpe=cpe,Bpe=T8,zpe=upe,Upe=nA,Vpe=dpe,Hpe=mpe,lv=e=>e!=="GET"&&e!=="HEAD"&&e!=="OPTIONS",qpe=(e,t)=>Ul(function*(){const n=yield*u5(),r=t.httpClient.pipe(t?.baseUrl===void 0?ze:I8(Fpe(t.baseUrl.toString())));h8(e,{predicate:t?.predicate,onGroup(s){t.onGroup?.(s)},onEndpoint(s){const{endpoint:i,errors:a,successes:o}=s,c=Jpe(i.path),u={orElse:Zpe},l=Hpe(u);a.forEach(({ast:g},p)=>{if(g._tag==="None"){u[p]=ege;return}const _=gR(g.value);u[p]=k=>Le(_(k),na)}),o.forEach(({ast:g},p)=>{u[p]=g._tag==="None"?tge:gR(g.value)});const d=i.pathSchema.pipe(Jr(kf)),f=i.payloadSchema.pipe(Jr(g=>lv(i.method)?kf(rge(g)):kf(g))),h=i.headersSchema.pipe(Jr(kf)),m=i.urlParamsSchema.pipe(Jr(kf)),y=$oe(function*(g){let p=Dpe(i.method)(i.path);if(g&&g.path){const v=d._tag==="Some"?yield*d.value(g.path):g.path;p=jpe(p,c(v))}if(g&&g.payload instanceof FormData)p=Vpe(p,g.payload);else if(f._tag==="Some")if(lv(i.method)){const v=yield*f.value(g.payload);p=Upe(p,v)}else{const v=yield*f.value(g.payload);p=Bpe(p,v)}h._tag==="Some"&&(p=Mpe(p,yield*h.value(g.headers))),m._tag==="Some"&&(p=zpe(p,yield*m.value(g.urlParams)));const _=yield*r.execute(p),k=yield*t.transformResponse===void 0?l(_):t.transformResponse(l(_));return g?.withResponse===!0?[k,_]:k},l5(g=>Zr(n,g)));t.onEndpoint({...s,endpointFn:y})}})}),Gpe=(e,t)=>Le(Lpe,n=>Kpe(e,{...t,httpClient:t?.transformClient?t.transformClient(n):n})),Kpe=(e,t)=>{const n={};return qpe(e,{...t,onGroup({group:r}){r.topLevel||(n[r.identifier]={})},onEndpoint({endpoint:r,endpointFn:s,group:i}){(i.topLevel?n:n[i.identifier])[r.name]=s}}).pipe(At(()=>n))},Wpe=/:(\w+)\??/g,Jpe=e=>{const t=e.split(Wpe),n=t.length;return n===1?r=>e:r=>{let s=t[0];for(let i=1;i<n;i++)i%2===0?s+=t[i]:s+=r[t[i]];return s}},gR=e=>{const t=bp(e),n=mfe(A8(e,t));return r=>Le(r.arrayBuffer,n)},Ype=Ha(fp,ehe,{decode(e){return new Uint8Array(e)},encode(e){return e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}}),dv=Ha(fp,D,{decode(e){return new TextDecoder().decode(e)},encode(e){const t=new TextEncoder().encode(e);return t.byteLength===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}}),Qpe=Uo(D,fp,{strict:!0,decode:(e,t,n)=>e===""?Yr(void 0):dy({try:()=>JSON.parse(e),catch:()=>new xn(n,e,"Could not parse JSON")}),encode:(e,t,n)=>e===void 0?Yr(""):dy({try:()=>JSON.stringify(e),catch:()=>new xn(n,e,"Could not encode as JSON")})}),Xpe=Mc(dv,Qpe),A8=(e,t)=>{if(e._tag==="Union")return Hs(...e.types.map(r=>A8(r,bp(r,t))));const n=vt(e);switch(t.kind){case"Json":return Mc(Xpe,n);case"UrlParams":return Mc(dv,vme(n));case"Uint8Array":return Mc(Ype,n);case"Text":return Mc(dv,n)}},Zpe=e=>na(new wa({reason:"Decode",request:e.request,response:e})),ege=e=>na(new wa({reason:"StatusCode",request:e.request,response:e})),tge=e=>bt,nge=dp(Ome),rge=e=>{const t=e.ast._tag==="Union"?e.ast.types:[e.ast];return Hs(...t.map(sge))},hE=$e("@effect/platform/HttpApiClient/bodyFromPayloadCache",()=>new WeakMap),sge=e=>{if(hE.has(e))return hE.get(e);const t=vt(e),n=bp(e),r=Uo(nge,t,{decode(s,i,a){return $c(new WS(a,s,"encode only schema"))},encode(s,i,a){switch(n.kind){case"Json":try{return Yr(cR(JSON.stringify(s),n.contentType))}catch{return $c(new xn(a,s,"Could not encode as JSON"))}case"Text":return typeof s!="string"?$c(new xn(a,s,"Expected a string")):Yr(cR(s,n.contentType));case"UrlParams":return Yr(Dme(Lu(s)));case"Uint8Array":return s instanceof Uint8Array?Yr(Lme(s,n.contentType)):$c(new xn(a,s,"Expected a Uint8Array"))}}});return hE.set(e,r),r},ige=(e,t)=>{const n=t.definitionPath??"#/$defs/",r=o=>n+o,s=t.target??"jsonSchema7",i=t.topLevelReferenceStrategy??"keep";return cn(e,t.definitions,"handle-identifier",[],{getRef:r,target:s,topLevelReferenceStrategy:i,additionalPropertiesStrategy:"strict"},"handle-annotation","handle-errors")},xh={$id:"/schemas/never",not:{}},Sc={$id:"/schemas/any"},C8={$id:"/schemas/unknown"},P8={$id:"/schemas/void"},age={$id:"/schemas/object",anyOf:[{type:"object"},{type:"array"}]},oge={$id:"/schemas/%7B%7D",anyOf:[{type:"object"},{type:"array"}]};function N8(e){if(e!==void 0)return Nr(DI(e))}function R8(e){if(e!==void 0)return Nr(LI(e))}function O8(e){return e!==void 0?nde(e):fe()}function cge(e,t){return pB(e,!1)(t)}function L8(e){if(e!==void 0)return Nr(tde(e))}function uge(e,t){const n=pB(e,!1),r=xM(t,s=>n(s).pipe(yM(by)));return r.length>0?r:void 0}function bR(e,t,n){if(t!==void 0)switch(e._tag){case"StringKeyword":return t!==sy.annotations[n]?t:void 0;case"NumberKeyword":return t!==iy.annotations[n]?t:void 0;case"BooleanKeyword":return t!==ay.annotations[n]?t:void 0}return t}function by(e,t=new Set){if(e===null||typeof e=="string"||typeof e=="number"||typeof e=="boolean")return!0;if(Array.isArray(e)||typeof e=="object"){if(t.has(e))return!1;t.add(e);try{if(Array.isArray(e))return e.every(r=>by(r,t));const n=Object.getPrototypeOf(e);return n!==null&&n!==Object.prototype||Object.getOwnPropertySymbols(e).length>0?!1:Object.values(e).every(r=>by(r,t))}finally{t.delete(e)}}return!1}function D8(e,t,n,r,s){const i={};if(t!==void 0&&(i.description=t),n!==void 0&&(i.title=n),mt(r)){const a=cge(e,r.value);mt(a)&&by(a.value)&&(i.default=a.value)}if(s!==void 0){const a=uge(e,s);a!==void 0&&(i.examples=a)}if(Object.keys(i).length!==0)return i}function mE(e,t){return D8(e,N8(t),R8(t),O8(t),L8(t))}function $8(e){return D8(e,bR(e,N8(e),ra),bR(e,R8(e),Br),O8(e),L8(e))}function pE(e,t){return t?"$ref"in e?{allOf:[e],...t}:{...e,...t}:e}const yy=e=>{if(Tn(JF(e)))return Kde(e,yy,t=>yy(t.from))},lge=e=>e.annotations[CI]===XF,dge=(e,t)=>Xc(e)&&e.annotations[CI]===DF?"type"in t&&t.type!=="integer":"type"in t||"oneOf"in t||"anyOf"in t||"$ref"in t,fge=(e,t,n)=>{const r={...e,...$8(n),...t};r.allOf??=[];const s=(i,a)=>{i in t&&i in e&&(r.allOf.unshift({[i]:e[i]}),r.allOf=r.allOf.filter(a))};return s("minLength",i=>i.minLength>t.minLength),s("maxLength",i=>i.maxLength<t.maxLength),s("pattern",i=>i.pattern!==t.pattern),s("minItems",i=>i.minItems>t.minItems),s("maxItems",i=>i.maxItems<t.maxItems),s("minimum",i=>i.minimum>t.minimum),s("maximum",i=>i.maximum<t.maximum),s("exclusiveMinimum",i=>i.exclusiveMinimum>t.exclusiveMinimum),s("exclusiveMaximum",i=>i.exclusiveMaximum<t.exclusiveMaximum),s("multipleOf",i=>i.multipleOf!==t.multipleOf),r.allOf.length===0&&delete r.allOf,r};function hge(e){switch(e.target){case"jsonSchema7":return!1;case"jsonSchema2019-09":case"jsonSchema2020-12":case"openApi3.1":return!0}}function mge(e){switch(e.additionalPropertiesStrategy){case"allow":return!0;case"strict":return!1}}function jt(e,t){return M8(e,$8(t))}function M8(e,t){return t===void 0||Object.keys(t).length===0?e:"$ref"in e?{allOf:[e],...t}:{...e,...t}}function fv(e){const t=Nr(QF(e));if(t===void 0){if(iB(e))return fv(e.f());if(aB(e)&&HS(e.from)&&dde(e.to)){const n=e.to,r=qd(n);if(mt(r))return fv(n)}}return t}function cn(e,t,n,r,s,i,a){if(n==="handle-identifier"&&(s.topLevelReferenceStrategy!=="skip"||iB(e))){const c=fv(e);if(c!==void 0){const u=c.replace(/~/ig,"~0").replace(/\//ig,"~1"),l={$ref:s.getRef(u)};return JW(t,c)||(t[c]=l,t[c]=cn(e,t,"ignore-identifier",r,s,"handle-annotation",a)),l}}if(i==="handle-annotation"){const c=JF(e);if(mt(c)){const u=c.value;if(dge(e,u))return e._tag==="Declaration"?jt(u,e):u;if(e._tag==="Refinement"){const l=KS(e);return l===void 0?fge(cn(e.from,t,n,r,s,"handle-annotation",a),u,e):cn(l,t,n,r,s,"handle-annotation",a)}else return{...cn(e,t,n,r,s,"ignore-annotation",a),...u}}}const o=qd(e);if(mt(o))return cn(o.value,t,n,r,s,"handle-annotation",a);switch(e._tag){case"Declaration":case"UndefinedKeyword":case"BigIntKeyword":case"UniqueSymbol":case"SymbolKeyword":{if(a==="ignore-errors")return jt(Sc,e);throw new Error(xN(r,e))}case"Suspend":{if(n==="handle-identifier"){if(a==="ignore-errors")return jt(Sc,e);throw new Error(Dle(r,e))}return cn(e.f(),t,"ignore-identifier",r,s,"handle-annotation",a)}case"NeverKeyword":return jt(xh,e);case"VoidKeyword":return jt(P8,e);case"UnknownKeyword":return jt(C8,e);case"AnyKeyword":return jt(Sc,e);case"ObjectKeyword":return jt(age,e);case"StringKeyword":return jt({type:"string"},e);case"NumberKeyword":return jt({type:"number"},e);case"BooleanKeyword":return jt({type:"boolean"},e);case"Literal":{const c=e.literal;if(c===null)return jt({type:"null"},e);if(kn(c))return jt({type:"string",enum:[c]},e);if(pi(c))return jt({type:"number",enum:[c]},e);if(Oo(c))return jt({type:"boolean",enum:[c]},e);if(a==="ignore-errors")return jt(Sc,e);throw new Error(xN(r,e))}case"Enums":{const c=e.enums.map(u=>({type:pi(u[1])?"number":"string",title:u[0],enum:[u[1]]}));return c.length>=1?jt({$comment:"/schemas/enums",anyOf:c},e):jt(xh,e)}case"TupleType":{const c=e.elements.map((h,m)=>pE(cn(h.type,t,"handle-identifier",r.concat(m),s,"handle-annotation",a),mE(h.type,h))),u=e.rest.map(h=>pE(cn(h.type,t,"handle-identifier",r,s,"handle-annotation",a),mE(h.type,h))),l={type:"array"},d=e.elements.length;d>0&&(l.minItems=d-e.elements.filter(h=>h.isOptional).length,s.target==="jsonSchema7"?l.items=c:l.prefixItems=c);const f=u.length;if(f>0){const h=u[0];if(f===1&&e.elements.every(y=>y.type===e.rest[0].type)?s.target==="jsonSchema7"?l.items=h:(l.items=h,delete l.prefixItems):s.target==="jsonSchema7"?l.additionalItems=h:l.items=h,f>1){if(a==="ignore-errors")return jt(Sc,e);throw new Error($le(r))}}else d>0?s.target==="jsonSchema7"?l.additionalItems=!1:l.items=!1:l.maxItems=0;return jt(l,e)}case"TypeLiteral":{if(e.propertySignatures.length===0&&e.indexSignatures.length===0)return jt(oge,e);const c={type:"object",required:[],properties:{},additionalProperties:mge(s)};let u,l;for(const d of e.indexSignatures){const f=yy(d.type)??d.type,h=d.parameter;switch(h._tag){case"StringKeyword":{c.additionalProperties=cn(f,t,"handle-identifier",r,s,"handle-annotation",a);break}case"TemplateLiteral":{u=cn(f,t,"handle-identifier",r,s,"handle-annotation",a),l={type:"string",pattern:cy(h).source};break}case"Refinement":{u=cn(f,t,"handle-identifier",r,s,"handle-annotation",a),l=cn(h,t,"handle-identifier",r,s,"handle-annotation",a);break}case"SymbolKeyword":{const m=r.concat("[symbol]");c.additionalProperties=cn(f,t,"handle-identifier",m,s,"handle-annotation",a),l=cn(h,t,"handle-identifier",m,s,"handle-annotation",a);break}}}for(let d=0;d<e.propertySignatures.length;d++){const f=e.propertySignatures[d],h=f.name;if(kn(h)){const m=yy(f.type),y=m??f.type;c.properties[h]=pE(cn(y,t,"handle-identifier",r.concat(f.name),s,"handle-annotation",a),mE(y,f)),!f.isOptional&&m===void 0&&c.required.push(h)}else{if(a==="ignore-errors")return jt(Sc,e);throw new Error(Mle(h,r))}}return u!==void 0&&(delete c.additionalProperties,c.patternProperties={"":u}),l!==void 0&&(c.propertyNames=l),jt(c,e)}case"Union":{const c=e.types.map(l=>cn(l,t,"handle-identifier",r,s,"handle-annotation",a)),u=_ge(c);switch(u.length){case 0:return xh;case 1:return jt(u[0],e);default:return jt({anyOf:u},e)}}case"Refinement":return cn(e.from,t,n,r,s,"handle-annotation",a);case"TemplateLiteral":{const c=cy(e);return jt({type:"string",title:String(e),description:"a template literal",pattern:c.source},e)}case"Transformation":{if(lge(e.from)){const u={type:"string",contentMediaType:"application/json"};return hge(s)&&(u.contentSchema=cn(e.to,t,n,r,s,"handle-annotation",a)),u}const c=cn(e.from,t,n,r,s,"handle-annotation",a);if(e.transformation._tag==="TypeLiteralTransformation"&&yR(c)){const u=cn(e.to,{},"ignore-identifier",r,s,"handle-annotation","ignore-errors");if(yR(u))for(const l of e.transformation.propertySignatureTransformations){const d=l.to,f=l.from;if(kn(d)&&kn(f)){const h=u.properties[d];if(Hh(h)){const m=c.properties[f];if(Hh(m)){const y={};kn(h.title)&&(y.title=h.title),kn(h.description)&&(y.description=h.description),Array.isArray(h.examples)&&(y.examples=h.examples),Object.hasOwn(h,"default")&&h.default!==void 0&&(y.default=h.default),c.properties[f]=M8(m,y)}}}}}return jt(c,e)}}}function yR(e){return Hh(e)&&e.type==="object"&&Hh(e.properties)}function pge(e){return e===xh||Ne(e,"$id")&&e.$id===xh.$id&&Object.keys(e).length===3&&e.title===cp.annotations[Br]}function gge(e){return"$id"in e&&e.$id===Sc.$id}function bge(e){return"$id"in e&&e.$id===C8.$id}function yge(e){return"$id"in e&&e.$id===P8.$id}function _R(e){return Ne(e,"enum")&&"type"in e&&Object.keys(e).length===2}function _ge(e){const t=[];for(const n of e)if(!pge(n)){if(gge(n)||bge(n)||yge(n))return[n];if(_R(n)&&t.length>0){const r=t[t.length-1];if(_R(r)&&r.type===n.type){t[t.length-1]={type:r.type,enum:[...r.enum,...n.enum]};continue}}t.push(n)}return t}var kR=mq();function j8(e){kR.unstable_scheduleCallback(kR.unstable_LowPriority,e)}const Wd=O.createContext(i8({scheduleTask:j8,defaultIdleTTL:400})),kge=e=>{const t=O.useRef(null);return t.current===null&&(t.current={registry:i8({scheduleTask:e.scheduleTask??j8,initialValues:e.initialValues,timeoutResolution:e.timeoutResolution,defaultIdleTTL:e.defaultIdleTTL})}),O.useEffect(()=>(t.current?.timeout!==void 0&&clearTimeout(t.current.timeout),()=>{t.current.timeout=setTimeout(()=>{t.current?.registry.dispose(),t.current=null},500)}),[t]),O.createElement(Wd.Provider,{value:t.current.registry},e?.children)},ER=$e("@effect-atom/atom-react/storeRegistry",()=>new WeakMap);function Ege(e,t){let n=ER.get(e);n===void 0&&(n=new WeakMap,ER.set(e,n));const r=n.get(t);if(r!==void 0)return r;const s={subscribe(i){return e.subscribe(t,i)},snapshot(){return e.get(t)},getServerSnapshot(){return Zhe(t,e)}};return n.set(t,s),s}function wge(e,t){const n=Ege(e,t);return O.useSyncExternalStore(n.subscribe,n.snapshot,n.getServerSnapshot)}const Sge=(e,t)=>{const n=O.useContext(Wd);return wge(n,e)},vge="@effect/platform/FetchHttpClient/Fetch",xge="@effect/platform/FetchHttpClient/FetchOptions",Tge=Ppe((e,t,n,r)=>{const s=r.getFiberRef(g5),i=s.unsafeMap.get(vge)??globalThis.fetch,a=s.unsafeMap.get(xge)??{},o=a.headers?qme(eA(a.headers),e.headers):e.headers,c=u=>At(Vl({try:()=>i(t,{...a,method:e.method,headers:o,body:u,duplex:e.body._tag==="Stream"?"half":void 0,signal:n}),catch:l=>new w8({request:e,reason:"Transport",cause:l})}),l=>fpe(e,l));switch(e.body._tag){case"Raw":case"Uint8Array":return c(e.body.body);case"FormData":return c(e.body.formData);case"Stream":return Le(Sle(e.body.stream),c)}return c(void 0)}),Ige=Ope(Dt(Tge)),Age=Ige,Cge=Symbol.for("@effect/platform/HttpApiMiddleware/Security"),wR=e=>Ne(e,Cge),Pge=e=>e.endsWith("/")?e.slice(0,-1):e,Nge=N(2,(e,t)=>(t=Pge(t),e==="/"?t:t+e)),Rge=Nge,Oge=(e,t)=>ige(e,{definitions:t.defs,definitionPath:t.defsPath??"#/components/schemas/",target:"openApi3.1",topLevelReferenceStrategy:t.topLevelReferenceStrategy});class F8 extends Fr("@effect/platform/OpenApi/Identifier")(){}class F0 extends Fr("@effect/platform/OpenApi/Title")(){}class B8 extends Fr("@effect/platform/OpenApi/Version")(){}class Th extends Fr("@effect/platform/OpenApi/Description")(){}class z8 extends Fr("@effect/platform/OpenApi/License")(){}class hv extends Fr("@effect/platform/OpenApi/ExternalDocs")(){}class U8 extends Fr("@effect/platform/OpenApi/Servers")(){}class V8 extends Fr("@effect/platform/OpenApi/Format")(){}class mv extends Fr("@effect/platform/OpenApi/Summary")(){}class H8 extends Fr("@effect/platform/OpenApi/Deprecated")(){}class B0 extends Fr("@effect/platform/OpenApi/Override")(){}class pv extends Au()("@effect/platform/OpenApi/Exclude",{defaultValue:La}){}class z0 extends Fr("@effect/platform/OpenApi/Transform")(){}const Lge=e=>{const t=Object.entries(e);return n=>{let r=gi();for(const[s,i]of t)n[s]!==void 0&&(r=ds(r,i,n[s]));return r}},Dge=Lge({identifier:F8,title:F0,version:B8,description:Th,license:z8,summary:mv,deprecated:H8,externalDocs:hv,servers:U8,format:V8,override:B0,exclude:pv,transform:z0}),SR=$e("@effect/platform/OpenApi/apiCache",()=>new WeakMap);function zn(e,t,n){const r=Yo(e,t);mt(r)&&n(r.value)}const $ge=(e,t)=>{const n=SR.get(e);if(n!==void 0)return n;const r={};let s={openapi:"3.1.0",info:{title:hf(e.annotations,F0,()=>"Api"),version:hf(e.annotations,B8,()=>"0.0.1")},paths:{},components:{schemas:r,securitySchemes:{}},security:[],tags:[]};function i(o){return Oge(o,{defs:r})}function a(o,c){s.components.securitySchemes[o]===void 0&&(s.components.securitySchemes[o]=Mge(c))}return zn(e.annotations,pme,o=>{o.forEach(c=>i(c.ast))}),zn(e.annotations,Th,o=>{s.info.description=o}),zn(e.annotations,z8,o=>{s.info.license=o}),zn(e.annotations,mv,o=>{s.info.summary=o}),zn(e.annotations,U8,o=>{s.servers=[...o]}),e.middlewares.forEach(o=>{if(wR(o))for(const[c,u]of Object.entries(o.security))a(c,u),s.security.push({[c]:[]})}),h8(e,{onGroup({group:o}){if(ci(o.annotations,pv))return;let c={name:hf(o.annotations,F0,()=>o.identifier)};zn(o.annotations,Th,u=>{c.description=u}),zn(o.annotations,hv,u=>{c.externalDocs=u}),zn(o.annotations,B0,u=>{Object.assign(c,u)}),zn(o.annotations,z0,u=>{c=u(c)}),s.tags.push(c)},onEndpoint({endpoint:o,errors:c,group:u,mergedAnnotations:l,middleware:d,payloads:f,successes:h}){if(ci(l,pv))return;let m={tags:[hf(u.annotations,F0,()=>u.identifier)],operationId:hf(o.annotations,F8,()=>u.topLevel?o.name:`${u.identifier}.${o.name}`),parameters:[],security:[],responses:{}};function y(v,w){for(const[S,{ast:T,description:I}]of v)m.responses[S]||(m.responses[S]={description:Kt(I,w)},T.pipe(yM($=>!l8($)),Jr($=>{const R=bp($);m.responses[S].content={[R.contentType]:{schema:i($)}}})))}function g(v,w){if(mt(v)){const S=i(v.value.ast);"properties"in S&&Object.entries(S.properties).forEach(([T,I])=>{m.parameters.push({name:T,in:w,schema:I,required:S.required.includes(T),...I.description!==void 0?{description:I.description}:void 0})})}}zn(o.annotations,Th,v=>{m.description=v}),zn(o.annotations,mv,v=>{m.summary=v}),zn(o.annotations,H8,v=>{m.deprecated=v}),zn(o.annotations,hv,v=>{m.externalDocs=v}),d.forEach(v=>{if(wR(v))for(const[w,S]of Object.entries(v.security))a(w,S),m.security.push({[w]:[]})});const p=lv(o.method);if(p&&f.size>0){const v={};f.forEach(({ast:w},S)=>{v[S]={schema:i(w)}}),m.requestBody={content:v,required:!0}}g(o.pathSchema,"path"),p||g(o.payloadSchema,"query"),g(o.headersSchema,"header"),g(o.urlParamsSchema,"query"),y(h,()=>"Success"),y(c,()=>"Error");const _=o.path.replace(/:(\w+)\??/g,"{$1}"),k=o.method.toLowerCase();s.paths[_]||(s.paths[_]={}),zn(o.annotations,B0,v=>{Object.assign(m,v)}),zn(o.annotations,z0,v=>{m=v(m)}),s.paths[_][k]=m}}),zn(e.annotations,B0,o=>{Object.assign(s,o)}),zn(e.annotations,z0,o=>{s=o(s)}),SR.set(e,s),s},Mge=e=>{const t={};switch(zn(e.annotations,Th,n=>{t.description=n}),e._tag){case"Basic":return{...t,type:"http",scheme:"basic"};case"Bearer":{const n=Yo(e.annotations,V8).pipe(Jr(r=>({bearerFormat:r})),Nr);return{...t,type:"http",scheme:"bearer",...n}}case"ApiKey":return{...t,type:"apiKey",name:e.key,in:e.in}}},vR=Symbol.for("@effect/platform/HttpApiEndpoint"),jge={[vR]:vR,pipe(){return Se(this,arguments)},addSuccess(e,t){return e=t?.status?e.annotations(Ei({status:t.status})):e,Cs({...this,successSchema:this.successSchema===ov?e:Ao(this.successSchema,e)})},addError(e,t){return Cs({...this,errorSchema:Ao(this.errorSchema,t?.status?e.annotations(Ei({status:t.status})):e)})},setPayload(e){return Cs({...this,payloadSchema:ye(e)})},setPath(e){return Cs({...this,pathSchema:ye(e)})},setUrlParams(e){return Cs({...this,urlParamsSchema:ye(e)})},setHeaders(e){return Cs({...this,headersSchema:ye(e)})},prefix(e){return Cs({...this,path:Rge(this.path,e)})},middleware(e){return Cs({...this,errorSchema:Ao(this.errorSchema,e.failure),middlewares:new Set([...this.middlewares,e])})},annotate(e,t){return Cs({...this,annotations:ds(this.annotations,e,t)})},annotateContext(e){return Cs({...this,annotations:Zr(this.annotations,e)})}},Cs=e=>Object.assign(Object.create(jge),e),x1=e=>(t,...n)=>n.length===1?Cs({name:t,path:n[0],method:e,pathSchema:fe(),urlParamsSchema:fe(),payloadSchema:fe(),headersSchema:fe(),successSchema:ov,errorSchema:pm,annotations:gi(),middlewares:new Set}):(r,...s)=>{let i=r[0].replace(":","::"),a=fe();if(s.length>0){const o={};for(let c=0;c<s.length;c++){const u=s[c],l=sme(u.ast)??String(c),d=u.ast._tag==="PropertySignatureTransformation"&&u.ast.from.isOptional||u.ast._tag==="PropertySignatureDeclaration"&&u.ast.isOptional;o[l]=u,i+=`:${l}${d?"?":""}${r[c+1].replace(":","::")}`}a=ye(ce(o))}return Cs({name:t,path:i,method:e,pathSchema:a,urlParamsSchema:fe(),payloadSchema:fe(),headersSchema:fe(),successSchema:ov,errorSchema:pm,annotations:gi(),middlewares:new Set})},En=x1("GET"),Kr=x1("POST"),_u=x1("PATCH"),ku=x1("DELETE"),xR=Symbol.for("@effect/platform/HttpApiGroup"),Fge={[xR]:xR,add(e){return Ni({identifier:this.identifier,topLevel:this.topLevel,endpoints:{...this.endpoints,[e.name]:e},errorSchema:this.errorSchema,annotations:this.annotations,middlewares:this.middlewares})},addError(e,t){return Ni({identifier:this.identifier,topLevel:this.topLevel,endpoints:this.endpoints,errorSchema:Ao(this.errorSchema,t?.status?e.annotations(Ei({status:t.status})):e),annotations:this.annotations,middlewares:this.middlewares})},prefix(e){return Ni({identifier:this.identifier,topLevel:this.topLevel,endpoints:wl(this.endpoints,t=>t.prefix(e)),errorSchema:this.errorSchema,annotations:this.annotations,middlewares:this.middlewares})},middleware(e){return Ni({identifier:this.identifier,topLevel:this.topLevel,endpoints:this.endpoints,errorSchema:Ao(this.errorSchema,e.failure),annotations:this.annotations,middlewares:new Set([...this.middlewares,e])})},middlewareEndpoints(e){return Ni({identifier:this.identifier,topLevel:this.topLevel,endpoints:wl(this.endpoints,t=>t.middleware(e)),errorSchema:this.errorSchema,annotations:this.annotations,middlewares:this.middlewares})},annotateContext(e){return Ni({identifier:this.identifier,topLevel:this.topLevel,endpoints:this.endpoints,errorSchema:this.errorSchema,annotations:Zr(this.annotations,e),middlewares:this.middlewares})},annotate(e,t){return Ni({identifier:this.identifier,topLevel:this.topLevel,endpoints:this.endpoints,errorSchema:this.errorSchema,annotations:ds(this.annotations,e,t),middlewares:this.middlewares})},annotateEndpointsContext(e){return Ni({identifier:this.identifier,topLevel:this.topLevel,endpoints:wl(this.endpoints,t=>t.annotateContext(e)),errorSchema:this.errorSchema,annotations:this.annotations,middlewares:this.middlewares})},annotateEndpoints(e,t){return Ni({identifier:this.identifier,topLevel:this.topLevel,endpoints:wl(this.endpoints,n=>n.annotate(e,t)),errorSchema:this.errorSchema,annotations:this.annotations,middlewares:this.middlewares})},pipe(){return Se(this,arguments)}},Ni=e=>{function t(){}return Object.setPrototypeOf(t,Fge),Object.assign(t,e)},nc=(e,t)=>Ni({identifier:e,topLevel:!1,endpoints:KW(),errorSchema:pm,annotations:gi(),middlewares:new Set}),nt=lt,ie=Symbol.for("drizzle:entityKind");function Gt(e,t){if(!e||typeof e!="object")return!1;if(e instanceof t)return!0;if(!Object.prototype.hasOwnProperty.call(t,ie))throw new Error(`Class "${t.name??"<unknown>"}" doesn't look like a Drizzle entity. If this is incorrect and the class is provided by Drizzle, please report this as a bug.`);let n=Object.getPrototypeOf(e).constructor;if(n)for(;n;){if(ie in n&&n[ie]===t[ie])return!0;n=Object.getPrototypeOf(n)}return!1}const Zc=Symbol.for("drizzle:Name"),U0=Symbol.for("drizzle:Schema"),gv=Symbol.for("drizzle:Columns"),TR=Symbol.for("drizzle:ExtraConfigColumns"),V0=Symbol.for("drizzle:OriginalName"),gE=Symbol.for("drizzle:BaseName"),ym=Symbol.for("drizzle:IsAlias"),IR=Symbol.for("drizzle:ExtraConfigBuilder"),q8=Symbol.for("drizzle:IsDrizzleTable");var Gn=class{static[ie]="Table";static Symbol={Name:Zc,Schema:U0,OriginalName:V0,Columns:gv,ExtraConfigColumns:TR,BaseName:gE,IsAlias:ym,ExtraConfigBuilder:IR};[Zc];[V0];[U0];[gv];[TR];[gE];[ym]=!1;[q8]=!0;[IR]=void 0;constructor(e,t,n){this[Zc]=this[V0]=e,this[U0]=t,this[gE]=n}};function Bge(e){return typeof e=="object"&&e!==null&&q8 in e}function zge(e){return e[Zc]}const Uge=Symbol.for("drizzle:OriginalColumn");var _m=class{static[ie]="Column";name;keyAsName;primary;notNull;default;defaultFn;onUpdateFn;hasDefault;isUnique;uniqueName;uniqueType;dataType;columnType;enumValues=void 0;generated=void 0;generatedIdentity=void 0;length;isLengthExact;isAlias;config;table;onInit(){}constructor(e,t){this.config=t,this.onInit(),this.table=e,this.name=t.name,this.isAlias=!1,this.keyAsName=t.keyAsName,this.notNull=t.notNull,this.default=t.default,this.defaultFn=t.defaultFn,this.onUpdateFn=t.onUpdateFn,this.hasDefault=t.hasDefault,this.primary=t.primaryKey,this.isUnique=t.isUnique,this.uniqueName=t.uniqueName,this.uniqueType=t.uniqueType,this.dataType=t.dataType,this.columnType=t.columnType,this.generated=t.generated,this.generatedIdentity=t.generatedIdentity,this.length=t.length,this.isLengthExact=t.isLengthExact}mapFromDriverValue(e){return e}mapToDriverValue(e){return e}shouldDisableInsert(){return this.config.generated!==void 0&&this.config.generated.type!=="byDefault"}[Uge](){return this}};function Vge(e){return e.table}var G8=class{static[ie]="Subquery";constructor(e,t,n,r=!1,s=[]){this._={brand:"Subquery",sql:e,selectedFields:t,alias:n,isWith:r,usedTables:s}}};function Hge(e,...t){return e(...t)}const qge={startActiveSpan(e,t){return t()}},Xs=Symbol.for("drizzle:ViewBaseConfig");function Gge(e){return e!=null&&typeof e.getSQL=="function"}function Kge(e){const t={sql:"",params:[]};for(const n of e)t.sql+=n.sql,t.params.push(...n.params),n.typings?.length&&(t.typings||(t.typings=[]),t.typings.push(...n.typings));return t}var Ys=class{static[ie]="StringChunk";value;constructor(e){this.value=Array.isArray(e)?e:[e]}getSQL(){return new Yn([this])}},Yn=class Xf{static[ie]="SQL";decoder=K8;shouldInlineParams=!1;usedTables=[];constructor(t){this.queryChunks=t;for(const n of t)if(Gt(n,Gn)){const r=n[Gn.Symbol.Schema];this.usedTables.push(r===void 0?n[Gn.Symbol.Name]:r+"."+n[Gn.Symbol.Name])}}append(t){return this.queryChunks.push(...t.queryChunks),this}toQuery(t){return qge.startActiveSpan("drizzle.buildSQL",n=>{const r=this.buildQueryFromSourceParams(this.queryChunks,t);return n?.setAttributes({"drizzle.query.text":r.sql,"drizzle.query.params":JSON.stringify(r.params)}),r})}buildQueryFromSourceParams(t,n){const r=Object.assign({},n,{inlineParams:n.inlineParams||this.shouldInlineParams,paramStartIndex:n.paramStartIndex||{value:0}}),{casing:s,escapeName:i,escapeParam:a,prepareTyping:o,inlineParams:c,paramStartIndex:u,invokeSource:l}=r;return Kge(t.map(d=>{if(Gt(d,Ys))return{sql:d.value.join(""),params:[]};if(Gt(d,bv))return{sql:i(d.value),params:[]};if(d===void 0)return{sql:"",params:[]};if(Array.isArray(d)){const f=[new Ys("(")];for(const[h,m]of d.entries())f.push(m),h<d.length-1&&f.push(new Ys(", "));return f.push(new Ys(")")),this.buildQueryFromSourceParams(f,r)}if(Gt(d,Xf))return this.buildQueryFromSourceParams(d.queryChunks,{...r,inlineParams:c||d.shouldInlineParams});if(Gt(d,Gn)){const f=d[Gn.Symbol.Schema],h=d[Gn.Symbol.Name];return l==="mssql-view-with-schemabinding"?{sql:i(f===void 0?"dbo":f)+"."+i(h),params:[]}:{sql:f===void 0||d[ym]?i(h):i(f)+"."+i(h),params:[]}}if(Gt(d,_m)){const f=s.getColumnCasing(d);if(n.invokeSource==="indexes")return{sql:i(f),params:[]};const h=l==="mssql-check"?void 0:d.table[Gn.Symbol.Schema];return{sql:d.isAlias?i(d.name):d.table[ym]||h===void 0?i(d.table[Gn.Symbol.Name])+"."+i(f):i(h)+"."+i(d.table[Gn.Symbol.Name])+"."+i(f),params:[]}}if(Gt(d,Q8)){const f=d[Xs].schema,h=d[Xs].name;return{sql:f===void 0||d[Xs].isAlias?i(h):i(f)+"."+i(h),params:[]}}if(Gt(d,J8)){if(Gt(d.value,yv))return{sql:a(u.value++,d),params:[d],typings:["none"]};const f=d.value===null?null:d.encoder.mapToDriverValue(d.value);if(Gt(f,Xf))return this.buildQueryFromSourceParams([f],r);if(c)return{sql:this.mapInlineParam(f,r),params:[]};let h=["none"];return o&&(h=[o(d.encoder)]),{sql:a(u.value++,f),params:[f],typings:h}}return Gt(d,yv)?{sql:a(u.value++,d),params:[d],typings:["none"]}:Gt(d,Xf.Aliased)&&d.fieldAlias!==void 0?{sql:(d.origin!==void 0?i(d.origin)+".":"")+i(d.fieldAlias),params:[]}:Gt(d,G8)?d._.isWith?{sql:i(d._.alias),params:[]}:this.buildQueryFromSourceParams([new Ys("("),d._.sql,new Ys(") "),new bv(d._.alias)],r):typeof d=="function"&&"enumName"in d?"schema"in d&&d.schema?{sql:i(d.schema)+"."+i(d.enumName),params:[]}:{sql:i(d.enumName),params:[]}:Gge(d)?d.shouldOmitSQLParens?.()?this.buildQueryFromSourceParams([d.getSQL()],r):this.buildQueryFromSourceParams([new Ys("("),d.getSQL(),new Ys(")")],r):c?{sql:this.mapInlineParam(d,r),params:[]}:{sql:a(u.value++,d),params:[d],typings:["none"]}}))}mapInlineParam(t,{escapeString:n}){if(t===null)return"null";if(typeof t=="number"||typeof t=="boolean"||typeof t=="bigint")return t.toString();if(typeof t=="string")return n(t);if(typeof t=="object"){const r=t.toString();return n(r==="[object Object]"?JSON.stringify(t):r)}throw new Error("Unexpected param value: "+t)}getSQL(){return this}as(t){return t===void 0?this:new Xf.Aliased(this,t)}mapWith(t){return this.decoder=typeof t=="function"?{mapFromDriverValue:t}:t,this}inlineParams(){return this.shouldInlineParams=!0,this}if(t){return t?this:void 0}},bv=class{static[ie]="Name";brand;constructor(e){this.value=e}getSQL(){return new Yn([this])}};const K8={mapFromDriverValue:e=>e},W8={mapToDriverValue:e=>e};({...K8,...W8});var J8=class{static[ie]="Param";brand;constructor(e,t=W8){this.value=e,this.encoder=t}getSQL(){return new Yn([this])}};function Lt(e,...t){const n=[];(t.length>0||e.length>0&&e[0]!=="")&&n.push(new Ys(e[0]));for(const[r,s]of t.entries())n.push(s,new Ys(e[r+1]));return new Yn(n)}(function(e){function t(){return new Yn([])}e.empty=t;function n(c){return new Yn(c)}e.fromList=n;function r(c){return new Yn([new Ys(c)])}e.raw=r;function s(c,u){const l=[];for(const[d,f]of c.entries())d>0&&u!==void 0&&l.push(u),l.push(f);return new Yn(l)}e.join=s;function i(c){return new bv(c)}e.identifier=i;function a(c){return new yv(c)}e.placeholder=a;function o(c,u){return new J8(c,u)}e.param=o})(Lt||(Lt={}));(function(e){class t{static[ie]="SQL.Aliased";isSelectionField=!1;origin;constructor(r,s){this.sql=r,this.fieldAlias=s}getSQL(){return this.sql}clone(){return new t(this.sql,this.fieldAlias)}}e.Aliased=t})(Yn||(Yn={}));var yv=class{static[ie]="Placeholder";constructor(e){this.name=e}getSQL(){return new Yn([this])}};const Y8=Symbol.for("drizzle:IsDrizzleView");var Q8=class{static[ie]="View";[Xs];[Y8]=!0;get[Zc](){return this[Xs].name}get[U0](){return this[Xs].schema}get[ym](){return this[Xs].isAlias}get[V0](){return this[Xs].originalName}get[gv](){return this[Xs].selectedFields}constructor({name:e,schema:t,selectedFields:n,query:r}){this[Xs]={name:e,originalName:e,schema:t,selectedFields:n,query:r,isExisting:!r,isAlias:!1}}};function Wge(e){return typeof e=="object"&&e!==null&&Y8 in e}_m.prototype.getSQL=function(){return new Yn([this])};G8.prototype.getSQL=function(){return new Yn([this])};function T1(e){return Gt(e,Gn)?e[Gn.Symbol.Columns]:Gt(e,Q8)?e[Xs].selectedFields:e._.selectedFields}function er(e,t){return{name:typeof e=="string"&&e.length>0?e:"",config:typeof e=="object"?e:t}}typeof TextDecoder>"u"||new TextDecoder;function Jge(e){return(typeof e=="object"&&e!==null||typeof e=="function")&&"enumValues"in e&&Array.isArray(e.enumValues)&&e.enumValues.length>0}const Ut={INT8_MIN:-128,INT8_MAX:127,INT8_UNSIGNED_MAX:255,INT16_MIN:-32768,INT16_MAX:32767,INT16_UNSIGNED_MAX:65535,INT24_MIN:-8388608,INT24_MAX:8388607,INT24_UNSIGNED_MAX:16777215,INT32_MIN:-2147483648,INT32_MAX:2147483647,INT32_UNSIGNED_MAX:4294967295,INT48_MIN:-0x800000000000,INT48_MAX:0x7fffffffffff,INT48_UNSIGNED_MAX:0xffffffffffff,INT64_MIN:-9223372036854775808n,INT64_MAX:9223372036854775807n,INT64_UNSIGNED_MAX:18446744073709551615n};function Yge(e){const[t,n]=e.dataType.split(" ");return{type:t,constraint:n}}const Qge=Hs(D,lt,zt,NB),Xge=Hs(Qge,b1({key:D,value:zo}),Qe(zo)),Zge=yfe(Buffer);function X8(e){let t;const n=e.dimensions;if(typeof n=="number"&&n>0)return n0e(e,n);const{type:r,constraint:s}=Yge(e);switch(r){case"array":t=tz(e,s);break;case"object":t=nz(e,s);break;case"number":t=Z8(e,s);break;case"bigint":t=ez(e,s);break;case"boolean":t=zt;break;case"string":t=rz(e,s);break;case"custom":t=zo;break;default:t=zo}return t}function Z8(e,t){let n,r,s=!1;switch(t){case"int8":n=Ut.INT8_MIN,r=Ut.INT8_MAX,s=!0;break;case"uint8":n=0,r=Ut.INT8_UNSIGNED_MAX,s=!0;break;case"int16":n=Ut.INT16_MIN,r=Ut.INT16_MAX,s=!0;break;case"uint16":n=0,r=Ut.INT16_UNSIGNED_MAX,s=!0;break;case"int24":n=Ut.INT24_MIN,r=Ut.INT24_MAX,s=!0;break;case"uint24":n=0,r=Ut.INT24_UNSIGNED_MAX,s=!0;break;case"int32":n=Ut.INT32_MIN,r=Ut.INT32_MAX,s=!0;break;case"uint32":n=0,r=Ut.INT32_UNSIGNED_MAX,s=!0;break;case"int53":n=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER,s=!0;break;case"uint53":n=0,r=Number.MAX_SAFE_INTEGER,s=!0;break;case"float":n=Ut.INT24_MIN,r=Ut.INT24_MAX;break;case"ufloat":n=0,r=Ut.INT24_UNSIGNED_MAX;break;case"double":n=Ut.INT48_MIN,r=Ut.INT48_MAX;break;case"udouble":n=0,r=Ut.INT48_UNSIGNED_MAX;break;case"year":n=1901,r=2155,s=!0;break;case"unsigned":n=0,r=Number.MAX_SAFE_INTEGER;break;default:n=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER;break}let i=s?Qfe:lt;return i=i.pipe(Gfe(n),Yfe(r)),i}const e0e=WB.pipe(_1(Ut.INT64_MIN),k1(Ut.INT64_MAX)),t0e=WB.pipe(_1(0n),k1(Ut.INT64_UNSIGNED_MAX));function ez(e,t){let n,r;switch(t){case"int64":n=Ut.INT64_MIN,r=Ut.INT64_MAX;break;case"uint64":n=0n,r=Ut.INT64_UNSIGNED_MAX;break}let s=VI;return n!==void 0&&(s=s.pipe(_1(n))),r!==void 0&&(s=s.pipe(k1(r))),s}function n0e(e,t){const[n,r]=e.dataType.split(" ");let s;switch(n){case"number":s=Z8(e,r);break;case"bigint":s=ez(e,r);break;case"boolean":s=zt;break;case"string":s=rz(e,r);break;case"object":s=nz(e,r);break;case"array":s=tz(e,r);break;default:s=zo}let i=Qe(s);for(let a=1;a<t;a++)i=Qe(i);return i}function tz(e,t){switch(t){case"geometry":case"point":return QS(lt,lt);case"line":return QS(lt,lt,lt);case"vector":case"halfvector":{const n=e.length,r=Qe(lt);return n?r.pipe(uE(n)):r}case"int64vector":{const n=e.length,r=Qe(VI.pipe(_1(Ut.INT64_MIN),k1(Ut.INT64_MAX)));return n?r.pipe(uE(n)):r}case"basecolumn":{const n=e.baseColumn;if(n){const r=X8(n),s=e.length,i=Qe(r);return s?i.pipe(uE(s)):i}return Qe(zo)}default:return Qe(zo)}}function nz(e,t){switch(t){case"buffer":return Zge;case"date":return ihe;case"geometry":case"point":return ce({x:lt,y:lt});case"json":return Xge;case"line":return ce({a:lt,b:lt,c:lt});default:return wfe}}function rz(e,t){const{name:n,length:r,isLengthExact:s}=e;let i;if(t==="binary"&&(i=/^[01]*$/),t==="uuid")return Hfe;if(t==="enum"){const o=e.enumValues;if(!o)throw new Error(`Column "${zge(Vge(e))}"."${n}" is of 'enum' type, but lacks enum values`);return Re(...o)}if(t==="int64")return e0e;if(t==="uint64")return t0e;let a=D;return a=i?a.pipe(GB(i)):a,r&&s?a.pipe(jfe(r)):r?a.pipe(Dfe(r)):a}function sz(e){return(typeof e!="object"||e===null)&&typeof e!="function"?!1:!jr(e)&&"from"in e&&jr(e.from)}function AR(e){return jr(e)?!0:sz(e)}function I1(e,t,n){const r={};for(const[s,i]of Object.entries(e)){if(!Gt(i,_m)&&!Gt(i,Yn)&&!Gt(i,Yn.Aliased)&&typeof i=="object"){r[s]=I1(Bge(i)||Wge(i)?T1(i):i,t[s]??{},n);continue}const a=t[s];if(a!==void 0&&!(typeof a=="function"&&!AR(a))){r[s]=a;continue}const o=Gt(i,_m)?i:void 0,c=o?X8(o):zo,u=AR(a)||typeof a!="function"?c:a(c),l=sz(u)?u.from:u;n.never(o)||(r[s]=l,o&&(n.nullable(o)&&(r[s]=ee(r[s])),n.optional(o)&&(r[s]=Z(OB(r[s])))))}return ce(r)}function r0e(e){return Re(...e.enumValues)}const s0e={never:()=>!1,optional:()=>!1,nullable:e=>!e.notNull},i0e={never:e=>e?.generated?.type==="always"||e?.generatedIdentity?.type==="always"||"identity"in(e??{})&&typeof e?.identity<"u",optional:e=>!e.notNull||e.notNull&&e.hasDefault,nullable:e=>!e.notNull},a0e={never:e=>e?.generated?.type==="always"||e?.generatedIdentity?.type==="always"||"identity"in(e??{})&&typeof e?.identity<"u",optional:()=>!0,nullable:e=>!e.notNull},hr=(e,t)=>Jge(e)?r0e(e):I1(T1(e),t??{},s0e),rc=(e,t)=>I1(T1(e),t??{},i0e),sc=(e,t)=>I1(T1(e),t??{},a0e);function CR(e,t,n){for(let r=t;r<e.length;r++){const s=e[r];if(s==="\\"){r++;continue}if(s==='"')return[e.slice(t,r).replace(/\\/g,""),r+1];if(!n&&(s===","||s==="}"))return[e.slice(t,r).replace(/\\/g,""),r]}return[e.slice(t).replace(/\\/g,""),e.length]}function iz(e,t=0){const n=[];let r=t,s=!1;for(;r<e.length;){const i=e[r];if(i===","){(s||r===t)&&n.push(""),s=!0,r++;continue}if(s=!1,i==="\\"){r+=2;continue}if(i==='"'){const[c,u]=CR(e,r+1,!0);n.push(c),r=u;continue}if(i==="}")return[n,r+1];if(i==="{"){const[c,u]=iz(e,r+1);n.push(c),r=u;continue}const[a,o]=CR(e,r,!1);n.push(a),r=o}return[n,r]}function az(e){const[t]=iz(e,1);return t}function oz(e){return`{${e.map(t=>Array.isArray(t)?oz(t):typeof t=="string"?`"${t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`:`${t}`).join(",")}}`}var o0e=class{static[ie]="PgForeignKeyBuilder";reference;_onUpdate="no action";_onDelete="no action";constructor(e,t){this.reference=()=>{const{name:n,columns:r,foreignColumns:s}=e();return{name:n,columns:r,foreignTable:s[0].table,foreignColumns:s}},t&&(this._onUpdate=t.onUpdate,this._onDelete=t.onDelete)}onUpdate(e){return this._onUpdate=e===void 0?"no action":e,this}onDelete(e){return this._onDelete=e===void 0?"no action":e,this}build(e){return new c0e(e,this)}},c0e=class{static[ie]="PgForeignKey";reference;onUpdate;onDelete;name;constructor(e,t){this.table=e,this.reference=t.reference,this.onUpdate=t._onUpdate,this.onDelete=t._onDelete}getName(){const{name:e,columns:t,foreignColumns:n}=this.reference(),r=t.map(a=>a.name),s=n.map(a=>a.name),i=[this.table[Zc],...r,n[0].table[Zc],...s];return e??`${i.join("_")}_fk`}isNameExplicit(){return!!this.reference().name}},St=class{static[ie]="PgColumnBuilder";foreignKeyConfigs=[];config;constructor(e,t,n){this.config={name:e,keyAsName:e==="",notNull:!1,default:void 0,hasDefault:!1,primaryKey:!1,isUnique:!1,uniqueName:void 0,uniqueType:void 0,dataType:t,columnType:n,generated:void 0,defaultFn:void 0,onUpdateFn:void 0,generatedIdentity:void 0}}$type(){return this}notNull(){return this.config.notNull=!0,this}default(e){return this.config.default=e,this.config.hasDefault=!0,this}$defaultFn(e){return this.config.defaultFn=e,this.config.hasDefault=!0,this}$default=this.$defaultFn;$onUpdateFn(e){return this.config.onUpdateFn=e,this.config.hasDefault=!0,this}$onUpdate=this.$onUpdateFn;primaryKey(){return this.config.primaryKey=!0,this.config.notNull=!0,this}setName(e){this.config.name===""&&(this.config.name=e)}array(e){const t=e??"[]";return this.config.dimensions=t.length/2,this}references(e,t={}){return this.foreignKeyConfigs.push({ref:e,config:t}),this}unique(e,t){return this.config.isUnique=!0,this.config.uniqueName=e,this.config.uniqueType=t?.nulls,this}generatedAlwaysAs(e){return this.config.generated={as:e,type:"always",mode:"stored"},this}buildForeignKeys(e,t){return this.foreignKeyConfigs.map(({ref:n,config:r})=>Hge((s,i)=>{const a=new o0e(()=>{const o=s();return{name:i.name,columns:[e],foreignColumns:[o]}});return i.onUpdate&&a.onUpdate(i.onUpdate),i.onDelete&&a.onDelete(i.onDelete),a.build(t)},n,r))}buildExtraConfigColumn(e){return new H0(e,{...this.config,dimensions:this.config.dimensions??0})}},Ye=class extends _m{static[ie]="PgColumn";table;dimensions;constructor(e,t){if(super(e,t),this.table=e,this.dimensions=t.dimensions??0,this.dimensions){const n=this.mapFromDriverValue.bind(this),r=this.mapToDriverValue.bind(this);this.mapFromDriverValue=s=>{if(s===null)return s;const i=typeof s=="string"?az(s):s;return this.mapArrayElements(i,n,this.dimensions)},this.mapToDriverValue=s=>s===null?s:oz(this.mapArrayElements(s,r,this.dimensions))}}mapArrayElements(e,t,n){return n>0&&Array.isArray(e)?e.map(r=>r===null?null:this.mapArrayElements(r,t,n-1)):t(e)}},H0=class extends Ye{static[ie]="ExtraConfigColumn";getSQLType(){return this.getSQLType()}indexConfig={order:this.config.order??"asc",nulls:this.config.nulls??"last",opClass:this.config.opClass};defaultConfig={order:"asc",nulls:"last",opClass:void 0};asc(){return this.indexConfig.order="asc",this}desc(){return this.indexConfig.order="desc",this}nullsFirst(){return this.indexConfig.nulls="first",this}nullsLast(){return this.indexConfig.nulls="last",this}op(e){return this.indexConfig.opClass=e,this}},el=class{static[ie]="IndexedColumn";constructor(e,t,n,r){this.name=e,this.keyAsName=t,this.type=n,this.indexConfig=r}name;keyAsName;type;indexConfig},yp=class extends St{static[ie]="PgIntColumnBaseBuilder";generatedAlwaysAsIdentity(e){if(e){const{name:t,...n}=e;this.config.generatedIdentity={type:"always",sequenceName:t,sequenceOptions:n}}else this.config.generatedIdentity={type:"always"};return this.config.hasDefault=!0,this.config.notNull=!0,this}generatedByDefaultAsIdentity(e){if(e){const{name:t,...n}=e;this.config.generatedIdentity={type:"byDefault",sequenceName:t,sequenceOptions:n}}else this.config.generatedIdentity={type:"byDefault"};return this.config.hasDefault=!0,this.config.notNull=!0,this}},u0e=class extends yp{static[ie]="PgBigInt53Builder";constructor(e){super(e,"number int53","PgBigInt53")}build(e){return new l0e(e,this.config)}},l0e=class extends Ye{static[ie]="PgBigInt53";getSQLType(){return"bigint"}mapFromDriverValue(e){return typeof e=="number"?e:Number(e)}},d0e=class extends yp{static[ie]="PgBigInt64Builder";constructor(e){super(e,"bigint int64","PgBigInt64")}build(e){return new f0e(e,this.config)}},f0e=class extends Ye{static[ie]="PgBigInt64";getSQLType(){return"bigint"}mapFromDriverValue(e){return BigInt(e)}},h0e=class extends yp{static[ie]="PgBigIntStringBuilder";constructor(e){super(e,"string int64","PgBigIntString")}build(e){return new m0e(e,this.config)}},m0e=class extends Ye{static[ie]="PgBigIntString";getSQLType(){return"bigint"}mapFromDriverValue(e){return typeof e=="string"?e:String(e)}};function ht(e,t){const{name:n,config:r}=er(e,t);return r.mode==="number"?new u0e(n):r.mode==="string"?new h0e(n):new d0e(n)}var p0e=class extends St{static[ie]="PgBigSerial53Builder";constructor(e){super(e,"number int53","PgBigSerial53"),this.config.hasDefault=!0,this.config.notNull=!0}build(e){return new g0e(e,this.config)}},g0e=class extends Ye{static[ie]="PgBigSerial53";getSQLType(){return"bigserial"}mapFromDriverValue(e){return typeof e=="number"?e:Number(e)}},b0e=class extends St{static[ie]="PgBigSerial64Builder";constructor(e){super(e,"bigint int64","PgBigSerial64"),this.config.hasDefault=!0,this.config.notNull=!0}build(e){return new y0e(e,this.config)}},y0e=class extends Ye{static[ie]="PgBigSerial64";getSQLType(){return"bigserial"}mapFromDriverValue(e){return BigInt(e)}};function _0e(e,t){const{name:n,config:r}=er(e,t);return r.mode==="number"?new p0e(n):new b0e(n)}var k0e=class extends St{static[ie]="PgBooleanBuilder";constructor(e){super(e,"boolean","PgBoolean")}build(e){return new E0e(e,this.config)}},E0e=class extends Ye{static[ie]="PgBoolean";getSQLType(){return"boolean"}};function Jd(e){return new k0e(e??"")}var w0e=class extends St{static[ie]="PgCharBuilder";constructor(e,t){super(e,t.enum?.length?"string enum":"string","PgChar"),this.config.length=t.length??1,this.config.setLength=t.length!==void 0,this.config.enumValues=t.enum}build(e){return new S0e(e,this.config)}},S0e=class extends Ye{static[ie]="PgChar";enumValues;setLength;constructor(e,t){super(e,t),this.enumValues=t.enumValues,this.setLength=t.setLength}getSQLType(){return this.setLength?`char(${this.length})`:"char"}};function v0e(e,t={}){const{name:n,config:r}=er(e,t);return new w0e(n,r)}var x0e=class extends St{static[ie]="PgCidrBuilder";constructor(e){super(e,"string cidr","PgCidr")}build(e){return new T0e(e,this.config)}},T0e=class extends Ye{static[ie]="PgCidr";getSQLType(){return"cidr"}};function I0e(e){return new x0e(e??"")}var A0e=class extends St{static[ie]="PgCustomColumnBuilder";constructor(e,t,n){super(e,"custom","PgCustomColumn"),this.config.fieldConfig=t,this.config.customTypeParams=n}build(e){return new C0e(e,this.config)}},C0e=class extends Ye{static[ie]="PgCustomColumn";sqlName;mapTo;mapFrom;mapJson;forJsonSelect;constructor(e,t){if(super(e,t),this.sqlName=t.customTypeParams.dataType(t.fieldConfig),this.mapTo=t.customTypeParams.toDriver,this.mapFrom=t.customTypeParams.fromDriver,this.mapJson=t.customTypeParams.fromJson,this.forJsonSelect=t.customTypeParams.forJsonSelect,this.dimensions){const n=r=>typeof this.mapJson=="function"?this.mapJson(r):typeof this.mapFrom=="function"?this.mapFrom(r):r;this.mapFromJsonValue=r=>{if(r===null)return r;const s=typeof r=="string"?az(r):r;return this.mapJsonArrayElements(s,n,this.dimensions)}}}mapJsonArrayElements(e,t,n){return n>0&&Array.isArray(e)?e.map(r=>r===null?null:this.mapJsonArrayElements(r,t,n-1)):t(e)}getSQLType(){return this.sqlName}mapFromDriverValue(e){return typeof this.mapFrom=="function"?this.mapFrom(e):e}mapFromJsonValue(e){return typeof this.mapJson=="function"?this.mapJson(e):this.mapFromDriverValue(e)}jsonSelectIdentifier(e,t,n){if(typeof this.forJsonSelect=="function")return this.forJsonSelect(e,t,n);const r=this.getSQLType().toLowerCase(),s=r.indexOf("(");switch(s+1?r.slice(0,s):r){case"bytea":case"geometry":case"timestamp":case"numeric":case"bigint":{const i="[]".repeat(n??0);return t`${e}::text${t.raw(i).if(n)}`}default:return e}}mapToDriverValue(e){return typeof this.mapTo=="function"?this.mapTo(e):e}};function P0e(e){return(t,n)=>{const{name:r,config:s}=er(t,n);return new A0e(r,s,e)}}var _p=class extends St{static[ie]="PgDateColumnBaseBuilder";defaultNow(){return this.default(Lt`now()`)}},N0e=class extends _p{static[ie]="PgDateBuilder";constructor(e){super(e,"object date","PgDate")}build(e){return new R0e(e,this.config)}},R0e=class extends Ye{static[ie]="PgDate";getSQLType(){return"date"}mapFromDriverValue(e){return typeof e=="string"?new Date(e):e}mapToDriverValue(e){return typeof e=="string"?e:e.toISOString()}},O0e=class extends _p{static[ie]="PgDateStringBuilder";constructor(e){super(e,"string date","PgDateString")}build(e){return new L0e(e,this.config)}},L0e=class extends Ye{static[ie]="PgDateString";getSQLType(){return"date"}mapFromDriverValue(e){return typeof e=="string"?e:e.toISOString().slice(0,-14)}mapToDriverValue(e){return typeof e=="string"?e:e.toISOString()}};function D0e(e,t){const{name:n,config:r}=er(e,t);return r?.mode==="date"?new N0e(n):new O0e(n)}var $0e=class extends St{static[ie]="PgDoublePrecisionBuilder";constructor(e){super(e,"number double","PgDoublePrecision")}build(e){return new M0e(e,this.config)}},M0e=class extends Ye{static[ie]="PgDoublePrecision";getSQLType(){return"double precision"}mapFromDriverValue(e){return typeof e=="string"?Number.parseFloat(e):e}};function j0e(e){return new $0e(e??"")}var F0e=class extends St{static[ie]="PgInetBuilder";constructor(e){super(e,"string inet","PgInet")}build(e){return new B0e(e,this.config)}},B0e=class extends Ye{static[ie]="PgInet";getSQLType(){return"inet"}};function z0e(e){return new F0e(e??"")}var U0e=class extends yp{static[ie]="PgIntegerBuilder";constructor(e){super(e,"number int32","PgInteger")}build(e){return new V0e(e,this.config)}},V0e=class extends Ye{static[ie]="PgInteger";getSQLType(){return"integer"}mapFromDriverValue(e){return typeof e=="string"?Number.parseInt(e):e}};function H0e(e){return new U0e(e??"")}var q0e=class extends St{static[ie]="PgIntervalBuilder";constructor(e,t){super(e,"string interval","PgInterval"),this.config.intervalConfig=t}build(e){return new G0e(e,this.config)}},G0e=class extends Ye{static[ie]="PgInterval";fields;precision;constructor(e,t){super(e,t),this.fields=t.intervalConfig.fields,this.precision=t.intervalConfig.precision}getSQLType(){return`interval${this.fields?` ${this.fields}`:""}${this.precision?`(${this.precision})`:""}`}};function K0e(e,t={}){const{name:n,config:r}=er(e,t);return new q0e(n,r)}var W0e=class extends St{static[ie]="PgJsonBuilder";constructor(e){super(e,"object json","PgJson")}build(e){return new J0e(e,this.config)}},J0e=class extends Ye{static[ie]="PgJson";constructor(e,t){super(e,t)}getSQLType(){return"json"}mapToDriverValue(e){return JSON.stringify(e)}mapFromDriverValue(e){if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e}};function Y0e(e){return new W0e(e??"")}var Q0e=class extends St{static[ie]="PgJsonbBuilder";constructor(e){super(e,"object json","PgJsonb")}build(e){return new X0e(e,this.config)}},X0e=class extends Ye{static[ie]="PgJsonb";constructor(e,t){super(e,t)}getSQLType(){return"jsonb"}mapToDriverValue(e){return JSON.stringify(e)}mapFromDriverValue(e){if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e}};function Z0e(e){return new Q0e(e??"")}var ebe=class extends St{static[ie]="PgLineBuilder";constructor(e){super(e,"array line","PgLine")}build(e){return new tbe(e,this.config)}},tbe=class extends Ye{static[ie]="PgLine";mode="tuple";getSQLType(){return"line"}mapFromDriverValue(e){const[t,n,r]=e.slice(1,-1).split(",");return[Number.parseFloat(t),Number.parseFloat(n),Number.parseFloat(r)]}mapToDriverValue(e){return`{${e[0]},${e[1]},${e[2]}}`}},nbe=class extends St{static[ie]="PgLineABCBuilder";constructor(e){super(e,"object line","PgLineABC")}build(e){return new rbe(e,this.config)}},rbe=class extends Ye{static[ie]="PgLineABC";mode="abc";getSQLType(){return"line"}mapFromDriverValue(e){const[t,n,r]=e.slice(1,-1).split(",");return{a:Number.parseFloat(t),b:Number.parseFloat(n),c:Number.parseFloat(r)}}mapToDriverValue(e){return`{${e.a},${e.b},${e.c}}`}};function sbe(e,t){const{name:n,config:r}=er(e,t);return!r?.mode||r.mode==="tuple"?new ebe(n):new nbe(n)}var ibe=class extends St{static[ie]="PgMacaddrBuilder";constructor(e){super(e,"string macaddr","PgMacaddr")}build(e){return new abe(e,this.config)}},abe=class extends Ye{static[ie]="PgMacaddr";getSQLType(){return"macaddr"}};function obe(e){return new ibe(e??"")}var cbe=class extends St{static[ie]="PgMacaddr8Builder";constructor(e){super(e,"string macaddr8","PgMacaddr8")}build(e){return new ube(e,this.config)}},ube=class extends Ye{static[ie]="PgMacaddr8";getSQLType(){return"macaddr8"}};function lbe(e){return new cbe(e??"")}var dbe=class extends St{static[ie]="PgNumericBuilder";constructor(e,t,n){super(e,"string numeric","PgNumeric"),this.config.precision=t,this.config.scale=n}build(e){return new fbe(e,this.config)}},fbe=class extends Ye{static[ie]="PgNumeric";precision;scale;constructor(e,t){super(e,t),this.precision=t.precision,this.scale=t.scale}mapFromDriverValue(e){return typeof e=="string"?e:String(e)}getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?"numeric":`numeric(${this.precision})`}},hbe=class extends St{static[ie]="PgNumericNumberBuilder";constructor(e,t,n){super(e,"number","PgNumericNumber"),this.config.precision=t,this.config.scale=n}build(e){return new mbe(e,this.config)}},mbe=class extends Ye{static[ie]="PgNumericNumber";precision;scale;constructor(e,t){super(e,t),this.precision=t.precision,this.scale=t.scale}mapFromDriverValue(e){return typeof e=="number"?e:Number(e)}mapToDriverValue(e){return String(e)}getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?"numeric":`numeric(${this.precision})`}},pbe=class extends St{static[ie]="PgNumericBigIntBuilder";constructor(e,t,n){super(e,"bigint int64","PgNumericBigInt"),this.config.precision=t,this.config.scale=n}build(e){return new gbe(e,this.config)}},gbe=class extends Ye{static[ie]="PgNumericBigInt";precision;scale;constructor(e,t){super(e,t),this.precision=t.precision,this.scale=t.scale}mapFromDriverValue(e){return BigInt(e)}mapToDriverValue(e){return String(e)}getSQLType(){return this.precision!==void 0&&this.scale!==void 0?`numeric(${this.precision}, ${this.scale})`:this.precision===void 0?"numeric":`numeric(${this.precision})`}};function bbe(e,t){const{name:n,config:r}=er(e,t),s=r?.mode;return s==="number"?new hbe(n,r?.precision,r?.scale):s==="bigint"?new pbe(n,r?.precision,r?.scale):new dbe(n,r?.precision,r?.scale)}var ybe=class extends St{static[ie]="PgPointTupleBuilder";constructor(e){super(e,"array point","PgPointTuple")}build(e){return new _be(e,this.config)}},_be=class extends Ye{static[ie]="PgPointTuple";mode="tuple";getSQLType(){return"point"}mapFromDriverValue(e){if(typeof e=="string"){const[t,n]=e.slice(1,-1).split(",");return[Number.parseFloat(t),Number.parseFloat(n)]}return[e.x,e.y]}mapToDriverValue(e){return`(${e[0]},${e[1]})`}},kbe=class extends St{static[ie]="PgPointObjectBuilder";constructor(e){super(e,"object point","PgPointObject")}build(e){return new Ebe(e,this.config)}},Ebe=class extends Ye{static[ie]="PgPointObject";mode="xy";getSQLType(){return"point"}mapFromDriverValue(e){if(typeof e=="string"){const[t,n]=e.slice(1,-1).split(",");return{x:Number.parseFloat(t),y:Number.parseFloat(n)}}return e}mapToDriverValue(e){return`(${e.x},${e.y})`}};function wbe(e,t){const{name:n,config:r}=er(e,t);return!r?.mode||r.mode==="tuple"?new ybe(n):new kbe(n)}function Sbe(e){const t=[];for(let n=0;n<e.length;n+=2)t.push(Number.parseInt(e.slice(n,n+2),16));return new Uint8Array(t)}function PR(e,t){const n=new ArrayBuffer(8),r=new DataView(n);for(let s=0;s<8;s++)r.setUint8(s,e[t+s]);return r.getFloat64(0,!0)}function cz(e){const t=Sbe(e);let n=0;const r=t[n];n+=1;const s=new DataView(t.buffer),i=s.getUint32(n,r===1);n+=4;let a;if(i&536870912&&(a=s.getUint32(n,r===1),n+=4),(i&65535)===1){const o=PR(t,n);n+=8;const c=PR(t,n);return n+=8,{srid:a,point:[o,c]}}throw new Error("Unsupported geometry type")}var vbe=class extends St{static[ie]="PgGeometryBuilder";constructor(e,t){super(e,"array geometry","PgGeometry"),this.config.srid=t}build(e){return new xbe(e,this.config)}},xbe=class extends Ye{static[ie]="PgGeometry";srid=this.config.srid;mode="tuple";getSQLType(){return`geometry(point${this.srid===void 0?"":`,${this.srid}`})`}mapFromDriverValue(e){return typeof e!="string"?e:cz(e).point}mapToDriverValue(e){return`point(${e[0]} ${e[1]})`}},Tbe=class extends St{static[ie]="PgGeometryObjectBuilder";constructor(e,t){super(e,"object geometry","PgGeometryObject"),this.config.srid=t}build(e){return new Ibe(e,this.config)}},Ibe=class extends Ye{static[ie]="PgGeometryObject";srid=this.config.srid;mode="object";getSQLType(){return`geometry(point${this.srid===void 0?"":`,${this.srid}`})`}mapFromDriverValue(e){const t=cz(e);return{x:t.point[0],y:t.point[1]}}mapToDriverValue(e){return`point(${e.x} ${e.y})`}};function Abe(e,t){const{name:n,config:r}=er(e,t);return!r?.mode||r.mode==="tuple"?new vbe(n,r?.srid):new Tbe(n,r?.srid)}var Cbe=class extends St{static[ie]="PgRealBuilder";constructor(e,t){super(e,"number float","PgReal"),this.config.length=t}build(e){return new Pbe(e,this.config)}},Pbe=class extends Ye{static[ie]="PgReal";constructor(e,t){super(e,t)}getSQLType(){return"real"}mapFromDriverValue(e){return typeof e=="string"?Number.parseFloat(e):e}};function Nbe(e){return new Cbe(e??"")}var Rbe=class extends St{static[ie]="PgSerialBuilder";constructor(e){super(e,"number int32","PgSerial"),this.config.hasDefault=!0,this.config.notNull=!0}build(e){return new Obe(e,this.config)}},Obe=class extends Ye{static[ie]="PgSerial";getSQLType(){return"serial"}};function Lbe(e){return new Rbe(e??"")}var Dbe=class extends yp{static[ie]="PgSmallIntBuilder";constructor(e){super(e,"number int16","PgSmallInt")}build(e){return new $be(e,this.config)}},$be=class extends Ye{static[ie]="PgSmallInt";getSQLType(){return"smallint"}mapFromDriverValue(e){return typeof e=="string"?Number(e):e}};function Mbe(e){return new Dbe(e??"")}var jbe=class extends St{static[ie]="PgSmallSerialBuilder";constructor(e){super(e,"number int16","PgSmallSerial"),this.config.hasDefault=!0,this.config.notNull=!0}build(e){return new Fbe(e,this.config)}},Fbe=class extends Ye{static[ie]="PgSmallSerial";getSQLType(){return"smallserial"}};function Bbe(e){return new jbe(e??"")}var zbe=class extends St{static[ie]="PgTextBuilder";constructor(e,t){super(e,t.enum?.length?"string enum":"string","PgText"),this.config.enumValues=t.enum}build(e){return new Ube(e,this.config,this.config.enumValues)}},Ube=class extends Ye{static[ie]="PgText";enumValues;constructor(e,t,n){super(e,t),this.enumValues=n}getSQLType(){return"text"}};function ne(e,t={}){const{name:n,config:r}=er(e,t);return new zbe(n,r)}var Vbe=class extends _p{static[ie]="PgTimeBuilder";constructor(e,t,n){super(e,"string time","PgTime"),this.withTimezone=t,this.precision=n,this.config.withTimezone=t,this.config.precision=n}build(e){return new Hbe(e,this.config)}},Hbe=class extends Ye{static[ie]="PgTime";withTimezone;precision;constructor(e,t){super(e,t),this.withTimezone=t.withTimezone,this.precision=t.precision}getSQLType(){return`time${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}};function qbe(e,t={}){const{name:n,config:r}=er(e,t);return new Vbe(n,r.withTimezone??!1,r.precision)}var Gbe=class extends _p{static[ie]="PgTimestampBuilder";constructor(e,t,n){super(e,"object date","PgTimestamp"),this.config.withTimezone=t,this.config.precision=n}build(e){return new Kbe(e,this.config)}},Kbe=class extends Ye{static[ie]="PgTimestamp";withTimezone;precision;constructor(e,t){super(e,t),this.withTimezone=t.withTimezone,this.precision=t.precision}getSQLType(){return`timestamp${this.precision===void 0?"":` (${this.precision})`}${this.withTimezone?" with time zone":""}`}mapFromDriverValue(e){return typeof e=="string"?new Date(this.withTimezone?e:e+"+0000"):e}mapToDriverValue(e){return typeof e=="string"?e:e.toISOString()}},Wbe=class extends _p{static[ie]="PgTimestampStringBuilder";constructor(e,t,n){super(e,"string timestamp","PgTimestampString"),this.config.withTimezone=t,this.config.precision=n}build(e){return new Jbe(e,this.config)}},Jbe=class extends Ye{static[ie]="PgTimestampString";withTimezone;precision;constructor(e,t){super(e,t),this.withTimezone=t.withTimezone,this.precision=t.precision}getSQLType(){return`timestamp${this.precision===void 0?"":`(${this.precision})`}${this.withTimezone?" with time zone":""}`}mapFromDriverValue(e){if(typeof e=="string")return e;const t=e.toISOString().slice(0,-1).replace("T"," ");return this.withTimezone?`${t}+00`:t}mapToDriverValue(e){return typeof e=="string"?e:e.toISOString()}};function Ybe(e,t={}){const{name:n,config:r}=er(e,t);return r?.mode==="string"?new Wbe(n,r.withTimezone??!1,r.precision):new Gbe(n,r?.withTimezone??!1,r?.precision)}var Qbe=class extends St{static[ie]="PgUUIDBuilder";constructor(e){super(e,"string uuid","PgUUID")}defaultRandom(){return this.default(Lt`gen_random_uuid()`)}build(e){return new Xbe(e,this.config)}},Xbe=class extends Ye{static[ie]="PgUUID";getSQLType(){return"uuid"}};function Zbe(e){return new Qbe(e??"")}var eye=class extends St{static[ie]="PgVarcharBuilder";constructor(e,t){super(e,t.enum?.length?"string enum":"string","PgVarchar"),this.config.length=t.length,this.config.enumValues=t.enum}build(e){return new tye(e,this.config)}},tye=class extends Ye{static[ie]="PgVarchar";enumValues;constructor(e,t){super(e,t),this.enumValues=t.enumValues}getSQLType(){return this.length===void 0?"varchar":`varchar(${this.length})`}};function nye(e,t={}){const{name:n,config:r}=er(e,t);return new eye(n,r)}var rye=class extends St{static[ie]="PgBinaryVectorBuilder";constructor(e,t){super(e,"string binary","PgBinaryVector"),this.config.length=t.dimensions,this.config.isLengthExact=!0}build(e){return new sye(e,this.config)}},sye=class extends Ye{static[ie]="PgBinaryVector";getSQLType(){return`bit(${this.length})`}};function iye(e,t){const{name:n,config:r}=er(e,t);return new rye(n,r)}var aye=class extends St{static[ie]="PgHalfVectorBuilder";constructor(e,t){super(e,"array halfvector","PgHalfVector"),this.config.length=t.dimensions,this.config.isLengthExact=!0}build(e){return new oye(e,this.config)}},oye=class extends Ye{static[ie]="PgHalfVector";getSQLType(){return`halfvec(${this.length})`}mapToDriverValue(e){return JSON.stringify(e)}mapFromDriverValue(e){return e.slice(1,-1).split(",").map(t=>Number.parseFloat(t))}};function cye(e,t){const{name:n,config:r}=er(e,t);return new aye(n,r)}var uye=class extends St{static[ie]="PgSparseVectorBuilder";constructor(e,t){super(e,"string sparsevec","PgSparseVector"),this.config.vectorDimensions=t.dimensions}build(e){return new lye(e,this.config)}},lye=class extends Ye{static[ie]="PgSparseVector";vectorDimensions=this.config.vectorDimensions;getSQLType(){return`sparsevec(${this.vectorDimensions})`}};function dye(e,t){const{name:n,config:r}=er(e,t);return new uye(n,r)}var fye=class extends St{static[ie]="PgVectorBuilder";constructor(e,t){super(e,"array vector","PgVector"),this.config.length=t.dimensions,this.config.isLengthExact=!0}build(e){return new hye(e,this.config)}},hye=class extends Ye{static[ie]="PgVector";getSQLType(){return`vector(${this.length})`}mapToDriverValue(e){return JSON.stringify(e)}mapFromDriverValue(e){return e.slice(1,-1).split(",").map(t=>Number.parseFloat(t))}};function mye(e,t){const{name:n,config:r}=er(e,t);return new fye(n,r)}function pye(){return{bigint:ht,bigserial:_0e,boolean:Jd,char:v0e,cidr:I0e,customType:P0e,date:D0e,doublePrecision:j0e,inet:z0e,integer:H0e,interval:K0e,json:Y0e,jsonb:Z0e,line:sbe,macaddr:obe,macaddr8:lbe,numeric:bbe,point:wbe,geometry:Abe,real:Nbe,serial:Lbe,smallint:Mbe,smallserial:Bbe,text:ne,time:qbe,timestamp:Ybe,uuid:Zbe,varchar:nye,bit:iye,halfvec:cye,sparsevec:dye,vector:mye}}const _v=Symbol.for("drizzle:PgInlineForeignKeys"),kv=Symbol.for("drizzle:EnableRLS");var q0=class extends Gn{static[ie]="PgTable";static Symbol=Object.assign({},Gn.Symbol,{InlineForeignKeys:_v,EnableRLS:kv});[_v]=[];[kv]=!1;[Gn.Symbol.ExtraConfigBuilder]=void 0;[Gn.Symbol.ExtraConfigColumns]={}};function uz(e,t,n,r,s=e){const i=new q0(e,r,s),a=typeof t=="function"?t(pye()):t,o=Object.fromEntries(Object.entries(a).map(([l,d])=>{const f=d;f.setName(l);const h=f.build(i);return i[_v].push(...f.buildForeignKeys(h,i)),[l,h]})),c=Object.fromEntries(Object.entries(a).map(([l,d])=>{const f=d;return f.setName(l),[l,f.buildExtraConfigColumn(i)]})),u=Object.assign(i,o);return u[Gn.Symbol.Columns]=o,u[Gn.Symbol.ExtraConfigColumns]=c,n&&(u[q0.Symbol.ExtraConfigBuilder]=n),Object.assign(u,{enableRLS:()=>(u[q0.Symbol.EnableRLS]=!0,u)})}const gye=(e,t,n)=>uz(e,t,n,void 0),bye=(e,t,n)=>{const r=uz(e,t,n,void 0);return r[kv]=!0,r},mr=Object.assign(gye,{withRLS:bye});function kp(...e){return e[0].columns?new NR(e[0].columns,e[0].name):new NR(e)}var NR=class{static[ie]="PgPrimaryKeyBuilder";columns;name;constructor(e,t){this.columns=e,this.name=t}build(e){return new yye(e,this.columns,this.name)}},yye=class{static[ie]="PgPrimaryKey";columns;name;isNameExplicit;constructor(e,t,n){this.table=e,this.columns=t,this.name=n,this.isNameExplicit=!!n}getName(){return this.name??`${this.table[q0.Symbol.Name]}_${this.columns.map(e=>e.name).join("_")}_pk`}},_ye=class{static[ie]="PgCheckBuilder";brand;constructor(e,t){this.name=e,this.value=t}build(e){return new kye(e,this)}},kye=class{static[ie]="PgCheck";name;value;constructor(e,t){this.table=e,this.name=t.name,this.value=t.value}};function Zt(e,t){return new _ye(e,t)}var lz=class{static[ie]="PgIndexBuilderOn";constructor(e,t){this.unique=e,this.name=t}on(...e){return new bE(e.map(t=>{if(Gt(t,Yn))return t;if(Gt(t,H0)){const n=new el(t.name,!!t.keyAsName,t.columnType,t.indexConfig);return t.indexConfig=JSON.parse(JSON.stringify(t.defaultConfig)),n}return t=t,new el(t.name,!!t.keyAsName,t.columnType,{})}),this.unique,!1,this.name)}onOnly(...e){return new bE(e.map(t=>{if(Gt(t,Yn))return t;if(Gt(t,H0)){const n=new el(t.name,!!t.keyAsName,t.columnType,t.indexConfig);return t.indexConfig=JSON.parse(JSON.stringify(t.defaultConfig)),n}return t=t,new el(t.name,!!t.keyAsName,t.columnType,{})}),this.unique,!0,this.name)}using(e,...t){return new bE(t.map(n=>{if(Gt(n,Yn))return n;if(Gt(n,H0)){const r=new el(n.name,!!n.keyAsName,n.columnType,n.indexConfig);return n.indexConfig=JSON.parse(JSON.stringify(n.defaultConfig)),r}return n=n,new el(n.name,!!n.keyAsName,n.columnType,{})}),this.unique,!0,this.name,e)}},bE=class{static[ie]="PgIndexBuilder";config;constructor(e,t,n,r,s="btree"){this.config={name:r,columns:e,unique:t,only:n,method:s}}concurrently(){return this.config.concurrently=!0,this}with(e){return this.config.with=e,this}where(e){return this.config.where=e,this}build(e){return new Eye(this.config,e)}},Eye=class{static[ie]="PgIndex";config;isNameExplicit;constructor(e,t){this.config={...e,table:t},this.isNameExplicit=!!e.name}};function In(e){return new lz(!1,e)}function Du(e){return new lz(!0,e)}const pr={accounts:"accounts",organizations:"organizations",organizationMemberships:"organization_memberships",workspaces:"workspaces",sources:"sources",toolArtifacts:"tool_artifacts",toolArtifactParameters:"tool_artifact_parameters",toolArtifactRequestBodyContentTypes:"tool_artifact_request_body_content_types",toolArtifactRefHintKeys:"tool_artifact_ref_hint_keys",credentials:"credentials",sourceCredentialBindings:"source_credential_bindings",secretMaterials:"secret_materials",sourceAuthSessions:"source_auth_sessions",policies:"policies",localInstallations:"local_installations",executions:"executions",executionInteractions:"execution_interactions"},iA=mr(pr.accounts,{id:ne("id").notNull().primaryKey(),provider:ne("provider").notNull(),subject:ne("subject").notNull(),email:ne("email"),displayName:ne("display_name"),createdAt:ht("created_at",{mode:"number"}).notNull(),updatedAt:ht("updated_at",{mode:"number"}).notNull()},e=>[Du("accounts_provider_subject_idx").on(e.provider,e.subject),In("accounts_updated_idx").on(e.updatedAt,e.id),Zt("accounts_provider_check",Lt`${e.provider} in ('local', 'workos', 'service')`)]),aA=mr(pr.organizations,{id:ne("id").notNull().primaryKey(),slug:ne("slug").notNull(),name:ne("name").notNull(),status:ne("status").notNull(),createdByAccountId:ne("created_by_account_id"),createdAt:ht("created_at",{mode:"number"}).notNull(),updatedAt:ht("updated_at",{mode:"number"}).notNull()},e=>[Du("organizations_slug_idx").on(e.slug),In("organizations_updated_idx").on(e.updatedAt,e.id),Zt("organizations_status_check",Lt`${e.status} in ('active', 'suspended', 'archived')`)]),oA=mr(pr.organizationMemberships,{id:ne("id").notNull().primaryKey(),organizationId:ne("organization_id").notNull(),accountId:ne("account_id").notNull(),role:ne("role").notNull(),status:ne("status").notNull(),billable:Jd("billable").notNull(),invitedByAccountId:ne("invited_by_account_id"),joinedAt:ht("joined_at",{mode:"number"}),createdAt:ht("created_at",{mode:"number"}).notNull(),updatedAt:ht("updated_at",{mode:"number"}).notNull()},e=>[In("organization_memberships_org_updated_idx").on(e.organizationId,e.updatedAt,e.id),In("organization_memberships_account_updated_idx").on(e.accountId,e.updatedAt,e.id),Du("organization_memberships_org_account_idx").on(e.organizationId,e.accountId),Zt("organization_memberships_role_check",Lt`${e.role} in ('viewer', 'editor', 'admin', 'owner')`),Zt("organization_memberships_status_check",Lt`${e.status} in ('invited', 'active', 'suspended', 'removed')`)]),cA=mr(pr.workspaces,{id:ne("id").notNull().primaryKey(),organizationId:ne("organization_id").notNull(),name:ne("name").notNull(),createdByAccountId:ne("created_by_account_id"),createdAt:ht("created_at",{mode:"number"}).notNull(),updatedAt:ht("updated_at",{mode:"number"}).notNull()},e=>[In("workspaces_org_updated_idx").on(e.organizationId,e.updatedAt,e.id),Du("workspaces_org_name_idx").on(e.organizationId,e.name)]),wye=mr(pr.sources,{workspaceId:ne("workspace_id").notNull(),sourceId:ne("source_id").notNull(),name:ne("name").notNull(),kind:ne("kind").notNull(),endpoint:ne("endpoint").notNull(),status:ne("status").notNull(),enabled:Jd("enabled").notNull(),namespace:ne("namespace"),transport:ne("transport"),queryParamsJson:ne("query_params_json"),headersJson:ne("headers_json"),specUrl:ne("spec_url"),defaultHeadersJson:ne("default_headers_json"),sourceHash:ne("source_hash"),sourceDocumentText:ne("source_document_text"),lastError:ne("last_error"),createdAt:ht("created_at",{mode:"number"}).notNull(),updatedAt:ht("updated_at",{mode:"number"}).notNull()},e=>[kp({columns:[e.workspaceId,e.sourceId]}),In("sources_workspace_updated_idx").on(e.workspaceId,e.updatedAt,e.sourceId),Du("sources_workspace_name_idx").on(e.workspaceId,e.name),Zt("sources_kind_check",Lt`${e.kind} in ('mcp', 'openapi', 'graphql', 'internal')`),Zt("sources_status_check",Lt`${e.status} in ('draft', 'probing', 'auth_required', 'connected', 'error')`),Zt("sources_transport_check",Lt`${e.transport} is null or ${e.transport} in ('auto', 'streamable-http', 'sse')`)]),Sye=mr(pr.credentials,{id:ne("id").notNull().primaryKey(),workspaceId:ne("workspace_id").notNull(),authKind:ne("auth_kind").notNull(),authHeaderName:ne("auth_header_name").notNull(),authPrefix:ne("auth_prefix").notNull(),tokenProviderId:ne("token_provider_id").notNull(),tokenHandle:ne("token_handle").notNull(),refreshTokenProviderId:ne("refresh_token_provider_id"),refreshTokenHandle:ne("refresh_token_handle"),createdAt:ht("created_at",{mode:"number"}).notNull(),updatedAt:ht("updated_at",{mode:"number"}).notNull()},e=>[In("credentials_workspace_idx").on(e.workspaceId,e.updatedAt,e.id),Zt("credentials_auth_kind_check",Lt`${e.authKind} in ('bearer', 'oauth2')`)]),vye=mr(pr.sourceCredentialBindings,{id:ne("id").notNull().primaryKey(),workspaceId:ne("workspace_id").notNull(),sourceId:ne("source_id").notNull(),credentialId:ne("credential_id").notNull(),createdAt:ht("created_at",{mode:"number"}).notNull(),updatedAt:ht("updated_at",{mode:"number"}).notNull()},e=>[Du("source_credential_bindings_workspace_source_idx").on(e.workspaceId,e.sourceId),In("source_credential_bindings_workspace_idx").on(e.workspaceId,e.updatedAt,e.sourceId)]),xye=mr(pr.toolArtifacts,{workspaceId:ne("workspace_id").notNull(),path:ne("path").notNull(),toolId:ne("tool_id").notNull(),sourceId:ne("source_id").notNull(),title:ne("title"),description:ne("description"),searchNamespace:ne("search_namespace").notNull(),searchText:ne("search_text").notNull(),inputSchemaJson:ne("input_schema_json"),outputSchemaJson:ne("output_schema_json"),providerKind:ne("provider_kind").notNull(),mcpToolName:ne("mcp_tool_name"),openApiMethod:ne("openapi_method"),openApiPathTemplate:ne("openapi_path_template"),openApiOperationHash:ne("openapi_operation_hash"),openApiRawToolId:ne("openapi_raw_tool_id"),openApiOperationId:ne("openapi_operation_id"),openApiTagsJson:ne("openapi_tags_json"),openApiRequestBodyRequired:Jd("openapi_request_body_required"),createdAt:ht("created_at",{mode:"number"}).notNull(),updatedAt:ht("updated_at",{mode:"number"}).notNull()},e=>[kp({columns:[e.workspaceId,e.path]}),In("tool_artifacts_workspace_source_idx").on(e.workspaceId,e.sourceId,e.updatedAt,e.path),In("tool_artifacts_workspace_namespace_idx").on(e.workspaceId,e.searchNamespace,e.path),In("tool_artifacts_search_text_idx").using("gin",Lt`to_tsvector('simple', ${e.searchText})`),Zt("tool_artifacts_provider_kind_check",Lt`${e.providerKind} in ('mcp', 'openapi')`),Zt("tool_artifacts_mcp_shape_check",Lt`${e.providerKind} <> 'mcp'
29
- or (
30
- ${e.mcpToolName} is not null
31
- and ${e.openApiMethod} is null
32
- and ${e.openApiPathTemplate} is null
33
- and ${e.openApiOperationHash} is null
34
- and ${e.openApiRawToolId} is null
35
- and ${e.openApiOperationId} is null
36
- and ${e.openApiTagsJson} is null
37
- and ${e.openApiRequestBodyRequired} is null
38
- )`),Zt("tool_artifacts_openapi_shape_check",Lt`${e.providerKind} <> 'openapi'
39
- or (
40
- ${e.mcpToolName} is null
41
- and ${e.openApiMethod} in ('get', 'put', 'post', 'delete', 'patch', 'head', 'options', 'trace')
42
- and ${e.openApiPathTemplate} is not null
43
- and ${e.openApiOperationHash} is not null
44
- and ${e.openApiRawToolId} is not null
45
- and ${e.openApiTagsJson} is not null
46
- )`)]),Tye=mr(pr.toolArtifactParameters,{workspaceId:ne("workspace_id").notNull(),path:ne("path").notNull(),position:ht("position",{mode:"number"}).notNull(),name:ne("name").notNull(),location:ne("location").notNull(),required:Jd("required").notNull()},e=>[kp({columns:[e.workspaceId,e.path,e.position]}),Zt("tool_artifact_parameters_location_check",Lt`${e.location} in ('path', 'query', 'header', 'cookie')`)]),Iye=mr(pr.toolArtifactRequestBodyContentTypes,{workspaceId:ne("workspace_id").notNull(),path:ne("path").notNull(),position:ht("position",{mode:"number"}).notNull(),contentType:ne("content_type").notNull()},e=>[kp({columns:[e.workspaceId,e.path,e.position]})]),Aye=mr(pr.toolArtifactRefHintKeys,{workspaceId:ne("workspace_id").notNull(),path:ne("path").notNull(),position:ht("position",{mode:"number"}).notNull(),refHintKey:ne("ref_hint_key").notNull()},e=>[kp({columns:[e.workspaceId,e.path,e.position]})]),Cye=mr(pr.secretMaterials,{id:ne("id").notNull().primaryKey(),name:ne("name"),purpose:ne("purpose").notNull(),value:ne("value").notNull(),createdAt:ht("created_at",{mode:"number"}).notNull(),updatedAt:ht("updated_at",{mode:"number"}).notNull()},e=>[In("secret_materials_updated_idx").on(e.updatedAt,e.id),Zt("secret_materials_purpose_check",Lt`${e.purpose} in ('auth_material', 'oauth_access_token', 'oauth_refresh_token', 'oauth_client_info')`)]),Pye=mr(pr.sourceAuthSessions,{id:ne("id").notNull().primaryKey(),workspaceId:ne("workspace_id").notNull(),sourceId:ne("source_id").notNull(),executionId:ne("execution_id"),interactionId:ne("interaction_id"),strategy:ne("strategy").notNull(),status:ne("status").notNull(),endpoint:ne("endpoint").notNull(),state:ne("state").notNull(),redirectUri:ne("redirect_uri").notNull(),scope:ne("scope"),resourceMetadataUrl:ne("resource_metadata_url"),authorizationServerUrl:ne("authorization_server_url"),resourceMetadataJson:ne("resource_metadata_json"),authorizationServerMetadataJson:ne("authorization_server_metadata_json"),clientInformationJson:ne("client_information_json"),codeVerifier:ne("code_verifier"),authorizationUrl:ne("authorization_url"),errorText:ne("error_text"),completedAt:ht("completed_at",{mode:"number"}),createdAt:ht("created_at",{mode:"number"}).notNull(),updatedAt:ht("updated_at",{mode:"number"}).notNull()},e=>[In("source_auth_sessions_workspace_idx").on(e.workspaceId,e.updatedAt,e.id),In("source_auth_sessions_pending_idx").on(e.workspaceId,e.sourceId,e.status,e.updatedAt,e.id),Du("source_auth_sessions_state_idx").on(e.state),Zt("source_auth_sessions_strategy_check",Lt`${e.strategy} in ('oauth2_authorization_code')`),Zt("source_auth_sessions_status_check",Lt`${e.status} in ('pending', 'completed', 'failed', 'cancelled')`)]),uA=mr(pr.policies,{id:ne("id").notNull().primaryKey(),scopeType:ne("scope_type").notNull(),organizationId:ne("organization_id").notNull(),workspaceId:ne("workspace_id"),targetAccountId:ne("target_account_id"),clientId:ne("client_id"),resourceType:ne("resource_type").notNull(),resourcePattern:ne("resource_pattern").notNull(),matchType:ne("match_type").notNull(),effect:ne("effect").notNull(),approvalMode:ne("approval_mode").notNull(),argumentConditionsJson:ne("argument_conditions_json"),priority:ht("priority",{mode:"number"}).notNull(),enabled:Jd("enabled").notNull(),createdAt:ht("created_at",{mode:"number"}).notNull(),updatedAt:ht("updated_at",{mode:"number"}).notNull()},e=>[In("policies_organization_priority_idx").on(e.organizationId,e.priority.desc(),e.updatedAt,e.id),In("policies_workspace_priority_idx").on(e.workspaceId,e.priority.desc(),e.updatedAt,e.id),Zt("policies_scope_type_check",Lt`${e.scopeType} in ('organization', 'workspace')`),Zt("policies_scope_consistency_check",Lt`(
47
- ${e.scopeType} = 'organization' and ${e.workspaceId} is null
48
- ) or (
49
- ${e.scopeType} = 'workspace' and ${e.workspaceId} is not null
50
- )`),Zt("policies_resource_type_check",Lt`${e.resourceType} in ('all_tools', 'source', 'namespace', 'tool_path')`),Zt("policies_match_type_check",Lt`${e.matchType} in ('glob', 'exact')`),Zt("policies_effect_check",Lt`${e.effect} in ('allow', 'deny')`),Zt("policies_approval_mode_check",Lt`${e.approvalMode} in ('auto', 'required')`)]),lA=mr(pr.localInstallations,{id:ne("id").notNull().primaryKey(),accountId:ne("account_id").notNull(),organizationId:ne("organization_id").notNull(),workspaceId:ne("workspace_id").notNull(),createdAt:ht("created_at",{mode:"number"}).notNull(),updatedAt:ht("updated_at",{mode:"number"}).notNull()},e=>[In("local_installations_organization_idx").on(e.organizationId),In("local_installations_workspace_idx").on(e.workspaceId)]),dA=mr(pr.executions,{id:ne("id").notNull().primaryKey(),workspaceId:ne("workspace_id").notNull(),createdByAccountId:ne("created_by_account_id").notNull(),status:ne("status").notNull(),code:ne("code").notNull(),resultJson:ne("result_json"),errorText:ne("error_text"),logsJson:ne("logs_json"),startedAt:ht("started_at",{mode:"number"}),completedAt:ht("completed_at",{mode:"number"}),createdAt:ht("created_at",{mode:"number"}).notNull(),updatedAt:ht("updated_at",{mode:"number"}).notNull()},e=>[In("executions_workspace_idx").on(e.workspaceId,e.updatedAt,e.id),Zt("executions_status_check",Lt`${e.status} in ('pending', 'running', 'waiting_for_interaction', 'completed', 'failed', 'cancelled')`)]),fA=mr(pr.executionInteractions,{id:ne("id").notNull().primaryKey(),executionId:ne("execution_id").notNull(),status:ne("status").notNull(),kind:ne("kind").notNull(),purpose:ne("purpose").notNull(),payloadJson:ne("payload_json").notNull(),responseJson:ne("response_json"),createdAt:ht("created_at",{mode:"number"}).notNull(),updatedAt:ht("updated_at",{mode:"number"}).notNull()},e=>[In("execution_interactions_execution_idx").on(e.executionId,e.updatedAt,e.id),Zt("execution_interactions_status_check",Lt`${e.status} in ('pending', 'resolved', 'cancelled')`)]),ks=D.pipe(qs("AccountId")),Ka=D.pipe(qs("OrganizationId")),Nye=D.pipe(qs("OrganizationMemberId")),mn=D.pipe(qs("WorkspaceId")),ic=D.pipe(qs("SourceId")),A1=D.pipe(qs("SourceAuthSessionId")),dz=D.pipe(qs("CredentialId")),Rye=D.pipe(qs("SecretMaterialId")),fz=D.pipe(qs("PolicyId")),Oye=D.pipe(qs("InstallationId")),C1=D.pipe(qs("ExecutionId")),hA=D.pipe(qs("ExecutionInteractionId")),hz=Re("active","suspended","archived"),mA={id:Ka,status:hz,createdByAccountId:ee(ks),createdAt:nt,updatedAt:nt},Jp=hr(aA,mA);rc(aA,mA);sc(aA,mA);const pA=Re("viewer","editor","admin","owner"),Lye=Re("invited","active","suspended","removed"),gA={id:Nye,organizationId:Ka,accountId:ks,role:pA,status:Lye,billable:zt,invitedByAccountId:ee(ks),joinedAt:ee(nt),createdAt:nt,updatedAt:nt},yE=hr(oA,gA),mz=rc(oA,gA),Dye=sc(oA,gA),Ep=Re("mcp","openapi","graphql","internal"),wp=Re("draft","probing","auth_required","connected","error"),ac=Re("auto","streamable-http","sse"),Co=ce({providerId:D,handle:D}),bA=Hs(ce({kind:Re("none")}),ce({kind:Re("bearer"),headerName:D,prefix:D,token:Co}),ce({kind:Re("oauth2"),headerName:D,prefix:D,accessToken:Co,refreshToken:ee(Co)})),Xr=b1({key:D,value:D}),$ye={workspaceId:mn,sourceId:ic,kind:Ep,status:wp,transport:ee(ac),createdAt:nt,updatedAt:nt},Mye=hr(wye,$ye);Ha(Mye,ce({id:ic,workspaceId:mn,name:D,kind:Ep,endpoint:D,status:wp,enabled:zt,namespace:ee(D),transport:ee(ac),queryParamsJson:ee(D),headersJson:ee(D),specUrl:ee(D),defaultHeadersJson:ee(D),sourceHash:ee(D),sourceDocumentText:ee(D),lastError:ee(D),createdAt:nt,updatedAt:nt}),{strict:!1,decode:(e,t)=>({id:e.sourceId,workspaceId:e.workspaceId,name:e.name,kind:e.kind,endpoint:e.endpoint,status:e.status,enabled:e.enabled,namespace:e.namespace,transport:e.transport,queryParamsJson:e.queryParamsJson,headersJson:e.headersJson,specUrl:e.specUrl,defaultHeadersJson:e.defaultHeadersJson,sourceHash:e.sourceHash,sourceDocumentText:e.sourceDocumentText,lastError:e.lastError,createdAt:e.createdAt,updatedAt:e.updatedAt}),encode:(e,t)=>({workspaceId:e.workspaceId,sourceId:e.id,name:e.name,kind:e.kind,endpoint:e.endpoint,status:e.status,enabled:e.enabled,namespace:e.namespace,transport:e.transport,queryParamsJson:e.queryParamsJson,headersJson:e.headersJson,specUrl:e.specUrl,defaultHeadersJson:e.defaultHeadersJson,sourceHash:e.sourceHash,sourceDocumentText:e.sourceDocumentText,lastError:e.lastError,createdAt:e.createdAt,updatedAt:e.updatedAt})});const go=ce({id:ic,workspaceId:mn,name:D,kind:Ep,endpoint:D,status:wp,enabled:zt,namespace:ee(D),transport:ee(ac),queryParams:ee(Xr),headers:ee(Xr),specUrl:ee(D),defaultHeaders:ee(Xr),auth:bA,sourceHash:ee(D),lastError:ee(D),createdAt:nt,updatedAt:nt}),jye=Re("mcp","openapi","graphql","unknown"),pz=Re("low","medium","high"),Fye=Re("none","bearer","oauth2","apiKey","basic","unknown"),Bye=Re("header","query","cookie"),zye=Hs(ce({kind:Re("none")}),ce({kind:Re("bearer"),headerName:Z(ee(D)),prefix:Z(ee(D)),token:D}),ce({kind:Re("basic"),username:D,password:D}),ce({kind:Re("headers"),headers:Xr})),Uye=ce({suggestedKind:Fye,confidence:pz,supported:zt,reason:D,headerName:ee(D),prefix:ee(D),parameterName:ee(D),parameterLocation:ee(Bye),oauthAuthorizationUrl:ee(D),oauthTokenUrl:ee(D),oauthScopes:Qe(D)}),Vye=ce({detectedKind:jye,confidence:pz,endpoint:D,specUrl:ee(D),name:ee(D),namespace:ee(D),transport:ee(ac),authInference:Uye,toolCount:ee(lt),warnings:Qe(D)}),Hye=Re("bearer","oauth2"),qye={id:dz,workspaceId:mn,authKind:Hye,authHeaderName:D,authPrefix:D,tokenProviderId:D,tokenHandle:D,refreshTokenProviderId:ee(D),refreshTokenHandle:ee(D),createdAt:nt,updatedAt:nt},Gye={id:D,workspaceId:mn,sourceId:ic,credentialId:dz,createdAt:nt,updatedAt:nt};hr(Sye,qye);hr(vye,Gye);const Kye=Re("organization","workspace"),yA=Re("all_tools","source","namespace","tool_path"),_A=Re("glob","exact"),kA=Re("allow","deny"),EA=Re("auto","required"),Wye=Re("equals","contains","starts_with","not_equals");ce({key:D,operator:Wye,value:D});const wA={id:fz,scopeType:Kye,organizationId:Ka,workspaceId:ee(mn),targetAccountId:ee(ks),clientId:ee(D),resourceType:yA,matchType:_A,effect:kA,approvalMode:EA,argumentConditionsJson:ee(D),createdAt:nt,updatedAt:nt},Ya=hr(uA,wA);rc(uA,wA);sc(uA,wA);const gz=Re("local","workos","service");ce({accountId:ks,provider:gz,subject:D,email:ee(D),displayName:ee(D)});const SA={id:ks,provider:gz,email:ee(D),displayName:ee(D),createdAt:nt,updatedAt:nt};hr(iA,SA);rc(iA,SA);sc(iA,SA);const Jye=Re("active","suspended","revoked");ce({accountId:ks,workspaceId:mn,role:pA,status:Jye,grantedAt:nt,updatedAt:nt});const Yye={organizations:["read","manage"],memberships:["read","write","manage"],workspace:["read","manage"],sources:["read","write","manage"],policies:["read","write","manage"]},vA=Object.entries(Yye).flatMap(([e,t])=>t.map(n=>`${e}:${n}`)),Qye=new Set(vA),Xye=e=>Qye.has(e),Zye=D.pipe(es(Xye,{message:()=>"Invalid permission"})),e_e=vA.filter(e=>e.endsWith(":read")),t_e=vA.filter(e=>e.endsWith(":write"));[...e_e,...t_e];b1({key:pA,value:Qe(Zye)});const xA={id:mn,organizationId:Ka,createdByAccountId:ee(ks),createdAt:nt,updatedAt:nt},Yp=hr(cA,xA);rc(cA,xA);sc(cA,xA);const bz=Re("mcp","openapi"),n_e=Re("path","query","header","cookie"),r_e={workspaceId:mn,sourceId:ic,providerKind:bz,openApiMethod:ee(Re("get","put","post","delete","patch","head","options","trace")),createdAt:nt,updatedAt:nt},s_e=hr(xye,r_e),i_e=ce({workspaceId:mn,path:D,toolId:D,sourceId:ic,title:ee(D),description:ee(D),searchNamespace:D,searchText:D,inputSchemaJson:ee(D),outputSchemaJson:ee(D),providerKind:bz,mcpToolName:ee(D),openApiMethod:ee(Re("get","put","post","delete","patch","head","options","trace")),openApiPathTemplate:ee(D),openApiOperationHash:ee(D),openApiRawToolId:ee(D),openApiOperationId:ee(D),openApiTagsJson:ee(D),openApiRequestBodyRequired:ee(zt),createdAt:nt,updatedAt:nt}).annotations({identifier:"StoredToolArtifactRecord"});Ha(s_e,i_e,{strict:!1,decode:e=>({workspaceId:e.workspaceId,path:e.path,toolId:e.toolId,sourceId:e.sourceId,title:e.title,description:e.description,searchNamespace:e.searchNamespace,searchText:e.searchText,inputSchemaJson:e.inputSchemaJson,outputSchemaJson:e.outputSchemaJson,providerKind:e.providerKind,mcpToolName:e.mcpToolName,openApiMethod:e.openApiMethod,openApiPathTemplate:e.openApiPathTemplate,openApiOperationHash:e.openApiOperationHash,openApiRawToolId:e.openApiRawToolId,openApiOperationId:e.openApiOperationId,openApiTagsJson:e.openApiTagsJson,openApiRequestBodyRequired:e.openApiRequestBodyRequired,createdAt:e.createdAt,updatedAt:e.updatedAt}),encode:e=>({workspaceId:e.workspaceId,path:e.path,toolId:e.toolId,sourceId:e.sourceId,title:e.title,description:e.description,searchNamespace:e.searchNamespace,searchText:e.searchText,inputSchemaJson:e.inputSchemaJson,outputSchemaJson:e.outputSchemaJson,providerKind:e.providerKind,mcpToolName:e.mcpToolName,openApiMethod:e.openApiMethod,openApiPathTemplate:e.openApiPathTemplate,openApiOperationHash:e.openApiOperationHash,openApiRawToolId:e.openApiRawToolId,openApiOperationId:e.openApiOperationId,openApiTagsJson:e.openApiTagsJson,openApiRequestBodyRequired:e.openApiRequestBodyRequired,createdAt:e.createdAt,updatedAt:e.updatedAt})});const a_e={workspaceId:mn,location:n_e,position:lt};hr(Tye,a_e).annotations({identifier:"StoredToolArtifactParameterRecord"});const o_e={workspaceId:mn,position:lt};hr(Iye,o_e).annotations({identifier:"StoredToolArtifactRequestBodyContentTypeRecord"});const c_e={workspaceId:mn,position:lt};hr(Aye,c_e).annotations({identifier:"StoredToolArtifactRefHintKeyRecord"});const yz=Re("auth_material","oauth_access_token","oauth_refresh_token","oauth_client_info"),u_e={id:Rye,name:ee(D),purpose:yz,createdAt:nt,updatedAt:nt};hr(Cye,u_e);const l_e=Re("oauth2_authorization_code"),d_e=Re("pending","completed","failed","cancelled"),f_e={id:A1,workspaceId:mn,sourceId:ic,executionId:ee(C1),interactionId:ee(hA),strategy:l_e,status:d_e,completedAt:ee(nt),createdAt:nt,updatedAt:nt};hr(Pye,f_e);const TA={id:Oye,accountId:ks,organizationId:Ka,workspaceId:mn,createdAt:nt,updatedAt:nt},h_e=hr(lA,TA);rc(lA,TA);sc(lA,TA);const m_e=Re("pending","running","waiting_for_interaction","completed","failed","cancelled"),IA={id:C1,workspaceId:mn,createdByAccountId:ks,status:m_e,resultJson:ee(D),errorText:ee(D),logsJson:ee(D),startedAt:ee(nt),completedAt:ee(nt),createdAt:nt,updatedAt:nt},p_e=hr(dA,IA);rc(dA,IA);sc(dA,IA);const g_e=Re("pending","resolved","cancelled"),AA={id:hA,executionId:C1,status:g_e,purpose:D,responseJson:ee(D),createdAt:nt,updatedAt:nt},b_e=hr(fA,AA);rc(fA,AA);sc(fA,AA);const _E=ce({execution:p_e,pendingInteraction:ee(b_e)}),CA=Symbol.for("yaml.alias"),y_e=Symbol.for("yaml.document"),eu=Symbol.for("yaml.map"),_z=Symbol.for("yaml.pair"),PA=Symbol.for("yaml.scalar"),Sp=Symbol.for("yaml.seq"),sa=Symbol.for("yaml.node.type"),$u=e=>!!e&&typeof e=="object"&&e[sa]===CA,P1=e=>!!e&&typeof e=="object"&&e[sa]===y_e,kz=e=>!!e&&typeof e=="object"&&e[sa]===eu,fr=e=>!!e&&typeof e=="object"&&e[sa]===_z,jn=e=>!!e&&typeof e=="object"&&e[sa]===PA,NA=e=>!!e&&typeof e=="object"&&e[sa]===Sp;function hs(e){if(e&&typeof e=="object")switch(e[sa]){case eu:case Sp:return!0}return!1}function Er(e){if(e&&typeof e=="object")switch(e[sa]){case CA:case eu:case PA:case Sp:return!0}return!1}const Ez=e=>(jn(e)||hs(e))&&!!e.anchor,vc=Symbol("break visit"),__e=Symbol("skip children"),Ih=Symbol("remove node");function N1(e,t){const n=k_e(t);P1(e)?Al(null,e.contents,n,Object.freeze([e]))===Ih&&(e.contents=null):Al(null,e,n,Object.freeze([]))}N1.BREAK=vc;N1.SKIP=__e;N1.REMOVE=Ih;function Al(e,t,n,r){const s=E_e(e,t,n,r);if(Er(s)||fr(s))return w_e(e,r,s),Al(e,s,n,r);if(typeof s!="symbol"){if(hs(t)){r=Object.freeze(r.concat(t));for(let i=0;i<t.items.length;++i){const a=Al(i,t.items[i],n,r);if(typeof a=="number")i=a-1;else{if(a===vc)return vc;a===Ih&&(t.items.splice(i,1),i-=1)}}}else if(fr(t)){r=Object.freeze(r.concat(t));const i=Al("key",t.key,n,r);if(i===vc)return vc;i===Ih&&(t.key=null);const a=Al("value",t.value,n,r);if(a===vc)return vc;a===Ih&&(t.value=null)}}return s}function k_e(e){return typeof e=="object"&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function E_e(e,t,n,r){if(typeof n=="function")return n(e,t,r);if(kz(t))return n.Map?.(e,t,r);if(NA(t))return n.Seq?.(e,t,r);if(fr(t))return n.Pair?.(e,t,r);if(jn(t))return n.Scalar?.(e,t,r);if($u(t))return n.Alias?.(e,t,r)}function w_e(e,t,n){const r=t[t.length-1];if(hs(r))r.items[e]=n;else if(fr(r))e==="key"?r.key=n:r.value=n;else if(P1(r))r.contents=n;else{const s=$u(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${s} parent`)}}function wz(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(n)}return!0}function Zf(e,t,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let s=0,i=r.length;s<i;++s){const a=r[s],o=Zf(e,r,String(s),a);o===void 0?delete r[s]:o!==a&&(r[s]=o)}else if(r instanceof Map)for(const s of Array.from(r.keys())){const i=r.get(s),a=Zf(e,r,s,i);a===void 0?r.delete(s):a!==i&&r.set(s,a)}else if(r instanceof Set)for(const s of Array.from(r)){const i=Zf(e,r,s,s);i===void 0?r.delete(s):i!==s&&(r.delete(s),r.add(i))}else for(const[s,i]of Object.entries(r)){const a=Zf(e,r,s,i);a===void 0?delete r[s]:a!==i&&(r[s]=a)}return e.call(t,n,r)}function fi(e,t,n){if(Array.isArray(e))return e.map((r,s)=>fi(r,String(s),n));if(e&&typeof e.toJSON=="function"){if(!n||!Ez(e))return e.toJSON(t,n);const r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=i=>{r.res=i,delete n.onCreate};const s=e.toJSON(t,n);return n.onCreate&&n.onCreate(s),s}return typeof e=="bigint"&&!n?.keep?Number(e):e}class RA{constructor(t){Object.defineProperty(this,sa,{value:t})}clone(){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}toJS(t,{mapAsMap:n,maxAliasCount:r,onAnchor:s,reviver:i}={}){if(!P1(t))throw new TypeError("A document argument is required");const a={anchors:new Map,doc:t,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},o=fi(this,"",a);if(typeof s=="function")for(const{count:c,res:u}of a.anchors.values())s(u,c);return typeof i=="function"?Zf(i,{"":o},"",o):o}}class S_e extends RA{constructor(t){super(CA),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t,n){let r;n?.aliasResolveCache?r=n.aliasResolveCache:(r=[],N1(t,{Node:(i,a)=>{($u(a)||Ez(a))&&r.push(a)}}),n&&(n.aliasResolveCache=r));let s;for(const i of r){if(i===this)break;i.anchor===this.source&&(s=i)}return s}toJSON(t,n){if(!n)return{source:this.source};const{anchors:r,doc:s,maxAliasCount:i}=n,a=this.resolve(s,n);if(!a){const c=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(c)}let o=r.get(a);if(o||(fi(a,null,n),o=r.get(a)),o?.res===void 0){const c="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(c)}if(i>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=G0(s,a,r)),o.count*o.aliasCount>i)){const c="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(c)}return o.res}toString(t,n,r){const s=`*${this.source}`;if(t){if(wz(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const i=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(i)}if(t.implicitKey)return`${s} `}return s}}function G0(e,t,n){if($u(t)){const r=t.resolve(e),s=n&&r&&n.get(r);return s?s.count*s.aliasCount:0}else if(hs(t)){let r=0;for(const s of t.items){const i=G0(e,s,n);i>r&&(r=i)}return r}else if(fr(t)){const r=G0(e,t.key,n),s=G0(e,t.value,n);return Math.max(r,s)}return 1}const Sz=e=>!e||typeof e!="function"&&typeof e!="object";class rn extends RA{constructor(t){super(PA),this.value=t}toJSON(t,n){return n?.keep?this.value:fi(this.value,t,n)}toString(){return String(this.value)}}rn.BLOCK_FOLDED="BLOCK_FOLDED";rn.BLOCK_LITERAL="BLOCK_LITERAL";rn.PLAIN="PLAIN";rn.QUOTE_DOUBLE="QUOTE_DOUBLE";rn.QUOTE_SINGLE="QUOTE_SINGLE";function v_e(e,t,n){return n.find(r=>r.identify?.(e)&&!r.format)}function _y(e,t,n){if(P1(e)&&(e=e.contents),Er(e))return e;if(fr(e)){const d=n.schema[eu].createNode?.(n.schema,null,n);return d.items.push(e),d}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:r,onAnchor:s,onTagObj:i,schema:a,sourceObjects:o}=n;let c;if(r&&e&&typeof e=="object"){if(c=o.get(e),c)return c.anchor??(c.anchor=s(e)),new S_e(c.anchor);c={anchor:null,node:null},o.set(e,c)}let u=v_e(e,t,a.tags);if(!u){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){const d=new rn(e);return c&&(c.node=d),d}u=e instanceof Map?a[eu]:Symbol.iterator in Object(e)?a[Sp]:a[eu]}i&&(i(u),delete n.onTagObj);const l=u?.createNode?u.createNode(n.schema,e,n):typeof u?.nodeClass?.from=="function"?u.nodeClass.from(n.schema,e,n):new rn(e);return u.default||(l.tag=u.tag),c&&(c.node=l),l}function RR(e,t,n){let r=n;for(let s=t.length-1;s>=0;--s){const i=t[s];if(typeof i=="number"&&Number.isInteger(i)&&i>=0){const a=[];a[i]=r,r=a}else r=new Map([[i,r]])}return _y(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const x_e=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done;class vz extends RA{constructor(t,n){super(t),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(t){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(n.schema=t),n.items=n.items.map(r=>Er(r)||fr(r)?r.clone(t):r),this.range&&(n.range=this.range.slice()),n}addIn(t,n){if(x_e(t))this.add(n);else{const[r,...s]=t,i=this.get(r,!0);if(hs(i))i.addIn(s,n);else if(i===void 0&&this.schema)this.set(r,RR(this.schema,s,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${s}`)}}deleteIn(t){const[n,...r]=t;if(r.length===0)return this.delete(n);const s=this.get(n,!0);if(hs(s))return s.deleteIn(r);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}getIn(t,n){const[r,...s]=t,i=this.get(r,!0);return s.length===0?!n&&jn(i)?i.value:i:hs(i)?i.getIn(s,n):void 0}hasAllNullValues(t){return this.items.every(n=>{if(!fr(n))return!1;const r=n.value;return r==null||t&&jn(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(t){const[n,...r]=t;if(r.length===0)return this.has(n);const s=this.get(n,!0);return hs(s)?s.hasIn(r):!1}setIn(t,n){const[r,...s]=t;if(s.length===0)this.set(r,n);else{const i=this.get(r,!0);if(hs(i))i.setIn(s,n);else if(i===void 0&&this.schema)this.set(r,RR(this.schema,s,n));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${s}`)}}}const T_e=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function km(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const Cl=(e,t,n)=>e.endsWith(`
51
- `)?km(n,t):n.includes(`
52
- `)?`
53
- `+km(n,t):(e.endsWith(" ")?"":" ")+n,xz="flow",Ev="block",K0="quoted";function R1(e,t,n="flow",{indentAtStart:r,lineWidth:s=80,minContentWidth:i=20,onFold:a,onOverflow:o}={}){if(!s||s<0)return e;s<i&&(i=0);const c=Math.max(1+i,1+s-t.length);if(e.length<=c)return e;const u=[],l={};let d=s-t.length;typeof r=="number"&&(r>s-Math.max(2,i)?u.push(0):d=s-r);let f,h,m=!1,y=-1,g=-1,p=-1;n===Ev&&(y=OR(e,y,t.length),y!==-1&&(d=y+c));for(let k;k=e[y+=1];){if(n===K0&&k==="\\"){switch(g=y,e[y+1]){case"x":y+=3;break;case"u":y+=5;break;case"U":y+=9;break;default:y+=1}p=y}if(k===`
54
- `)n===Ev&&(y=OR(e,y,t.length)),d=y+t.length+c,f=void 0;else{if(k===" "&&h&&h!==" "&&h!==`
55
- `&&h!==" "){const v=e[y+1];v&&v!==" "&&v!==`
56
- `&&v!==" "&&(f=y)}if(y>=d)if(f)u.push(f),d=f+c,f=void 0;else if(n===K0){for(;h===" "||h===" ";)h=k,k=e[y+=1],m=!0;const v=y>p+1?y-2:g-1;if(l[v])return e;u.push(v),l[v]=!0,d=v+c,f=void 0}else m=!0}h=k}if(m&&o&&o(),u.length===0)return e;a&&a();let _=e.slice(0,u[0]);for(let k=0;k<u.length;++k){const v=u[k],w=u[k+1]||e.length;v===0?_=`
57
- ${t}${e.slice(0,w)}`:(n===K0&&l[v]&&(_+=`${e[v]}\\`),_+=`
58
- ${t}${e.slice(v+1,w)}`)}return _}function OR(e,t,n){let r=t,s=t+1,i=e[s];for(;i===" "||i===" ";)if(t<s+n)i=e[++t];else{do i=e[++t];while(i&&i!==`
59
- `);r=t,s=t+1,i=e[s]}return r}const O1=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),L1=e=>/^(%|---|\.\.\.)/m.test(e);function I_e(e,t,n){if(!t||t<0)return!1;const r=t-n,s=e.length;if(s<=r)return!1;for(let i=0,a=0;i<s;++i)if(e[i]===`
60
- `){if(i-a>r)return!0;if(a=i+1,s-a<=r)return!1}return!0}function Ah(e,t){const n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;const{implicitKey:r}=t,s=t.options.doubleQuotedMinMultiLineLength,i=t.indent||(L1(e)?" ":"");let a="",o=0;for(let c=0,u=n[c];u;u=n[++c])if(u===" "&&n[c+1]==="\\"&&n[c+2]==="n"&&(a+=n.slice(o,c)+"\\ ",c+=1,o=c,u="\\"),u==="\\")switch(n[c+1]){case"u":{a+=n.slice(o,c);const l=n.substr(c+2,4);switch(l){case"0000":a+="\\0";break;case"0007":a+="\\a";break;case"000b":a+="\\v";break;case"001b":a+="\\e";break;case"0085":a+="\\N";break;case"00a0":a+="\\_";break;case"2028":a+="\\L";break;case"2029":a+="\\P";break;default:l.substr(0,2)==="00"?a+="\\x"+l.substr(2):a+=n.substr(c,6)}c+=5,o=c+1}break;case"n":if(r||n[c+2]==='"'||n.length<s)c+=1;else{for(a+=n.slice(o,c)+`
61
-
62
- `;n[c+2]==="\\"&&n[c+3]==="n"&&n[c+4]!=='"';)a+=`
63
- `,c+=2;a+=i,n[c+2]===" "&&(a+="\\"),c+=1,o=c+1}break;default:c+=1}return a=o?a+n.slice(o):n,r?a:R1(a,i,K0,O1(t,!1))}function wv(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
64
- `)||/[ \t]\n|\n[ \t]/.test(e))return Ah(e,t);const n=t.indent||(L1(e)?" ":""),r="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
65
- ${n}`)+"'";return t.implicitKey?r:R1(r,n,xz,O1(t,!1))}function Pl(e,t){const{singleQuote:n}=t.options;let r;if(n===!1)r=Ah;else{const s=e.includes('"'),i=e.includes("'");s&&!i?r=wv:i&&!s?r=Ah:r=n?wv:Ah}return r(e,t)}let Sv;try{Sv=new RegExp(`(^|(?<!
66
- ))
67
- +(?!
68
- |$)`,"g")}catch{Sv=/\n+(?!\n|$)/g}function W0({comment:e,type:t,value:n},r,s,i){const{blockQuote:a,commentString:o,lineWidth:c}=r.options;if(!a||/\n[\t ]+$/.test(n))return Pl(n,r);const u=r.indent||(r.forceBlockIndent||L1(n)?" ":""),l=a==="literal"?!0:a==="folded"||t===rn.BLOCK_FOLDED?!1:t===rn.BLOCK_LITERAL?!0:!I_e(n,c,u.length);if(!n)return l?`|
69
- `:`>
70
- `;let d,f;for(f=n.length;f>0;--f){const w=n[f-1];if(w!==`
71
- `&&w!==" "&&w!==" ")break}let h=n.substring(f);const m=h.indexOf(`
72
- `);m===-1?d="-":n===h||m!==h.length-1?(d="+",i&&i()):d="",h&&(n=n.slice(0,-h.length),h[h.length-1]===`
73
- `&&(h=h.slice(0,-1)),h=h.replace(Sv,`$&${u}`));let y=!1,g,p=-1;for(g=0;g<n.length;++g){const w=n[g];if(w===" ")y=!0;else if(w===`
74
- `)p=g;else break}let _=n.substring(0,p<g?p+1:g);_&&(n=n.substring(_.length),_=_.replace(/\n+/g,`$&${u}`));let v=(y?u?"2":"1":"")+d;if(e&&(v+=" "+o(e.replace(/ ?[\r\n]+/g," ")),s&&s()),!l){const w=n.replace(/\n+/g,`
75
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${u}`);let S=!1;const T=O1(r,!0);a!=="folded"&&t!==rn.BLOCK_FOLDED&&(T.onOverflow=()=>{S=!0});const I=R1(`${_}${w}${h}`,u,Ev,T);if(!S)return`>${v}
76
- ${u}${I}`}return n=n.replace(/\n+/g,`$&${u}`),`|${v}
77
- ${u}${_}${n}${h}`}function A_e(e,t,n,r){const{type:s,value:i}=e,{actualString:a,implicitKey:o,indent:c,indentStep:u,inFlow:l}=t;if(o&&i.includes(`
78
- `)||l&&/[[\]{},]/.test(i))return Pl(i,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(i))return o||l||!i.includes(`
79
- `)?Pl(i,t):W0(e,t,n,r);if(!o&&!l&&s!==rn.PLAIN&&i.includes(`
80
- `))return W0(e,t,n,r);if(L1(i)){if(c==="")return t.forceBlockIndent=!0,W0(e,t,n,r);if(o&&c===u)return Pl(i,t)}const d=i.replace(/\n+/g,`$&
81
- ${c}`);if(a){const f=y=>y.default&&y.tag!=="tag:yaml.org,2002:str"&&y.test?.test(d),{compat:h,tags:m}=t.doc.schema;if(m.some(f)||h?.some(f))return Pl(i,t)}return o?d:R1(d,c,xz,O1(t,!1))}function C_e(e,t,n,r){const{implicitKey:s,inFlow:i}=t,a=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)});let{type:o}=e;o!==rn.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(a.value)&&(o=rn.QUOTE_DOUBLE);const c=l=>{switch(l){case rn.BLOCK_FOLDED:case rn.BLOCK_LITERAL:return s||i?Pl(a.value,t):W0(a,t,n,r);case rn.QUOTE_DOUBLE:return Ah(a.value,t);case rn.QUOTE_SINGLE:return wv(a.value,t);case rn.PLAIN:return A_e(a,t,n,r);default:return null}};let u=c(o);if(u===null){const{defaultKeyType:l,defaultStringType:d}=t.options,f=s&&l||d;if(u=c(f),u===null)throw new Error(`Unsupported default string type ${f}`)}return u}function P_e(e,t){const n=Object.assign({blockQuote:!0,commentString:T_e,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let r;switch(n.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:r,options:n}}function N_e(e,t){if(t.tag){const s=e.filter(i=>i.tag===t.tag);if(s.length>0)return s.find(i=>i.format===t.format)??s[0]}let n,r;if(jn(t)){r=t.value;let s=e.filter(i=>i.identify?.(r));if(s.length>1){const i=s.filter(a=>a.test);i.length>0&&(s=i)}n=s.find(i=>i.format===t.format)??s.find(i=>!i.format)}else r=t,n=e.find(s=>s.nodeClass&&r instanceof s.nodeClass);if(!n){const s=r?.constructor?.name??(r===null?"null":typeof r);throw new Error(`Tag not resolved for ${s} value`)}return n}function R_e(e,t,{anchors:n,doc:r}){if(!r.directives)return"";const s=[],i=(jn(e)||hs(e))&&e.anchor;i&&wz(i)&&(n.add(i),s.push(`&${i}`));const a=e.tag??(t.default?null:t.tag);return a&&s.push(r.directives.tagString(a)),s.join(" ")}function ky(e,t,n,r){if(fr(e))return e.toString(t,n,r);if($u(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let s;const i=Er(e)?e:t.doc.createNode(e,{onTagObj:c=>s=c});s??(s=N_e(t.doc.schema.tags,i));const a=R_e(i,s,t);a.length>0&&(t.indentAtStart=(t.indentAtStart??0)+a.length+1);const o=typeof s.stringify=="function"?s.stringify(i,t,n,r):jn(i)?C_e(i,t,n,r):i.toString(t,n,r);return a?jn(i)||o[0]==="{"||o[0]==="["?`${a} ${o}`:`${a}
82
- ${t.indent}${o}`:o}function O_e({key:e,value:t},n,r,s){const{allNullValues:i,doc:a,indent:o,indentStep:c,options:{commentString:u,indentSeq:l,simpleKeys:d}}=n;let f=Er(e)&&e.comment||null;if(d){if(f)throw new Error("With simple keys, key nodes cannot have comments");if(hs(e)||!Er(e)&&typeof e=="object"){const T="With simple keys, collection cannot be used as a key value";throw new Error(T)}}let h=!d&&(!e||f&&t==null&&!n.inFlow||hs(e)||(jn(e)?e.type===rn.BLOCK_FOLDED||e.type===rn.BLOCK_LITERAL:typeof e=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!h&&(d||!i),indent:o+c});let m=!1,y=!1,g=ky(e,n,()=>m=!0,()=>y=!0);if(!h&&!n.inFlow&&g.length>1024){if(d)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");h=!0}if(n.inFlow){if(i||t==null)return m&&r&&r(),g===""?"?":h?`? ${g}`:g}else if(i&&!d||t==null&&h)return g=`? ${g}`,f&&!m?g+=Cl(g,n.indent,u(f)):y&&s&&s(),g;m&&(f=null),h?(f&&(g+=Cl(g,n.indent,u(f))),g=`? ${g}
83
- ${o}:`):(g=`${g}:`,f&&(g+=Cl(g,n.indent,u(f))));let p,_,k;Er(t)?(p=!!t.spaceBefore,_=t.commentBefore,k=t.comment):(p=!1,_=null,k=null,t&&typeof t=="object"&&(t=a.createNode(t))),n.implicitKey=!1,!h&&!f&&jn(t)&&(n.indentAtStart=g.length+1),y=!1,!l&&c.length>=2&&!n.inFlow&&!h&&NA(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let v=!1;const w=ky(t,n,()=>v=!0,()=>y=!0);let S=" ";if(f||p||_){if(S=p?`
84
- `:"",_){const T=u(_);S+=`
85
- ${km(T,n.indent)}`}w===""&&!n.inFlow?S===`
86
- `&&k&&(S=`
87
-
88
- `):S+=`
89
- ${n.indent}`}else if(!h&&hs(t)){const T=w[0],I=w.indexOf(`
90
- `),$=I!==-1,R=n.inFlow??t.flow??t.items.length===0;if($||!R){let z=!1;if($&&(T==="&"||T==="!")){let V=w.indexOf(" ");T==="&"&&V!==-1&&V<I&&w[V+1]==="!"&&(V=w.indexOf(" ",V+1)),(V===-1||I<V)&&(z=!0)}z||(S=`
91
- ${n.indent}`)}}else(w===""||w[0]===`
92
- `)&&(S="");return g+=S+w,n.inFlow?v&&r&&r():k&&!v?g+=Cl(g,n.indent,u(k)):y&&s&&s(),g}function L_e(e,t){(e==="debug"||e==="warn")&&console.warn(t)}const Qp="<<",kE={identify:e=>e===Qp||typeof e=="symbol"&&e.description===Qp,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new rn(Symbol(Qp)),{addToJSMap:Tz}),stringify:()=>Qp},D_e=(e,t)=>(kE.identify(t)||jn(t)&&(!t.type||t.type===rn.PLAIN)&&kE.identify(t.value))&&e?.doc.schema.tags.some(n=>n.tag===kE.tag&&n.default);function Tz(e,t,n){if(n=e&&$u(n)?n.resolve(e.doc):n,NA(n))for(const r of n.items)EE(e,t,r);else if(Array.isArray(n))for(const r of n)EE(e,t,r);else EE(e,t,n)}function EE(e,t,n){const r=e&&$u(n)?n.resolve(e.doc):n;if(!kz(r))throw new Error("Merge sources must be maps or map aliases");const s=r.toJSON(null,e,Map);for(const[i,a]of s)t instanceof Map?t.has(i)||t.set(i,a):t instanceof Set?t.add(i):Object.prototype.hasOwnProperty.call(t,i)||Object.defineProperty(t,i,{value:a,writable:!0,enumerable:!0,configurable:!0});return t}function Iz(e,t,{key:n,value:r}){if(Er(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(D_e(e,n))Tz(e,t,r);else{const s=fi(n,"",e);if(t instanceof Map)t.set(s,fi(r,s,e));else if(t instanceof Set)t.add(s);else{const i=$_e(n,s,e),a=fi(r,i,e);i in t?Object.defineProperty(t,i,{value:a,writable:!0,enumerable:!0,configurable:!0}):t[i]=a}}return t}function $_e(e,t,n){if(t===null)return"";if(typeof t!="object")return String(t);if(Er(e)&&n?.doc){const r=P_e(n.doc,{});r.anchors=new Set;for(const i of n.anchors.keys())r.anchors.add(i.anchor);r.inFlow=!0,r.inStringifyKey=!0;const s=e.toString(r);if(!n.mapKeyWarned){let i=JSON.stringify(s);i.length>40&&(i=i.substring(0,36)+'..."'),L_e(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${i}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return s}return JSON.stringify(t)}function OA(e,t,n){const r=_y(e,void 0,n),s=_y(t,void 0,n);return new $a(r,s)}class $a{constructor(t,n=null){Object.defineProperty(this,sa,{value:_z}),this.key=t,this.value=n}clone(t){let{key:n,value:r}=this;return Er(n)&&(n=n.clone(t)),Er(r)&&(r=r.clone(t)),new $a(n,r)}toJSON(t,n){const r=n?.mapAsMap?new Map:{};return Iz(n,r,this)}toString(t,n,r){return t?.doc?O_e(this,t,n,r):JSON.stringify(this)}}function Az(e,t,n){return(t.inFlow??e.flow?j_e:M_e)(e,t,n)}function M_e({comment:e,items:t},n,{blockItemPrefix:r,flowChars:s,itemIndent:i,onChompKeep:a,onComment:o}){const{indent:c,options:{commentString:u}}=n,l=Object.assign({},n,{indent:i,type:null});let d=!1;const f=[];for(let m=0;m<t.length;++m){const y=t[m];let g=null;if(Er(y))!d&&y.spaceBefore&&f.push(""),Ey(n,f,y.commentBefore,d),y.comment&&(g=y.comment);else if(fr(y)){const _=Er(y.key)?y.key:null;_&&(!d&&_.spaceBefore&&f.push(""),Ey(n,f,_.commentBefore,d))}d=!1;let p=ky(y,l,()=>g=null,()=>d=!0);g&&(p+=Cl(p,i,u(g))),d&&g&&(d=!1),f.push(r+p)}let h;if(f.length===0)h=s.start+s.end;else{h=f[0];for(let m=1;m<f.length;++m){const y=f[m];h+=y?`
93
- ${c}${y}`:`
94
- `}}return e?(h+=`
95
- `+km(u(e),c),o&&o()):d&&a&&a(),h}function j_e({items:e},t,{flowChars:n,itemIndent:r}){const{indent:s,indentStep:i,flowCollectionPadding:a,options:{commentString:o}}=t;r+=i;const c=Object.assign({},t,{indent:r,inFlow:!0,type:null});let u=!1,l=0;const d=[];for(let m=0;m<e.length;++m){const y=e[m];let g=null;if(Er(y))y.spaceBefore&&d.push(""),Ey(t,d,y.commentBefore,!1),y.comment&&(g=y.comment);else if(fr(y)){const _=Er(y.key)?y.key:null;_&&(_.spaceBefore&&d.push(""),Ey(t,d,_.commentBefore,!1),_.comment&&(u=!0));const k=Er(y.value)?y.value:null;k?(k.comment&&(g=k.comment),k.commentBefore&&(u=!0)):y.value==null&&_?.comment&&(g=_.comment)}g&&(u=!0);let p=ky(y,c,()=>g=null);m<e.length-1&&(p+=","),g&&(p+=Cl(p,r,o(g))),!u&&(d.length>l||p.includes(`
96
- `))&&(u=!0),d.push(p),l=d.length}const{start:f,end:h}=n;if(d.length===0)return f+h;if(!u){const m=d.reduce((y,g)=>y+g.length+2,2);u=t.options.lineWidth>0&&m>t.options.lineWidth}if(u){let m=f;for(const y of d)m+=y?`
97
- ${i}${s}${y}`:`
98
- `;return`${m}
99
- ${s}${h}`}else return`${f}${a}${d.join(" ")}${a}${h}`}function Ey({indent:e,options:{commentString:t}},n,r,s){if(r&&s&&(r=r.replace(/^\n+/,"")),r){const i=km(t(r),e);n.push(i.trimStart())}}function jc(e,t){const n=jn(t)?t.value:t;for(const r of e)if(fr(r)&&(r.key===t||r.key===n||jn(r.key)&&r.key.value===n))return r}class yl extends vz{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(eu,t),this.items=[]}static from(t,n,r){const{keepUndefined:s,replacer:i}=r,a=new this(t),o=(c,u)=>{if(typeof i=="function")u=i.call(n,c,u);else if(Array.isArray(i)&&!i.includes(c))return;(u!==void 0||s)&&a.items.push(OA(c,u,r))};if(n instanceof Map)for(const[c,u]of n)o(c,u);else if(n&&typeof n=="object")for(const c of Object.keys(n))o(c,n[c]);return typeof t.sortMapEntries=="function"&&a.items.sort(t.sortMapEntries),a}add(t,n){let r;fr(t)?r=t:!t||typeof t!="object"||!("key"in t)?r=new $a(t,t?.value):r=new $a(t.key,t.value);const s=jc(this.items,r.key),i=this.schema?.sortMapEntries;if(s){if(!n)throw new Error(`Key ${r.key} already set`);jn(s.value)&&Sz(r.value)?s.value.value=r.value:s.value=r.value}else if(i){const a=this.items.findIndex(o=>i(r,o)<0);a===-1?this.items.push(r):this.items.splice(a,0,r)}else this.items.push(r)}delete(t){const n=jc(this.items,t);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(t,n){const s=jc(this.items,t)?.value;return(!n&&jn(s)?s.value:s)??void 0}has(t){return!!jc(this.items,t)}set(t,n){this.add(new $a(t,n),!0)}toJSON(t,n,r){const s=r?new r:n?.mapAsMap?new Map:{};n?.onCreate&&n.onCreate(s);for(const i of this.items)Iz(n,s,i);return s}toString(t,n,r){if(!t)return JSON.stringify(this);for(const s of this.items)if(!fr(s))throw new Error(`Map items must all be pairs; found ${JSON.stringify(s)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),Az(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:r,onComment:n})}}class Cz extends vz{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(Sp,t),this.items=[]}add(t){this.items.push(t)}delete(t){const n=Xp(t);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(t,n){const r=Xp(t);if(typeof r!="number")return;const s=this.items[r];return!n&&jn(s)?s.value:s}has(t){const n=Xp(t);return typeof n=="number"&&n<this.items.length}set(t,n){const r=Xp(t);if(typeof r!="number")throw new Error(`Expected a valid index, not ${t}.`);const s=this.items[r];jn(s)&&Sz(n)?s.value=n:this.items[r]=n}toJSON(t,n){const r=[];n?.onCreate&&n.onCreate(r);let s=0;for(const i of this.items)r.push(fi(i,String(s++),n));return r}toString(t,n,r){return t?Az(this,t,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(t.indent||"")+" ",onChompKeep:r,onComment:n}):JSON.stringify(this)}static from(t,n,r){const{replacer:s}=r,i=new this(t);if(n&&Symbol.iterator in Object(n)){let a=0;for(let o of n){if(typeof s=="function"){const c=n instanceof Set?o:String(a++);o=s.call(n,c,o)}i.items.push(_y(o,void 0,r))}}return i}}function Xp(e){let t=jn(e)?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}function F_e(e,t,n){const{replacer:r}=n,s=new Cz(e);s.tag="tag:yaml.org,2002:pairs";let i=0;if(t&&Symbol.iterator in Object(t))for(let a of t){typeof r=="function"&&(a=r.call(t,String(i++),a));let o,c;if(Array.isArray(a))if(a.length===2)o=a[0],c=a[1];else throw new TypeError(`Expected [key, value] tuple: ${a}`);else if(a&&a instanceof Object){const u=Object.keys(a);if(u.length===1)o=u[0],c=a[o];else throw new TypeError(`Expected tuple with one key, not ${u.length} keys`)}else o=a;s.items.push(OA(o,c,n))}return s}class LA extends Cz{constructor(){super(),this.add=yl.prototype.add.bind(this),this.delete=yl.prototype.delete.bind(this),this.get=yl.prototype.get.bind(this),this.has=yl.prototype.has.bind(this),this.set=yl.prototype.set.bind(this),this.tag=LA.tag}toJSON(t,n){if(!n)return super.toJSON(t);const r=new Map;n?.onCreate&&n.onCreate(r);for(const s of this.items){let i,a;if(fr(s)?(i=fi(s.key,"",n),a=fi(s.value,i,n)):i=fi(s,"",n),r.has(i))throw new Error("Ordered maps must not include duplicate keys");r.set(i,a)}return r}static from(t,n,r){const s=F_e(t,n,r),i=new this;return i.items=s.items,i}}LA.tag="tag:yaml.org,2002:omap";class DA extends yl{constructor(t){super(t),this.tag=DA.tag}add(t){let n;fr(t)?n=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?n=new $a(t.key,null):n=new $a(t,null),jc(this.items,n.key)||this.items.push(n)}get(t,n){const r=jc(this.items,t);return!n&&fr(r)?jn(r.key)?r.key.value:r.key:r}set(t,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);const r=jc(this.items,t);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new $a(t))}toJSON(t,n){return super.toJSON(t,n,Set)}toString(t,n,r){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),n,r);throw new Error("Set items must all have null values")}static from(t,n,r){const{replacer:s}=r,i=new this(t);if(n&&Symbol.iterator in Object(n))for(let a of n)typeof s=="function"&&(a=s.call(n,a,a)),i.items.push(OA(a,null,r));return i}}DA.tag="tag:yaml.org,2002:set";new Set("0123456789ABCDEFabcdef");new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()");new Set(",[]{}");new Set(` ,[]{}
100
- \r `);let B_e=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});B_e.decode();const wE=new TextEncoder;"encodeInto"in wE||(wE.encodeInto=function(e,t){const n=wE.encode(e);return t.set(n),{read:e.length,written:n.length}});new URL("/assets/openapi_extractor_bg-DZrbVm4x.wasm",import.meta.url);const z_e=["get","put","post","delete","patch","head","options","trace"],U_e=["path","query","header","cookie"],D1=Re(...z_e),Pz=Re(...U_e),V_e=ce({name:D,location:Pz,required:zt}),H_e=ce({required:zt,contentTypes:Qe(D)}),Nz=ce({method:D1,pathTemplate:D,parameters:Qe(V_e),requestBody:ee(H_e)}),Rz=ce({inputSchemaJson:Z(D),outputSchemaJson:Z(D),refHintKeys:Z(Qe(D))}),$A=ce({valueJson:D,mediaType:Z(D),label:Z(D)}),q_e=ce({name:D,location:Pz,required:zt,description:Z(D),examples:Z(Qe($A))}),G_e=ce({description:Z(D),examples:Z(Qe($A))}),K_e=ce({statusCode:D,description:Z(D),contentTypes:Qe(D),examples:Z(Qe($A))}),Oz=ce({summary:Z(D),deprecated:Z(zt),parameters:Qe(q_e),requestBody:Z(G_e),response:Z(K_e)}),W_e=ce({toolId:D,operationId:Z(D),tags:Qe(D),name:D,description:ee(D),method:D1,path:D,invocation:Nz,operationHash:D,typing:Z(Rz),documentation:Z(Oz)}),J_e=ce({version:Re(2),sourceHash:D,tools:Qe(W_e),refHintTable:Z(b1({key:D,value:D}))});class mBe extends ep("OpenApiExtractionError"){}const Y_e=KB(J_e);CB(Y_e);ce({toolId:D,rawToolId:D,operationId:Z(D),name:D,description:D,group:D,leaf:D,tags:Qe(D),versionSegment:Z(D),method:D1,path:D,invocation:Nz,operationHash:D,typing:Z(Rz),documentation:Z(Oz)});var Zp={exports:{}},SE={},fa={},mc={},vE={},xE={},TE={},LR;function wy(){return LR||(LR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends t{constructor(_){if(super(),!e.IDENTIFIER.test(_))throw new Error("CodeGen: name must be a valid identifier");this.str=_}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=n;class r extends t{constructor(_){super(),this._items=typeof _=="string"?[_]:_}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const _=this._items[0];return _===""||_==='""'}get str(){var _;return(_=this._str)!==null&&_!==void 0?_:this._str=this._items.reduce((k,v)=>`${k}${v}`,"")}get names(){var _;return(_=this._names)!==null&&_!==void 0?_:this._names=this._items.reduce((k,v)=>(v instanceof n&&(k[v.str]=(k[v.str]||0)+1),k),{})}}e._Code=r,e.nil=new r("");function s(p,..._){const k=[p[0]];let v=0;for(;v<_.length;)o(k,_[v]),k.push(p[++v]);return new r(k)}e._=s;const i=new r("+");function a(p,..._){const k=[h(p[0])];let v=0;for(;v<_.length;)k.push(i),o(k,_[v]),k.push(i,h(p[++v]));return c(k),new r(k)}e.str=a;function o(p,_){_ instanceof r?p.push(..._._items):_ instanceof n?p.push(_):p.push(d(_))}e.addCodeArg=o;function c(p){let _=1;for(;_<p.length-1;){if(p[_]===i){const k=u(p[_-1],p[_+1]);if(k!==void 0){p.splice(_-1,3,k);continue}p[_++]="+"}_++}}function u(p,_){if(_==='""')return p;if(p==='""')return _;if(typeof p=="string")return _ instanceof n||p[p.length-1]!=='"'?void 0:typeof _!="string"?`${p.slice(0,-1)}${_}"`:_[0]==='"'?p.slice(0,-1)+_.slice(1):void 0;if(typeof _=="string"&&_[0]==='"'&&!(p instanceof n))return`"${p}${_.slice(1)}`}function l(p,_){return _.emptyStr()?p:p.emptyStr()?_:a`${p}${_}`}e.strConcat=l;function d(p){return typeof p=="number"||typeof p=="boolean"||p===null?p:h(Array.isArray(p)?p.join(","):p)}function f(p){return new r(h(p))}e.stringify=f;function h(p){return JSON.stringify(p).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=h;function m(p){return typeof p=="string"&&e.IDENTIFIER.test(p)?new r(`.${p}`):s`[${p}]`}e.getProperty=m;function y(p){if(typeof p=="string"&&e.IDENTIFIER.test(p))return new r(`${p}`);throw new Error(`CodeGen: invalid export name: ${p}, use explicit $id name mapping`)}e.getEsmExportName=y;function g(p){return new r(p.toString())}e.regexpCode=g})(TE)),TE}var IE={},DR;function $R(){return DR||(DR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=wy();class n extends Error{constructor(u){super(`CodeGen: "code" for ${u} not defined`),this.value=u.value}}var r;(function(c){c[c.Started=0]="Started",c[c.Completed=1]="Completed"})(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class s{constructor({prefixes:u,parent:l}={}){this._names={},this._prefixes=u,this._parent=l}toName(u){return u instanceof t.Name?u:this.name(u)}name(u){return new t.Name(this._newName(u))}_newName(u){const l=this._names[u]||this._nameGroup(u);return`${u}${l.index++}`}_nameGroup(u){var l,d;if(!((d=(l=this._parent)===null||l===void 0?void 0:l._prefixes)===null||d===void 0)&&d.has(u)||this._prefixes&&!this._prefixes.has(u))throw new Error(`CodeGen: prefix "${u}" is not allowed in this scope`);return this._names[u]={prefix:u,index:0}}}e.Scope=s;class i extends t.Name{constructor(u,l){super(l),this.prefix=u}setValue(u,{property:l,itemIndex:d}){this.value=u,this.scopePath=(0,t._)`.${new t.Name(l)}[${d}]`}}e.ValueScopeName=i;const a=(0,t._)`\n`;class o extends s{constructor(u){super(u),this._values={},this._scope=u.scope,this.opts={...u,_n:u.lines?a:t.nil}}get(){return this._scope}name(u){return new i(u,this._newName(u))}value(u,l){var d;if(l.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const f=this.toName(u),{prefix:h}=f,m=(d=l.key)!==null&&d!==void 0?d:l.ref;let y=this._values[h];if(y){const _=y.get(m);if(_)return _}else y=this._values[h]=new Map;y.set(m,f);const g=this._scope[h]||(this._scope[h]=[]),p=g.length;return g[p]=l.ref,f.setValue(l,{property:h,itemIndex:p}),f}getValue(u,l){const d=this._values[u];if(d)return d.get(l)}scopeRefs(u,l=this._values){return this._reduceValues(l,d=>{if(d.scopePath===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return(0,t._)`${u}${d.scopePath}`})}scopeCode(u=this._values,l,d){return this._reduceValues(u,f=>{if(f.value===void 0)throw new Error(`CodeGen: name "${f}" has no value`);return f.value.code},l,d)}_reduceValues(u,l,d={},f){let h=t.nil;for(const m in u){const y=u[m];if(!y)continue;const g=d[m]=d[m]||new Map;y.forEach(p=>{if(g.has(p))return;g.set(p,r.Started);let _=l(p);if(_){const k=this.opts.es5?e.varKinds.var:e.varKinds.const;h=(0,t._)`${h}${k} ${p} = ${_};${this.opts._n}`}else if(_=f?.(p))h=(0,t._)`${h}${_}${this.opts._n}`;else throw new n(p);g.set(p,r.Completed)})}return h}}e.ValueScope=o})(IE)),IE}var MR;function et(){return MR||(MR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=wy(),n=$R();var r=wy();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}});var s=$R();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class i{optimizeNodes(){return this}optimizeNames(P,B){return this}}class a extends i{constructor(P,B,J){super(),this.varKind=P,this.name=B,this.rhs=J}render({es5:P,_n:B}){const J=P?n.varKinds.var:this.varKind,be=this.rhs===void 0?"":` = ${this.rhs}`;return`${J} ${this.name}${be};`+B}optimizeNames(P,B){if(P[this.name.str])return this.rhs&&(this.rhs=G(this.rhs,P,B)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class o extends i{constructor(P,B,J){super(),this.lhs=P,this.rhs=B,this.sideEffects=J}render({_n:P}){return`${this.lhs} = ${this.rhs};`+P}optimizeNames(P,B){if(!(this.lhs instanceof t.Name&&!P[this.lhs.str]&&!this.sideEffects))return this.rhs=G(this.rhs,P,B),this}get names(){const P=this.lhs instanceof t.Name?{}:{...this.lhs.names};return H(P,this.rhs)}}class c extends o{constructor(P,B,J,be){super(P,J,be),this.op=B}render({_n:P}){return`${this.lhs} ${this.op}= ${this.rhs};`+P}}class u extends i{constructor(P){super(),this.label=P,this.names={}}render({_n:P}){return`${this.label}:`+P}}class l extends i{constructor(P){super(),this.label=P,this.names={}}render({_n:P}){return`break${this.label?` ${this.label}`:""};`+P}}class d extends i{constructor(P){super(),this.error=P}render({_n:P}){return`throw ${this.error};`+P}get names(){return this.error.names}}class f extends i{constructor(P){super(),this.code=P}render({_n:P}){return`${this.code};`+P}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(P,B){return this.code=G(this.code,P,B),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class h extends i{constructor(P=[]){super(),this.nodes=P}render(P){return this.nodes.reduce((B,J)=>B+J.render(P),"")}optimizeNodes(){const{nodes:P}=this;let B=P.length;for(;B--;){const J=P[B].optimizeNodes();Array.isArray(J)?P.splice(B,1,...J):J?P[B]=J:P.splice(B,1)}return P.length>0?this:void 0}optimizeNames(P,B){const{nodes:J}=this;let be=J.length;for(;be--;){const ge=J[be];ge.optimizeNames(P,B)||(Q(P,ge.names),J.splice(be,1))}return J.length>0?this:void 0}get names(){return this.nodes.reduce((P,B)=>V(P,B.names),{})}}class m extends h{render(P){return"{"+P._n+super.render(P)+"}"+P._n}}class y extends h{}class g extends m{}g.kind="else";class p extends m{constructor(P,B){super(B),this.condition=P}render(P){let B=`if(${this.condition})`+super.render(P);return this.else&&(B+="else "+this.else.render(P)),B}optimizeNodes(){super.optimizeNodes();const P=this.condition;if(P===!0)return this.nodes;let B=this.else;if(B){const J=B.optimizeNodes();B=this.else=Array.isArray(J)?new g(J):J}if(B)return P===!1?B instanceof p?B:B.nodes:this.nodes.length?this:new p(re(P),B instanceof p?[B]:B.nodes);if(!(P===!1||!this.nodes.length))return this}optimizeNames(P,B){var J;if(this.else=(J=this.else)===null||J===void 0?void 0:J.optimizeNames(P,B),!!(super.optimizeNames(P,B)||this.else))return this.condition=G(this.condition,P,B),this}get names(){const P=super.names;return H(P,this.condition),this.else&&V(P,this.else.names),P}}p.kind="if";class _ extends m{}_.kind="for";class k extends _{constructor(P){super(),this.iteration=P}render(P){return`for(${this.iteration})`+super.render(P)}optimizeNames(P,B){if(super.optimizeNames(P,B))return this.iteration=G(this.iteration,P,B),this}get names(){return V(super.names,this.iteration.names)}}class v extends _{constructor(P,B,J,be){super(),this.varKind=P,this.name=B,this.from=J,this.to=be}render(P){const B=P.es5?n.varKinds.var:this.varKind,{name:J,from:be,to:ge}=this;return`for(${B} ${J}=${be}; ${J}<${ge}; ${J}++)`+super.render(P)}get names(){const P=H(super.names,this.from);return H(P,this.to)}}class w extends _{constructor(P,B,J,be){super(),this.loop=P,this.varKind=B,this.name=J,this.iterable=be}render(P){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(P)}optimizeNames(P,B){if(super.optimizeNames(P,B))return this.iterable=G(this.iterable,P,B),this}get names(){return V(super.names,this.iterable.names)}}class S extends m{constructor(P,B,J){super(),this.name=P,this.args=B,this.async=J}render(P){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(P)}}S.kind="func";class T extends h{render(P){return"return "+super.render(P)}}T.kind="return";class I extends m{render(P){let B="try"+super.render(P);return this.catch&&(B+=this.catch.render(P)),this.finally&&(B+=this.finally.render(P)),B}optimizeNodes(){var P,B;return super.optimizeNodes(),(P=this.catch)===null||P===void 0||P.optimizeNodes(),(B=this.finally)===null||B===void 0||B.optimizeNodes(),this}optimizeNames(P,B){var J,be;return super.optimizeNames(P,B),(J=this.catch)===null||J===void 0||J.optimizeNames(P,B),(be=this.finally)===null||be===void 0||be.optimizeNames(P,B),this}get names(){const P=super.names;return this.catch&&V(P,this.catch.names),this.finally&&V(P,this.finally.names),P}}class $ extends m{constructor(P){super(),this.error=P}render(P){return`catch(${this.error})`+super.render(P)}}$.kind="catch";class R extends m{render(P){return"finally"+super.render(P)}}R.kind="finally";class z{constructor(P,B={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...B,_n:B.lines?`
101
- `:""},this._extScope=P,this._scope=new n.Scope({parent:P}),this._nodes=[new y]}toString(){return this._root.render(this.opts)}name(P){return this._scope.name(P)}scopeName(P){return this._extScope.name(P)}scopeValue(P,B){const J=this._extScope.value(P,B);return(this._values[J.prefix]||(this._values[J.prefix]=new Set)).add(J),J}getScopeValue(P,B){return this._extScope.getValue(P,B)}scopeRefs(P){return this._extScope.scopeRefs(P,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(P,B,J,be){const ge=this._scope.toName(B);return J!==void 0&&be&&(this._constants[ge.str]=J),this._leafNode(new a(P,ge,J)),ge}const(P,B,J){return this._def(n.varKinds.const,P,B,J)}let(P,B,J){return this._def(n.varKinds.let,P,B,J)}var(P,B,J){return this._def(n.varKinds.var,P,B,J)}assign(P,B,J){return this._leafNode(new o(P,B,J))}add(P,B){return this._leafNode(new c(P,e.operators.ADD,B))}code(P){return typeof P=="function"?P():P!==t.nil&&this._leafNode(new f(P)),this}object(...P){const B=["{"];for(const[J,be]of P)B.length>1&&B.push(","),B.push(J),(J!==be||this.opts.es5)&&(B.push(":"),(0,t.addCodeArg)(B,be));return B.push("}"),new t._Code(B)}if(P,B,J){if(this._blockNode(new p(P)),B&&J)this.code(B).else().code(J).endIf();else if(B)this.code(B).endIf();else if(J)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(P){return this._elseNode(new p(P))}else(){return this._elseNode(new g)}endIf(){return this._endBlockNode(p,g)}_for(P,B){return this._blockNode(P),B&&this.code(B).endFor(),this}for(P,B){return this._for(new k(P),B)}forRange(P,B,J,be,ge=this.opts.es5?n.varKinds.var:n.varKinds.let){const Ee=this._scope.toName(P);return this._for(new v(ge,Ee,B,J),()=>be(Ee))}forOf(P,B,J,be=n.varKinds.const){const ge=this._scope.toName(P);if(this.opts.es5){const Ee=B instanceof t.Name?B:this.var("_arr",B);return this.forRange("_i",0,(0,t._)`${Ee}.length`,Oe=>{this.var(ge,(0,t._)`${Ee}[${Oe}]`),J(ge)})}return this._for(new w("of",be,ge,B),()=>J(ge))}forIn(P,B,J,be=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(P,(0,t._)`Object.keys(${B})`,J);const ge=this._scope.toName(P);return this._for(new w("in",be,ge,B),()=>J(ge))}endFor(){return this._endBlockNode(_)}label(P){return this._leafNode(new u(P))}break(P){return this._leafNode(new l(P))}return(P){const B=new T;if(this._blockNode(B),this.code(P),B.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(T)}try(P,B,J){if(!B&&!J)throw new Error('CodeGen: "try" without "catch" and "finally"');const be=new I;if(this._blockNode(be),this.code(P),B){const ge=this.name("e");this._currNode=be.catch=new $(ge),B(ge)}return J&&(this._currNode=be.finally=new R,this.code(J)),this._endBlockNode($,R)}throw(P){return this._leafNode(new d(P))}block(P,B){return this._blockStarts.push(this._nodes.length),P&&this.code(P).endBlock(B),this}endBlock(P){const B=this._blockStarts.pop();if(B===void 0)throw new Error("CodeGen: not in self-balancing block");const J=this._nodes.length-B;if(J<0||P!==void 0&&J!==P)throw new Error(`CodeGen: wrong number of nodes: ${J} vs ${P} expected`);return this._nodes.length=B,this}func(P,B=t.nil,J,be){return this._blockNode(new S(P,B,J)),be&&this.code(be).endFunc(),this}endFunc(){return this._endBlockNode(S)}optimize(P=1){for(;P-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(P){return this._currNode.nodes.push(P),this}_blockNode(P){this._currNode.nodes.push(P),this._nodes.push(P)}_endBlockNode(P,B){const J=this._currNode;if(J instanceof P||B&&J instanceof B)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${B?`${P.kind}/${B.kind}`:P.kind}"`)}_elseNode(P){const B=this._currNode;if(!(B instanceof p))throw new Error('CodeGen: "else" without "if"');return this._currNode=B.else=P,this}get _root(){return this._nodes[0]}get _currNode(){const P=this._nodes;return P[P.length-1]}set _currNode(P){const B=this._nodes;B[B.length-1]=P}}e.CodeGen=z;function V(A,P){for(const B in P)A[B]=(A[B]||0)+(P[B]||0);return A}function H(A,P){return P instanceof t._CodeOrName?V(A,P.names):A}function G(A,P,B){if(A instanceof t.Name)return J(A);if(!be(A))return A;return new t._Code(A._items.reduce((ge,Ee)=>(Ee instanceof t.Name&&(Ee=J(Ee)),Ee instanceof t._Code?ge.push(...Ee._items):ge.push(Ee),ge),[]));function J(ge){const Ee=B[ge.str];return Ee===void 0||P[ge.str]!==1?ge:(delete P[ge.str],Ee)}function be(ge){return ge instanceof t._Code&&ge._items.some(Ee=>Ee instanceof t.Name&&P[Ee.str]===1&&B[Ee.str]!==void 0)}}function Q(A,P){for(const B in P)A[B]=(A[B]||0)-(P[B]||0)}function re(A){return typeof A=="boolean"||typeof A=="number"||A===null?!A:(0,t._)`!${K(A)}`}e.not=re;const me=M(e.operators.AND);function ke(...A){return A.reduce(me)}e.and=ke;const tt=M(e.operators.OR);function C(...A){return A.reduce(tt)}e.or=C;function M(A){return(P,B)=>P===t.nil?B:B===t.nil?P:(0,t._)`${K(P)} ${A} ${K(B)}`}function K(A){return A instanceof t.Name?A:(0,t._)`(${A})`}})(xE)),xE}var rt={},jR;function pt(){if(jR)return rt;jR=1,Object.defineProperty(rt,"__esModule",{value:!0}),rt.checkStrictMode=rt.getErrorPath=rt.Type=rt.useFunc=rt.setEvaluated=rt.evaluatedPropsToName=rt.mergeEvaluated=rt.eachItem=rt.unescapeJsonPointer=rt.escapeJsonPointer=rt.escapeFragment=rt.unescapeFragment=rt.schemaRefOrVal=rt.schemaHasRulesButRef=rt.schemaHasRules=rt.checkUnknownRules=rt.alwaysValidSchema=rt.toHash=void 0;const e=et(),t=wy();function n(w){const S={};for(const T of w)S[T]=!0;return S}rt.toHash=n;function r(w,S){return typeof S=="boolean"?S:Object.keys(S).length===0?!0:(s(w,S),!i(S,w.self.RULES.all))}rt.alwaysValidSchema=r;function s(w,S=w.schema){const{opts:T,self:I}=w;if(!T.strictSchema||typeof S=="boolean")return;const $=I.RULES.keywords;for(const R in S)$[R]||v(w,`unknown keyword: "${R}"`)}rt.checkUnknownRules=s;function i(w,S){if(typeof w=="boolean")return!w;for(const T in w)if(S[T])return!0;return!1}rt.schemaHasRules=i;function a(w,S){if(typeof w=="boolean")return!w;for(const T in w)if(T!=="$ref"&&S.all[T])return!0;return!1}rt.schemaHasRulesButRef=a;function o({topSchemaRef:w,schemaPath:S},T,I,$){if(!$){if(typeof T=="number"||typeof T=="boolean")return T;if(typeof T=="string")return(0,e._)`${T}`}return(0,e._)`${w}${S}${(0,e.getProperty)(I)}`}rt.schemaRefOrVal=o;function c(w){return d(decodeURIComponent(w))}rt.unescapeFragment=c;function u(w){return encodeURIComponent(l(w))}rt.escapeFragment=u;function l(w){return typeof w=="number"?`${w}`:w.replace(/~/g,"~0").replace(/\//g,"~1")}rt.escapeJsonPointer=l;function d(w){return w.replace(/~1/g,"/").replace(/~0/g,"~")}rt.unescapeJsonPointer=d;function f(w,S){if(Array.isArray(w))for(const T of w)S(T);else S(w)}rt.eachItem=f;function h({mergeNames:w,mergeToName:S,mergeValues:T,resultToName:I}){return($,R,z,V)=>{const H=z===void 0?R:z instanceof e.Name?(R instanceof e.Name?w($,R,z):S($,R,z),z):R instanceof e.Name?(S($,z,R),R):T(R,z);return V===e.Name&&!(H instanceof e.Name)?I($,H):H}}rt.mergeEvaluated={props:h({mergeNames:(w,S,T)=>w.if((0,e._)`${T} !== true && ${S} !== undefined`,()=>{w.if((0,e._)`${S} === true`,()=>w.assign(T,!0),()=>w.assign(T,(0,e._)`${T} || {}`).code((0,e._)`Object.assign(${T}, ${S})`))}),mergeToName:(w,S,T)=>w.if((0,e._)`${T} !== true`,()=>{S===!0?w.assign(T,!0):(w.assign(T,(0,e._)`${T} || {}`),y(w,T,S))}),mergeValues:(w,S)=>w===!0?!0:{...w,...S},resultToName:m}),items:h({mergeNames:(w,S,T)=>w.if((0,e._)`${T} !== true && ${S} !== undefined`,()=>w.assign(T,(0,e._)`${S} === true ? true : ${T} > ${S} ? ${T} : ${S}`)),mergeToName:(w,S,T)=>w.if((0,e._)`${T} !== true`,()=>w.assign(T,S===!0?!0:(0,e._)`${T} > ${S} ? ${T} : ${S}`)),mergeValues:(w,S)=>w===!0?!0:Math.max(w,S),resultToName:(w,S)=>w.var("items",S)})};function m(w,S){if(S===!0)return w.var("props",!0);const T=w.var("props",(0,e._)`{}`);return S!==void 0&&y(w,T,S),T}rt.evaluatedPropsToName=m;function y(w,S,T){Object.keys(T).forEach(I=>w.assign((0,e._)`${S}${(0,e.getProperty)(I)}`,!0))}rt.setEvaluated=y;const g={};function p(w,S){return w.scopeValue("func",{ref:S,code:g[S.code]||(g[S.code]=new t._Code(S.code))})}rt.useFunc=p;var _;(function(w){w[w.Num=0]="Num",w[w.Str=1]="Str"})(_||(rt.Type=_={}));function k(w,S,T){if(w instanceof e.Name){const I=S===_.Num;return T?I?(0,e._)`"[" + ${w} + "]"`:(0,e._)`"['" + ${w} + "']"`:I?(0,e._)`"/" + ${w}`:(0,e._)`"/" + ${w}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return T?(0,e.getProperty)(w).toString():"/"+l(w)}rt.getErrorPath=k;function v(w,S,T=w.opts.strictSchema){if(T){if(S=`strict mode: ${S}`,T===!0)throw new Error(S);w.self.logger.warn(S)}}return rt.checkStrictMode=v,rt}var eg={},FR;function xi(){if(FR)return eg;FR=1,Object.defineProperty(eg,"__esModule",{value:!0});const e=et(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return eg.default=t,eg}var BR;function $1(){return BR||(BR=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=et(),n=pt(),r=xi();e.keywordError={message:({keyword:g})=>(0,t.str)`must pass "${g}" keyword validation`},e.keyword$DataError={message:({keyword:g,schemaType:p})=>p?(0,t.str)`"${g}" keyword must be ${p} ($data)`:(0,t.str)`"${g}" keyword is invalid ($data)`};function s(g,p=e.keywordError,_,k){const{it:v}=g,{gen:w,compositeRule:S,allErrors:T}=v,I=d(g,p,_);k??(S||T)?c(w,I):u(v,(0,t._)`[${I}]`)}e.reportError=s;function i(g,p=e.keywordError,_){const{it:k}=g,{gen:v,compositeRule:w,allErrors:S}=k,T=d(g,p,_);c(v,T),w||S||u(k,r.default.vErrors)}e.reportExtraError=i;function a(g,p){g.assign(r.default.errors,p),g.if((0,t._)`${r.default.vErrors} !== null`,()=>g.if(p,()=>g.assign((0,t._)`${r.default.vErrors}.length`,p),()=>g.assign(r.default.vErrors,null)))}e.resetErrorsCount=a;function o({gen:g,keyword:p,schemaValue:_,data:k,errsCount:v,it:w}){if(v===void 0)throw new Error("ajv implementation error");const S=g.name("err");g.forRange("i",v,r.default.errors,T=>{g.const(S,(0,t._)`${r.default.vErrors}[${T}]`),g.if((0,t._)`${S}.instancePath === undefined`,()=>g.assign((0,t._)`${S}.instancePath`,(0,t.strConcat)(r.default.instancePath,w.errorPath))),g.assign((0,t._)`${S}.schemaPath`,(0,t.str)`${w.errSchemaPath}/${p}`),w.opts.verbose&&(g.assign((0,t._)`${S}.schema`,_),g.assign((0,t._)`${S}.data`,k))})}e.extendErrors=o;function c(g,p){const _=g.const("err",p);g.if((0,t._)`${r.default.vErrors} === null`,()=>g.assign(r.default.vErrors,(0,t._)`[${_}]`),(0,t._)`${r.default.vErrors}.push(${_})`),g.code((0,t._)`${r.default.errors}++`)}function u(g,p){const{gen:_,validateName:k,schemaEnv:v}=g;v.$async?_.throw((0,t._)`new ${g.ValidationError}(${p})`):(_.assign((0,t._)`${k}.errors`,p),_.return(!1))}const l={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function d(g,p,_){const{createErrors:k}=g.it;return k===!1?(0,t._)`{}`:f(g,p,_)}function f(g,p,_={}){const{gen:k,it:v}=g,w=[h(v,_),m(g,_)];return y(g,p,w),k.object(...w)}function h({errorPath:g},{instancePath:p}){const _=p?(0,t.str)`${g}${(0,n.getErrorPath)(p,n.Type.Str)}`:g;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,_)]}function m({keyword:g,it:{errSchemaPath:p}},{schemaPath:_,parentSchema:k}){let v=k?p:(0,t.str)`${p}/${g}`;return _&&(v=(0,t.str)`${v}${(0,n.getErrorPath)(_,n.Type.Str)}`),[l.schemaPath,v]}function y(g,{params:p,message:_},k){const{keyword:v,data:w,schemaValue:S,it:T}=g,{opts:I,propertyName:$,topSchemaRef:R,schemaPath:z}=T;k.push([l.keyword,v],[l.params,typeof p=="function"?p(g):p||(0,t._)`{}`]),I.messages&&k.push([l.message,typeof _=="function"?_(g):_]),I.verbose&&k.push([l.schema,S],[l.parentSchema,(0,t._)`${R}${z}`],[r.default.data,w]),$&&k.push([l.propertyName,$])}})(vE)),vE}var zR;function Q_e(){if(zR)return mc;zR=1,Object.defineProperty(mc,"__esModule",{value:!0}),mc.boolOrEmptySchema=mc.topBoolOrEmptySchema=void 0;const e=$1(),t=et(),n=xi(),r={message:"boolean schema is false"};function s(o){const{gen:c,schema:u,validateName:l}=o;u===!1?a(o,!1):typeof u=="object"&&u.$async===!0?c.return(n.default.data):(c.assign((0,t._)`${l}.errors`,null),c.return(!0))}mc.topBoolOrEmptySchema=s;function i(o,c){const{gen:u,schema:l}=o;l===!1?(u.var(c,!1),a(o)):u.var(c,!0)}mc.boolOrEmptySchema=i;function a(o,c){const{gen:u,data:l}=o,d={gen:u,keyword:"false schema",data:l,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:o};(0,e.reportError)(d,r,void 0,c)}return mc}var tr={},pc={},UR;function Lz(){if(UR)return pc;UR=1,Object.defineProperty(pc,"__esModule",{value:!0}),pc.getRules=pc.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function n(s){return typeof s=="string"&&t.has(s)}pc.isJSONType=n;function r(){const s={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...s,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},s.number,s.string,s.array,s.object],post:{rules:[]},all:{},keywords:{}}}return pc.getRules=r,pc}var ha={},VR;function Dz(){if(VR)return ha;VR=1,Object.defineProperty(ha,"__esModule",{value:!0}),ha.shouldUseRule=ha.shouldUseGroup=ha.schemaHasRulesForType=void 0;function e({schema:r,self:s},i){const a=s.RULES.types[i];return a&&a!==!0&&t(r,a)}ha.schemaHasRulesForType=e;function t(r,s){return s.rules.some(i=>n(r,i))}ha.shouldUseGroup=t;function n(r,s){var i;return r[s.keyword]!==void 0||((i=s.definition.implements)===null||i===void 0?void 0:i.some(a=>r[a]!==void 0))}return ha.shouldUseRule=n,ha}var HR;function Sy(){if(HR)return tr;HR=1,Object.defineProperty(tr,"__esModule",{value:!0}),tr.reportTypeError=tr.checkDataTypes=tr.checkDataType=tr.coerceAndCheckDataType=tr.getJSONTypes=tr.getSchemaTypes=tr.DataType=void 0;const e=Lz(),t=Dz(),n=$1(),r=et(),s=pt();var i;(function(_){_[_.Correct=0]="Correct",_[_.Wrong=1]="Wrong"})(i||(tr.DataType=i={}));function a(_){const k=o(_.type);if(k.includes("null")){if(_.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!k.length&&_.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');_.nullable===!0&&k.push("null")}return k}tr.getSchemaTypes=a;function o(_){const k=Array.isArray(_)?_:_?[_]:[];if(k.every(e.isJSONType))return k;throw new Error("type must be JSONType or JSONType[]: "+k.join(","))}tr.getJSONTypes=o;function c(_,k){const{gen:v,data:w,opts:S}=_,T=l(k,S.coerceTypes),I=k.length>0&&!(T.length===0&&k.length===1&&(0,t.schemaHasRulesForType)(_,k[0]));if(I){const $=m(k,w,S.strictNumbers,i.Wrong);v.if($,()=>{T.length?d(_,k,T):g(_)})}return I}tr.coerceAndCheckDataType=c;const u=new Set(["string","number","integer","boolean","null"]);function l(_,k){return k?_.filter(v=>u.has(v)||k==="array"&&v==="array"):[]}function d(_,k,v){const{gen:w,data:S,opts:T}=_,I=w.let("dataType",(0,r._)`typeof ${S}`),$=w.let("coerced",(0,r._)`undefined`);T.coerceTypes==="array"&&w.if((0,r._)`${I} == 'object' && Array.isArray(${S}) && ${S}.length == 1`,()=>w.assign(S,(0,r._)`${S}[0]`).assign(I,(0,r._)`typeof ${S}`).if(m(k,S,T.strictNumbers),()=>w.assign($,S))),w.if((0,r._)`${$} !== undefined`);for(const z of v)(u.has(z)||z==="array"&&T.coerceTypes==="array")&&R(z);w.else(),g(_),w.endIf(),w.if((0,r._)`${$} !== undefined`,()=>{w.assign(S,$),f(_,$)});function R(z){switch(z){case"string":w.elseIf((0,r._)`${I} == "number" || ${I} == "boolean"`).assign($,(0,r._)`"" + ${S}`).elseIf((0,r._)`${S} === null`).assign($,(0,r._)`""`);return;case"number":w.elseIf((0,r._)`${I} == "boolean" || ${S} === null
102
- || (${I} == "string" && ${S} && ${S} == +${S})`).assign($,(0,r._)`+${S}`);return;case"integer":w.elseIf((0,r._)`${I} === "boolean" || ${S} === null
103
- || (${I} === "string" && ${S} && ${S} == +${S} && !(${S} % 1))`).assign($,(0,r._)`+${S}`);return;case"boolean":w.elseIf((0,r._)`${S} === "false" || ${S} === 0 || ${S} === null`).assign($,!1).elseIf((0,r._)`${S} === "true" || ${S} === 1`).assign($,!0);return;case"null":w.elseIf((0,r._)`${S} === "" || ${S} === 0 || ${S} === false`),w.assign($,null);return;case"array":w.elseIf((0,r._)`${I} === "string" || ${I} === "number"
104
- || ${I} === "boolean" || ${S} === null`).assign($,(0,r._)`[${S}]`)}}}function f({gen:_,parentData:k,parentDataProperty:v},w){_.if((0,r._)`${k} !== undefined`,()=>_.assign((0,r._)`${k}[${v}]`,w))}function h(_,k,v,w=i.Correct){const S=w===i.Correct?r.operators.EQ:r.operators.NEQ;let T;switch(_){case"null":return(0,r._)`${k} ${S} null`;case"array":T=(0,r._)`Array.isArray(${k})`;break;case"object":T=(0,r._)`${k} && typeof ${k} == "object" && !Array.isArray(${k})`;break;case"integer":T=I((0,r._)`!(${k} % 1) && !isNaN(${k})`);break;case"number":T=I();break;default:return(0,r._)`typeof ${k} ${S} ${_}`}return w===i.Correct?T:(0,r.not)(T);function I($=r.nil){return(0,r.and)((0,r._)`typeof ${k} == "number"`,$,v?(0,r._)`isFinite(${k})`:r.nil)}}tr.checkDataType=h;function m(_,k,v,w){if(_.length===1)return h(_[0],k,v,w);let S;const T=(0,s.toHash)(_);if(T.array&&T.object){const I=(0,r._)`typeof ${k} != "object"`;S=T.null?I:(0,r._)`!${k} || ${I}`,delete T.null,delete T.array,delete T.object}else S=r.nil;T.number&&delete T.integer;for(const I in T)S=(0,r.and)(S,h(I,k,v,w));return S}tr.checkDataTypes=m;const y={message:({schema:_})=>`must be ${_}`,params:({schema:_,schemaValue:k})=>typeof _=="string"?(0,r._)`{type: ${_}}`:(0,r._)`{type: ${k}}`};function g(_){const k=p(_);(0,n.reportError)(k,y)}tr.reportTypeError=g;function p(_){const{gen:k,data:v,schema:w}=_,S=(0,s.schemaRefOrVal)(_,w,"type");return{gen:k,keyword:"type",data:v,schema:w.type,schemaCode:S,schemaValue:S,parentSchema:w,params:{},it:_}}return tr}var vf={},qR;function X_e(){if(qR)return vf;qR=1,Object.defineProperty(vf,"__esModule",{value:!0}),vf.assignDefaults=void 0;const e=et(),t=pt();function n(s,i){const{properties:a,items:o}=s.schema;if(i==="object"&&a)for(const c in a)r(s,c,a[c].default);else i==="array"&&Array.isArray(o)&&o.forEach((c,u)=>r(s,u,c.default))}vf.assignDefaults=n;function r(s,i,a){const{gen:o,compositeRule:c,data:u,opts:l}=s;if(a===void 0)return;const d=(0,e._)`${u}${(0,e.getProperty)(i)}`;if(c){(0,t.checkStrictMode)(s,`default is ignored for: ${d}`);return}let f=(0,e._)`${d} === undefined`;l.useDefaults==="empty"&&(f=(0,e._)`${f} || ${d} === null || ${d} === ""`),o.if(f,(0,e._)`${d} = ${(0,e.stringify)(a)}`)}return vf}var Ws={},Pt={},GR;function Ti(){if(GR)return Pt;GR=1,Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.validateUnion=Pt.validateArray=Pt.usePattern=Pt.callValidateCode=Pt.schemaProperties=Pt.allSchemaProperties=Pt.noPropertyInData=Pt.propertyInData=Pt.isOwnProperty=Pt.hasPropFunc=Pt.reportMissingProp=Pt.checkMissingProp=Pt.checkReportMissingProp=void 0;const e=et(),t=pt(),n=xi(),r=pt();function s(_,k){const{gen:v,data:w,it:S}=_;v.if(l(v,w,k,S.opts.ownProperties),()=>{_.setParams({missingProperty:(0,e._)`${k}`},!0),_.error()})}Pt.checkReportMissingProp=s;function i({gen:_,data:k,it:{opts:v}},w,S){return(0,e.or)(...w.map(T=>(0,e.and)(l(_,k,T,v.ownProperties),(0,e._)`${S} = ${T}`)))}Pt.checkMissingProp=i;function a(_,k){_.setParams({missingProperty:k},!0),_.error()}Pt.reportMissingProp=a;function o(_){return _.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}Pt.hasPropFunc=o;function c(_,k,v){return(0,e._)`${o(_)}.call(${k}, ${v})`}Pt.isOwnProperty=c;function u(_,k,v,w){const S=(0,e._)`${k}${(0,e.getProperty)(v)} !== undefined`;return w?(0,e._)`${S} && ${c(_,k,v)}`:S}Pt.propertyInData=u;function l(_,k,v,w){const S=(0,e._)`${k}${(0,e.getProperty)(v)} === undefined`;return w?(0,e.or)(S,(0,e.not)(c(_,k,v))):S}Pt.noPropertyInData=l;function d(_){return _?Object.keys(_).filter(k=>k!=="__proto__"):[]}Pt.allSchemaProperties=d;function f(_,k){return d(k).filter(v=>!(0,t.alwaysValidSchema)(_,k[v]))}Pt.schemaProperties=f;function h({schemaCode:_,data:k,it:{gen:v,topSchemaRef:w,schemaPath:S,errorPath:T},it:I},$,R,z){const V=z?(0,e._)`${_}, ${k}, ${w}${S}`:k,H=[[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,T)],[n.default.parentData,I.parentData],[n.default.parentDataProperty,I.parentDataProperty],[n.default.rootData,n.default.rootData]];I.opts.dynamicRef&&H.push([n.default.dynamicAnchors,n.default.dynamicAnchors]);const G=(0,e._)`${V}, ${v.object(...H)}`;return R!==e.nil?(0,e._)`${$}.call(${R}, ${G})`:(0,e._)`${$}(${G})`}Pt.callValidateCode=h;const m=(0,e._)`new RegExp`;function y({gen:_,it:{opts:k}},v){const w=k.unicodeRegExp?"u":"",{regExp:S}=k.code,T=S(v,w);return _.scopeValue("pattern",{key:T.toString(),ref:T,code:(0,e._)`${S.code==="new RegExp"?m:(0,r.useFunc)(_,S)}(${v}, ${w})`})}Pt.usePattern=y;function g(_){const{gen:k,data:v,keyword:w,it:S}=_,T=k.name("valid");if(S.allErrors){const $=k.let("valid",!0);return I(()=>k.assign($,!1)),$}return k.var(T,!0),I(()=>k.break()),T;function I($){const R=k.const("len",(0,e._)`${v}.length`);k.forRange("i",0,R,z=>{_.subschema({keyword:w,dataProp:z,dataPropType:t.Type.Num},T),k.if((0,e.not)(T),$)})}}Pt.validateArray=g;function p(_){const{gen:k,schema:v,keyword:w,it:S}=_;if(!Array.isArray(v))throw new Error("ajv implementation error");if(v.some(R=>(0,t.alwaysValidSchema)(S,R))&&!S.opts.unevaluated)return;const I=k.let("valid",!1),$=k.name("_valid");k.block(()=>v.forEach((R,z)=>{const V=_.subschema({keyword:w,schemaProp:z,compositeRule:!0},$);k.assign(I,(0,e._)`${I} || ${$}`),_.mergeValidEvaluated(V,$)||k.if((0,e.not)(I))})),_.result(I,()=>_.reset(),()=>_.error(!0))}return Pt.validateUnion=p,Pt}var KR;function Z_e(){if(KR)return Ws;KR=1,Object.defineProperty(Ws,"__esModule",{value:!0}),Ws.validateKeywordUsage=Ws.validSchemaType=Ws.funcKeywordCode=Ws.macroKeywordCode=void 0;const e=et(),t=xi(),n=Ti(),r=$1();function s(f,h){const{gen:m,keyword:y,schema:g,parentSchema:p,it:_}=f,k=h.macro.call(_.self,g,p,_),v=u(m,y,k);_.opts.validateSchema!==!1&&_.self.validateSchema(k,!0);const w=m.name("valid");f.subschema({schema:k,schemaPath:e.nil,errSchemaPath:`${_.errSchemaPath}/${y}`,topSchemaRef:v,compositeRule:!0},w),f.pass(w,()=>f.error(!0))}Ws.macroKeywordCode=s;function i(f,h){var m;const{gen:y,keyword:g,schema:p,parentSchema:_,$data:k,it:v}=f;c(v,h);const w=!k&&h.compile?h.compile.call(v.self,p,_,v):h.validate,S=u(y,g,w),T=y.let("valid");f.block$data(T,I),f.ok((m=h.valid)!==null&&m!==void 0?m:T);function I(){if(h.errors===!1)z(),h.modifying&&a(f),V(()=>f.error());else{const H=h.async?$():R();h.modifying&&a(f),V(()=>o(f,H))}}function $(){const H=y.let("ruleErrs",null);return y.try(()=>z((0,e._)`await `),G=>y.assign(T,!1).if((0,e._)`${G} instanceof ${v.ValidationError}`,()=>y.assign(H,(0,e._)`${G}.errors`),()=>y.throw(G))),H}function R(){const H=(0,e._)`${S}.errors`;return y.assign(H,null),z(e.nil),H}function z(H=h.async?(0,e._)`await `:e.nil){const G=v.opts.passContext?t.default.this:t.default.self,Q=!("compile"in h&&!k||h.schema===!1);y.assign(T,(0,e._)`${H}${(0,n.callValidateCode)(f,S,G,Q)}`,h.modifying)}function V(H){var G;y.if((0,e.not)((G=h.valid)!==null&&G!==void 0?G:T),H)}}Ws.funcKeywordCode=i;function a(f){const{gen:h,data:m,it:y}=f;h.if(y.parentData,()=>h.assign(m,(0,e._)`${y.parentData}[${y.parentDataProperty}]`))}function o(f,h){const{gen:m}=f;m.if((0,e._)`Array.isArray(${h})`,()=>{m.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${h} : ${t.default.vErrors}.concat(${h})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,r.extendErrors)(f)},()=>f.error())}function c({schemaEnv:f},h){if(h.async&&!f.$async)throw new Error("async keyword in sync schema")}function u(f,h,m){if(m===void 0)throw new Error(`keyword "${h}" failed to compile`);return f.scopeValue("keyword",typeof m=="function"?{ref:m}:{ref:m,code:(0,e.stringify)(m)})}function l(f,h,m=!1){return!h.length||h.some(y=>y==="array"?Array.isArray(f):y==="object"?f&&typeof f=="object"&&!Array.isArray(f):typeof f==y||m&&typeof f>"u")}Ws.validSchemaType=l;function d({schema:f,opts:h,self:m,errSchemaPath:y},g,p){if(Array.isArray(g.keyword)?!g.keyword.includes(p):g.keyword!==p)throw new Error("ajv implementation error");const _=g.dependencies;if(_?.some(k=>!Object.prototype.hasOwnProperty.call(f,k)))throw new Error(`parent schema must have dependencies of ${p}: ${_.join(",")}`);if(g.validateSchema&&!g.validateSchema(f[p])){const v=`keyword "${p}" value is invalid at path "${y}": `+m.errorsText(g.validateSchema.errors);if(h.validateSchema==="log")m.logger.error(v);else throw new Error(v)}}return Ws.validateKeywordUsage=d,Ws}var ma={},WR;function e1e(){if(WR)return ma;WR=1,Object.defineProperty(ma,"__esModule",{value:!0}),ma.extendSubschemaMode=ma.extendSubschemaData=ma.getSubschema=void 0;const e=et(),t=pt();function n(i,{keyword:a,schemaProp:o,schema:c,schemaPath:u,errSchemaPath:l,topSchemaRef:d}){if(a!==void 0&&c!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(a!==void 0){const f=i.schema[a];return o===void 0?{schema:f,schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(a)}`,errSchemaPath:`${i.errSchemaPath}/${a}`}:{schema:f[o],schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(a)}${(0,e.getProperty)(o)}`,errSchemaPath:`${i.errSchemaPath}/${a}/${(0,t.escapeFragment)(o)}`}}if(c!==void 0){if(u===void 0||l===void 0||d===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:c,schemaPath:u,topSchemaRef:d,errSchemaPath:l}}throw new Error('either "keyword" or "schema" must be passed')}ma.getSubschema=n;function r(i,a,{dataProp:o,dataPropType:c,data:u,dataTypes:l,propertyName:d}){if(u!==void 0&&o!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:f}=a;if(o!==void 0){const{errorPath:m,dataPathArr:y,opts:g}=a,p=f.let("data",(0,e._)`${a.data}${(0,e.getProperty)(o)}`,!0);h(p),i.errorPath=(0,e.str)`${m}${(0,t.getErrorPath)(o,c,g.jsPropertySyntax)}`,i.parentDataProperty=(0,e._)`${o}`,i.dataPathArr=[...y,i.parentDataProperty]}if(u!==void 0){const m=u instanceof e.Name?u:f.let("data",u,!0);h(m),d!==void 0&&(i.propertyName=d)}l&&(i.dataTypes=l);function h(m){i.data=m,i.dataLevel=a.dataLevel+1,i.dataTypes=[],a.definedProperties=new Set,i.parentData=a.data,i.dataNames=[...a.dataNames,m]}}ma.extendSubschemaData=r;function s(i,{jtdDiscriminator:a,jtdMetadata:o,compositeRule:c,createErrors:u,allErrors:l}){c!==void 0&&(i.compositeRule=c),u!==void 0&&(i.createErrors=u),l!==void 0&&(i.allErrors=l),i.jtdDiscriminator=a,i.jtdMetadata=o}return ma.extendSubschemaMode=s,ma}var Ir={},AE,JR;function $z(){return JR||(JR=1,AE=function e(t,n){if(t===n)return!0;if(t&&n&&typeof t=="object"&&typeof n=="object"){if(t.constructor!==n.constructor)return!1;var r,s,i;if(Array.isArray(t)){if(r=t.length,r!=n.length)return!1;for(s=r;s--!==0;)if(!e(t[s],n[s]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if(i=Object.keys(t),r=i.length,r!==Object.keys(n).length)return!1;for(s=r;s--!==0;)if(!Object.prototype.hasOwnProperty.call(n,i[s]))return!1;for(s=r;s--!==0;){var a=i[s];if(!e(t[a],n[a]))return!1}return!0}return t!==t&&n!==n}),AE}var CE={exports:{}},YR;function t1e(){if(YR)return CE.exports;YR=1;var e=CE.exports=function(r,s,i){typeof s=="function"&&(i=s,s={}),i=s.cb||i;var a=typeof i=="function"?i:i.pre||function(){},o=i.post||function(){};t(s,a,o,r,"",r)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(r,s,i,a,o,c,u,l,d,f){if(a&&typeof a=="object"&&!Array.isArray(a)){s(a,o,c,u,l,d,f);for(var h in a){var m=a[h];if(Array.isArray(m)){if(h in e.arrayKeywords)for(var y=0;y<m.length;y++)t(r,s,i,m[y],o+"/"+h+"/"+y,c,o,h,a,y)}else if(h in e.propsKeywords){if(m&&typeof m=="object")for(var g in m)t(r,s,i,m[g],o+"/"+h+"/"+n(g),c,o,h,a,g)}else(h in e.keywords||r.allKeys&&!(h in e.skipKeywords))&&t(r,s,i,m,o+"/"+h,c,o,h,a)}i(a,o,c,u,l,d,f)}}function n(r){return r.replace(/~/g,"~0").replace(/\//g,"~1")}return CE.exports}var QR;function M1(){if(QR)return Ir;QR=1,Object.defineProperty(Ir,"__esModule",{value:!0}),Ir.getSchemaRefs=Ir.resolveUrl=Ir.normalizeId=Ir._getFullPath=Ir.getFullPath=Ir.inlineRef=void 0;const e=pt(),t=$z(),n=t1e(),r=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function s(y,g=!0){return typeof y=="boolean"?!0:g===!0?!a(y):g?o(y)<=g:!1}Ir.inlineRef=s;const i=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function a(y){for(const g in y){if(i.has(g))return!0;const p=y[g];if(Array.isArray(p)&&p.some(a)||typeof p=="object"&&a(p))return!0}return!1}function o(y){let g=0;for(const p in y){if(p==="$ref")return 1/0;if(g++,!r.has(p)&&(typeof y[p]=="object"&&(0,e.eachItem)(y[p],_=>g+=o(_)),g===1/0))return 1/0}return g}function c(y,g="",p){p!==!1&&(g=d(g));const _=y.parse(g);return u(y,_)}Ir.getFullPath=c;function u(y,g){return y.serialize(g).split("#")[0]+"#"}Ir._getFullPath=u;const l=/#\/?$/;function d(y){return y?y.replace(l,""):""}Ir.normalizeId=d;function f(y,g,p){return p=d(p),y.resolve(g,p)}Ir.resolveUrl=f;const h=/^[a-z_][-a-z0-9._]*$/i;function m(y,g){if(typeof y=="boolean")return{};const{schemaId:p,uriResolver:_}=this.opts,k=d(y[p]||g),v={"":k},w=c(_,k,!1),S={},T=new Set;return n(y,{allKeys:!0},(R,z,V,H)=>{if(H===void 0)return;const G=w+z;let Q=v[H];typeof R[p]=="string"&&(Q=re.call(this,R[p])),me.call(this,R.$anchor),me.call(this,R.$dynamicAnchor),v[z]=Q;function re(ke){const tt=this.opts.uriResolver.resolve;if(ke=d(Q?tt(Q,ke):ke),T.has(ke))throw $(ke);T.add(ke);let C=this.refs[ke];return typeof C=="string"&&(C=this.refs[C]),typeof C=="object"?I(R,C.schema,ke):ke!==d(G)&&(ke[0]==="#"?(I(R,S[ke],ke),S[ke]=R):this.refs[ke]=G),ke}function me(ke){if(typeof ke=="string"){if(!h.test(ke))throw new Error(`invalid anchor "${ke}"`);re.call(this,`#${ke}`)}}}),S;function I(R,z,V){if(z!==void 0&&!t(R,z))throw $(V)}function $(R){return new Error(`reference "${R}" resolves to more than one schema`)}}return Ir.getSchemaRefs=m,Ir}var XR;function j1(){if(XR)return fa;XR=1,Object.defineProperty(fa,"__esModule",{value:!0}),fa.getData=fa.KeywordCxt=fa.validateFunctionCode=void 0;const e=Q_e(),t=Sy(),n=Dz(),r=Sy(),s=X_e(),i=Z_e(),a=e1e(),o=et(),c=xi(),u=M1(),l=pt(),d=$1();function f(q){if(w(q)&&(T(q),v(q))){g(q);return}h(q,()=>(0,e.topBoolOrEmptySchema)(q))}fa.validateFunctionCode=f;function h({gen:q,validateName:W,schema:se,schemaEnv:le,opts:we},Fe){we.code.es5?q.func(W,(0,o._)`${c.default.data}, ${c.default.valCxt}`,le.$async,()=>{q.code((0,o._)`"use strict"; ${_(se,we)}`),y(q,we),q.code(Fe)}):q.func(W,(0,o._)`${c.default.data}, ${m(we)}`,le.$async,()=>q.code(_(se,we)).code(Fe))}function m(q){return(0,o._)`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${q.dynamicRef?(0,o._)`, ${c.default.dynamicAnchors}={}`:o.nil}}={}`}function y(q,W){q.if(c.default.valCxt,()=>{q.var(c.default.instancePath,(0,o._)`${c.default.valCxt}.${c.default.instancePath}`),q.var(c.default.parentData,(0,o._)`${c.default.valCxt}.${c.default.parentData}`),q.var(c.default.parentDataProperty,(0,o._)`${c.default.valCxt}.${c.default.parentDataProperty}`),q.var(c.default.rootData,(0,o._)`${c.default.valCxt}.${c.default.rootData}`),W.dynamicRef&&q.var(c.default.dynamicAnchors,(0,o._)`${c.default.valCxt}.${c.default.dynamicAnchors}`)},()=>{q.var(c.default.instancePath,(0,o._)`""`),q.var(c.default.parentData,(0,o._)`undefined`),q.var(c.default.parentDataProperty,(0,o._)`undefined`),q.var(c.default.rootData,c.default.data),W.dynamicRef&&q.var(c.default.dynamicAnchors,(0,o._)`{}`)})}function g(q){const{schema:W,opts:se,gen:le}=q;h(q,()=>{se.$comment&&W.$comment&&H(q),R(q),le.let(c.default.vErrors,null),le.let(c.default.errors,0),se.unevaluated&&p(q),I(q),G(q)})}function p(q){const{gen:W,validateName:se}=q;q.evaluated=W.const("evaluated",(0,o._)`${se}.evaluated`),W.if((0,o._)`${q.evaluated}.dynamicProps`,()=>W.assign((0,o._)`${q.evaluated}.props`,(0,o._)`undefined`)),W.if((0,o._)`${q.evaluated}.dynamicItems`,()=>W.assign((0,o._)`${q.evaluated}.items`,(0,o._)`undefined`))}function _(q,W){const se=typeof q=="object"&&q[W.schemaId];return se&&(W.code.source||W.code.process)?(0,o._)`/*# sourceURL=${se} */`:o.nil}function k(q,W){if(w(q)&&(T(q),v(q))){S(q,W);return}(0,e.boolOrEmptySchema)(q,W)}function v({schema:q,self:W}){if(typeof q=="boolean")return!q;for(const se in q)if(W.RULES.all[se])return!0;return!1}function w(q){return typeof q.schema!="boolean"}function S(q,W){const{schema:se,gen:le,opts:we}=q;we.$comment&&se.$comment&&H(q),z(q),V(q);const Fe=le.const("_errs",c.default.errors);I(q,Fe),le.var(W,(0,o._)`${Fe} === ${c.default.errors}`)}function T(q){(0,l.checkUnknownRules)(q),$(q)}function I(q,W){if(q.opts.jtd)return re(q,[],!1,W);const se=(0,t.getSchemaTypes)(q.schema),le=(0,t.coerceAndCheckDataType)(q,se);re(q,se,!le,W)}function $(q){const{schema:W,errSchemaPath:se,opts:le,self:we}=q;W.$ref&&le.ignoreKeywordsWithRef&&(0,l.schemaHasRulesButRef)(W,we.RULES)&&we.logger.warn(`$ref: keywords ignored in schema at path "${se}"`)}function R(q){const{schema:W,opts:se}=q;W.default!==void 0&&se.useDefaults&&se.strictSchema&&(0,l.checkStrictMode)(q,"default is ignored in the schema root")}function z(q){const W=q.schema[q.opts.schemaId];W&&(q.baseId=(0,u.resolveUrl)(q.opts.uriResolver,q.baseId,W))}function V(q){if(q.schema.$async&&!q.schemaEnv.$async)throw new Error("async schema in sync schema")}function H({gen:q,schemaEnv:W,schema:se,errSchemaPath:le,opts:we}){const Fe=se.$comment;if(we.$comment===!0)q.code((0,o._)`${c.default.self}.logger.log(${Fe})`);else if(typeof we.$comment=="function"){const Ie=(0,o.str)`${le}/$comment`,Me=q.scopeValue("root",{ref:W.root});q.code((0,o._)`${c.default.self}.opts.$comment(${Fe}, ${Ie}, ${Me}.schema)`)}}function G(q){const{gen:W,schemaEnv:se,validateName:le,ValidationError:we,opts:Fe}=q;se.$async?W.if((0,o._)`${c.default.errors} === 0`,()=>W.return(c.default.data),()=>W.throw((0,o._)`new ${we}(${c.default.vErrors})`)):(W.assign((0,o._)`${le}.errors`,c.default.vErrors),Fe.unevaluated&&Q(q),W.return((0,o._)`${c.default.errors} === 0`))}function Q({gen:q,evaluated:W,props:se,items:le}){se instanceof o.Name&&q.assign((0,o._)`${W}.props`,se),le instanceof o.Name&&q.assign((0,o._)`${W}.items`,le)}function re(q,W,se,le){const{gen:we,schema:Fe,data:Ie,allErrors:Me,opts:gt,self:it}=q,{RULES:Ct}=it;if(Fe.$ref&&(gt.ignoreKeywordsWithRef||!(0,l.schemaHasRulesButRef)(Fe,Ct))){we.block(()=>be(q,"$ref",Ct.all.$ref.definition));return}gt.jtd||ke(q,W),we.block(()=>{for(const pn of Ct.rules)zr(pn);zr(Ct.post)});function zr(pn){(0,n.shouldUseGroup)(Fe,pn)&&(pn.type?(we.if((0,r.checkDataType)(pn.type,Ie,gt.strictNumbers)),me(q,pn),W.length===1&&W[0]===pn.type&&se&&(we.else(),(0,r.reportTypeError)(q)),we.endIf()):me(q,pn),Me||we.if((0,o._)`${c.default.errors} === ${le||0}`))}}function me(q,W){const{gen:se,schema:le,opts:{useDefaults:we}}=q;we&&(0,s.assignDefaults)(q,W.type),se.block(()=>{for(const Fe of W.rules)(0,n.shouldUseRule)(le,Fe)&&be(q,Fe.keyword,Fe.definition,W.type)})}function ke(q,W){q.schemaEnv.meta||!q.opts.strictTypes||(tt(q,W),q.opts.allowUnionTypes||C(q,W),M(q,q.dataTypes))}function tt(q,W){if(W.length){if(!q.dataTypes.length){q.dataTypes=W;return}W.forEach(se=>{A(q.dataTypes,se)||B(q,`type "${se}" not allowed by context "${q.dataTypes.join(",")}"`)}),P(q,W)}}function C(q,W){W.length>1&&!(W.length===2&&W.includes("null"))&&B(q,"use allowUnionTypes to allow union type keyword")}function M(q,W){const se=q.self.RULES.all;for(const le in se){const we=se[le];if(typeof we=="object"&&(0,n.shouldUseRule)(q.schema,we)){const{type:Fe}=we.definition;Fe.length&&!Fe.some(Ie=>K(W,Ie))&&B(q,`missing type "${Fe.join(",")}" for keyword "${le}"`)}}}function K(q,W){return q.includes(W)||W==="number"&&q.includes("integer")}function A(q,W){return q.includes(W)||W==="integer"&&q.includes("number")}function P(q,W){const se=[];for(const le of q.dataTypes)A(W,le)?se.push(le):W.includes("integer")&&le==="number"&&se.push("integer");q.dataTypes=se}function B(q,W){const se=q.schemaEnv.baseId+q.errSchemaPath;W+=` at "${se}" (strictTypes)`,(0,l.checkStrictMode)(q,W,q.opts.strictTypes)}class J{constructor(W,se,le){if((0,i.validateKeywordUsage)(W,se,le),this.gen=W.gen,this.allErrors=W.allErrors,this.keyword=le,this.data=W.data,this.schema=W.schema[le],this.$data=se.$data&&W.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,l.schemaRefOrVal)(W,this.schema,le,this.$data),this.schemaType=se.schemaType,this.parentSchema=W.schema,this.params={},this.it=W,this.def=se,this.$data)this.schemaCode=W.gen.const("vSchema",Oe(this.$data,W));else if(this.schemaCode=this.schemaValue,!(0,i.validSchemaType)(this.schema,se.schemaType,se.allowUndefined))throw new Error(`${le} value must be ${JSON.stringify(se.schemaType)}`);("code"in se?se.trackErrors:se.errors!==!1)&&(this.errsCount=W.gen.const("_errs",c.default.errors))}result(W,se,le){this.failResult((0,o.not)(W),se,le)}failResult(W,se,le){this.gen.if(W),le?le():this.error(),se?(this.gen.else(),se(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(W,se){this.failResult((0,o.not)(W),void 0,se)}fail(W){if(W===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(W),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(W){if(!this.$data)return this.fail(W);const{schemaCode:se}=this;this.fail((0,o._)`${se} !== undefined && (${(0,o.or)(this.invalid$data(),W)})`)}error(W,se,le){if(se){this.setParams(se),this._error(W,le),this.setParams({});return}this._error(W,le)}_error(W,se){(W?d.reportExtraError:d.reportError)(this,this.def.error,se)}$dataError(){(0,d.reportError)(this,this.def.$dataError||d.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,d.resetErrorsCount)(this.gen,this.errsCount)}ok(W){this.allErrors||this.gen.if(W)}setParams(W,se){se?Object.assign(this.params,W):this.params=W}block$data(W,se,le=o.nil){this.gen.block(()=>{this.check$data(W,le),se()})}check$data(W=o.nil,se=o.nil){if(!this.$data)return;const{gen:le,schemaCode:we,schemaType:Fe,def:Ie}=this;le.if((0,o.or)((0,o._)`${we} === undefined`,se)),W!==o.nil&&le.assign(W,!0),(Fe.length||Ie.validateSchema)&&(le.elseIf(this.invalid$data()),this.$dataError(),W!==o.nil&&le.assign(W,!1)),le.else()}invalid$data(){const{gen:W,schemaCode:se,schemaType:le,def:we,it:Fe}=this;return(0,o.or)(Ie(),Me());function Ie(){if(le.length){if(!(se instanceof o.Name))throw new Error("ajv implementation error");const gt=Array.isArray(le)?le:[le];return(0,o._)`${(0,r.checkDataTypes)(gt,se,Fe.opts.strictNumbers,r.DataType.Wrong)}`}return o.nil}function Me(){if(we.validateSchema){const gt=W.scopeValue("validate$data",{ref:we.validateSchema});return(0,o._)`!${gt}(${se})`}return o.nil}}subschema(W,se){const le=(0,a.getSubschema)(this.it,W);(0,a.extendSubschemaData)(le,this.it,W),(0,a.extendSubschemaMode)(le,W);const we={...this.it,...le,items:void 0,props:void 0};return k(we,se),we}mergeEvaluated(W,se){const{it:le,gen:we}=this;le.opts.unevaluated&&(le.props!==!0&&W.props!==void 0&&(le.props=l.mergeEvaluated.props(we,W.props,le.props,se)),le.items!==!0&&W.items!==void 0&&(le.items=l.mergeEvaluated.items(we,W.items,le.items,se)))}mergeValidEvaluated(W,se){const{it:le,gen:we}=this;if(le.opts.unevaluated&&(le.props!==!0||le.items!==!0))return we.if(se,()=>this.mergeEvaluated(W,o.Name)),!0}}fa.KeywordCxt=J;function be(q,W,se,le){const we=new J(q,se,W);"code"in se?se.code(we,le):we.$data&&se.validate?(0,i.funcKeywordCode)(we,se):"macro"in se?(0,i.macroKeywordCode)(we,se):(se.compile||se.validate)&&(0,i.funcKeywordCode)(we,se)}const ge=/^\/(?:[^~]|~0|~1)*$/,Ee=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Oe(q,{dataLevel:W,dataNames:se,dataPathArr:le}){let we,Fe;if(q==="")return c.default.rootData;if(q[0]==="/"){if(!ge.test(q))throw new Error(`Invalid JSON-pointer: ${q}`);we=q,Fe=c.default.rootData}else{const it=Ee.exec(q);if(!it)throw new Error(`Invalid JSON-pointer: ${q}`);const Ct=+it[1];if(we=it[2],we==="#"){if(Ct>=W)throw new Error(gt("property/index",Ct));return le[W-Ct]}if(Ct>W)throw new Error(gt("data",Ct));if(Fe=se[W-Ct],!we)return Fe}let Ie=Fe;const Me=we.split("/");for(const it of Me)it&&(Fe=(0,o._)`${Fe}${(0,o.getProperty)((0,l.unescapeJsonPointer)(it))}`,Ie=(0,o._)`${Ie} && ${Fe}`);return Ie;function gt(it,Ct){return`Cannot access ${it} ${Ct} levels up, current level is ${W}`}}return fa.getData=Oe,fa}var tg={},ZR;function MA(){if(ZR)return tg;ZR=1,Object.defineProperty(tg,"__esModule",{value:!0});class e extends Error{constructor(n){super("validation failed"),this.errors=n,this.ajv=this.validation=!0}}return tg.default=e,tg}var ng={},eO;function F1(){if(eO)return ng;eO=1,Object.defineProperty(ng,"__esModule",{value:!0});const e=M1();class t extends Error{constructor(r,s,i,a){super(a||`can't resolve reference ${i} from id ${s}`),this.missingRef=(0,e.resolveUrl)(r,s,i),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(r,this.missingRef))}}return ng.default=t,ng}var os={},tO;function B1(){if(tO)return os;tO=1,Object.defineProperty(os,"__esModule",{value:!0}),os.resolveSchema=os.getCompilingSchema=os.resolveRef=os.compileSchema=os.SchemaEnv=void 0;const e=et(),t=MA(),n=xi(),r=M1(),s=pt(),i=j1();class a{constructor(p){var _;this.refs={},this.dynamicAnchors={};let k;typeof p.schema=="object"&&(k=p.schema),this.schema=p.schema,this.schemaId=p.schemaId,this.root=p.root||this,this.baseId=(_=p.baseId)!==null&&_!==void 0?_:(0,r.normalizeId)(k?.[p.schemaId||"$id"]),this.schemaPath=p.schemaPath,this.localRefs=p.localRefs,this.meta=p.meta,this.$async=k?.$async,this.refs={}}}os.SchemaEnv=a;function o(g){const p=l.call(this,g);if(p)return p;const _=(0,r.getFullPath)(this.opts.uriResolver,g.root.baseId),{es5:k,lines:v}=this.opts.code,{ownProperties:w}=this.opts,S=new e.CodeGen(this.scope,{es5:k,lines:v,ownProperties:w});let T;g.$async&&(T=S.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const I=S.scopeName("validate");g.validateName=I;const $={gen:S,allErrors:this.opts.allErrors,data:n.default.data,parentData:n.default.parentData,parentDataProperty:n.default.parentDataProperty,dataNames:[n.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:S.scopeValue("schema",this.opts.code.source===!0?{ref:g.schema,code:(0,e.stringify)(g.schema)}:{ref:g.schema}),validateName:I,ValidationError:T,schema:g.schema,schemaEnv:g,rootId:_,baseId:g.baseId||_,schemaPath:e.nil,errSchemaPath:g.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let R;try{this._compilations.add(g),(0,i.validateFunctionCode)($),S.optimize(this.opts.code.optimize);const z=S.toString();R=`${S.scopeRefs(n.default.scope)}return ${z}`,this.opts.code.process&&(R=this.opts.code.process(R,g));const H=new Function(`${n.default.self}`,`${n.default.scope}`,R)(this,this.scope.get());if(this.scope.value(I,{ref:H}),H.errors=null,H.schema=g.schema,H.schemaEnv=g,g.$async&&(H.$async=!0),this.opts.code.source===!0&&(H.source={validateName:I,validateCode:z,scopeValues:S._values}),this.opts.unevaluated){const{props:G,items:Q}=$;H.evaluated={props:G instanceof e.Name?void 0:G,items:Q instanceof e.Name?void 0:Q,dynamicProps:G instanceof e.Name,dynamicItems:Q instanceof e.Name},H.source&&(H.source.evaluated=(0,e.stringify)(H.evaluated))}return g.validate=H,g}catch(z){throw delete g.validate,delete g.validateName,R&&this.logger.error("Error compiling schema, function code:",R),z}finally{this._compilations.delete(g)}}os.compileSchema=o;function c(g,p,_){var k;_=(0,r.resolveUrl)(this.opts.uriResolver,p,_);const v=g.refs[_];if(v)return v;let w=f.call(this,g,_);if(w===void 0){const S=(k=g.localRefs)===null||k===void 0?void 0:k[_],{schemaId:T}=this.opts;S&&(w=new a({schema:S,schemaId:T,root:g,baseId:p}))}if(w!==void 0)return g.refs[_]=u.call(this,w)}os.resolveRef=c;function u(g){return(0,r.inlineRef)(g.schema,this.opts.inlineRefs)?g.schema:g.validate?g:o.call(this,g)}function l(g){for(const p of this._compilations)if(d(p,g))return p}os.getCompilingSchema=l;function d(g,p){return g.schema===p.schema&&g.root===p.root&&g.baseId===p.baseId}function f(g,p){let _;for(;typeof(_=this.refs[p])=="string";)p=_;return _||this.schemas[p]||h.call(this,g,p)}function h(g,p){const _=this.opts.uriResolver.parse(p),k=(0,r._getFullPath)(this.opts.uriResolver,_);let v=(0,r.getFullPath)(this.opts.uriResolver,g.baseId,void 0);if(Object.keys(g.schema).length>0&&k===v)return y.call(this,_,g);const w=(0,r.normalizeId)(k),S=this.refs[w]||this.schemas[w];if(typeof S=="string"){const T=h.call(this,g,S);return typeof T?.schema!="object"?void 0:y.call(this,_,T)}if(typeof S?.schema=="object"){if(S.validate||o.call(this,S),w===(0,r.normalizeId)(p)){const{schema:T}=S,{schemaId:I}=this.opts,$=T[I];return $&&(v=(0,r.resolveUrl)(this.opts.uriResolver,v,$)),new a({schema:T,schemaId:I,root:g,baseId:v})}return y.call(this,_,S)}}os.resolveSchema=h;const m=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function y(g,{baseId:p,schema:_,root:k}){var v;if(((v=g.fragment)===null||v===void 0?void 0:v[0])!=="/")return;for(const T of g.fragment.slice(1).split("/")){if(typeof _=="boolean")return;const I=_[(0,s.unescapeFragment)(T)];if(I===void 0)return;_=I;const $=typeof _=="object"&&_[this.opts.schemaId];!m.has(T)&&$&&(p=(0,r.resolveUrl)(this.opts.uriResolver,p,$))}let w;if(typeof _!="boolean"&&_.$ref&&!(0,s.schemaHasRulesButRef)(_,this.RULES)){const T=(0,r.resolveUrl)(this.opts.uriResolver,p,_.$ref);w=h.call(this,k,T)}const{schemaId:S}=this.opts;if(w=w||new a({schema:_,schemaId:S,root:k,baseId:p}),w.schema!==w.root.schema)return w}return os}const n1e="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",r1e="Meta-schema for $data reference (JSON AnySchema extension proposal)",s1e="object",i1e=["$data"],a1e={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},o1e=!1,c1e={$id:n1e,description:r1e,type:s1e,required:i1e,properties:a1e,additionalProperties:o1e};var rg={},xf={exports:{}},PE,nO;function Mz(){if(nO)return PE;nO=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function n(f){let h="",m=0,y=0;for(y=0;y<f.length;y++)if(m=f[y].charCodeAt(0),m!==48){if(!(m>=48&&m<=57||m>=65&&m<=70||m>=97&&m<=102))return"";h+=f[y];break}for(y+=1;y<f.length;y++){if(m=f[y].charCodeAt(0),!(m>=48&&m<=57||m>=65&&m<=70||m>=97&&m<=102))return"";h+=f[y]}return h}const r=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function s(f){return f.length=0,!0}function i(f,h,m){if(f.length){const y=n(f);if(y!=="")h.push(y);else return m.error=!0,!1;f.length=0}return!0}function a(f){let h=0;const m={error:!1,address:"",zone:""},y=[],g=[];let p=!1,_=!1,k=i;for(let v=0;v<f.length;v++){const w=f[v];if(!(w==="["||w==="]"))if(w===":"){if(p===!0&&(_=!0),!k(g,y,m))break;if(++h>7){m.error=!0;break}v>0&&f[v-1]===":"&&(p=!0),y.push(":");continue}else if(w==="%"){if(!k(g,y,m))break;k=s}else{g.push(w);continue}}return g.length&&(k===s?m.zone=g.join(""):_?y.push(g.join("")):y.push(n(g))),m.address=y.join(""),m}function o(f){if(c(f,":")<2)return{host:f,isIPV6:!1};const h=a(f);if(h.error)return{host:f,isIPV6:!1};{let m=h.address,y=h.address;return h.zone&&(m+="%"+h.zone,y+="%25"+h.zone),{host:m,isIPV6:!0,escapedHost:y}}}function c(f,h){let m=0;for(let y=0;y<f.length;y++)f[y]===h&&m++;return m}function u(f){let h=f;const m=[];let y=-1,g=0;for(;g=h.length;){if(g===1){if(h===".")break;if(h==="/"){m.push("/");break}else{m.push(h);break}}else if(g===2){if(h[0]==="."){if(h[1]===".")break;if(h[1]==="/"){h=h.slice(2);continue}}else if(h[0]==="/"&&(h[1]==="."||h[1]==="/")){m.push("/");break}}else if(g===3&&h==="/.."){m.length!==0&&m.pop(),m.push("/");break}if(h[0]==="."){if(h[1]==="."){if(h[2]==="/"){h=h.slice(3);continue}}else if(h[1]==="/"){h=h.slice(2);continue}}else if(h[0]==="/"&&h[1]==="."){if(h[2]==="/"){h=h.slice(2);continue}else if(h[2]==="."&&h[3]==="/"){h=h.slice(3),m.length!==0&&m.pop();continue}}if((y=h.indexOf("/",1))===-1){m.push(h);break}else m.push(h.slice(0,y)),h=h.slice(y)}return m.join("")}function l(f,h){const m=h!==!0?escape:unescape;return f.scheme!==void 0&&(f.scheme=m(f.scheme)),f.userinfo!==void 0&&(f.userinfo=m(f.userinfo)),f.host!==void 0&&(f.host=m(f.host)),f.path!==void 0&&(f.path=m(f.path)),f.query!==void 0&&(f.query=m(f.query)),f.fragment!==void 0&&(f.fragment=m(f.fragment)),f}function d(f){const h=[];if(f.userinfo!==void 0&&(h.push(f.userinfo),h.push("@")),f.host!==void 0){let m=unescape(f.host);if(!t(m)){const y=o(m);y.isIPV6===!0?m=`[${y.escapedHost}]`:m=f.host}h.push(m)}return(typeof f.port=="number"||typeof f.port=="string")&&(h.push(":"),h.push(String(f.port))),h.length?h.join(""):void 0}return PE={nonSimpleDomain:r,recomposeAuthority:d,normalizeComponentEncoding:l,removeDotSegments:u,isIPv4:t,isUUID:e,normalizeIPv6:o,stringArrayToHexStripped:n},PE}var NE,rO;function u1e(){if(rO)return NE;rO=1;const{isUUID:e}=Mz(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,n=["http","https","ws","wss","urn","urn:uuid"];function r(w){return n.indexOf(w)!==-1}function s(w){return w.secure===!0?!0:w.secure===!1?!1:w.scheme?w.scheme.length===3&&(w.scheme[0]==="w"||w.scheme[0]==="W")&&(w.scheme[1]==="s"||w.scheme[1]==="S")&&(w.scheme[2]==="s"||w.scheme[2]==="S"):!1}function i(w){return w.host||(w.error=w.error||"HTTP URIs must have a host."),w}function a(w){const S=String(w.scheme).toLowerCase()==="https";return(w.port===(S?443:80)||w.port==="")&&(w.port=void 0),w.path||(w.path="/"),w}function o(w){return w.secure=s(w),w.resourceName=(w.path||"/")+(w.query?"?"+w.query:""),w.path=void 0,w.query=void 0,w}function c(w){if((w.port===(s(w)?443:80)||w.port==="")&&(w.port=void 0),typeof w.secure=="boolean"&&(w.scheme=w.secure?"wss":"ws",w.secure=void 0),w.resourceName){const[S,T]=w.resourceName.split("?");w.path=S&&S!=="/"?S:void 0,w.query=T,w.resourceName=void 0}return w.fragment=void 0,w}function u(w,S){if(!w.path)return w.error="URN can not be parsed",w;const T=w.path.match(t);if(T){const I=S.scheme||w.scheme||"urn";w.nid=T[1].toLowerCase(),w.nss=T[2];const $=`${I}:${S.nid||w.nid}`,R=v($);w.path=void 0,R&&(w=R.parse(w,S))}else w.error=w.error||"URN can not be parsed.";return w}function l(w,S){if(w.nid===void 0)throw new Error("URN without nid cannot be serialized");const T=S.scheme||w.scheme||"urn",I=w.nid.toLowerCase(),$=`${T}:${S.nid||I}`,R=v($);R&&(w=R.serialize(w,S));const z=w,V=w.nss;return z.path=`${I||S.nid}:${V}`,S.skipEscape=!0,z}function d(w,S){const T=w;return T.uuid=T.nss,T.nss=void 0,!S.tolerant&&(!T.uuid||!e(T.uuid))&&(T.error=T.error||"UUID is not valid."),T}function f(w){const S=w;return S.nss=(w.uuid||"").toLowerCase(),S}const h={scheme:"http",domainHost:!0,parse:i,serialize:a},m={scheme:"https",domainHost:h.domainHost,parse:i,serialize:a},y={scheme:"ws",domainHost:!0,parse:o,serialize:c},g={scheme:"wss",domainHost:y.domainHost,parse:y.parse,serialize:y.serialize},k={http:h,https:m,ws:y,wss:g,urn:{scheme:"urn",parse:u,serialize:l,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:d,serialize:f,skipNormalize:!0}};Object.setPrototypeOf(k,null);function v(w){return w&&(k[w]||k[w.toLowerCase()])||void 0}return NE={wsIsSecure:s,SCHEMES:k,isValidSchemeName:r,getSchemeHandler:v},NE}var sO;function l1e(){if(sO)return xf.exports;sO=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:n,normalizeComponentEncoding:r,isIPv4:s,nonSimpleDomain:i}=Mz(),{SCHEMES:a,getSchemeHandler:o}=u1e();function c(g,p){return typeof g=="string"?g=f(m(g,p),p):typeof g=="object"&&(g=m(f(g,p),p)),g}function u(g,p,_){const k=_?Object.assign({scheme:"null"},_):{scheme:"null"},v=l(m(g,k),m(p,k),k,!0);return k.skipEscape=!0,f(v,k)}function l(g,p,_,k){const v={};return k||(g=m(f(g,_),_),p=m(f(p,_),_)),_=_||{},!_.tolerant&&p.scheme?(v.scheme=p.scheme,v.userinfo=p.userinfo,v.host=p.host,v.port=p.port,v.path=t(p.path||""),v.query=p.query):(p.userinfo!==void 0||p.host!==void 0||p.port!==void 0?(v.userinfo=p.userinfo,v.host=p.host,v.port=p.port,v.path=t(p.path||""),v.query=p.query):(p.path?(p.path[0]==="/"?v.path=t(p.path):((g.userinfo!==void 0||g.host!==void 0||g.port!==void 0)&&!g.path?v.path="/"+p.path:g.path?v.path=g.path.slice(0,g.path.lastIndexOf("/")+1)+p.path:v.path=p.path,v.path=t(v.path)),v.query=p.query):(v.path=g.path,p.query!==void 0?v.query=p.query:v.query=g.query),v.userinfo=g.userinfo,v.host=g.host,v.port=g.port),v.scheme=g.scheme),v.fragment=p.fragment,v}function d(g,p,_){return typeof g=="string"?(g=unescape(g),g=f(r(m(g,_),!0),{..._,skipEscape:!0})):typeof g=="object"&&(g=f(r(g,!0),{..._,skipEscape:!0})),typeof p=="string"?(p=unescape(p),p=f(r(m(p,_),!0),{..._,skipEscape:!0})):typeof p=="object"&&(p=f(r(p,!0),{..._,skipEscape:!0})),g.toLowerCase()===p.toLowerCase()}function f(g,p){const _={host:g.host,scheme:g.scheme,userinfo:g.userinfo,port:g.port,path:g.path,query:g.query,nid:g.nid,nss:g.nss,uuid:g.uuid,fragment:g.fragment,reference:g.reference,resourceName:g.resourceName,secure:g.secure,error:""},k=Object.assign({},p),v=[],w=o(k.scheme||_.scheme);w&&w.serialize&&w.serialize(_,k),_.path!==void 0&&(k.skipEscape?_.path=unescape(_.path):(_.path=escape(_.path),_.scheme!==void 0&&(_.path=_.path.split("%3A").join(":")))),k.reference!=="suffix"&&_.scheme&&v.push(_.scheme,":");const S=n(_);if(S!==void 0&&(k.reference!=="suffix"&&v.push("//"),v.push(S),_.path&&_.path[0]!=="/"&&v.push("/")),_.path!==void 0){let T=_.path;!k.absolutePath&&(!w||!w.absolutePath)&&(T=t(T)),S===void 0&&T[0]==="/"&&T[1]==="/"&&(T="/%2F"+T.slice(2)),v.push(T)}return _.query!==void 0&&v.push("?",_.query),_.fragment!==void 0&&v.push("#",_.fragment),v.join("")}const h=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function m(g,p){const _=Object.assign({},p),k={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let v=!1;_.reference==="suffix"&&(_.scheme?g=_.scheme+":"+g:g="//"+g);const w=g.match(h);if(w){if(k.scheme=w[1],k.userinfo=w[3],k.host=w[4],k.port=parseInt(w[5],10),k.path=w[6]||"",k.query=w[7],k.fragment=w[8],isNaN(k.port)&&(k.port=w[5]),k.host)if(s(k.host)===!1){const I=e(k.host);k.host=I.host.toLowerCase(),v=I.isIPV6}else v=!0;k.scheme===void 0&&k.userinfo===void 0&&k.host===void 0&&k.port===void 0&&k.query===void 0&&!k.path?k.reference="same-document":k.scheme===void 0?k.reference="relative":k.fragment===void 0?k.reference="absolute":k.reference="uri",_.reference&&_.reference!=="suffix"&&_.reference!==k.reference&&(k.error=k.error||"URI is not a "+_.reference+" reference.");const S=o(_.scheme||k.scheme);if(!_.unicodeSupport&&(!S||!S.unicodeSupport)&&k.host&&(_.domainHost||S&&S.domainHost)&&v===!1&&i(k.host))try{k.host=URL.domainToASCII(k.host.toLowerCase())}catch(T){k.error=k.error||"Host's domain name can not be converted to ASCII: "+T}(!S||S&&!S.skipNormalize)&&(g.indexOf("%")!==-1&&(k.scheme!==void 0&&(k.scheme=unescape(k.scheme)),k.host!==void 0&&(k.host=unescape(k.host))),k.path&&(k.path=escape(unescape(k.path))),k.fragment&&(k.fragment=encodeURI(decodeURIComponent(k.fragment)))),S&&S.parse&&S.parse(k,_)}else k.error=k.error||"URI can not be parsed.";return k}const y={SCHEMES:a,normalize:c,resolve:u,resolveComponent:l,equal:d,serialize:f,parse:m};return xf.exports=y,xf.exports.default=y,xf.exports.fastUri=y,xf.exports}var iO;function d1e(){if(iO)return rg;iO=1,Object.defineProperty(rg,"__esModule",{value:!0});const e=l1e();return e.code='require("ajv/dist/runtime/uri").default',rg.default=e,rg}var aO;function f1e(){return aO||(aO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=j1();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=et();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});const r=MA(),s=F1(),i=Lz(),a=B1(),o=et(),c=M1(),u=Sy(),l=pt(),d=c1e,f=d1e(),h=(C,M)=>new RegExp(C,M);h.code="new RegExp";const m=["removeAdditional","useDefaults","coerceTypes"],y=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),g={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},p={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},_=200;function k(C){var M,K,A,P,B,J,be,ge,Ee,Oe,q,W,se,le,we,Fe,Ie,Me,gt,it,Ct,zr,pn,Gs,ss;const X=C.strict,ae=(M=C.code)===null||M===void 0?void 0:M.optimize,Ae=ae===!0||ae===void 0?1:ae||0,xe=(A=(K=C.code)===null||K===void 0?void 0:K.regExp)!==null&&A!==void 0?A:h,xt=(P=C.uriResolver)!==null&&P!==void 0?P:f.default;return{strictSchema:(J=(B=C.strictSchema)!==null&&B!==void 0?B:X)!==null&&J!==void 0?J:!0,strictNumbers:(ge=(be=C.strictNumbers)!==null&&be!==void 0?be:X)!==null&&ge!==void 0?ge:!0,strictTypes:(Oe=(Ee=C.strictTypes)!==null&&Ee!==void 0?Ee:X)!==null&&Oe!==void 0?Oe:"log",strictTuples:(W=(q=C.strictTuples)!==null&&q!==void 0?q:X)!==null&&W!==void 0?W:"log",strictRequired:(le=(se=C.strictRequired)!==null&&se!==void 0?se:X)!==null&&le!==void 0?le:!1,code:C.code?{...C.code,optimize:Ae,regExp:xe}:{optimize:Ae,regExp:xe},loopRequired:(we=C.loopRequired)!==null&&we!==void 0?we:_,loopEnum:(Fe=C.loopEnum)!==null&&Fe!==void 0?Fe:_,meta:(Ie=C.meta)!==null&&Ie!==void 0?Ie:!0,messages:(Me=C.messages)!==null&&Me!==void 0?Me:!0,inlineRefs:(gt=C.inlineRefs)!==null&&gt!==void 0?gt:!0,schemaId:(it=C.schemaId)!==null&&it!==void 0?it:"$id",addUsedSchema:(Ct=C.addUsedSchema)!==null&&Ct!==void 0?Ct:!0,validateSchema:(zr=C.validateSchema)!==null&&zr!==void 0?zr:!0,validateFormats:(pn=C.validateFormats)!==null&&pn!==void 0?pn:!0,unicodeRegExp:(Gs=C.unicodeRegExp)!==null&&Gs!==void 0?Gs:!0,int32range:(ss=C.int32range)!==null&&ss!==void 0?ss:!0,uriResolver:xt}}class v{constructor(M={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,M=this.opts={...M,...k(M)};const{es5:K,lines:A}=this.opts.code;this.scope=new o.ValueScope({scope:{},prefixes:y,es5:K,lines:A}),this.logger=V(M.logger);const P=M.validateFormats;M.validateFormats=!1,this.RULES=(0,i.getRules)(),w.call(this,g,M,"NOT SUPPORTED"),w.call(this,p,M,"DEPRECATED","warn"),this._metaOpts=R.call(this),M.formats&&I.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),M.keywords&&$.call(this,M.keywords),typeof M.meta=="object"&&this.addMetaSchema(M.meta),T.call(this),M.validateFormats=P}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:M,meta:K,schemaId:A}=this.opts;let P=d;A==="id"&&(P={...d},P.id=P.$id,delete P.$id),K&&M&&this.addMetaSchema(P,P[A],!1)}defaultMeta(){const{meta:M,schemaId:K}=this.opts;return this.opts.defaultMeta=typeof M=="object"?M[K]||M:void 0}validate(M,K){let A;if(typeof M=="string"){if(A=this.getSchema(M),!A)throw new Error(`no schema with key or ref "${M}"`)}else A=this.compile(M);const P=A(K);return"$async"in A||(this.errors=A.errors),P}compile(M,K){const A=this._addSchema(M,K);return A.validate||this._compileSchemaEnv(A)}compileAsync(M,K){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:A}=this.opts;return P.call(this,M,K);async function P(Oe,q){await B.call(this,Oe.$schema);const W=this._addSchema(Oe,q);return W.validate||J.call(this,W)}async function B(Oe){Oe&&!this.getSchema(Oe)&&await P.call(this,{$ref:Oe},!0)}async function J(Oe){try{return this._compileSchemaEnv(Oe)}catch(q){if(!(q instanceof s.default))throw q;return be.call(this,q),await ge.call(this,q.missingSchema),J.call(this,Oe)}}function be({missingSchema:Oe,missingRef:q}){if(this.refs[Oe])throw new Error(`AnySchema ${Oe} is loaded but ${q} cannot be resolved`)}async function ge(Oe){const q=await Ee.call(this,Oe);this.refs[Oe]||await B.call(this,q.$schema),this.refs[Oe]||this.addSchema(q,Oe,K)}async function Ee(Oe){const q=this._loading[Oe];if(q)return q;try{return await(this._loading[Oe]=A(Oe))}finally{delete this._loading[Oe]}}}addSchema(M,K,A,P=this.opts.validateSchema){if(Array.isArray(M)){for(const J of M)this.addSchema(J,void 0,A,P);return this}let B;if(typeof M=="object"){const{schemaId:J}=this.opts;if(B=M[J],B!==void 0&&typeof B!="string")throw new Error(`schema ${J} must be string`)}return K=(0,c.normalizeId)(K||B),this._checkUnique(K),this.schemas[K]=this._addSchema(M,A,K,P,!0),this}addMetaSchema(M,K,A=this.opts.validateSchema){return this.addSchema(M,K,!0,A),this}validateSchema(M,K){if(typeof M=="boolean")return!0;let A;if(A=M.$schema,A!==void 0&&typeof A!="string")throw new Error("$schema must be a string");if(A=A||this.opts.defaultMeta||this.defaultMeta(),!A)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const P=this.validate(A,M);if(!P&&K){const B="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(B);else throw new Error(B)}return P}getSchema(M){let K;for(;typeof(K=S.call(this,M))=="string";)M=K;if(K===void 0){const{schemaId:A}=this.opts,P=new a.SchemaEnv({schema:{},schemaId:A});if(K=a.resolveSchema.call(this,P,M),!K)return;this.refs[M]=K}return K.validate||this._compileSchemaEnv(K)}removeSchema(M){if(M instanceof RegExp)return this._removeAllSchemas(this.schemas,M),this._removeAllSchemas(this.refs,M),this;switch(typeof M){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const K=S.call(this,M);return typeof K=="object"&&this._cache.delete(K.schema),delete this.schemas[M],delete this.refs[M],this}case"object":{const K=M;this._cache.delete(K);let A=M[this.opts.schemaId];return A&&(A=(0,c.normalizeId)(A),delete this.schemas[A],delete this.refs[A]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(M){for(const K of M)this.addKeyword(K);return this}addKeyword(M,K){let A;if(typeof M=="string")A=M,typeof K=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),K.keyword=A);else if(typeof M=="object"&&K===void 0){if(K=M,A=K.keyword,Array.isArray(A)&&!A.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(G.call(this,A,K),!K)return(0,l.eachItem)(A,B=>Q.call(this,B)),this;me.call(this,K);const P={...K,type:(0,u.getJSONTypes)(K.type),schemaType:(0,u.getJSONTypes)(K.schemaType)};return(0,l.eachItem)(A,P.type.length===0?B=>Q.call(this,B,P):B=>P.type.forEach(J=>Q.call(this,B,P,J))),this}getKeyword(M){const K=this.RULES.all[M];return typeof K=="object"?K.definition:!!K}removeKeyword(M){const{RULES:K}=this;delete K.keywords[M],delete K.all[M];for(const A of K.rules){const P=A.rules.findIndex(B=>B.keyword===M);P>=0&&A.rules.splice(P,1)}return this}addFormat(M,K){return typeof K=="string"&&(K=new RegExp(K)),this.formats[M]=K,this}errorsText(M=this.errors,{separator:K=", ",dataVar:A="data"}={}){return!M||M.length===0?"No errors":M.map(P=>`${A}${P.instancePath} ${P.message}`).reduce((P,B)=>P+K+B)}$dataMetaSchema(M,K){const A=this.RULES.all;M=JSON.parse(JSON.stringify(M));for(const P of K){const B=P.split("/").slice(1);let J=M;for(const be of B)J=J[be];for(const be in A){const ge=A[be];if(typeof ge!="object")continue;const{$data:Ee}=ge.definition,Oe=J[be];Ee&&Oe&&(J[be]=tt(Oe))}}return M}_removeAllSchemas(M,K){for(const A in M){const P=M[A];(!K||K.test(A))&&(typeof P=="string"?delete M[A]:P&&!P.meta&&(this._cache.delete(P.schema),delete M[A]))}}_addSchema(M,K,A,P=this.opts.validateSchema,B=this.opts.addUsedSchema){let J;const{schemaId:be}=this.opts;if(typeof M=="object")J=M[be];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof M!="boolean")throw new Error("schema must be object or boolean")}let ge=this._cache.get(M);if(ge!==void 0)return ge;A=(0,c.normalizeId)(J||A);const Ee=c.getSchemaRefs.call(this,M,A);return ge=new a.SchemaEnv({schema:M,schemaId:be,meta:K,baseId:A,localRefs:Ee}),this._cache.set(ge.schema,ge),B&&!A.startsWith("#")&&(A&&this._checkUnique(A),this.refs[A]=ge),P&&this.validateSchema(M,!0),ge}_checkUnique(M){if(this.schemas[M]||this.refs[M])throw new Error(`schema with key or id "${M}" already exists`)}_compileSchemaEnv(M){if(M.meta?this._compileMetaSchema(M):a.compileSchema.call(this,M),!M.validate)throw new Error("ajv implementation error");return M.validate}_compileMetaSchema(M){const K=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,M)}finally{this.opts=K}}}v.ValidationError=r.default,v.MissingRefError=s.default,e.default=v;function w(C,M,K,A="error"){for(const P in C){const B=P;B in M&&this.logger[A](`${K}: option ${P}. ${C[B]}`)}}function S(C){return C=(0,c.normalizeId)(C),this.schemas[C]||this.refs[C]}function T(){const C=this.opts.schemas;if(C)if(Array.isArray(C))this.addSchema(C);else for(const M in C)this.addSchema(C[M],M)}function I(){for(const C in this.opts.formats){const M=this.opts.formats[C];M&&this.addFormat(C,M)}}function $(C){if(Array.isArray(C)){this.addVocabulary(C);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const M in C){const K=C[M];K.keyword||(K.keyword=M),this.addKeyword(K)}}function R(){const C={...this.opts};for(const M of m)delete C[M];return C}const z={log(){},warn(){},error(){}};function V(C){if(C===!1)return z;if(C===void 0)return console;if(C.log&&C.warn&&C.error)return C;throw new Error("logger must implement log, warn and error methods")}const H=/^[a-z_$][a-z0-9_$:-]*$/i;function G(C,M){const{RULES:K}=this;if((0,l.eachItem)(C,A=>{if(K.keywords[A])throw new Error(`Keyword ${A} is already defined`);if(!H.test(A))throw new Error(`Keyword ${A} has invalid name`)}),!!M&&M.$data&&!("code"in M||"validate"in M))throw new Error('$data keyword must have "code" or "validate" function')}function Q(C,M,K){var A;const P=M?.post;if(K&&P)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:B}=this;let J=P?B.post:B.rules.find(({type:ge})=>ge===K);if(J||(J={type:K,rules:[]},B.rules.push(J)),B.keywords[C]=!0,!M)return;const be={keyword:C,definition:{...M,type:(0,u.getJSONTypes)(M.type),schemaType:(0,u.getJSONTypes)(M.schemaType)}};M.before?re.call(this,J,be,M.before):J.rules.push(be),B.all[C]=be,(A=M.implements)===null||A===void 0||A.forEach(ge=>this.addKeyword(ge))}function re(C,M,K){const A=C.rules.findIndex(P=>P.keyword===K);A>=0?C.rules.splice(A,0,M):(C.rules.push(M),this.logger.warn(`rule ${K} is not defined`))}function me(C){let{metaSchema:M}=C;M!==void 0&&(C.$data&&this.opts.$data&&(M=tt(M)),C.validateSchema=this.compile(M,!0))}const ke={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function tt(C){return{anyOf:[C,ke]}}})(SE)),SE}var sg={},ig={},ag={},oO;function h1e(){if(oO)return ag;oO=1,Object.defineProperty(ag,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return ag.default=e,ag}var Qa={},cO;function jA(){if(cO)return Qa;cO=1,Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.callRef=Qa.getValidate=void 0;const e=F1(),t=Ti(),n=et(),r=xi(),s=B1(),i=pt(),a={keyword:"$ref",schemaType:"string",code(u){const{gen:l,schema:d,it:f}=u,{baseId:h,schemaEnv:m,validateName:y,opts:g,self:p}=f,{root:_}=m;if((d==="#"||d==="#/")&&h===_.baseId)return v();const k=s.resolveRef.call(p,_,h,d);if(k===void 0)throw new e.default(f.opts.uriResolver,h,d);if(k instanceof s.SchemaEnv)return w(k);return S(k);function v(){if(m===_)return c(u,y,m,m.$async);const T=l.scopeValue("root",{ref:_});return c(u,(0,n._)`${T}.validate`,_,_.$async)}function w(T){const I=o(u,T);c(u,I,T,T.$async)}function S(T){const I=l.scopeValue("schema",g.code.source===!0?{ref:T,code:(0,n.stringify)(T)}:{ref:T}),$=l.name("valid"),R=u.subschema({schema:T,dataTypes:[],schemaPath:n.nil,topSchemaRef:I,errSchemaPath:d},$);u.mergeEvaluated(R),u.ok($)}}};function o(u,l){const{gen:d}=u;return l.validate?d.scopeValue("validate",{ref:l.validate}):(0,n._)`${d.scopeValue("wrapper",{ref:l})}.validate`}Qa.getValidate=o;function c(u,l,d,f){const{gen:h,it:m}=u,{allErrors:y,schemaEnv:g,opts:p}=m,_=p.passContext?r.default.this:n.nil;f?k():v();function k(){if(!g.$async)throw new Error("async schema referenced by sync schema");const T=h.let("valid");h.try(()=>{h.code((0,n._)`await ${(0,t.callValidateCode)(u,l,_)}`),S(l),y||h.assign(T,!0)},I=>{h.if((0,n._)`!(${I} instanceof ${m.ValidationError})`,()=>h.throw(I)),w(I),y||h.assign(T,!1)}),u.ok(T)}function v(){u.result((0,t.callValidateCode)(u,l,_),()=>S(l),()=>w(l))}function w(T){const I=(0,n._)`${T}.errors`;h.assign(r.default.vErrors,(0,n._)`${r.default.vErrors} === null ? ${I} : ${r.default.vErrors}.concat(${I})`),h.assign(r.default.errors,(0,n._)`${r.default.vErrors}.length`)}function S(T){var I;if(!m.opts.unevaluated)return;const $=(I=d?.validate)===null||I===void 0?void 0:I.evaluated;if(m.props!==!0)if($&&!$.dynamicProps)$.props!==void 0&&(m.props=i.mergeEvaluated.props(h,$.props,m.props));else{const R=h.var("props",(0,n._)`${T}.evaluated.props`);m.props=i.mergeEvaluated.props(h,R,m.props,n.Name)}if(m.items!==!0)if($&&!$.dynamicItems)$.items!==void 0&&(m.items=i.mergeEvaluated.items(h,$.items,m.items));else{const R=h.var("items",(0,n._)`${T}.evaluated.items`);m.items=i.mergeEvaluated.items(h,R,m.items,n.Name)}}}return Qa.callRef=c,Qa.default=a,Qa}var uO;function m1e(){if(uO)return ig;uO=1,Object.defineProperty(ig,"__esModule",{value:!0});const e=h1e(),t=jA(),n=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return ig.default=n,ig}var og={},cg={},lO;function p1e(){if(lO)return cg;lO=1,Object.defineProperty(cg,"__esModule",{value:!0});const e=et(),t=e.operators,n={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},r={message:({keyword:i,schemaCode:a})=>(0,e.str)`must be ${n[i].okStr} ${a}`,params:({keyword:i,schemaCode:a})=>(0,e._)`{comparison: ${n[i].okStr}, limit: ${a}}`},s={keyword:Object.keys(n),type:"number",schemaType:"number",$data:!0,error:r,code(i){const{keyword:a,data:o,schemaCode:c}=i;i.fail$data((0,e._)`${o} ${n[a].fail} ${c} || isNaN(${o})`)}};return cg.default=s,cg}var ug={},dO;function g1e(){if(dO)return ug;dO=1,Object.defineProperty(ug,"__esModule",{value:!0});const e=et(),n={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:r})=>(0,e.str)`must be multiple of ${r}`,params:({schemaCode:r})=>(0,e._)`{multipleOf: ${r}}`},code(r){const{gen:s,data:i,schemaCode:a,it:o}=r,c=o.opts.multipleOfPrecision,u=s.let("res"),l=c?(0,e._)`Math.abs(Math.round(${u}) - ${u}) > 1e-${c}`:(0,e._)`${u} !== parseInt(${u})`;r.fail$data((0,e._)`(${a} === 0 || (${u} = ${i}/${a}, ${l}))`)}};return ug.default=n,ug}var lg={},dg={},fO;function b1e(){if(fO)return dg;fO=1,Object.defineProperty(dg,"__esModule",{value:!0});function e(t){const n=t.length;let r=0,s=0,i;for(;s<n;)r++,i=t.charCodeAt(s++),i>=55296&&i<=56319&&s<n&&(i=t.charCodeAt(s),(i&64512)===56320&&s++);return r}return dg.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',dg}var hO;function y1e(){if(hO)return lg;hO=1,Object.defineProperty(lg,"__esModule",{value:!0});const e=et(),t=pt(),n=b1e(),s={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:a}){const o=i==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${a} characters`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},code(i){const{keyword:a,data:o,schemaCode:c,it:u}=i,l=a==="maxLength"?e.operators.GT:e.operators.LT,d=u.opts.unicode===!1?(0,e._)`${o}.length`:(0,e._)`${(0,t.useFunc)(i.gen,n.default)}(${o})`;i.fail$data((0,e._)`${d} ${l} ${c}`)}};return lg.default=s,lg}var fg={},mO;function _1e(){if(mO)return fg;mO=1,Object.defineProperty(fg,"__esModule",{value:!0});const e=Ti(),t=pt(),n=et(),s={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,n.str)`must match pattern "${i}"`,params:({schemaCode:i})=>(0,n._)`{pattern: ${i}}`},code(i){const{gen:a,data:o,$data:c,schema:u,schemaCode:l,it:d}=i,f=d.opts.unicodeRegExp?"u":"";if(c){const{regExp:h}=d.opts.code,m=h.code==="new RegExp"?(0,n._)`new RegExp`:(0,t.useFunc)(a,h),y=a.let("valid");a.try(()=>a.assign(y,(0,n._)`${m}(${l}, ${f}).test(${o})`),()=>a.assign(y,!1)),i.fail$data((0,n._)`!${y}`)}else{const h=(0,e.usePattern)(i,u);i.fail$data((0,n._)`!${h}.test(${o})`)}}};return fg.default=s,fg}var hg={},pO;function k1e(){if(pO)return hg;pO=1,Object.defineProperty(hg,"__esModule",{value:!0});const e=et(),n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:s}){const i=r==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${s} properties`},params:({schemaCode:r})=>(0,e._)`{limit: ${r}}`},code(r){const{keyword:s,data:i,schemaCode:a}=r,o=s==="maxProperties"?e.operators.GT:e.operators.LT;r.fail$data((0,e._)`Object.keys(${i}).length ${o} ${a}`)}};return hg.default=n,hg}var mg={},gO;function E1e(){if(gO)return mg;gO=1,Object.defineProperty(mg,"__esModule",{value:!0});const e=Ti(),t=et(),n=pt(),s={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:i}})=>(0,t.str)`must have required property '${i}'`,params:({params:{missingProperty:i}})=>(0,t._)`{missingProperty: ${i}}`},code(i){const{gen:a,schema:o,schemaCode:c,data:u,$data:l,it:d}=i,{opts:f}=d;if(!l&&o.length===0)return;const h=o.length>=f.loopRequired;if(d.allErrors?m():y(),f.strictRequired){const _=i.parentSchema.properties,{definedProperties:k}=i.it;for(const v of o)if(_?.[v]===void 0&&!k.has(v)){const w=d.schemaEnv.baseId+d.errSchemaPath,S=`required property "${v}" is not defined at "${w}" (strictRequired)`;(0,n.checkStrictMode)(d,S,d.opts.strictRequired)}}function m(){if(h||l)i.block$data(t.nil,g);else for(const _ of o)(0,e.checkReportMissingProp)(i,_)}function y(){const _=a.let("missing");if(h||l){const k=a.let("valid",!0);i.block$data(k,()=>p(_,k)),i.ok(k)}else a.if((0,e.checkMissingProp)(i,o,_)),(0,e.reportMissingProp)(i,_),a.else()}function g(){a.forOf("prop",c,_=>{i.setParams({missingProperty:_}),a.if((0,e.noPropertyInData)(a,u,_,f.ownProperties),()=>i.error())})}function p(_,k){i.setParams({missingProperty:_}),a.forOf(_,c,()=>{a.assign(k,(0,e.propertyInData)(a,u,_,f.ownProperties)),a.if((0,t.not)(k),()=>{i.error(),a.break()})},t.nil)}}};return mg.default=s,mg}var pg={},bO;function w1e(){if(bO)return pg;bO=1,Object.defineProperty(pg,"__esModule",{value:!0});const e=et(),n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:r,schemaCode:s}){const i=r==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${s} items`},params:({schemaCode:r})=>(0,e._)`{limit: ${r}}`},code(r){const{keyword:s,data:i,schemaCode:a}=r,o=s==="maxItems"?e.operators.GT:e.operators.LT;r.fail$data((0,e._)`${i}.length ${o} ${a}`)}};return pg.default=n,pg}var gg={},bg={},yO;function FA(){if(yO)return bg;yO=1,Object.defineProperty(bg,"__esModule",{value:!0});const e=$z();return e.code='require("ajv/dist/runtime/equal").default',bg.default=e,bg}var _O;function S1e(){if(_O)return gg;_O=1,Object.defineProperty(gg,"__esModule",{value:!0});const e=Sy(),t=et(),n=pt(),r=FA(),i={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:a,j:o}})=>(0,t.str)`must NOT have duplicate items (items ## ${o} and ${a} are identical)`,params:({params:{i:a,j:o}})=>(0,t._)`{i: ${a}, j: ${o}}`},code(a){const{gen:o,data:c,$data:u,schema:l,parentSchema:d,schemaCode:f,it:h}=a;if(!u&&!l)return;const m=o.let("valid"),y=d.items?(0,e.getSchemaTypes)(d.items):[];a.block$data(m,g,(0,t._)`${f} === false`),a.ok(m);function g(){const v=o.let("i",(0,t._)`${c}.length`),w=o.let("j");a.setParams({i:v,j:w}),o.assign(m,!0),o.if((0,t._)`${v} > 1`,()=>(p()?_:k)(v,w))}function p(){return y.length>0&&!y.some(v=>v==="object"||v==="array")}function _(v,w){const S=o.name("item"),T=(0,e.checkDataTypes)(y,S,h.opts.strictNumbers,e.DataType.Wrong),I=o.const("indices",(0,t._)`{}`);o.for((0,t._)`;${v}--;`,()=>{o.let(S,(0,t._)`${c}[${v}]`),o.if(T,(0,t._)`continue`),y.length>1&&o.if((0,t._)`typeof ${S} == "string"`,(0,t._)`${S} += "_"`),o.if((0,t._)`typeof ${I}[${S}] == "number"`,()=>{o.assign(w,(0,t._)`${I}[${S}]`),a.error(),o.assign(m,!1).break()}).code((0,t._)`${I}[${S}] = ${v}`)})}function k(v,w){const S=(0,n.useFunc)(o,r.default),T=o.name("outer");o.label(T).for((0,t._)`;${v}--;`,()=>o.for((0,t._)`${w} = ${v}; ${w}--;`,()=>o.if((0,t._)`${S}(${c}[${v}], ${c}[${w}])`,()=>{a.error(),o.assign(m,!1).break(T)})))}}};return gg.default=i,gg}var yg={},kO;function v1e(){if(kO)return yg;kO=1,Object.defineProperty(yg,"__esModule",{value:!0});const e=et(),t=pt(),n=FA(),s={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:i})=>(0,e._)`{allowedValue: ${i}}`},code(i){const{gen:a,data:o,$data:c,schemaCode:u,schema:l}=i;c||l&&typeof l=="object"?i.fail$data((0,e._)`!${(0,t.useFunc)(a,n.default)}(${o}, ${u})`):i.fail((0,e._)`${l} !== ${o}`)}};return yg.default=s,yg}var _g={},EO;function x1e(){if(EO)return _g;EO=1,Object.defineProperty(_g,"__esModule",{value:!0});const e=et(),t=pt(),n=FA(),s={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:i})=>(0,e._)`{allowedValues: ${i}}`},code(i){const{gen:a,data:o,$data:c,schema:u,schemaCode:l,it:d}=i;if(!c&&u.length===0)throw new Error("enum must have non-empty array");const f=u.length>=d.opts.loopEnum;let h;const m=()=>h??(h=(0,t.useFunc)(a,n.default));let y;if(f||c)y=a.let("valid"),i.block$data(y,g);else{if(!Array.isArray(u))throw new Error("ajv implementation error");const _=a.const("vSchema",l);y=(0,e.or)(...u.map((k,v)=>p(_,v)))}i.pass(y);function g(){a.assign(y,!1),a.forOf("v",l,_=>a.if((0,e._)`${m()}(${o}, ${_})`,()=>a.assign(y,!0).break()))}function p(_,k){const v=u[k];return typeof v=="object"&&v!==null?(0,e._)`${m()}(${o}, ${_}[${k}])`:(0,e._)`${o} === ${v}`}}};return _g.default=s,_g}var wO;function T1e(){if(wO)return og;wO=1,Object.defineProperty(og,"__esModule",{value:!0});const e=p1e(),t=g1e(),n=y1e(),r=_1e(),s=k1e(),i=E1e(),a=w1e(),o=S1e(),c=v1e(),u=x1e(),l=[e.default,t.default,n.default,r.default,s.default,i.default,a.default,o.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},c.default,u.default];return og.default=l,og}var kg={},tl={},SO;function jz(){if(SO)return tl;SO=1,Object.defineProperty(tl,"__esModule",{value:!0}),tl.validateAdditionalItems=void 0;const e=et(),t=pt(),r={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:i}})=>(0,e.str)`must NOT have more than ${i} items`,params:({params:{len:i}})=>(0,e._)`{limit: ${i}}`},code(i){const{parentSchema:a,it:o}=i,{items:c}=a;if(!Array.isArray(c)){(0,t.checkStrictMode)(o,'"additionalItems" is ignored when "items" is not an array of schemas');return}s(i,c)}};function s(i,a){const{gen:o,schema:c,data:u,keyword:l,it:d}=i;d.items=!0;const f=o.const("len",(0,e._)`${u}.length`);if(c===!1)i.setParams({len:a.length}),i.pass((0,e._)`${f} <= ${a.length}`);else if(typeof c=="object"&&!(0,t.alwaysValidSchema)(d,c)){const m=o.var("valid",(0,e._)`${f} <= ${a.length}`);o.if((0,e.not)(m),()=>h(m)),i.ok(m)}function h(m){o.forRange("i",a.length,f,y=>{i.subschema({keyword:l,dataProp:y,dataPropType:t.Type.Num},m),d.allErrors||o.if((0,e.not)(m),()=>o.break())})}}return tl.validateAdditionalItems=s,tl.default=r,tl}var Eg={},nl={},vO;function Fz(){if(vO)return nl;vO=1,Object.defineProperty(nl,"__esModule",{value:!0}),nl.validateTuple=void 0;const e=et(),t=pt(),n=Ti(),r={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(i){const{schema:a,it:o}=i;if(Array.isArray(a))return s(i,"additionalItems",a);o.items=!0,!(0,t.alwaysValidSchema)(o,a)&&i.ok((0,n.validateArray)(i))}};function s(i,a,o=i.schema){const{gen:c,parentSchema:u,data:l,keyword:d,it:f}=i;y(u),f.opts.unevaluated&&o.length&&f.items!==!0&&(f.items=t.mergeEvaluated.items(c,o.length,f.items));const h=c.name("valid"),m=c.const("len",(0,e._)`${l}.length`);o.forEach((g,p)=>{(0,t.alwaysValidSchema)(f,g)||(c.if((0,e._)`${m} > ${p}`,()=>i.subschema({keyword:d,schemaProp:p,dataProp:p},h)),i.ok(h))});function y(g){const{opts:p,errSchemaPath:_}=f,k=o.length,v=k===g.minItems&&(k===g.maxItems||g[a]===!1);if(p.strictTuples&&!v){const w=`"${d}" is ${k}-tuple, but minItems or maxItems/${a} are not specified or different at path "${_}"`;(0,t.checkStrictMode)(f,w,p.strictTuples)}}}return nl.validateTuple=s,nl.default=r,nl}var xO;function I1e(){if(xO)return Eg;xO=1,Object.defineProperty(Eg,"__esModule",{value:!0});const e=Fz(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,e.validateTuple)(n,"items")};return Eg.default=t,Eg}var wg={},TO;function A1e(){if(TO)return wg;TO=1,Object.defineProperty(wg,"__esModule",{value:!0});const e=et(),t=pt(),n=Ti(),r=jz(),i={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:a}})=>(0,e.str)`must NOT have more than ${a} items`,params:({params:{len:a}})=>(0,e._)`{limit: ${a}}`},code(a){const{schema:o,parentSchema:c,it:u}=a,{prefixItems:l}=c;u.items=!0,!(0,t.alwaysValidSchema)(u,o)&&(l?(0,r.validateAdditionalItems)(a,l):a.ok((0,n.validateArray)(a)))}};return wg.default=i,wg}var Sg={},IO;function C1e(){if(IO)return Sg;IO=1,Object.defineProperty(Sg,"__esModule",{value:!0});const e=et(),t=pt(),r={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:s,max:i}})=>i===void 0?(0,e.str)`must contain at least ${s} valid item(s)`:(0,e.str)`must contain at least ${s} and no more than ${i} valid item(s)`,params:({params:{min:s,max:i}})=>i===void 0?(0,e._)`{minContains: ${s}}`:(0,e._)`{minContains: ${s}, maxContains: ${i}}`},code(s){const{gen:i,schema:a,parentSchema:o,data:c,it:u}=s;let l,d;const{minContains:f,maxContains:h}=o;u.opts.next?(l=f===void 0?1:f,d=h):l=1;const m=i.const("len",(0,e._)`${c}.length`);if(s.setParams({min:l,max:d}),d===void 0&&l===0){(0,t.checkStrictMode)(u,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(d!==void 0&&l>d){(0,t.checkStrictMode)(u,'"minContains" > "maxContains" is always invalid'),s.fail();return}if((0,t.alwaysValidSchema)(u,a)){let k=(0,e._)`${m} >= ${l}`;d!==void 0&&(k=(0,e._)`${k} && ${m} <= ${d}`),s.pass(k);return}u.items=!0;const y=i.name("valid");d===void 0&&l===1?p(y,()=>i.if(y,()=>i.break())):l===0?(i.let(y,!0),d!==void 0&&i.if((0,e._)`${c}.length > 0`,g)):(i.let(y,!1),g()),s.result(y,()=>s.reset());function g(){const k=i.name("_valid"),v=i.let("count",0);p(k,()=>i.if(k,()=>_(v)))}function p(k,v){i.forRange("i",0,m,w=>{s.subschema({keyword:"contains",dataProp:w,dataPropType:t.Type.Num,compositeRule:!0},k),v()})}function _(k){i.code((0,e._)`${k}++`),d===void 0?i.if((0,e._)`${k} >= ${l}`,()=>i.assign(y,!0).break()):(i.if((0,e._)`${k} > ${d}`,()=>i.assign(y,!1).break()),l===1?i.assign(y,!0):i.if((0,e._)`${k} >= ${l}`,()=>i.assign(y,!0)))}}};return Sg.default=r,Sg}var RE={},AO;function BA(){return AO||(AO=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=et(),n=pt(),r=Ti();e.error={message:({params:{property:c,depsCount:u,deps:l}})=>{const d=u===1?"property":"properties";return(0,t.str)`must have ${d} ${l} when property ${c} is present`},params:({params:{property:c,depsCount:u,deps:l,missingProperty:d}})=>(0,t._)`{property: ${c},
105
- missingProperty: ${d},
106
- depsCount: ${u},
107
- deps: ${l}}`};const s={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(c){const[u,l]=i(c);a(c,u),o(c,l)}};function i({schema:c}){const u={},l={};for(const d in c){if(d==="__proto__")continue;const f=Array.isArray(c[d])?u:l;f[d]=c[d]}return[u,l]}function a(c,u=c.schema){const{gen:l,data:d,it:f}=c;if(Object.keys(u).length===0)return;const h=l.let("missing");for(const m in u){const y=u[m];if(y.length===0)continue;const g=(0,r.propertyInData)(l,d,m,f.opts.ownProperties);c.setParams({property:m,depsCount:y.length,deps:y.join(", ")}),f.allErrors?l.if(g,()=>{for(const p of y)(0,r.checkReportMissingProp)(c,p)}):(l.if((0,t._)`${g} && (${(0,r.checkMissingProp)(c,y,h)})`),(0,r.reportMissingProp)(c,h),l.else())}}e.validatePropertyDeps=a;function o(c,u=c.schema){const{gen:l,data:d,keyword:f,it:h}=c,m=l.name("valid");for(const y in u)(0,n.alwaysValidSchema)(h,u[y])||(l.if((0,r.propertyInData)(l,d,y,h.opts.ownProperties),()=>{const g=c.subschema({keyword:f,schemaProp:y},m);c.mergeValidEvaluated(g,m)},()=>l.var(m,!0)),c.ok(m))}e.validateSchemaDeps=o,e.default=s})(RE)),RE}var vg={},CO;function P1e(){if(CO)return vg;CO=1,Object.defineProperty(vg,"__esModule",{value:!0});const e=et(),t=pt(),r={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:s})=>(0,e._)`{propertyName: ${s.propertyName}}`},code(s){const{gen:i,schema:a,data:o,it:c}=s;if((0,t.alwaysValidSchema)(c,a))return;const u=i.name("valid");i.forIn("key",o,l=>{s.setParams({propertyName:l}),s.subschema({keyword:"propertyNames",data:l,dataTypes:["string"],propertyName:l,compositeRule:!0},u),i.if((0,e.not)(u),()=>{s.error(!0),c.allErrors||i.break()})}),s.ok(u)}};return vg.default=r,vg}var xg={},PO;function Bz(){if(PO)return xg;PO=1,Object.defineProperty(xg,"__esModule",{value:!0});const e=Ti(),t=et(),n=xi(),r=pt(),i={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:a})=>(0,t._)`{additionalProperty: ${a.additionalProperty}}`},code(a){const{gen:o,schema:c,parentSchema:u,data:l,errsCount:d,it:f}=a;if(!d)throw new Error("ajv implementation error");const{allErrors:h,opts:m}=f;if(f.props=!0,m.removeAdditional!=="all"&&(0,r.alwaysValidSchema)(f,c))return;const y=(0,e.allSchemaProperties)(u.properties),g=(0,e.allSchemaProperties)(u.patternProperties);p(),a.ok((0,t._)`${d} === ${n.default.errors}`);function p(){o.forIn("key",l,S=>{!y.length&&!g.length?v(S):o.if(_(S),()=>v(S))})}function _(S){let T;if(y.length>8){const I=(0,r.schemaRefOrVal)(f,u.properties,"properties");T=(0,e.isOwnProperty)(o,I,S)}else y.length?T=(0,t.or)(...y.map(I=>(0,t._)`${S} === ${I}`)):T=t.nil;return g.length&&(T=(0,t.or)(T,...g.map(I=>(0,t._)`${(0,e.usePattern)(a,I)}.test(${S})`))),(0,t.not)(T)}function k(S){o.code((0,t._)`delete ${l}[${S}]`)}function v(S){if(m.removeAdditional==="all"||m.removeAdditional&&c===!1){k(S);return}if(c===!1){a.setParams({additionalProperty:S}),a.error(),h||o.break();return}if(typeof c=="object"&&!(0,r.alwaysValidSchema)(f,c)){const T=o.name("valid");m.removeAdditional==="failing"?(w(S,T,!1),o.if((0,t.not)(T),()=>{a.reset(),k(S)})):(w(S,T),h||o.if((0,t.not)(T),()=>o.break()))}}function w(S,T,I){const $={keyword:"additionalProperties",dataProp:S,dataPropType:r.Type.Str};I===!1&&Object.assign($,{compositeRule:!0,createErrors:!1,allErrors:!1}),a.subschema($,T)}}};return xg.default=i,xg}var Tg={},NO;function N1e(){if(NO)return Tg;NO=1,Object.defineProperty(Tg,"__esModule",{value:!0});const e=j1(),t=Ti(),n=pt(),r=Bz(),s={keyword:"properties",type:"object",schemaType:"object",code(i){const{gen:a,schema:o,parentSchema:c,data:u,it:l}=i;l.opts.removeAdditional==="all"&&c.additionalProperties===void 0&&r.default.code(new e.KeywordCxt(l,r.default,"additionalProperties"));const d=(0,t.allSchemaProperties)(o);for(const g of d)l.definedProperties.add(g);l.opts.unevaluated&&d.length&&l.props!==!0&&(l.props=n.mergeEvaluated.props(a,(0,n.toHash)(d),l.props));const f=d.filter(g=>!(0,n.alwaysValidSchema)(l,o[g]));if(f.length===0)return;const h=a.name("valid");for(const g of f)m(g)?y(g):(a.if((0,t.propertyInData)(a,u,g,l.opts.ownProperties)),y(g),l.allErrors||a.else().var(h,!0),a.endIf()),i.it.definedProperties.add(g),i.ok(h);function m(g){return l.opts.useDefaults&&!l.compositeRule&&o[g].default!==void 0}function y(g){i.subschema({keyword:"properties",schemaProp:g,dataProp:g},h)}}};return Tg.default=s,Tg}var Ig={},RO;function R1e(){if(RO)return Ig;RO=1,Object.defineProperty(Ig,"__esModule",{value:!0});const e=Ti(),t=et(),n=pt(),r=pt(),s={keyword:"patternProperties",type:"object",schemaType:"object",code(i){const{gen:a,schema:o,data:c,parentSchema:u,it:l}=i,{opts:d}=l,f=(0,e.allSchemaProperties)(o),h=f.filter(v=>(0,n.alwaysValidSchema)(l,o[v]));if(f.length===0||h.length===f.length&&(!l.opts.unevaluated||l.props===!0))return;const m=d.strictSchema&&!d.allowMatchingProperties&&u.properties,y=a.name("valid");l.props!==!0&&!(l.props instanceof t.Name)&&(l.props=(0,r.evaluatedPropsToName)(a,l.props));const{props:g}=l;p();function p(){for(const v of f)m&&_(v),l.allErrors?k(v):(a.var(y,!0),k(v),a.if(y))}function _(v){for(const w in m)new RegExp(v).test(w)&&(0,n.checkStrictMode)(l,`property ${w} matches pattern ${v} (use allowMatchingProperties)`)}function k(v){a.forIn("key",c,w=>{a.if((0,t._)`${(0,e.usePattern)(i,v)}.test(${w})`,()=>{const S=h.includes(v);S||i.subschema({keyword:"patternProperties",schemaProp:v,dataProp:w,dataPropType:r.Type.Str},y),l.opts.unevaluated&&g!==!0?a.assign((0,t._)`${g}[${w}]`,!0):!S&&!l.allErrors&&a.if((0,t.not)(y),()=>a.break())})})}}};return Ig.default=s,Ig}var Ag={},OO;function O1e(){if(OO)return Ag;OO=1,Object.defineProperty(Ag,"__esModule",{value:!0});const e=pt(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){const{gen:r,schema:s,it:i}=n;if((0,e.alwaysValidSchema)(i,s)){n.fail();return}const a=r.name("valid");n.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),n.failResult(a,()=>n.reset(),()=>n.error())},error:{message:"must NOT be valid"}};return Ag.default=t,Ag}var Cg={},LO;function L1e(){if(LO)return Cg;LO=1,Object.defineProperty(Cg,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Ti().validateUnion,error:{message:"must match a schema in anyOf"}};return Cg.default=t,Cg}var Pg={},DO;function D1e(){if(DO)return Pg;DO=1,Object.defineProperty(Pg,"__esModule",{value:!0});const e=et(),t=pt(),r={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:s})=>(0,e._)`{passingSchemas: ${s.passing}}`},code(s){const{gen:i,schema:a,parentSchema:o,it:c}=s;if(!Array.isArray(a))throw new Error("ajv implementation error");if(c.opts.discriminator&&o.discriminator)return;const u=a,l=i.let("valid",!1),d=i.let("passing",null),f=i.name("_valid");s.setParams({passing:d}),i.block(h),s.result(l,()=>s.reset(),()=>s.error(!0));function h(){u.forEach((m,y)=>{let g;(0,t.alwaysValidSchema)(c,m)?i.var(f,!0):g=s.subschema({keyword:"oneOf",schemaProp:y,compositeRule:!0},f),y>0&&i.if((0,e._)`${f} && ${l}`).assign(l,!1).assign(d,(0,e._)`[${d}, ${y}]`).else(),i.if(f,()=>{i.assign(l,!0),i.assign(d,y),g&&s.mergeEvaluated(g,e.Name)})})}}};return Pg.default=r,Pg}var Ng={},$O;function $1e(){if($O)return Ng;$O=1,Object.defineProperty(Ng,"__esModule",{value:!0});const e=pt(),t={keyword:"allOf",schemaType:"array",code(n){const{gen:r,schema:s,it:i}=n;if(!Array.isArray(s))throw new Error("ajv implementation error");const a=r.name("valid");s.forEach((o,c)=>{if((0,e.alwaysValidSchema)(i,o))return;const u=n.subschema({keyword:"allOf",schemaProp:c},a);n.ok(a),n.mergeEvaluated(u)})}};return Ng.default=t,Ng}var Rg={},MO;function M1e(){if(MO)return Rg;MO=1,Object.defineProperty(Rg,"__esModule",{value:!0});const e=et(),t=pt(),r={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:i})=>(0,e.str)`must match "${i.ifClause}" schema`,params:({params:i})=>(0,e._)`{failingKeyword: ${i.ifClause}}`},code(i){const{gen:a,parentSchema:o,it:c}=i;o.then===void 0&&o.else===void 0&&(0,t.checkStrictMode)(c,'"if" without "then" and "else" is ignored');const u=s(c,"then"),l=s(c,"else");if(!u&&!l)return;const d=a.let("valid",!0),f=a.name("_valid");if(h(),i.reset(),u&&l){const y=a.let("ifClause");i.setParams({ifClause:y}),a.if(f,m("then",y),m("else",y))}else u?a.if(f,m("then")):a.if((0,e.not)(f),m("else"));i.pass(d,()=>i.error(!0));function h(){const y=i.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},f);i.mergeEvaluated(y)}function m(y,g){return()=>{const p=i.subschema({keyword:y},f);a.assign(d,f),i.mergeValidEvaluated(p,d),g?a.assign(g,(0,e._)`${y}`):i.setParams({ifClause:y})}}}};function s(i,a){const o=i.schema[a];return o!==void 0&&!(0,t.alwaysValidSchema)(i,o)}return Rg.default=r,Rg}var Og={},jO;function j1e(){if(jO)return Og;jO=1,Object.defineProperty(Og,"__esModule",{value:!0});const e=pt(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:r,it:s}){r.if===void 0&&(0,e.checkStrictMode)(s,`"${n}" without "if" is ignored`)}};return Og.default=t,Og}var FO;function F1e(){if(FO)return kg;FO=1,Object.defineProperty(kg,"__esModule",{value:!0});const e=jz(),t=I1e(),n=Fz(),r=A1e(),s=C1e(),i=BA(),a=P1e(),o=Bz(),c=N1e(),u=R1e(),l=O1e(),d=L1e(),f=D1e(),h=$1e(),m=M1e(),y=j1e();function g(p=!1){const _=[l.default,d.default,f.default,h.default,m.default,y.default,a.default,o.default,i.default,c.default,u.default];return p?_.push(t.default,r.default):_.push(e.default,n.default),_.push(s.default),_}return kg.default=g,kg}var Lg={},rl={},BO;function zz(){if(BO)return rl;BO=1,Object.defineProperty(rl,"__esModule",{value:!0}),rl.dynamicAnchor=void 0;const e=et(),t=xi(),n=B1(),r=jA(),s={keyword:"$dynamicAnchor",schemaType:"string",code:o=>i(o,o.schema)};function i(o,c){const{gen:u,it:l}=o;l.schemaEnv.root.dynamicAnchors[c]=!0;const d=(0,e._)`${t.default.dynamicAnchors}${(0,e.getProperty)(c)}`,f=l.errSchemaPath==="#"?l.validateName:a(o);u.if((0,e._)`!${d}`,()=>u.assign(d,f))}rl.dynamicAnchor=i;function a(o){const{schemaEnv:c,schema:u,self:l}=o.it,{root:d,baseId:f,localRefs:h,meta:m}=c.root,{schemaId:y}=l.opts,g=new n.SchemaEnv({schema:u,schemaId:y,root:d,baseId:f,localRefs:h,meta:m});return n.compileSchema.call(l,g),(0,r.getValidate)(o,g)}return rl.default=s,rl}var sl={},zO;function Uz(){if(zO)return sl;zO=1,Object.defineProperty(sl,"__esModule",{value:!0}),sl.dynamicRef=void 0;const e=et(),t=xi(),n=jA(),r={keyword:"$dynamicRef",schemaType:"string",code:i=>s(i,i.schema)};function s(i,a){const{gen:o,keyword:c,it:u}=i;if(a[0]!=="#")throw new Error(`"${c}" only supports hash fragment reference`);const l=a.slice(1);if(u.allErrors)d();else{const h=o.let("valid",!1);d(h),i.ok(h)}function d(h){if(u.schemaEnv.root.dynamicAnchors[l]){const m=o.let("_v",(0,e._)`${t.default.dynamicAnchors}${(0,e.getProperty)(l)}`);o.if(m,f(m,h),f(u.validateName,h))}else f(u.validateName,h)()}function f(h,m){return m?()=>o.block(()=>{(0,n.callRef)(i,h),o.let(m,!0)}):()=>(0,n.callRef)(i,h)}}return sl.dynamicRef=s,sl.default=r,sl}var Dg={},UO;function B1e(){if(UO)return Dg;UO=1,Object.defineProperty(Dg,"__esModule",{value:!0});const e=zz(),t=pt(),n={keyword:"$recursiveAnchor",schemaType:"boolean",code(r){r.schema?(0,e.dynamicAnchor)(r,""):(0,t.checkStrictMode)(r.it,"$recursiveAnchor: false is ignored")}};return Dg.default=n,Dg}var $g={},VO;function z1e(){if(VO)return $g;VO=1,Object.defineProperty($g,"__esModule",{value:!0});const e=Uz(),t={keyword:"$recursiveRef",schemaType:"string",code:n=>(0,e.dynamicRef)(n,n.schema)};return $g.default=t,$g}var HO;function U1e(){if(HO)return Lg;HO=1,Object.defineProperty(Lg,"__esModule",{value:!0});const e=zz(),t=Uz(),n=B1e(),r=z1e(),s=[e.default,t.default,n.default,r.default];return Lg.default=s,Lg}var Mg={},jg={},qO;function V1e(){if(qO)return jg;qO=1,Object.defineProperty(jg,"__esModule",{value:!0});const e=BA(),t={keyword:"dependentRequired",type:"object",schemaType:"object",error:e.error,code:n=>(0,e.validatePropertyDeps)(n)};return jg.default=t,jg}var Fg={},GO;function H1e(){if(GO)return Fg;GO=1,Object.defineProperty(Fg,"__esModule",{value:!0});const e=BA(),t={keyword:"dependentSchemas",type:"object",schemaType:"object",code:n=>(0,e.validateSchemaDeps)(n)};return Fg.default=t,Fg}var Bg={},KO;function q1e(){if(KO)return Bg;KO=1,Object.defineProperty(Bg,"__esModule",{value:!0});const e=pt(),t={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:n,parentSchema:r,it:s}){r.contains===void 0&&(0,e.checkStrictMode)(s,`"${n}" without "contains" is ignored`)}};return Bg.default=t,Bg}var WO;function G1e(){if(WO)return Mg;WO=1,Object.defineProperty(Mg,"__esModule",{value:!0});const e=V1e(),t=H1e(),n=q1e(),r=[e.default,t.default,n.default];return Mg.default=r,Mg}var zg={},Ug={},JO;function K1e(){if(JO)return Ug;JO=1,Object.defineProperty(Ug,"__esModule",{value:!0});const e=et(),t=pt(),n=xi(),s={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:i})=>(0,e._)`{unevaluatedProperty: ${i.unevaluatedProperty}}`},code(i){const{gen:a,schema:o,data:c,errsCount:u,it:l}=i;if(!u)throw new Error("ajv implementation error");const{allErrors:d,props:f}=l;f instanceof e.Name?a.if((0,e._)`${f} !== true`,()=>a.forIn("key",c,g=>a.if(m(f,g),()=>h(g)))):f!==!0&&a.forIn("key",c,g=>f===void 0?h(g):a.if(y(f,g),()=>h(g))),l.props=!0,i.ok((0,e._)`${u} === ${n.default.errors}`);function h(g){if(o===!1){i.setParams({unevaluatedProperty:g}),i.error(),d||a.break();return}if(!(0,t.alwaysValidSchema)(l,o)){const p=a.name("valid");i.subschema({keyword:"unevaluatedProperties",dataProp:g,dataPropType:t.Type.Str},p),d||a.if((0,e.not)(p),()=>a.break())}}function m(g,p){return(0,e._)`!${g} || !${g}[${p}]`}function y(g,p){const _=[];for(const k in g)g[k]===!0&&_.push((0,e._)`${p} !== ${k}`);return(0,e.and)(..._)}}};return Ug.default=s,Ug}var Vg={},YO;function W1e(){if(YO)return Vg;YO=1,Object.defineProperty(Vg,"__esModule",{value:!0});const e=et(),t=pt(),r={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:s}})=>(0,e.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,e._)`{limit: ${s}}`},code(s){const{gen:i,schema:a,data:o,it:c}=s,u=c.items||0;if(u===!0)return;const l=i.const("len",(0,e._)`${o}.length`);if(a===!1)s.setParams({len:u}),s.fail((0,e._)`${l} > ${u}`);else if(typeof a=="object"&&!(0,t.alwaysValidSchema)(c,a)){const f=i.var("valid",(0,e._)`${l} <= ${u}`);i.if((0,e.not)(f),()=>d(f,u)),s.ok(f)}c.items=!0;function d(f,h){i.forRange("i",h,l,m=>{s.subschema({keyword:"unevaluatedItems",dataProp:m,dataPropType:t.Type.Num},f),c.allErrors||i.if((0,e.not)(f),()=>i.break())})}}};return Vg.default=r,Vg}var QO;function J1e(){if(QO)return zg;QO=1,Object.defineProperty(zg,"__esModule",{value:!0});const e=K1e(),t=W1e(),n=[e.default,t.default];return zg.default=n,zg}var Hg={},qg={},XO;function Y1e(){if(XO)return qg;XO=1,Object.defineProperty(qg,"__esModule",{value:!0});const e=et(),n={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:r})=>(0,e.str)`must match format "${r}"`,params:({schemaCode:r})=>(0,e._)`{format: ${r}}`},code(r,s){const{gen:i,data:a,$data:o,schema:c,schemaCode:u,it:l}=r,{opts:d,errSchemaPath:f,schemaEnv:h,self:m}=l;if(!d.validateFormats)return;o?y():g();function y(){const p=i.scopeValue("formats",{ref:m.formats,code:d.code.formats}),_=i.const("fDef",(0,e._)`${p}[${u}]`),k=i.let("fType"),v=i.let("format");i.if((0,e._)`typeof ${_} == "object" && !(${_} instanceof RegExp)`,()=>i.assign(k,(0,e._)`${_}.type || "string"`).assign(v,(0,e._)`${_}.validate`),()=>i.assign(k,(0,e._)`"string"`).assign(v,_)),r.fail$data((0,e.or)(w(),S()));function w(){return d.strictSchema===!1?e.nil:(0,e._)`${u} && !${v}`}function S(){const T=h.$async?(0,e._)`(${_}.async ? await ${v}(${a}) : ${v}(${a}))`:(0,e._)`${v}(${a})`,I=(0,e._)`(typeof ${v} == "function" ? ${T} : ${v}.test(${a}))`;return(0,e._)`${v} && ${v} !== true && ${k} === ${s} && !${I}`}}function g(){const p=m.formats[c];if(!p){w();return}if(p===!0)return;const[_,k,v]=S(p);_===s&&r.pass(T());function w(){if(d.strictSchema===!1){m.logger.warn(I());return}throw new Error(I());function I(){return`unknown format "${c}" ignored in schema at path "${f}"`}}function S(I){const $=I instanceof RegExp?(0,e.regexpCode)(I):d.code.formats?(0,e._)`${d.code.formats}${(0,e.getProperty)(c)}`:void 0,R=i.scopeValue("formats",{key:c,ref:I,code:$});return typeof I=="object"&&!(I instanceof RegExp)?[I.type||"string",I.validate,(0,e._)`${R}.validate`]:["string",I,R]}function T(){if(typeof p=="object"&&!(p instanceof RegExp)&&p.async){if(!h.$async)throw new Error("async format in sync schema");return(0,e._)`await ${v}(${a})`}return typeof k=="function"?(0,e._)`${v}(${a})`:(0,e._)`${v}.test(${a})`}}}};return qg.default=n,qg}var ZO;function Q1e(){if(ZO)return Hg;ZO=1,Object.defineProperty(Hg,"__esModule",{value:!0});const t=[Y1e().default];return Hg.default=t,Hg}var gc={},eL;function X1e(){return eL||(eL=1,Object.defineProperty(gc,"__esModule",{value:!0}),gc.contentVocabulary=gc.metadataVocabulary=void 0,gc.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],gc.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),gc}var tL;function Z1e(){if(tL)return sg;tL=1,Object.defineProperty(sg,"__esModule",{value:!0});const e=m1e(),t=T1e(),n=F1e(),r=U1e(),s=G1e(),i=J1e(),a=Q1e(),o=X1e(),c=[r.default,e.default,t.default,(0,n.default)(!0),a.default,o.metadataVocabulary,o.contentVocabulary,s.default,i.default];return sg.default=c,sg}var Gg={},Tf={},nL;function eke(){if(nL)return Tf;nL=1,Object.defineProperty(Tf,"__esModule",{value:!0}),Tf.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(Tf.DiscrError=e={})),Tf}var rL;function tke(){if(rL)return Gg;rL=1,Object.defineProperty(Gg,"__esModule",{value:!0});const e=et(),t=eke(),n=B1(),r=F1(),s=pt(),a={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:o,tagName:c}})=>o===t.DiscrError.Tag?`tag "${c}" must be string`:`value of tag "${c}" must be in oneOf`,params:({params:{discrError:o,tag:c,tagName:u}})=>(0,e._)`{error: ${o}, tag: ${u}, tagValue: ${c}}`},code(o){const{gen:c,data:u,schema:l,parentSchema:d,it:f}=o,{oneOf:h}=d;if(!f.opts.discriminator)throw new Error("discriminator: requires discriminator option");const m=l.propertyName;if(typeof m!="string")throw new Error("discriminator: requires propertyName");if(l.mapping)throw new Error("discriminator: mapping is not supported");if(!h)throw new Error("discriminator: requires oneOf keyword");const y=c.let("valid",!1),g=c.const("tag",(0,e._)`${u}${(0,e.getProperty)(m)}`);c.if((0,e._)`typeof ${g} == "string"`,()=>p(),()=>o.error(!1,{discrError:t.DiscrError.Tag,tag:g,tagName:m})),o.ok(y);function p(){const v=k();c.if(!1);for(const w in v)c.elseIf((0,e._)`${g} === ${w}`),c.assign(y,_(v[w]));c.else(),o.error(!1,{discrError:t.DiscrError.Mapping,tag:g,tagName:m}),c.endIf()}function _(v){const w=c.name("valid"),S=o.subschema({keyword:"oneOf",schemaProp:v},w);return o.mergeEvaluated(S,e.Name),w}function k(){var v;const w={},S=I(d);let T=!0;for(let z=0;z<h.length;z++){let V=h[z];if(V?.$ref&&!(0,s.schemaHasRulesButRef)(V,f.self.RULES)){const G=V.$ref;if(V=n.resolveRef.call(f.self,f.schemaEnv.root,f.baseId,G),V instanceof n.SchemaEnv&&(V=V.schema),V===void 0)throw new r.default(f.opts.uriResolver,f.baseId,G)}const H=(v=V?.properties)===null||v===void 0?void 0:v[m];if(typeof H!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${m}"`);T=T&&(S||I(V)),$(H,z)}if(!T)throw new Error(`discriminator: "${m}" must be required`);return w;function I({required:z}){return Array.isArray(z)&&z.includes(m)}function $(z,V){if(z.const)R(z.const,V);else if(z.enum)for(const H of z.enum)R(H,V);else throw new Error(`discriminator: "properties/${m}" must have "const" or "enum"`)}function R(z,V){if(typeof z!="string"||z in w)throw new Error(`discriminator: "${m}" values must be unique strings`);w[z]=V}}}};return Gg.default=a,Gg}var Kg={};const nke="https://json-schema.org/draft/2020-12/schema",rke="https://json-schema.org/draft/2020-12/schema",ske={"https://json-schema.org/draft/2020-12/vocab/core":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},ike="meta",ake="Core and Validation specifications meta-schema",oke=[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],cke=["object","boolean"],uke="This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",lke={definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:!0,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}},dke={$schema:nke,$id:rke,$vocabulary:ske,$dynamicAnchor:ike,title:ake,allOf:oke,type:cke,$comment:uke,properties:lke},fke="https://json-schema.org/draft/2020-12/schema",hke="https://json-schema.org/draft/2020-12/meta/applicator",mke={"https://json-schema.org/draft/2020-12/vocab/applicator":!0},pke="meta",gke="Applicator vocabulary meta-schema",bke=["object","boolean"],yke={prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},_ke={schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}},kke={$schema:fke,$id:hke,$vocabulary:mke,$dynamicAnchor:pke,title:gke,type:bke,properties:yke,$defs:_ke},Eke="https://json-schema.org/draft/2020-12/schema",wke="https://json-schema.org/draft/2020-12/meta/unevaluated",Ske={"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0},vke="meta",xke="Unevaluated applicator vocabulary meta-schema",Tke=["object","boolean"],Ike={unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}},Ake={$schema:Eke,$id:wke,$vocabulary:Ske,$dynamicAnchor:vke,title:xke,type:Tke,properties:Ike},Cke="https://json-schema.org/draft/2020-12/schema",Pke="https://json-schema.org/draft/2020-12/meta/content",Nke={"https://json-schema.org/draft/2020-12/vocab/content":!0},Rke="meta",Oke="Content vocabulary meta-schema",Lke=["object","boolean"],Dke={contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}},$ke={$schema:Cke,$id:Pke,$vocabulary:Nke,$dynamicAnchor:Rke,title:Oke,type:Lke,properties:Dke},Mke="https://json-schema.org/draft/2020-12/schema",jke="https://json-schema.org/draft/2020-12/meta/core",Fke={"https://json-schema.org/draft/2020-12/vocab/core":!0},Bke="meta",zke="Core vocabulary meta-schema",Uke=["object","boolean"],Vke={$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},Hke={anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}},qke={$schema:Mke,$id:jke,$vocabulary:Fke,$dynamicAnchor:Bke,title:zke,type:Uke,properties:Vke,$defs:Hke},Gke="https://json-schema.org/draft/2020-12/schema",Kke="https://json-schema.org/draft/2020-12/meta/format-annotation",Wke={"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0},Jke="meta",Yke="Format vocabulary meta-schema for annotation results",Qke=["object","boolean"],Xke={format:{type:"string"}},Zke={$schema:Gke,$id:Kke,$vocabulary:Wke,$dynamicAnchor:Jke,title:Yke,type:Qke,properties:Xke},eEe="https://json-schema.org/draft/2020-12/schema",tEe="https://json-schema.org/draft/2020-12/meta/meta-data",nEe={"https://json-schema.org/draft/2020-12/vocab/meta-data":!0},rEe="meta",sEe="Meta-data vocabulary meta-schema",iEe=["object","boolean"],aEe={title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}},oEe={$schema:eEe,$id:tEe,$vocabulary:nEe,$dynamicAnchor:rEe,title:sEe,type:iEe,properties:aEe},cEe="https://json-schema.org/draft/2020-12/schema",uEe="https://json-schema.org/draft/2020-12/meta/validation",lEe={"https://json-schema.org/draft/2020-12/vocab/validation":!0},dEe="meta",fEe="Validation vocabulary meta-schema",hEe=["object","boolean"],mEe={type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]},const:!0,enum:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},pEe={nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},gEe={$schema:cEe,$id:uEe,$vocabulary:lEe,$dynamicAnchor:dEe,title:fEe,type:hEe,properties:mEe,$defs:pEe};var sL;function bEe(){if(sL)return Kg;sL=1,Object.defineProperty(Kg,"__esModule",{value:!0});const e=dke,t=kke,n=Ake,r=$ke,s=qke,i=Zke,a=oEe,o=gEe,c=["/properties"];function u(l){return[e,t,n,r,s,d(this,i),a,d(this,o)].forEach(f=>this.addMetaSchema(f,void 0,!1)),this;function d(f,h){return l?f.$dataMetaSchema(h,c):h}}return Kg.default=u,Kg}var iL;function yEe(){return iL||(iL=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv2020=void 0;const n=f1e(),r=Z1e(),s=tke(),i=bEe(),a="https://json-schema.org/draft/2020-12/schema";class o extends n.default{constructor(h={}){super({...h,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),r.default.forEach(h=>this.addVocabulary(h)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();const{$data:h,meta:m}=this.opts;m&&(i.default.call(this,h),this.refs["http://json-schema.org/schema"]=a)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}t.Ajv2020=o,e.exports=t=o,e.exports.Ajv2020=o,Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var c=j1();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var u=et();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var l=MA();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return l.default}});var d=F1();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return d.default}})})(Zp,Zp.exports)),Zp.exports}var _Ee=yEe();const kEe=t_(_Ee);new kEe({allErrors:!0,strict:!1,validateSchema:!1,allowUnionTypes:!0});class pBe extends ep("ToolInteractionPendingError"){}class gBe extends ep("ToolInteractionDeniedError"){}ec(ce({limit:Z(lt)}));ec(ce({namespaces:Qe(ce({namespace:D,displayName:Z(D),toolCount:Z(lt)}))}));ec(ce({namespace:Z(D),query:Z(D),limit:Z(lt),includeSchemas:Z(zt)}));ec(ce({results:Qe(ce({path:D,sourceKey:D,description:Z(D),interaction:Z(D),inputType:Z(D),outputType:Z(D),inputSchemaJson:Z(D),outputSchemaJson:Z(D),exampleInputJson:Z(D),exampleOutputJson:Z(D),providerKind:Z(D),providerDataJson:Z(D)}))}));ec(ce({path:D,includeSchemas:Z(zt)}));ec(ee(fp));ec(ce({query:D,limit:Z(lt),includeSchemas:Z(zt)}));const EEe=ce({path:D,score:lt,description:Z(D),interaction:Z(D),inputType:Z(D),outputType:Z(D),inputSchemaJson:Z(D),outputSchemaJson:Z(D)});ec(ce({bestPath:ee(D),results:Qe(EEe),total:lt}));class bBe extends ep("OpenApiToolInvocationError"){}const wEe=Re("openapi","graphql","persisted"),Vz=ce({path:D,sourceKey:D,title:Z(D),description:Z(D),providerKind:D,toolId:D,rawToolId:ee(D),operationId:ee(D),group:ee(D),leaf:ee(D),tags:Qe(D),method:ee(D1),pathTemplate:ee(D),inputType:Z(D),outputType:Z(D)}),SEe=ce({source:go,namespace:D,pipelineKind:wEe,toolCount:lt,rawDocumentText:ee(D),manifestJson:ee(D),definitionsJson:ee(D),tools:Qe(Vz)}),vEe=ce({summary:Vz,definitionJson:ee(D),documentationJson:ee(D),providerDataJson:ee(D),inputSchemaJson:ee(D),outputSchemaJson:ee(D),exampleInputJson:ee(D),exampleOutputJson:ee(D)}),xEe=ce({query:D,limit:Z(lt)}),TEe=ce({path:D,score:lt,description:Z(D),inputType:Z(D),outputType:Z(D),reasons:Qe(D)}),IEe=ce({query:D,queryTokens:Qe(D),bestPath:ee(D),total:lt,results:Qe(TEe)});class Ve extends Kd()("ControlPlaneBadRequestError",{operation:D,message:D,details:D},Ei({status:400})){}class ot extends Kd()("ControlPlaneUnauthorizedError",{operation:D,message:D,details:D},Ei({status:401})){}class ct extends Kd()("ControlPlaneForbiddenError",{operation:D,message:D,details:D},Ei({status:403})){}class _t extends Kd()("ControlPlaneNotFoundError",{operation:D,message:D,details:D},Ei({status:404})){}class Ue extends Kd()("ControlPlaneStorageError",{operation:D,message:D,details:D},Ei({status:500})){}const Ms=zfe.pipe(Ffe()),Eu=Z(Ms),AEe=ce({code:Ms}),CEe=ce({responseJson:Z(D)}),OE=Sr("workspaceId",mn),aL=Sr("executionId",C1);class PEe extends nc("executions").add(Kr("create")`/workspaces/${OE}/executions`.setPayload(AEe).addSuccess(_E).addError(Ve).addError(ot).addError(ct).addError(_t).addError(Ue)).add(En("get")`/workspaces/${OE}/executions/${aL}`.addSuccess(_E).addError(Ve).addError(ot).addError(ct).addError(_t).addError(Ue)).add(Kr("resume")`/workspaces/${OE}/executions/${aL}/resume`.setPayload(CEe).addSuccess(_E).addError(Ve).addError(ot).addError(ct).addError(_t).addError(Ue)).prefix("/v1"){}const NEe=ce({id:D,name:D,canStore:zt}),REe=ce({platform:D,secretProviders:Qe(NEe),defaultSecretStoreProvider:D}),OEe=ce({sourceId:D,sourceName:D}),LEe=ce({id:D,name:ee(D),purpose:D,createdAt:lt,updatedAt:lt,linkedSources:Qe(OEe)}),DEe=ce({name:D,value:D,purpose:Z(yz)}),$Ee=ce({id:D,name:ee(D),providerId:D,purpose:D,createdAt:lt,updatedAt:lt}),MEe=ce({name:Z(D),value:Z(D)}),jEe=ce({id:D,name:ee(D),purpose:D,createdAt:lt,updatedAt:lt}),FEe=ce({removed:zt});class BEe extends nc("local").add(En("installation")`/local/installation`.addSuccess(h_e).addError(Ve).addError(_t).addError(Ue)).add(En("config")`/local/config`.addSuccess(REe)).add(En("listSecrets")`/local/secrets`.addSuccess(Qe(LEe)).addError(Ue)).add(Kr("createSecret")`/local/secrets`.setPayload(DEe).addSuccess($Ee).addError(Ve).addError(Ue)).add(_u("updateSecret")`/local/secrets/${Sr("secretId",D)}`.setPayload(MEe).addSuccess(jEe).addError(Ve).addError(_t).addError(Ue)).add(ku("deleteSecret")`/local/secrets/${Sr("secretId",D)}`.addSuccess(FEe).addError(_t).addError(Ue)).prefix("/v1"){}const zEe=mz.pipe(GI("accountId","role")),UEe=mz.pipe(GI("status","billable","invitedByAccountId"),VB({exact:!0})),VEe=y1(zEe,UEe),HEe=Dye.pipe(GI("role","status","billable"),VB({exact:!0})),Wg=Sr("organizationId",Ka),oL=Sr("accountId",ks);class qEe extends nc("memberships").add(En("list")`/organizations/${Wg}/memberships`.addSuccess(Qe(yE)).addError(Ve).addError(ot).addError(ct).addError(_t).addError(Ue)).add(Kr("create")`/organizations/${Wg}/memberships`.setPayload(VEe).addSuccess(yE).addError(Ve).addError(ot).addError(ct).addError(_t).addError(Ue)).add(_u("update")`/organizations/${Wg}/memberships/${oL}`.setPayload(HEe).addSuccess(yE).addError(Ve).addError(ot).addError(ct).addError(_t).addError(Ue)).add(ku("remove")`/organizations/${Wg}/memberships/${oL}`.addSuccess(ce({removed:zt})).addError(Ve).addError(ot).addError(ct).addError(_t).addError(Ue)).prefix("/v1"){}const GEe=Sr("workspaceId",mn),KEe=f8({contentType:"text/html"}),WEe=ce({provider:Re("mcp"),name:Z(ee(D)),endpoint:Ms,transport:Z(ac),queryParams:Z(ee(Xr)),headers:Z(ee(Xr))}),JEe=ce({sessionId:A1,authorizationUrl:D});ce({sessionId:A1,auth:ce({kind:Re("oauth2"),headerName:D,prefix:D,accessToken:Co,refreshToken:ee(Co)})});const YEe=ce({state:D,code:Z(D),error:Z(D),error_description:Z(D)});class QEe extends nc("oauth").add(Kr("startSourceAuth")`/workspaces/${GEe}/oauth/source-auth/start`.setPayload(WEe).addSuccess(JEe).addError(Ve).addError(ot).addError(ct).addError(Ue)).add(En("sourceAuthCallback")`/oauth/source-auth/callback`.setUrlParams(YEe).addSuccess(KEe).addError(Ve).addError(Ue)).prefix("/v1"){}const XEe=ce({name:Ms,slug:Eu}),ZEe=ce({name:Eu,status:Z(hz)}),LE=Sr("organizationId",Ka);class ewe extends nc("organizations").add(En("list")`/organizations`.addSuccess(Qe(Jp)).addError(Ve).addError(ot).addError(ct).addError(Ue)).add(Kr("create")`/organizations`.setPayload(XEe).addSuccess(Jp).addError(Ve).addError(ot).addError(ct).addError(Ue)).add(En("get")`/organizations/${LE}`.addSuccess(Jp).addError(Ve).addError(ot).addError(ct).addError(_t).addError(Ue)).add(_u("update")`/organizations/${LE}`.setPayload(ZEe).addSuccess(Jp).addError(Ve).addError(ot).addError(ct).addError(_t).addError(Ue)).add(ku("remove")`/organizations/${LE}`.addSuccess(ce({removed:zt})).addError(Ve).addError(ot).addError(ct).addError(Ue)).prefix("/v1"){}const cL=ce({resourceType:Z(yA),resourcePattern:Eu,matchType:Z(_A),effect:Z(kA),approvalMode:Z(EA),argumentConditionsJson:Z(ee(D)),priority:Z(lt),enabled:Z(zt),targetAccountId:Z(ee(ks)),clientId:Z(ee(D))}),uL=ce({resourceType:Z(yA),resourcePattern:Eu,matchType:Z(_A),effect:Z(kA),approvalMode:Z(EA),argumentConditionsJson:Z(ee(D)),priority:Z(lt),enabled:Z(zt),targetAccountId:Z(ee(ks)),clientId:Z(ee(D))}),If=Sr("organizationId",Ka),Af=Sr("workspaceId",mn),il=Sr("policyId",fz);class twe extends nc("policies").add(En("listOrganization")`/organizations/${If}/policies`.addSuccess(Qe(Ya)).addError(Ve).addError(ot).addError(ct).addError(_t).addError(Ue)).add(Kr("createOrganization")`/organizations/${If}/policies`.setPayload(cL).addSuccess(Ya).addError(Ve).addError(ot).addError(ct).addError(_t).addError(Ue)).add(En("getOrganization")`/organizations/${If}/policies/${il}`.addSuccess(Ya).addError(Ve).addError(ot).addError(ct).addError(_t).addError(Ue)).add(_u("updateOrganization")`/organizations/${If}/policies/${il}`.setPayload(uL).addSuccess(Ya).addError(Ve).addError(ot).addError(ct).addError(_t).addError(Ue)).add(ku("removeOrganization")`/organizations/${If}/policies/${il}`.addSuccess(ce({removed:zt})).addError(Ve).addError(ot).addError(ct).addError(_t).addError(Ue)).add(En("list")`/workspaces/${Af}/policies`.addSuccess(Qe(Ya)).addError(Ve).addError(ot).addError(ct).addError(_t).addError(Ue)).add(Kr("create")`/workspaces/${Af}/policies`.setPayload(cL).addSuccess(Ya).addError(Ve).addError(ot).addError(ct).addError(_t).addError(Ue)).add(En("get")`/workspaces/${Af}/policies/${il}`.addSuccess(Ya).addError(Ve).addError(ot).addError(ct).addError(_t).addError(Ue)).add(_u("update")`/workspaces/${Af}/policies/${il}`.setPayload(uL).addSuccess(Ya).addError(Ve).addError(ot).addError(ct).addError(_t).addError(Ue)).add(ku("remove")`/workspaces/${Af}/policies/${il}`.addSuccess(ce({removed:zt})).addError(Ve).addError(ot).addError(ct).addError(_t).addError(Ue)).prefix("/v1"){}const nwe=ce({name:Ms,kind:Ep,endpoint:Ms}),rwe=ce({status:Z(wp),enabled:Z(zt),namespace:Z(ee(D)),transport:Z(ee(ac)),queryParams:Z(ee(Xr)),headers:Z(ee(Xr)),specUrl:Z(ee(D)),defaultHeaders:Z(ee(Xr)),auth:Z(bA),sourceHash:Z(ee(D)),lastError:Z(ee(D))}),swe=y1(nwe,rwe),iwe=ce({name:Eu,kind:Z(Ep),endpoint:Eu,status:Z(wp),enabled:Z(zt),namespace:Z(ee(D)),transport:Z(ee(ac)),queryParams:Z(ee(Xr)),headers:Z(ee(Xr)),specUrl:Z(ee(D)),defaultHeaders:Z(ee(Xr)),auth:Z(bA),sourceHash:Z(ee(D)),lastError:Z(ee(D))}),xs=Sr("workspaceId",mn),pa=Sr("sourceId",ic),awe=Sr("toolPath",D),lL=ce({interactionId:hA}),owe=ce({action:Z(Re("submit","continue","cancel")),token:Z(D)}),cwe=ce({state:D,code:Z(D),error:Z(D),error_description:Z(D)}),uwe=ce({url:Ms,probeAuth:Z(zye)}),lwe=ce({kind:Re("bearer"),headerName:Z(ee(D)),prefix:Z(ee(D)),token:Z(ee(D)),tokenRef:Z(ee(Co))}),dwe=ce({kind:Re("oauth2"),headerName:Z(ee(D)),prefix:Z(ee(D)),accessToken:Z(ee(D)),accessTokenRef:Z(ee(Co)),refreshToken:Z(ee(D)),refreshTokenRef:Z(ee(Co))}),dL=Hs(ce({kind:Re("none")}),lwe,dwe),fwe=Hs(ce({kind:Re("openapi"),endpoint:Ms,specUrl:Ms,name:Z(ee(D)),namespace:Z(ee(D)),auth:Z(dL)}),ce({kind:Re("graphql"),endpoint:Ms,name:Z(ee(D)),namespace:Z(ee(D)),auth:Z(dL)}),ce({kind:Re("mcp"),endpoint:Ms,name:Z(ee(D)),namespace:Z(ee(D)),transport:Z(ee(ac)),queryParams:Z(ee(Xr)),headers:Z(ee(Xr))})),hwe=Hs(ce({kind:Re("connected"),source:go}),ce({kind:Re("credential_required"),source:go}),ce({kind:Re("oauth_required"),source:go,sessionId:A1,authorizationUrl:D})),DE=f8({contentType:"text/html"});class mwe extends nc("sources").add(Kr("discover")`/sources/discover`.setPayload(uwe).addSuccess(Vye).addError(Ve).addError(ot).addError(ct)).add(Kr("connect")`/workspaces/${xs}/sources/connect`.setPayload(fwe).addSuccess(hwe).addError(Ve).addError(ot).addError(ct).addError(Ue)).add(En("list")`/workspaces/${xs}/sources`.addSuccess(Qe(go)).addError(Ve).addError(ot).addError(ct).addError(Ue)).add(Kr("create")`/workspaces/${xs}/sources`.setPayload(swe).addSuccess(go).addError(Ve).addError(ot).addError(ct).addError(Ue)).add(En("get")`/workspaces/${xs}/sources/${pa}`.addSuccess(go).addError(Ve).addError(ot).addError(ct).addError(_t).addError(Ue)).add(_u("update")`/workspaces/${xs}/sources/${pa}`.setPayload(iwe).addSuccess(go).addError(Ve).addError(ot).addError(ct).addError(_t).addError(Ue)).add(ku("remove")`/workspaces/${xs}/sources/${pa}`.addSuccess(ce({removed:zt})).addError(Ve).addError(ot).addError(ct).addError(Ue)).add(En("credentialPage")`/workspaces/${xs}/sources/${pa}/credentials`.setUrlParams(lL).addSuccess(DE).addError(Ve).addError(_t).addError(Ue)).add(Kr("credentialSubmit")`/workspaces/${xs}/sources/${pa}/credentials`.setUrlParams(lL).setPayload(owe).addSuccess(DE).addError(Ve).addError(_t).addError(Ue)).add(En("credentialComplete")`/workspaces/${xs}/sources/${pa}/credentials/oauth/complete`.setUrlParams(cwe).addSuccess(DE).addError(Ve).addError(_t).addError(Ue)).add(En("inspection")`/workspaces/${xs}/sources/${pa}/inspection`.addSuccess(SEe).addError(Ve).addError(ot).addError(ct).addError(_t).addError(Ue)).add(En("inspectionTool")`/workspaces/${xs}/sources/${pa}/tools/${awe}/inspection`.addSuccess(vEe).addError(Ve).addError(ot).addError(ct).addError(_t).addError(Ue)).add(Kr("inspectionDiscover")`/workspaces/${xs}/sources/${pa}/inspection/discover`.setPayload(xEe).addSuccess(IEe).addError(Ve).addError(ot).addError(ct).addError(_t).addError(Ue)).prefix("/v1"){}const pwe=ce({name:Ms}),gwe=ce({name:Eu}),fL=Sr("organizationId",Ka),$E=Sr("workspaceId",mn);class bwe extends nc("workspaces").add(En("list")`/organizations/${fL}/workspaces`.addSuccess(Qe(Yp)).addError(Ve).addError(ot).addError(ct).addError(_t).addError(Ue)).add(Kr("create")`/organizations/${fL}/workspaces`.setPayload(pwe).addSuccess(Yp).addError(Ve).addError(ot).addError(ct).addError(_t).addError(Ue)).add(En("get")`/workspaces/${$E}`.addSuccess(Yp).addError(Ve).addError(ot).addError(ct).addError(_t).addError(Ue)).add(_u("update")`/workspaces/${$E}`.setPayload(gwe).addSuccess(Yp).addError(Ve).addError(ot).addError(ct).addError(_t).addError(Ue)).add(ku("remove")`/workspaces/${$E}`.addSuccess(ce({removed:zt})).addError(Ve).addError(ot).addError(ct).addError(Ue)).prefix("/v1"){}class Hz extends dme().add(BEe).add(QEe).add(ewe).add(qEe).add(bwe).add(mwe).add(twe).add(PEe).annotateContext(Dge({title:"Executor Control Plane API",description:"CRUD control plane for organizations, workspaces, sources, and policies"})){}$ge(Hz);const ywe={accountId:"x-executor-account-id"},_we=e=>{const t=e.accountId;return Gpe(Hz,{baseUrl:e.baseUrl,transformClient:t?n=>n.pipe(I8($pe(ywe.accountId,t))):void 0}).pipe(dm(Age))},kwe="http://127.0.0.1:8788",Ewe="ws_placeholder",wwe="acc_placeholder",z1="src_placeholder";let hL=typeof window<"u"&&typeof window.location?.origin=="string"?window.location.origin:kwe;const qz=O.createContext(null),U1=e=>JSON.stringify(e),Fi=e=>JSON.parse(e),wu=(e,t,n)=>U1([e,t,n]),yd=(e,t,n,r)=>U1([e,t,n,r]),Gz=(e,t,n,r,s)=>U1([e,t,n,r,s]),Swe=(e,t,n,r,s,i)=>U1([e,t,n,r,s,i]),vwe=e=>new Error(Xm(e)),xwe=e=>e instanceof Error?e:new Error(String(e)),Twe=()=>{if(typeof window>"u")return!1;const e=window.location.hostname;return e==="localhost"||e==="127.0.0.1"},Kz=e=>{if(Boe(e)){const t=e[Foe];return{name:e.name,message:e.message,cause:Xm(t)}}return e instanceof Error?{name:e.name,message:e.message,stack:e.stack}:{message:String(e)}},Wz=(e,t)=>{Twe()&&console.error(`[executor react] ${e}`,t)},ia=async e=>{const t=e.accountId,n=await Ooe(_we({baseUrl:hL,...t!==void 0?{accountId:t}:{}}).pipe(Le(e.execute)));if(qT(n))return n.value;const r=C4(n.cause);throw Wz("control-plane request failed",{baseUrl:hL,accountId:t,error:Kz(r),cause:Xm(n.cause)}),r},oc=e=>Vl({try:()=>ia(e),catch:xwe}),Iwe=qa(oc({execute:e=>e.local.installation({})})).pipe(Ga),Awe=qa(oc({execute:e=>e.local.config({})})).pipe(Ga),zA=qa(oc({execute:e=>e.local.listSecrets({})})).pipe(Ga),Ho=pp(e=>{const[t,n,r]=Fi(e);return qa(t?oc({accountId:r,execute:s=>s.sources.list({path:{workspaceId:n}})}):Jc).pipe(Ga)}),_d=pp(e=>{const[t,n,r,s]=Fi(e);return qa(t?oc({accountId:r,execute:i=>i.sources.get({path:{workspaceId:n,sourceId:s}})}):Jc).pipe(Ga)}),Jz=pp(e=>{const[t,n,r,s]=Fi(e);return qa(t?oc({accountId:r,execute:i=>i.sources.inspection({path:{workspaceId:n,sourceId:s}})}):Jc).pipe(Ga)}),UA=pp(e=>{const[t,n,r,s,i]=Fi(e);return qa(t&&i?oc({accountId:r,execute:a=>a.sources.inspectionTool({path:{workspaceId:n,sourceId:s,toolPath:i}})}):Dt(null)).pipe(Ga)}),Yz=pp(e=>{const[t,n,r,s,i,a]=Fi(e);return qa(t?i.trim().length===0?Dt({query:"",queryTokens:[],bestPath:null,total:0,results:[]}):oc({accountId:r,execute:o=>o.sources.inspectionDiscover({path:{workspaceId:n,sourceId:s},payload:{query:i,...a!==null?{limit:a}:{}}})}):Jc).pipe(Ga)}),Cwe=e=>yu(e)?{status:"ready",data:e.value}:n8(e)?{status:"error",error:vwe(e.cause)}:{status:"loading"},vp=e=>{if(e.status==="loading")return{status:"loading"};if(e.status==="error")return{status:"error",error:e.error};throw new Error("Expected workspace loadable to be pending or errored")},cc=e=>{const t=Sge(e);return O.useMemo(()=>Cwe(t),[t])},Pwe=()=>{const e=cc(Iwe);return O.useMemo(()=>e.status!=="ready"?e:{status:"ready",data:{installation:e.data,workspaceId:e.data.workspaceId,accountId:e.data.accountId}},[e])},Mu=()=>{const e=Pwe(),t=e.status==="ready",n=t?e.data.workspaceId:Ewe,r=t?e.data.accountId:wwe;return O.useMemo(()=>({workspace:e,enabled:t,workspaceId:n,accountId:r}),[r,t,e,n])},tu=(e,t)=>{const n=e.getNodes().get(t)??null;if(n===null||typeof n.valueOption!="function")return;const r=n.valueOption();if(r._tag!=="Some")return;const s=r;if(yu(s.value))return s.value.value},Gr=(e,t,n)=>{const r=e.ensureNode;typeof r=="function"&&r.call(e,t).setValue(Vo(n))},Nwe=()=>({sourceLists:new Set,sources:new Set,inspections:new Set,toolDetails:new Set,discoveries:new Set}),Cf=(e,t,n,r)=>!(e?.workspaceId!==void 0&&e.workspaceId!==t||e?.accountId!==void 0&&e.accountId!==n||e?.sourceId!==void 0&&e.sourceId!==r),Rwe=(e,t,n)=>{t.sourceLists.forEach(r=>{const[s,i,a]=Fi(r);s&&Cf(n,i,a)&&e.refresh(Ho(r))}),t.sources.forEach(r=>{const[s,i,a,o]=Fi(r);s&&Cf(n,i,a,o)&&e.refresh(_d(r))}),t.inspections.forEach(r=>{const[s,i,a,o]=Fi(r);s&&Cf(n,i,a,o)&&e.refresh(Jz(r))}),t.toolDetails.forEach(r=>{const[s,i,a,o]=Fi(r);s&&Cf(n,i,a,o)&&e.refresh(UA(r))}),t.discoveries.forEach(r=>{const[s,i,a,o]=Fi(r);s&&Cf(n,i,a,o)&&e.refresh(Yz(r))})},Qz=()=>{const e=O.useContext(qz);if(e===null)throw new Error("ExecutorReactProvider is missing from the React tree");return e},xp=(e,t,n)=>{const{activeQueries:r}=Qz();O.useEffect(()=>{if(!n)return;const s=r[e];return s.add(t),()=>{s.delete(t)}},[r,e,n,t])},vy=(e,t)=>{const n=e.findIndex(s=>s.id===t.id);if(n===-1)return[t,...e];const r=e.slice();return r[n]=t,r},Owe=(e,t)=>e.filter(n=>n.id!==t),Lwe=e=>{const t=Date.now();return{id:`src_optimistic_${crypto.randomUUID()}`,workspaceId:e.workspaceId,name:e.payload.name,kind:e.payload.kind,endpoint:e.payload.endpoint,status:e.payload.status??"draft",enabled:e.payload.enabled??!0,namespace:e.payload.namespace??null,transport:e.payload.transport??null,queryParams:e.payload.queryParams??null,headers:e.payload.headers??null,specUrl:e.payload.specUrl??null,defaultHeaders:e.payload.defaultHeaders??null,auth:e.payload.auth??{kind:"none"},sourceHash:e.payload.sourceHash??null,lastError:e.payload.lastError??null,createdAt:t,updatedAt:t}},Dwe=(e,t)=>({...e,name:t.name??e.name,kind:t.kind??e.kind,endpoint:t.endpoint??e.endpoint,status:t.status??e.status,enabled:t.enabled??e.enabled,namespace:t.namespace!==void 0?t.namespace:e.namespace,transport:t.transport!==void 0?t.transport:e.transport,queryParams:t.queryParams!==void 0?t.queryParams:e.queryParams,headers:t.headers!==void 0?t.headers:e.headers,specUrl:t.specUrl!==void 0?t.specUrl:e.specUrl,defaultHeaders:t.defaultHeaders!==void 0?t.defaultHeaders:e.defaultHeaders,auth:t.auth!==void 0?t.auth:e.auth,sourceHash:t.sourceHash!==void 0?t.sourceHash:e.sourceHash,lastError:t.lastError!==void 0?t.lastError:e.lastError,updatedAt:Date.now()}),Yd=(e,t)=>{const n=Mu(),{registry:r,invalidateQueries:s}=Qz(),[i,a]=O.useState({status:"idle",data:null,error:null}),o=O.useCallback(async u=>{if(!n.enabled){const m=new Error("Executor workspace context is not ready");throw a({status:"error",data:null,error:m}),m}const l={workspaceId:n.workspaceId,accountId:n.accountId,registry:r,invalidateQueries:s};a(m=>({status:"pending",data:m.data,error:null}));const d=t?.optimisticUpdate?.(l,u),f=typeof d=="function"?d:d?.rollback,h=typeof d=="function"?void 0:d?.value;try{const m=await e({workspaceId:n.workspaceId,accountId:n.accountId,payload:u});return t?.onSuccess?.(l,u,m,h),a({status:"success",data:m,error:null}),m}catch(m){f?.(),Wz("source mutation failed",{workspaceId:n.workspaceId,accountId:n.accountId,payload:u,error:Kz(m),cause:m});const y=m instanceof Error?m:new Error(String(m));throw a({status:"error",data:null,error:y}),y}},[e,s,t,r,n.accountId,n.enabled,n.workspaceId]),c=O.useCallback(()=>{a({status:"idle",data:null,error:null})},[]);return O.useMemo(()=>({...i,mutateAsync:o,reset:c}),[o,c,i])},$we=e=>{const t=O.useContext(Wd),n=O.useMemo(Nwe,[]),r=O.useCallback(i=>{Rwe(t,n,i)},[n,t]),s=O.useMemo(()=>({registry:t,activeQueries:n,invalidateQueries:r}),[n,r,t]);return O.createElement(qz.Provider,{value:s},e.children)},Mwe=e=>O.createElement(kge,null,O.createElement($we,null,e.children)),jwe=()=>cc(Awe),VA=()=>cc(zA),Xz=()=>{const e=O.useContext(Wd);return O.useCallback(()=>{e.refresh(zA)},[e])},HA=e=>{const t=O.useContext(Wd),[n,r]=O.useState({status:"idle",data:null,error:null}),s=O.useCallback(async a=>{r(o=>({status:"pending",data:o.data,error:null}));try{const o=await e(a);return t.refresh(zA),r({status:"success",data:o,error:null}),o}catch(o){const c=o instanceof Error?o:new Error(String(o));throw r({status:"error",data:null,error:c}),c}},[e,t]),i=O.useCallback(()=>{r({status:"idle",data:null,error:null})},[]);return O.useMemo(()=>({...n,mutateAsync:s,reset:i}),[s,i,n])},qA=()=>HA(O.useCallback(e=>ia({execute:t=>t.local.createSecret({payload:e})}),[])),Fwe=()=>HA(O.useCallback(e=>ia({execute:t=>t.local.updateSecret({path:{secretId:e.secretId},payload:e.payload})}),[])),Bwe=()=>HA(O.useCallback(e=>ia({execute:t=>t.local.deleteSecret({path:{secretId:e}})}),[])),Zz=()=>{const e=Mu(),t=wu(e.enabled,e.workspaceId,e.accountId);xp("sourceLists",t,e.enabled);const n=cc(Ho(t));return e.enabled?n:vp(e.workspace)},zwe=e=>{const t=Mu(),n=t.enabled?e:z1,r=yd(t.enabled,t.workspaceId,t.accountId,n);xp("sources",r,t.enabled);const s=cc(_d(r));return t.enabled?s:vp(t.workspace)},Uwe=e=>{const t=Mu(),n=t.enabled?e:z1,r=yd(t.enabled,t.workspaceId,t.accountId,n);xp("inspections",r,t.enabled);const s=cc(Jz(r));return t.enabled?s:vp(t.workspace)},Vwe=(e,t)=>{const n=Mu(),r=n.enabled?e:z1,s=Gz(n.enabled,n.workspaceId,n.accountId,r,t);xp("toolDetails",s,n.enabled&&t!==null);const i=cc(UA(s));return n.enabled?i:vp(n.workspace)},Hwe=e=>{const t=Mu(),n=t.enabled?e.sourceId:z1,r=Swe(t.enabled,t.workspaceId,t.accountId,n,e.query,e.limit??null);xp("discoveries",r,t.enabled);const s=cc(Yz(r));return t.enabled?s:vp(t.workspace)},qwe=()=>{const e=O.useContext(Wd),t=Mu();return O.useCallback((n,r)=>{if(!t.enabled)return()=>{};const s=n,i=UA(Gz(t.enabled,t.workspaceId,t.accountId,s,r));return e.mount(i)},[e,t.accountId,t.enabled,t.workspaceId])},Gwe=()=>Yd(O.useCallback(({workspaceId:e,accountId:t,payload:n})=>ia({accountId:t,execute:r=>r.sources.create({path:{workspaceId:e},payload:n})}),[]),{optimisticUpdate:(e,t)=>{const n=Ho(wu(!0,e.workspaceId,e.accountId)),r=tu(e.registry,n);if(r===void 0)return;const s=Lwe({workspaceId:e.workspaceId,payload:t});return Gr(e.registry,n,[s,...r]),{value:s,rollback:()=>{Gr(e.registry,n,r)}}},onSuccess:(e,t,n,r)=>{const s=Ho(wu(!0,e.workspaceId,e.accountId)),i=tu(e.registry,s);if(i!==void 0){const a=r?i.filter(o=>o.id!==r.id):i;Gr(e.registry,s,vy(a,n))}Gr(e.registry,_d(yd(!0,e.workspaceId,e.accountId,n.id)),n),e.invalidateQueries({workspaceId:e.workspaceId,accountId:e.accountId})}}),Kwe=()=>Yd(O.useCallback(({workspaceId:e,accountId:t,payload:n})=>ia({accountId:t,execute:r=>r.sources.update({path:{workspaceId:e,sourceId:n.sourceId},payload:n.payload})}),[]),{optimisticUpdate:(e,t)=>{const n=Ho(wu(!0,e.workspaceId,e.accountId)),r=_d(yd(!0,e.workspaceId,e.accountId,t.sourceId)),s=tu(e.registry,n),i=tu(e.registry,r)??s?.find(o=>o.id===t.sourceId);if(i===void 0)return;const a=Dwe(i,t.payload);return s!==void 0&&Gr(e.registry,n,vy(s,a)),Gr(e.registry,r,a),()=>{s!==void 0&&Gr(e.registry,n,s),Gr(e.registry,r,i)}},onSuccess:(e,t,n)=>{const r=Ho(wu(!0,e.workspaceId,e.accountId)),s=_d(yd(!0,e.workspaceId,e.accountId,t.sourceId)),i=tu(e.registry,r);i!==void 0&&Gr(e.registry,r,vy(i,n)),Gr(e.registry,s,n),e.invalidateQueries({workspaceId:e.workspaceId,accountId:e.accountId,sourceId:t.sourceId})}}),eU=()=>Yd(O.useCallback(({workspaceId:e,accountId:t,payload:n})=>ia({accountId:t,execute:r=>r.oauth.startSourceAuth({path:{workspaceId:e},payload:n})}),[])),Wwe=()=>Yd(O.useCallback(({workspaceId:e,accountId:t,payload:n})=>ia({accountId:t,execute:r=>r.sources.remove({path:{workspaceId:e,sourceId:n}})}),[]),{optimisticUpdate:(e,t)=>{const n=Ho(wu(!0,e.workspaceId,e.accountId)),r=tu(e.registry,n);if(r!==void 0)return Gr(e.registry,n,Owe(r,t)),()=>{Gr(e.registry,n,r)}},onSuccess:(e,t)=>{e.invalidateQueries({workspaceId:e.workspaceId,accountId:e.accountId,sourceId:t})}}),Jwe=()=>Yd(O.useCallback(({accountId:e,payload:t})=>ia({accountId:e,execute:n=>n.sources.discover({payload:t})}),[])),Ywe=()=>Yd(O.useCallback(({workspaceId:e,accountId:t,payload:n})=>ia({accountId:t,execute:r=>r.sources.connect({path:{workspaceId:e},payload:n})}),[]),{onSuccess:(e,t,n)=>{const r=Ho(wu(!0,e.workspaceId,e.accountId)),s=tu(e.registry,r);s!==void 0&&Gr(e.registry,r,vy(s,n.source)),Gr(e.registry,_d(yd(!0,e.workspaceId,e.accountId,n.source.id)),n.source),e.invalidateQueries({workspaceId:e.workspaceId,accountId:e.accountId})}});function tU(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=tU(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function V1(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=tU(e))&&(r&&(r+=" "),r+=t);return r}const Qwe=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Xwe=(e,t)=>({classGroupId:e,validator:t}),nU=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),xy="-",mL=[],Zwe="arbitrary..",eSe=e=>{const t=nSe(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return tSe(a);const o=a.split(xy),c=o[0]===""&&o.length>1?1:0;return rU(o,c,t)},getConflictingClassGroupIds:(a,o)=>{if(o){const c=r[a],u=n[a];return c?u?Qwe(u,c):c:u||mL}return n[a]||mL}}},rU=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const s=e[t],i=n.nextPart.get(s);if(i){const u=rU(e,t+1,i);if(u)return u}const a=n.validators;if(a===null)return;const o=t===0?e.join(xy):e.slice(t).join(xy),c=a.length;for(let u=0;u<c;u++){const l=a[u];if(l.validator(o))return l.classGroupId}},tSe=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?Zwe+r:void 0})(),nSe=e=>{const{theme:t,classGroups:n}=e;return rSe(n,t)},rSe=(e,t)=>{const n=nU();for(const r in e){const s=e[r];GA(s,n,r,t)}return n},GA=(e,t,n,r)=>{const s=e.length;for(let i=0;i<s;i++){const a=e[i];sSe(a,t,n,r)}},sSe=(e,t,n,r)=>{if(typeof e=="string"){iSe(e,t,n);return}if(typeof e=="function"){aSe(e,t,n,r);return}oSe(e,t,n,r)},iSe=(e,t,n)=>{const r=e===""?t:sU(t,e);r.classGroupId=n},aSe=(e,t,n,r)=>{if(cSe(e)){GA(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Xwe(n,e))},oSe=(e,t,n,r)=>{const s=Object.entries(e),i=s.length;for(let a=0;a<i;a++){const[o,c]=s[a];GA(c,sU(t,o),n,r)}},sU=(e,t)=>{let n=e;const r=t.split(xy),s=r.length;for(let i=0;i<s;i++){const a=r[i];let o=n.nextPart.get(a);o||(o=nU(),n.nextPart.set(a,o)),n=o}return n},cSe=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,uSe=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const s=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let a=n[i];if(a!==void 0)return a;if((a=r[i])!==void 0)return s(i,a),a},set(i,a){i in n?n[i]=a:s(i,a)}}},vv="!",pL=":",lSe=[],gL=(e,t,n,r,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:s}),dSe=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=s=>{const i=[];let a=0,o=0,c=0,u;const l=s.length;for(let y=0;y<l;y++){const g=s[y];if(a===0&&o===0){if(g===pL){i.push(s.slice(c,y)),c=y+1;continue}if(g==="/"){u=y;continue}}g==="["?a++:g==="]"?a--:g==="("?o++:g===")"&&o--}const d=i.length===0?s:s.slice(c);let f=d,h=!1;d.endsWith(vv)?(f=d.slice(0,-1),h=!0):d.startsWith(vv)&&(f=d.slice(1),h=!0);const m=u&&u>c?u-c:void 0;return gL(i,h,f,m)};if(t){const s=t+pL,i=r;r=a=>a.startsWith(s)?i(a.slice(s.length)):gL(lSe,!1,a,void 0,!0)}if(n){const s=r;r=i=>n({className:i,parseClassName:s})}return r},fSe=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let s=[];for(let i=0;i<n.length;i++){const a=n[i],o=a[0]==="[",c=t.has(a);o||c?(s.length>0&&(s.sort(),r.push(...s),s=[]),r.push(a)):s.push(a)}return s.length>0&&(s.sort(),r.push(...s)),r}},hSe=e=>({cache:uSe(e.cacheSize),parseClassName:dSe(e),sortModifiers:fSe(e),...eSe(e)}),mSe=/\s+/,pSe=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:i}=t,a=[],o=e.trim().split(mSe);let c="";for(let u=o.length-1;u>=0;u-=1){const l=o[u],{isExternal:d,modifiers:f,hasImportantModifier:h,baseClassName:m,maybePostfixModifierPosition:y}=n(l);if(d){c=l+(c.length>0?" "+c:c);continue}let g=!!y,p=r(g?m.substring(0,y):m);if(!p){if(!g){c=l+(c.length>0?" "+c:c);continue}if(p=r(m),!p){c=l+(c.length>0?" "+c:c);continue}g=!1}const _=f.length===0?"":f.length===1?f[0]:i(f).join(":"),k=h?_+vv:_,v=k+p;if(a.indexOf(v)>-1)continue;a.push(v);const w=s(p,g);for(let S=0;S<w.length;++S){const T=w[S];a.push(k+T)}c=l+(c.length>0?" "+c:c)}return c},gSe=(...e)=>{let t=0,n,r,s="";for(;t<e.length;)(n=e[t++])&&(r=iU(n))&&(s&&(s+=" "),s+=r);return s},iU=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=iU(e[r]))&&(n&&(n+=" "),n+=t);return n},bSe=(e,...t)=>{let n,r,s,i;const a=c=>{const u=t.reduce((l,d)=>d(l),e());return n=hSe(u),r=n.cache.get,s=n.cache.set,i=o,o(c)},o=c=>{const u=r(c);if(u)return u;const l=pSe(c,n);return s(c,l),l};return i=a,(...c)=>i(gSe(...c))},ySe=[],Pn=e=>{const t=n=>n[e]||ySe;return t.isThemeGetter=!0,t},aU=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,oU=/^\((?:(\w[\w-]*):)?(.+)\)$/i,_Se=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,kSe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ESe=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,wSe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,SSe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,vSe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Xa=e=>_Se.test(e),st=e=>!!e&&!Number.isNaN(Number(e)),Za=e=>!!e&&Number.isInteger(Number(e)),ME=e=>e.endsWith("%")&&st(e.slice(0,-1)),ga=e=>kSe.test(e),cU=()=>!0,xSe=e=>ESe.test(e)&&!wSe.test(e),KA=()=>!1,TSe=e=>SSe.test(e),ISe=e=>vSe.test(e),ASe=e=>!ve(e)&&!Te(e),CSe=e=>uc(e,dU,KA),ve=e=>aU.test(e),bc=e=>uc(e,fU,xSe),bL=e=>uc(e,MSe,st),PSe=e=>uc(e,mU,cU),NSe=e=>uc(e,hU,KA),yL=e=>uc(e,uU,KA),RSe=e=>uc(e,lU,ISe),Jg=e=>uc(e,pU,TSe),Te=e=>oU.test(e),Pf=e=>ju(e,fU),OSe=e=>ju(e,hU),_L=e=>ju(e,uU),LSe=e=>ju(e,dU),DSe=e=>ju(e,lU),Yg=e=>ju(e,pU,!0),$Se=e=>ju(e,mU,!0),uc=(e,t,n)=>{const r=aU.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ju=(e,t,n=!1)=>{const r=oU.exec(e);return r?r[1]?t(r[1]):n:!1},uU=e=>e==="position"||e==="percentage",lU=e=>e==="image"||e==="url",dU=e=>e==="length"||e==="size"||e==="bg-size",fU=e=>e==="length",MSe=e=>e==="number",hU=e=>e==="family-name",mU=e=>e==="number"||e==="weight",pU=e=>e==="shadow",jSe=()=>{const e=Pn("color"),t=Pn("font"),n=Pn("text"),r=Pn("font-weight"),s=Pn("tracking"),i=Pn("leading"),a=Pn("breakpoint"),o=Pn("container"),c=Pn("spacing"),u=Pn("radius"),l=Pn("shadow"),d=Pn("inset-shadow"),f=Pn("text-shadow"),h=Pn("drop-shadow"),m=Pn("blur"),y=Pn("perspective"),g=Pn("aspect"),p=Pn("ease"),_=Pn("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],v=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],w=()=>[...v(),Te,ve],S=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],I=()=>[Te,ve,c],$=()=>[Xa,"full","auto",...I()],R=()=>[Za,"none","subgrid",Te,ve],z=()=>["auto",{span:["full",Za,Te,ve]},Za,Te,ve],V=()=>[Za,"auto",Te,ve],H=()=>["auto","min","max","fr",Te,ve],G=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Q=()=>["start","end","center","stretch","center-safe","end-safe"],re=()=>["auto",...I()],me=()=>[Xa,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...I()],ke=()=>[Xa,"screen","full","dvw","lvw","svw","min","max","fit",...I()],tt=()=>[Xa,"screen","full","lh","dvh","lvh","svh","min","max","fit",...I()],C=()=>[e,Te,ve],M=()=>[...v(),_L,yL,{position:[Te,ve]}],K=()=>["no-repeat",{repeat:["","x","y","space","round"]}],A=()=>["auto","cover","contain",LSe,CSe,{size:[Te,ve]}],P=()=>[ME,Pf,bc],B=()=>["","none","full",u,Te,ve],J=()=>["",st,Pf,bc],be=()=>["solid","dashed","dotted","double"],ge=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ee=()=>[st,ME,_L,yL],Oe=()=>["","none",m,Te,ve],q=()=>["none",st,Te,ve],W=()=>["none",st,Te,ve],se=()=>[st,Te,ve],le=()=>[Xa,"full",...I()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ga],breakpoint:[ga],color:[cU],container:[ga],"drop-shadow":[ga],ease:["in","out","in-out"],font:[ASe],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ga],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ga],shadow:[ga],spacing:["px",st],text:[ga],"text-shadow":[ga],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Xa,ve,Te,g]}],container:["container"],columns:[{columns:[st,ve,Te,o]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:w()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:$()}],"inset-x":[{"inset-x":$()}],"inset-y":[{"inset-y":$()}],start:[{"inset-s":$(),start:$()}],end:[{"inset-e":$(),end:$()}],"inset-bs":[{"inset-bs":$()}],"inset-be":[{"inset-be":$()}],top:[{top:$()}],right:[{right:$()}],bottom:[{bottom:$()}],left:[{left:$()}],visibility:["visible","invisible","collapse"],z:[{z:[Za,"auto",Te,ve]}],basis:[{basis:[Xa,"full","auto",o,...I()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[st,Xa,"auto","initial","none",ve]}],grow:[{grow:["",st,Te,ve]}],shrink:[{shrink:["",st,Te,ve]}],order:[{order:[Za,"first","last","none",Te,ve]}],"grid-cols":[{"grid-cols":R()}],"col-start-end":[{col:z()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":R()}],"row-start-end":[{row:z()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":H()}],"auto-rows":[{"auto-rows":H()}],gap:[{gap:I()}],"gap-x":[{"gap-x":I()}],"gap-y":[{"gap-y":I()}],"justify-content":[{justify:[...G(),"normal"]}],"justify-items":[{"justify-items":[...Q(),"normal"]}],"justify-self":[{"justify-self":["auto",...Q()]}],"align-content":[{content:["normal",...G()]}],"align-items":[{items:[...Q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Q(),{baseline:["","last"]}]}],"place-content":[{"place-content":G()}],"place-items":[{"place-items":[...Q(),"baseline"]}],"place-self":[{"place-self":["auto",...Q()]}],p:[{p:I()}],px:[{px:I()}],py:[{py:I()}],ps:[{ps:I()}],pe:[{pe:I()}],pbs:[{pbs:I()}],pbe:[{pbe:I()}],pt:[{pt:I()}],pr:[{pr:I()}],pb:[{pb:I()}],pl:[{pl:I()}],m:[{m:re()}],mx:[{mx:re()}],my:[{my:re()}],ms:[{ms:re()}],me:[{me:re()}],mbs:[{mbs:re()}],mbe:[{mbe:re()}],mt:[{mt:re()}],mr:[{mr:re()}],mb:[{mb:re()}],ml:[{ml:re()}],"space-x":[{"space-x":I()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":I()}],"space-y-reverse":["space-y-reverse"],size:[{size:me()}],"inline-size":[{inline:["auto",...ke()]}],"min-inline-size":[{"min-inline":["auto",...ke()]}],"max-inline-size":[{"max-inline":["none",...ke()]}],"block-size":[{block:["auto",...tt()]}],"min-block-size":[{"min-block":["auto",...tt()]}],"max-block-size":[{"max-block":["none",...tt()]}],w:[{w:[o,"screen",...me()]}],"min-w":[{"min-w":[o,"screen","none",...me()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[a]},...me()]}],h:[{h:["screen","lh",...me()]}],"min-h":[{"min-h":["screen","lh","none",...me()]}],"max-h":[{"max-h":["screen","lh",...me()]}],"font-size":[{text:["base",n,Pf,bc]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,$Se,PSe]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ME,ve]}],"font-family":[{font:[OSe,NSe,t]}],"font-features":[{"font-features":[ve]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,Te,ve]}],"line-clamp":[{"line-clamp":[st,"none",Te,bL]}],leading:[{leading:[i,...I()]}],"list-image":[{"list-image":["none",Te,ve]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Te,ve]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:C()}],"text-color":[{text:C()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...be(),"wavy"]}],"text-decoration-thickness":[{decoration:[st,"from-font","auto",Te,bc]}],"text-decoration-color":[{decoration:C()}],"underline-offset":[{"underline-offset":[st,"auto",Te,ve]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Te,ve]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Te,ve]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:M()}],"bg-repeat":[{bg:K()}],"bg-size":[{bg:A()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Za,Te,ve],radial:["",Te,ve],conic:[Za,Te,ve]},DSe,RSe]}],"bg-color":[{bg:C()}],"gradient-from-pos":[{from:P()}],"gradient-via-pos":[{via:P()}],"gradient-to-pos":[{to:P()}],"gradient-from":[{from:C()}],"gradient-via":[{via:C()}],"gradient-to":[{to:C()}],rounded:[{rounded:B()}],"rounded-s":[{"rounded-s":B()}],"rounded-e":[{"rounded-e":B()}],"rounded-t":[{"rounded-t":B()}],"rounded-r":[{"rounded-r":B()}],"rounded-b":[{"rounded-b":B()}],"rounded-l":[{"rounded-l":B()}],"rounded-ss":[{"rounded-ss":B()}],"rounded-se":[{"rounded-se":B()}],"rounded-ee":[{"rounded-ee":B()}],"rounded-es":[{"rounded-es":B()}],"rounded-tl":[{"rounded-tl":B()}],"rounded-tr":[{"rounded-tr":B()}],"rounded-br":[{"rounded-br":B()}],"rounded-bl":[{"rounded-bl":B()}],"border-w":[{border:J()}],"border-w-x":[{"border-x":J()}],"border-w-y":[{"border-y":J()}],"border-w-s":[{"border-s":J()}],"border-w-e":[{"border-e":J()}],"border-w-bs":[{"border-bs":J()}],"border-w-be":[{"border-be":J()}],"border-w-t":[{"border-t":J()}],"border-w-r":[{"border-r":J()}],"border-w-b":[{"border-b":J()}],"border-w-l":[{"border-l":J()}],"divide-x":[{"divide-x":J()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":J()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...be(),"hidden","none"]}],"divide-style":[{divide:[...be(),"hidden","none"]}],"border-color":[{border:C()}],"border-color-x":[{"border-x":C()}],"border-color-y":[{"border-y":C()}],"border-color-s":[{"border-s":C()}],"border-color-e":[{"border-e":C()}],"border-color-bs":[{"border-bs":C()}],"border-color-be":[{"border-be":C()}],"border-color-t":[{"border-t":C()}],"border-color-r":[{"border-r":C()}],"border-color-b":[{"border-b":C()}],"border-color-l":[{"border-l":C()}],"divide-color":[{divide:C()}],"outline-style":[{outline:[...be(),"none","hidden"]}],"outline-offset":[{"outline-offset":[st,Te,ve]}],"outline-w":[{outline:["",st,Pf,bc]}],"outline-color":[{outline:C()}],shadow:[{shadow:["","none",l,Yg,Jg]}],"shadow-color":[{shadow:C()}],"inset-shadow":[{"inset-shadow":["none",d,Yg,Jg]}],"inset-shadow-color":[{"inset-shadow":C()}],"ring-w":[{ring:J()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:C()}],"ring-offset-w":[{"ring-offset":[st,bc]}],"ring-offset-color":[{"ring-offset":C()}],"inset-ring-w":[{"inset-ring":J()}],"inset-ring-color":[{"inset-ring":C()}],"text-shadow":[{"text-shadow":["none",f,Yg,Jg]}],"text-shadow-color":[{"text-shadow":C()}],opacity:[{opacity:[st,Te,ve]}],"mix-blend":[{"mix-blend":[...ge(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ge()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[st]}],"mask-image-linear-from-pos":[{"mask-linear-from":Ee()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ee()}],"mask-image-linear-from-color":[{"mask-linear-from":C()}],"mask-image-linear-to-color":[{"mask-linear-to":C()}],"mask-image-t-from-pos":[{"mask-t-from":Ee()}],"mask-image-t-to-pos":[{"mask-t-to":Ee()}],"mask-image-t-from-color":[{"mask-t-from":C()}],"mask-image-t-to-color":[{"mask-t-to":C()}],"mask-image-r-from-pos":[{"mask-r-from":Ee()}],"mask-image-r-to-pos":[{"mask-r-to":Ee()}],"mask-image-r-from-color":[{"mask-r-from":C()}],"mask-image-r-to-color":[{"mask-r-to":C()}],"mask-image-b-from-pos":[{"mask-b-from":Ee()}],"mask-image-b-to-pos":[{"mask-b-to":Ee()}],"mask-image-b-from-color":[{"mask-b-from":C()}],"mask-image-b-to-color":[{"mask-b-to":C()}],"mask-image-l-from-pos":[{"mask-l-from":Ee()}],"mask-image-l-to-pos":[{"mask-l-to":Ee()}],"mask-image-l-from-color":[{"mask-l-from":C()}],"mask-image-l-to-color":[{"mask-l-to":C()}],"mask-image-x-from-pos":[{"mask-x-from":Ee()}],"mask-image-x-to-pos":[{"mask-x-to":Ee()}],"mask-image-x-from-color":[{"mask-x-from":C()}],"mask-image-x-to-color":[{"mask-x-to":C()}],"mask-image-y-from-pos":[{"mask-y-from":Ee()}],"mask-image-y-to-pos":[{"mask-y-to":Ee()}],"mask-image-y-from-color":[{"mask-y-from":C()}],"mask-image-y-to-color":[{"mask-y-to":C()}],"mask-image-radial":[{"mask-radial":[Te,ve]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ee()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ee()}],"mask-image-radial-from-color":[{"mask-radial-from":C()}],"mask-image-radial-to-color":[{"mask-radial-to":C()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":v()}],"mask-image-conic-pos":[{"mask-conic":[st]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ee()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ee()}],"mask-image-conic-from-color":[{"mask-conic-from":C()}],"mask-image-conic-to-color":[{"mask-conic-to":C()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:M()}],"mask-repeat":[{mask:K()}],"mask-size":[{mask:A()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Te,ve]}],filter:[{filter:["","none",Te,ve]}],blur:[{blur:Oe()}],brightness:[{brightness:[st,Te,ve]}],contrast:[{contrast:[st,Te,ve]}],"drop-shadow":[{"drop-shadow":["","none",h,Yg,Jg]}],"drop-shadow-color":[{"drop-shadow":C()}],grayscale:[{grayscale:["",st,Te,ve]}],"hue-rotate":[{"hue-rotate":[st,Te,ve]}],invert:[{invert:["",st,Te,ve]}],saturate:[{saturate:[st,Te,ve]}],sepia:[{sepia:["",st,Te,ve]}],"backdrop-filter":[{"backdrop-filter":["","none",Te,ve]}],"backdrop-blur":[{"backdrop-blur":Oe()}],"backdrop-brightness":[{"backdrop-brightness":[st,Te,ve]}],"backdrop-contrast":[{"backdrop-contrast":[st,Te,ve]}],"backdrop-grayscale":[{"backdrop-grayscale":["",st,Te,ve]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[st,Te,ve]}],"backdrop-invert":[{"backdrop-invert":["",st,Te,ve]}],"backdrop-opacity":[{"backdrop-opacity":[st,Te,ve]}],"backdrop-saturate":[{"backdrop-saturate":[st,Te,ve]}],"backdrop-sepia":[{"backdrop-sepia":["",st,Te,ve]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":I()}],"border-spacing-x":[{"border-spacing-x":I()}],"border-spacing-y":[{"border-spacing-y":I()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Te,ve]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[st,"initial",Te,ve]}],ease:[{ease:["linear","initial",p,Te,ve]}],delay:[{delay:[st,Te,ve]}],animate:[{animate:["none",_,Te,ve]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,Te,ve]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:q()}],"rotate-x":[{"rotate-x":q()}],"rotate-y":[{"rotate-y":q()}],"rotate-z":[{"rotate-z":q()}],scale:[{scale:W()}],"scale-x":[{"scale-x":W()}],"scale-y":[{"scale-y":W()}],"scale-z":[{"scale-z":W()}],"scale-3d":["scale-3d"],skew:[{skew:se()}],"skew-x":[{"skew-x":se()}],"skew-y":[{"skew-y":se()}],transform:[{transform:[Te,ve,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:le()}],"translate-x":[{"translate-x":le()}],"translate-y":[{"translate-y":le()}],"translate-z":[{"translate-z":le()}],"translate-none":["translate-none"],accent:[{accent:C()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:C()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Te,ve]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mbs":[{"scroll-mbs":I()}],"scroll-mbe":[{"scroll-mbe":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pbs":[{"scroll-pbs":I()}],"scroll-pbe":[{"scroll-pbe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Te,ve]}],fill:[{fill:["none",...C()]}],"stroke-w":[{stroke:[st,Pf,bc,bL]}],stroke:[{stroke:["none",...C()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},WA=bSe(jSe);function qe(...e){return WA(V1(e))}function FSe({className:e,...t}){return b.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",className:qe("size-4",e),...t,children:[b.jsx("rect",{x:"2",y:"2",width:"5",height:"5",rx:"1",stroke:"currentColor",strokeWidth:"1.3"}),b.jsx("rect",{x:"9",y:"2",width:"5",height:"5",rx:"1",stroke:"currentColor",strokeWidth:"1.3"}),b.jsx("rect",{x:"2",y:"9",width:"5",height:"5",rx:"1",stroke:"currentColor",strokeWidth:"1.3"}),b.jsx("rect",{x:"9",y:"9",width:"5",height:"5",rx:"1",stroke:"currentColor",strokeWidth:"1.3"})]})}function gU({className:e,...t}){return b.jsx("svg",{viewBox:"0 0 16 16",fill:"none",className:qe("size-4",e),...t,children:b.jsx("path",{d:"M4 8h8M8 4v8",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})})}function bU({className:e,...t}){return b.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",className:qe("size-4",e),...t,children:[b.jsx("circle",{cx:"7",cy:"7",r:"4.5",stroke:"currentColor",strokeWidth:"1.3"}),b.jsx("path",{d:"M10.5 10.5L14 14",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})]})}function kL({className:e,...t}){return b.jsx("svg",{viewBox:"0 0 16 16",fill:"none",className:qe("size-3",e),...t,children:b.jsx("path",{d:"M6 4l4 4-4 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function BSe({className:e,...t}){return b.jsx("svg",{viewBox:"0 0 16 16",fill:"none",className:qe("size-3",e),...t,children:b.jsx("path",{d:"M2 4h5l2 2h5v7H2V4z",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"})})}function zSe({className:e,...t}){return b.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",className:qe("size-4",e),...t,children:[b.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"1.3"}),b.jsx("path",{d:"M6.5 5.5l4.5 2-2 4.5-4.5-2z",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"})]})}function yU({className:e,...t}){return b.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",className:qe("size-3.5",e),...t,children:[b.jsx("rect",{x:"5",y:"5",width:"8",height:"8",rx:"1",stroke:"currentColor",strokeWidth:"1.2"}),b.jsx("path",{d:"M11 3H4a1 1 0 00-1 1v7",stroke:"currentColor",strokeWidth:"1.2"})]})}function JA({className:e,...t}){return b.jsx("svg",{viewBox:"0 0 16 16",fill:"none",className:qe("size-3.5",e),...t,children:b.jsx("path",{d:"M4 8.5l3 3 5-6",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})}function USe({className:e,...t}){return b.jsx("svg",{viewBox:"0 0 16 16",fill:"none",className:qe("size-3",e),...t,children:b.jsx("path",{d:"M4 4l8 8M12 4l-8 8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}function VSe({className:e,...t}){return b.jsxs("svg",{viewBox:"0 0 48 48",fill:"none",className:qe("size-12",e),...t,children:[b.jsx("rect",{x:"6",y:"6",width:"36",height:"36",rx:"4",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M16 18h16M16 24h12M16 30h8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}function Yi({className:e,...t}){return b.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",className:qe("size-4 animate-spin",e),...t,children:[b.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"1.5",opacity:"0.2"}),b.jsx("path",{d:"M14 8a6 6 0 00-6-6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}function qo({className:e,...t}){return b.jsx("svg",{viewBox:"0 0 16 16",fill:"none",className:qe("size-4",e),...t,children:b.jsx("path",{d:"M8 3.25v9.5M3.25 8h9.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})})}function YA({className:e,...t}){return b.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",className:qe("size-4",e),...t,children:[b.jsx("path",{d:"M3 11.75L11.6 3.15a1.2 1.2 0 011.7 0l.55.55a1.2 1.2 0 010 1.7L5.25 14H3v-2.25z",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"}),b.jsx("path",{d:"M9.75 5l1.25 1.25",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]})}function _U({className:e,...t}){return b.jsx("svg",{viewBox:"0 0 16 16",fill:"none",className:qe("size-4",e),...t,children:b.jsx("path",{d:"M3.5 4.5h9M6 2.75h4M5 4.5v7.25m3-7.25v7.25m3-7.25v7.25M4.5 4.5l.4 8.1c.03.52.46.9.98.9h4.24c.52 0 .95-.38.98-.9l.4-8.1",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})})}function kU({className:e,...t}){return b.jsx("svg",{viewBox:"0 0 16 16",fill:"none",className:qe("size-4",e),...t,children:b.jsx("path",{d:"M12.75 8H3.25M6.75 4.5L3.25 8l3.5 3.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})})}function Fu(e){return e.loadable.status==="loading"?b.jsx("div",{className:"flex h-full min-h-48 items-center justify-center",children:b.jsxs("div",{className:"flex items-center gap-3 text-sm text-muted-foreground",children:[b.jsx(Yi,{}),b.jsx("span",{children:e.loading??"Loading..."})]})}):e.loadable.status==="error"?b.jsx("div",{className:"flex h-full min-h-48 items-center justify-center",children:b.jsx("div",{className:"rounded-lg border border-destructive/25 bg-destructive/5 px-4 py-3 text-sm text-destructive",children:e.loadable.error.message})}):b.jsx(b.Fragment,{children:e.children(e.loadable.data)})}function xv(e){return b.jsx("div",{className:`flex h-full items-center justify-center ${e.className??""}`,children:b.jsxs("div",{className:"text-center",children:[b.jsx(VSe,{className:"mx-auto mb-3 text-muted-foreground/20"}),b.jsx("p",{className:"text-[13px] text-muted-foreground/60",children:e.title}),e.description&&b.jsx("p",{className:"mt-1 text-[11px] text-muted-foreground/40",children:e.description})]})})}function HSe(e,t){return e.endsWith(t)?e.length===t.length||e[e.length-t.length-1]===".":!1}function qSe(e,t){const n=e.length-t.length-2,r=e.lastIndexOf(".",n);return r===-1?e:e.slice(r+1)}function GSe(e,t,n){if(n.validHosts!==null){const s=n.validHosts;for(const i of s)if(HSe(t,i))return i}let r=0;if(t.startsWith("."))for(;r<t.length&&t[r]===".";)r+=1;return e.length===t.length-r?null:qSe(t,e)}function KSe(e,t){return e.slice(0,-t.length-1)}function EL(e,t){let n=0,r=e.length,s=!1;if(!t){if(e.startsWith("data:"))return null;for(;n<e.length&&e.charCodeAt(n)<=32;)n+=1;for(;r>n+1&&e.charCodeAt(r-1)<=32;)r-=1;if(e.charCodeAt(n)===47&&e.charCodeAt(n+1)===47)n+=2;else{const u=e.indexOf(":/",n);if(u!==-1){const l=u-n,d=e.charCodeAt(n),f=e.charCodeAt(n+1),h=e.charCodeAt(n+2),m=e.charCodeAt(n+3),y=e.charCodeAt(n+4);if(!(l===5&&d===104&&f===116&&h===116&&m===112&&y===115)){if(!(l===4&&d===104&&f===116&&h===116&&m===112)){if(!(l===3&&d===119&&f===115&&h===115)){if(!(l===2&&d===119&&f===115))for(let g=n;g<u;g+=1){const p=e.charCodeAt(g)|32;if(!(p>=97&&p<=122||p>=48&&p<=57||p===46||p===45||p===43))return null}}}}for(n=u+2;e.charCodeAt(n)===47;)n+=1}}let a=-1,o=-1,c=-1;for(let u=n;u<r;u+=1){const l=e.charCodeAt(u);if(l===35||l===47||l===63){r=u;break}else l===64?a=u:l===93?o=u:l===58?c=u:l>=65&&l<=90&&(s=!0)}if(a!==-1&&a>n&&a<r&&(n=a+1),e.charCodeAt(n)===91)return o!==-1?e.slice(n+1,o).toLowerCase():null;c!==-1&&c>n&&c<r&&(r=c)}for(;r>n+1&&e.charCodeAt(r-1)===46;)r-=1;const i=n!==0||r!==e.length?e.slice(n,r):e;return s?i.toLowerCase():i}function WSe(e){if(e.length<7||e.length>15)return!1;let t=0;for(let n=0;n<e.length;n+=1){const r=e.charCodeAt(n);if(r===46)t+=1;else if(r<48||r>57)return!1}return t===3&&e.charCodeAt(0)!==46&&e.charCodeAt(e.length-1)!==46}function JSe(e){if(e.length<3)return!1;let t=e.startsWith("[")?1:0,n=e.length;if(e[n-1]==="]"&&(n-=1),n-t>39)return!1;let r=!1;for(;t<n;t+=1){const s=e.charCodeAt(t);if(s===58)r=!0;else if(!(s>=48&&s<=57||s>=97&&s<=102||s>=65&&s<=90))return!1}return r}function YSe(e){return JSe(e)||WSe(e)}function wL(e){return e>=97&&e<=122||e>=48&&e<=57||e>127}function SL(e){if(e.length>255||e.length===0||!wL(e.charCodeAt(0))&&e.charCodeAt(0)!==46&&e.charCodeAt(0)!==95)return!1;let t=-1,n=-1;const r=e.length;for(let s=0;s<r;s+=1){const i=e.charCodeAt(s);if(i===46){if(s-t>64||n===46||n===45||n===95)return!1;t=s}else if(!(wL(i)||i===45||i===95))return!1;n=i}return r-t-1<=63&&n!==45}function EU({allowIcannDomains:e=!0,allowPrivateDomains:t=!1,detectIp:n=!0,extractHostname:r=!0,mixedInputs:s=!0,validHosts:i=null,validateHostname:a=!0}){return{allowIcannDomains:e,allowPrivateDomains:t,detectIp:n,extractHostname:r,mixedInputs:s,validHosts:i,validateHostname:a}}const QSe=EU({});function XSe(e){return e===void 0?QSe:EU(e)}function ZSe(e,t){return t.length===e.length?"":e.slice(0,-t.length-1)}function wU(){return{domain:null,domainWithoutSuffix:null,hostname:null,isIcann:null,isIp:null,isPrivate:null,publicSuffix:null,subdomain:null}}function eve(e){e.domain=null,e.domainWithoutSuffix=null,e.hostname=null,e.isIcann=null,e.isIp=null,e.isPrivate=null,e.publicSuffix=null,e.subdomain=null}function SU(e,t,n,r,s){const i=XSe(r);return typeof e!="string"||(i.extractHostname?i.mixedInputs?s.hostname=EL(e,SL(e)):s.hostname=EL(e,!1):s.hostname=e,i.detectIp&&s.hostname!==null&&(s.isIp=YSe(s.hostname),s.isIp))?s:i.validateHostname&&i.extractHostname&&s.hostname!==null&&!SL(s.hostname)?(s.hostname=null,s):(t===0||s.hostname===null||(n(s.hostname,i,s),t===2||s.publicSuffix===null)||(s.domain=GSe(s.publicSuffix,s.hostname,i),t===3||s.domain===null)||(s.subdomain=ZSe(s.hostname,s.domain),t===4)||(s.domainWithoutSuffix=KSe(s.domain,s.publicSuffix)),s)}function tve(e,t,n){if(!t.allowPrivateDomains&&e.length>3){const r=e.length-1,s=e.charCodeAt(r),i=e.charCodeAt(r-1),a=e.charCodeAt(r-2),o=e.charCodeAt(r-3);if(s===109&&i===111&&a===99&&o===46)return n.isIcann=!0,n.isPrivate=!1,n.publicSuffix="com",!0;if(s===103&&i===114&&a===111&&o===46)return n.isIcann=!0,n.isPrivate=!1,n.publicSuffix="org",!0;if(s===117&&i===100&&a===101&&o===46)return n.isIcann=!0,n.isPrivate=!1,n.publicSuffix="edu",!0;if(s===118&&i===111&&a===103&&o===46)return n.isIcann=!0,n.isPrivate=!1,n.publicSuffix="gov",!0;if(s===116&&i===101&&a===110&&o===46)return n.isIcann=!0,n.isPrivate=!1,n.publicSuffix="net",!0;if(s===101&&i===100&&a===46)return n.isIcann=!0,n.isPrivate=!1,n.publicSuffix="de",!0}return!1}const nve=(function(){const e=[1,{}],t=[0,{city:e}];return[0,{ck:[0,{www:e}],jp:[0,{kawasaki:t,kitakyushu:t,kobe:t,nagoya:t,sapporo:t,sendai:t,yokohama:t}]}]})(),rve=(function(){const e=[1,{}],t=[2,{}],n=[1,{com:e,edu:e,gov:e,net:e,org:e}],r=[1,{com:e,edu:e,gov:e,mil:e,net:e,org:e}],s=[0,{"*":t}],i=[2,{s}],a=[0,{relay:t}],o=[2,{id:t}],c=[1,{gov:e}],u=[0,{airflow:s,"lambda-url":t,"transfer-webapp":t}],l=[0,{airflow:s,"transfer-webapp":t}],d=[0,{"transfer-webapp":t}],f=[0,{"transfer-webapp":t,"transfer-webapp-fips":t}],h=[0,{notebook:t,studio:t}],m=[0,{labeling:t,notebook:t,studio:t}],y=[0,{notebook:t}],g=[0,{labeling:t,notebook:t,"notebook-fips":t,studio:t}],p=[0,{notebook:t,"notebook-fips":t,studio:t,"studio-fips":t}],_=[0,{shop:t}],k=[0,{"*":e}],v=[1,{co:t}],w=[0,{objects:t}],S=[2,{"eu-west-1":t,"us-east-1":t}],T=[2,{nodes:t}],I=[0,{my:t}],$=[0,{s3:t,"s3-accesspoint":t,"s3-website":t}],R=[0,{s3:t,"s3-accesspoint":t}],z=[0,{direct:t}],V=[0,{"webview-assets":t}],H=[0,{vfs:t,"webview-assets":t}],G=[0,{"execute-api":t,"emrappui-prod":t,"emrnotebooks-prod":t,"emrstudio-prod":t,dualstack:$,s3:t,"s3-accesspoint":t,"s3-object-lambda":t,"s3-website":t,"aws-cloud9":V,cloud9:H}],Q=[0,{"execute-api":t,"emrappui-prod":t,"emrnotebooks-prod":t,"emrstudio-prod":t,dualstack:R,s3:t,"s3-accesspoint":t,"s3-object-lambda":t,"s3-website":t,"aws-cloud9":V,cloud9:H}],re=[0,{"execute-api":t,"emrappui-prod":t,"emrnotebooks-prod":t,"emrstudio-prod":t,dualstack:$,s3:t,"s3-accesspoint":t,"s3-object-lambda":t,"s3-website":t,"analytics-gateway":t,"aws-cloud9":V,cloud9:H}],me=[0,{"execute-api":t,"emrappui-prod":t,"emrnotebooks-prod":t,"emrstudio-prod":t,dualstack:$,s3:t,"s3-accesspoint":t,"s3-object-lambda":t,"s3-website":t}],ke=[0,{s3:t,"s3-accesspoint":t,"s3-accesspoint-fips":t,"s3-fips":t,"s3-website":t}],tt=[0,{"execute-api":t,"emrappui-prod":t,"emrnotebooks-prod":t,"emrstudio-prod":t,dualstack:ke,s3:t,"s3-accesspoint":t,"s3-accesspoint-fips":t,"s3-fips":t,"s3-object-lambda":t,"s3-website":t,"aws-cloud9":V,cloud9:H}],C=[0,{"execute-api":t,"emrappui-prod":t,"emrnotebooks-prod":t,"emrstudio-prod":t,dualstack:ke,s3:t,"s3-accesspoint":t,"s3-accesspoint-fips":t,"s3-fips":t,"s3-object-lambda":t,"s3-website":t}],M=[0,{"execute-api":t,"emrappui-prod":t,"emrnotebooks-prod":t,"emrstudio-prod":t,dualstack:ke,s3:t,"s3-accesspoint":t,"s3-accesspoint-fips":t,"s3-deprecated":t,"s3-fips":t,"s3-object-lambda":t,"s3-website":t,"analytics-gateway":t,"aws-cloud9":V,cloud9:H}],K=[0,{auth:t}],A=[0,{auth:t,"auth-fips":t}],P=[0,{"auth-fips":t}],B=[0,{apps:t}],J=[0,{paas:t}],be=[2,{eu:t}],ge=[0,{app:t}],Ee=[0,{site:t}],Oe=[1,{com:e,edu:e,net:e,org:e}],q=[0,{j:t}],W=[0,{dyn:t}],se=[2,{web:t}],le=[1,{co:e,com:e,edu:e,gov:e,net:e,org:e}],we=[0,{p:t}],Fe=[0,{user:t}],Ie=[1,{ms:t}],Me=[0,{cdn:t}],gt=[2,{raw:s}],it=[0,{cust:t,reservd:t}],Ct=[0,{cust:t}],zr=[0,{s3:t}],pn=[1,{biz:e,com:e,edu:e,gov:e,info:e,net:e,org:e}],Gs=[0,{ipfs:t}],ss=[1,{framer:t}],X=[0,{forgot:t}],ae=[0,{blob:t,file:t,web:t}],Ae=[0,{core:ae,servicebus:t}],xe=[1,{gs:e}],xt=[0,{nes:e}],Pe=[1,{k12:e,cc:e,lib:e}],Ci=[1,{cc:e}],Ur=[1,{cc:e,lib:e}];return[0,{ac:[1,{com:e,edu:e,gov:e,mil:e,net:e,org:e,drr:t,feedback:t,forms:t}],ad:e,ae:[1,{ac:e,co:e,gov:e,mil:e,net:e,org:e,sch:e}],aero:[1,{airline:e,airport:e,"accident-investigation":e,"accident-prevention":e,aerobatic:e,aeroclub:e,aerodrome:e,agents:e,"air-surveillance":e,"air-traffic-control":e,aircraft:e,airtraffic:e,ambulance:e,association:e,author:e,ballooning:e,broker:e,caa:e,cargo:e,catering:e,certification:e,championship:e,charter:e,civilaviation:e,club:e,conference:e,consultant:e,consulting:e,control:e,council:e,crew:e,design:e,dgca:e,educator:e,emergency:e,engine:e,engineer:e,entertainment:e,equipment:e,exchange:e,express:e,federation:e,flight:e,freight:e,fuel:e,gliding:e,government:e,groundhandling:e,group:e,hanggliding:e,homebuilt:e,insurance:e,journal:e,journalist:e,leasing:e,logistics:e,magazine:e,maintenance:e,marketplace:e,media:e,microlight:e,modelling:e,navigation:e,parachuting:e,paragliding:e,"passenger-association":e,pilot:e,press:e,production:e,recreation:e,repbody:e,res:e,research:e,rotorcraft:e,safety:e,scientist:e,services:e,show:e,skydiving:e,software:e,student:e,taxi:e,trader:e,trading:e,trainer:e,union:e,workinggroup:e,works:e}],af:n,ag:[1,{co:e,com:e,net:e,nom:e,org:e,obj:t}],ai:[1,{com:e,net:e,off:e,org:e,uwu:t,framer:t,kiloapps:t}],al:r,am:[1,{co:e,com:e,commune:e,net:e,org:e,radio:t}],ao:[1,{co:e,ed:e,edu:e,gov:e,gv:e,it:e,og:e,org:e,pb:e}],aq:e,ar:[1,{bet:e,com:e,coop:e,edu:e,gob:e,gov:e,int:e,mil:e,musica:e,mutual:e,net:e,org:e,seg:e,senasa:e,tur:e}],arpa:[1,{e164:e,home:e,"in-addr":e,ip6:e,iris:e,uri:e,urn:e}],as:c,asia:[1,{cloudns:t,daemon:t,dix:t}],at:[1,{4:t,ac:[1,{sth:e}],co:e,gv:e,or:e,funkfeuer:[0,{wien:t}],futurecms:[0,{"*":t,ex:s,in:s}],futurehosting:t,futuremailing:t,ortsinfo:[0,{ex:s,kunden:s}],biz:t,info:t,"123webseite":t,priv:t,my:t,myspreadshop:t,"12hp":t,"2ix":t,"4lima":t,"lima-city":t}],au:[1,{asn:e,com:[1,{cloudlets:[0,{mel:t}],myspreadshop:t}],edu:[1,{act:e,catholic:e,nsw:e,nt:e,qld:e,sa:e,tas:e,vic:e,wa:e}],gov:[1,{qld:e,sa:e,tas:e,vic:e,wa:e}],id:e,net:e,org:e,conf:e,oz:e,act:e,nsw:e,nt:e,qld:e,sa:e,tas:e,vic:e,wa:e,hrsn:[0,{vps:t}]}],aw:[1,{com:e}],ax:e,az:[1,{biz:e,co:e,com:e,edu:e,gov:e,info:e,int:e,mil:e,name:e,net:e,org:e,pp:e,pro:e}],ba:[1,{com:e,edu:e,gov:e,mil:e,net:e,org:e,brendly:_,rs:t}],bb:[1,{biz:e,co:e,com:e,edu:e,gov:e,info:e,net:e,org:e,store:e,tv:e}],bd:[1,{ac:e,ai:e,co:e,com:e,edu:e,gov:e,id:e,info:e,it:e,mil:e,net:e,org:e,sch:e,tv:e}],be:[1,{ac:e,cloudns:t,webhosting:t,interhostsolutions:[0,{cloud:t}],kuleuven:[0,{ezproxy:t}],my:t,"123website":t,myspreadshop:t,transurl:s}],bf:c,bg:[1,{0:e,1:e,2:e,3:e,4:e,5:e,6:e,7:e,8:e,9:e,a:e,b:e,c:e,d:e,e,f:e,g:e,h:e,i:e,j:e,k:e,l:e,m:e,n:e,o:e,p:e,q:e,r:e,s:e,t:e,u:e,v:e,w:e,x:e,y:e,z:e,barsy:t}],bh:n,bi:[1,{co:e,com:e,edu:e,or:e,org:e}],biz:[1,{activetrail:t,"cloud-ip":t,cloudns:t,jozi:t,dyndns:t,"for-better":t,"for-more":t,"for-some":t,"for-the":t,selfip:t,webhop:t,orx:t,mmafan:t,myftp:t,"no-ip":t,dscloud:t}],bj:[1,{africa:e,agro:e,architectes:e,assur:e,avocats:e,co:e,com:e,eco:e,econo:e,edu:e,info:e,loisirs:e,money:e,net:e,org:e,ote:e,restaurant:e,resto:e,tourism:e,univ:e}],bm:n,bn:[1,{com:e,edu:e,gov:e,net:e,org:e,co:t}],bo:[1,{com:e,edu:e,gob:e,int:e,mil:e,net:e,org:e,tv:e,web:e,academia:e,agro:e,arte:e,blog:e,bolivia:e,ciencia:e,cooperativa:e,democracia:e,deporte:e,ecologia:e,economia:e,empresa:e,indigena:e,industria:e,info:e,medicina:e,movimiento:e,musica:e,natural:e,nombre:e,noticias:e,patria:e,plurinacional:e,politica:e,profesional:e,pueblo:e,revista:e,salud:e,tecnologia:e,tksat:e,transporte:e,wiki:e}],br:[1,{"9guacu":e,abc:e,adm:e,adv:e,agr:e,aju:e,am:e,anani:e,aparecida:e,api:e,app:e,arq:e,art:e,ato:e,b:e,barueri:e,belem:e,bet:e,bhz:e,bib:e,bio:e,blog:e,bmd:e,boavista:e,bsb:e,campinagrande:e,campinas:e,caxias:e,cim:e,cng:e,cnt:e,com:[1,{simplesite:t}],contagem:e,coop:e,coz:e,cri:e,cuiaba:e,curitiba:e,def:e,des:e,det:e,dev:e,ecn:e,eco:e,edu:e,emp:e,enf:e,eng:e,esp:e,etc:e,eti:e,far:e,feira:e,flog:e,floripa:e,fm:e,fnd:e,fortal:e,fot:e,foz:e,fst:e,g12:e,geo:e,ggf:e,goiania:e,gov:[1,{ac:e,al:e,am:e,ap:e,ba:e,ce:e,df:e,es:e,go:e,ma:e,mg:e,ms:e,mt:e,pa:e,pb:e,pe:e,pi:e,pr:e,rj:e,rn:e,ro:e,rr:e,rs:e,sc:e,se:e,sp:e,to:e}],gru:e,ia:e,imb:e,ind:e,inf:e,jab:e,jampa:e,jdf:e,joinville:e,jor:e,jus:e,leg:[1,{ac:t,al:t,am:t,ap:t,ba:t,ce:t,df:t,es:t,go:t,ma:t,mg:t,ms:t,mt:t,pa:t,pb:t,pe:t,pi:t,pr:t,rj:t,rn:t,ro:t,rr:t,rs:t,sc:t,se:t,sp:t,to:t}],leilao:e,lel:e,log:e,londrina:e,macapa:e,maceio:e,manaus:e,maringa:e,mat:e,med:e,mil:e,morena:e,mp:e,mus:e,natal:e,net:e,niteroi:e,nom:k,not:e,ntr:e,odo:e,ong:e,org:e,osasco:e,palmas:e,poa:e,ppg:e,pro:e,psc:e,psi:e,pvh:e,qsl:e,radio:e,rec:e,recife:e,rep:e,ribeirao:e,rio:e,riobranco:e,riopreto:e,salvador:e,sampa:e,santamaria:e,santoandre:e,saobernardo:e,saogonca:e,seg:e,sjc:e,slg:e,slz:e,social:e,sorocaba:e,srv:e,taxi:e,tc:e,tec:e,teo:e,the:e,tmp:e,trd:e,tur:e,tv:e,udi:e,vet:e,vix:e,vlog:e,wiki:e,xyz:e,zlg:e,tche:t}],bs:[1,{com:e,edu:e,gov:e,net:e,org:e,we:t}],bt:n,bv:e,bw:[1,{ac:e,co:e,gov:e,net:e,org:e}],by:[1,{gov:e,mil:e,com:e,of:e,mediatech:t}],bz:[1,{co:e,com:e,edu:e,gov:e,net:e,org:e,za:t,mydns:t,gsj:t}],ca:[1,{ab:e,bc:e,mb:e,nb:e,nf:e,nl:e,ns:e,nt:e,nu:e,on:e,pe:e,qc:e,sk:e,yk:e,gc:e,barsy:t,awdev:s,co:t,"no-ip":t,onid:t,myspreadshop:t,box:t}],cat:e,cc:[1,{cleverapps:t,"cloud-ip":t,cloudns:t,ccwu:t,ftpaccess:t,"game-server":t,myphotos:t,scrapping:t,twmail:t,csx:t,fantasyleague:t,spawn:[0,{instances:t}],ec:t,eu:t,gu:t,uk:t,us:t}],cd:[1,{gov:e,cc:t}],cf:e,cg:e,ch:[1,{square7:t,cloudns:t,cloudscale:[0,{cust:t,lpg:w,rma:w}],objectstorage:[0,{lpg:t,rma:t}],flow:[0,{ae:[0,{alp1:t}],appengine:t}],"linkyard-cloud":t,gotdns:t,dnsking:t,"123website":t,myspreadshop:t,firenet:[0,{"*":t,svc:s}],"12hp":t,"2ix":t,"4lima":t,"lima-city":t}],ci:[1,{ac:e,"xn--aroport-bya":e,aéroport:e,asso:e,co:e,com:e,ed:e,edu:e,go:e,gouv:e,int:e,net:e,or:e,org:e,us:t}],ck:k,cl:[1,{co:e,gob:e,gov:e,mil:e,cloudns:t}],cm:[1,{co:e,com:e,gov:e,net:e}],cn:[1,{ac:e,com:[1,{amazonaws:[0,{"cn-north-1":[0,{"execute-api":t,"emrappui-prod":t,"emrnotebooks-prod":t,"emrstudio-prod":t,rds:s,dualstack:$,s3:t,"s3-accesspoint":t,"s3-deprecated":t,"s3-object-lambda":t,"s3-website":t}],"cn-northwest-1":[0,{"execute-api":t,"emrappui-prod":t,"emrnotebooks-prod":t,"emrstudio-prod":t,rds:s,dualstack:R,s3:t,"s3-accesspoint":t,"s3-object-lambda":t,"s3-website":t}],compute:s,airflow:[0,{"cn-north-1":s,"cn-northwest-1":s}],eb:[0,{"cn-north-1":t,"cn-northwest-1":t}],elb:s}],amazonwebservices:[0,{on:[0,{"cn-north-1":l,"cn-northwest-1":l}]}],sagemaker:[0,{"cn-north-1":h,"cn-northwest-1":h}]}],edu:e,gov:e,mil:e,net:e,org:e,"xn--55qx5d":e,公司:e,"xn--od0alg":e,網絡:e,"xn--io0a7i":e,网络:e,ah:e,bj:e,cq:e,fj:e,gd:e,gs:e,gx:e,gz:e,ha:e,hb:e,he:e,hi:e,hk:e,hl:e,hn:e,jl:e,js:e,jx:e,ln:e,mo:e,nm:e,nx:e,qh:e,sc:e,sd:e,sh:[1,{as:t}],sn:e,sx:e,tj:e,tw:e,xj:e,xz:e,yn:e,zj:e,"canva-apps":t,canvasite:I,myqnapcloud:t,quickconnect:z}],co:[1,{com:e,edu:e,gov:e,mil:e,net:e,nom:e,org:e,carrd:t,crd:t,otap:s,hidns:t,leadpages:t,lpages:t,mypi:t,xmit:s,rdpa:[0,{clusters:s,srvrless:s}],firewalledreplit:o,repl:o,supabase:[2,{realtime:t,storage:t}],umso:t}],com:[1,{a2hosted:t,cpserver:t,adobeaemcloud:[2,{dev:s}],africa:t,auiusercontent:s,aivencloud:t,alibabacloudcs:t,kasserver:t,amazonaws:[0,{"af-south-1":G,"ap-east-1":Q,"ap-northeast-1":re,"ap-northeast-2":re,"ap-northeast-3":G,"ap-south-1":re,"ap-south-2":me,"ap-southeast-1":re,"ap-southeast-2":re,"ap-southeast-3":me,"ap-southeast-4":me,"ap-southeast-5":[0,{"execute-api":t,dualstack:$,s3:t,"s3-accesspoint":t,"s3-deprecated":t,"s3-object-lambda":t,"s3-website":t}],"ca-central-1":tt,"ca-west-1":C,"eu-central-1":re,"eu-central-2":me,"eu-north-1":Q,"eu-south-1":G,"eu-south-2":me,"eu-west-1":[0,{"execute-api":t,"emrappui-prod":t,"emrnotebooks-prod":t,"emrstudio-prod":t,dualstack:$,s3:t,"s3-accesspoint":t,"s3-deprecated":t,"s3-object-lambda":t,"s3-website":t,"analytics-gateway":t,"aws-cloud9":V,cloud9:H}],"eu-west-2":Q,"eu-west-3":G,"il-central-1":[0,{"execute-api":t,"emrappui-prod":t,"emrnotebooks-prod":t,"emrstudio-prod":t,dualstack:$,s3:t,"s3-accesspoint":t,"s3-object-lambda":t,"s3-website":t,"aws-cloud9":V,cloud9:[0,{vfs:t}]}],"me-central-1":me,"me-south-1":Q,"sa-east-1":G,"us-east-1":[2,{"execute-api":t,"emrappui-prod":t,"emrnotebooks-prod":t,"emrstudio-prod":t,dualstack:ke,s3:t,"s3-accesspoint":t,"s3-accesspoint-fips":t,"s3-deprecated":t,"s3-fips":t,"s3-object-lambda":t,"s3-website":t,"analytics-gateway":t,"aws-cloud9":V,cloud9:H}],"us-east-2":M,"us-gov-east-1":C,"us-gov-west-1":C,"us-west-1":tt,"us-west-2":M,compute:s,"compute-1":s,airflow:[0,{"af-south-1":s,"ap-east-1":s,"ap-northeast-1":s,"ap-northeast-2":s,"ap-northeast-3":s,"ap-south-1":s,"ap-south-2":s,"ap-southeast-1":s,"ap-southeast-2":s,"ap-southeast-3":s,"ap-southeast-4":s,"ap-southeast-5":s,"ap-southeast-7":s,"ca-central-1":s,"ca-west-1":s,"eu-central-1":s,"eu-central-2":s,"eu-north-1":s,"eu-south-1":s,"eu-south-2":s,"eu-west-1":s,"eu-west-2":s,"eu-west-3":s,"il-central-1":s,"me-central-1":s,"me-south-1":s,"sa-east-1":s,"us-east-1":s,"us-east-2":s,"us-west-1":s,"us-west-2":s}],rds:[0,{"af-south-1":s,"ap-east-1":s,"ap-east-2":s,"ap-northeast-1":s,"ap-northeast-2":s,"ap-northeast-3":s,"ap-south-1":s,"ap-south-2":s,"ap-southeast-1":s,"ap-southeast-2":s,"ap-southeast-3":s,"ap-southeast-4":s,"ap-southeast-5":s,"ap-southeast-6":s,"ap-southeast-7":s,"ca-central-1":s,"ca-west-1":s,"eu-central-1":s,"eu-central-2":s,"eu-west-1":s,"eu-west-2":s,"eu-west-3":s,"il-central-1":s,"me-central-1":s,"me-south-1":s,"mx-central-1":s,"sa-east-1":s,"us-east-1":s,"us-east-2":s,"us-gov-east-1":s,"us-gov-west-1":s,"us-northeast-1":s,"us-west-1":s,"us-west-2":s}],s3:t,"s3-1":t,"s3-ap-east-1":t,"s3-ap-northeast-1":t,"s3-ap-northeast-2":t,"s3-ap-northeast-3":t,"s3-ap-south-1":t,"s3-ap-southeast-1":t,"s3-ap-southeast-2":t,"s3-ca-central-1":t,"s3-eu-central-1":t,"s3-eu-north-1":t,"s3-eu-west-1":t,"s3-eu-west-2":t,"s3-eu-west-3":t,"s3-external-1":t,"s3-fips-us-gov-east-1":t,"s3-fips-us-gov-west-1":t,"s3-global":[0,{accesspoint:[0,{mrap:t}]}],"s3-me-south-1":t,"s3-sa-east-1":t,"s3-us-east-2":t,"s3-us-gov-east-1":t,"s3-us-gov-west-1":t,"s3-us-west-1":t,"s3-us-west-2":t,"s3-website-ap-northeast-1":t,"s3-website-ap-southeast-1":t,"s3-website-ap-southeast-2":t,"s3-website-eu-west-1":t,"s3-website-sa-east-1":t,"s3-website-us-east-1":t,"s3-website-us-gov-west-1":t,"s3-website-us-west-1":t,"s3-website-us-west-2":t,elb:s}],amazoncognito:[0,{"af-south-1":K,"ap-east-1":K,"ap-northeast-1":K,"ap-northeast-2":K,"ap-northeast-3":K,"ap-south-1":K,"ap-south-2":K,"ap-southeast-1":K,"ap-southeast-2":K,"ap-southeast-3":K,"ap-southeast-4":K,"ap-southeast-5":K,"ap-southeast-7":K,"ca-central-1":K,"ca-west-1":K,"eu-central-1":K,"eu-central-2":K,"eu-north-1":K,"eu-south-1":K,"eu-south-2":K,"eu-west-1":K,"eu-west-2":K,"eu-west-3":K,"il-central-1":K,"me-central-1":K,"me-south-1":K,"mx-central-1":K,"sa-east-1":K,"us-east-1":A,"us-east-2":A,"us-gov-east-1":P,"us-gov-west-1":P,"us-west-1":A,"us-west-2":A}],amplifyapp:t,awsapprunner:s,awsapps:t,elasticbeanstalk:[2,{"af-south-1":t,"ap-east-1":t,"ap-northeast-1":t,"ap-northeast-2":t,"ap-northeast-3":t,"ap-south-1":t,"ap-southeast-1":t,"ap-southeast-2":t,"ap-southeast-3":t,"ap-southeast-5":t,"ap-southeast-7":t,"ca-central-1":t,"eu-central-1":t,"eu-north-1":t,"eu-south-1":t,"eu-south-2":t,"eu-west-1":t,"eu-west-2":t,"eu-west-3":t,"il-central-1":t,"me-central-1":t,"me-south-1":t,"sa-east-1":t,"us-east-1":t,"us-east-2":t,"us-gov-east-1":t,"us-gov-west-1":t,"us-west-1":t,"us-west-2":t}],awsglobalaccelerator:t,siiites:t,appspacehosted:t,appspaceusercontent:t,"on-aptible":t,myasustor:t,"balena-devices":t,boutir:t,bplaced:t,cafjs:t,"canva-apps":t,"canva-hosted-embed":t,canvacode:t,"rice-labs":t,"cdn77-storage":t,br:t,cn:t,de:t,eu:t,jpn:t,mex:t,ru:t,sa:t,uk:t,us:t,za:t,"clever-cloud":[0,{services:s}],abrdns:t,dnsabr:t,"ip-ddns":t,jdevcloud:t,wpdevcloud:t,"cf-ipfs":t,"cloudflare-ipfs":t,trycloudflare:t,co:t,devinapps:s,builtwithdark:t,datadetect:[0,{demo:t,instance:t}],dattolocal:t,dattorelay:t,dattoweb:t,mydatto:t,digitaloceanspaces:s,discordsays:t,discordsez:t,drayddns:t,dreamhosters:t,durumis:t,blogdns:t,cechire:t,dnsalias:t,dnsdojo:t,doesntexist:t,dontexist:t,doomdns:t,"dyn-o-saur":t,dynalias:t,"dyndns-at-home":t,"dyndns-at-work":t,"dyndns-blog":t,"dyndns-free":t,"dyndns-home":t,"dyndns-ip":t,"dyndns-mail":t,"dyndns-office":t,"dyndns-pics":t,"dyndns-remote":t,"dyndns-server":t,"dyndns-web":t,"dyndns-wiki":t,"dyndns-work":t,"est-a-la-maison":t,"est-a-la-masion":t,"est-le-patron":t,"est-mon-blogueur":t,"from-ak":t,"from-al":t,"from-ar":t,"from-ca":t,"from-ct":t,"from-dc":t,"from-de":t,"from-fl":t,"from-ga":t,"from-hi":t,"from-ia":t,"from-id":t,"from-il":t,"from-in":t,"from-ks":t,"from-ky":t,"from-ma":t,"from-md":t,"from-mi":t,"from-mn":t,"from-mo":t,"from-ms":t,"from-mt":t,"from-nc":t,"from-nd":t,"from-ne":t,"from-nh":t,"from-nj":t,"from-nm":t,"from-nv":t,"from-oh":t,"from-ok":t,"from-or":t,"from-pa":t,"from-pr":t,"from-ri":t,"from-sc":t,"from-sd":t,"from-tn":t,"from-tx":t,"from-ut":t,"from-va":t,"from-vt":t,"from-wa":t,"from-wi":t,"from-wv":t,"from-wy":t,getmyip:t,gotdns:t,"hobby-site":t,homelinux:t,homeunix:t,iamallama:t,"is-a-anarchist":t,"is-a-blogger":t,"is-a-bookkeeper":t,"is-a-bulls-fan":t,"is-a-caterer":t,"is-a-chef":t,"is-a-conservative":t,"is-a-cpa":t,"is-a-cubicle-slave":t,"is-a-democrat":t,"is-a-designer":t,"is-a-doctor":t,"is-a-financialadvisor":t,"is-a-geek":t,"is-a-green":t,"is-a-guru":t,"is-a-hard-worker":t,"is-a-hunter":t,"is-a-landscaper":t,"is-a-lawyer":t,"is-a-liberal":t,"is-a-libertarian":t,"is-a-llama":t,"is-a-musician":t,"is-a-nascarfan":t,"is-a-nurse":t,"is-a-painter":t,"is-a-personaltrainer":t,"is-a-photographer":t,"is-a-player":t,"is-a-republican":t,"is-a-rockstar":t,"is-a-socialist":t,"is-a-student":t,"is-a-teacher":t,"is-a-techie":t,"is-a-therapist":t,"is-an-accountant":t,"is-an-actor":t,"is-an-actress":t,"is-an-anarchist":t,"is-an-artist":t,"is-an-engineer":t,"is-an-entertainer":t,"is-certified":t,"is-gone":t,"is-into-anime":t,"is-into-cars":t,"is-into-cartoons":t,"is-into-games":t,"is-leet":t,"is-not-certified":t,"is-slick":t,"is-uberleet":t,"is-with-theband":t,"isa-geek":t,"isa-hockeynut":t,issmarterthanyou:t,"likes-pie":t,likescandy:t,"neat-url":t,"saves-the-whales":t,selfip:t,"sells-for-less":t,"sells-for-u":t,servebbs:t,"simple-url":t,"space-to-rent":t,"teaches-yoga":t,writesthisblog:t,"1cooldns":t,bumbleshrimp:t,ddnsfree:t,ddnsgeek:t,ddnsguru:t,dynuddns:t,dynuhosting:t,giize:t,gleeze:t,kozow:t,loseyourip:t,ooguy:t,pivohosting:t,theworkpc:t,wiredbladehosting:t,emergentagent:[0,{preview:t}],mytuleap:t,"tuleap-partners":t,encoreapi:t,evennode:[0,{"eu-1":t,"eu-2":t,"eu-3":t,"eu-4":t,"us-1":t,"us-2":t,"us-3":t,"us-4":t}],onfabrica:t,"fastly-edge":t,"fastly-terrarium":t,"fastvps-server":t,mydobiss:t,firebaseapp:t,fldrv:t,framercanvas:t,"freebox-os":t,freeboxos:t,freemyip:t,aliases121:t,gentapps:t,gentlentapis:t,githubusercontent:t,"0emm":s,appspot:[2,{r:s}],blogspot:t,codespot:t,googleapis:t,googlecode:t,pagespeedmobilizer:t,withgoogle:t,withyoutube:t,grayjayleagues:t,hatenablog:t,hatenadiary:t,"hercules-app":t,"hercules-dev":t,herokuapp:t,gr:t,smushcdn:t,wphostedmail:t,wpmucdn:t,pixolino:t,"apps-1and1":t,"live-website":t,"webspace-host":t,dopaas:t,"hosted-by-previder":J,hosteur:[0,{"rag-cloud":t,"rag-cloud-ch":t}],"ik-server":[0,{jcloud:t,"jcloud-ver-jpc":t}],jelastic:[0,{demo:t}],massivegrid:J,wafaicloud:[0,{jed:t,ryd:t}],"eu1-plenit":t,"la1-plenit":t,"us1-plenit":t,webadorsite:t,"on-forge":t,"on-vapor":t,lpusercontent:t,linode:[0,{members:t,nodebalancer:s}],linodeobjects:s,linodeusercontent:[0,{ip:t}],localtonet:t,lovableproject:t,barsycenter:t,barsyonline:t,lutrausercontent:s,magicpatternsapp:t,modelscape:t,mwcloudnonprod:t,polyspace:t,mazeplay:t,miniserver:t,atmeta:t,fbsbx:B,meteorapp:be,routingthecloud:t,"same-app":t,"same-preview":t,mydbserver:t,mochausercontent:t,hostedpi:t,"mythic-beasts":[0,{caracal:t,customer:t,fentiger:t,lynx:t,ocelot:t,oncilla:t,onza:t,sphinx:t,vs:t,x:t,yali:t}],nospamproxy:[0,{cloud:[2,{o365:t}]}],"4u":t,nfshost:t,"3utilities":t,blogsyte:t,ciscofreak:t,damnserver:t,ddnsking:t,ditchyourip:t,dnsiskinky:t,dynns:t,geekgalaxy:t,"health-carereform":t,homesecuritymac:t,homesecuritypc:t,myactivedirectory:t,mysecuritycamera:t,myvnc:t,"net-freaks":t,onthewifi:t,point2this:t,quicksytes:t,securitytactics:t,servebeer:t,servecounterstrike:t,serveexchange:t,serveftp:t,servegame:t,servehalflife:t,servehttp:t,servehumour:t,serveirc:t,servemp3:t,servep2p:t,servepics:t,servequake:t,servesarcasm:t,stufftoread:t,unusualperson:t,workisboring:t,myiphost:t,observableusercontent:[0,{static:t}],simplesite:t,oaiusercontent:s,orsites:t,operaunite:t,"customer-oci":[0,{"*":t,oci:s,ocp:s,ocs:s}],oraclecloudapps:s,oraclegovcloudapps:s,"authgear-staging":t,authgearapps:t,outsystemscloud:t,ownprovider:t,pgfog:t,pagexl:t,gotpantheon:t,paywhirl:s,forgeblocks:t,upsunapp:t,"postman-echo":t,prgmr:[0,{xen:t}],"project-study":[0,{dev:t}],pythonanywhere:be,qa2:t,"alpha-myqnapcloud":t,"dev-myqnapcloud":t,mycloudnas:t,mynascloud:t,myqnapcloud:t,qualifioapp:t,ladesk:t,qualyhqpartner:s,qualyhqportal:s,qbuser:t,quipelements:s,rackmaze:t,"readthedocs-hosted":t,rhcloud:t,onrender:t,render:ge,"subsc-pay":t,"180r":t,dojin:t,sakuratan:t,sakuraweb:t,x0:t,code:[0,{builder:s,"dev-builder":s,"stg-builder":s}],salesforce:[0,{platform:[0,{"code-builder-stg":[0,{test:[0,{"001":s}]}]}]}],logoip:t,scrysec:t,"firewall-gateway":t,myshopblocks:t,myshopify:t,shopitsite:t,"1kapp":t,appchizi:t,applinzi:t,sinaapp:t,vipsinaapp:t,streamlitapp:t,"try-snowplow":t,"playstation-cloud":t,myspreadshop:t,"w-corp-staticblitz":t,"w-credentialless-staticblitz":t,"w-staticblitz":t,"stackhero-network":t,stdlib:[0,{api:t}],strapiapp:[2,{media:t}],"streak-link":t,streaklinks:t,streakusercontent:t,"temp-dns":t,dsmynas:t,familyds:t,mytabit:t,taveusercontent:t,"tb-hosting":Ee,reservd:t,thingdustdata:t,"townnews-staging":t,typeform:[0,{pro:t}],hk:t,it:t,"deus-canvas":t,vultrobjects:s,wafflecell:t,hotelwithflight:t,"reserve-online":t,cprapid:t,pleskns:t,remotewd:t,wiardweb:[0,{pages:t}],"drive-platform":t,"base44-sandbox":t,wixsite:t,wixstudio:t,messwithdns:t,"woltlab-demo":t,wpenginepowered:[2,{js:t}],xnbay:[2,{u2:t,"u2-local":t}],xtooldevice:t,yolasite:t}],coop:e,cr:[1,{ac:e,co:e,ed:e,fi:e,go:e,or:e,sa:e}],cu:[1,{com:e,edu:e,gob:e,inf:e,nat:e,net:e,org:e}],cv:[1,{com:e,edu:e,id:e,int:e,net:e,nome:e,org:e,publ:e}],cw:Oe,cx:[1,{gov:e,cloudns:t,ath:t,info:t,assessments:t,calculators:t,funnels:t,paynow:t,quizzes:t,researched:t,tests:t}],cy:[1,{ac:e,biz:e,com:[1,{scaleforce:q}],ekloges:e,gov:e,ltd:e,mil:e,net:e,org:e,press:e,pro:e,tm:e}],cz:[1,{gov:e,contentproxy9:[0,{rsc:t}],realm:t,e4:t,co:t,metacentrum:[0,{cloud:s,custom:t}],muni:[0,{cloud:[0,{flt:t,usr:t}]}]}],de:[1,{bplaced:t,square7:t,"bwcloud-os-instance":s,com:t,cosidns:W,dnsupdater:t,"dynamisches-dns":t,"internet-dns":t,"l-o-g-i-n":t,ddnss:[2,{dyn:t,dyndns:t}],"dyn-ip24":t,dyndns1:t,"home-webserver":[2,{dyn:t}],"myhome-server":t,dnshome:t,fuettertdasnetz:t,isteingeek:t,istmein:t,lebtimnetz:t,leitungsen:t,traeumtgerade:t,frusky:s,goip:t,"xn--gnstigbestellen-zvb":t,günstigbestellen:t,"xn--gnstigliefern-wob":t,günstigliefern:t,"hs-heilbronn":[0,{it:[0,{pages:t,"pages-research":t}]}],"dyn-berlin":t,"in-berlin":t,"in-brb":t,"in-butter":t,"in-dsl":t,"in-vpn":t,iservschule:t,"mein-iserv":t,schuldock:t,schulplattform:t,schulserver:t,"test-iserv":t,keymachine:t,co:t,"git-repos":t,"lcube-server":t,"svn-repos":t,barsy:t,webspaceconfig:t,"123webseite":t,rub:t,"ruhr-uni-bochum":[2,{noc:[0,{io:t}]}],logoip:t,"firewall-gateway":t,"my-gateway":t,"my-router":t,spdns:t,my:t,speedpartner:[0,{customer:t}],myspreadshop:t,"taifun-dns":t,"12hp":t,"2ix":t,"4lima":t,"lima-city":t,"virtual-user":t,virtualuser:t,"community-pro":t,diskussionsbereich:t,xenonconnect:s}],dj:e,dk:[1,{biz:t,co:t,firm:t,reg:t,store:t,"123hjemmeside":t,myspreadshop:t}],dm:le,do:[1,{art:e,com:e,edu:e,gob:e,gov:e,mil:e,net:e,org:e,sld:e,web:e}],dz:[1,{art:e,asso:e,com:e,edu:e,gov:e,net:e,org:e,pol:e,soc:e,tm:e}],ec:[1,{abg:e,adm:e,agron:e,arqt:e,art:e,bar:e,chef:e,com:e,cont:e,cpa:e,cue:e,dent:e,dgn:e,disco:e,doc:e,edu:e,eng:e,esm:e,fin:e,fot:e,gal:e,gob:e,gov:e,gye:e,ibr:e,info:e,k12:e,lat:e,loj:e,med:e,mil:e,mktg:e,mon:e,net:e,ntr:e,odont:e,org:e,pro:e,prof:e,psic:e,psiq:e,pub:e,rio:e,rrpp:e,sal:e,tech:e,tul:e,tur:e,uio:e,vet:e,xxx:e,base:t,official:t}],edu:[1,{rit:[0,{"git-pages":t}]}],ee:[1,{aip:e,com:e,edu:e,fie:e,gov:e,lib:e,med:e,org:e,pri:e,riik:e}],eg:[1,{ac:e,com:e,edu:e,eun:e,gov:e,info:e,me:e,mil:e,name:e,net:e,org:e,sci:e,sport:e,tv:e}],er:k,es:[1,{com:e,edu:e,gob:e,nom:e,org:e,"123miweb":t,myspreadshop:t}],et:[1,{biz:e,com:e,edu:e,gov:e,info:e,name:e,net:e,org:e}],eu:[1,{amazonwebservices:[0,{on:[0,{"eusc-de-east-1":[0,{"cognito-idp":K}]}]}],cloudns:t,prvw:t,deuxfleurs:t,dogado:[0,{jelastic:t}],barsy:t,spdns:t,nxa:s,directwp:t,transurl:s}],fi:[1,{aland:e,dy:t,"xn--hkkinen-5wa":t,häkkinen:t,iki:t,cloudplatform:[0,{fi:t}],datacenter:[0,{demo:t,paas:t}],kapsi:t,"123kotisivu":t,myspreadshop:t}],fj:[1,{ac:e,biz:e,com:e,edu:e,gov:e,id:e,info:e,mil:e,name:e,net:e,org:e,pro:e}],fk:k,fm:[1,{com:e,edu:e,net:e,org:e,radio:t,user:s}],fo:e,fr:[1,{asso:e,com:e,gouv:e,nom:e,prd:e,tm:e,avoues:e,cci:e,greta:e,"huissier-justice":e,"fbx-os":t,fbxos:t,"freebox-os":t,freeboxos:t,goupile:t,kdns:t,"123siteweb":t,"on-web":t,"chirurgiens-dentistes-en-france":t,dedibox:t,aeroport:t,avocat:t,chambagri:t,"chirurgiens-dentistes":t,"experts-comptables":t,medecin:t,notaires:t,pharmacien:t,port:t,veterinaire:t,myspreadshop:t,ynh:t}],ga:e,gb:e,gd:[1,{edu:e,gov:e}],ge:[1,{com:e,edu:e,gov:e,net:e,org:e,pvt:e,school:e}],gf:e,gg:[1,{co:e,net:e,org:e,ply:[0,{at:s,d6:t}],botdash:t,kaas:t,stackit:t,panel:[2,{daemon:t}]}],gh:[1,{biz:e,com:e,edu:e,gov:e,mil:e,net:e,org:e}],gi:[1,{com:e,edu:e,gov:e,ltd:e,mod:e,org:e}],gl:[1,{co:e,com:e,edu:e,net:e,org:e}],gm:e,gn:[1,{ac:e,com:e,edu:e,gov:e,net:e,org:e}],gov:e,gp:[1,{asso:e,com:e,edu:e,mobi:e,net:e,org:e}],gq:e,gr:[1,{com:e,edu:e,gov:e,net:e,org:e,barsy:t,simplesite:t}],gs:e,gt:[1,{com:e,edu:e,gob:e,ind:e,mil:e,net:e,org:e}],gu:[1,{com:e,edu:e,gov:e,guam:e,info:e,net:e,org:e,web:e}],gw:[1,{nx:t}],gy:le,hk:[1,{com:e,edu:e,gov:e,idv:e,net:e,org:e,"xn--ciqpn":e,个人:e,"xn--gmqw5a":e,個人:e,"xn--55qx5d":e,公司:e,"xn--mxtq1m":e,政府:e,"xn--lcvr32d":e,敎育:e,"xn--wcvs22d":e,教育:e,"xn--gmq050i":e,箇人:e,"xn--uc0atv":e,組織:e,"xn--uc0ay4a":e,組织:e,"xn--od0alg":e,網絡:e,"xn--zf0avx":e,網络:e,"xn--mk0axi":e,组織:e,"xn--tn0ag":e,组织:e,"xn--od0aq3b":e,网絡:e,"xn--io0a7i":e,网络:e,inc:t,ltd:t}],hm:e,hn:[1,{com:e,edu:e,gob:e,mil:e,net:e,org:e}],hr:[1,{com:e,from:e,iz:e,name:e,brendly:_}],ht:[1,{adult:e,art:e,asso:e,com:e,coop:e,edu:e,firm:e,gouv:e,info:e,med:e,net:e,org:e,perso:e,pol:e,pro:e,rel:e,shop:e,rt:t}],hu:[1,{2e3:e,agrar:e,bolt:e,casino:e,city:e,co:e,erotica:e,erotika:e,film:e,forum:e,games:e,hotel:e,info:e,ingatlan:e,jogasz:e,konyvelo:e,lakas:e,media:e,news:e,org:e,priv:e,reklam:e,sex:e,shop:e,sport:e,suli:e,szex:e,tm:e,tozsde:e,utazas:e,video:e}],id:[1,{ac:e,biz:e,co:e,desa:e,go:e,kop:e,mil:e,my:e,net:e,or:e,ponpes:e,sch:e,web:e,"xn--9tfky":e,"ᬩᬮᬶ":e,e:t,zone:t}],ie:[1,{gov:e,myspreadshop:t}],il:[1,{ac:e,co:[1,{ravpage:t,mytabit:t,tabitorder:t}],gov:e,idf:e,k12:e,muni:e,net:e,org:e}],"xn--4dbrk0ce":[1,{"xn--4dbgdty6c":e,"xn--5dbhl8d":e,"xn--8dbq2a":e,"xn--hebda8b":e}],ישראל:[1,{אקדמיה:e,ישוב:e,צהל:e,ממשל:e}],im:[1,{ac:e,co:[1,{ltd:e,plc:e}],com:e,net:e,org:e,tt:e,tv:e}],in:[1,{"5g":e,"6g":e,ac:e,ai:e,am:e,bank:e,bihar:e,biz:e,business:e,ca:e,cn:e,co:e,com:e,coop:e,cs:e,delhi:e,dr:e,edu:e,er:e,fin:e,firm:e,gen:e,gov:e,gujarat:e,ind:e,info:e,int:e,internet:e,io:e,me:e,mil:e,net:e,nic:e,org:e,pg:e,post:e,pro:e,res:e,travel:e,tv:e,uk:e,up:e,us:e,cloudns:t,barsy:t,web:t,indevs:t,supabase:t}],info:[1,{cloudns:t,"dynamic-dns":t,"barrel-of-knowledge":t,"barrell-of-knowledge":t,dyndns:t,"for-our":t,"groks-the":t,"groks-this":t,"here-for-more":t,knowsitall:t,selfip:t,webhop:t,barsy:t,mayfirst:t,mittwald:t,mittwaldserver:t,typo3server:t,dvrcam:t,ilovecollege:t,"no-ip":t,forumz:t,nsupdate:t,dnsupdate:t,"v-info":t}],int:[1,{eu:e}],io:[1,{2038:t,co:e,com:e,edu:e,gov:e,mil:e,net:e,nom:e,org:e,"on-acorn":s,myaddr:t,apigee:t,"b-data":t,beagleboard:t,bitbucket:t,bluebite:t,boxfuse:t,brave:i,browsersafetymark:t,bubble:Me,bubbleapps:t,bigv:[0,{uk0:t}],cleverapps:t,cloudbeesusercontent:t,dappnode:[0,{dyndns:t}],darklang:t,definima:t,dedyn:t,icp0:gt,icp1:gt,qzz:t,"fh-muenster":t,gitbook:t,github:t,gitlab:t,lolipop:t,"hasura-app":t,hostyhosting:t,hypernode:t,moonscale:s,beebyte:J,beebyteapp:[0,{sekd1:t}],jele:t,keenetic:t,kiloapps:t,webthings:t,loginline:t,barsy:t,azurecontainer:s,ngrok:[2,{ap:t,au:t,eu:t,in:t,jp:t,sa:t,us:t}],nodeart:[0,{stage:t}],pantheonsite:t,forgerock:[0,{id:t}],pstmn:[2,{mock:t}],protonet:t,qcx:[2,{sys:s}],qoto:t,vaporcloud:t,myrdbx:t,"rb-hosting":Ee,"on-k3s":s,"on-rio":s,readthedocs:t,resindevice:t,resinstaging:[0,{devices:t}],hzc:t,sandcats:t,scrypted:[0,{client:t}],"mo-siemens":t,lair:B,stolos:s,musician:t,utwente:t,edugit:t,telebit:t,thingdust:[0,{dev:it,disrec:it,prod:Ct,testing:it}],tickets:t,webflow:t,webflowtest:t,"drive-platform":t,editorx:t,wixstudio:t,basicserver:t,virtualserver:t}],iq:r,ir:[1,{ac:e,co:e,gov:e,id:e,net:e,org:e,sch:e,"xn--mgba3a4f16a":e,ایران:e,"xn--mgba3a4fra":e,ايران:e,arvanedge:t,vistablog:t}],is:e,it:[1,{edu:e,gov:e,abr:e,abruzzo:e,"aosta-valley":e,aostavalley:e,bas:e,basilicata:e,cal:e,calabria:e,cam:e,campania:e,"emilia-romagna":e,emiliaromagna:e,emr:e,"friuli-v-giulia":e,"friuli-ve-giulia":e,"friuli-vegiulia":e,"friuli-venezia-giulia":e,"friuli-veneziagiulia":e,"friuli-vgiulia":e,"friuliv-giulia":e,"friulive-giulia":e,friulivegiulia:e,"friulivenezia-giulia":e,friuliveneziagiulia:e,friulivgiulia:e,fvg:e,laz:e,lazio:e,lig:e,liguria:e,lom:e,lombardia:e,lombardy:e,lucania:e,mar:e,marche:e,mol:e,molise:e,piedmont:e,piemonte:e,pmn:e,pug:e,puglia:e,sar:e,sardegna:e,sardinia:e,sic:e,sicilia:e,sicily:e,taa:e,tos:e,toscana:e,"trentin-sud-tirol":e,"xn--trentin-sd-tirol-rzb":e,"trentin-süd-tirol":e,"trentin-sudtirol":e,"xn--trentin-sdtirol-7vb":e,"trentin-südtirol":e,"trentin-sued-tirol":e,"trentin-suedtirol":e,trentino:e,"trentino-a-adige":e,"trentino-aadige":e,"trentino-alto-adige":e,"trentino-altoadige":e,"trentino-s-tirol":e,"trentino-stirol":e,"trentino-sud-tirol":e,"xn--trentino-sd-tirol-c3b":e,"trentino-süd-tirol":e,"trentino-sudtirol":e,"xn--trentino-sdtirol-szb":e,"trentino-südtirol":e,"trentino-sued-tirol":e,"trentino-suedtirol":e,"trentinoa-adige":e,trentinoaadige:e,"trentinoalto-adige":e,trentinoaltoadige:e,"trentinos-tirol":e,trentinostirol:e,"trentinosud-tirol":e,"xn--trentinosd-tirol-rzb":e,"trentinosüd-tirol":e,trentinosudtirol:e,"xn--trentinosdtirol-7vb":e,trentinosüdtirol:e,"trentinosued-tirol":e,trentinosuedtirol:e,"trentinsud-tirol":e,"xn--trentinsd-tirol-6vb":e,"trentinsüd-tirol":e,trentinsudtirol:e,"xn--trentinsdtirol-nsb":e,trentinsüdtirol:e,"trentinsued-tirol":e,trentinsuedtirol:e,tuscany:e,umb:e,umbria:e,"val-d-aosta":e,"val-daosta":e,"vald-aosta":e,valdaosta:e,"valle-aosta":e,"valle-d-aosta":e,"valle-daosta":e,valleaosta:e,"valled-aosta":e,valledaosta:e,"vallee-aoste":e,"xn--valle-aoste-ebb":e,"vallée-aoste":e,"vallee-d-aoste":e,"xn--valle-d-aoste-ehb":e,"vallée-d-aoste":e,valleeaoste:e,"xn--valleaoste-e7a":e,valléeaoste:e,valleedaoste:e,"xn--valledaoste-ebb":e,valléedaoste:e,vao:e,vda:e,ven:e,veneto:e,ag:e,agrigento:e,al:e,alessandria:e,"alto-adige":e,altoadige:e,an:e,ancona:e,"andria-barletta-trani":e,"andria-trani-barletta":e,andriabarlettatrani:e,andriatranibarletta:e,ao:e,aosta:e,aoste:e,ap:e,aq:e,aquila:e,ar:e,arezzo:e,"ascoli-piceno":e,ascolipiceno:e,asti:e,at:e,av:e,avellino:e,ba:e,balsan:e,"balsan-sudtirol":e,"xn--balsan-sdtirol-nsb":e,"balsan-südtirol":e,"balsan-suedtirol":e,bari:e,"barletta-trani-andria":e,barlettatraniandria:e,belluno:e,benevento:e,bergamo:e,bg:e,bi:e,biella:e,bl:e,bn:e,bo:e,bologna:e,bolzano:e,"bolzano-altoadige":e,bozen:e,"bozen-sudtirol":e,"xn--bozen-sdtirol-2ob":e,"bozen-südtirol":e,"bozen-suedtirol":e,br:e,brescia:e,brindisi:e,bs:e,bt:e,bulsan:e,"bulsan-sudtirol":e,"xn--bulsan-sdtirol-nsb":e,"bulsan-südtirol":e,"bulsan-suedtirol":e,bz:e,ca:e,cagliari:e,caltanissetta:e,"campidano-medio":e,campidanomedio:e,campobasso:e,"carbonia-iglesias":e,carboniaiglesias:e,"carrara-massa":e,carraramassa:e,caserta:e,catania:e,catanzaro:e,cb:e,ce:e,"cesena-forli":e,"xn--cesena-forl-mcb":e,"cesena-forlì":e,cesenaforli:e,"xn--cesenaforl-i8a":e,cesenaforlì:e,ch:e,chieti:e,ci:e,cl:e,cn:e,co:e,como:e,cosenza:e,cr:e,cremona:e,crotone:e,cs:e,ct:e,cuneo:e,cz:e,"dell-ogliastra":e,dellogliastra:e,en:e,enna:e,fc:e,fe:e,fermo:e,ferrara:e,fg:e,fi:e,firenze:e,florence:e,fm:e,foggia:e,"forli-cesena":e,"xn--forl-cesena-fcb":e,"forlì-cesena":e,forlicesena:e,"xn--forlcesena-c8a":e,forlìcesena:e,fr:e,frosinone:e,ge:e,genoa:e,genova:e,go:e,gorizia:e,gr:e,grosseto:e,"iglesias-carbonia":e,iglesiascarbonia:e,im:e,imperia:e,is:e,isernia:e,kr:e,"la-spezia":e,laquila:e,laspezia:e,latina:e,lc:e,le:e,lecce:e,lecco:e,li:e,livorno:e,lo:e,lodi:e,lt:e,lu:e,lucca:e,macerata:e,mantova:e,"massa-carrara":e,massacarrara:e,matera:e,mb:e,mc:e,me:e,"medio-campidano":e,mediocampidano:e,messina:e,mi:e,milan:e,milano:e,mn:e,mo:e,modena:e,monza:e,"monza-brianza":e,"monza-e-della-brianza":e,monzabrianza:e,monzaebrianza:e,monzaedellabrianza:e,ms:e,mt:e,na:e,naples:e,napoli:e,no:e,novara:e,nu:e,nuoro:e,og:e,ogliastra:e,"olbia-tempio":e,olbiatempio:e,or:e,oristano:e,ot:e,pa:e,padova:e,padua:e,palermo:e,parma:e,pavia:e,pc:e,pd:e,pe:e,perugia:e,"pesaro-urbino":e,pesarourbino:e,pescara:e,pg:e,pi:e,piacenza:e,pisa:e,pistoia:e,pn:e,po:e,pordenone:e,potenza:e,pr:e,prato:e,pt:e,pu:e,pv:e,pz:e,ra:e,ragusa:e,ravenna:e,rc:e,re:e,"reggio-calabria":e,"reggio-emilia":e,reggiocalabria:e,reggioemilia:e,rg:e,ri:e,rieti:e,rimini:e,rm:e,rn:e,ro:e,roma:e,rome:e,rovigo:e,sa:e,salerno:e,sassari:e,savona:e,si:e,siena:e,siracusa:e,so:e,sondrio:e,sp:e,sr:e,ss:e,"xn--sdtirol-n2a":e,südtirol:e,suedtirol:e,sv:e,ta:e,taranto:e,te:e,"tempio-olbia":e,tempioolbia:e,teramo:e,terni:e,tn:e,to:e,torino:e,tp:e,tr:e,"trani-andria-barletta":e,"trani-barletta-andria":e,traniandriabarletta:e,tranibarlettaandria:e,trapani:e,trento:e,treviso:e,trieste:e,ts:e,turin:e,tv:e,ud:e,udine:e,"urbino-pesaro":e,urbinopesaro:e,va:e,varese:e,vb:e,vc:e,ve:e,venezia:e,venice:e,verbania:e,vercelli:e,verona:e,vi:e,"vibo-valentia":e,vibovalentia:e,vicenza:e,viterbo:e,vr:e,vs:e,vt:e,vv:e,ibxos:t,iliadboxos:t,neen:[0,{jc:t}],"123homepage":t,"16-b":t,"32-b":t,"64-b":t,myspreadshop:t,syncloud:t}],je:[1,{co:e,net:e,org:e,of:t}],jm:k,jo:[1,{agri:e,ai:e,com:e,edu:e,eng:e,fm:e,gov:e,mil:e,net:e,org:e,per:e,phd:e,sch:e,tv:e}],jobs:e,jp:[1,{ac:e,ad:e,co:e,ed:e,go:e,gr:e,lg:e,ne:[1,{aseinet:Fe,gehirn:t,ivory:t,"mail-box":t,mints:t,mokuren:t,opal:t,sakura:t,sumomo:t,topaz:t}],or:e,aichi:[1,{aisai:e,ama:e,anjo:e,asuke:e,chiryu:e,chita:e,fuso:e,gamagori:e,handa:e,hazu:e,hekinan:e,higashiura:e,ichinomiya:e,inazawa:e,inuyama:e,isshiki:e,iwakura:e,kanie:e,kariya:e,kasugai:e,kira:e,kiyosu:e,komaki:e,konan:e,kota:e,mihama:e,miyoshi:e,nishio:e,nisshin:e,obu:e,oguchi:e,oharu:e,okazaki:e,owariasahi:e,seto:e,shikatsu:e,shinshiro:e,shitara:e,tahara:e,takahama:e,tobishima:e,toei:e,togo:e,tokai:e,tokoname:e,toyoake:e,toyohashi:e,toyokawa:e,toyone:e,toyota:e,tsushima:e,yatomi:e}],akita:[1,{akita:e,daisen:e,fujisato:e,gojome:e,hachirogata:e,happou:e,higashinaruse:e,honjo:e,honjyo:e,ikawa:e,kamikoani:e,kamioka:e,katagami:e,kazuno:e,kitaakita:e,kosaka:e,kyowa:e,misato:e,mitane:e,moriyoshi:e,nikaho:e,noshiro:e,odate:e,oga:e,ogata:e,semboku:e,yokote:e,yurihonjo:e}],aomori:[1,{aomori:e,gonohe:e,hachinohe:e,hashikami:e,hiranai:e,hirosaki:e,itayanagi:e,kuroishi:e,misawa:e,mutsu:e,nakadomari:e,noheji:e,oirase:e,owani:e,rokunohe:e,sannohe:e,shichinohe:e,shingo:e,takko:e,towada:e,tsugaru:e,tsuruta:e}],chiba:[1,{abiko:e,asahi:e,chonan:e,chosei:e,choshi:e,chuo:e,funabashi:e,futtsu:e,hanamigawa:e,ichihara:e,ichikawa:e,ichinomiya:e,inzai:e,isumi:e,kamagaya:e,kamogawa:e,kashiwa:e,katori:e,katsuura:e,kimitsu:e,kisarazu:e,kozaki:e,kujukuri:e,kyonan:e,matsudo:e,midori:e,mihama:e,minamiboso:e,mobara:e,mutsuzawa:e,nagara:e,nagareyama:e,narashino:e,narita:e,noda:e,oamishirasato:e,omigawa:e,onjuku:e,otaki:e,sakae:e,sakura:e,shimofusa:e,shirako:e,shiroi:e,shisui:e,sodegaura:e,sosa:e,tako:e,tateyama:e,togane:e,tohnosho:e,tomisato:e,urayasu:e,yachimata:e,yachiyo:e,yokaichiba:e,yokoshibahikari:e,yotsukaido:e}],ehime:[1,{ainan:e,honai:e,ikata:e,imabari:e,iyo:e,kamijima:e,kihoku:e,kumakogen:e,masaki:e,matsuno:e,matsuyama:e,namikata:e,niihama:e,ozu:e,saijo:e,seiyo:e,shikokuchuo:e,tobe:e,toon:e,uchiko:e,uwajima:e,yawatahama:e}],fukui:[1,{echizen:e,eiheiji:e,fukui:e,ikeda:e,katsuyama:e,mihama:e,minamiechizen:e,obama:e,ohi:e,ono:e,sabae:e,sakai:e,takahama:e,tsuruga:e,wakasa:e}],fukuoka:[1,{ashiya:e,buzen:e,chikugo:e,chikuho:e,chikujo:e,chikushino:e,chikuzen:e,chuo:e,dazaifu:e,fukuchi:e,hakata:e,higashi:e,hirokawa:e,hisayama:e,iizuka:e,inatsuki:e,kaho:e,kasuga:e,kasuya:e,kawara:e,keisen:e,koga:e,kurate:e,kurogi:e,kurume:e,minami:e,miyako:e,miyama:e,miyawaka:e,mizumaki:e,munakata:e,nakagawa:e,nakama:e,nishi:e,nogata:e,ogori:e,okagaki:e,okawa:e,oki:e,omuta:e,onga:e,onojo:e,oto:e,saigawa:e,sasaguri:e,shingu:e,shinyoshitomi:e,shonai:e,soeda:e,sue:e,tachiarai:e,tagawa:e,takata:e,toho:e,toyotsu:e,tsuiki:e,ukiha:e,umi:e,usui:e,yamada:e,yame:e,yanagawa:e,yukuhashi:e}],fukushima:[1,{aizubange:e,aizumisato:e,aizuwakamatsu:e,asakawa:e,bandai:e,date:e,fukushima:e,furudono:e,futaba:e,hanawa:e,higashi:e,hirata:e,hirono:e,iitate:e,inawashiro:e,ishikawa:e,iwaki:e,izumizaki:e,kagamiishi:e,kaneyama:e,kawamata:e,kitakata:e,kitashiobara:e,koori:e,koriyama:e,kunimi:e,miharu:e,mishima:e,namie:e,nango:e,nishiaizu:e,nishigo:e,okuma:e,omotego:e,ono:e,otama:e,samegawa:e,shimogo:e,shirakawa:e,showa:e,soma:e,sukagawa:e,taishin:e,tamakawa:e,tanagura:e,tenei:e,yabuki:e,yamato:e,yamatsuri:e,yanaizu:e,yugawa:e}],gifu:[1,{anpachi:e,ena:e,gifu:e,ginan:e,godo:e,gujo:e,hashima:e,hichiso:e,hida:e,higashishirakawa:e,ibigawa:e,ikeda:e,kakamigahara:e,kani:e,kasahara:e,kasamatsu:e,kawaue:e,kitagata:e,mino:e,minokamo:e,mitake:e,mizunami:e,motosu:e,nakatsugawa:e,ogaki:e,sakahogi:e,seki:e,sekigahara:e,shirakawa:e,tajimi:e,takayama:e,tarui:e,toki:e,tomika:e,wanouchi:e,yamagata:e,yaotsu:e,yoro:e}],gunma:[1,{annaka:e,chiyoda:e,fujioka:e,higashiagatsuma:e,isesaki:e,itakura:e,kanna:e,kanra:e,katashina:e,kawaba:e,kiryu:e,kusatsu:e,maebashi:e,meiwa:e,midori:e,minakami:e,naganohara:e,nakanojo:e,nanmoku:e,numata:e,oizumi:e,ora:e,ota:e,shibukawa:e,shimonita:e,shinto:e,showa:e,takasaki:e,takayama:e,tamamura:e,tatebayashi:e,tomioka:e,tsukiyono:e,tsumagoi:e,ueno:e,yoshioka:e}],hiroshima:[1,{asaminami:e,daiwa:e,etajima:e,fuchu:e,fukuyama:e,hatsukaichi:e,higashihiroshima:e,hongo:e,jinsekikogen:e,kaita:e,kui:e,kumano:e,kure:e,mihara:e,miyoshi:e,naka:e,onomichi:e,osakikamijima:e,otake:e,saka:e,sera:e,seranishi:e,shinichi:e,shobara:e,takehara:e}],hokkaido:[1,{abashiri:e,abira:e,aibetsu:e,akabira:e,akkeshi:e,asahikawa:e,ashibetsu:e,ashoro:e,assabu:e,atsuma:e,bibai:e,biei:e,bifuka:e,bihoro:e,biratori:e,chippubetsu:e,chitose:e,date:e,ebetsu:e,embetsu:e,eniwa:e,erimo:e,esan:e,esashi:e,fukagawa:e,fukushima:e,furano:e,furubira:e,haboro:e,hakodate:e,hamatonbetsu:e,hidaka:e,higashikagura:e,higashikawa:e,hiroo:e,hokuryu:e,hokuto:e,honbetsu:e,horokanai:e,horonobe:e,ikeda:e,imakane:e,ishikari:e,iwamizawa:e,iwanai:e,kamifurano:e,kamikawa:e,kamishihoro:e,kamisunagawa:e,kamoenai:e,kayabe:e,kembuchi:e,kikonai:e,kimobetsu:e,kitahiroshima:e,kitami:e,kiyosato:e,koshimizu:e,kunneppu:e,kuriyama:e,kuromatsunai:e,kushiro:e,kutchan:e,kyowa:e,mashike:e,matsumae:e,mikasa:e,minamifurano:e,mombetsu:e,moseushi:e,mukawa:e,muroran:e,naie:e,nakagawa:e,nakasatsunai:e,nakatombetsu:e,nanae:e,nanporo:e,nayoro:e,nemuro:e,niikappu:e,niki:e,nishiokoppe:e,noboribetsu:e,numata:e,obihiro:e,obira:e,oketo:e,okoppe:e,otaru:e,otobe:e,otofuke:e,otoineppu:e,oumu:e,ozora:e,pippu:e,rankoshi:e,rebun:e,rikubetsu:e,rishiri:e,rishirifuji:e,saroma:e,sarufutsu:e,shakotan:e,shari:e,shibecha:e,shibetsu:e,shikabe:e,shikaoi:e,shimamaki:e,shimizu:e,shimokawa:e,shinshinotsu:e,shintoku:e,shiranuka:e,shiraoi:e,shiriuchi:e,sobetsu:e,sunagawa:e,taiki:e,takasu:e,takikawa:e,takinoue:e,teshikaga:e,tobetsu:e,tohma:e,tomakomai:e,tomari:e,toya:e,toyako:e,toyotomi:e,toyoura:e,tsubetsu:e,tsukigata:e,urakawa:e,urausu:e,uryu:e,utashinai:e,wakkanai:e,wassamu:e,yakumo:e,yoichi:e}],hyogo:[1,{aioi:e,akashi:e,ako:e,amagasaki:e,aogaki:e,asago:e,ashiya:e,awaji:e,fukusaki:e,goshiki:e,harima:e,himeji:e,ichikawa:e,inagawa:e,itami:e,kakogawa:e,kamigori:e,kamikawa:e,kasai:e,kasuga:e,kawanishi:e,miki:e,minamiawaji:e,nishinomiya:e,nishiwaki:e,ono:e,sanda:e,sannan:e,sasayama:e,sayo:e,shingu:e,shinonsen:e,shiso:e,sumoto:e,taishi:e,taka:e,takarazuka:e,takasago:e,takino:e,tamba:e,tatsuno:e,toyooka:e,yabu:e,yashiro:e,yoka:e,yokawa:e}],ibaraki:[1,{ami:e,asahi:e,bando:e,chikusei:e,daigo:e,fujishiro:e,hitachi:e,hitachinaka:e,hitachiomiya:e,hitachiota:e,ibaraki:e,ina:e,inashiki:e,itako:e,iwama:e,joso:e,kamisu:e,kasama:e,kashima:e,kasumigaura:e,koga:e,miho:e,mito:e,moriya:e,naka:e,namegata:e,oarai:e,ogawa:e,omitama:e,ryugasaki:e,sakai:e,sakuragawa:e,shimodate:e,shimotsuma:e,shirosato:e,sowa:e,suifu:e,takahagi:e,tamatsukuri:e,tokai:e,tomobe:e,tone:e,toride:e,tsuchiura:e,tsukuba:e,uchihara:e,ushiku:e,yachiyo:e,yamagata:e,yawara:e,yuki:e}],ishikawa:[1,{anamizu:e,hakui:e,hakusan:e,kaga:e,kahoku:e,kanazawa:e,kawakita:e,komatsu:e,nakanoto:e,nanao:e,nomi:e,nonoichi:e,noto:e,shika:e,suzu:e,tsubata:e,tsurugi:e,uchinada:e,wajima:e}],iwate:[1,{fudai:e,fujisawa:e,hanamaki:e,hiraizumi:e,hirono:e,ichinohe:e,ichinoseki:e,iwaizumi:e,iwate:e,joboji:e,kamaishi:e,kanegasaki:e,karumai:e,kawai:e,kitakami:e,kuji:e,kunohe:e,kuzumaki:e,miyako:e,mizusawa:e,morioka:e,ninohe:e,noda:e,ofunato:e,oshu:e,otsuchi:e,rikuzentakata:e,shiwa:e,shizukuishi:e,sumita:e,tanohata:e,tono:e,yahaba:e,yamada:e}],kagawa:[1,{ayagawa:e,higashikagawa:e,kanonji:e,kotohira:e,manno:e,marugame:e,mitoyo:e,naoshima:e,sanuki:e,tadotsu:e,takamatsu:e,tonosho:e,uchinomi:e,utazu:e,zentsuji:e}],kagoshima:[1,{akune:e,amami:e,hioki:e,isa:e,isen:e,izumi:e,kagoshima:e,kanoya:e,kawanabe:e,kinko:e,kouyama:e,makurazaki:e,matsumoto:e,minamitane:e,nakatane:e,nishinoomote:e,satsumasendai:e,soo:e,tarumizu:e,yusui:e}],kanagawa:[1,{aikawa:e,atsugi:e,ayase:e,chigasaki:e,ebina:e,fujisawa:e,hadano:e,hakone:e,hiratsuka:e,isehara:e,kaisei:e,kamakura:e,kiyokawa:e,matsuda:e,minamiashigara:e,miura:e,nakai:e,ninomiya:e,odawara:e,oi:e,oiso:e,sagamihara:e,samukawa:e,tsukui:e,yamakita:e,yamato:e,yokosuka:e,yugawara:e,zama:e,zushi:e}],kochi:[1,{aki:e,geisei:e,hidaka:e,higashitsuno:e,ino:e,kagami:e,kami:e,kitagawa:e,kochi:e,mihara:e,motoyama:e,muroto:e,nahari:e,nakamura:e,nankoku:e,nishitosa:e,niyodogawa:e,ochi:e,okawa:e,otoyo:e,otsuki:e,sakawa:e,sukumo:e,susaki:e,tosa:e,tosashimizu:e,toyo:e,tsuno:e,umaji:e,yasuda:e,yusuhara:e}],kumamoto:[1,{amakusa:e,arao:e,aso:e,choyo:e,gyokuto:e,kamiamakusa:e,kikuchi:e,kumamoto:e,mashiki:e,mifune:e,minamata:e,minamioguni:e,nagasu:e,nishihara:e,oguni:e,ozu:e,sumoto:e,takamori:e,uki:e,uto:e,yamaga:e,yamato:e,yatsushiro:e}],kyoto:[1,{ayabe:e,fukuchiyama:e,higashiyama:e,ide:e,ine:e,joyo:e,kameoka:e,kamo:e,kita:e,kizu:e,kumiyama:e,kyotamba:e,kyotanabe:e,kyotango:e,maizuru:e,minami:e,minamiyamashiro:e,miyazu:e,muko:e,nagaokakyo:e,nakagyo:e,nantan:e,oyamazaki:e,sakyo:e,seika:e,tanabe:e,uji:e,ujitawara:e,wazuka:e,yamashina:e,yawata:e}],mie:[1,{asahi:e,inabe:e,ise:e,kameyama:e,kawagoe:e,kiho:e,kisosaki:e,kiwa:e,komono:e,kumano:e,kuwana:e,matsusaka:e,meiwa:e,mihama:e,minamiise:e,misugi:e,miyama:e,nabari:e,shima:e,suzuka:e,tado:e,taiki:e,taki:e,tamaki:e,toba:e,tsu:e,udono:e,ureshino:e,watarai:e,yokkaichi:e}],miyagi:[1,{furukawa:e,higashimatsushima:e,ishinomaki:e,iwanuma:e,kakuda:e,kami:e,kawasaki:e,marumori:e,matsushima:e,minamisanriku:e,misato:e,murata:e,natori:e,ogawara:e,ohira:e,onagawa:e,osaki:e,rifu:e,semine:e,shibata:e,shichikashuku:e,shikama:e,shiogama:e,shiroishi:e,tagajo:e,taiwa:e,tome:e,tomiya:e,wakuya:e,watari:e,yamamoto:e,zao:e}],miyazaki:[1,{aya:e,ebino:e,gokase:e,hyuga:e,kadogawa:e,kawaminami:e,kijo:e,kitagawa:e,kitakata:e,kitaura:e,kobayashi:e,kunitomi:e,kushima:e,mimata:e,miyakonojo:e,miyazaki:e,morotsuka:e,nichinan:e,nishimera:e,nobeoka:e,saito:e,shiiba:e,shintomi:e,takaharu:e,takanabe:e,takazaki:e,tsuno:e}],nagano:[1,{achi:e,agematsu:e,anan:e,aoki:e,asahi:e,azumino:e,chikuhoku:e,chikuma:e,chino:e,fujimi:e,hakuba:e,hara:e,hiraya:e,iida:e,iijima:e,iiyama:e,iizuna:e,ikeda:e,ikusaka:e,ina:e,karuizawa:e,kawakami:e,kiso:e,kisofukushima:e,kitaaiki:e,komagane:e,komoro:e,matsukawa:e,matsumoto:e,miasa:e,minamiaiki:e,minamimaki:e,minamiminowa:e,minowa:e,miyada:e,miyota:e,mochizuki:e,nagano:e,nagawa:e,nagiso:e,nakagawa:e,nakano:e,nozawaonsen:e,obuse:e,ogawa:e,okaya:e,omachi:e,omi:e,ookuwa:e,ooshika:e,otaki:e,otari:e,sakae:e,sakaki:e,saku:e,sakuho:e,shimosuwa:e,shinanomachi:e,shiojiri:e,suwa:e,suzaka:e,takagi:e,takamori:e,takayama:e,tateshina:e,tatsuno:e,togakushi:e,togura:e,tomi:e,ueda:e,wada:e,yamagata:e,yamanouchi:e,yasaka:e,yasuoka:e}],nagasaki:[1,{chijiwa:e,futsu:e,goto:e,hasami:e,hirado:e,iki:e,isahaya:e,kawatana:e,kuchinotsu:e,matsuura:e,nagasaki:e,obama:e,omura:e,oseto:e,saikai:e,sasebo:e,seihi:e,shimabara:e,shinkamigoto:e,togitsu:e,tsushima:e,unzen:e}],nara:[1,{ando:e,gose:e,heguri:e,higashiyoshino:e,ikaruga:e,ikoma:e,kamikitayama:e,kanmaki:e,kashiba:e,kashihara:e,katsuragi:e,kawai:e,kawakami:e,kawanishi:e,koryo:e,kurotaki:e,mitsue:e,miyake:e,nara:e,nosegawa:e,oji:e,ouda:e,oyodo:e,sakurai:e,sango:e,shimoichi:e,shimokitayama:e,shinjo:e,soni:e,takatori:e,tawaramoto:e,tenkawa:e,tenri:e,uda:e,yamatokoriyama:e,yamatotakada:e,yamazoe:e,yoshino:e}],niigata:[1,{aga:e,agano:e,gosen:e,itoigawa:e,izumozaki:e,joetsu:e,kamo:e,kariwa:e,kashiwazaki:e,minamiuonuma:e,mitsuke:e,muika:e,murakami:e,myoko:e,nagaoka:e,niigata:e,ojiya:e,omi:e,sado:e,sanjo:e,seiro:e,seirou:e,sekikawa:e,shibata:e,tagami:e,tainai:e,tochio:e,tokamachi:e,tsubame:e,tsunan:e,uonuma:e,yahiko:e,yoita:e,yuzawa:e}],oita:[1,{beppu:e,bungoono:e,bungotakada:e,hasama:e,hiji:e,himeshima:e,hita:e,kamitsue:e,kokonoe:e,kuju:e,kunisaki:e,kusu:e,oita:e,saiki:e,taketa:e,tsukumi:e,usa:e,usuki:e,yufu:e}],okayama:[1,{akaiwa:e,asakuchi:e,bizen:e,hayashima:e,ibara:e,kagamino:e,kasaoka:e,kibichuo:e,kumenan:e,kurashiki:e,maniwa:e,misaki:e,nagi:e,niimi:e,nishiawakura:e,okayama:e,satosho:e,setouchi:e,shinjo:e,shoo:e,soja:e,takahashi:e,tamano:e,tsuyama:e,wake:e,yakage:e}],okinawa:[1,{aguni:e,ginowan:e,ginoza:e,gushikami:e,haebaru:e,higashi:e,hirara:e,iheya:e,ishigaki:e,ishikawa:e,itoman:e,izena:e,kadena:e,kin:e,kitadaito:e,kitanakagusuku:e,kumejima:e,kunigami:e,minamidaito:e,motobu:e,nago:e,naha:e,nakagusuku:e,nakijin:e,nanjo:e,nishihara:e,ogimi:e,okinawa:e,onna:e,shimoji:e,taketomi:e,tarama:e,tokashiki:e,tomigusuku:e,tonaki:e,urasoe:e,uruma:e,yaese:e,yomitan:e,yonabaru:e,yonaguni:e,zamami:e}],osaka:[1,{abeno:e,chihayaakasaka:e,chuo:e,daito:e,fujiidera:e,habikino:e,hannan:e,higashiosaka:e,higashisumiyoshi:e,higashiyodogawa:e,hirakata:e,ibaraki:e,ikeda:e,izumi:e,izumiotsu:e,izumisano:e,kadoma:e,kaizuka:e,kanan:e,kashiwara:e,katano:e,kawachinagano:e,kishiwada:e,kita:e,kumatori:e,matsubara:e,minato:e,minoh:e,misaki:e,moriguchi:e,neyagawa:e,nishi:e,nose:e,osakasayama:e,sakai:e,sayama:e,sennan:e,settsu:e,shijonawate:e,shimamoto:e,suita:e,tadaoka:e,taishi:e,tajiri:e,takaishi:e,takatsuki:e,tondabayashi:e,toyonaka:e,toyono:e,yao:e}],saga:[1,{ariake:e,arita:e,fukudomi:e,genkai:e,hamatama:e,hizen:e,imari:e,kamimine:e,kanzaki:e,karatsu:e,kashima:e,kitagata:e,kitahata:e,kiyama:e,kouhoku:e,kyuragi:e,nishiarita:e,ogi:e,omachi:e,ouchi:e,saga:e,shiroishi:e,taku:e,tara:e,tosu:e,yoshinogari:e}],saitama:[1,{arakawa:e,asaka:e,chichibu:e,fujimi:e,fujimino:e,fukaya:e,hanno:e,hanyu:e,hasuda:e,hatogaya:e,hatoyama:e,hidaka:e,higashichichibu:e,higashimatsuyama:e,honjo:e,ina:e,iruma:e,iwatsuki:e,kamiizumi:e,kamikawa:e,kamisato:e,kasukabe:e,kawagoe:e,kawaguchi:e,kawajima:e,kazo:e,kitamoto:e,koshigaya:e,kounosu:e,kuki:e,kumagaya:e,matsubushi:e,minano:e,misato:e,miyashiro:e,miyoshi:e,moroyama:e,nagatoro:e,namegawa:e,niiza:e,ogano:e,ogawa:e,ogose:e,okegawa:e,omiya:e,otaki:e,ranzan:e,ryokami:e,saitama:e,sakado:e,satte:e,sayama:e,shiki:e,shiraoka:e,soka:e,sugito:e,toda:e,tokigawa:e,tokorozawa:e,tsurugashima:e,urawa:e,warabi:e,yashio:e,yokoze:e,yono:e,yorii:e,yoshida:e,yoshikawa:e,yoshimi:e}],shiga:[1,{aisho:e,gamo:e,higashiomi:e,hikone:e,koka:e,konan:e,kosei:e,koto:e,kusatsu:e,maibara:e,moriyama:e,nagahama:e,nishiazai:e,notogawa:e,omihachiman:e,otsu:e,ritto:e,ryuoh:e,takashima:e,takatsuki:e,torahime:e,toyosato:e,yasu:e}],shimane:[1,{akagi:e,ama:e,gotsu:e,hamada:e,higashiizumo:e,hikawa:e,hikimi:e,izumo:e,kakinoki:e,masuda:e,matsue:e,misato:e,nishinoshima:e,ohda:e,okinoshima:e,okuizumo:e,shimane:e,tamayu:e,tsuwano:e,unnan:e,yakumo:e,yasugi:e,yatsuka:e}],shizuoka:[1,{arai:e,atami:e,fuji:e,fujieda:e,fujikawa:e,fujinomiya:e,fukuroi:e,gotemba:e,haibara:e,hamamatsu:e,higashiizu:e,ito:e,iwata:e,izu:e,izunokuni:e,kakegawa:e,kannami:e,kawanehon:e,kawazu:e,kikugawa:e,kosai:e,makinohara:e,matsuzaki:e,minamiizu:e,mishima:e,morimachi:e,nishiizu:e,numazu:e,omaezaki:e,shimada:e,shimizu:e,shimoda:e,shizuoka:e,susono:e,yaizu:e,yoshida:e}],tochigi:[1,{ashikaga:e,bato:e,haga:e,ichikai:e,iwafune:e,kaminokawa:e,kanuma:e,karasuyama:e,kuroiso:e,mashiko:e,mibu:e,moka:e,motegi:e,nasu:e,nasushiobara:e,nikko:e,nishikata:e,nogi:e,ohira:e,ohtawara:e,oyama:e,sakura:e,sano:e,shimotsuke:e,shioya:e,takanezawa:e,tochigi:e,tsuga:e,ujiie:e,utsunomiya:e,yaita:e}],tokushima:[1,{aizumi:e,anan:e,ichiba:e,itano:e,kainan:e,komatsushima:e,matsushige:e,mima:e,minami:e,miyoshi:e,mugi:e,nakagawa:e,naruto:e,sanagochi:e,shishikui:e,tokushima:e,wajiki:e}],tokyo:[1,{adachi:e,akiruno:e,akishima:e,aogashima:e,arakawa:e,bunkyo:e,chiyoda:e,chofu:e,chuo:e,edogawa:e,fuchu:e,fussa:e,hachijo:e,hachioji:e,hamura:e,higashikurume:e,higashimurayama:e,higashiyamato:e,hino:e,hinode:e,hinohara:e,inagi:e,itabashi:e,katsushika:e,kita:e,kiyose:e,kodaira:e,koganei:e,kokubunji:e,komae:e,koto:e,kouzushima:e,kunitachi:e,machida:e,meguro:e,minato:e,mitaka:e,mizuho:e,musashimurayama:e,musashino:e,nakano:e,nerima:e,ogasawara:e,okutama:e,ome:e,oshima:e,ota:e,setagaya:e,shibuya:e,shinagawa:e,shinjuku:e,suginami:e,sumida:e,tachikawa:e,taito:e,tama:e,toshima:e}],tottori:[1,{chizu:e,hino:e,kawahara:e,koge:e,kotoura:e,misasa:e,nanbu:e,nichinan:e,sakaiminato:e,tottori:e,wakasa:e,yazu:e,yonago:e}],toyama:[1,{asahi:e,fuchu:e,fukumitsu:e,funahashi:e,himi:e,imizu:e,inami:e,johana:e,kamiichi:e,kurobe:e,nakaniikawa:e,namerikawa:e,nanto:e,nyuzen:e,oyabe:e,taira:e,takaoka:e,tateyama:e,toga:e,tonami:e,toyama:e,unazuki:e,uozu:e,yamada:e}],wakayama:[1,{arida:e,aridagawa:e,gobo:e,hashimoto:e,hidaka:e,hirogawa:e,inami:e,iwade:e,kainan:e,kamitonda:e,katsuragi:e,kimino:e,kinokawa:e,kitayama:e,koya:e,koza:e,kozagawa:e,kudoyama:e,kushimoto:e,mihama:e,misato:e,nachikatsuura:e,shingu:e,shirahama:e,taiji:e,tanabe:e,wakayama:e,yuasa:e,yura:e}],yamagata:[1,{asahi:e,funagata:e,higashine:e,iide:e,kahoku:e,kaminoyama:e,kaneyama:e,kawanishi:e,mamurogawa:e,mikawa:e,murayama:e,nagai:e,nakayama:e,nanyo:e,nishikawa:e,obanazawa:e,oe:e,oguni:e,ohkura:e,oishida:e,sagae:e,sakata:e,sakegawa:e,shinjo:e,shirataka:e,shonai:e,takahata:e,tendo:e,tozawa:e,tsuruoka:e,yamagata:e,yamanobe:e,yonezawa:e,yuza:e}],yamaguchi:[1,{abu:e,hagi:e,hikari:e,hofu:e,iwakuni:e,kudamatsu:e,mitou:e,nagato:e,oshima:e,shimonoseki:e,shunan:e,tabuse:e,tokuyama:e,toyota:e,ube:e,yuu:e}],yamanashi:[1,{chuo:e,doshi:e,fuefuki:e,fujikawa:e,fujikawaguchiko:e,fujiyoshida:e,hayakawa:e,hokuto:e,ichikawamisato:e,kai:e,kofu:e,koshu:e,kosuge:e,"minami-alps":e,minobu:e,nakamichi:e,nanbu:e,narusawa:e,nirasaki:e,nishikatsura:e,oshino:e,otsuki:e,showa:e,tabayama:e,tsuru:e,uenohara:e,yamanakako:e,yamanashi:e}],"xn--ehqz56n":e,三重:e,"xn--1lqs03n":e,京都:e,"xn--qqqt11m":e,佐賀:e,"xn--f6qx53a":e,兵庫:e,"xn--djrs72d6uy":e,北海道:e,"xn--mkru45i":e,千葉:e,"xn--0trq7p7nn":e,和歌山:e,"xn--5js045d":e,埼玉:e,"xn--kbrq7o":e,大分:e,"xn--pssu33l":e,大阪:e,"xn--ntsq17g":e,奈良:e,"xn--uisz3g":e,宮城:e,"xn--6btw5a":e,宮崎:e,"xn--1ctwo":e,富山:e,"xn--6orx2r":e,山口:e,"xn--rht61e":e,山形:e,"xn--rht27z":e,山梨:e,"xn--nit225k":e,岐阜:e,"xn--rht3d":e,岡山:e,"xn--djty4k":e,岩手:e,"xn--klty5x":e,島根:e,"xn--kltx9a":e,広島:e,"xn--kltp7d":e,徳島:e,"xn--c3s14m":e,愛媛:e,"xn--vgu402c":e,愛知:e,"xn--efvn9s":e,新潟:e,"xn--1lqs71d":e,東京:e,"xn--4pvxs":e,栃木:e,"xn--uuwu58a":e,沖縄:e,"xn--zbx025d":e,滋賀:e,"xn--8pvr4u":e,熊本:e,"xn--5rtp49c":e,石川:e,"xn--ntso0iqx3a":e,神奈川:e,"xn--elqq16h":e,福井:e,"xn--4it168d":e,福岡:e,"xn--klt787d":e,福島:e,"xn--rny31h":e,秋田:e,"xn--7t0a264c":e,群馬:e,"xn--uist22h":e,茨城:e,"xn--8ltr62k":e,長崎:e,"xn--2m4a15e":e,長野:e,"xn--32vp30h":e,青森:e,"xn--4it797k":e,静岡:e,"xn--5rtq34k":e,香川:e,"xn--k7yn95e":e,高知:e,"xn--tor131o":e,鳥取:e,"xn--d5qv7z876c":e,鹿児島:e,kawasaki:k,kitakyushu:k,kobe:k,nagoya:k,sapporo:k,sendai:k,yokohama:k,buyshop:t,fashionstore:t,handcrafted:t,kawaiishop:t,supersale:t,theshop:t,"0am":t,"0g0":t,"0j0":t,"0t0":t,mydns:t,pgw:t,wjg:t,usercontent:t,angry:t,babyblue:t,babymilk:t,backdrop:t,bambina:t,bitter:t,blush:t,boo:t,boy:t,boyfriend:t,but:t,candypop:t,capoo:t,catfood:t,cheap:t,chicappa:t,chillout:t,chips:t,chowder:t,chu:t,ciao:t,cocotte:t,coolblog:t,cranky:t,cutegirl:t,daa:t,deca:t,deci:t,digick:t,egoism:t,fakefur:t,fem:t,flier:t,floppy:t,fool:t,frenchkiss:t,girlfriend:t,girly:t,gloomy:t,gonna:t,greater:t,hacca:t,heavy:t,her:t,hiho:t,hippy:t,holy:t,hungry:t,icurus:t,itigo:t,jellybean:t,kikirara:t,kill:t,kilo:t,kuron:t,littlestar:t,lolipopmc:t,lolitapunk:t,lomo:t,lovepop:t,lovesick:t,main:t,mods:t,mond:t,mongolian:t,moo:t,namaste:t,nikita:t,nobushi:t,noor:t,oops:t,parallel:t,parasite:t,pecori:t,peewee:t,penne:t,pepper:t,perma:t,pigboat:t,pinoko:t,punyu:t,pupu:t,pussycat:t,pya:t,raindrop:t,readymade:t,sadist:t,schoolbus:t,secret:t,staba:t,stripper:t,sub:t,sunnyday:t,thick:t,tonkotsu:t,under:t,upper:t,velvet:t,verse:t,versus:t,vivian:t,watson:t,weblike:t,whitesnow:t,zombie:t,hateblo:t,hatenablog:t,hatenadiary:t,"2-d":t,bona:t,crap:t,daynight:t,eek:t,flop:t,halfmoon:t,jeez:t,matrix:t,mimoza:t,netgamers:t,nyanta:t,o0o0:t,rdy:t,rgr:t,rulez:t,sakurastorage:[0,{isk01:zr,isk02:zr}],saloon:t,sblo:t,skr:t,tank:t,"uh-oh":t,undo:t,webaccel:[0,{rs:t,user:t}],websozai:t,xii:t}],ke:[1,{ac:e,co:e,go:e,info:e,me:e,mobi:e,ne:e,or:e,sc:e}],kg:[1,{com:e,edu:e,gov:e,mil:e,net:e,org:e,us:t,xx:t,ae:t}],kh:n,ki:pn,km:[1,{ass:e,com:e,edu:e,gov:e,mil:e,nom:e,org:e,prd:e,tm:e,asso:e,coop:e,gouv:e,medecin:e,notaires:e,pharmaciens:e,presse:e,veterinaire:e}],kn:[1,{edu:e,gov:e,net:e,org:e}],kp:[1,{com:e,edu:e,gov:e,org:e,rep:e,tra:e}],kr:[1,{ac:e,ai:e,co:e,es:e,go:e,hs:e,io:e,it:e,kg:e,me:e,mil:e,ms:e,ne:e,or:e,pe:e,re:e,sc:e,busan:e,chungbuk:e,chungnam:e,daegu:e,daejeon:e,gangwon:e,gwangju:e,gyeongbuk:e,gyeonggi:e,gyeongnam:e,incheon:e,jeju:e,jeonbuk:e,jeonnam:e,seoul:e,ulsan:e,c01:t,"eliv-api":t,"eliv-cdn":t,"eliv-dns":t,mmv:t,vki:t}],kw:[1,{com:e,edu:e,emb:e,gov:e,ind:e,net:e,org:e}],ky:Oe,kz:[1,{com:e,edu:e,gov:e,mil:e,net:e,org:e,jcloud:t}],la:[1,{com:e,edu:e,gov:e,info:e,int:e,net:e,org:e,per:e,bnr:t}],lb:n,lc:[1,{co:e,com:e,edu:e,gov:e,net:e,org:e,oy:t}],li:e,lk:[1,{ac:e,assn:e,com:e,edu:e,gov:e,grp:e,hotel:e,int:e,ltd:e,net:e,ngo:e,org:e,sch:e,soc:e,web:e}],lr:n,ls:[1,{ac:e,biz:e,co:e,edu:e,gov:e,info:e,net:e,org:e,sc:e}],lt:c,lu:[1,{"123website":t}],lv:[1,{asn:e,com:e,conf:e,edu:e,gov:e,id:e,mil:e,net:e,org:e}],ly:[1,{com:e,edu:e,gov:e,id:e,med:e,net:e,org:e,plc:e,sch:e}],ma:[1,{ac:e,co:e,gov:e,net:e,org:e,press:e}],mc:[1,{asso:e,tm:e}],md:[1,{ir:t}],me:[1,{ac:e,co:e,edu:e,gov:e,its:e,net:e,org:e,priv:e,c66:t,craft:t,edgestack:t,mybox:t,filegear:t,"filegear-sg":t,lohmus:t,barsy:t,mcdir:t,brasilia:t,ddns:t,dnsfor:t,hopto:t,loginto:t,noip:t,webhop:t,soundcast:t,tcp4:t,vp4:t,diskstation:t,dscloud:t,i234:t,myds:t,synology:t,transip:Ee,nohost:t}],mg:[1,{co:e,com:e,edu:e,gov:e,mil:e,nom:e,org:e,prd:e}],mh:e,mil:e,mk:[1,{com:e,edu:e,gov:e,inf:e,name:e,net:e,org:e}],ml:[1,{ac:e,art:e,asso:e,com:e,edu:e,gouv:e,gov:e,info:e,inst:e,net:e,org:e,pr:e,presse:e}],mm:k,mn:[1,{edu:e,gov:e,org:e,nyc:t}],mo:n,mobi:[1,{barsy:t,dscloud:t}],mp:[1,{ju:t}],mq:e,mr:c,ms:[1,{com:e,edu:e,gov:e,net:e,org:e,minisite:t}],mt:Oe,mu:[1,{ac:e,co:e,com:e,gov:e,net:e,or:e,org:e}],museum:e,mv:[1,{aero:e,biz:e,com:e,coop:e,edu:e,gov:e,info:e,int:e,mil:e,museum:e,name:e,net:e,org:e,pro:e}],mw:[1,{ac:e,biz:e,co:e,com:e,coop:e,edu:e,gov:e,int:e,net:e,org:e}],mx:[1,{com:e,edu:e,gob:e,net:e,org:e}],my:[1,{biz:e,com:e,edu:e,gov:e,mil:e,name:e,net:e,org:e}],mz:[1,{ac:e,adv:e,co:e,edu:e,gov:e,mil:e,net:e,org:e}],na:[1,{alt:e,co:e,com:e,gov:e,net:e,org:e}],name:[1,{her:X,his:X,ispmanager:t,keenetic:t}],nc:[1,{asso:e,nom:e}],ne:e,net:[1,{adobeaemcloud:t,"adobeio-static":t,adobeioruntime:t,akadns:t,akamai:t,"akamai-staging":t,akamaiedge:t,"akamaiedge-staging":t,akamaihd:t,"akamaihd-staging":t,akamaiorigin:t,"akamaiorigin-staging":t,akamaized:t,"akamaized-staging":t,edgekey:t,"edgekey-staging":t,edgesuite:t,"edgesuite-staging":t,alwaysdata:t,myamaze:t,cloudfront:t,appudo:t,"atlassian-dev":[0,{prod:Me}],myfritz:t,shopselect:t,blackbaudcdn:t,boomla:t,bplaced:t,square7:t,cdn77:[0,{r:t}],"cdn77-ssl":t,gb:t,hu:t,jp:t,se:t,uk:t,clickrising:t,"ddns-ip":t,"dns-cloud":t,"dns-dynamic":t,cloudaccess:t,cloudflare:[2,{cdn:t}],cloudflareanycast:Me,cloudflarecn:Me,cloudflareglobal:Me,ctfcloud:t,"feste-ip":t,"knx-server":t,"static-access":t,cryptonomic:s,dattolocal:t,mydatto:t,debian:t,definima:t,deno:[2,{sandbox:t}],icp:s,de5:t,"at-band-camp":t,blogdns:t,"broke-it":t,buyshouses:t,dnsalias:t,dnsdojo:t,"does-it":t,dontexist:t,dynalias:t,dynathome:t,endofinternet:t,"from-az":t,"from-co":t,"from-la":t,"from-ny":t,"gets-it":t,"ham-radio-op":t,homeftp:t,homeip:t,homelinux:t,homeunix:t,"in-the-band":t,"is-a-chef":t,"is-a-geek":t,"isa-geek":t,"kicks-ass":t,"office-on-the":t,podzone:t,"scrapper-site":t,selfip:t,"sells-it":t,servebbs:t,serveftp:t,thruhere:t,webhop:t,casacam:t,dynu:t,dynuddns:t,mysynology:t,opik:t,spryt:t,dynv6:t,twmail:t,ru:t,channelsdvr:[2,{u:t}],fastly:[0,{freetls:t,map:t,prod:[0,{a:t,global:t}],ssl:[0,{a:t,b:t,global:t}]}],fastlylb:[2,{map:t}],"keyword-on":t,"live-on":t,"server-on":t,"cdn-edges":t,heteml:t,cloudfunctions:t,"grafana-dev":t,iobb:t,moonscale:t,"in-dsl":t,"in-vpn":t,oninferno:t,botdash:t,"apps-1and1":t,ipifony:t,cloudjiffy:[2,{"fra1-de":t,"west1-us":t}],elastx:[0,{"jls-sto1":t,"jls-sto2":t,"jls-sto3":t}],massivegrid:[0,{paas:[0,{"fr-1":t,"lon-1":t,"lon-2":t,"ny-1":t,"ny-2":t,"sg-1":t}]}],saveincloud:[0,{jelastic:t,"nordeste-idc":t}],scaleforce:q,kinghost:t,uni5:t,krellian:t,ggff:t,localto:s,barsy:t,luyani:t,memset:t,"azure-api":t,"azure-mobile":t,azureedge:t,azurefd:t,azurestaticapps:[2,{1:t,2:t,3:t,4:t,5:t,6:t,7:t,centralus:t,eastasia:t,eastus2:t,westeurope:t,westus2:t}],azurewebsites:t,cloudapp:t,trafficmanager:t,usgovcloudapi:Ae,usgovcloudapp:t,usgovtrafficmanager:t,windows:Ae,mynetname:[0,{sn:t}],routingthecloud:t,bounceme:t,ddns:t,"eating-organic":t,mydissent:t,myeffect:t,mymediapc:t,mypsx:t,mysecuritycamera:t,nhlfan:t,"no-ip":t,pgafan:t,privatizehealthinsurance:t,redirectme:t,serveblog:t,serveminecraft:t,sytes:t,dnsup:t,hicam:t,"now-dns":t,ownip:t,vpndns:t,cloudycluster:t,ovh:[0,{hosting:s,webpaas:s}],rackmaze:t,myradweb:t,in:t,"subsc-pay":t,squares:t,schokokeks:t,"firewall-gateway":t,seidat:t,senseering:t,siteleaf:t,mafelo:t,myspreadshop:t,"vps-host":[2,{jelastic:[0,{atl:t,njs:t,ric:t}]}],srcf:[0,{soc:t,user:t}],supabase:t,dsmynas:t,familyds:t,ts:[2,{c:s}],torproject:[2,{pages:t}],tunnelmole:t,vusercontent:t,"reserve-online":t,localcert:t,"community-pro":t,meinforum:t,yandexcloud:[2,{storage:t,website:t}],za:t,zabc:t}],nf:[1,{arts:e,com:e,firm:e,info:e,net:e,other:e,per:e,rec:e,store:e,web:e}],ng:[1,{com:e,edu:e,gov:e,i:e,mil:e,mobi:e,name:e,net:e,org:e,sch:e,biz:[2,{co:t,dl:t,go:t,lg:t,on:t}],col:t,firm:t,gen:t,ltd:t,ngo:t,plc:t}],ni:[1,{ac:e,biz:e,co:e,com:e,edu:e,gob:e,in:e,info:e,int:e,mil:e,net:e,nom:e,org:e,web:e}],nl:[1,{co:t,"hosting-cluster":t,gov:t,khplay:t,"123website":t,myspreadshop:t,transurl:s,cistron:t,demon:t}],no:[1,{fhs:e,folkebibl:e,fylkesbibl:e,idrett:e,museum:e,priv:e,vgs:e,dep:e,herad:e,kommune:e,mil:e,stat:e,aa:xe,ah:xe,bu:xe,fm:xe,hl:xe,hm:xe,"jan-mayen":xe,mr:xe,nl:xe,nt:xe,of:xe,ol:xe,oslo:xe,rl:xe,sf:xe,st:xe,svalbard:xe,tm:xe,tr:xe,va:xe,vf:xe,akrehamn:e,"xn--krehamn-dxa":e,åkrehamn:e,algard:e,"xn--lgrd-poac":e,ålgård:e,arna:e,bronnoysund:e,"xn--brnnysund-m8ac":e,brønnøysund:e,brumunddal:e,bryne:e,drobak:e,"xn--drbak-wua":e,drøbak:e,egersund:e,fetsund:e,floro:e,"xn--flor-jra":e,florø:e,fredrikstad:e,hokksund:e,honefoss:e,"xn--hnefoss-q1a":e,hønefoss:e,jessheim:e,jorpeland:e,"xn--jrpeland-54a":e,jørpeland:e,kirkenes:e,kopervik:e,krokstadelva:e,langevag:e,"xn--langevg-jxa":e,langevåg:e,leirvik:e,mjondalen:e,"xn--mjndalen-64a":e,mjøndalen:e,"mo-i-rana":e,mosjoen:e,"xn--mosjen-eya":e,mosjøen:e,nesoddtangen:e,orkanger:e,osoyro:e,"xn--osyro-wua":e,osøyro:e,raholt:e,"xn--rholt-mra":e,råholt:e,sandnessjoen:e,"xn--sandnessjen-ogb":e,sandnessjøen:e,skedsmokorset:e,slattum:e,spjelkavik:e,stathelle:e,stavern:e,stjordalshalsen:e,"xn--stjrdalshalsen-sqb":e,stjørdalshalsen:e,tananger:e,tranby:e,vossevangen:e,aarborte:e,aejrie:e,afjord:e,"xn--fjord-lra":e,åfjord:e,agdenes:e,akershus:xt,aknoluokta:e,"xn--koluokta-7ya57h":e,ákŋoluokta:e,al:e,"xn--l-1fa":e,ål:e,alaheadju:e,"xn--laheadju-7ya":e,álaheadju:e,alesund:e,"xn--lesund-hua":e,ålesund:e,alstahaug:e,alta:e,"xn--lt-liac":e,áltá:e,alvdal:e,amli:e,"xn--mli-tla":e,åmli:e,amot:e,"xn--mot-tla":e,åmot:e,andasuolo:e,andebu:e,andoy:e,"xn--andy-ira":e,andøy:e,ardal:e,"xn--rdal-poa":e,årdal:e,aremark:e,arendal:e,"xn--s-1fa":e,ås:e,aseral:e,"xn--seral-lra":e,åseral:e,asker:e,askim:e,askoy:e,"xn--asky-ira":e,askøy:e,askvoll:e,asnes:e,"xn--snes-poa":e,åsnes:e,audnedaln:e,aukra:e,aure:e,aurland:e,"aurskog-holand":e,"xn--aurskog-hland-jnb":e,"aurskog-høland":e,austevoll:e,austrheim:e,averoy:e,"xn--avery-yua":e,averøy:e,badaddja:e,"xn--bdddj-mrabd":e,bådåddjå:e,"xn--brum-voa":e,bærum:e,bahcavuotna:e,"xn--bhcavuotna-s4a":e,báhcavuotna:e,bahccavuotna:e,"xn--bhccavuotna-k7a":e,báhccavuotna:e,baidar:e,"xn--bidr-5nac":e,báidár:e,bajddar:e,"xn--bjddar-pta":e,bájddar:e,balat:e,"xn--blt-elab":e,bálát:e,balestrand:e,ballangen:e,balsfjord:e,bamble:e,bardu:e,barum:e,batsfjord:e,"xn--btsfjord-9za":e,båtsfjord:e,bearalvahki:e,"xn--bearalvhki-y4a":e,bearalváhki:e,beardu:e,beiarn:e,berg:e,bergen:e,berlevag:e,"xn--berlevg-jxa":e,berlevåg:e,bievat:e,"xn--bievt-0qa":e,bievát:e,bindal:e,birkenes:e,bjerkreim:e,bjugn:e,bodo:e,"xn--bod-2na":e,bodø:e,bokn:e,bomlo:e,"xn--bmlo-gra":e,bømlo:e,bremanger:e,bronnoy:e,"xn--brnny-wuac":e,brønnøy:e,budejju:e,buskerud:xt,bygland:e,bykle:e,cahcesuolo:e,"xn--hcesuolo-7ya35b":e,čáhcesuolo:e,davvenjarga:e,"xn--davvenjrga-y4a":e,davvenjárga:e,davvesiida:e,deatnu:e,dielddanuorri:e,divtasvuodna:e,divttasvuotna:e,donna:e,"xn--dnna-gra":e,dønna:e,dovre:e,drammen:e,drangedal:e,dyroy:e,"xn--dyry-ira":e,dyrøy:e,eid:e,eidfjord:e,eidsberg:e,eidskog:e,eidsvoll:e,eigersund:e,elverum:e,enebakk:e,engerdal:e,etne:e,etnedal:e,evenassi:e,"xn--eveni-0qa01ga":e,evenášši:e,evenes:e,"evje-og-hornnes":e,farsund:e,fauske:e,fedje:e,fet:e,finnoy:e,"xn--finny-yua":e,finnøy:e,fitjar:e,fjaler:e,fjell:e,fla:e,"xn--fl-zia":e,flå:e,flakstad:e,flatanger:e,flekkefjord:e,flesberg:e,flora:e,folldal:e,forde:e,"xn--frde-gra":e,førde:e,forsand:e,fosnes:e,"xn--frna-woa":e,fræna:e,frana:e,frei:e,frogn:e,froland:e,frosta:e,froya:e,"xn--frya-hra":e,frøya:e,fuoisku:e,fuossko:e,fusa:e,fyresdal:e,gaivuotna:e,"xn--givuotna-8ya":e,gáivuotna:e,galsa:e,"xn--gls-elac":e,gálsá:e,gamvik:e,gangaviika:e,"xn--ggaviika-8ya47h":e,gáŋgaviika:e,gaular:e,gausdal:e,giehtavuoatna:e,gildeskal:e,"xn--gildeskl-g0a":e,gildeskål:e,giske:e,gjemnes:e,gjerdrum:e,gjerstad:e,gjesdal:e,gjovik:e,"xn--gjvik-wua":e,gjøvik:e,gloppen:e,gol:e,gran:e,grane:e,granvin:e,gratangen:e,grimstad:e,grong:e,grue:e,gulen:e,guovdageaidnu:e,ha:e,"xn--h-2fa":e,hå:e,habmer:e,"xn--hbmer-xqa":e,hábmer:e,hadsel:e,"xn--hgebostad-g3a":e,hægebostad:e,hagebostad:e,halden:e,halsa:e,hamar:e,hamaroy:e,hammarfeasta:e,"xn--hmmrfeasta-s4ac":e,hámmárfeasta:e,hammerfest:e,hapmir:e,"xn--hpmir-xqa":e,hápmir:e,haram:e,hareid:e,harstad:e,hasvik:e,hattfjelldal:e,haugesund:e,hedmark:[0,{os:e,valer:e,"xn--vler-qoa":e,våler:e}],hemne:e,hemnes:e,hemsedal:e,hitra:e,hjartdal:e,hjelmeland:e,hobol:e,"xn--hobl-ira":e,hobøl:e,hof:e,hol:e,hole:e,holmestrand:e,holtalen:e,"xn--holtlen-hxa":e,holtålen:e,hordaland:[0,{os:e}],hornindal:e,horten:e,hoyanger:e,"xn--hyanger-q1a":e,høyanger:e,hoylandet:e,"xn--hylandet-54a":e,høylandet:e,hurdal:e,hurum:e,hvaler:e,hyllestad:e,ibestad:e,inderoy:e,"xn--indery-fya":e,inderøy:e,iveland:e,ivgu:e,jevnaker:e,jolster:e,"xn--jlster-bya":e,jølster:e,jondal:e,kafjord:e,"xn--kfjord-iua":e,kåfjord:e,karasjohka:e,"xn--krjohka-hwab49j":e,kárášjohka:e,karasjok:e,karlsoy:e,karmoy:e,"xn--karmy-yua":e,karmøy:e,kautokeino:e,klabu:e,"xn--klbu-woa":e,klæbu:e,klepp:e,kongsberg:e,kongsvinger:e,kraanghke:e,"xn--kranghke-b0a":e,kråanghke:e,kragero:e,"xn--krager-gya":e,kragerø:e,kristiansand:e,kristiansund:e,krodsherad:e,"xn--krdsherad-m8a":e,krødsherad:e,"xn--kvfjord-nxa":e,kvæfjord:e,"xn--kvnangen-k0a":e,kvænangen:e,kvafjord:e,kvalsund:e,kvam:e,kvanangen:e,kvinesdal:e,kvinnherad:e,kviteseid:e,kvitsoy:e,"xn--kvitsy-fya":e,kvitsøy:e,laakesvuemie:e,"xn--lrdal-sra":e,lærdal:e,lahppi:e,"xn--lhppi-xqa":e,láhppi:e,lardal:e,larvik:e,lavagis:e,lavangen:e,leangaviika:e,"xn--leagaviika-52b":e,leaŋgaviika:e,lebesby:e,leikanger:e,leirfjord:e,leka:e,leksvik:e,lenvik:e,lerdal:e,lesja:e,levanger:e,lier:e,lierne:e,lillehammer:e,lillesand:e,lindas:e,"xn--linds-pra":e,lindås:e,lindesnes:e,loabat:e,"xn--loabt-0qa":e,loabát:e,lodingen:e,"xn--ldingen-q1a":e,lødingen:e,lom:e,loppa:e,lorenskog:e,"xn--lrenskog-54a":e,lørenskog:e,loten:e,"xn--lten-gra":e,løten:e,lund:e,lunner:e,luroy:e,"xn--lury-ira":e,lurøy:e,luster:e,lyngdal:e,lyngen:e,malatvuopmi:e,"xn--mlatvuopmi-s4a":e,málatvuopmi:e,malselv:e,"xn--mlselv-iua":e,målselv:e,malvik:e,mandal:e,marker:e,marnardal:e,masfjorden:e,masoy:e,"xn--msy-ula0h":e,måsøy:e,"matta-varjjat":e,"xn--mtta-vrjjat-k7af":e,"mátta-várjjat":e,meland:e,meldal:e,melhus:e,meloy:e,"xn--mely-ira":e,meløy:e,meraker:e,"xn--merker-kua":e,meråker:e,midsund:e,"midtre-gauldal":e,moareke:e,"xn--moreke-jua":e,moåreke:e,modalen:e,modum:e,molde:e,"more-og-romsdal":[0,{heroy:e,sande:e}],"xn--mre-og-romsdal-qqb":[0,{"xn--hery-ira":e,sande:e}],"møre-og-romsdal":[0,{herøy:e,sande:e}],moskenes:e,moss:e,muosat:e,"xn--muost-0qa":e,muosát:e,naamesjevuemie:e,"xn--nmesjevuemie-tcba":e,nååmesjevuemie:e,"xn--nry-yla5g":e,nærøy:e,namdalseid:e,namsos:e,namsskogan:e,nannestad:e,naroy:e,narviika:e,narvik:e,naustdal:e,navuotna:e,"xn--nvuotna-hwa":e,návuotna:e,"nedre-eiker":e,nesna:e,nesodden:e,nesseby:e,nesset:e,nissedal:e,nittedal:e,"nord-aurdal":e,"nord-fron":e,"nord-odal":e,norddal:e,nordkapp:e,nordland:[0,{bo:e,"xn--b-5ga":e,bø:e,heroy:e,"xn--hery-ira":e,herøy:e}],"nordre-land":e,nordreisa:e,"nore-og-uvdal":e,notodden:e,notteroy:e,"xn--nttery-byae":e,nøtterøy:e,odda:e,oksnes:e,"xn--ksnes-uua":e,øksnes:e,omasvuotna:e,oppdal:e,oppegard:e,"xn--oppegrd-ixa":e,oppegård:e,orkdal:e,orland:e,"xn--rland-uua":e,ørland:e,orskog:e,"xn--rskog-uua":e,ørskog:e,orsta:e,"xn--rsta-fra":e,ørsta:e,osen:e,osteroy:e,"xn--ostery-fya":e,osterøy:e,ostfold:[0,{valer:e}],"xn--stfold-9xa":[0,{"xn--vler-qoa":e}],østfold:[0,{våler:e}],"ostre-toten":e,"xn--stre-toten-zcb":e,"østre-toten":e,overhalla:e,"ovre-eiker":e,"xn--vre-eiker-k8a":e,"øvre-eiker":e,oyer:e,"xn--yer-zna":e,øyer:e,oygarden:e,"xn--ygarden-p1a":e,øygarden:e,"oystre-slidre":e,"xn--ystre-slidre-ujb":e,"øystre-slidre":e,porsanger:e,porsangu:e,"xn--porsgu-sta26f":e,porsáŋgu:e,porsgrunn:e,rade:e,"xn--rde-ula":e,råde:e,radoy:e,"xn--rady-ira":e,radøy:e,"xn--rlingen-mxa":e,rælingen:e,rahkkeravju:e,"xn--rhkkervju-01af":e,ráhkkerávju:e,raisa:e,"xn--risa-5na":e,ráisa:e,rakkestad:e,ralingen:e,rana:e,randaberg:e,rauma:e,rendalen:e,rennebu:e,rennesoy:e,"xn--rennesy-v1a":e,rennesøy:e,rindal:e,ringebu:e,ringerike:e,ringsaker:e,risor:e,"xn--risr-ira":e,risør:e,rissa:e,roan:e,rodoy:e,"xn--rdy-0nab":e,rødøy:e,rollag:e,romsa:e,romskog:e,"xn--rmskog-bya":e,rømskog:e,roros:e,"xn--rros-gra":e,røros:e,rost:e,"xn--rst-0na":e,røst:e,royken:e,"xn--ryken-vua":e,røyken:e,royrvik:e,"xn--ryrvik-bya":e,røyrvik:e,ruovat:e,rygge:e,salangen:e,salat:e,"xn--slat-5na":e,sálat:e,"xn--slt-elab":e,sálát:e,saltdal:e,samnanger:e,sandefjord:e,sandnes:e,sandoy:e,"xn--sandy-yua":e,sandøy:e,sarpsborg:e,sauda:e,sauherad:e,sel:e,selbu:e,selje:e,seljord:e,siellak:e,sigdal:e,siljan:e,sirdal:e,skanit:e,"xn--sknit-yqa":e,skánit:e,skanland:e,"xn--sknland-fxa":e,skånland:e,skaun:e,skedsmo:e,ski:e,skien:e,skierva:e,"xn--skierv-uta":e,skiervá:e,skiptvet:e,skjak:e,"xn--skjk-soa":e,skjåk:e,skjervoy:e,"xn--skjervy-v1a":e,skjervøy:e,skodje:e,smola:e,"xn--smla-hra":e,smøla:e,snaase:e,"xn--snase-nra":e,snåase:e,snasa:e,"xn--snsa-roa":e,snåsa:e,snillfjord:e,snoasa:e,sogndal:e,sogne:e,"xn--sgne-gra":e,søgne:e,sokndal:e,sola:e,solund:e,somna:e,"xn--smna-gra":e,sømna:e,"sondre-land":e,"xn--sndre-land-0cb":e,"søndre-land":e,songdalen:e,"sor-aurdal":e,"xn--sr-aurdal-l8a":e,"sør-aurdal":e,"sor-fron":e,"xn--sr-fron-q1a":e,"sør-fron":e,"sor-odal":e,"xn--sr-odal-q1a":e,"sør-odal":e,"sor-varanger":e,"xn--sr-varanger-ggb":e,"sør-varanger":e,sorfold:e,"xn--srfold-bya":e,sørfold:e,sorreisa:e,"xn--srreisa-q1a":e,sørreisa:e,sortland:e,sorum:e,"xn--srum-gra":e,sørum:e,spydeberg:e,stange:e,stavanger:e,steigen:e,steinkjer:e,stjordal:e,"xn--stjrdal-s1a":e,stjørdal:e,stokke:e,"stor-elvdal":e,stord:e,stordal:e,storfjord:e,strand:e,stranda:e,stryn:e,sula:e,suldal:e,sund:e,sunndal:e,surnadal:e,sveio:e,svelvik:e,sykkylven:e,tana:e,telemark:[0,{bo:e,"xn--b-5ga":e,bø:e}],time:e,tingvoll:e,tinn:e,tjeldsund:e,tjome:e,"xn--tjme-hra":e,tjøme:e,tokke:e,tolga:e,tonsberg:e,"xn--tnsberg-q1a":e,tønsberg:e,torsken:e,"xn--trna-woa":e,træna:e,trana:e,tranoy:e,"xn--trany-yua":e,tranøy:e,troandin:e,trogstad:e,"xn--trgstad-r1a":e,trøgstad:e,tromsa:e,tromso:e,"xn--troms-zua":e,tromsø:e,trondheim:e,trysil:e,tvedestrand:e,tydal:e,tynset:e,tysfjord:e,tysnes:e,"xn--tysvr-vra":e,tysvær:e,tysvar:e,ullensaker:e,ullensvang:e,ulvik:e,unjarga:e,"xn--unjrga-rta":e,unjárga:e,utsira:e,vaapste:e,vadso:e,"xn--vads-jra":e,vadsø:e,"xn--vry-yla5g":e,værøy:e,vaga:e,"xn--vg-yiab":e,vågå:e,vagan:e,"xn--vgan-qoa":e,vågan:e,vagsoy:e,"xn--vgsy-qoa0j":e,vågsøy:e,vaksdal:e,valle:e,vang:e,vanylven:e,vardo:e,"xn--vard-jra":e,vardø:e,varggat:e,"xn--vrggt-xqad":e,várggát:e,varoy:e,vefsn:e,vega:e,vegarshei:e,"xn--vegrshei-c0a":e,vegårshei:e,vennesla:e,verdal:e,verran:e,vestby:e,vestfold:[0,{sande:e}],vestnes:e,"vestre-slidre":e,"vestre-toten":e,vestvagoy:e,"xn--vestvgy-ixa6o":e,vestvågøy:e,vevelstad:e,vik:e,vikna:e,vindafjord:e,voagat:e,volda:e,voss:e,co:t,"123hjemmeside":t,myspreadshop:t}],np:k,nr:pn,nu:[1,{merseine:t,mine:t,shacknet:t,enterprisecloud:t}],nz:[1,{ac:e,co:e,cri:e,geek:e,gen:e,govt:e,health:e,iwi:e,kiwi:e,maori:e,"xn--mori-qsa":e,māori:e,mil:e,net:e,org:e,parliament:e,school:e,cloudns:t}],om:[1,{co:e,com:e,edu:e,gov:e,med:e,museum:e,net:e,org:e,pro:e}],onion:e,org:[1,{altervista:t,pimienta:t,poivron:t,potager:t,sweetpepper:t,cdn77:[0,{c:t,rsc:t}],"cdn77-secure":[0,{origin:[0,{ssl:t}]}],ae:t,cloudns:t,"ip-dynamic":t,ddnss:t,dpdns:t,duckdns:t,tunk:t,blogdns:t,blogsite:t,boldlygoingnowhere:t,dnsalias:t,dnsdojo:t,doesntexist:t,dontexist:t,doomdns:t,dvrdns:t,dynalias:t,dyndns:[2,{go:t,home:t}],endofinternet:t,endoftheinternet:t,"from-me":t,"game-host":t,gotdns:t,"hobby-site":t,homedns:t,homeftp:t,homelinux:t,homeunix:t,"is-a-bruinsfan":t,"is-a-candidate":t,"is-a-celticsfan":t,"is-a-chef":t,"is-a-geek":t,"is-a-knight":t,"is-a-linux-user":t,"is-a-patsfan":t,"is-a-soxfan":t,"is-found":t,"is-lost":t,"is-saved":t,"is-very-bad":t,"is-very-evil":t,"is-very-good":t,"is-very-nice":t,"is-very-sweet":t,"isa-geek":t,"kicks-ass":t,misconfused:t,podzone:t,readmyblog:t,selfip:t,sellsyourhome:t,servebbs:t,serveftp:t,servegame:t,"stuff-4-sale":t,webhop:t,accesscam:t,camdvr:t,freeddns:t,mywire:t,roxa:t,webredirect:t,twmail:t,eu:[2,{al:t,asso:t,at:t,au:t,be:t,bg:t,ca:t,cd:t,ch:t,cn:t,cy:t,cz:t,de:t,dk:t,edu:t,ee:t,es:t,fi:t,fr:t,gr:t,hr:t,hu:t,ie:t,il:t,in:t,int:t,is:t,it:t,jp:t,kr:t,lt:t,lu:t,lv:t,me:t,mk:t,mt:t,my:t,net:t,ng:t,nl:t,no:t,nz:t,pl:t,pt:t,ro:t,ru:t,se:t,si:t,sk:t,tr:t,uk:t,us:t}],fedorainfracloud:t,fedorapeople:t,fedoraproject:[0,{cloud:t,os:ge,stg:[0,{os:ge}]}],freedesktop:t,hatenadiary:t,hepforge:t,"in-dsl":t,"in-vpn":t,js:t,barsy:t,mayfirst:t,routingthecloud:t,bmoattachments:t,"cable-modem":t,collegefan:t,couchpotatofries:t,hopto:t,mlbfan:t,myftp:t,mysecuritycamera:t,nflfan:t,"no-ip":t,"read-books":t,ufcfan:t,zapto:t,dynserv:t,"now-dns":t,"is-local":t,httpbin:t,pubtls:t,jpn:t,"my-firewall":t,myfirewall:t,spdns:t,"small-web":t,dsmynas:t,familyds:t,teckids:zr,tuxfamily:t,hk:t,us:t,toolforge:t,wmcloud:[2,{beta:t}],wmflabs:t,za:t}],pa:[1,{abo:e,ac:e,com:e,edu:e,gob:e,ing:e,med:e,net:e,nom:e,org:e,sld:e}],pe:[1,{com:e,edu:e,gob:e,mil:e,net:e,nom:e,org:e}],pf:[1,{com:e,edu:e,org:e}],pg:k,ph:[1,{com:e,edu:e,gov:e,i:e,mil:e,net:e,ngo:e,org:e,cloudns:t}],pk:[1,{ac:e,biz:e,com:e,edu:e,fam:e,gkp:e,gob:e,gog:e,gok:e,gop:e,gos:e,gov:e,net:e,org:e,web:e}],pl:[1,{com:e,net:e,org:e,agro:e,aid:e,atm:e,auto:e,biz:e,edu:e,gmina:e,gsm:e,info:e,mail:e,media:e,miasta:e,mil:e,nieruchomosci:e,nom:e,pc:e,powiat:e,priv:e,realestate:e,rel:e,sex:e,shop:e,sklep:e,sos:e,szkola:e,targi:e,tm:e,tourism:e,travel:e,turystyka:e,gov:[1,{ap:e,griw:e,ic:e,is:e,kmpsp:e,konsulat:e,kppsp:e,kwp:e,kwpsp:e,mup:e,mw:e,oia:e,oirm:e,oke:e,oow:e,oschr:e,oum:e,pa:e,pinb:e,piw:e,po:e,pr:e,psp:e,psse:e,pup:e,rzgw:e,sa:e,sdn:e,sko:e,so:e,sr:e,starostwo:e,ug:e,ugim:e,um:e,umig:e,upow:e,uppo:e,us:e,uw:e,uzs:e,wif:e,wiih:e,winb:e,wios:e,witd:e,wiw:e,wkz:e,wsa:e,wskr:e,wsse:e,wuoz:e,wzmiuw:e,zp:e,zpisdn:e}],augustow:e,"babia-gora":e,bedzin:e,beskidy:e,bialowieza:e,bialystok:e,bielawa:e,bieszczady:e,boleslawiec:e,bydgoszcz:e,bytom:e,cieszyn:e,czeladz:e,czest:e,dlugoleka:e,elblag:e,elk:e,glogow:e,gniezno:e,gorlice:e,grajewo:e,ilawa:e,jaworzno:e,"jelenia-gora":e,jgora:e,kalisz:e,karpacz:e,kartuzy:e,kaszuby:e,katowice:e,"kazimierz-dolny":e,kepno:e,ketrzyn:e,klodzko:e,kobierzyce:e,kolobrzeg:e,konin:e,konskowola:e,kutno:e,lapy:e,lebork:e,legnica:e,lezajsk:e,limanowa:e,lomza:e,lowicz:e,lubin:e,lukow:e,malbork:e,malopolska:e,mazowsze:e,mazury:e,mielec:e,mielno:e,mragowo:e,naklo:e,nowaruda:e,nysa:e,olawa:e,olecko:e,olkusz:e,olsztyn:e,opoczno:e,opole:e,ostroda:e,ostroleka:e,ostrowiec:e,ostrowwlkp:e,pila:e,pisz:e,podhale:e,podlasie:e,polkowice:e,pomorskie:e,pomorze:e,prochowice:e,pruszkow:e,przeworsk:e,pulawy:e,radom:e,"rawa-maz":e,rybnik:e,rzeszow:e,sanok:e,sejny:e,skoczow:e,slask:e,slupsk:e,sosnowiec:e,"stalowa-wola":e,starachowice:e,stargard:e,suwalki:e,swidnica:e,swiebodzin:e,swinoujscie:e,szczecin:e,szczytno:e,tarnobrzeg:e,tgory:e,turek:e,tychy:e,ustka:e,walbrzych:e,warmia:e,warszawa:e,waw:e,wegrow:e,wielun:e,wlocl:e,wloclawek:e,wodzislaw:e,wolomin:e,wroclaw:e,zachpomor:e,zagan:e,zarow:e,zgora:e,zgorzelec:e,art:t,gliwice:t,krakow:t,poznan:t,wroc:t,zakopane:t,beep:t,"ecommerce-shop":t,cfolks:t,dfirma:t,dkonto:t,you2:t,shoparena:t,homesklep:t,sdscloud:t,unicloud:t,lodz:t,pabianice:t,plock:t,sieradz:t,skierniewice:t,zgierz:t,krasnik:t,leczna:t,lubartow:t,lublin:t,poniatowa:t,swidnik:t,co:t,torun:t,simplesite:t,myspreadshop:t,gda:t,gdansk:t,gdynia:t,med:t,sopot:t,bielsko:t}],pm:[1,{own:t,name:t}],pn:[1,{co:e,edu:e,gov:e,net:e,org:e}],post:e,pr:[1,{biz:e,com:e,edu:e,gov:e,info:e,isla:e,name:e,net:e,org:e,pro:e,ac:e,est:e,prof:e}],pro:[1,{aaa:e,aca:e,acct:e,avocat:e,bar:e,cpa:e,eng:e,jur:e,law:e,med:e,recht:e,cloudns:t,keenetic:t,barsy:t,ngrok:t}],ps:[1,{com:e,edu:e,gov:e,net:e,org:e,plo:e,sec:e}],pt:[1,{com:e,edu:e,gov:e,int:e,net:e,nome:e,org:e,publ:e,"123paginaweb":t}],pw:[1,{gov:e,cloudns:t,x443:t}],py:[1,{com:e,coop:e,edu:e,gov:e,mil:e,net:e,org:e}],qa:[1,{com:e,edu:e,gov:e,mil:e,name:e,net:e,org:e,sch:e}],re:[1,{asso:e,com:e,netlib:t,can:t}],ro:[1,{arts:e,com:e,firm:e,info:e,nom:e,nt:e,org:e,rec:e,store:e,tm:e,www:e,co:t,shop:t,barsy:t}],rs:[1,{ac:e,co:e,edu:e,gov:e,in:e,org:e,brendly:_,barsy:t,ox:t}],ru:[1,{ac:t,edu:t,gov:t,int:t,mil:t,eurodir:t,adygeya:t,bashkiria:t,bir:t,cbg:t,com:t,dagestan:t,grozny:t,kalmykia:t,kustanai:t,marine:t,mordovia:t,msk:t,mytis:t,nalchik:t,nov:t,pyatigorsk:t,spb:t,vladikavkaz:t,vladimir:t,na4u:t,mircloud:t,myjino:[2,{hosting:s,landing:s,spectrum:s,vps:s}],cldmail:[0,{hb:t}],mcdir:[2,{vps:t}],mcpre:t,net:t,org:t,pp:t,ras:t}],rw:[1,{ac:e,co:e,coop:e,gov:e,mil:e,net:e,org:e}],sa:[1,{com:e,edu:e,gov:e,med:e,net:e,org:e,pub:e,sch:e}],sb:n,sc:n,sd:[1,{com:e,edu:e,gov:e,info:e,med:e,net:e,org:e,tv:e}],se:[1,{a:e,ac:e,b:e,bd:e,brand:e,c:e,d:e,e,f:e,fh:e,fhsk:e,fhv:e,g:e,h:e,i:e,k:e,komforb:e,kommunalforbund:e,komvux:e,l:e,lanbib:e,m:e,n:e,naturbruksgymn:e,o:e,org:e,p:e,parti:e,pp:e,press:e,r:e,s:e,t:e,tm:e,u:e,w:e,x:e,y:e,z:e,com:t,iopsys:t,"123minsida":t,itcouldbewor:t,myspreadshop:t}],sg:[1,{com:e,edu:e,gov:e,net:e,org:e,enscaled:t}],sh:[1,{com:e,gov:e,mil:e,net:e,org:e,hashbang:t,botda:t,lovable:t,platform:[0,{ent:t,eu:t,us:t}],teleport:t,now:t}],si:[1,{f5:t,gitapp:t,gitpage:t}],sj:e,sk:[1,{org:e}],sl:n,sm:e,sn:[1,{art:e,com:e,edu:e,gouv:e,org:e,univ:e}],so:[1,{com:e,edu:e,gov:e,me:e,net:e,org:e,surveys:t}],sr:e,ss:[1,{biz:e,co:e,com:e,edu:e,gov:e,me:e,net:e,org:e,sch:e}],st:[1,{co:e,com:e,consulado:e,edu:e,embaixada:e,mil:e,net:e,org:e,principe:e,saotome:e,store:e,helioho:t,cn:s,kirara:t,noho:t}],su:[1,{abkhazia:t,adygeya:t,aktyubinsk:t,arkhangelsk:t,armenia:t,ashgabad:t,azerbaijan:t,balashov:t,bashkiria:t,bryansk:t,bukhara:t,chimkent:t,dagestan:t,"east-kazakhstan":t,exnet:t,georgia:t,grozny:t,ivanovo:t,jambyl:t,kalmykia:t,kaluga:t,karacol:t,karaganda:t,karelia:t,khakassia:t,krasnodar:t,kurgan:t,kustanai:t,lenug:t,mangyshlak:t,mordovia:t,msk:t,murmansk:t,nalchik:t,navoi:t,"north-kazakhstan":t,nov:t,obninsk:t,penza:t,pokrovsk:t,sochi:t,spb:t,tashkent:t,termez:t,togliatti:t,troitsk:t,tselinograd:t,tula:t,tuva:t,vladikavkaz:t,vladimir:t,vologda:t}],sv:[1,{com:e,edu:e,gob:e,org:e,red:e}],sx:c,sy:r,sz:[1,{ac:e,co:e,org:e}],tc:e,td:e,tel:e,tf:[1,{sch:t}],tg:e,th:[1,{ac:e,co:e,go:e,in:e,mi:e,net:e,or:e,online:t,shop:t}],tj:[1,{ac:e,biz:e,co:e,com:e,edu:e,go:e,gov:e,int:e,mil:e,name:e,net:e,nic:e,org:e,test:e,web:e}],tk:e,tl:c,tm:[1,{co:e,com:e,edu:e,gov:e,mil:e,net:e,nom:e,org:e}],tn:[1,{com:e,ens:e,fin:e,gov:e,ind:e,info:e,intl:e,mincom:e,nat:e,net:e,org:e,perso:e,tourism:e,orangecloud:t}],to:[1,{611:t,com:e,edu:e,gov:e,mil:e,net:e,org:e,oya:t,x0:t,quickconnect:z,vpnplus:t,nett:t}],tr:[1,{av:e,bbs:e,bel:e,biz:e,com:e,dr:e,edu:e,gen:e,gov:e,info:e,k12:e,kep:e,mil:e,name:e,net:e,org:e,pol:e,tel:e,tsk:e,tv:e,web:e,nc:c}],tt:[1,{biz:e,co:e,com:e,edu:e,gov:e,info:e,mil:e,name:e,net:e,org:e,pro:e}],tv:[1,{"better-than":t,dyndns:t,"on-the-web":t,"worse-than":t,from:t,sakura:t}],tw:[1,{club:e,com:[1,{mymailer:t}],ebiz:e,edu:e,game:e,gov:e,idv:e,mil:e,net:e,org:e,url:t,mydns:t}],tz:[1,{ac:e,co:e,go:e,hotel:e,info:e,me:e,mil:e,mobi:e,ne:e,or:e,sc:e,tv:e}],ua:[1,{com:e,edu:e,gov:e,in:e,net:e,org:e,cherkassy:e,cherkasy:e,chernigov:e,chernihiv:e,chernivtsi:e,chernovtsy:e,ck:e,cn:e,cr:e,crimea:e,cv:e,dn:e,dnepropetrovsk:e,dnipropetrovsk:e,donetsk:e,dp:e,if:e,"ivano-frankivsk":e,kh:e,kharkiv:e,kharkov:e,kherson:e,khmelnitskiy:e,khmelnytskyi:e,kiev:e,kirovograd:e,km:e,kr:e,kropyvnytskyi:e,krym:e,ks:e,kv:e,kyiv:e,lg:e,lt:e,lugansk:e,luhansk:e,lutsk:e,lv:e,lviv:e,mk:e,mykolaiv:e,nikolaev:e,od:e,odesa:e,odessa:e,pl:e,poltava:e,rivne:e,rovno:e,rv:e,sb:e,sebastopol:e,sevastopol:e,sm:e,sumy:e,te:e,ternopil:e,uz:e,uzhgorod:e,uzhhorod:e,vinnica:e,vinnytsia:e,vn:e,volyn:e,yalta:e,zakarpattia:e,zaporizhzhe:e,zaporizhzhia:e,zhitomir:e,zhytomyr:e,zp:e,zt:e,cc:t,inf:t,ltd:t,cx:t,biz:t,co:t,pp:t,v:t}],ug:[1,{ac:e,co:e,com:e,edu:e,go:e,gov:e,mil:e,ne:e,or:e,org:e,sc:e,us:e}],uk:[1,{ac:e,co:[1,{bytemark:[0,{dh:t,vm:t}],layershift:q,barsy:t,barsyonline:t,retrosnub:Ct,"nh-serv":t,"no-ip":t,adimo:t,myspreadshop:t}],gov:[1,{api:t,campaign:t,service:t}],ltd:e,me:e,net:e,nhs:e,org:[1,{glug:t,lug:t,lugs:t,affinitylottery:t,raffleentry:t,weeklylottery:t}],plc:e,police:e,sch:k,conn:t,copro:t,hosp:t,"independent-commission":t,"independent-inquest":t,"independent-inquiry":t,"independent-panel":t,"independent-review":t,"public-inquiry":t,"royal-commission":t,pymnt:t,barsy:t,nimsite:t,oraclegovcloudapps:s}],us:[1,{dni:e,isa:e,nsn:e,ak:Pe,al:Pe,ar:Pe,as:Pe,az:Pe,ca:Pe,co:Pe,ct:Pe,dc:Pe,de:Ci,fl:Pe,ga:Pe,gu:Pe,hi:Ur,ia:Pe,id:Pe,il:Pe,in:Pe,ks:Pe,ky:Pe,la:Pe,ma:[1,{k12:[1,{chtr:e,paroch:e,pvt:e}],cc:e,lib:e}],md:Pe,me:Pe,mi:[1,{k12:e,cc:e,lib:e,"ann-arbor":e,cog:e,dst:e,eaton:e,gen:e,mus:e,tec:e,washtenaw:e}],mn:Pe,mo:Pe,ms:[1,{k12:e,cc:e}],mt:Pe,nc:Pe,nd:Ur,ne:Pe,nh:Pe,nj:Pe,nm:Pe,nv:Pe,ny:Pe,oh:Pe,ok:Pe,or:Pe,pa:Pe,pr:Pe,ri:Ur,sc:Pe,sd:Ur,tn:Pe,tx:Pe,ut:Pe,va:Pe,vi:Pe,vt:Pe,wa:Pe,wi:Pe,wv:Ci,wy:Pe,cloudns:t,"is-by":t,"land-4-sale":t,"stuff-4-sale":t,heliohost:t,enscaled:[0,{phx:t}],mircloud:t,"azure-api":t,azurewebsites:t,ngo:t,golffan:t,noip:t,pointto:t,freeddns:t,srv:[2,{gh:t,gl:t}],servername:t}],uy:[1,{com:e,edu:e,gub:e,mil:e,net:e,org:e,gv:t}],uz:[1,{co:e,com:e,net:e,org:e}],va:e,vc:[1,{com:e,edu:e,gov:e,mil:e,net:e,org:e,gv:[2,{d:t}],"0e":s,mydns:t}],ve:[1,{arts:e,bib:e,co:e,com:e,e12:e,edu:e,emprende:e,firm:e,gob:e,gov:e,ia:e,info:e,int:e,mil:e,net:e,nom:e,org:e,rar:e,rec:e,store:e,tec:e,web:e}],vg:[1,{edu:e}],vi:[1,{co:e,com:e,k12:e,net:e,org:e}],vn:[1,{ac:e,ai:e,biz:e,com:e,edu:e,gov:e,health:e,id:e,info:e,int:e,io:e,name:e,net:e,org:e,pro:e,angiang:e,bacgiang:e,backan:e,baclieu:e,bacninh:e,"baria-vungtau":e,bentre:e,binhdinh:e,binhduong:e,binhphuoc:e,binhthuan:e,camau:e,cantho:e,caobang:e,daklak:e,daknong:e,danang:e,dienbien:e,dongnai:e,dongthap:e,gialai:e,hagiang:e,haiduong:e,haiphong:e,hanam:e,hanoi:e,hatinh:e,haugiang:e,hoabinh:e,hue:e,hungyen:e,khanhhoa:e,kiengiang:e,kontum:e,laichau:e,lamdong:e,langson:e,laocai:e,longan:e,namdinh:e,nghean:e,ninhbinh:e,ninhthuan:e,phutho:e,phuyen:e,quangbinh:e,quangnam:e,quangngai:e,quangninh:e,quangtri:e,soctrang:e,sonla:e,tayninh:e,thaibinh:e,thainguyen:e,thanhhoa:e,thanhphohochiminh:e,thuathienhue:e,tiengiang:e,travinh:e,tuyenquang:e,vinhlong:e,vinhphuc:e,yenbai:e}],vu:Oe,wf:[1,{biz:t,sch:t}],ws:[1,{com:e,edu:e,gov:e,net:e,org:e,advisor:s,cloud66:t,dyndns:t,mypets:t}],yt:[1,{org:t}],"xn--mgbaam7a8h":e,امارات:e,"xn--y9a3aq":e,հայ:e,"xn--54b7fta0cc":e,বাংলা:e,"xn--90ae":e,бг:e,"xn--mgbcpq6gpa1a":e,البحرين:e,"xn--90ais":e,бел:e,"xn--fiqs8s":e,中国:e,"xn--fiqz9s":e,中國:e,"xn--lgbbat1ad8j":e,الجزائر:e,"xn--wgbh1c":e,مصر:e,"xn--e1a4c":e,ею:e,"xn--qxa6a":e,ευ:e,"xn--mgbah1a3hjkrd":e,موريتانيا:e,"xn--node":e,გე:e,"xn--qxam":e,ελ:e,"xn--j6w193g":[1,{"xn--gmqw5a":e,"xn--55qx5d":e,"xn--mxtq1m":e,"xn--wcvs22d":e,"xn--uc0atv":e,"xn--od0alg":e}],香港:[1,{個人:e,公司:e,政府:e,教育:e,組織:e,網絡:e}],"xn--2scrj9c":e,ಭಾರತ:e,"xn--3hcrj9c":e,ଭାରତ:e,"xn--45br5cyl":e,ভাৰত:e,"xn--h2breg3eve":e,भारतम्:e,"xn--h2brj9c8c":e,भारोत:e,"xn--mgbgu82a":e,ڀارت:e,"xn--rvc1e0am3e":e,ഭാരതം:e,"xn--h2brj9c":e,भारत:e,"xn--mgbbh1a":e,بارت:e,"xn--mgbbh1a71e":e,بھارت:e,"xn--fpcrj9c3d":e,భారత్:e,"xn--gecrj9c":e,ભારત:e,"xn--s9brj9c":e,ਭਾਰਤ:e,"xn--45brj9c":e,ভারত:e,"xn--xkc2dl3a5ee0h":e,இந்தியா:e,"xn--mgba3a4f16a":e,ایران:e,"xn--mgba3a4fra":e,ايران:e,"xn--mgbtx2b":e,عراق:e,"xn--mgbayh7gpa":e,الاردن:e,"xn--3e0b707e":e,한국:e,"xn--80ao21a":e,қаз:e,"xn--q7ce6a":e,ລາວ:e,"xn--fzc2c9e2c":e,ලංකා:e,"xn--xkc2al3hye2a":e,இலங்கை:e,"xn--mgbc0a9azcg":e,المغرب:e,"xn--d1alf":e,мкд:e,"xn--l1acc":e,мон:e,"xn--mix891f":e,澳門:e,"xn--mix082f":e,澳门:e,"xn--mgbx4cd0ab":e,مليسيا:e,"xn--mgb9awbf":e,عمان:e,"xn--mgbai9azgqp6j":e,پاکستان:e,"xn--mgbai9a5eva00b":e,پاكستان:e,"xn--ygbi2ammx":e,فلسطين:e,"xn--90a3ac":[1,{"xn--80au":e,"xn--90azh":e,"xn--d1at":e,"xn--c1avg":e,"xn--o1ac":e,"xn--o1ach":e}],срб:[1,{ак:e,обр:e,од:e,орг:e,пр:e,упр:e}],"xn--p1ai":e,рф:e,"xn--wgbl6a":e,قطر:e,"xn--mgberp4a5d4ar":e,السعودية:e,"xn--mgberp4a5d4a87g":e,السعودیة:e,"xn--mgbqly7c0a67fbc":e,السعودیۃ:e,"xn--mgbqly7cvafr":e,السعوديه:e,"xn--mgbpl2fh":e,سودان:e,"xn--yfro4i67o":e,新加坡:e,"xn--clchc0ea0b2g2a9gcd":e,சிங்கப்பூர்:e,"xn--ogbpf8fl":e,سورية:e,"xn--mgbtf8fl":e,سوريا:e,"xn--o3cw4h":[1,{"xn--o3cyx2a":e,"xn--12co0c3b4eva":e,"xn--m3ch0j3a":e,"xn--h3cuzk1di":e,"xn--12c1fe0br":e,"xn--12cfi8ixb8l":e}],ไทย:[1,{ทหาร:e,ธุรกิจ:e,เน็ต:e,รัฐบาล:e,ศึกษา:e,องค์กร:e}],"xn--pgbs0dh":e,تونس:e,"xn--kpry57d":e,台灣:e,"xn--kprw13d":e,台湾:e,"xn--nnx388a":e,臺灣:e,"xn--j1amh":e,укр:e,"xn--mgb2ddes":e,اليمن:e,xxx:e,ye:r,za:[0,{ac:e,agric:e,alt:e,co:e,edu:e,gov:e,grondar:e,law:e,mil:e,net:e,ngo:e,nic:e,nis:e,nom:e,org:e,school:e,tm:e,web:e}],zm:[1,{ac:e,biz:e,co:e,com:e,edu:e,gov:e,info:e,mil:e,net:e,org:e,sch:e}],zw:[1,{ac:e,co:e,gov:e,mil:e,org:e}],aaa:e,aarp:e,abb:e,abbott:e,abbvie:e,abc:e,able:e,abogado:e,abudhabi:e,academy:[1,{official:t}],accenture:e,accountant:e,accountants:e,aco:e,actor:e,ads:e,adult:e,aeg:e,aetna:e,afl:e,africa:e,agakhan:e,agency:e,aig:e,airbus:e,airforce:e,airtel:e,akdn:e,alibaba:e,alipay:e,allfinanz:e,allstate:e,ally:e,alsace:e,alstom:e,amazon:e,americanexpress:e,americanfamily:e,amex:e,amfam:e,amica:e,amsterdam:e,analytics:e,android:e,anquan:e,anz:e,aol:e,apartments:e,app:[1,{adaptable:t,aiven:t,beget:s,brave:i,clerk:t,clerkstage:t,cloudflare:t,wnext:t,csb:[2,{preview:t}],convex:t,corespeed:t,deta:t,ondigitalocean:t,easypanel:t,encr:[2,{frontend:t}],evervault:a,expo:[2,{staging:t}],edgecompute:t,"on-fleek":t,flutterflow:t,sprites:t,e2b:t,framer:t,gadget:t,github:t,hosted:s,run:[0,{"*":t,mtls:s}],web:t,hackclub:t,hasura:t,onhercules:t,botdash:t,shiptoday:t,leapcell:t,loginline:t,lovable:t,luyani:t,magicpatterns:t,medusajs:t,messerli:t,miren:t,mocha:t,netlify:t,ngrok:t,"ngrok-free":t,developer:s,noop:t,northflank:s,upsun:s,railway:[0,{up:t}],replit:o,nyat:t,snowflake:[0,{"*":t,privatelink:s}],streamlit:t,spawnbase:t,telebit:t,typedream:t,vercel:t,wal:t,wasmer:t,bookonline:t,windsurf:t,base44:t,zeabur:t,zerops:s}],apple:[1,{int:[2,{cloud:[0,{"*":t,r:[0,{"*":t,"ap-north-1":s,"ap-south-1":s,"ap-south-2":s,"eu-central-1":s,"eu-north-1":s,"us-central-1":s,"us-central-2":s,"us-east-1":s,"us-east-2":s,"us-west-1":s,"us-west-2":s,"us-west-3":s}]}]}]}],aquarelle:e,arab:e,aramco:e,archi:e,army:e,art:e,arte:e,asda:e,associates:e,athleta:e,attorney:e,auction:e,audi:e,audible:e,audio:e,auspost:e,author:e,auto:e,autos:e,aws:[1,{on:[0,{"af-south-1":u,"ap-east-1":u,"ap-northeast-1":u,"ap-northeast-2":u,"ap-northeast-3":u,"ap-south-1":u,"ap-south-2":l,"ap-southeast-1":u,"ap-southeast-2":u,"ap-southeast-3":u,"ap-southeast-4":l,"ap-southeast-5":l,"ca-central-1":u,"ca-west-1":l,"eu-central-1":u,"eu-central-2":l,"eu-north-1":u,"eu-south-1":u,"eu-south-2":l,"eu-west-1":u,"eu-west-2":u,"eu-west-3":u,"il-central-1":l,"me-central-1":l,"me-south-1":u,"sa-east-1":u,"us-east-1":u,"us-east-2":u,"us-west-1":u,"us-west-2":u,"ap-southeast-7":d,"mx-central-1":d,"us-gov-east-1":f,"us-gov-west-1":f}],sagemaker:[0,{"ap-northeast-1":m,"ap-northeast-2":m,"ap-south-1":m,"ap-southeast-1":m,"ap-southeast-2":m,"ca-central-1":g,"eu-central-1":m,"eu-west-1":m,"eu-west-2":m,"us-east-1":g,"us-east-2":g,"us-west-2":g,"af-south-1":h,"ap-east-1":h,"ap-northeast-3":h,"ap-south-2":y,"ap-southeast-3":h,"ap-southeast-4":y,"ca-west-1":[0,{notebook:t,"notebook-fips":t}],"eu-central-2":h,"eu-north-1":h,"eu-south-1":h,"eu-south-2":h,"eu-west-3":h,"il-central-1":h,"me-central-1":h,"me-south-1":h,"sa-east-1":h,"us-gov-east-1":p,"us-gov-west-1":p,"us-west-1":[0,{notebook:t,"notebook-fips":t,studio:t}],experiments:s}],repost:[0,{private:s}]}],axa:e,azure:e,baby:e,baidu:e,banamex:e,band:e,bank:e,bar:e,barcelona:e,barclaycard:e,barclays:e,barefoot:e,bargains:e,baseball:e,basketball:[1,{aus:t,nz:t}],bauhaus:e,bayern:e,bbc:e,bbt:e,bbva:e,bcg:e,bcn:e,beats:e,beauty:e,beer:e,berlin:e,best:e,bestbuy:e,bet:e,bharti:e,bible:e,bid:e,bike:e,bing:e,bingo:e,bio:e,black:e,blackfriday:e,blockbuster:e,blog:e,bloomberg:e,blue:e,bms:e,bmw:e,bnpparibas:e,boats:e,boehringer:e,bofa:e,bom:e,bond:e,boo:e,book:e,booking:e,bosch:e,bostik:e,boston:e,bot:e,boutique:e,box:e,bradesco:e,bridgestone:e,broadway:e,broker:e,brother:e,brussels:e,build:[1,{shiptoday:t,v0:t,windsurf:t}],builders:[1,{cloudsite:t}],business:v,buy:e,buzz:e,bzh:e,cab:e,cafe:e,cal:e,call:e,calvinklein:e,cam:e,camera:e,camp:[1,{emf:[0,{at:t}]}],canon:e,capetown:e,capital:e,capitalone:e,car:e,caravan:e,cards:e,care:e,career:e,careers:e,cars:e,casa:[1,{nabu:[0,{ui:t}]}],case:[1,{sav:t}],cash:e,casino:e,catering:e,catholic:e,cba:e,cbn:e,cbre:e,center:e,ceo:e,cern:e,cfa:e,cfd:e,chanel:e,channel:e,charity:e,chase:e,chat:e,cheap:e,chintai:e,christmas:e,chrome:e,church:e,cipriani:e,circle:e,cisco:e,citadel:e,citi:e,citic:e,city:e,claims:e,cleaning:e,click:e,clinic:e,clinique:e,clothing:e,cloud:[1,{antagonist:t,begetcdn:s,convex:S,elementor:t,emergent:t,encoway:[0,{eu:t}],statics:s,ravendb:t,axarnet:[0,{"es-1":t}],diadem:t,jelastic:[0,{vip:t}],jele:t,"jenv-aruba":[0,{aruba:[0,{eur:[0,{it1:t}]}],it1:t}],keliweb:[2,{cs:t}],oxa:[2,{tn:t,uk:t}],primetel:[2,{uk:t}],reclaim:[0,{ca:t,uk:t,us:t}],trendhosting:[0,{ch:t,de:t}],jote:t,jotelulu:t,kuleuven:t,laravel:t,linkyard:t,magentosite:s,matlab:t,observablehq:t,perspecta:t,vapor:t,"on-rancher":s,scw:[0,{baremetal:[0,{"fr-par-1":t,"fr-par-2":t,"nl-ams-1":t}],"fr-par":[0,{cockpit:t,ddl:t,dtwh:t,fnc:[2,{functions:t}],ifr:t,k8s:T,kafk:t,mgdb:t,rdb:t,s3:t,"s3-website":t,scbl:t,whm:t}],instances:[0,{priv:t,pub:t}],k8s:t,"nl-ams":[0,{cockpit:t,ddl:t,dtwh:t,ifr:t,k8s:T,kafk:t,mgdb:t,rdb:t,s3:t,"s3-website":t,scbl:t,whm:t}],"pl-waw":[0,{cockpit:t,ddl:t,dtwh:t,ifr:t,k8s:T,kafk:t,mgdb:t,rdb:t,s3:t,"s3-website":t,scbl:t}],scalebook:t,smartlabeling:t}],servebolt:t,onstackit:[0,{runs:t}],trafficplex:t,"unison-services":t,urown:t,voorloper:t,zap:t}],club:[1,{cloudns:t,jele:t,barsy:t}],clubmed:e,coach:e,codes:[1,{owo:s}],coffee:e,college:e,cologne:e,commbank:e,community:[1,{nog:t,ravendb:t,myforum:t}],company:[1,{mybox:t}],compare:e,computer:e,comsec:e,condos:e,construction:e,consulting:e,contact:e,contractors:e,cooking:e,cool:[1,{elementor:t,de:t}],corsica:e,country:e,coupon:e,coupons:e,courses:e,cpa:e,credit:e,creditcard:e,creditunion:e,cricket:e,crown:e,crs:e,cruise:e,cruises:e,cuisinella:e,cymru:e,cyou:e,dad:e,dance:e,data:e,date:e,dating:e,datsun:e,day:e,dclk:e,dds:e,deal:e,dealer:e,deals:e,degree:e,delivery:e,dell:e,deloitte:e,delta:e,democrat:e,dental:e,dentist:e,desi:e,design:[1,{graphic:t,bss:t}],dev:[1,{myaddr:t,panel:t,bearblog:t,brave:i,lcl:s,lclstage:s,stg:s,stgstage:s,pages:t,r2:t,workers:t,deno:t,"deno-staging":t,deta:t,lp:[2,{api:t,objects:t}],evervault:a,fly:t,githubpreview:t,gateway:s,grebedoc:t,botdash:t,inbrowser:s,"is-a-good":t,iserv:t,leapcell:t,runcontainers:t,localcert:[0,{user:s}],loginline:t,barsy:t,mediatech:t,"mocha-sandbox":t,modx:t,ngrok:t,"ngrok-free":t,"is-a-fullstack":t,"is-cool":t,"is-not-a":t,localplayer:t,xmit:t,"platter-app":t,replit:[2,{archer:t,bones:t,canary:t,global:t,hacker:t,id:t,janeway:t,kim:t,kira:t,kirk:t,odo:t,paris:t,picard:t,pike:t,prerelease:t,reed:t,riker:t,sisko:t,spock:t,staging:t,sulu:t,tarpit:t,teams:t,tucker:t,wesley:t,worf:t}],crm:[0,{aa:s,ab:s,ac:s,ad:s,ae:s,af:s,ci:s,d:s,pa:s,pb:s,pc:s,pd:s,pe:s,pf:s,w:s,wa:s,wb:s,wc:s,wd:s,we:s,wf:s}],erp:se,vercel:t,webhare:s,hrsn:t,"is-a":t}],dhl:e,diamonds:e,diet:e,digital:[1,{cloudapps:[2,{london:t}]}],direct:[1,{libp2p:t}],directory:e,discount:e,discover:e,dish:e,diy:[1,{discourse:t,imagine:t}],dnp:e,docs:e,doctor:e,dog:e,domains:e,dot:e,download:e,drive:e,dtv:e,dubai:e,dupont:e,durban:e,dvag:e,dvr:e,earth:e,eat:e,eco:e,edeka:e,education:v,email:[1,{crisp:[0,{on:t}],intouch:t,tawk:we,tawkto:we}],emerck:e,energy:e,engineer:e,engineering:e,enterprises:e,epson:e,equipment:e,ericsson:e,erni:e,esq:e,estate:[1,{compute:s}],eurovision:e,eus:[1,{party:Fe}],events:[1,{koobin:t,co:t}],exchange:e,expert:e,exposed:e,express:e,extraspace:e,fage:e,fail:e,fairwinds:e,faith:e,family:e,fan:e,fans:e,farm:[1,{storj:t}],farmers:e,fashion:e,fast:e,fedex:e,feedback:e,ferrari:e,ferrero:e,fidelity:e,fido:e,film:e,final:e,finance:e,financial:v,fire:e,firestone:e,firmdale:e,fish:e,fishing:e,fit:e,fitness:e,flickr:e,flights:e,flir:e,florist:e,flowers:e,fly:e,foo:e,food:e,football:e,ford:e,forex:e,forsale:e,forum:e,foundation:e,fox:e,free:e,fresenius:e,frl:e,frogans:e,frontier:e,ftr:e,fujitsu:e,fun:Ie,fund:e,furniture:e,futbol:e,fyi:e,gal:e,gallery:e,gallo:e,gallup:e,game:e,games:[1,{pley:t,sheezy:t}],gap:e,garden:e,gay:[1,{pages:t}],gbiz:e,gdn:[1,{cnpy:t}],gea:e,gent:e,genting:e,george:e,ggee:e,gift:e,gifts:e,gives:e,giving:e,glass:e,gle:e,global:[1,{appwrite:t}],globo:e,gmail:e,gmbh:e,gmo:e,gmx:e,godaddy:e,gold:e,goldpoint:e,golf:e,goodyear:e,goog:[1,{cloud:t,translate:t,usercontent:s}],google:e,gop:e,got:e,grainger:e,graphics:e,gratis:e,green:e,gripe:e,grocery:e,group:[1,{discourse:t}],gucci:e,guge:e,guide:e,guitars:e,guru:e,hair:e,hamburg:e,hangout:e,haus:e,hbo:e,hdfc:e,hdfcbank:e,health:[1,{hra:t}],healthcare:e,help:e,helsinki:e,here:e,hermes:e,hiphop:e,hisamitsu:e,hitachi:e,hiv:e,hkt:e,hockey:e,holdings:e,holiday:e,homedepot:e,homegoods:e,homes:e,homesense:e,honda:e,horse:e,hospital:e,host:[1,{cloudaccess:t,freesite:t,easypanel:t,emergent:t,fastvps:t,myfast:t,gadget:t,tempurl:t,wpmudev:t,iserv:t,jele:t,mircloud:t,bolt:t,wp2:t,half:t}],hosting:[1,{opencraft:t}],hot:e,hotel:e,hotels:e,hotmail:e,house:e,how:e,hsbc:e,hughes:e,hyatt:e,hyundai:e,ibm:e,icbc:e,ice:e,icu:e,ieee:e,ifm:e,ikano:e,imamat:e,imdb:e,immo:e,immobilien:e,inc:e,industries:e,infiniti:e,ing:e,ink:e,institute:e,insurance:e,insure:e,international:e,intuit:e,investments:e,ipiranga:e,irish:e,ismaili:e,ist:e,istanbul:e,itau:e,itv:e,jaguar:e,java:e,jcb:e,jeep:e,jetzt:e,jewelry:e,jio:e,jll:e,jmp:e,jnj:e,joburg:e,jot:e,joy:e,jpmorgan:e,jprs:e,juegos:e,juniper:e,kaufen:e,kddi:e,kerryhotels:e,kerryproperties:e,kfh:e,kia:e,kids:e,kim:e,kindle:e,kitchen:e,kiwi:e,koeln:e,komatsu:e,kosher:e,kpmg:e,kpn:e,krd:[1,{co:t,edu:t}],kred:e,kuokgroup:e,kyoto:e,lacaixa:e,lamborghini:e,lamer:e,land:e,landrover:e,lanxess:e,lasalle:e,lat:e,latino:e,latrobe:e,law:e,lawyer:e,lds:e,lease:e,leclerc:e,lefrak:e,legal:e,lego:e,lexus:e,lgbt:e,lidl:e,life:e,lifeinsurance:e,lifestyle:e,lighting:e,like:e,lilly:e,limited:e,limo:e,lincoln:e,link:[1,{myfritz:t,cyon:t,joinmc:t,dweb:s,inbrowser:s,keenetic:t,nftstorage:Gs,mypep:t,storacha:Gs,w3s:Gs}],live:[1,{aem:t,hlx:t,ewp:s}],living:e,llc:e,llp:e,loan:e,loans:e,locker:e,locus:e,lol:[1,{omg:t}],london:e,lotte:e,lotto:e,love:e,lpl:e,lplfinancial:e,ltd:e,ltda:e,lundbeck:e,luxe:e,luxury:e,madrid:e,maif:e,maison:e,makeup:e,man:e,management:e,mango:e,map:e,market:e,marketing:e,markets:e,marriott:e,marshalls:e,mattel:e,mba:e,mckinsey:e,med:e,media:ss,meet:e,melbourne:e,meme:e,memorial:e,men:e,menu:[1,{barsy:t,barsyonline:t}],merck:e,merckmsd:e,miami:e,microsoft:e,mini:e,mint:e,mit:e,mitsubishi:e,mlb:e,mls:e,mma:e,mobile:e,moda:e,moe:e,moi:e,mom:e,monash:e,money:e,monster:e,mormon:e,mortgage:e,moscow:e,moto:e,motorcycles:e,mov:e,movie:e,msd:e,mtn:e,mtr:e,music:e,nab:e,nagoya:e,navy:e,nba:e,nec:e,netbank:e,netflix:e,network:[1,{aem:t,alces:s,appwrite:t,co:t,arvo:t,azimuth:t,tlon:t}],neustar:e,new:e,news:[1,{noticeable:t}],next:e,nextdirect:e,nexus:e,nfl:e,ngo:e,nhk:e,nico:e,nike:e,nikon:e,ninja:e,nissan:e,nissay:e,nokia:e,norton:e,now:e,nowruz:e,nowtv:e,nra:e,nrw:e,ntt:e,nyc:e,obi:e,observer:e,office:e,okinawa:e,olayan:e,olayangroup:e,ollo:e,omega:e,one:[1,{kin:s,service:t,website:t}],ong:e,onl:e,online:[1,{eero:t,"eero-stage":t,websitebuilder:t,leapcell:t,barsy:t}],ooo:e,open:e,oracle:e,orange:[1,{tech:t}],organic:e,origins:e,osaka:e,otsuka:e,ott:e,ovh:[1,{nerdpol:t}],page:[1,{aem:t,hlx:t,codeberg:t,deuxfleurs:t,mybox:t,heyflow:t,prvcy:t,rocky:t,statichost:t,pdns:t,plesk:t}],panasonic:e,paris:e,pars:e,partners:e,parts:e,party:e,pay:e,pccw:e,pet:e,pfizer:e,pharmacy:e,phd:e,philips:e,phone:e,photo:e,photography:e,photos:ss,physio:e,pics:e,pictet:e,pictures:[1,{1337:t}],pid:e,pin:e,ping:e,pink:e,pioneer:e,pizza:[1,{ngrok:t}],place:v,play:e,playstation:e,plumbing:e,plus:[1,{playit:[2,{at:s,with:t}]}],pnc:e,pohl:e,poker:e,politie:e,porn:e,praxi:e,press:e,prime:e,prod:e,productions:e,prof:e,progressive:e,promo:e,properties:e,property:e,protection:e,pru:e,prudential:e,pub:[1,{id:s,kin:s,barsy:t}],pwc:e,qpon:e,quebec:e,quest:e,racing:e,radio:e,read:e,realestate:e,realtor:e,realty:e,recipes:e,red:e,redumbrella:e,rehab:e,reise:e,reisen:e,reit:e,reliance:e,ren:e,rent:e,rentals:e,repair:e,report:e,republican:e,rest:e,restaurant:e,review:e,reviews:[1,{aem:t}],rexroth:e,rich:e,richardli:e,ricoh:e,ril:e,rio:e,rip:[1,{clan:t}],rocks:[1,{myddns:t,stackit:t,"lima-city":t,webspace:t}],rodeo:e,rogers:e,room:e,rsvp:e,rugby:e,ruhr:e,run:[1,{appwrite:s,canva:t,development:t,ravendb:t,liara:[2,{iran:t}],lovable:t,needle:t,build:s,code:s,database:s,migration:s,onporter:t,repl:t,stackit:t,val:se,vercel:t,wix:t}],rwe:e,ryukyu:e,saarland:e,safe:e,safety:e,sakura:e,sale:e,salon:e,samsclub:e,samsung:e,sandvik:e,sandvikcoromant:e,sanofi:e,sap:e,sarl:e,sas:e,save:e,saxo:e,sbi:e,sbs:e,scb:e,schaeffler:e,schmidt:e,scholarships:e,school:e,schule:e,schwarz:e,science:e,scot:[1,{co:t,me:t,org:t,gov:[2,{service:t}]}],search:e,seat:e,secure:e,security:e,seek:e,select:e,sener:e,services:[1,{loginline:t}],seven:e,sew:e,sex:e,sexy:e,sfr:e,shangrila:e,sharp:e,shell:e,shia:e,shiksha:e,shoes:e,shop:[1,{base:t,hoplix:t,barsy:t,barsyonline:t,shopware:t}],shopping:e,shouji:e,show:Ie,silk:e,sina:e,singles:e,site:[1,{square:t,canva:I,cloudera:s,convex:S,cyon:t,caffeine:t,fastvps:t,figma:t,"figma-gov":t,preview:t,heyflow:t,jele:t,jouwweb:t,loginline:t,barsy:t,co:t,notion:t,omniwe:t,opensocial:t,madethis:t,support:t,platformsh:s,tst:s,byen:t,sol:t,srht:t,novecore:t,cpanel:t,wpsquared:t,sourcecraft:t}],ski:e,skin:e,sky:e,skype:e,sling:e,smart:e,smile:e,sncf:e,soccer:e,social:e,softbank:e,software:e,sohu:e,solar:e,solutions:e,song:e,sony:e,soy:e,spa:e,space:[1,{myfast:t,heiyu:t,hf:[2,{static:t}],"app-ionos":t,project:t,uber:t,xs4all:t}],sport:e,spot:e,srl:e,stada:e,staples:e,star:e,statebank:e,statefarm:e,stc:e,stcgroup:e,stockholm:e,storage:e,store:[1,{barsy:t,sellfy:t,shopware:t,storebase:t}],stream:e,studio:e,study:e,style:e,sucks:e,supplies:e,supply:e,support:[1,{barsy:t}],surf:e,surgery:e,suzuki:e,swatch:e,swiss:e,sydney:e,systems:[1,{knightpoint:t,miren:t}],tab:e,taipei:e,talk:e,taobao:e,target:e,tatamotors:e,tatar:e,tattoo:e,tax:e,taxi:e,tci:e,tdk:e,team:[1,{discourse:t,jelastic:t}],tech:[1,{cleverapps:t}],technology:v,temasek:e,tennis:e,teva:e,thd:e,theater:e,theatre:e,tiaa:e,tickets:e,tienda:e,tips:e,tires:e,tirol:e,tjmaxx:e,tjx:e,tkmaxx:e,tmall:e,today:[1,{prequalifyme:t}],tokyo:e,tools:[1,{addr:W,myaddr:t}],top:[1,{ntdll:t,wadl:s}],toray:e,toshiba:e,total:e,tours:e,town:e,toyota:e,toys:e,trade:e,trading:e,training:e,travel:e,travelers:e,travelersinsurance:e,trust:e,trv:e,tube:e,tui:e,tunes:e,tushu:e,tvs:e,ubank:e,ubs:e,unicom:e,university:e,uno:e,uol:e,ups:e,vacations:e,vana:e,vanguard:e,vegas:e,ventures:e,verisign:e,versicherung:e,vet:e,viajes:e,video:e,vig:e,viking:e,villas:e,vin:e,vip:[1,{hidns:t}],virgin:e,visa:e,vision:e,viva:e,vivo:e,vlaanderen:e,vodka:e,volvo:e,vote:e,voting:e,voto:e,voyage:e,wales:e,walmart:e,walter:e,wang:e,wanggou:e,watch:e,watches:e,weather:e,weatherchannel:e,webcam:e,weber:e,website:ss,wed:e,wedding:e,weibo:e,weir:e,whoswho:e,wien:e,wiki:ss,williamhill:e,win:e,windows:e,wine:e,winners:e,wme:e,woodside:e,work:[1,{"imagine-proxy":t}],works:e,world:e,wow:e,wtc:e,wtf:e,xbox:e,xerox:e,xihuan:e,xin:e,"xn--11b4c3d":e,कॉम:e,"xn--1ck2e1b":e,セール:e,"xn--1qqw23a":e,佛山:e,"xn--30rr7y":e,慈善:e,"xn--3bst00m":e,集团:e,"xn--3ds443g":e,在线:e,"xn--3pxu8k":e,点看:e,"xn--42c2d9a":e,คอม:e,"xn--45q11c":e,八卦:e,"xn--4gbrim":e,موقع:e,"xn--55qw42g":e,公益:e,"xn--55qx5d":e,公司:e,"xn--5su34j936bgsg":e,香格里拉:e,"xn--5tzm5g":e,网站:e,"xn--6frz82g":e,移动:e,"xn--6qq986b3xl":e,我爱你:e,"xn--80adxhks":e,москва:e,"xn--80aqecdr1a":e,католик:e,"xn--80asehdb":e,онлайн:e,"xn--80aswg":e,сайт:e,"xn--8y0a063a":e,联通:e,"xn--9dbq2a":e,קום:e,"xn--9et52u":e,时尚:e,"xn--9krt00a":e,微博:e,"xn--b4w605ferd":e,淡马锡:e,"xn--bck1b9a5dre4c":e,ファッション:e,"xn--c1avg":e,орг:e,"xn--c2br7g":e,नेट:e,"xn--cck2b3b":e,ストア:e,"xn--cckwcxetd":e,アマゾン:e,"xn--cg4bki":e,삼성:e,"xn--czr694b":e,商标:e,"xn--czrs0t":e,商店:e,"xn--czru2d":e,商城:e,"xn--d1acj3b":e,дети:e,"xn--eckvdtc9d":e,ポイント:e,"xn--efvy88h":e,新闻:e,"xn--fct429k":e,家電:e,"xn--fhbei":e,كوم:e,"xn--fiq228c5hs":e,中文网:e,"xn--fiq64b":e,中信:e,"xn--fjq720a":e,娱乐:e,"xn--flw351e":e,谷歌:e,"xn--fzys8d69uvgm":e,電訊盈科:e,"xn--g2xx48c":e,购物:e,"xn--gckr3f0f":e,クラウド:e,"xn--gk3at1e":e,通販:e,"xn--hxt814e":e,网店:e,"xn--i1b6b1a6a2e":e,संगठन:e,"xn--imr513n":e,餐厅:e,"xn--io0a7i":e,网络:e,"xn--j1aef":e,ком:e,"xn--jlq480n2rg":e,亚马逊:e,"xn--jvr189m":e,食品:e,"xn--kcrx77d1x4a":e,飞利浦:e,"xn--kput3i":e,手机:e,"xn--mgba3a3ejt":e,ارامكو:e,"xn--mgba7c0bbn0a":e,العليان:e,"xn--mgbab2bd":e,بازار:e,"xn--mgbca7dzdo":e,ابوظبي:e,"xn--mgbi4ecexp":e,كاثوليك:e,"xn--mgbt3dhd":e,همراه:e,"xn--mk1bu44c":e,닷컴:e,"xn--mxtq1m":e,政府:e,"xn--ngbc5azd":e,شبكة:e,"xn--ngbe9e0a":e,بيتك:e,"xn--ngbrx":e,عرب:e,"xn--nqv7f":e,机构:e,"xn--nqv7fs00ema":e,组织机构:e,"xn--nyqy26a":e,健康:e,"xn--otu796d":e,招聘:e,"xn--p1acf":[1,{"xn--90amc":t,"xn--j1aef":t,"xn--j1ael8b":t,"xn--h1ahn":t,"xn--j1adp":t,"xn--c1avg":t,"xn--80aaa0cvac":t,"xn--h1aliz":t,"xn--90a1af":t,"xn--41a":t}],рус:[1,{биз:t,ком:t,крым:t,мир:t,мск:t,орг:t,самара:t,сочи:t,спб:t,я:t}],"xn--pssy2u":e,大拿:e,"xn--q9jyb4c":e,みんな:e,"xn--qcka1pmc":e,グーグル:e,"xn--rhqv96g":e,世界:e,"xn--rovu88b":e,書籍:e,"xn--ses554g":e,网址:e,"xn--t60b56a":e,닷넷:e,"xn--tckwe":e,コム:e,"xn--tiq49xqyj":e,天主教:e,"xn--unup4y":e,游戏:e,"xn--vermgensberater-ctb":e,vermögensberater:e,"xn--vermgensberatung-pwb":e,vermögensberatung:e,"xn--vhquv":e,企业:e,"xn--vuq861b":e,信息:e,"xn--w4r85el8fhu5dnra":e,嘉里大酒店:e,"xn--w4rs40l":e,嘉里:e,"xn--xhq521b":e,广东:e,"xn--zfr164b":e,政务:e,xyz:[1,{caffeine:t,botdash:t,telebit:s}],yachts:e,yahoo:e,yamaxun:e,yandex:e,yodobashi:e,yoga:e,yokohama:e,you:e,youtube:e,yun:e,zappos:e,zara:e,zero:e,zip:e,zone:[1,{triton:s,stackit:t,lima:t}],zuerich:e}]})();function vL(e,t,n,r){let s=null,i=t;for(;i!==void 0&&((i[0]&r)!==0&&(s={index:n+1,isIcann:(i[0]&1)!==0,isPrivate:(i[0]&2)!==0}),n!==-1);){const a=i[1];i=Object.prototype.hasOwnProperty.call(a,e[n])?a[e[n]]:a["*"],n-=1}return s}function vU(e,t,n){var r;if(tve(e,t,n))return;const s=e.split("."),i=(t.allowPrivateDomains?2:0)|(t.allowIcannDomains?1:0),a=vL(s,nve,s.length-1,i);if(a!==null){n.isIcann=a.isIcann,n.isPrivate=a.isPrivate,n.publicSuffix=s.slice(a.index+1).join(".");return}const o=vL(s,rve,s.length-1,i);if(o!==null){n.isIcann=o.isIcann,n.isPrivate=o.isPrivate,n.publicSuffix=s.slice(o.index).join(".");return}n.isIcann=!1,n.isPrivate=!1,n.publicSuffix=(r=s[s.length-1])!==null&&r!==void 0?r:null}const xL=wU();function sve(e,t={}){return SU(e,5,vU,t,wU())}function xU(e,t={}){return eve(xL),SU(e,3,vU,t,xL).domain}const ive=new Set(["raw.githubusercontent.com","cdn.jsdelivr.net","unpkg.com","raw.github.com"]),ave=e=>{if(!e)return null;try{return new URL(e)}catch{return null}},ove=e=>{const t=ave(e);if(!t)return null;if(!ive.has(t.hostname))return t.origin;const n=t.pathname.split("/").map(r=>r.trim()).filter(r=>r.length>0);for(const r of n){const s=r.replace(/\.(ya?ml|json)$/i,"");if(/^[a-z0-9-]+(\.[a-z0-9-]+)+$/i.test(s))return`https://${s}`}return t.origin},cve=e=>{const t=ove(e);if(!t)return null;try{const n=new URL(t).hostname,s=sve(n).domain??n;return`https://www.google.com/s2/favicons?domain=${encodeURIComponent(s)}&sz=32`}catch{return null}};function H1({endpoint:e,kind:t,className:n,size:r=16}){const s=O.useMemo(()=>cve(e),[e]),[i,a]=O.useState(null);return!s||!!(s&&i===s)?b.jsx(uve,{kind:t,className:n}):b.jsx("img",{src:s,alt:"",width:r,height:r,className:qe("size-full rounded-full object-cover",n),loading:"lazy",referrerPolicy:"no-referrer",onError:()=>a(s)},s)}function uve({kind:e,className:t}){const n=qe("shrink-0",t);switch(e){case"mcp":return b.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",className:n,children:[b.jsx("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1.5",stroke:"currentColor",strokeWidth:"1.2"}),b.jsx("path",{d:"M5 7h1M5 9h4",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round"})]});case"graphql":return b.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",className:n,children:[b.jsx("path",{d:"M8 2L14 5.5V10.5L8 14L2 10.5V5.5L8 2Z",stroke:"currentColor",strokeWidth:"1.2",strokeLinejoin:"round"}),b.jsx("circle",{cx:"8",cy:"8",r:"1.5",fill:"currentColor",opacity:"0.5"})]});case"openapi":return b.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",className:n,children:[b.jsx("circle",{cx:"8",cy:"8",r:"6",stroke:"currentColor",strokeWidth:"1.2"}),b.jsx("path",{d:"M5 6h6M5 8h4M5 10h5",stroke:"currentColor",strokeWidth:"1.1",strokeLinecap:"round"})]});default:return b.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",className:n,children:[b.jsx("rect",{x:"2.5",y:"2.5",width:"11",height:"11",rx:"2",stroke:"currentColor",strokeWidth:"1.2"}),b.jsx("path",{d:"M5 6h6M5 8h4M5 10h3",stroke:"currentColor",strokeWidth:"1.1",strokeLinecap:"round"})]})}}const lve={VITE_APP_VERSION:"1.1.9",VITE_GITHUB_URL:"https://github.com/RhysSullivan/executor"},dve={connected:"bg-primary",probing:"bg-amber-400",draft:"bg-muted-foreground/30",auth_required:"bg-amber-500",error:"bg-destructive"},{VITE_APP_VERSION:fve,VITE_GITHUB_URL:hve}=lve;function mve(){const e=Zz(),t=lK(),n=t({to:"/"}),r=t({to:"/secrets"});return b.jsxs("div",{className:"flex h-screen overflow-hidden",children:[b.jsxs("aside",{className:"flex w-52 shrink-0 flex-col border-r border-sidebar-border bg-sidebar lg:w-56",children:[b.jsx("div",{className:"flex h-12 shrink-0 items-center border-b border-sidebar-border px-4",children:b.jsxs($r,{to:"/",className:"flex items-center gap-1.5",children:[b.jsx("span",{className:"font-display text-base tracking-tight text-foreground",children:"executor"}),b.jsx("span",{className:"rounded bg-primary/15 px-1.5 py-0.5 text-[10px] font-medium text-primary",children:"v3"})]})}),b.jsxs("nav",{className:"flex flex-1 flex-col p-2 overflow-y-auto",children:[b.jsx(TL,{to:"/",label:"Dashboard",active:!!n}),b.jsx(TL,{to:"/secrets",label:"Secrets",active:!!r}),b.jsx("div",{className:"mt-5 mb-1 px-2.5 text-[10px] font-medium uppercase tracking-widest text-muted-foreground/50",children:b.jsxs("div",{className:"flex items-center justify-between gap-2",children:[b.jsx("span",{children:"Sources"}),b.jsxs($r,{to:"/sources/add",className:"inline-flex items-center gap-1 rounded-md px-1.5 py-1 text-[10px] font-medium normal-case tracking-normal text-primary transition-colors hover:bg-sidebar-active hover:text-foreground",children:[b.jsx(qo,{className:"size-3"}),"Add"]})]})}),b.jsx(Fu,{loadable:e,loading:"Loading...",children:s=>s.length===0?b.jsx("div",{className:"px-2.5 py-2 text-[11px] leading-relaxed text-muted-foreground/40",children:"No sources yet"}):b.jsx("div",{className:"flex flex-col gap-px",children:s.map(i=>b.jsx(pve,{source:i,matchRoute:t},i.id))})})]}),b.jsx("div",{className:"shrink-0 border-t border-sidebar-border px-4 py-2.5",children:b.jsxs("div",{className:"flex flex-col items-start gap-1 text-[10px] leading-none",children:[b.jsxs("span",{className:"text-muted-foreground/35",children:["v",fve]}),b.jsx("a",{href:hve,target:"_blank",rel:"noreferrer",className:"text-muted-foreground/50 transition-colors hover:text-foreground",children:"Star on GitHub"})]})})]}),b.jsx("main",{className:"flex flex-1 flex-col min-w-0 overflow-hidden",children:b.jsx(L$,{})})]})}function pve(e){const{source:t,matchRoute:n}=e,r=n({to:"/sources/$sourceId",params:{sourceId:t.id},fuzzy:!0});return b.jsxs($r,{to:"/sources/$sourceId",params:{sourceId:t.id},search:{tab:"model"},className:qe("group flex items-center gap-2 rounded-md px-2.5 py-1.5 text-[13px] transition-colors",r?"bg-sidebar-active text-foreground font-medium":"text-sidebar-foreground hover:bg-sidebar-active/60 hover:text-foreground"),children:[b.jsx("div",{className:"flex size-3 shrink-0 items-center justify-center text-muted-foreground/50",children:b.jsx(H1,{endpoint:t.endpoint,kind:t.kind,className:"size-3"})}),b.jsx("span",{className:"flex-1 truncate",children:t.name}),b.jsx("span",{className:qe("size-1.5 shrink-0 rounded-full",dve[t.status]??"bg-muted-foreground/30"),title:t.status})]})}function TL(e){return b.jsx($r,{to:e.to,className:qe("flex items-center gap-2.5 rounded-md px-2.5 py-1.5 text-[13px] transition-colors",e.active?"bg-sidebar-active text-foreground font-medium":"text-sidebar-foreground hover:bg-sidebar-active/60 hover:text-foreground"),children:e.label})}var Tv=Object.defineProperty,gve=Object.getOwnPropertyDescriptor,bve=Object.getOwnPropertyNames,yve=Object.prototype.hasOwnProperty,QA=(e,t)=>{let n={};for(var r in e)Tv(n,r,{get:e[r],enumerable:!0});return Tv(n,Symbol.toStringTag,{value:"Module"}),n},_ve=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var s=bve(t),i=0,a=s.length,o;i<a;i++)o=s[i],!yve.call(e,o)&&o!==n&&Tv(e,o,{get:(c=>t[c]).bind(null,o),enumerable:!(r=gve(t,o))||r.enumerable});return e},TU=(e,t,n)=>(_ve(e,t,"default"),n);const q1=[{id:"abap",name:"ABAP",import:(()=>x(()=>import("./abap-BXYWi5l2.js"),[]))},{id:"actionscript-3",name:"ActionScript",import:(()=>x(()=>import("./actionscript-3-CRLSHa9e.js"),[]))},{id:"ada",name:"Ada",import:(()=>x(()=>import("./ada-DeReRNhg.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>x(()=>import("./angular-html-6NEUuZou.js").then(e=>e.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>x(()=>import("./angular-ts-BfBSdvnY.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>x(()=>import("./apache-CCUDgqAf.js"),[]))},{id:"apex",name:"Apex",import:(()=>x(()=>import("./apex-Bh6oOW3o.js"),[]))},{id:"apl",name:"APL",import:(()=>x(()=>import("./apl-C-KxP0FL.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>x(()=>import("./applescript-Dd26Nb5t.js"),[]))},{id:"ara",name:"Ara",import:(()=>x(()=>import("./ara-D6vCOKVX.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>x(()=>import("./asciidoc-DSG2rbEP.js"),[]))},{id:"asm",name:"Assembly",import:(()=>x(()=>import("./asm-CbVMAfFB.js"),[]))},{id:"astro",name:"Astro",import:(()=>x(()=>import("./astro-OEl6i-aI.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>x(()=>import("./awk-UmR4Ublb.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>x(()=>import("./ballerina-BMbY-1wP.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>x(()=>import("./bat-Dcnh2ot_.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>x(()=>import("./beancount-B92nBv9q.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>x(()=>import("./berry-C9fz7p0n.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>x(()=>import("./bibtex-DELXwv0g.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>x(()=>import("./bicep-D2njIRU5.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>x(()=>import("./bird2-D-8n_ahI.js"),[]))},{id:"blade",name:"Blade",import:(()=>x(()=>import("./blade-DrbQMUV-.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>x(()=>import("./bsl-C4qeDxuX.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>x(()=>import("./c-CyUOlKFr.js"),[]))},{id:"c3",name:"C3",import:(()=>x(()=>import("./c3-B1fh2zee.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>x(()=>import("./cadence-bIHbUj02.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>x(()=>import("./cairo-C_mOTUpN.js"),__vite__mapDeps([19,20])))},{id:"clarity",name:"Clarity",import:(()=>x(()=>import("./clarity-A4x-rz24.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>x(()=>import("./clojure-Bb2-3A0I.js"),[]))},{id:"cmake",name:"CMake",import:(()=>x(()=>import("./cmake-Cv5ljclQ.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>x(()=>import("./cobol-CELfDnG_.js"),__vite__mapDeps([21,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>x(()=>import("./codeowners-CKT8dJip.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>x(()=>import("./codeql-DXd8ggn3.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>x(()=>import("./coffee-CSg58a7P.js"),__vite__mapDeps([22,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>x(()=>import("./common-lisp-v102bg8X.js"),[]))},{id:"coq",name:"Coq",import:(()=>x(()=>import("./coq-CxCehFeR.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>x(()=>import("./cpp-C28rag7_.js"),__vite__mapDeps([23,24,25,26,16])))},{id:"crystal",name:"Crystal",import:(()=>x(()=>import("./crystal-kLfOnxTY.js"),__vite__mapDeps([27,1,2,3,16,26,28])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>x(()=>import("./csharp-DieIJxYJ.js"),[]))},{id:"css",name:"CSS",import:(()=>x(()=>import("./css-BSK200cd.js"),[]))},{id:"csv",name:"CSV",import:(()=>x(()=>import("./csv-AZNL9t8Q.js"),[]))},{id:"cue",name:"CUE",import:(()=>x(()=>import("./cue-nzsbQn5T.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>x(()=>import("./cypher-BM7Pwunj.js"),[]))},{id:"d",name:"D",import:(()=>x(()=>import("./d-TG9YRPoI.js"),[]))},{id:"dart",name:"Dart",import:(()=>x(()=>import("./dart-DArdxSyj.js"),[]))},{id:"dax",name:"DAX",import:(()=>x(()=>import("./dax-B28Cho4e.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>x(()=>import("./desktop-Z9LhWKWr.js"),[]))},{id:"diff",name:"Diff",import:(()=>x(()=>import("./diff-BlzBhZx2.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>x(()=>import("./docker-DIG_IqVK.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>x(()=>import("./dotenv-Bf0GLMGc.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>x(()=>import("./dream-maker-DBhfoDN-.js"),[]))},{id:"edge",name:"Edge",import:(()=>x(()=>import("./edge-C9mkmEUa.js"),__vite__mapDeps([29,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>x(()=>import("./elixir-B1OcFvXE.js"),__vite__mapDeps([30,1,2,3])))},{id:"elm",name:"Elm",import:(()=>x(()=>import("./elm-BX_9EnK8.js"),__vite__mapDeps([31,25,26])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>x(()=>import("./emacs-lisp-fXIB3QbG.js"),[]))},{id:"erb",name:"ERB",import:(()=>x(()=>import("./erb-C0Gc-WV-.js"),__vite__mapDeps([32,1,2,3,33,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>x(()=>import("./erlang-Dh270pQQ.js"),__vite__mapDeps([39,40])))},{id:"fennel",name:"Fennel",import:(()=>x(()=>import("./fennel-CKW7gc4E.js"),[]))},{id:"fish",name:"Fish",import:(()=>x(()=>import("./fish-BiaFC76h.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>x(()=>import("./fluent-C1VbA1FI.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>x(()=>import("./fortran-fixed-form-B5hFr6Yn.js"),__vite__mapDeps([41,42])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>x(()=>import("./fortran-free-form-BuX3zftO.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>x(()=>import("./fsharp-B6CigNpP.js"),__vite__mapDeps([43,40])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>x(()=>import("./gdresource-ChoLB09i.js"),__vite__mapDeps([44,45,46])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>x(()=>import("./gdscript-BajwJ0jS.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>x(()=>import("./gdshader-MbeiIFWW.js"),[]))},{id:"genie",name:"Genie",import:(()=>x(()=>import("./genie-CTXGoN_z.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>x(()=>import("./gherkin-DQeIZrj7.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>x(()=>import("./git-commit-BicZTByO.js"),__vite__mapDeps([47,48])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>x(()=>import("./git-rebase-Bzlpfr7M.js"),__vite__mapDeps([49,28])))},{id:"gleam",name:"Gleam",import:(()=>x(()=>import("./gleam-B-IqXlZK.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>x(()=>import("./glimmer-js-cZi37nA1.js"),__vite__mapDeps([50,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>x(()=>import("./glimmer-ts-BY3QTAW9.js"),__vite__mapDeps([51,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>x(()=>import("./glsl-Bk7TyU8J.js"),__vite__mapDeps([25,26])))},{id:"gn",name:"GN",import:(()=>x(()=>import("./gn-deNdZ1en.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>x(()=>import("./gnuplot-BBjkHhdK.js"),[]))},{id:"go",name:"Go",import:(()=>x(()=>import("./go-Dn4lI1Tv.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>x(()=>import("./graphql-By4-2MiP.js"),__vite__mapDeps([35,2,11,36,13])))},{id:"groovy",name:"Groovy",import:(()=>x(()=>import("./groovy-DjMbfbx0.js"),[]))},{id:"hack",name:"Hack",import:(()=>x(()=>import("./hack-Ce3HFLQu.js"),__vite__mapDeps([52,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>x(()=>import("./haml-C-C08OMF.js"),__vite__mapDeps([34,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>x(()=>import("./handlebars-BFxKmXBZ.js"),__vite__mapDeps([53,1,2,3,38])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>x(()=>import("./haskell-DtebQ3Kv.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>x(()=>import("./haxe-n0Q_eay_.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>x(()=>import("./hcl-shhv74hy.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>x(()=>import("./hjson-BEMFYqr7.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>x(()=>import("./hlsl-Pefxhtaj.js"),[]))},{id:"html",name:"HTML",import:(()=>x(()=>import("./html-DBrZJmtb.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>x(()=>import("./html-derivative-DgyNW28a.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>x(()=>import("./http-D0p2QOuJ.js"),__vite__mapDeps([54,28,9,7,8,35,2,11,36,13])))},{id:"hurl",name:"Hurl",import:(()=>x(()=>import("./hurl-CeF7EoTQ.js"),__vite__mapDeps([55,35,2,11,36,13,7,8,56])))},{id:"hxml",name:"HXML",import:(()=>x(()=>import("./hxml-B_SuSTPP.js"),__vite__mapDeps([57,58])))},{id:"hy",name:"Hy",import:(()=>x(()=>import("./hy-CTpXmg0M.js"),[]))},{id:"imba",name:"Imba",import:(()=>x(()=>import("./imba-z_cUhu9e.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>x(()=>import("./ini-DOGW4-0C.js"),[]))},{id:"java",name:"Java",import:(()=>x(()=>import("./java-B2AjWfgk.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>x(()=>import("./javascript-XPxc2APE.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>x(()=>import("./jinja-DlBE7Xgz.js"),__vite__mapDeps([59,1,2,3])))},{id:"jison",name:"Jison",import:(()=>x(()=>import("./jison-DRGa8fbr.js"),__vite__mapDeps([60,2])))},{id:"json",name:"JSON",import:(()=>x(()=>import("./json-CjLXzM_z.js"),[]))},{id:"json5",name:"JSON5",import:(()=>x(()=>import("./json5-DE06a0U2.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>x(()=>import("./jsonc-BYi4HS05.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>x(()=>import("./jsonl-CuhIcKDk.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>x(()=>import("./jsonnet-DtQdHwK-.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>x(()=>import("./jssm-BlhucWo7.js"),[]))},{id:"jsx",name:"JSX",import:(()=>x(()=>import("./jsx-BGEKFWBk.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>x(()=>import("./julia-BxjEHQ54.js"),__vite__mapDeps([61,23,24,25,26,16,20,2,62])))},{id:"just",name:"Just",import:(()=>x(()=>import("./just-Abn-AdSa.js"),__vite__mapDeps([63,28,2,11,64,1,3,7,8,16,20,33,34,35,36,13,23,24,25,26,37,38])))},{id:"kdl",name:"KDL",import:(()=>x(()=>import("./kdl-DJsF4U57.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>x(()=>import("./kotlin-DwKqsDKK.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>x(()=>import("./kusto-C0JqhYMw.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>x(()=>import("./latex-C-qBiGC3.js"),__vite__mapDeps([65,66,62])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>x(()=>import("./lean-QIsVZaRF.js"),[]))},{id:"less",name:"Less",import:(()=>x(()=>import("./less-C76OjOdF.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>x(()=>import("./liquid-DdraCjph.js"),__vite__mapDeps([67,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>x(()=>import("./llvm-ByOMZdUC.js"),[]))},{id:"log",name:"Log file",import:(()=>x(()=>import("./log-CbW7hOWU.js"),[]))},{id:"logo",name:"Logo",import:(()=>x(()=>import("./logo-BbooMuDm.js"),[]))},{id:"lua",name:"Lua",import:(()=>x(()=>import("./lua-JmSlR1pZ.js"),__vite__mapDeps([37,26])))},{id:"luau",name:"Luau",import:(()=>x(()=>import("./luau-lY4yXJyn.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>x(()=>import("./make-s9FKP0VE.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>x(()=>import("./markdown-CKXSK5AY.js"),[]))},{id:"marko",name:"Marko",import:(()=>x(()=>import("./marko-CQjc_OQE.js"),__vite__mapDeps([68,3,69,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>x(()=>import("./matlab-BQKM-LA_.js"),[]))},{id:"mdc",name:"MDC",import:(()=>x(()=>import("./mdc-CqpcwBMx.js"),__vite__mapDeps([70,40,38,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>x(()=>import("./mdx-BWRhHdFl.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>x(()=>import("./mermaid-COhksqSL.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>x(()=>import("./mipsasm-BElnB_7Q.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>x(()=>import("./mojo-CsmCHy7A.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>x(()=>import("./moonbit-B8hphrHK.js"),[]))},{id:"move",name:"Move",import:(()=>x(()=>import("./move-Ccg_HAOv.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>x(()=>import("./narrat-Cy2k80UN.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>x(()=>import("./nextflow-DCuLxrAx.js"),__vite__mapDeps([71,72])))},{id:"nextflow-groovy",name:"nextflow-groovy",import:(()=>x(()=>import("./nextflow-groovy-COOIDLZf.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>x(()=>import("./nginx-bBKbG2uI.js"),__vite__mapDeps([73,37,26])))},{id:"nim",name:"Nim",import:(()=>x(()=>import("./nim-Cm6-Nayq.js"),__vite__mapDeps([74,26,1,2,3,7,8,25,40])))},{id:"nix",name:"Nix",import:(()=>x(()=>import("./nix-DFZZLjuC.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>x(()=>import("./nushell-BaAZo4zx.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>x(()=>import("./objective-c-sgtl-PdD.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>x(()=>import("./objective-cpp-BTQ37cYs.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>x(()=>import("./ocaml-BvBP9Lm0.js"),[]))},{id:"odin",name:"Odin",import:(()=>x(()=>import("./odin-BTnrxC4P.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>x(()=>import("./openscad-Dmi2c_42.js"),[]))},{id:"pascal",name:"Pascal",import:(()=>x(()=>import("./pascal-DYjw0AuS.js"),[]))},{id:"perl",name:"Perl",import:(()=>x(()=>import("./perl-Djxv1YJ9.js"),__vite__mapDeps([64,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>x(()=>import("./php-DczsLzXi.js"),__vite__mapDeps([75,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>x(()=>import("./pkl-Cij4Vm9z.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>x(()=>import("./plsql-Bd6NdBJI.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>x(()=>import("./po-CUhVi7la.js"),[]))},{id:"polar",name:"Polar",import:(()=>x(()=>import("./polar-B-qJ3AIy.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>x(()=>import("./postcss-BSGhOJ4k.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>x(()=>import("./powerquery-CC1XieQO.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>x(()=>import("./powershell-DdRAnR4Z.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>x(()=>import("./prisma-C0hJlfqX.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>x(()=>import("./prolog-bSi0SE3D.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>x(()=>import("./proto-BZ_yZy5q.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>x(()=>import("./pug-ClQUpJlV.js"),__vite__mapDeps([76,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>x(()=>import("./puppet-ja2MI9-b.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>x(()=>import("./purescript-CxgsQa43.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>x(()=>import("./python-DgE28U1V.js"),[]))},{id:"qml",name:"QML",import:(()=>x(()=>import("./qml-BEkX6VoX.js"),__vite__mapDeps([77,2])))},{id:"qmldir",name:"QML Directory",import:(()=>x(()=>import("./qmldir-DNYHzgow.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>x(()=>import("./qss-BZsEMKxJ.js"),[]))},{id:"r",name:"R",import:(()=>x(()=>import("./r-BcofxrH1.js"),[]))},{id:"racket",name:"Racket",import:(()=>x(()=>import("./racket-CzHBKLyy.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>x(()=>import("./raku-CPccoUN1.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>x(()=>import("./razor-DnCvuKPj.js"),__vite__mapDeps([78,1,2,3,79])))},{id:"reg",name:"Windows Registry Script",import:(()=>x(()=>import("./reg-DkqHJyC0.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>x(()=>import("./regexp-BW_zLBm-.js"),[]))},{id:"rel",name:"Rel",import:(()=>x(()=>import("./rel-BIqKdwke.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>x(()=>import("./riscv-s6spwTFp.js"),[]))},{id:"ron",name:"RON",import:(()=>x(()=>import("./ron-CloI94uS.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>x(()=>import("./rosmsg-TcL_zzr8.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>x(()=>import("./rst-BQ8kJ8ZW.js"),__vite__mapDeps([80,15,1,2,3,23,24,25,26,16,20,28,38,81,33,34,7,8,35,11,36,13,37])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>x(()=>import("./ruby-DsIP2xqq.js"),__vite__mapDeps([33,1,2,3,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>x(()=>import("./rust-DJErdhjk.js"),[]))},{id:"sas",name:"SAS",import:(()=>x(()=>import("./sas-BZeeyq_z.js"),__vite__mapDeps([82,16])))},{id:"sass",name:"Sass",import:(()=>x(()=>import("./sass-CIfQ9yqV.js"),[]))},{id:"scala",name:"Scala",import:(()=>x(()=>import("./scala-CWwlNtab.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>x(()=>import("./scheme-ByM66cy_.js"),[]))},{id:"scss",name:"SCSS",import:(()=>x(()=>import("./scss-Dk05w39G.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>x(()=>import("./sdbl-C5Q1usnU.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>x(()=>import("./shaderlab-DNkMdb2B.js"),__vite__mapDeps([83,84])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>x(()=>import("./shellscript-CE-5zpiL.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>x(()=>import("./shellsession-BhddCRKA.js"),__vite__mapDeps([85,28])))},{id:"smalltalk",name:"Smalltalk",import:(()=>x(()=>import("./smalltalk-GKfhTxrk.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>x(()=>import("./solidity-DanOLEvk.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>x(()=>import("./soy-C6ERzLIv.js"),__vite__mapDeps([86,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>x(()=>import("./sparql-CHK3vDkL.js"),__vite__mapDeps([87,88])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>x(()=>import("./splunk-YU1HCmJX.js"),[]))},{id:"sql",name:"SQL",import:(()=>x(()=>import("./sql-CKXjX23X.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>x(()=>import("./ssh-config-Cpnw3KEt.js"),[]))},{id:"stata",name:"Stata",import:(()=>x(()=>import("./stata-BJqnY-gO.js"),__vite__mapDeps([89,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>x(()=>import("./stylus-CHekGIgu.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>x(()=>import("./surrealql-CYeReaNr.js"),__vite__mapDeps([90,2])))},{id:"svelte",name:"Svelte",import:(()=>x(()=>import("./svelte-xWy8v8x_.js"),__vite__mapDeps([91,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>x(()=>import("./swift-DjrYMa62.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>x(()=>import("./system-verilog-rKNYENrf.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>x(()=>import("./systemd-C1FfcI00.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>x(()=>import("./talonscript-bksoRmW6.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>x(()=>import("./tasl-Bl4tsGRM.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>x(()=>import("./tcl-B2_VAYrd.js"),[]))},{id:"templ",name:"Templ",import:(()=>x(()=>import("./templ-Bod2PxCB.js"),__vite__mapDeps([92,93,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>x(()=>import("./terraform-Ba94thAr.js"),[]))},{id:"tex",name:"TeX",import:(()=>x(()=>import("./tex-BLPnQt1V.js"),__vite__mapDeps([66,62])))},{id:"toml",name:"TOML",import:(()=>x(()=>import("./toml-Btlk-g9G.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>x(()=>import("./ts-tags-eLBrqaVN.js"),__vite__mapDeps([94,11,3,2,25,26,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>x(()=>import("./tsv-DYfmKMIW.js"),[]))},{id:"tsx",name:"TSX",import:(()=>x(()=>import("./tsx-Dio8iE-N.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>x(()=>import("./turtle-whXsfw69.js"),[]))},{id:"twig",name:"Twig",import:(()=>x(()=>import("./twig-LEyH1z5E.js"),__vite__mapDeps([95,3,2,5,75,1,7,8,16,9,20,33,34,35,11,36,13,23,24,25,26,28,37,38])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>x(()=>import("./typescript-DttGkNCf.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>x(()=>import("./typespec-C_z-8Pri.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>x(()=>import("./typst-D2RORpaG.js"),[]))},{id:"v",name:"V",import:(()=>x(()=>import("./v-CvM42WIw.js"),[]))},{id:"vala",name:"Vala",import:(()=>x(()=>import("./vala-B_5xOBNr.js"),[]))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>x(()=>import("./vb-BVDm3zBt.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>x(()=>import("./verilog-D5iownw6.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>x(()=>import("./vhdl-Bmgbkl_-.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>x(()=>import("./viml-3ZODU9FQ.js"),[]))},{id:"vue",name:"Vue",import:(()=>x(()=>import("./vue-DiyPqOwP.js"),__vite__mapDeps([96,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>x(()=>import("./vue-html-BM4TQ0nH.js"),__vite__mapDeps([97,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>x(()=>import("./vue-vine-CcuWFpUQ.js"),__vite__mapDeps([98,3,5,69,99,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>x(()=>import("./vyper-B6NKdirK.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>x(()=>import("./wasm-LUzQYg3H.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>x(()=>import("./wenyan-8fXatRyt.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>x(()=>import("./wgsl-CECC3vJ5.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>x(()=>import("./wikitext-BaRWL9sq.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>x(()=>import("./wit-MEd50GYB.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>x(()=>import("./wolfram-CmMaIVaG.js"),[]))},{id:"xml",name:"XML",import:(()=>x(()=>import("./xml-DtyAt_xK.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>x(()=>import("./xsl-Btrj9DhN.js"),__vite__mapDeps([100,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>x(()=>import("./yaml-B92AUxDB.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>x(()=>import("./zenscript-Dja4fBOE.js"),[]))},{id:"zig",name:"Zig",import:(()=>x(()=>import("./zig-LhWa2ADv.js"),[]))}],XA=Object.fromEntries(q1.map(e=>[e.id,e.import])),ZA=Object.fromEntries(q1.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),eC={...XA,...ZA},tC=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>x(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>x(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>x(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>x(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>x(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>x(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>x(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>x(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>x(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>x(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>x(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>x(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>x(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>x(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>x(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>x(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>x(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>x(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>x(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>x(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>x(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>x(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>x(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>x(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>x(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>x(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>x(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>x(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>x(()=>import("./horizon-bright-CUuTKBJd.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>x(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>x(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>x(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>x(()=>import("./kanagawa-wave-DWedfzmr.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>x(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>x(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>x(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>x(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>x(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>x(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>x(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>x(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>x(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>x(()=>import("./monokai-D4h5O-jR.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>x(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>x(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>x(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>x(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>x(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>x(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>x(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>x(()=>import("./red-bN70gL4F.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>x(()=>import("./rose-pine-qdsjHGoJ.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>x(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>x(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>x(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>x(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>x(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>x(()=>import("./solarized-dark-DXbdFlpD.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>x(()=>import("./solarized-light-L9t79GZl.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>x(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>x(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>x(()=>import("./vesper-DU1UobuO.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>x(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>x(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>x(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],nC=Object.fromEntries(tC.map(e=>[e.id,e.import]));var rC=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function kve(){return 2147483648}function Eve(){return typeof performance<"u"?performance.now():Date.now()}const wve=(e,t)=>e+(t-e%t)%t;async function Sve(e){let t,n;const r={};function s(h){n=h,r.HEAPU8=new Uint8Array(h),r.HEAPU32=new Uint32Array(h)}function i(h,m,y){r.HEAPU8.copyWithin(h,m,m+y)}function a(h){try{return t.grow(h-n.byteLength+65535>>>16),s(t.buffer),1}catch{}}function o(h){const m=r.HEAPU8.length;h=h>>>0;const y=kve();if(h>y)return!1;for(let g=1;g<=4;g*=2){let p=m*(1+.2/g);p=Math.min(p,h+100663296);const _=Math.min(y,wve(Math.max(h,p),65536));if(a(_))return!0}return!1}const c=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function u(h,m,y=1024){const g=m+y;let p=m;for(;h[p]&&!(p>=g);)++p;if(p-m>16&&h.buffer&&c)return c.decode(h.subarray(m,p));let _="";for(;m<p;){let k=h[m++];if(!(k&128)){_+=String.fromCharCode(k);continue}const v=h[m++]&63;if((k&224)===192){_+=String.fromCharCode((k&31)<<6|v);continue}const w=h[m++]&63;if((k&240)===224?k=(k&15)<<12|v<<6|w:k=(k&7)<<18|v<<12|w<<6|h[m++]&63,k<65536)_+=String.fromCharCode(k);else{const S=k-65536;_+=String.fromCharCode(55296|S>>10,56320|S&1023)}}return _}function l(h,m){return h?u(r.HEAPU8,h,m):""}const d={emscripten_get_now:Eve,emscripten_memcpy_big:i,emscripten_resize_heap:o,fd_write:()=>0};async function f(){const m=await e({env:d,wasi_snapshot_preview1:d});t=m.memory,s(t.buffer),Object.assign(r,m),r.UTF8ToString=l}return await f(),r}var vve=Object.defineProperty,xve=(e,t,n)=>t in e?vve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rn=(e,t,n)=>xve(e,typeof t!="symbol"?t+"":t,n);let Hn=null;function Tve(e){throw new rC(e.UTF8ToString(e.getLastOnigError()))}let IU=class AU{constructor(t){Rn(this,"utf16Length"),Rn(this,"utf8Length"),Rn(this,"utf16Value"),Rn(this,"utf8Value"),Rn(this,"utf16OffsetToUtf8"),Rn(this,"utf8OffsetToUtf16");const n=t.length,r=AU._utf8ByteLength(t),s=r!==n,i=s?new Uint32Array(n+1):null;s&&(i[n]=r);const a=s?new Uint32Array(r+1):null;s&&(a[r]=n);const o=new Uint8Array(r);let c=0;for(let u=0;u<n;u++){const l=t.charCodeAt(u);let d=l,f=!1;if(l>=55296&&l<=56319&&u+1<n){const h=t.charCodeAt(u+1);h>=56320&&h<=57343&&(d=(l-55296<<10)+65536|h-56320,f=!0)}s&&(i[u]=c,f&&(i[u+1]=c),d<=127?a[c+0]=u:d<=2047?(a[c+0]=u,a[c+1]=u):d<=65535?(a[c+0]=u,a[c+1]=u,a[c+2]=u):(a[c+0]=u,a[c+1]=u,a[c+2]=u,a[c+3]=u)),d<=127?o[c++]=d:d<=2047?(o[c++]=192|(d&1984)>>>6,o[c++]=128|(d&63)>>>0):d<=65535?(o[c++]=224|(d&61440)>>>12,o[c++]=128|(d&4032)>>>6,o[c++]=128|(d&63)>>>0):(o[c++]=240|(d&1835008)>>>18,o[c++]=128|(d&258048)>>>12,o[c++]=128|(d&4032)>>>6,o[c++]=128|(d&63)>>>0),f&&u++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=o,this.utf16OffsetToUtf8=i,this.utf8OffsetToUtf16=a}static _utf8ByteLength(t){let n=0;for(let r=0,s=t.length;r<s;r++){const i=t.charCodeAt(r);let a=i,o=!1;if(i>=55296&&i<=56319&&r+1<s){const c=t.charCodeAt(r+1);c>=56320&&c<=57343&&(a=(i-55296<<10)+65536|c-56320,o=!0)}a<=127?n+=1:a<=2047?n+=2:a<=65535?n+=3:n+=4,o&&r++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}};const G1=class Ri{constructor(t){if(Rn(this,"id",++Ri.LAST_ID),Rn(this,"_onigBinding"),Rn(this,"content"),Rn(this,"utf16Length"),Rn(this,"utf8Length"),Rn(this,"utf16OffsetToUtf8"),Rn(this,"utf8OffsetToUtf16"),Rn(this,"ptr"),!Hn)throw new rC("Must invoke loadWasm first.");this._onigBinding=Hn,this.content=t;const n=new IU(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!Ri._sharedPtrInUse?(Ri._sharedPtr||(Ri._sharedPtr=Hn.omalloc(1e4)),Ri._sharedPtrInUse=!0,Hn.HEAPU8.set(n.utf8Value,Ri._sharedPtr),this.ptr=Ri._sharedPtr):this.ptr=n.createString(Hn)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===Ri._sharedPtr?Ri._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};Rn(G1,"LAST_ID",0);Rn(G1,"_sharedPtr",0);Rn(G1,"_sharedPtrInUse",!1);let CU=G1,Ive=class{constructor(t){if(Rn(this,"_onigBinding"),Rn(this,"_ptr"),!Hn)throw new rC("Must invoke loadWasm first.");const n=[],r=[];for(let o=0,c=t.length;o<c;o++){const u=new IU(t[o]);n[o]=u.createString(Hn),r[o]=u.utf8Length}const s=Hn.omalloc(4*t.length);Hn.HEAPU32.set(n,s/4);const i=Hn.omalloc(4*t.length);Hn.HEAPU32.set(r,i/4);const a=Hn.createOnigScanner(s,i,t.length);for(let o=0,c=t.length;o<c;o++)Hn.ofree(n[o]);Hn.ofree(i),Hn.ofree(s),a===0&&Tve(Hn),this._onigBinding=Hn,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,r){let s=0;if(typeof r=="number"&&(s=r),typeof t=="string"){t=new CU(t);const i=this._findNextMatchSync(t,n,!1,s);return t.dispose(),i}return this._findNextMatchSync(t,n,!1,s)}_findNextMatchSync(t,n,r,s){const i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),s);if(a===0)return null;const o=i.HEAPU32;let c=a/4;const u=o[c++],l=o[c++],d=[];for(let f=0;f<l;f++){const h=t.convertUtf8OffsetToUtf16(o[c++]),m=t.convertUtf8OffsetToUtf16(o[c++]);d[f]={start:h,end:m,length:m-h}}return{index:u,captureIndices:d}}};function Ave(e){return typeof e.instantiator=="function"}function Cve(e){return typeof e.default=="function"}function Pve(e){return typeof e.data<"u"}function Nve(e){return typeof Response<"u"&&e instanceof Response}function Rve(e){return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let Qg;function sC(e){if(Qg)return Qg;async function t(){Hn=await Sve(async n=>{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),Ave(r)?r=await r.instantiator(n):Cve(r)?r=await r.default(n):(Pve(r)&&(r=r.data),Nve(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await Ove(r)(n):r=await Lve(r)(n):Rve(r)?r=await jE(r)(n):r instanceof WebAssembly.Module?r=await jE(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await jE(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return Qg=t(),Qg}function jE(e){return t=>WebAssembly.instantiate(e,t)}function Ove(e){return t=>WebAssembly.instantiateStreaming(e,t)}function Lve(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}let PU;function Dve(e){PU=e}function $ve(){return PU}async function NU(e){return e&&await sC(e),{createScanner(t){return new Ive(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new CU(t)}}}const Mve=Object.freeze(Object.defineProperty({__proto__:null,createOnigurumaEngine:NU,getDefaultWasmLoader:$ve,loadWasm:sC,setDefaultWasmLoader:Dve},Symbol.toStringTag,{value:"Module"}));var RU=QA({});TU(RU,Mve);var Ht=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function jve(e){return iC(e)}function iC(e){return Array.isArray(e)?Fve(e):e instanceof RegExp?e:typeof e=="object"?Bve(e):e}function Fve(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=iC(e[n]);return t}function Bve(e){let t={};for(let n in e)t[n]=iC(e[n]);return t}function OU(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function LU(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?LU(e.substring(0,e.length-1)):e.substr(~t+1)}var FE=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Xg=class{static hasCaptures(e){return e===null?!1:(FE.lastIndex=0,FE.test(e))}static replaceCaptures(e,t,n){return e.replace(FE,(r,s,i,a)=>{let o=n[parseInt(s||i,10)];if(o){let c=t.substring(o.start,o.end);for(;c[0]===".";)c=c.substring(1);switch(a){case"downcase":return c.toLowerCase();case"upcase":return c.toUpperCase();default:return c}}else return r})}};function DU(e,t){return e<t?-1:e>t?1:0}function $U(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let s=0;s<n;s++){let i=DU(e[s],t[s]);if(i!==0)return i}return 0}return n-r}function IL(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function MU(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var jU=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},Em=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(Vve(e),t)}static createFromParsedTheme(e,t){return qve(e,t)}_cachedMatchRoot=new jU(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,r=this._cachedMatchRoot.get(t).find(s=>zve(e.parent,s.parentScopes));return r?new FU(r.fontStyle,r.foreground,r.background):null}},BE=class J0{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new J0(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new J0(n,t[r]);return n}push(t){return new J0(this,t)}getSegments(){let t=this;const n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push(r.scopeName),r=r.parent;return r===t?n.reverse():void 0}};function zve(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],s=!1;if(r===">"){if(n===t.length-1)return!1;r=t[++n],s=!0}for(;e&&!Uve(e.scopeName,r);){if(s)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function Uve(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var FU=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function Vve(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let s=0,i=t.length;s<i;s++){let a=t[s];if(!a.settings)continue;let o;if(typeof a.scope=="string"){let d=a.scope;d=d.replace(/^[,]+/,""),d=d.replace(/[,]+$/,""),o=d.split(",")}else Array.isArray(a.scope)?o=a.scope:o=[""];let c=-1;if(typeof a.settings.fontStyle=="string"){c=0;let d=a.settings.fontStyle.split(" ");for(let f=0,h=d.length;f<h;f++)switch(d[f]){case"italic":c=c|1;break;case"bold":c=c|2;break;case"underline":c=c|4;break;case"strikethrough":c=c|8;break}}let u=null;typeof a.settings.foreground=="string"&&IL(a.settings.foreground)&&(u=a.settings.foreground);let l=null;typeof a.settings.background=="string"&&IL(a.settings.background)&&(l=a.settings.background);for(let d=0,f=o.length;d<f;d++){let m=o[d].trim().split(" "),y=m[m.length-1],g=null;m.length>1&&(g=m.slice(0,m.length-1),g.reverse()),n[r++]=new Hve(y,g,s,c,u,l)}}return n}var Hve=class{constructor(e,t,n,r,s,i){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=s,this.background=i}},Tt=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(Tt||{});function qve(e,t){e.sort((c,u)=>{let l=DU(c.scope,u.scope);return l!==0||(l=$U(c.parentScopes,u.parentScopes),l!==0)?l:c.index-u.index});let n=0,r="#000000",s="#ffffff";for(;e.length>=1&&e[0].scope==="";){let c=e.shift();c.fontStyle!==-1&&(n=c.fontStyle),c.foreground!==null&&(r=c.foreground),c.background!==null&&(s=c.background)}let i=new Gve(t),a=new FU(n,i.getId(r),i.getId(s)),o=new Wve(new Iv(0,null,-1,0,0),[]);for(let c=0,u=e.length;c<u;c++){let l=e[c];o.insert(0,l.scope,l.parentScopes,l.fontStyle,i.getId(l.foreground),i.getId(l.background))}return new Em(i,a,o)}var Gve=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},Kve=Object.freeze([]),Iv=class BU{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,n,r,s,i){this.scopeDepth=t,this.parentScopes=n||Kve,this.fontStyle=r,this.foreground=s,this.background=i}clone(){return new BU(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let r=0,s=t.length;r<s;r++)n[r]=t[r].clone();return n}acceptOverwrite(t,n,r,s){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),s!==0&&(this.background=s)}},Wve=class Av{constructor(t,n=[],r={}){this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,s=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[s]===">"&&s++,!(r>=t.parentScopes.length||s>=n.parentScopes.length);){const i=n.parentScopes[s].length-t.parentScopes[r].length;if(i!==0)return i;r++,s++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),s,i;if(r===-1?(s=t,i=""):(s=t.substring(0,r),i=t.substring(r+1)),this._children.hasOwnProperty(s))return this._children[s].match(i)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Av._cmpBySpecificity),n}insert(t,n,r,s,i,a){if(n===""){this._doInsertHere(t,r,s,i,a);return}let o=n.indexOf("."),c,u;o===-1?(c=n,u=""):(c=n.substring(0,o),u=n.substring(o+1));let l;this._children.hasOwnProperty(c)?l=this._children[c]:(l=new Av(this._mainRule.clone(),Iv.cloneArr(this._rulesWithParentScopes)),this._children[c]=l),l.insert(t+1,u,r,s,i,a)}_doInsertHere(t,n,r,s,i){if(n===null){this._mainRule.acceptOverwrite(t,r,s,i);return}for(let a=0,o=this._rulesWithParentScopes.length;a<o;a++){let c=this._rulesWithParentScopes[a];if($U(c.parentScopes,n)===0){c.acceptOverwrite(t,r,s,i);return}}r===-1&&(r=this._mainRule.fontStyle),s===0&&(s=this._mainRule.foreground),i===0&&(i=this._mainRule.background),this._rulesWithParentScopes.push(new Iv(t,n,r,s,i))}},Go=class As{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=As.getLanguageId(t),r=As.getTokenType(t),s=As.getFontStyle(t),i=As.getForeground(t),a=As.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:s,foreground:i,background:a})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,r,s,i,a,o){let c=As.getLanguageId(t),u=As.getTokenType(t),l=As.containsBalancedBrackets(t)?1:0,d=As.getFontStyle(t),f=As.getForeground(t),h=As.getBackground(t);return n!==0&&(c=n),r!==8&&(u=r),s!==null&&(l=s?1:0),i!==-1&&(d=i),a!==0&&(f=a),o!==0&&(h=o),(c<<0|u<<8|l<<10|d<<11|f<<15|h<<24)>>>0}};function Ty(e,t){const n=[],r=Jve(e);let s=r.next();for(;s!==null;){let c=0;if(s.length===2&&s.charAt(1)===":"){switch(s.charAt(0)){case"R":c=1;break;case"L":c=-1;break;default:console.log(`Unknown priority ${s} in scope selector`)}s=r.next()}let u=a();if(n.push({matcher:u,priority:c}),s!==",")break;s=r.next()}return n;function i(){if(s==="-"){s=r.next();const c=i();return u=>!!c&&!c(u)}if(s==="("){s=r.next();const c=o();return s===")"&&(s=r.next()),c}if(AL(s)){const c=[];do c.push(s),s=r.next();while(AL(s));return u=>t(c,u)}return null}function a(){const c=[];let u=i();for(;u;)c.push(u),u=i();return l=>c.every(d=>d(l))}function o(){const c=[];let u=a();for(;u&&(c.push(u),s==="|"||s===",");){do s=r.next();while(s==="|"||s===",");u=a()}return l=>c.some(d=>d(l))}}function AL(e){return!!e&&!!e.match(/[\w\.:]+/)}function Jve(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const r=n[0];return n=t.exec(e),r}}}function zU(e){typeof e.dispose=="function"&&e.dispose()}var wm=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},Yve=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},Qve=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},Xve=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new wm(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new Qve;for(const n of e)Zve(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof wm){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function Zve(e,t,n,r){const s=n.lookup(e.scopeName);if(!s){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const i=n.lookup(t);e instanceof wm?Y0({baseGrammar:i,selfGrammar:s},r):Cv(e.ruleName,{baseGrammar:i,selfGrammar:s,repository:s.repository},r);const a=n.injections(e.scopeName);if(a)for(const o of a)r.add(new wm(o))}function Cv(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];Iy([r],t,n)}}function Y0(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Iy(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Iy(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Iy(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const s=r.repository?OU({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Iy(r.patterns,{...t,repository:s},n);const i=r.include;if(!i)continue;const a=UU(i);switch(a.kind){case 0:Y0({...t,selfGrammar:t.baseGrammar},n);break;case 1:Y0(t,n);break;case 2:Cv(a.ruleName,{...t,repository:s},n);break;case 3:case 4:const o=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(o){const c={baseGrammar:t.baseGrammar,selfGrammar:o,repository:s};a.kind===4?Cv(a.ruleName,c,n):Y0(c,n)}else a.kind===4?n.add(new Yve(a.scopeName,a.ruleName)):n.add(new wm(a.scopeName));break}}}var exe=class{kind=0},txe=class{kind=1},nxe=class{constructor(e){this.ruleName=e}kind=2},rxe=class{constructor(e){this.scopeName=e}kind=3},sxe=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function UU(e){if(e==="$base")return new exe;if(e==="$self")return new txe;const t=e.indexOf("#");if(t===-1)return new rxe(e);if(t===0)return new nxe(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new sxe(n,r)}}var ixe=/\\(\d+)/,CL=/\\(\d+)/g,axe=-1,VU=-2;var Tp=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Xg.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Xg.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${LU(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Xg.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Xg.replaceCaptures(this._contentName,e,t)}},oxe=class extends Tp{retokenizeCapturedWithRuleId;constructor(e,t,n,r,s){super(e,t,n,r),this.retokenizeCapturedWithRuleId=s}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,r){throw new Error("Not supported!")}},cxe=class extends Tp{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,s){super(e,t,n,null),this._match=new Sm(r,this.id),this.captures=s,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new vm,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},PL=class extends Tp{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,s){super(e,t,n,r),this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new vm,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Pv=class extends Tp{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,s,i,a,o,c,u){super(e,t,n,r),this._begin=new Sm(s,this.id),this.beginCaptures=i,this._end=new Sm(a||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=o,this.applyEndPatternLast=c||!1,this.patterns=u.patterns,this.hasMissingPatterns=u.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new vm;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},Ay=class extends Tp{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,s,i,a,o,c){super(e,t,n,r),this._begin=new Sm(s,this.id),this.beginCaptures=i,this.whileCaptures=o,this._while=new Sm(a,VU),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=c.patterns,this.hasMissingPatterns=c.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new vm;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new vm,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||"￿"),this._cachedCompiledWhilePatterns}},HU=class gr{static createCaptureRule(t,n,r,s,i){return t.registerRule(a=>new oxe(n,a,r,s,i))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(s=>{if(t.id=s,t.match)return new cxe(t.$vscodeTextmateLocation,t.id,t.name,t.match,gr._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=OU({},r,t.repository));let i=t.patterns;return typeof i>"u"&&t.include&&(i=[{include:t.include}]),new PL(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,gr._compilePatterns(i,n,r))}return t.while?new Ay(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,gr._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,gr._compileCaptures(t.whileCaptures||t.captures,n,r),gr._compilePatterns(t.patterns,n,r)):new Pv(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,gr._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,gr._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,gr._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let s=[];if(t){let i=0;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const o=parseInt(a,10);o>i&&(i=o)}for(let a=0;a<=i;a++)s[a]=null;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const o=parseInt(a,10);let c=0;t[a].patterns&&(c=gr.getCompiledRuleId(t[a],n,r)),s[o]=gr.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,c)}}return s}static _compilePatterns(t,n,r){let s=[];if(t)for(let i=0,a=t.length;i<a;i++){const o=t[i];let c=-1;if(o.include){const u=UU(o.include);switch(u.kind){case 0:case 1:c=gr.getCompiledRuleId(r[o.include],n,r);break;case 2:let l=r[u.ruleName];l&&(c=gr.getCompiledRuleId(l,n,r));break;case 3:case 4:const d=u.scopeName,f=u.kind===4?u.ruleName:null,h=n.getExternalGrammar(d,r);if(h)if(f){let m=h.repository[f];m&&(c=gr.getCompiledRuleId(m,n,h.repository))}else c=gr.getCompiledRuleId(h.repository.$self,n,h.repository);break}}else c=gr.getCompiledRuleId(o,n,r);if(c!==-1){const u=n.getRule(c);let l=!1;if((u instanceof PL||u instanceof Pv||u instanceof Ay)&&u.hasMissingPatterns&&u.patterns.length===0&&(l=!0),l)continue;s.push(c)}}return{patterns:s,hasMissingPatterns:(t?t.length:0)!==s.length}}},Sm=class qU{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,n){if(t&&typeof t=="string"){const r=t.length;let s=0,i=[],a=!1;for(let o=0;o<r;o++)if(t.charAt(o)==="\\"&&o+1<r){const u=t.charAt(o+1);u==="z"?(i.push(t.substring(s,o)),i.push("$(?!\\n)(?<!\\n)"),s=o+2):(u==="A"||u==="G")&&(a=!0),o++}this.hasAnchor=a,s===0?this.source=t:(i.push(t.substring(s,r)),this.source=i.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=ixe.test(this.source):this.hasBackReferences=!1}clone(){return new qU(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(s=>t.substring(s.start,s.end));return CL.lastIndex=0,this.source.replace(CL,(s,i)=>MU(r[parseInt(i,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],r=[],s=[],i,a,o,c;for(i=0,a=this.source.length;i<a;i++)o=this.source.charAt(i),t[i]=o,n[i]=o,r[i]=o,s[i]=o,o==="\\"&&i+1<a&&(c=this.source.charAt(i+1),c==="A"?(t[i+1]="￿",n[i+1]="￿",r[i+1]="A",s[i+1]="A"):c==="G"?(t[i+1]="￿",n[i+1]="G",r[i+1]="￿",s[i+1]="G"):(t[i+1]=c,n[i+1]=c,r[i+1]=c,s[i+1]=c),i++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:s.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},vm=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(n=>n.source);this._cached=new NL(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(s=>s.resolveAnchors(t,n));return new NL(e,r,this._items.map(s=>s.ruleId))}},NL=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
108
- `)}findNextMatchSync(e,t,n){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},zE=class{constructor(e,t){this.languageId=e,this.tokenType=t}},uxe=class Nv{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,n){this._defaultAttributes=new zE(t,8),this._embeddedLanguagesMatcher=new lxe(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?Nv._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new zE(0,0);_getBasicScopeAttributes=new jU(t=>{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new zE(n,r)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(Nv.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},lxe=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,r])=>MU(n));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},RL=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function GU(e,t,n,r,s,i,a,o){const c=t.content.length;let u=!1,l=-1;if(a){const h=dxe(e,t,n,r,s,i);s=h.stack,r=h.linePos,n=h.isFirstLine,l=h.anchorPosition}const d=Date.now();for(;!u;){if(o!==0&&Date.now()-d>o)return new RL(s,!0);f()}return new RL(s,!1);function f(){const h=fxe(e,t,n,r,s,l);if(!h){i.produce(s,c),u=!0;return}const m=h.captureIndices,y=h.matchedRuleId,g=m&&m.length>0?m[0].end>r:!1;if(y===axe){const p=s.getRule(e);i.produce(s,m[0].start),s=s.withContentNameScopesList(s.nameScopesList),eh(e,t,n,s,i,p.endCaptures,m),i.produce(s,m[0].end);const _=s;if(s=s.parent,l=_.getAnchorPos(),!g&&_.getEnterPos()===r){s=_,i.produce(s,c),u=!0;return}}else{const p=e.getRule(y);i.produce(s,m[0].start);const _=s,k=p.getName(t.content,m),v=s.contentNameScopesList.pushAttributed(k,e);if(s=s.push(y,r,l,m[0].end===c,null,v,v),p instanceof Pv){const w=p;eh(e,t,n,s,i,w.beginCaptures,m),i.produce(s,m[0].end),l=m[0].end;const S=w.getContentName(t.content,m),T=v.pushAttributed(S,e);if(s=s.withContentNameScopesList(T),w.endHasBackReferences&&(s=s.withEndRule(w.getEndWithResolvedBackReferences(t.content,m))),!g&&_.hasSameRuleAs(s)){s=s.pop(),i.produce(s,c),u=!0;return}}else if(p instanceof Ay){const w=p;eh(e,t,n,s,i,w.beginCaptures,m),i.produce(s,m[0].end),l=m[0].end;const S=w.getContentName(t.content,m),T=v.pushAttributed(S,e);if(s=s.withContentNameScopesList(T),w.whileHasBackReferences&&(s=s.withEndRule(w.getWhileWithResolvedBackReferences(t.content,m))),!g&&_.hasSameRuleAs(s)){s=s.pop(),i.produce(s,c),u=!0;return}}else if(eh(e,t,n,s,i,p.captures,m),i.produce(s,m[0].end),s=s.pop(),!g){s=s.safePop(),i.produce(s,c),u=!0;return}}m[0].end>r&&(r=m[0].end,n=!1)}}function dxe(e,t,n,r,s,i){let a=s.beginRuleCapturedEOL?0:-1;const o=[];for(let c=s;c;c=c.pop()){const u=c.getRule(e);u instanceof Ay&&o.push({rule:u,stack:c})}for(let c=o.pop();c;c=o.pop()){const{ruleScanner:u,findOptions:l}=pxe(c.rule,e,c.stack.endRule,n,r===a),d=u.findNextMatchSync(t,r,l);if(d){if(d.ruleId!==VU){s=c.stack.pop();break}d.captureIndices&&d.captureIndices.length&&(i.produce(c.stack,d.captureIndices[0].start),eh(e,t,n,c.stack,i,c.rule.whileCaptures,d.captureIndices),i.produce(c.stack,d.captureIndices[0].end),a=d.captureIndices[0].end,d.captureIndices[0].end>r&&(r=d.captureIndices[0].end,n=!1))}else{s=c.stack.pop();break}}return{stack:s,linePos:r,anchorPosition:a,isFirstLine:n}}function fxe(e,t,n,r,s,i){const a=hxe(e,t,n,r,s,i),o=e.getInjections();if(o.length===0)return a;const c=mxe(o,e,t,n,r,s,i);if(!c)return a;if(!a)return c;const u=a.captureIndices[0].start,l=c.captureIndices[0].start;return l<u||c.priorityMatch&&l===u?c:a}function hxe(e,t,n,r,s,i){const a=s.getRule(e),{ruleScanner:o,findOptions:c}=KU(a,e,s.endRule,n,r===i),u=o.findNextMatchSync(t,r,c);return u?{captureIndices:u.captureIndices,matchedRuleId:u.ruleId}:null}function mxe(e,t,n,r,s,i,a){let o=Number.MAX_VALUE,c=null,u,l=0;const d=i.contentNameScopesList.getScopeNames();for(let f=0,h=e.length;f<h;f++){const m=e[f];if(!m.matcher(d))continue;const y=t.getRule(m.ruleId),{ruleScanner:g,findOptions:p}=KU(y,t,null,r,s===a),_=g.findNextMatchSync(n,s,p);if(!_)continue;const k=_.captureIndices[0].start;if(!(k>=o)&&(o=k,c=_.captureIndices,u=_.ruleId,l=m.priority,o===s))break}return c?{priorityMatch:l===-1,captureIndices:c,matchedRuleId:u}:null}function KU(e,t,n,r,s){return{ruleScanner:e.compileAG(t,n,r,s),findOptions:0}}function pxe(e,t,n,r,s){return{ruleScanner:e.compileWhileAG(t,n,r,s),findOptions:0}}function eh(e,t,n,r,s,i,a){if(i.length===0)return;const o=t.content,c=Math.min(i.length,a.length),u=[],l=a[0].end;for(let d=0;d<c;d++){const f=i[d];if(f===null)continue;const h=a[d];if(h.length===0)continue;if(h.start>l)break;for(;u.length>0&&u[u.length-1].endPos<=h.start;)s.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop();if(u.length>0?s.produceFromScopes(u[u.length-1].scopes,h.start):s.produce(r,h.start),f.retokenizeCapturedWithRuleId){const y=f.getName(o,a),g=r.contentNameScopesList.pushAttributed(y,e),p=f.getContentName(o,a),_=g.pushAttributed(p,e),k=r.push(f.retokenizeCapturedWithRuleId,h.start,-1,!1,null,g,_),v=e.createOnigString(o.substring(0,h.end));GU(e,v,n&&h.start===0,h.start,k,s,!1,0),zU(v);continue}const m=f.getName(o,a);if(m!==null){const g=(u.length>0?u[u.length-1].scopes:r.contentNameScopesList).pushAttributed(m,e);u.push(new gxe(g,h.end))}}for(;u.length>0;)s.produceFromScopes(u[u.length-1].scopes,u[u.length-1].endPos),u.pop()}var gxe=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function bxe(e,t,n,r,s,i,a,o){return new _xe(e,t,n,r,s,i,a,o)}function OL(e,t,n,r,s){const i=Ty(t,Cy),a=HU.getCompiledRuleId(n,r,s.repository);for(const o of i)e.push({debugSelector:t,matcher:o.matcher,ruleId:a,grammar:s,priority:o.priority})}function Cy(e,t){if(t.length<e.length)return!1;let n=0;return e.every(r=>{for(let s=n;s<t.length;s++)if(yxe(t[s],r))return n=s+1,!0;return!1})}function yxe(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]==="."}var _xe=class{constructor(e,t,n,r,s,i,a,o){if(this._rootScopeName=e,this.balancedBracketSelectors=i,this._onigLib=o,this._basicScopeAttributesProvider=new uxe(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=a,this._grammar=LL(t,null),this._injections=null,this._tokenTypeMatchers=[],s)for(const c of Object.keys(s)){const u=Ty(c,Cy);for(const l of u)this._tokenTypeMatchers.push({matcher:l.matcher,type:s[c]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:s=>s===this._rootScopeName?this._grammar:this.getExternalGrammar(s),injections:s=>this._grammarRepository.injections(s)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){const s=r.injections;if(s)for(let a in s)OL(t,a,s[a],this,r);const i=this._grammarRepository.injections(n);i&&i.forEach(a=>{const o=this.getExternalGrammar(a);if(o){const c=o.injectionSelector;c&&OL(t,c,o,this,o)}})}return t.sort((s,i)=>s.priority-i.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=LL(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){const r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=HU.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let s;if(!t||t===Rv.NULL){s=!0;const u=this._basicScopeAttributesProvider.getDefaultAttributes(),l=this.themeProvider.getDefaults(),d=Go.set(0,u.languageId,u.tokenType,null,l.fontStyle,l.foregroundId,l.backgroundId),f=this.getRule(this._rootId).getName(null,null);let h;f?h=Ch.createRootAndLookUpScopeName(f,d,this):h=Ch.createRoot("unknown",d),t=new Rv(null,this._rootId,-1,-1,!1,null,h,h)}else s=!1,t.reset();e=e+`
109
- `;const i=this.createOnigString(e),a=i.content.length,o=new Exe(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=GU(this,i,s,0,t,o,!0,r);return zU(i),{lineLength:a,lineTokens:o,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function LL(e,t){return e=jve(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Ch=class Oi{constructor(t,n,r){this.parent=t,this.scopePath=n,this.tokenAttributes=r}static fromExtension(t,n){let r=t,s=t?.scopePath??null;for(const i of n)s=BE.push(s,i.scopeNames),r=new Oi(r,s,i.encodedTokenAttributes);return r}static createRoot(t,n){return new Oi(null,new BE(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const s=r.getMetadataForScope(t),i=new BE(null,t),a=r.themeProvider.themeMatch(i),o=Oi.mergeAttributes(n,s,a);return new Oi(null,i,o)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Oi.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,r){let s=-1,i=0,a=0;return r!==null&&(s=r.fontStyle,i=r.foregroundId,a=r.backgroundId),Go.set(t,n.languageId,n.tokenType,null,s,i,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return Oi._pushAttributed(this,t,n);const r=t.split(/ /g);let s=this;for(const i of r)s=Oi._pushAttributed(s,i,n);return s}static _pushAttributed(t,n,r){const s=r.getMetadataForScope(n),i=t.scopePath.push(n),a=r.themeProvider.themeMatch(i),o=Oi.mergeAttributes(t.tokenAttributes,s,a);return new Oi(t,i,o)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===t?n.reverse():void 0}},Rv=class xc{constructor(t,n,r,s,i,a,o,c){this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=i,this.endRule=a,this.nameScopesList=o,this.contentNameScopesList=c,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=s}_stackElementBrand=void 0;static NULL=new xc(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:xc._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?Ch.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){xc._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,s,i,a,o){return new xc(this,t,n,r,s,i,a,o)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new xc(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){const r=Ch.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new xc(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Ch.fromExtension(r,n.contentNameScopesList))}},kxe=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):Ty(n,Cy).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>Ty(n,Cy).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},Exe=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let r=e?.tokenAttributes??0,s=!1;if(this.balancedBracketSelectors?.matchesAlways&&(s=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const i=e?.getScopeNames()??[];for(const a of this._tokenTypeOverrides)a.matcher(i)&&(r=Go.set(r,0,a.type,null,-1,0,0));this.balancedBracketSelectors&&(s=this.balancedBracketSelectors.match(i))}if(s&&(r=Go.set(r,0,8,s,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=t;return}const n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,s=this._binaryTokens.length;r<s;r++)n[r]=this._binaryTokens[r];return n}},wxe=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,s){if(!this._grammars.has(e)){let i=this._rawGrammars.get(e);if(!i)return null;this._grammars.set(e,bxe(e,i,t,n,r,s,this,this._onigLib))}return this._grammars.get(e)}},WU=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new wxe(Em.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(Em.createFromRawTheme(t,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,n,r){return this.loadGrammarWithConfiguration(t,n,{embeddedLanguages:r})}loadGrammarWithConfiguration(t,n,r){return this._loadGrammar(t,n,r.embeddedLanguages,r.tokenTypes,new kxe(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,r,s,i){const a=new Xve(this._syncRegistry,t);for(;a.Q.length>0;)a.Q.map(o=>this._loadSingleGrammar(o.scopeName)),a.processQueue();return this._grammarForScopeName(t,n,r,s,i)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(t,n=[],r=0,s=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,r,s)}_grammarForScopeName(t,n=0,r=null,s=null,i=null){return this._syncRegistry.grammarForScopeName(t,n,r,s,i)}},kd=Rv.NULL;function Py(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[s,i]of Object.entries(t?.colorReplacements||{}))typeof i=="string"?n[s]=i:s===r&&Object.assign(n,i);return n}function Po(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function Sxe(e){return Array.isArray(e)?e:[e]}async function JU(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function K1(e){return!e||["plaintext","txt","text","plain"].includes(e)}function YU(e){return e==="ansi"||K1(e)}function W1(e){return e==="none"}function QU(e){return W1(e)}function J1(e,t=!1){if(e.length===0)return[["",0]];const n=e.split(/(\r?\n)/g);let r=0;const s=[];for(let i=0;i<n.length;i+=2){const a=t?n[i]+(n[i+1]||""):n[i];s.push([a,r]),r+=n[i].length,r+=n[i+1]?.length||0}return s}const DL={light:"#333333",dark:"#bbbbbb"},$L={light:"#fffffe",dark:"#1e1e1e"},ML="__shiki_resolved";function aC(e){if(e?.[ML])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){const o=t.settings?t.settings.find(c=>!c.name&&!c.scope):void 0;o?.settings?.foreground&&(r=o.settings.foreground),o?.settings?.background&&(n=o.settings.background),!r&&t?.colors?.["editor.foreground"]&&(r=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?DL.light:DL.dark),n||(n=t.type==="light"?$L.light:$L.dark),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let s=0;const i=new Map;function a(o){if(i.has(o))return i.get(o);s+=1;const c=`#${s.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${c}`]?a(o):(i.set(o,c),c)}t.settings=t.settings.map(o=>{const c=o.settings?.foreground&&!o.settings.foreground.startsWith("#"),u=o.settings?.background&&!o.settings.background.startsWith("#");if(!c&&!u)return o;const l={...o,settings:{...o.settings}};if(c){const d=a(o.settings.foreground);t.colorReplacements[d]=o.settings.foreground,l.settings.foreground=d}if(u){const d=a(o.settings.background);t.colorReplacements[d]=o.settings.background,l.settings.background=d}return l});for(const o of Object.keys(t.colors||{}))if((o==="editor.foreground"||o==="editor.background"||o.startsWith("terminal.ansi"))&&!t.colors[o]?.startsWith("#")){const c=a(t.colors[o]);t.colorReplacements[c]=t.colors[o],t.colors[o]=c}return Object.defineProperty(t,ML,{enumerable:!1,writable:!1,value:!0}),t}async function XU(e){return Array.from(new Set((await Promise.all(e.filter(t=>!YU(t)).map(async t=>await JU(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function ZU(e){return(await Promise.all(e.map(async t=>QU(t)?null:aC(await JU(t))))).filter(t=>!!t)}function e9(e,t){if(!t)return e;if(t[e]){const n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new Ht(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return e}var vxe=class extends WU{_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(t,n,r,s={}){super(t),this._resolver=t,this._themes=n,this._langs=r,this._alias=s,this._themes.map(i=>this.loadTheme(i)),this.loadLanguages(this._langs)}getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const n=aC(t);return n.name&&(this._resolvedThemes.set(n.name,n),this._loadedThemesCache=null),n}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let n=this._textmateThemeCache.get(t);n||(n=Em.createFromRawTheme(t),this._textmateThemeCache.set(t,n)),this._syncRegistry.setTheme(n)}getGrammar(t){return t=e9(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;const n=new Set([...this._langMap.values()].filter(i=>i.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);const r={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const s=this.loadGrammarWithConfiguration(t.scopeName,1,r);if(s.name=t.name,this._resolvedGrammars.set(t.name,s),t.aliases&&t.aliases.forEach(i=>{this._alias[i]=t.name}),this._loadedLanguagesCache=null,n.size)for(const i of n)this._resolvedGrammars.delete(i.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(i.scopeName),this._syncRegistry?._grammars?.delete(i.scopeName),this.loadLanguage(this._langMap.get(i.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const s of t)this.resolveEmbeddedLanguages(s);const n=Array.from(this._langGraph.entries()),r=n.filter(([s,i])=>!i);if(r.length){const s=n.filter(([i,a])=>a?(a.embeddedLanguages||a.embeddedLangs)?.some(o=>r.map(([c])=>c).includes(o)):!1).filter(i=>!r.includes(i));throw new Ht(`Missing languages ${r.map(([i])=>`\`${i}\``).join(", ")}, required by ${s.map(([i])=>`\`${i}\``).join(", ")}`)}for(const[s,i]of n)this._resolver.addLanguage(i);for(const[s,i]of n)this.loadLanguage(i)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);const n=t.embeddedLanguages??t.embeddedLangs;if(n)for(const r of n)this._langGraph.set(r,this._langMap.get(r))}},xxe=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,n){this._onigLib={createOnigScanner:r=>t.createScanner(r),createOnigString:r=>t.createString(r)},n.forEach(r=>this.addLanguage(r))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(n=>{this._langs.set(n,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(n=>{this._injections.get(n)||this._injections.set(n,[]),this._injections.get(n).push(t.scopeName)})}getInjections(t){const n=t.split(".");let r=[];for(let s=1;s<=n.length;s++){const i=n.slice(0,s).join(".");r=[...r,...this._injections.get(i)||[]]}return r}};let Nf=0;function Txe(e){Nf+=1,e.warnings!==!1&&Nf>=10&&Nf%10===0&&console.warn(`[Shiki] ${Nf} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new Ht("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(aC),s=new vxe(new xxe(e.engine,n),r,n,e.langAlias);let i;function a(_){return e9(_,e.langAlias)}function o(_){g();const k=s.getGrammar(typeof _=="string"?_:_.name);if(!k)throw new Ht(`Language \`${_}\` not found, you may need to load it first`);return k}function c(_){if(_==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};g();const k=s.getTheme(_);if(!k)throw new Ht(`Theme \`${_}\` not found, you may need to load it first`);return k}function u(_){g();const k=c(_);return i!==_&&(s.setTheme(k),i=_),{theme:k,colorMap:s.getColorMap()}}function l(){return g(),s.getLoadedThemes()}function d(){return g(),s.getLoadedLanguages()}function f(..._){g(),s.loadLanguages(_.flat(1))}async function h(..._){return f(await XU(_))}function m(..._){g();for(const k of _.flat(1))s.loadTheme(k)}async function y(..._){return g(),m(await ZU(_))}function g(){if(t)throw new Ht("Shiki instance has been disposed")}function p(){t||(t=!0,s.dispose(),Nf-=1)}return{setTheme:u,getTheme:c,getLanguage:o,getLoadedThemes:l,getLoadedLanguages:d,resolveLangAlias:a,loadLanguage:h,loadLanguageSync:f,loadTheme:y,loadThemeSync:m,dispose:p,[Symbol.dispose]:p}}async function Ixe(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([ZU(e.themes||[]),XU(e.langs||[]),e.engine]);return Txe({...e,themes:t,langs:n,engine:r})}const t9=new WeakMap;function Y1(e,t){t9.set(e,t)}function xm(e){return t9.get(e)}var Q1=class n9{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new n9(Object.fromEntries(Sxe(n).map(r=>[r,kd])),t)}constructor(...t){if(t.length===2){const[n,r]=t;this.lang=r,this._stacks=n}else{const[n,r,s]=t;this.lang=r,this._stacks={[s]:n}}}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return Axe(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function Axe(e){const t=[],n=new Set;function r(s){if(n.has(s))return;n.add(s);const i=s?.nameScopesList?.scopeName;i&&t.push(i),s.parent&&r(s.parent)}return r(e),t}function Cxe(e,t){if(!(e instanceof Q1))throw new Ht("Invalid grammar state");return e.getInternalStack(t)}function r9(e,t,n={}){const{theme:r=e.getLoadedThemes()[0]}=n;if(K1(e.resolveLangAlias(n.lang||"text"))||W1(r))return J1(t).map(o=>[{content:o[0],offset:o[1]}]);const{theme:s,colorMap:i}=e.setTheme(r),a=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==a.name)throw new Ht(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${a.name}"`);if(!n.grammarState.themes.includes(s.name))throw new Ht(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return Nxe(t,a,s,i,n)}function Pxe(...e){if(e.length===2)return xm(e[1]);const[t,n,r={}]=e,{lang:s="text",theme:i=t.getLoadedThemes()[0]}=r;if(K1(s)||W1(i))throw new Ht("Plain language does not have grammar state");if(s==="ansi")throw new Ht("ANSI language does not have grammar state");const{theme:a,colorMap:o}=t.setTheme(i),c=t.getLanguage(s);return new Q1(oC(n,c,a,o,r).stateStack,c.name,a.name)}function Nxe(e,t,n,r,s){const i=oC(e,t,n,r,s),a=new Q1(i.stateStack,t.name,n.name);return Y1(i.tokens,a),i.tokens}function oC(e,t,n,r,s){const i=Py(n,s),{tokenizeMaxLineLength:a=0,tokenizeTimeLimit:o=500}=s,c=J1(e);let u=s.grammarState?Cxe(s.grammarState,n.name)??kd:s.grammarContextCode!=null?oC(s.grammarContextCode,t,n,r,{...s,grammarState:void 0,grammarContextCode:void 0}).stateStack:kd,l=[];const d=[];for(let f=0,h=c.length;f<h;f++){const[m,y]=c[f];if(m===""){l=[],d.push([]);continue}if(a>0&&m.length>=a){l=[],d.push([{content:m,offset:y,color:"",fontStyle:0}]);continue}let g,p,_;s.includeExplanation&&(g=t.tokenizeLine(m,u,o),p=g.tokens,_=0);const k=t.tokenizeLine2(m,u,o),v=k.tokens.length/2;for(let w=0;w<v;w++){const S=k.tokens[2*w],T=w+1<v?k.tokens[2*w+2]:m.length;if(S===T)continue;const I=k.tokens[2*w+1],$=Po(r[Go.getForeground(I)],i),R=Go.getFontStyle(I),z={content:m.substring(S,T),offset:y+S,color:$,fontStyle:R};if(s.includeExplanation){const V=[];if(s.includeExplanation!=="scopeName")for(const G of n.settings){let Q;switch(typeof G.scope){case"string":Q=G.scope.split(/,/).map(re=>re.trim());break;case"object":Q=G.scope;break;default:continue}V.push({settings:G,selectors:Q.map(re=>re.split(/ /))})}z.explanation=[];let H=0;for(;S+H<T;){const G=p[_],Q=m.substring(G.startIndex,G.endIndex);H+=Q.length,z.explanation.push({content:Q,scopes:s.includeExplanation==="scopeName"?Rxe(G.scopes):Oxe(V,G.scopes)}),_+=1}}l.push(z)}d.push(l),l=[],u=k.ruleStack}return{tokens:d,stateStack:u}}function Rxe(e){return e.map(t=>({scopeName:t}))}function Oxe(e,t){const n=[];for(let r=0,s=t.length;r<s;r++){const i=t[r];n[r]={scopeName:i,themeMatches:Dxe(e,i,t.slice(0,r))}}return n}function jL(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function Lxe(e,t,n){if(!jL(e[e.length-1],t))return!1;let r=e.length-2,s=n.length-1;for(;r>=0&&s>=0;)jL(e[r],n[s])&&(r-=1),s-=1;return r===-1}function Dxe(e,t,n){const r=[];for(const{selectors:s,settings:i}of e)for(const a of s)if(Lxe(a,t,n)){r.push(i);break}return r}function s9(e,t,n){const r=Object.entries(n.themes).filter(c=>c[1]).map(c=>({color:c[0],theme:c[1]})),s=r.map(c=>{const u=r9(e,t,{...n,theme:c.theme});return{tokens:u,state:xm(u),theme:typeof c.theme=="string"?c.theme:c.theme.name}}),i=$xe(...s.map(c=>c.tokens)),a=i[0].map((c,u)=>c.map((l,d)=>{const f={content:l.content,variants:{},offset:l.offset};return"includeExplanation"in n&&n.includeExplanation&&(f.explanation=l.explanation),i.forEach((h,m)=>{const{content:y,explanation:g,offset:p,..._}=h[u][d];f.variants[r[m].color]=_}),f})),o=s[0].state?new Q1(Object.fromEntries(s.map(c=>[c.theme,c.state?.getInternalStack(c.theme)])),s[0].state.lang):void 0;return o&&Y1(a,o),a}function $xe(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){const s=e.map(c=>c[r]),i=t.map(()=>[]);t.forEach((c,u)=>c.push(i[u]));const a=s.map(()=>0),o=s.map(c=>c[0]);for(;o.every(c=>c);){const c=Math.min(...o.map(u=>u.content.length));for(let u=0;u<n;u++){const l=o[u];l.content.length===c?(i[u].push(l),a[u]+=1,o[u]=s[u][a[u]]):(i[u].push({...l,content:l.content.slice(0,c)}),o[u]={...l,content:l.content.slice(c),offset:l.offset+c})}}}return t}const i9=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class Ip{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Ip.prototype.normal={};Ip.prototype.property={};Ip.prototype.space=void 0;function a9(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new Ip(n,r,t)}function Tm(e){return e.toLowerCase()}class rs{constructor(t,n){this.attribute=n,this.property=t}}rs.prototype.attribute="";rs.prototype.booleanish=!1;rs.prototype.boolean=!1;rs.prototype.commaOrSpaceSeparated=!1;rs.prototype.commaSeparated=!1;rs.prototype.defined=!1;rs.prototype.mustUseProperty=!1;rs.prototype.number=!1;rs.prototype.overloadedBoolean=!1;rs.prototype.property="";rs.prototype.spaceSeparated=!1;rs.prototype.space=void 0;let Mxe=0;const Xe=Bu(),bn=Bu(),Ov=Bu(),he=Bu(),Vt=Bu(),Kl=Bu(),cs=Bu();function Bu(){return 2**++Mxe}const Lv=Object.freeze(Object.defineProperty({__proto__:null,boolean:Xe,booleanish:bn,commaOrSpaceSeparated:cs,commaSeparated:Kl,number:he,overloadedBoolean:Ov,spaceSeparated:Vt},Symbol.toStringTag,{value:"Module"})),UE=Object.keys(Lv);class cC extends rs{constructor(t,n,r,s){let i=-1;if(super(t,n),FL(this,"space",s),typeof r=="number")for(;++i<UE.length;){const a=UE[i];FL(this,UE[i],(r&Lv[a])===Lv[a])}}}cC.prototype.defined=!0;function FL(e,t,n){n&&(e[t]=n)}function Qd(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const i=new cC(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[Tm(r)]=r,n[Tm(i.attribute)]=r}return new Ip(t,n,e.space)}const o9=Qd({properties:{ariaActiveDescendant:null,ariaAtomic:bn,ariaAutoComplete:null,ariaBusy:bn,ariaChecked:bn,ariaColCount:he,ariaColIndex:he,ariaColSpan:he,ariaControls:Vt,ariaCurrent:null,ariaDescribedBy:Vt,ariaDetails:null,ariaDisabled:bn,ariaDropEffect:Vt,ariaErrorMessage:null,ariaExpanded:bn,ariaFlowTo:Vt,ariaGrabbed:bn,ariaHasPopup:null,ariaHidden:bn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Vt,ariaLevel:he,ariaLive:null,ariaModal:bn,ariaMultiLine:bn,ariaMultiSelectable:bn,ariaOrientation:null,ariaOwns:Vt,ariaPlaceholder:null,ariaPosInSet:he,ariaPressed:bn,ariaReadOnly:bn,ariaRelevant:null,ariaRequired:bn,ariaRoleDescription:Vt,ariaRowCount:he,ariaRowIndex:he,ariaRowSpan:he,ariaSelected:bn,ariaSetSize:he,ariaSort:null,ariaValueMax:he,ariaValueMin:he,ariaValueNow:he,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function c9(e,t){return t in e?e[t]:t}function u9(e,t){return c9(e,t.toLowerCase())}const jxe=Qd({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Kl,acceptCharset:Vt,accessKey:Vt,action:null,allow:null,allowFullScreen:Xe,allowPaymentRequest:Xe,allowUserMedia:Xe,alt:null,as:null,async:Xe,autoCapitalize:null,autoComplete:Vt,autoFocus:Xe,autoPlay:Xe,blocking:Vt,capture:null,charSet:null,checked:Xe,cite:null,className:Vt,cols:he,colSpan:null,content:null,contentEditable:bn,controls:Xe,controlsList:Vt,coords:he|Kl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Xe,defer:Xe,dir:null,dirName:null,disabled:Xe,download:Ov,draggable:bn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Xe,formTarget:null,headers:Vt,height:he,hidden:Ov,high:he,href:null,hrefLang:null,htmlFor:Vt,httpEquiv:Vt,id:null,imageSizes:null,imageSrcSet:null,inert:Xe,inputMode:null,integrity:null,is:null,isMap:Xe,itemId:null,itemProp:Vt,itemRef:Vt,itemScope:Xe,itemType:Vt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Xe,low:he,manifest:null,max:null,maxLength:he,media:null,method:null,min:null,minLength:he,multiple:Xe,muted:Xe,name:null,nonce:null,noModule:Xe,noValidate:Xe,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Xe,optimum:he,pattern:null,ping:Vt,placeholder:null,playsInline:Xe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Xe,referrerPolicy:null,rel:Vt,required:Xe,reversed:Xe,rows:he,rowSpan:he,sandbox:Vt,scope:null,scoped:Xe,seamless:Xe,selected:Xe,shadowRootClonable:Xe,shadowRootDelegatesFocus:Xe,shadowRootMode:null,shape:null,size:he,sizes:null,slot:null,span:he,spellCheck:bn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:he,step:null,style:null,tabIndex:he,target:null,title:null,translate:null,type:null,typeMustMatch:Xe,useMap:null,value:bn,width:he,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Vt,axis:null,background:null,bgColor:null,border:he,borderColor:null,bottomMargin:he,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Xe,declare:Xe,event:null,face:null,frame:null,frameBorder:null,hSpace:he,leftMargin:he,link:null,longDesc:null,lowSrc:null,marginHeight:he,marginWidth:he,noResize:Xe,noHref:Xe,noShade:Xe,noWrap:Xe,object:null,profile:null,prompt:null,rev:null,rightMargin:he,rules:null,scheme:null,scrolling:bn,standby:null,summary:null,text:null,topMargin:he,valueType:null,version:null,vAlign:null,vLink:null,vSpace:he,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Xe,disableRemotePlayback:Xe,prefix:null,property:null,results:he,security:null,unselectable:null},space:"html",transform:u9}),Fxe=Qd({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:cs,accentHeight:he,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:he,amplitude:he,arabicForm:null,ascent:he,attributeName:null,attributeType:null,azimuth:he,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:he,by:null,calcMode:null,capHeight:he,className:Vt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:he,diffuseConstant:he,direction:null,display:null,dur:null,divisor:he,dominantBaseline:null,download:Xe,dx:null,dy:null,edgeMode:null,editable:null,elevation:he,enableBackground:null,end:null,event:null,exponent:he,externalResourcesRequired:null,fill:null,fillOpacity:he,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Kl,g2:Kl,glyphName:Kl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:he,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:he,horizOriginX:he,horizOriginY:he,id:null,ideographic:he,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:he,k:he,k1:he,k2:he,k3:he,k4:he,kernelMatrix:cs,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:he,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:he,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:he,overlineThickness:he,paintOrder:null,panose1:null,path:null,pathLength:he,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Vt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:he,pointsAtY:he,pointsAtZ:he,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:cs,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:cs,rev:cs,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:cs,requiredFeatures:cs,requiredFonts:cs,requiredFormats:cs,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:he,specularExponent:he,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:he,strikethroughThickness:he,string:null,stroke:null,strokeDashArray:cs,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:he,strokeOpacity:he,strokeWidth:null,style:null,surfaceScale:he,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:cs,tabIndex:he,tableValues:null,target:null,targetX:he,targetY:he,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:cs,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:he,underlineThickness:he,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:he,values:null,vAlphabetic:he,vMathematical:he,vectorEffect:null,vHanging:he,vIdeographic:he,version:null,vertAdvY:he,vertOriginX:he,vertOriginY:he,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:he,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:c9}),l9=Qd({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),d9=Qd({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:u9}),f9=Qd({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Bxe={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},zxe=/[A-Z]/g,BL=/-[a-z]/g,Uxe=/^data[-\w.:]+$/i;function Ap(e,t){const n=Tm(t);let r=t,s=rs;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Uxe.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(BL,Hxe);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!BL.test(i)){let a=i.replace(zxe,Vxe);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}s=cC}return new s(r,t)}function Vxe(e){return"-"+e.toLowerCase()}function Hxe(e){return e.charAt(1).toUpperCase()}const Xd=a9([o9,jxe,l9,d9,f9],"html"),aa=a9([o9,Fxe,l9,d9,f9],"svg"),zL={}.hasOwnProperty;function uC(e,t){const n=t||{};function r(s,...i){let a=r.invalid;const o=r.handlers;if(s&&zL.call(s,e)){const c=String(s[e]);a=zL.call(o,c)?o[c]:r.unknown}if(a)return a.call(this,s,...i)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const qxe=/["&'<>`]/g,Gxe=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Kxe=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Wxe=/[|\\{}()[\]^$+*?.]/g,UL=new WeakMap;function Jxe(e,t){if(e=e.replace(t.subset?Yxe(t.subset):qxe,r),t.subset||t.escapeOnly)return e;return e.replace(Gxe,n).replace(Kxe,r);function n(s,i,a){return t.format((s.charCodeAt(0)-55296)*1024+s.charCodeAt(1)-56320+65536,a.charCodeAt(i+2),t)}function r(s,i,a){return t.format(s.charCodeAt(0),a.charCodeAt(i+1),t)}}function Yxe(e){let t=UL.get(e);return t||(t=Qxe(e),UL.set(e,t)),t}function Qxe(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(Wxe,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const Xxe=/[\dA-Fa-f]/;function Zxe(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!Xxe.test(String.fromCharCode(t))?r:r+";"}const eTe=/\d/;function tTe(e,t,n){const r="&#"+String(e);return n&&t&&!eTe.test(String.fromCharCode(t))?r:r+";"}const nTe=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],VE={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},rTe=["cent","copy","divide","gt","lt","not","para","times"],h9={}.hasOwnProperty,Dv={};let Zg;for(Zg in VE)h9.call(VE,Zg)&&(Dv[VE[Zg]]=Zg);const sTe=/[^\dA-Za-z]/;function iTe(e,t,n,r){const s=String.fromCharCode(e);if(h9.call(Dv,s)){const i=Dv[s],a="&"+i;return n&&nTe.includes(i)&&!rTe.includes(i)&&(!r||t&&t!==61&&sTe.test(String.fromCharCode(t)))?a:a+";"}return""}function aTe(e,t,n){let r=Zxe(e,t,n.omitOptionalSemicolons),s;if((n.useNamedReferences||n.useShortestReferences)&&(s=iTe(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!s)&&n.useShortestReferences){const i=tTe(e,t,n.omitOptionalSemicolons);i.length<r.length&&(r=i)}return s&&(!n.useShortestReferences||s.length<r.length)?s:r}function Wl(e,t){return Jxe(e,Object.assign({format:aTe},t))}const oTe=/^>|^->|<!--|-->|--!>|<!-$/g,cTe=[">"],uTe=["<",">"];function lTe(e,t,n,r){return r.settings.bogusComments?"<?"+Wl(e.value,Object.assign({},r.settings.characterReferences,{subset:cTe}))+">":"<!--"+e.value.replace(oTe,s)+"-->";function s(i){return Wl(i,Object.assign({},r.settings.characterReferences,{subset:uTe}))}}function dTe(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function Ny(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(t);for(;s!==-1;)r++,s=n.indexOf(t,s+t.length);return r}function VL(e){const t=[],n=String(e||"");let r=n.indexOf(","),s=0,i=!1;for(;!i;){r===-1&&(r=n.length,i=!0);const a=n.slice(s,r).trim();(a||!i)&&t.push(a),s=r+1,r=n.indexOf(",",s)}return t}function lC(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function HL(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function dC(e){return e.join(" ").trim()}const fTe=/[ \t\n\f\r]/g;function X1(e){return typeof e=="object"?e.type==="text"?qL(e.value):!1:qL(e)}function qL(e){return e.replace(fTe,"")===""}const Bn=p9(1),m9=p9(-1),hTe=[];function p9(e){return t;function t(n,r,s){const i=n?n.children:hTe;let a=(r||0)+e,o=i[a];if(!s)for(;o&&X1(o);)a+=e,o=i[a];return o}}const mTe={}.hasOwnProperty;function g9(e){return t;function t(n,r,s){return mTe.call(e,n.tagName)&&e[n.tagName](n,r,s)}}const fC=g9({body:gTe,caption:HE,colgroup:HE,dd:kTe,dt:_Te,head:HE,html:pTe,li:yTe,optgroup:ETe,option:wTe,p:bTe,rp:GL,rt:GL,tbody:vTe,td:KL,tfoot:xTe,th:KL,thead:STe,tr:TTe});function HE(e,t,n){const r=Bn(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&X1(r.value.charAt(0)))}function pTe(e,t,n){const r=Bn(n,t);return!r||r.type!=="comment"}function gTe(e,t,n){const r=Bn(n,t);return!r||r.type!=="comment"}function bTe(e,t,n){const r=Bn(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function yTe(e,t,n){const r=Bn(n,t);return!r||r.type==="element"&&r.tagName==="li"}function _Te(e,t,n){const r=Bn(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function kTe(e,t,n){const r=Bn(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function GL(e,t,n){const r=Bn(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function ETe(e,t,n){const r=Bn(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function wTe(e,t,n){const r=Bn(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function STe(e,t,n){const r=Bn(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function vTe(e,t,n){const r=Bn(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function xTe(e,t,n){return!Bn(n,t)}function TTe(e,t,n){const r=Bn(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function KL(e,t,n){const r=Bn(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const ITe=g9({body:PTe,colgroup:NTe,head:CTe,html:ATe,tbody:RTe});function ATe(e){const t=Bn(e,-1);return!t||t.type!=="comment"}function CTe(e){const t=new Set;for(const r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}const n=e.children[0];return!n||n.type==="element"}function PTe(e){const t=Bn(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&X1(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function NTe(e,t,n){const r=m9(n,t),s=Bn(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&fC(r,n.children.indexOf(r),n)?!1:!!(s&&s.type==="element"&&s.tagName==="col")}function RTe(e,t,n){const r=m9(n,t),s=Bn(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&fC(r,n.children.indexOf(r),n)?!1:!!(s&&s.type==="element"&&s.tagName==="tr")}const e0={name:[[`
110
- \f\r &/=>`.split(""),`
111
- \f\r "&'/=>\``.split("")],[`\0
112
- \f\r "&'/<=>`.split(""),`\0
113
- \f\r "&'/<=>\``.split("")]],unquoted:[[`
114
- \f\r &>`.split(""),`\0
115
- \f\r "&'<=>\``.split("")],[`\0
116
- \f\r "&'<=>\``.split(""),`\0
117
- \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function OTe(e,t,n,r){const s=r.schema,i=s.space==="svg"?!1:r.settings.omitOptionalTags;let a=s.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const o=[];let c;s.space==="html"&&e.tagName==="svg"&&(r.schema=aa);const u=LTe(r,e.properties),l=r.all(s.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=s,l&&(a=!1),(u||!i||!ITe(e,t,n))&&(o.push("<",e.tagName,u?" "+u:""),a&&(s.space==="svg"||r.settings.closeSelfClosing)&&(c=u.charAt(u.length-1),(!r.settings.tightSelfClosing||c==="/"||c&&c!=='"'&&c!=="'")&&o.push(" "),o.push("/")),o.push(">")),o.push(l),!a&&(!i||!fC(e,t,n))&&o.push("</"+e.tagName+">"),o.join("")}function LTe(e,t){const n=[];let r=-1,s;if(t){for(s in t)if(t[s]!==null&&t[s]!==void 0){const i=DTe(e,s,t[s]);i&&n.push(i)}}for(;++r<n.length;){const i=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&i!=='"'&&i!=="'"&&(n[r]+=" ")}return n.join("")}function DTe(e,t,n){const r=Ap(e.schema,t),s=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,i=e.settings.allowDangerousCharacters?0:1;let a=e.quote,o;if(r.overloadedBoolean&&(n===r.attribute||n==="")?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!="string"||n===r.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const c=Wl(r.attribute,Object.assign({},e.settings.characterReferences,{subset:e0.name[s][i]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?lC:dC)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(o=Wl(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:e0.unquoted[s][i]}))),o!==n&&(e.settings.quoteSmart&&Ny(n,a)>Ny(n,e.alternative)&&(a=e.alternative),o=a+Wl(n,Object.assign({},e.settings.characterReferences,{subset:(a==="'"?e0.single:e0.double)[s][i],attribute:!0}))+a),c+(o&&"="+o))}const $Te=["<","&"];function b9(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:Wl(e.value,Object.assign({},r.settings.characterReferences,{subset:$Te}))}function MTe(e,t,n,r){return r.settings.allowDangerousHtml?e.value:b9(e,t,n,r)}function jTe(e,t,n,r){return r.all(e)}const FTe=uC("type",{invalid:BTe,unknown:zTe,handlers:{comment:lTe,doctype:dTe,element:OTe,raw:MTe,root:jTe,text:b9}});function BTe(e){throw new Error("Expected node, not `"+e+"`")}function zTe(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const UTe={},VTe={},HTe=[];function y9(e,t){const n=t||UTe,r=n.quote||'"',s=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:qTe,all:GTe,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||i9,characterReferences:n.characterReferences||VTe,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?aa:Xd,quote:r,alternative:s}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function qTe(e,t,n){return FTe(e,t,n,this)}function GTe(e){const t=[],n=e&&e.children||HTe;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function _9(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const n=Array.isArray(t)?t:t.split(/\s+/g);for(const r of n)r&&!e.properties.class.includes(r)&&e.properties.class.push(r);return e}function KTe(e){const t=J1(e,!0).map(([s])=>s);function n(s){if(s===e.length)return{line:t.length-1,character:t[t.length-1].length};let i=s,a=0;for(const o of t){if(i<o.length)break;i-=o.length,a++}return{line:a,character:i}}function r(s,i){let a=0;for(let o=0;o<s;o++)a+=t[o].length;return a+=i,a}return{lines:t,indexToPos:n,posToIndex:r}}function WTe(e,t,n){const r=new Set;for(const i of e.matchAll(/:?lang=["']([^"']+)["']/g)){const a=i[1].toLowerCase().trim();a&&r.add(a)}for(const i of e.matchAll(/(?:```|~~~)([\w-]+)/g)){const a=i[1].toLowerCase().trim();a&&r.add(a)}for(const i of e.matchAll(/\\begin\{([\w-]+)\}/g)){const a=i[1].toLowerCase().trim();a&&r.add(a)}for(const i of e.matchAll(/<script\s+(?:type|lang)=["']([^"']+)["']/gi)){const a=i[1].toLowerCase().trim(),o=a.includes("/")?a.split("/").pop():a;o&&r.add(o)}if(!n)return Array.from(r);const s=n.getBundledLanguages();return Array.from(r).filter(i=>i&&s[i])}const hC="light-dark()",JTe=["color","background-color"];function YTe(e,t){let n=0;const r=[];for(const s of t)s>n&&r.push({...e,content:e.content.slice(n,s),offset:e.offset+n}),n=s;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function QTe(e,t){const n=Array.from(t instanceof Set?t:new Set(t)).sort((r,s)=>r-s);return n.length?e.map(r=>r.flatMap(s=>{const i=n.filter(a=>s.offset<a&&a<s.offset+s.content.length).map(a=>a-s.offset).sort((a,o)=>a-o);return i.length?YTe(s,i):s})):e}function XTe(e,t,n,r,s="css-vars"){const i={content:e.content,explanation:e.explanation,offset:e.offset},a=t.map(l=>Ry(e.variants[l])),o=new Set(a.flatMap(l=>Object.keys(l))),c={},u=(l,d)=>{const f=d==="color"?"":d==="background-color"?"-bg":`-${d}`;return n+t[l]+(d==="color"?"":f)};return a.forEach((l,d)=>{for(const f of o){const h=l[f]||"inherit";if(d===0&&r&&JTe.includes(f))if(r===hC&&a.length>1){const m=t.findIndex(g=>g==="light"),y=t.findIndex(g=>g==="dark");if(m===-1||y===-1)throw new Ht('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');c[f]=`light-dark(${a[m][f]||"inherit"}, ${a[y][f]||"inherit"})`,s==="css-vars"&&(c[u(d,f)]=h)}else c[f]=h;else s==="css-vars"&&(c[u(d,f)]=h)}}),i.htmlStyle=c,i}function Ry(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&Tt.Italic&&(t["font-style"]="italic"),e.fontStyle&Tt.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&Tt.Underline&&n.push("underline"),e.fontStyle&Tt.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function $v(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}function ZTe(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let s=function(a){if(typeof a=="number"){if(a<0||a>n.source.length)throw new Ht(`Invalid decoration offset: ${a}. Code length: ${n.source.length}`);return{...r.indexToPos(a),offset:a}}else{const o=r.lines[a.line];if(o===void 0)throw new Ht(`Invalid decoration position ${JSON.stringify(a)}. Lines length: ${r.lines.length}`);let c=a.character;if(c<0&&(c=o.length+c),c<0||c>o.length)throw new Ht(`Invalid decoration position ${JSON.stringify(a)}. Line ${a.line} length: ${o.length}`);return{...a,character:c,offset:r.posToIndex(a.line,c)}}};const r=KTe(n.source),i=(n.options.decorations||[]).map(a=>({...a,start:s(a.start),end:s(a.end)}));eIe(i),e.set(n.meta,{decorations:i,converter:r,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(this.options.decorations?.length)return QTe(n,t(this).decorations.flatMap(r=>[r.start.offset,r.end.offset]))},code(n){if(!this.options.decorations?.length)return;const r=t(this),s=Array.from(n.children).filter(l=>l.type==="element"&&l.tagName==="span");if(s.length!==r.converter.lines.length)throw new Ht(`Number of lines in code element (${s.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function i(l,d,f,h){const m=s[l];let y="",g=-1,p=-1;if(d===0&&(g=0),f===0&&(p=0),f===Number.POSITIVE_INFINITY&&(p=m.children.length),g===-1||p===-1)for(let k=0;k<m.children.length;k++)y+=k9(m.children[k]),g===-1&&y.length===d&&(g=k+1),p===-1&&y.length===f&&(p=k+1);if(g===-1)throw new Ht(`Failed to find start index for decoration ${JSON.stringify(h.start)}`);if(p===-1)throw new Ht(`Failed to find end index for decoration ${JSON.stringify(h.end)}`);const _=m.children.slice(g,p);if(!h.alwaysWrap&&_.length===m.children.length)o(m,h,"line");else if(!h.alwaysWrap&&_.length===1&&_[0].type==="element")o(_[0],h,"token");else{const k={type:"element",tagName:"span",properties:{},children:_};o(k,h,"wrapper"),m.children.splice(g,_.length,k)}}function a(l,d){s[l]=o(s[l],d,"line")}function o(l,d,f){const h=d.properties||{},m=d.transform||(y=>y);return l.tagName=d.tagName||"span",l.properties={...l.properties,...h,class:l.properties.class},d.properties?.class&&_9(l,d.properties.class),l=m(l,f)||l,l}const c=[],u=r.decorations.sort((l,d)=>d.start.offset-l.start.offset||l.end.offset-d.end.offset);for(const l of u){const{start:d,end:f}=l;if(d.line===f.line)i(d.line,d.character,f.character,l);else if(d.line<f.line){i(d.line,d.character,Number.POSITIVE_INFINITY,l);for(let h=d.line+1;h<f.line;h++)c.unshift(()=>a(h,l));i(f.line,0,f.character,l)}}c.forEach(l=>l())}}}function eIe(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new Ht(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){const s=e[r],i=n.start.offset<=s.start.offset&&s.start.offset<n.end.offset,a=n.start.offset<s.end.offset&&s.end.offset<=n.end.offset,o=s.start.offset<=n.start.offset&&n.start.offset<s.end.offset,c=s.start.offset<n.end.offset&&n.end.offset<=s.end.offset;if(i||a||o||c){if(i&&a||o&&c||o&&n.start.offset===n.end.offset||a&&s.start.offset===s.end.offset)continue;throw new Ht(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(s.start)} intersect.`)}}}}function k9(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(k9).join(""):""}const tIe=[ZTe()];function Oy(e){const t=nIe(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...tIe]}function nIe(e){const t=[],n=[],r=[];for(const s of e)switch(s.enforce){case"pre":t.push(s);break;case"post":n.push(s);break;default:r.push(s)}return{pre:t,post:n,normal:r}}var Fc=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],qE={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function rIe(e,t){const n=e.indexOf("\x1B",t);if(n!==-1&&e[n+1]==="["){const r=e.indexOf("m",n);if(r!==-1)return{sequence:e.substring(n+2,r).split(";"),startPosition:n,position:r+1}}return{position:e.length}}function WL(e){const t=e.shift();if(t==="2"){const n=e.splice(0,3).map(r=>Number.parseInt(r));return n.length!==3||n.some(r=>Number.isNaN(r))?void 0:{type:"rgb",rgb:n}}else if(t==="5"){const n=e.shift();if(n)return{type:"table",index:Number(n)}}}function sIe(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:"resetAll"});else if(r<=9)qE[r]&&t.push({type:"setDecoration",value:qE[r]});else if(r<=29){const s=qE[r-20];s&&(t.push({type:"resetDecoration",value:s}),s==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:Fc[r-30]}});else if(r===38){const s=WL(e);s&&t.push({type:"setForegroundColor",value:s})}else if(r===39)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:Fc[r-40]}});else if(r===48){const s=WL(e);s&&t.push({type:"setBackgroundColor",value:s})}else r===49?t.push({type:"resetBackgroundColor"}):r===53?t.push({type:"setDecoration",value:"overline"}):r===55?t.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:Fc[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Fc[r-100+8]}})}return t}function iIe(){let e=null,t=null,n=new Set;return{parse(r){const s=[];let i=0;do{const a=rIe(r,i),o=a.sequence?r.substring(i,a.startPosition):r.substring(i);if(o.length>0&&s.push({value:o,foreground:e,background:t,decorations:new Set(n)}),a.sequence){const c=sIe(a.sequence);for(const u of c)u.type==="resetAll"?(e=null,t=null,n.clear()):u.type==="resetForegroundColor"?e=null:u.type==="resetBackgroundColor"?t=null:u.type==="resetDecoration"&&n.delete(u.value);for(const u of c)u.type==="setForegroundColor"?e=u.value:u.type==="setBackgroundColor"?t=u.value:u.type==="setDecoration"&&n.add(u.value)}i=a.position}while(i<r.length);return s}}}var aIe={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function oIe(e=aIe){function t(o){return e[o]}function n(o){return`#${o.map(c=>Math.max(0,Math.min(c,255)).toString(16).padStart(2,"0")).join("")}`}let r;function s(){if(r)return r;r=[];for(let u=0;u<Fc.length;u++)r.push(t(Fc[u]));let o=[0,95,135,175,215,255];for(let u=0;u<6;u++)for(let l=0;l<6;l++)for(let d=0;d<6;d++)r.push(n([o[u],o[l],o[d]]));let c=8;for(let u=0;u<24;u++,c+=10)r.push(n([c,c,c]));return r}function i(o){return s()[o]}function a(o){switch(o.type){case"named":return t(o.name);case"rgb":return n(o.rgb);case"table":return i(o.index)}}return{value:a}}const cIe={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function uIe(e,t,n){const r=Py(e,n),s=J1(t),i=oIe(Object.fromEntries(Fc.map(o=>{const c=`terminal.ansi${o[0].toUpperCase()}${o.substring(1)}`;return[o,e.colors?.[c]||cIe[o]]}))),a=iIe();return s.map(o=>a.parse(o[0]).map(c=>{let u,l;c.decorations.has("reverse")?(u=c.background?i.value(c.background):e.bg,l=c.foreground?i.value(c.foreground):e.fg):(u=c.foreground?i.value(c.foreground):e.fg,l=c.background?i.value(c.background):void 0),u=Po(u,r),l=Po(l,r),c.decorations.has("dim")&&(u=lIe(u));let d=Tt.None;return c.decorations.has("bold")&&(d|=Tt.Bold),c.decorations.has("italic")&&(d|=Tt.Italic),c.decorations.has("underline")&&(d|=Tt.Underline),c.decorations.has("strikethrough")&&(d|=Tt.Strikethrough),{content:c.value,offset:o[1],color:u,bgColor:l,fontStyle:d}}))}function lIe(e){const t=e.match(/#([0-9a-f]{3,8})/i);if(t){const r=t[1];if(r.length===8){const s=Math.round(Number.parseInt(r.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${r.slice(0,6)}${s}`}else{if(r.length===6)return`#${r}80`;if(r.length===4){const s=r[0],i=r[1],a=r[2],o=r[3];return`#${s}${s}${i}${i}${a}${a}${Math.round(Number.parseInt(`${o}${o}`,16)/2).toString(16).padStart(2,"0")}`}else if(r.length===3){const s=r[0],i=r[1],a=r[2];return`#${s}${s}${i}${i}${a}${a}80`}}}const n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function E9(e,t,n={}){const r=e.resolveLangAlias(n.lang||"text"),{theme:s=e.getLoadedThemes()[0]}=n;if(!K1(r)&&!W1(s)&&r==="ansi"){const{theme:i}=e.setTheme(s);return uIe(i,t,n)}return r9(e,t,n)}function Ly(e,t,n){let r,s,i,a,o,c;if("themes"in n){const{defaultColor:u="light",cssVariablePrefix:l="--shiki-",colorsRendering:d="css-vars"}=n,f=Object.entries(n.themes).filter(p=>p[1]).map(p=>({color:p[0],theme:p[1]})).sort((p,_)=>p.color===u?-1:_.color===u?1:0);if(f.length===0)throw new Ht("`themes` option must not be empty");const h=s9(e,t,n);if(c=xm(h),u&&hC!==u&&!f.find(p=>p.color===u))throw new Ht(`\`themes\` option must contain the defaultColor key \`${u}\``);const m=f.map(p=>e.getTheme(p.theme)),y=f.map(p=>p.color);i=h.map(p=>p.map(_=>XTe(_,y,l,u,d))),c&&Y1(i,c);const g=f.map(p=>Py(p.theme,n));s=JL(f,m,g,l,u,"fg",d),r=JL(f,m,g,l,u,"bg",d),a=`shiki-themes ${m.map(p=>p.name).join(" ")}`,o=u?void 0:[s,r].join(";")}else if("theme"in n){const u=Py(n.theme,n);i=E9(e,t,n);const l=e.getTheme(n.theme);r=Po(l.bg,u),s=Po(l.fg,u),a=l.name,c=xm(i)}else throw new Ht("Invalid options, either `theme` or `themes` must be provided");return{tokens:i,fg:s,bg:r,themeName:a,rootStyle:o,grammarState:c}}function JL(e,t,n,r,s,i,a){return e.map((o,c)=>{const u=Po(t[c][i],n[c])||"inherit",l=`${r+o.color}${i==="bg"?"-bg":""}:${u}`;if(c===0&&s){if(s===hC&&e.length>1){const d=e.findIndex(h=>h.color==="light"),f=e.findIndex(h=>h.color==="dark");if(d===-1||f===-1)throw new Ht('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${Po(t[d][i],n[d])||"inherit"}, ${Po(t[f][i],n[f])||"inherit"});${l}`}return u}return a==="css-vars"?l:null}).filter(o=>!!o).join(";")}function Dy(e,t,n,r={meta:{},options:n,codeToHast:(s,i)=>Dy(e,s,i),codeToTokens:(s,i)=>Ly(e,s,i)}){let s=t;for(const m of Oy(n))s=m.preprocess?.call(r,s,n)||s;let{tokens:i,fg:a,bg:o,themeName:c,rootStyle:u,grammarState:l}=Ly(e,s,n);const{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?i=fIe(i):d==="never"&&(i=hIe(i)),f&&(i=mIe(i));const h={...r,get source(){return s}};for(const m of Oy(n))i=m.tokens?.call(h,i)||i;return dIe(i,{...n,fg:a,bg:o,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??u},h,l)}function dIe(e,t,n,r=xm(e)){const s=Oy(t),i=[],a={type:"root",children:[]},{structure:o="classic",tabindex:c="0"}=t,u={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?u.style=t.rootStyle:u.style=`background-color:${t.bg};color:${t.fg}`),c!==!1&&c!=null&&(u.tabindex=c.toString());for(const[y,g]of Object.entries(t.meta||{}))y.startsWith("_")||(u[y]=g);let l={type:"element",tagName:"pre",properties:u,children:[],data:t.data},d={type:"element",tagName:"code",properties:{},children:i};const f=[],h={...n,structure:o,addClassToHast:_9,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return a},get pre(){return l},get code(){return d},get lines(){return f}};if(e.forEach((y,g)=>{g&&(o==="inline"?a.children.push({type:"element",tagName:"br",properties:{},children:[]}):o==="classic"&&i.push({type:"text",value:`
118
- `}));let p={type:"element",tagName:"span",properties:{class:"line"},children:[]},_=0;for(const k of y){let v={type:"element",tagName:"span",properties:{...k.htmlAttrs},children:[{type:"text",value:k.content}]};const w=$v(k.htmlStyle||Ry(k));w&&(v.properties.style=w);for(const S of s)v=S?.span?.call(h,v,g+1,_,p,k)||v;o==="inline"?a.children.push(v):o==="classic"&&p.children.push(v),_+=k.content.length}if(o==="classic"){for(const k of s)p=k?.line?.call(h,p,g+1)||p;f.push(p),i.push(p)}else o==="inline"&&f.push(p)}),o==="classic"){for(const y of s)d=y?.code?.call(h,d)||d;l.children.push(d);for(const y of s)l=y?.pre?.call(h,l)||l;a.children.push(l)}else if(o==="inline"){const y=[];let g={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const _ of a.children)_.type==="element"&&_.tagName==="br"?(y.push(g),g={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(_.type==="element"||_.type==="text")&&g.children.push(_);y.push(g);let p={type:"element",tagName:"code",properties:{},children:y};for(const _ of s)p=_?.code?.call(h,p)||p;a.children=[];for(let _=0;_<p.children.length;_++){_>0&&a.children.push({type:"element",tagName:"br",properties:{},children:[]});const k=p.children[_];k.type==="element"&&a.children.push(...k.children)}}let m=a;for(const y of s)m=y?.root?.call(h,m)||m;return r&&Y1(m,r),m}function fIe(e){return e.map(t=>{const n=[];let r="",s;return t.forEach((i,a)=>{const o=!(i.fontStyle&&(i.fontStyle&Tt.Underline||i.fontStyle&Tt.Strikethrough));o&&i.content.match(/^\s+$/)&&t[a+1]?(s===void 0&&(s=i.offset),r+=i.content):r?(o?n.push({...i,offset:s,content:r+i.content}):n.push({content:r,offset:s},i),s=void 0,r=""):n.push(i)}),n})}function hIe(e){return e.map(t=>t.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const r=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!r)return n;const[,s,i,a]=r;if(!s&&!a)return n;const o=[{...n,offset:n.offset+s.length,content:i}];return s&&o.unshift({content:s,offset:n.offset}),a&&o.push({content:a,offset:n.offset+s.length+i.length}),o}))}function mIe(e){return e.map(t=>{const n=[];for(const r of t){if(n.length===0){n.push({...r});continue}const s=n[n.length-1],i=$v(s.htmlStyle||Ry(s)),a=$v(r.htmlStyle||Ry(r)),o=s.fontStyle&&(s.fontStyle&Tt.Underline||s.fontStyle&Tt.Strikethrough),c=r.fontStyle&&(r.fontStyle&Tt.Underline||r.fontStyle&Tt.Strikethrough);!o&&!c&&i===a?s.content+=r.content:n.push({...r})}return n})}const pIe=y9;function gIe(e,t,n){const r={meta:{},options:n,codeToHast:(i,a)=>Dy(e,i,a),codeToTokens:(i,a)=>Ly(e,i,a)};let s=pIe(Dy(e,t,n,r));for(const i of Oy(n))s=i.postprocess?.call(r,s,n)||s;return s}async function bIe(e){const t=await Ixe(e);return{getLastGrammarState:(...n)=>Pxe(t,...n),codeToTokensBase:(n,r)=>E9(t,n,r),codeToTokensWithThemes:(n,r)=>s9(t,n,r),codeToTokens:(n,r)=>Ly(t,n,r),codeToHast:(n,r)=>Dy(t,n,r),codeToHtml:(n,r)=>gIe(t,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function yIe(e){const t=e.langs,n=e.themes,r=e.engine;async function s(i){function a(d){if(typeof d=="string"){if(d=i.langAlias?.[d]||d,YU(d))return[];const f=t[d];if(!f)throw new Ht(`Language \`${d}\` is not included in this bundle. You may want to load it from external source.`);return f}return d}function o(d){if(QU(d))return"none";if(typeof d=="string"){const f=n[d];if(!f)throw new Ht(`Theme \`${d}\` is not included in this bundle. You may want to load it from external source.`);return f}return d}const c=(i.themes??[]).map(d=>o(d)),u=(i.langs??[]).map(d=>a(d)),l=await bIe({engine:i.engine??r(),...i,themes:c,langs:u});return{...l,loadLanguage(...d){return l.loadLanguage(...d.map(a))},loadTheme(...d){return l.loadTheme(...d.map(o))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return s}function _Ie(e){let t;async function n(r={}){if(t){const s=await t;return await Promise.all([s.loadTheme(...r.themes||[]),s.loadLanguage(...r.langs||[])]),s}else{t=e({...r,themes:[],langs:[]});const s=await t;return await Promise.all([s.loadTheme(...r.themes||[]),s.loadLanguage(...r.langs||[])]),s}}return n}function kIe(e,t){const n=_Ie(e);async function r(s,i){const a=await n({langs:[i.lang],themes:"theme"in i?[i.theme]:Object.values(i.themes)}),o=await t?.guessEmbeddedLanguages?.(s,i.lang,a);return o&&await a.loadLanguage(...o),a}return{getSingletonHighlighter(s){return n(s)},async codeToHtml(s,i){return(await r(s,i)).codeToHtml(s,i)},async codeToHast(s,i){return(await r(s,i)).codeToHast(s,i)},async codeToTokens(s,i){return(await r(s,i)).codeToTokens(s,i)},async codeToTokensBase(s,i){return(await r(s,i)).codeToTokensBase(s,i)},async codeToTokensWithThemes(s,i){return(await r(s,i)).codeToTokensWithThemes(s,i)},async getLastGrammarState(s,i){return(await n({langs:[i.lang],themes:[i.theme]})).getLastGrammarState(s,i)}}}var EIe=QA({bundledLanguages:()=>eC,bundledLanguagesAlias:()=>ZA,bundledLanguagesBase:()=>XA,bundledLanguagesInfo:()=>q1,bundledThemes:()=>nC,bundledThemesInfo:()=>tC,codeToHast:()=>w9,codeToHtml:()=>pC,codeToTokens:()=>S9,codeToTokensBase:()=>v9,codeToTokensWithThemes:()=>x9,createHighlighter:()=>mC,getLastGrammarState:()=>I9,getSingletonHighlighter:()=>T9});const mC=yIe({langs:eC,themes:nC,engine:()=>(0,RU.createOnigurumaEngine)(x(()=>import("./wasm-CG6Dc4jp.js"),[]))}),{codeToHtml:pC,codeToHast:w9,codeToTokens:S9,codeToTokensBase:v9,codeToTokensWithThemes:x9,getSingletonHighlighter:T9,getLastGrammarState:I9}=kIe(mC,{guessEmbeddedLanguages:WTe}),YL=4294967295;var wIe=class{regexps;constructor(t,n={}){this.patterns=t,this.options=n;const{forgiving:r=!1,cache:s,regexConstructor:i}=n;if(!i)throw new Error("Option `regexConstructor` is not provided");this.regexps=t.map(a=>{if(typeof a!="string")return a;const o=s?.get(a);if(o){if(o instanceof RegExp)return o;if(r)return null;throw o}try{const c=i(a);return s?.set(a,c),c}catch(c){if(s?.set(a,c),r)return null;throw c}})}findNextMatchSync(t,n,r){const s=typeof t=="string"?t:t.content,i=[];function a(o,c,u=0){return{index:o,captureIndices:c.indices.map(l=>l==null?{start:YL,end:YL,length:0}:{start:l[0]+u,end:l[1]+u,length:l[1]-l[0]})}}for(let o=0;o<this.regexps.length;o++){const c=this.regexps[o];if(c)try{c.lastIndex=n;const u=c.exec(s);if(!u)continue;if(u.index===n)return a(o,u,0);i.push([o,u,0])}catch(u){if(this.options.forgiving)continue;throw u}}if(i.length){const o=Math.min(...i.map(c=>c[1].index));for(const[c,u,l]of i)if(u.index===o)return a(c,u,l)}return null}};function Zd(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function SIe(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}const gC=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),Wn=String.raw;function ef(e,t){if(e==null)throw new Error(t??"Value expected");return e}const A9=Wn`\[\^?`,C9=`c.? | C(?:-.?)?|${Wn`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${Wn`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${Wn`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${Wn`o\{[^\}]*\}?`}|${Wn`\d{1,3}`}`,bC=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,t0=new RegExp(Wn`
119
- \\ (?:
120
- ${C9}
121
- | [gk]<[^>]*>?
122
- | [gk]'[^']*'?
123
- | .
124
- )
125
- | \( (?:
126
- \? (?:
127
- [:=!>({]
128
- | <[=!]
129
- | <[^>]*>
130
- | '[^']*'
131
- | ~\|?
132
- | #(?:[^)\\]|\\.?)*
133
- | [^:)]*[:)]
134
- )?
135
- | \*[^\)]*\)?
136
- )?
137
- | (?:${bC.source})+
138
- | ${A9}
139
- | .
140
- `.replace(/\s+/g,""),"gsu"),GE=new RegExp(Wn`
141
- \\ (?:
142
- ${C9}
143
- | .
144
- )
145
- | \[:(?:\^?\p{Alpha}+|\^):\]
146
- | ${A9}
147
- | &&
148
- | .
149
- `.replace(/\s+/g,""),"gsu");function vIe(e,t={}){const n={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!="string")throw new Error("String expected as pattern");const r=VIe(n.flags),s=[r.extended],i={captureGroup:n.rules.captureGroup,getCurrentModX(){return s.at(-1)},numOpenGroups:0,popModX(){s.pop()},pushModX(d){s.push(d)},replaceCurrentModX(d){s[s.length-1]=d},singleline:n.rules.singleline};let a=[],o;for(t0.lastIndex=0;o=t0.exec(e);){const d=xIe(i,e,o[0],t0.lastIndex);d.tokens?a.push(...d.tokens):d.token&&a.push(d.token),d.lastIndex!==void 0&&(t0.lastIndex=d.lastIndex)}const c=[];let u=0;a.filter(d=>d.type==="GroupOpen").forEach(d=>{d.kind==="capturing"?d.number=++u:d.raw==="("&&c.push(d)}),u||c.forEach((d,f)=>{d.kind="capturing",d.number=f+1});const l=u||c.length;return{tokens:a.map(d=>d.type==="EscapedNumber"?qIe(d,l):d).flat(),flags:r}}function xIe(e,t,n,r){const[s,i]=n;if(n==="["||n==="[^"){const a=TIe(t,n,r);return{tokens:a.tokens,lastIndex:a.lastIndex}}if(s==="\\"){if("AbBGyYzZ".includes(i))return{token:QL(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:$Ie(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:N9(n)}}if(i==="K")return{token:R9("keep",n)};if(i==="N"||i==="R")return{token:Bc("newline",n,{negate:i==="N"})};if(i==="O")return{token:Bc("any",n)};if(i==="X")return{token:Bc("text_segment",n)};const a=P9(n,{inCharClass:!1});return Array.isArray(a)?{tokens:a}:{token:a}}if(s==="("){if(i==="*")return{token:BIe(n)};if(n==="(?{")throw new Error(`Unsupported callout "${n}"`);if(n.startsWith("(?#")){if(t[r]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:FIe(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n==="("&&!e.captureGroup||n==="(?:")return{token:_l("group",n)};if(n==="(?>")return{token:_l("atomic",n)};if(n==="(?="||n==="(?!"||n==="(?<="||n==="(?<!")return{token:_l(n[2]==="<"?"lookbehind":"lookahead",n,{negate:n.endsWith("!")})};if(n==="("&&e.captureGroup||n.startsWith("(?<")&&n.endsWith(">")||n.startsWith("(?'")&&n.endsWith("'"))return{token:_l("capturing",n,{...n!=="("&&{name:n.slice(3,-1)}})};if(n.startsWith("(?~")){if(n==="(?~|")throw new Error(`Unsupported absence function kind "${n}"`);return{token:_l("absence_repeater",n)}}throw n==="(?("?new Error(`Unsupported conditional "${n}"`):new Error(`Invalid or unsupported group option "${n}"`)}if(n===")"){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:OIe(n)}}if(e.getCurrentModX()){if(n==="#"){const a=t.indexOf(`
150
- `,r);return{lastIndex:a===-1?t.length:a}}if(/^\s$/.test(n)){const a=/\s+/y;return a.lastIndex=r,{lastIndex:a.exec(t)?a.lastIndex:r}}}if(n===".")return{token:Bc("dot",n)};if(n==="^"||n==="$"){const a=e.singleline?{"^":Wn`\A`,$:Wn`\Z`}[n]:n;return{token:QL(a,n)}}return n==="|"?{token:AIe(n)}:bC.test(n)?{tokens:GIe(n)}:{token:Oa(Zd(n),n)}}function TIe(e,t,n){const r=[XL(t[1]==="^",t)];let s=1,i;for(GE.lastIndex=n;i=GE.exec(e);){const a=i[0];if(a[0]==="["&&a[1]!==":")s++,r.push(XL(a[1]==="^",a));else if(a==="]"){if(r.at(-1).type==="CharacterClassOpen")r.push(Oa(93,a));else if(s--,r.push(CIe(a)),!s)break}else{const o=IIe(a);Array.isArray(o)?r.push(...o):r.push(o)}}return{tokens:r,lastIndex:GE.lastIndex||e.length}}function IIe(e){if(e[0]==="\\")return P9(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!gC.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return Bc("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?PIe(e):e==="&&"?NIe(e):Oa(Zd(e),e)}function P9(e,{inCharClass:t}){const n=e[1];if(n==="c"||n==="C")return jIe(e);if("dDhHsSwW".includes(n))return zIe(e);if(e.startsWith(Wn`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw new Error(`Incomplete or invalid Unicode property "${e}"`);return UIe(e)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(e))try{const r=e.split(/\\x/).slice(1).map(a=>parseInt(a,16)),s=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(r)),i=new TextEncoder;return[...s].map(a=>{const o=[...i.encode(a)].map(c=>`\\x${c.toString(16)}`).join("");return Oa(Zd(a),o)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n==="u"||n==="x")return Oa(HIe(e),e);if(ZL.has(n))return Oa(ZL.get(n),e);if(/\d/.test(n))return RIe(t,e);if(e==="\\")throw new Error(Wn`Incomplete escape "\"`);if(n==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return Oa(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function AIe(e){return{type:"Alternator",raw:e}}function QL(e,t){return{type:"Assertion",kind:e,raw:t}}function N9(e){return{type:"Backreference",raw:e}}function Oa(e,t){return{type:"Character",value:e,raw:t}}function CIe(e){return{type:"CharacterClassClose",raw:e}}function PIe(e){return{type:"CharacterClassHyphen",raw:e}}function NIe(e){return{type:"CharacterClassIntersector",raw:e}}function XL(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function Bc(e,t,n={}){return{type:"CharacterSet",kind:e,...n,raw:t}}function R9(e,t,n={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:ef(n.flags),raw:t}}function RIe(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function OIe(e){return{type:"GroupClose",raw:e}}function _l(e,t,n={}){return{type:"GroupOpen",kind:e,...n,raw:t}}function LIe(e,t,n,r){return{type:"NamedCallout",kind:e,tag:t,arguments:n,raw:r}}function DIe(e,t,n,r){return{type:"Quantifier",kind:e,min:t,max:n,raw:r}}function $Ie(e){return{type:"Subroutine",raw:e}}const MIe=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),ZL=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function jIe(e){const t=e[1]==="c"?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw new Error(`Unsupported control character "${e}"`);return Oa(Zd(t.toUpperCase())-64,e)}function FIe(e,t){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;r??="";const s=(t.getCurrentModX()||n.includes("x"))&&!r.includes("x"),i=t3(n),a=t3(r),o={};if(i&&(o.enable=i),a&&(o.disable=a),e.endsWith(")"))return t.replaceCurrentModX(s),R9("flags",e,{flags:o});if(e.endsWith(":"))return t.pushModX(s),t.numOpenGroups++,_l("group",e,{...(i||a)&&{flags:o}});throw new Error(`Unexpected flag modifier "${e}"`)}function BIe(e){const t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw new Error(`Incomplete or invalid named callout "${e}"`);const{name:n,tag:r,args:s}=t.groups;if(!n)throw new Error(`Invalid named callout "${e}"`);if(r==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);const i=s?s.split(",").filter(l=>l!=="").map(l=>/^[+-]?\d+$/.test(l)?+l:l):[],[a,o,c]=i,u=MIe.has(n)?n.toLowerCase():"custom";switch(u){case"fail":case"mismatch":case"skip":if(i.length>0)throw new Error(`Named callout arguments not allowed "${i}"`);break;case"error":if(i.length>1)throw new Error(`Named callout allows only one argument "${i}"`);if(typeof a=="string")throw new Error(`Named callout argument must be a number "${a}"`);break;case"max":if(!i.length||i.length>2)throw new Error(`Named callout must have one or two arguments "${i}"`);if(typeof a=="string"&&!/^[A-Za-z_]\w*$/.test(a))throw new Error(`Named callout argument one must be a tag or number "${a}"`);if(i.length===2&&(typeof o=="number"||!/^[<>X]$/.test(o)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${o}"`);break;case"count":case"total_count":if(i.length>1)throw new Error(`Named callout allows only one argument "${i}"`);if(i.length===1&&(typeof a=="number"||!/^[<>X]$/.test(a)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${a}"`);break;case"cmp":if(i.length!==3)throw new Error(`Named callout must have three arguments "${i}"`);if(typeof a=="string"&&!/^[A-Za-z_]\w*$/.test(a))throw new Error(`Named callout argument one must be a tag or number "${a}"`);if(typeof o=="number"||!/^(?:[<>!=]=|[<>])$/.test(o))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${o}"`);if(typeof c=="string"&&!/^[A-Za-z_]\w*$/.test(c))throw new Error(`Named callout argument three must be a tag or number "${c}"`);break;case"custom":throw new Error(`Undefined callout name "${n}"`);default:throw new Error(`Unexpected named callout kind "${u}"`)}return LIe(u,r??null,s?.split(",")??null,e)}function e3(e){let t=null,n,r;if(e[0]==="{"){const{minStr:s,maxStr:i}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,a=1e5;if(+s>a||i&&+i>a)throw new Error("Quantifier value unsupported in Oniguruma");if(n=+s,r=i===void 0?+s:i===""?1/0:+i,n>r&&(t="possessive",[n,r]=[r,n]),e.endsWith("?")){if(t==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else n=e[0]==="+"?1:0,r=e[0]==="?"?1:1/0,t=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return DIe(t,n,r,e)}function zIe(e){const t=e[1].toLowerCase();return Bc({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function UIe(e){const{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return Bc("property",e,{value:r,negate:t==="P"&&!n||t==="p"&&!!n})}function t3(e){const t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function VIe(e){const t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){const r=e[n];if(!"imxDPSWy".includes(r))throw new Error(`Invalid flag "${r}"`);if(r==="y"){if(!/^y{[gw]}/.test(e.slice(n)))throw new Error('Invalid or unspecified flag "y" mode');t.textSegmentMode=e[n+2]==="g"?"grapheme":"word",n+=3;continue}t[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[r]]=!0}return t}function HIe(e){if(new RegExp("^(?:\\\\u(?!\\p{AHex}{4})|\\\\x(?!\\p{AHex}{1,2}|\\{\\p{AHex}{1,8}\\}))","u").test(e))throw new Error(`Incomplete or invalid escape "${e}"`);const t=e[2]==="{"?new RegExp("^\\\\x\\{\\s*(?<hex>\\p{AHex}+)","u").exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function qIe(e,t){const{raw:n,inCharClass:r}=e,s=n.slice(1);if(!r&&(s!=="0"&&s.length===1||s[0]!=="0"&&+s<=t))return[N9(n)];const i=[],a=s.match(/^[0-7]+|\d/g);for(let o=0;o<a.length;o++){const c=a[o];let u;if(o===0&&c!=="8"&&c!=="9"){if(u=parseInt(c,8),u>127)throw new Error(Wn`Octal encoded byte above 177 unsupported "${n}"`)}else u=Zd(c);i.push(Oa(u,(o===0?"\\":"")+c))}return i}function GIe(e){const t=[],n=new RegExp(bC,"gy");let r;for(;r=n.exec(e);){const s=r[0];if(s[0]==="{"){const i=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(s);if(i){const{min:a,max:o}=i.groups;if(+a>+o&&s.endsWith("?")){n.lastIndex--,t.push(e3(s.slice(0,-1)));continue}}}t.push(e3(s))}return t}function O9(e,t){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(e.body.length!==1)return!1;const n=e.body[0];return!t||Object.keys(t).every(r=>t[r]===n[r])}function KIe(e){return WIe.has(e.type)}const WIe=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function L9(e,t={}){const n={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=vIe(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),s=(f,h)=>{const m=r.tokens[i.nextIndex];switch(i.parent=f,i.nextIndex++,m.type){case"Alternator":return Su();case"Assertion":return JIe(m);case"Backreference":return YIe(m,i);case"Character":return Z1(m.value,{useLastValid:!!h.isCheckingRangeEnd});case"CharacterClassHyphen":return QIe(m,i,h);case"CharacterClassOpen":return XIe(m,i,h);case"CharacterSet":return ZIe(m,i);case"Directive":return iAe(m.kind,{flags:m.flags});case"GroupOpen":return eAe(m,i,h);case"NamedCallout":return oAe(m.kind,m.tag,m.arguments);case"Quantifier":return tAe(m,i);case"Subroutine":return nAe(m,i);default:throw new Error(`Unexpected token type "${m.type}"`)}},i={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:r.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:s},a=uAe(aAe(r.flags));let o=a.body[0];for(;i.nextIndex<r.tokens.length;){const f=s(o,{});f.type==="Alternative"?(a.body.push(f),o=f):o.body.push(f)}const{capturingGroups:c,hasNumberedRef:u,namedGroupsByName:l,subroutines:d}=i;if(u&&l.size&&!n.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:f}of d)if(typeof f=="number"){if(f>c.length)throw new Error("Subroutine uses a group number that's not defined");f&&(c[f-1].isSubroutined=!0)}else if(l.has(f)){if(l.get(f).length>1)throw new Error(Wn`Subroutine uses a duplicate group name "\g<${f}>"`);l.get(f)[0].isSubroutined=!0}else throw new Error(Wn`Subroutine uses a group name that's not defined "\g<${f}>"`);return a}function JIe({kind:e}){return Mv(ef({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===Wn`\B`||e===Wn`\Y`})}function YIe({raw:e},t){const n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),s=(i,a=!1)=>{const o=t.capturingGroups.length;let c=!1;if(i>o)if(t.skipBackrefValidation)c=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,jv(a?o+1-i:i,{orphan:c})};if(n){const i=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(i)return s(+i.groups.num,!!i.groups.sign);if(/[-+]/.test(r))throw new Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(r))throw new Error(`Group name not defined to the left "${e}"`);return jv(r)}return s(+r)}function QIe(e,t,n){const{tokens:r,walk:s}=t,i=t.parent,a=i.body.at(-1),o=r[t.nextIndex];if(!n.isCheckingRangeEnd&&a&&a.type!=="CharacterClass"&&a.type!=="CharacterClassRange"&&o&&o.type!=="CharacterClassOpen"&&o.type!=="CharacterClassClose"&&o.type!=="CharacterClassIntersector"){const c=s(i,{...n,isCheckingRangeEnd:!0});if(a.type==="Character"&&c.type==="Character")return i.body.pop(),sAe(a,c);throw new Error("Invalid character class range")}return Z1(Zd("-"))}function XIe({negate:e},t,n){const{tokens:r,walk:s}=t,i=r[t.nextIndex],a=[Q0()];let o=s3(i);for(;o.type!=="CharacterClassClose";){if(o.type==="CharacterClassIntersector")a.push(Q0()),t.nextIndex++;else{const u=a.at(-1);u.body.push(s(u,n))}o=s3(r[t.nextIndex],i)}const c=Q0({negate:e});return a.length===1?c.body=a[0].body:(c.kind="intersection",c.body=a.map(u=>u.body.length===1?u.body[0]:u)),t.nextIndex++,c}function ZIe({kind:e,negate:t,value:n},r){const{normalizeUnknownPropertyNames:s,skipPropertyNameValidation:i,unicodePropertyMap:a}=r;if(e==="property"){const o=ek(n);if(gC.has(o)&&!a?.has(o))e="posix",n=o;else return kl(n,{negate:t,normalizeUnknownPropertyNames:s,skipPropertyNameValidation:i,unicodePropertyMap:a})}return e==="posix"?cAe(n,{negate:t}):Fv(e,{negate:t})}function eAe(e,t,n){const{tokens:r,capturingGroups:s,namedGroupsByName:i,skipLookbehindValidation:a,walk:o}=t,c=lAe(e),u=c.type==="AbsenceFunction",l=r3(c),d=l&&c.negate;if(c.type==="CapturingGroup"&&(s.push(c),c.name&&SIe(i,c.name,[]).push(c)),u&&n.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let f=i3(r[t.nextIndex]);for(;f.type!=="GroupClose";){if(f.type==="Alternator")c.body.push(Su()),t.nextIndex++;else{const h=c.body.at(-1),m=o(h,{...n,isInAbsenceFunction:n.isInAbsenceFunction||u,isInLookbehind:n.isInLookbehind||l,isInNegLookbehind:n.isInNegLookbehind||d});if(h.body.push(m),(l||n.isInLookbehind)&&!a){const y="Lookbehind includes a pattern not allowed by Oniguruma";if(d||n.isInNegLookbehind){if(n3(m)||m.type==="CapturingGroup")throw new Error(y)}else if(n3(m)||r3(m)&&m.negate)throw new Error(y)}}f=i3(r[t.nextIndex])}return t.nextIndex++,c}function tAe({kind:e,min:t,max:n},r){const s=r.parent,i=s.body.at(-1);if(!i||!KIe(i))throw new Error("Quantifier requires a repeatable token");const a=$9(e,t,n,i);return s.body.pop(),a}function nAe({raw:e},t){const{capturingGroups:n,subroutines:r}=t;let s=e.slice(3,-1);const i=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(s);if(i){const o=+i.groups.num,c=n.length;if(t.hasNumberedRef=!0,s={"":o,"+":c+o,"-":c+1-o}[i.groups.sign],s<1)throw new Error("Invalid subroutine number")}else s==="0"&&(s=0);const a=M9(s);return r.push(a),a}function rAe(e,t){return{type:"AbsenceFunction",kind:e,body:Cp(t?.body)}}function Su(e){return{type:"Alternative",body:j9(e?.body)}}function Mv(e,t){const n={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(n.negate=!!t?.negate),n}function jv(e,t){const n=!!t?.orphan;return{type:"Backreference",ref:e,...n&&{orphan:n}}}function D9(e,t){const n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!dAe(n.name))throw new Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:Cp(t?.body)}}function Z1(e,t){const n={useLastValid:!1,...t};if(e>1114111){const r=e.toString(16);if(n.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${r}}"`):new Error(`Invalid code point out of range in JS "\\x{${r}}"`)}return{type:"Character",value:e}}function Q0(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:j9(e?.body)}}function sAe(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function Fv(e,t){const n=!!t?.negate,r={type:"CharacterSet",kind:e};return(e==="digit"||e==="hex"||e==="newline"||e==="space"||e==="word")&&(r.negate=n),(e==="text_segment"||e==="newline"&&!n)&&(r.variableLength=!0),r}function iAe(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:ef(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function aAe(e){return{type:"Flags",...e}}function ii(e){const t=e?.atomic,n=e?.flags;if(t&&n)throw new Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...n&&{flags:n},body:Cp(e?.body)}}function Cc(e){const t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:Cp(e?.body)}}function oAe(e,t,n){return{type:"NamedCallout",kind:e,tag:t,arguments:n}}function cAe(e,t){const n=!!t?.negate;if(!gC.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:n}}function $9(e,t,n,r){if(t>n)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:n,body:r}}function uAe(e,t){return{type:"Regex",body:Cp(t?.body),flags:e}}function M9(e){return{type:"Subroutine",ref:e}}function kl(e,t){const n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t};let r=n.unicodePropertyMap?.get(ek(e));if(!r){if(n.normalizeUnknownPropertyNames)r=fAe(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw new Error(Wn`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:r??e,negate:n.negate}}function lAe({flags:e,kind:t,name:n,negate:r,number:s}){switch(t){case"absence_repeater":return rAe("repeater");case"atomic":return ii({atomic:!0});case"capturing":return D9(s,{name:n});case"group":return ii({flags:e});case"lookahead":case"lookbehind":return Cc({behind:t==="lookbehind",negate:r});default:throw new Error(`Unexpected group kind "${t}"`)}}function Cp(e){if(e===void 0)e=[Su()];else if(!Array.isArray(e)||!e.length||!e.every(t=>t.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return e}function j9(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(t=>!!t.type))throw new Error("Invalid body; expected array of nodes");return e}function n3(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function r3(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function dAe(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function fAe(e){return e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function ek(e){return e.replace(/[- _]+/g,"").toLowerCase()}function s3(e,t){return ef(e,`${t?.type==="Character"&&t.value===93?"Empty":"Unclosed"} character class`)}function i3(e){return ef(e,"Unclosed group")}function Ph(e,t,n=null){function r(i,a){for(let o=0;o<i.length;o++){const c=s(i[o],a,o,i);o=Math.max(-1,o+c)}}function s(i,a=null,o=null,c=null){let u=0,l=!1;const d={node:i,parent:a,key:o,container:c,root:e,remove(){n0(c).splice(Math.max(0,al(o)+u),1),u--,l=!0},removeAllNextSiblings(){return n0(c).splice(al(o)+1)},removeAllPrevSiblings(){const p=al(o)+u;return u-=p,n0(c).splice(0,Math.max(0,p))},replaceWith(p,_={}){const k=!!_.traverse;c?c[Math.max(0,al(o)+u)]=p:ef(a,"Can't replace root node")[o]=p,k&&s(p,a,o,c),l=!0},replaceWithMultiple(p,_={}){const k=!!_.traverse;if(n0(c).splice(Math.max(0,al(o)+u),1,...p),u+=p.length-1,k){let v=0;for(let w=0;w<p.length;w++)v+=s(p[w],a,al(o)+w+v,c)}l=!0},skip(){l=!0}},{type:f}=i,h=t["*"],m=t[f],y=typeof h=="function"?h:h?.enter,g=typeof m=="function"?m:m?.enter;if(y?.(d,n),g?.(d,n),!l)switch(f){case"AbsenceFunction":case"CapturingGroup":case"Group":r(i.body,i);break;case"Alternative":case"CharacterClass":r(i.body,i);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":s(i.min,i,"min"),s(i.max,i,"max");break;case"LookaroundAssertion":r(i.body,i);break;case"Quantifier":s(i.body,i,"body");break;case"Regex":r(i.body,i),s(i.flags,i,"flags");break;default:throw new Error(`Unexpected node type "${f}"`)}return m?.exit?.(d,n),h?.exit?.(d,n),u}return s(e),e}function n0(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function al(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const hAe=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function mAe(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function pAe(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}const js=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function yC(e,t,n,r){const s=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),i=[!1];let a=0,o="";for(const c of e.matchAll(s)){const{0:u,groups:{$skip:l}}=c;if(!l&&(!r||r===js.DEFAULT==!a)){n instanceof Function?o+=n(c,{context:a?js.CHAR_CLASS:js.DEFAULT,negated:i[i.length-1]}):o+=n;continue}u[0]==="["?(a++,i.push(u[1]==="^")):u==="]"&&a&&(a--,i.pop()),o+=u}return o}function F9(e,t,n,r){yC(e,t,n,r)}function gAe(e,t,n=0,r){if(!new RegExp(t,"su").test(e))return null;const s=new RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");s.lastIndex=n;let i=0,a;for(;a=s.exec(e);){const{0:o,groups:{$skip:c}}=a;if(!c&&(!r||r===js.DEFAULT==!i))return a;o==="["?i++:o==="]"&&i&&i--,s.lastIndex==a.index&&s.lastIndex++}return null}function r0(e,t,n){return!!gAe(e,t,0,n)}function bAe(e,t){const n=/\\?./gsu;n.lastIndex=t;let r=e.length,s=0,i=1,a;for(;a=n.exec(e);){const[o]=a;if(o==="[")s++;else if(s)o==="]"&&s--;else if(o==="(")i++;else if(o===")"&&(i--,!i)){r=a.index;break}}return e.slice(t,r)}const a3=new RegExp(String.raw`(?<noncapturingStart>${hAe})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function yAe(e,t){const n=t?.hiddenCaptures??[];let r=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:r,hiddenCaptures:n};const s="(?>",i="(?:(?=(",a=[0],o=[];let c=0,u=0,l=NaN,d;do{d=!1;let f=0,h=0,m=!1,y;for(a3.lastIndex=Number.isNaN(l)?0:l+i.length;y=a3.exec(e);){const{0:g,index:p,groups:{capturingStart:_,noncapturingStart:k}}=y;if(g==="[")f++;else if(f)g==="]"&&f--;else if(g===s&&!m)l=p,m=!0;else if(m&&k)h++;else if(_)m?h++:(c++,a.push(c+u));else if(g===")"&&m){if(!h){u++;const v=c+u;if(e=`${e.slice(0,l)}${i}${e.slice(l+s.length,p)}))<$$${v}>)${e.slice(p+1)}`,d=!0,o.push(v),mAe(n,v),r.size){const w=new Map;r.forEach((S,T)=>{w.set(T>=v?T+1:T,S.map(I=>I>=v?I+1:I))}),r=w}break}h--}}}while(d);return n.push(...o),e=yC(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:f,groups:{backrefNum:h,wrappedBackrefNum:m}})=>{if(h){const y=+h;if(y>a.length-1)throw new Error(`Backref "${f}" greater than number of captures`);return`\\${a[y]}`}return`\\${m}`},js.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}const B9=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,KE=new RegExp(String.raw`
151
- \\(?: \d+
152
- | c[A-Za-z]
153
- | [gk]<[^>]+>
154
- | [pPu]\{[^\}]+\}
155
- | u[A-Fa-f\d]{4}
156
- | x[A-Fa-f\d]{2}
157
- )
158
- | \((?: \? (?: [:=!>]
159
- | <(?:[=!]|[^>]+>)
160
- | [A-Za-z\-]+:
161
- | \(DEFINE\)
162
- ))?
163
- | (?<qBase>${B9})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
164
- | \\?.
165
- `.replace(/\s+/g,""),"gsu");function _Ae(e){if(!new RegExp(`${B9}\\+`).test(e))return{pattern:e};const t=[];let n=null,r=null,s="",i=0,a;for(KE.lastIndex=0;a=KE.exec(e);){const{0:o,index:c,groups:{qBase:u,qMod:l,invalidQ:d}}=a;if(o==="[")i||(r=c),i++;else if(o==="]")i?i--:r=null;else if(!i)if(l==="+"&&s&&!s.startsWith("(")){if(d)throw new Error(`Invalid quantifier "${o}"`);let f=-1;if(/^\{\d+\}$/.test(u))e=pAe(e,c+u.length,l,"");else{if(s===")"||s==="]"){const h=s===")"?n:r;if(h===null)throw new Error(`Invalid unmatched "${s}"`);e=`${e.slice(0,h)}(?>${e.slice(h,c)}${u})${e.slice(c+o.length)}`}else e=`${e.slice(0,c-s.length)}(?>${s}${u})${e.slice(c+o.length)}`;f+=4}KE.lastIndex+=f}else o[0]==="("?t.push(c):o===")"&&(n=t.length?t.pop():null);s=o}return{pattern:e}}const Ds=String.raw,kAe=Ds`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,Bv=Ds`\(\?R=(?<rDepth>[^\)]+)\)|${kAe}`,tk=Ds`\(\?<(?![=!])(?<captureName>[^>]+)>`,z9=Ds`${tk}|(?<unnamed>\()(?!\?)`,yc=new RegExp(Ds`${tk}|${Bv}|\(\?|\\?.`,"gsu"),WE="Cannot use multiple overlapping recursions";function EAe(e,t){const{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:"plugin",...t};let s=t?.captureTransfers??new Map;if(!new RegExp(Bv,"su").test(e))return{pattern:e,captureTransfers:s,hiddenCaptures:n};if(r==="plugin"&&r0(e,Ds`\(\?\(DEFINE\)`,js.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const i=[],a=r0(e,Ds`\\[1-9]`,js.DEFAULT),o=new Map,c=[];let u=!1,l=0,d=0,f;for(yc.lastIndex=0;f=yc.exec(e);){const{0:h,groups:{captureName:m,rDepth:y,gRNameOrNum:g,gRDepth:p}}=f;if(h==="[")l++;else if(l)h==="]"&&l--;else if(y){if(o3(y),u)throw new Error(WE);if(a)throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const _=e.slice(0,f.index),k=e.slice(yc.lastIndex);if(r0(k,Bv,js.DEFAULT))throw new Error(WE);const v=+y-1;e=c3(_,k,v,!1,n,i,d),s=l3(s,_,v,i.length,0,d);break}else if(g){o3(p);let _=!1;for(const V of c)if(V.name===g||V.num===+g){if(_=!0,V.hasRecursedWithin)throw new Error(WE);break}if(!_)throw new Error(Ds`Recursive \g cannot be used outside the referenced group "${r==="external"?g:Ds`\g<${g}&R=${p}>`}"`);const k=o.get(g),v=bAe(e,k);if(a&&r0(v,Ds`${tk}|\((?!\?)`,js.DEFAULT))throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const w=e.slice(k,f.index),S=v.slice(w.length+h.length),T=i.length,I=+p-1,$=c3(w,S,I,!0,n,i,d);s=l3(s,w,I,i.length-T,T,d);const R=e.slice(0,k),z=e.slice(k+v.length);e=`${R}${$}${z}`,yc.lastIndex+=$.length-h.length-w.length-S.length,c.forEach(V=>V.hasRecursedWithin=!0),u=!0}else if(m)d++,o.set(String(d),yc.lastIndex),o.set(m,yc.lastIndex),c.push({num:d,name:m});else if(h[0]==="("){const _=h==="(";_&&(d++,o.set(String(d),yc.lastIndex)),c.push(_?{num:d}:{})}else h===")"&&c.pop()}return n.push(...i),{pattern:e,captureTransfers:s,hiddenCaptures:n}}function o3(e){const t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e))throw new Error(t);if(e=+e,e<2||e>100)throw new Error(t)}function c3(e,t,n,r,s,i,a){const o=new Set;r&&F9(e+t,tk,({groups:{captureName:u}})=>{o.add(u)},js.DEFAULT);const c=[n,r?o:null,s,i,a];return`${e}${u3(`(?:${e}`,"forward",...c)}(?:)${u3(`${t})`,"backward",...c)}${t}`}function u3(e,t,n,r,s,i,a){const c=l=>t==="forward"?l+2:n-l+2-1;let u="";for(let l=0;l<n;l++){const d=c(l);u+=yC(e,Ds`${z9}|\\k<(?<backref>[^>]+)>`,({0:f,groups:{captureName:h,unnamed:m,backref:y}})=>{if(y&&r&&!r.has(y))return f;const g=`_$${d}`;if(m||h){const p=a+i.length+1;return i.push(p),wAe(s,p),m?f:`(?<${h}${g}>`}return Ds`\k<${y}${g}>`},js.DEFAULT)}return u}function wAe(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function l3(e,t,n,r,s,i){if(e.size&&r){let a=0;F9(t,z9,()=>a++,js.DEFAULT);const o=i-a+s,c=new Map;return e.forEach((u,l)=>{const d=(r-a*n)/n,f=a*n,h=l>o+a?l+r:l,m=[];for(const y of u)if(y<=o)m.push(y);else if(y>o+a+d)m.push(y+r);else if(y<=o+a)for(let g=0;g<=n;g++)m.push(y+a*g);else for(let g=0;g<=n;g++)m.push(y+f+d*g);c.set(h,m)}),c}return e}var On=String.fromCodePoint,Ge=String.raw,Ma={flagGroups:(()=>{try{new RegExp("(?i:)")}catch{return!1}return!0})(),unicodeSets:(()=>{try{new RegExp("[[]]","v")}catch{return!1}return!0})()};Ma.bugFlagVLiteralHyphenIsRange=Ma.unicodeSets?(()=>{try{new RegExp(Ge`[\d\-a]`,"v")}catch{return!0}return!1})():!1;Ma.bugNestedClassIgnoresNegation=Ma.unicodeSets&&new RegExp("[[^a]]","v").test("a");function $y(e,{enable:t,disable:n}){return{dotAll:!n?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!n?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function Im(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function zv(e,t){return d3[e]>=d3[t]}function SAe(e,t){if(e==null)throw new Error(t??"Value expected");return e}var d3={ES2025:2025,ES2024:2024,ES2018:2018},vAe={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function U9(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!vAe[e.target])throw new Error(`Unexpected target "${e.target}"`);const t={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target==="auto"&&(t.target=Ma.flagGroups?"ES2025":Ma.unicodeSets?"ES2024":"ES2018"),t}var xAe="[ -\r ]",TAe=new Set([On(304),On(305)]),ba=Ge`[\p{L}\p{M}\p{N}\p{Pc}]`;function V9(e){if(TAe.has(e))return[e];const t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),s=CAe.get(n),i=IAe.get(n),a=AAe.get(n);return[...r].length===1&&t.add(r),a&&t.add(a),s&&t.add(s),t.add(n),i&&t.add(i),[...t]}var _C=new Map(`C Other
166
- Cc Control cntrl
167
- Cf Format
168
- Cn Unassigned
169
- Co Private_Use
170
- Cs Surrogate
171
- L Letter
172
- LC Cased_Letter
173
- Ll Lowercase_Letter
174
- Lm Modifier_Letter
175
- Lo Other_Letter
176
- Lt Titlecase_Letter
177
- Lu Uppercase_Letter
178
- M Mark Combining_Mark
179
- Mc Spacing_Mark
180
- Me Enclosing_Mark
181
- Mn Nonspacing_Mark
182
- N Number
183
- Nd Decimal_Number digit
184
- Nl Letter_Number
185
- No Other_Number
186
- P Punctuation punct
187
- Pc Connector_Punctuation
188
- Pd Dash_Punctuation
189
- Pe Close_Punctuation
190
- Pf Final_Punctuation
191
- Pi Initial_Punctuation
192
- Po Other_Punctuation
193
- Ps Open_Punctuation
194
- S Symbol
195
- Sc Currency_Symbol
196
- Sk Modifier_Symbol
197
- Sm Math_Symbol
198
- So Other_Symbol
199
- Z Separator
200
- Zl Line_Separator
201
- Zp Paragraph_Separator
202
- Zs Space_Separator
203
- ASCII
204
- ASCII_Hex_Digit AHex
205
- Alphabetic Alpha
206
- Any
207
- Assigned
208
- Bidi_Control Bidi_C
209
- Bidi_Mirrored Bidi_M
210
- Case_Ignorable CI
211
- Cased
212
- Changes_When_Casefolded CWCF
213
- Changes_When_Casemapped CWCM
214
- Changes_When_Lowercased CWL
215
- Changes_When_NFKC_Casefolded CWKCF
216
- Changes_When_Titlecased CWT
217
- Changes_When_Uppercased CWU
218
- Dash
219
- Default_Ignorable_Code_Point DI
220
- Deprecated Dep
221
- Diacritic Dia
222
- Emoji
223
- Emoji_Component EComp
224
- Emoji_Modifier EMod
225
- Emoji_Modifier_Base EBase
226
- Emoji_Presentation EPres
227
- Extended_Pictographic ExtPict
228
- Extender Ext
229
- Grapheme_Base Gr_Base
230
- Grapheme_Extend Gr_Ext
231
- Hex_Digit Hex
232
- IDS_Binary_Operator IDSB
233
- IDS_Trinary_Operator IDST
234
- ID_Continue IDC
235
- ID_Start IDS
236
- Ideographic Ideo
237
- Join_Control Join_C
238
- Logical_Order_Exception LOE
239
- Lowercase Lower
240
- Math
241
- Noncharacter_Code_Point NChar
242
- Pattern_Syntax Pat_Syn
243
- Pattern_White_Space Pat_WS
244
- Quotation_Mark QMark
245
- Radical
246
- Regional_Indicator RI
247
- Sentence_Terminal STerm
248
- Soft_Dotted SD
249
- Terminal_Punctuation Term
250
- Unified_Ideograph UIdeo
251
- Uppercase Upper
252
- Variation_Selector VS
253
- White_Space space
254
- XID_Continue XIDC
255
- XID_Start XIDS`.split(/\s/).map(e=>[ek(e),e])),IAe=new Map([["s",On(383)],[On(383),"s"]]),AAe=new Map([[On(223),On(7838)],[On(107),On(8490)],[On(229),On(8491)],[On(969),On(8486)]]),CAe=new Map([ro(453),ro(456),ro(459),ro(498),...JE(8072,8079),...JE(8088,8095),...JE(8104,8111),ro(8124),ro(8140),ro(8188)]),PAe=new Map([["alnum",Ge`[\p{Alpha}\p{Nd}]`],["alpha",Ge`\p{Alpha}`],["ascii",Ge`\p{ASCII}`],["blank",Ge`[\p{Zs}\t]`],["cntrl",Ge`\p{Cc}`],["digit",Ge`\p{Nd}`],["graph",Ge`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",Ge`\p{Lower}`],["print",Ge`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",Ge`[\p{P}\p{S}]`],["space",Ge`\p{space}`],["upper",Ge`\p{Upper}`],["word",Ge`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",Ge`\p{AHex}`]]);function NAe(e,t){const n=[];for(let r=e;r<=t;r++)n.push(r);return n}function ro(e){const t=On(e);return[t.toLowerCase(),t]}function JE(e,t){return NAe(e,t).map(n=>ro(n))}var H9=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function RAe(e,t){const n={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};q9(e);const r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:zv(n.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};Ph(e,OAe,r);const s={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},i={currentFlags:s,prevFlags:null,globalFlags:s,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};Ph(e,LAe,i);const a={groupsByName:i.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:i.reffedNodesByReferencer};return Ph(e,DAe,a),e._originMap=i.groupOriginByCopy,e._strategy=r.strategy,e}var OAe={AbsenceFunction({node:e,parent:t,replaceWith:n}){const{body:r,kind:s}=e;if(s==="repeater"){const i=ii();i.body[0].body.push(Cc({negate:!0,body:r}),kl("Any"));const a=ii();a.body[0].body.push($9("greedy",0,1/0,i)),n(un(a,t),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){const s=e.body.filter(i=>i.kind==="flags");for(let i=n+1;i<t.body.length;i++){const a=t.body[i];Im(r,a,[]).push(...s)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){const n=K9(t.get(e));if(n){const r=ii({flags:n});r.body[0].body=e.body,e.body=[un(r,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:s,remove:i,replaceWith:a},o){const{kind:c,negate:u}=e,{asciiWordBoundaries:l,avoidSubclass:d,supportedGNodes:f,wordIsAscii:h}=o;if(c==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${u?"Y":"y"}"`);if(c==="line_end")a(un(Cc({body:[Su({body:[Mv("string_end")]}),Su({body:[Z1(10)]})]}),t));else if(c==="line_start")a(un(ya(Ge`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(c==="search_start")if(f.has(e))s.flags.sticky=!0,i();else{const m=r[n-1];if(m&&zAe(m))a(un(Cc({negate:!0}),t));else{if(d)throw new Error(Ge`Uses "\G" in a way that requires a subclass`);a(so(Mv("string_start"),t)),o.strategy="clip_search"}}else if(!(c==="string_end"||c==="string_start"))if(c==="string_end_newline")a(un(ya(Ge`(?=\n?\z)`),t));else if(c==="word_boundary"){if(!h&&!l){const m=`(?:(?<=${ba})(?!${ba})|(?<!${ba})(?=${ba}))`,y=`(?:(?<=${ba})(?=${ba})|(?<!${ba})(?!${ba}))`;a(un(ya(u?y:m),t))}}else throw new Error(`Unexpected assertion kind "${c}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!QE(n)&&(n=YE(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!QE(r)&&(r=YE(r,t),e.name=r),n.set(e.number,e),r&&n.set(r,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){if(t.kind==="intersection"){const r=Q0({body:[e]});n(un(r,t),{traverse:!0})}},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:s,digitIsAscii:i,spaceIsAscii:a,wordIsAscii:o}){const{kind:c,negate:u,value:l}=e;if(i&&(c==="digit"||l==="digit")){n(so(Fv("digit",{negate:u}),t));return}if(a&&(c==="space"||l==="space")){n(un(XE(ya(xAe),u),t));return}if(o&&(c==="word"||l==="word")){n(so(Fv("word",{negate:u}),t));return}if(c==="any")n(so(kl("Any"),t));else if(c==="digit")n(so(kl("Nd",{negate:u}),t));else if(c!=="dot")if(c==="text_segment"){if(r==="strict")throw new Error(Ge`Use of "\X" requires non-strict accuracy`);const d="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",f=Ge`\p{RI}{2}|${d}(?:\u200D${d})*`;n(un(ya(Ge`(?>\r\n|${s?Ge`\p{RGI_Emoji}`:f}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(c==="hex")n(so(kl("AHex",{negate:u}),t));else if(c==="newline")n(un(ya(u?`[^
256
- ]`:`(?>\r
257
- ?|[
258
- \v\f…\u2028\u2029])`),t));else if(c==="posix")if(!s&&(l==="graph"||l==="print")){if(r==="strict")throw new Error(`POSIX class "${l}" requires min target ES2024 or non-strict accuracy`);let d={graph:"!-~",print:" -~"}[l];u&&(d=`\0-${On(d.codePointAt(0)-1)}${On(d.codePointAt(2)+1)}-􏿿`),n(un(ya(`[${d}]`),t))}else n(un(XE(ya(PAe.get(l)),u),t));else if(c==="property")_C.has(ek(l))||(e.key="sc");else if(c==="space")n(so(kl("space",{negate:u}),t));else if(c==="word")n(un(XE(ya(ba),u),t));else throw new Error(`Unexpected character set kind "${c}"`)},Directive({node:e,parent:t,root:n,remove:r,replaceWith:s,removeAllPrevSiblings:i,removeAllNextSiblings:a}){const{kind:o,flags:c}=e;if(o==="flags")if(!c.enable&&!c.disable)r();else{const u=ii({flags:c});u.body[0].body=a(),s(un(u,t),{traverse:!0})}else if(o==="keep"){const u=n.body[0],d=n.body.length===1&&O9(u,{type:"Group"})&&u.body[0].body.length===1?u.body[0]:n;if(t.parent!==d||d.body.length>1)throw new Error(Ge`Uses "\K" in a way that's unsupported`);const f=Cc({behind:!0});f.body[0].body=i(),s(un(f,t))}else throw new Error(`Unexpected directive kind "${o}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw new Error('Unsupported flag "P"');if(e.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(n=>delete e[n]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;const{enable:t,disable:n}=e.flags;t?.extended&&delete t.extended,n?.extended&&delete n.extended,t?.dotAll&&n?.dotAll&&delete t.dotAll,t?.ignoreCase&&n?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){const{kind:n}=e;n==="lookbehind"&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){const{kind:r}=e;if(r==="fail")n(un(Cc({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=ii();t.body[0].body.push(e.body),e.body=un(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){const n=[];let r=!1,s=!1;for(const i of e.body)if(i.body.length===1&&i.body[0].kind==="search_start")i.body.pop();else{const a=J9(i.body);a?(r=!0,Array.isArray(a)?n.push(...a):n.push(a)):s=!0}r&&!s&&n.forEach(i=>t.add(i))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t==="strict"&&n&&r)throw new Error(Ge`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!QE(n)&&(n=YE(n,t),e.ref=n)}},LAe={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){const{orphan:r,ref:s}=e;r||n.set(e,[...t.get(s).map(({node:i})=>i)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:s,groupsByName:i,multiplexCapturesToLeftByRef:a,openRefs:o,reffedNodesByReferencer:c}){const u=s.get(e);if(u&&o.has(e.number)){const d=so(f3(e.number),t);c.set(d,o.get(e.number)),n(d);return}o.set(e.number,e),a.set(e.number,[]),e.name&&Im(a,e.name,[]);const l=a.get(e.name??e.number);for(let d=0;d<l.length;d++){const f=l[d];if(u===f.node||u&&u===f.origin||e===f.origin){l.splice(d,1);break}}if(a.get(e.number).push({node:e,origin:u}),e.name&&a.get(e.name).push({node:e,origin:u}),e.name){const d=Im(i,e.name,new Map);let f=!1;if(u)f=!0;else for(const h of d.values())if(!h.hasDuplicateNameToRemove){f=!0;break}i.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:f})}},exit({node:e},{openRefs:t}){t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=$y(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){const{isRecursive:s,ref:i}=e;if(s){let l=t;for(;(l=l.parent)&&!(l.type==="CapturingGroup"&&(l.name===i||l.number===i)););r.reffedNodesByReferencer.set(e,l);return}const a=r.subroutineRefMap.get(i),o=i===0,c=o?f3(0):G9(a,r.groupOriginByCopy,null);let u=c;if(!o){const l=K9(jAe(a,f=>f.type==="Group"&&!!f.flags)),d=l?$y(r.globalFlags,l):r.globalFlags;$Ae(d,r.currentFlags)||(u=ii({flags:FAe(d)}),u.body[0].body.push(c))}n(un(u,t),{traverse:!o})}},DAe={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}const i=r.reffedNodesByReferencer.get(e).filter(a=>MAe(a,e));if(!i.length)n(un(Cc({negate:!0}),t));else if(i.length>1){const a=ii({atomic:!0,body:i.reverse().map(o=>Su({body:[jv(o.number)]}))});n(un(a,t))}else e.ref=i[0].number},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){const n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let r=0;r<n;r++){const s=D9();e.body.at(-1).body.push(s)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function q9(e){Ph(e,{"*"({node:t,parent:n}){t.parent=n}})}function $Ae(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function MAe(e,t){let n=t;do{if(n.type==="Regex")return!1;if(n.type==="Alternative")continue;if(n===e)return!1;const r=W9(n.parent);for(const s of r){if(s===n)break;if(s===e||Y9(s,e))return!0}}while(n=n.parent);throw new Error("Unexpected path")}function G9(e,t,n,r){const s=Array.isArray(e)?[]:{};for(const[i,a]of Object.entries(e))i==="parent"?s.parent=Array.isArray(n)?r:n:a&&typeof a=="object"?s[i]=G9(a,t,s,n):(i==="type"&&a==="CapturingGroup"&&t.set(s,t.get(e)??e),s[i]=a);return s}function f3(e){const t=M9(e);return t.isRecursive=!0,t}function jAe(e,t){const n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function YE(e,t){if(t.has(e))return t.get(e);const n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,n),n}function K9(e){const t=["dotAll","ignoreCase"],n={enable:{},disable:{}};return e.forEach(({flags:r})=>{t.forEach(s=>{r.enable?.[s]&&(delete n.disable[s],n.enable[s]=!0),r.disable?.[s]&&(n.disable[s]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function FAe({dotAll:e,ignoreCase:t}){const n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function W9(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function J9(e){const t=e.find(n=>n.kind==="search_start"||UAe(n,{negate:!1})||!BAe(n));if(!t)return null;if(t.kind==="search_start")return t;if(t.type==="LookaroundAssertion")return t.body[0].body[0];if(t.type==="CapturingGroup"||t.type==="Group"){const n=[];for(const r of t.body){const s=J9(r.body);if(!s)return null;Array.isArray(s)?n.push(...s):n.push(s)}return n}return null}function Y9(e,t){const n=W9(e)??[];for(const r of n)if(r===t||Y9(r,t))return!0;return!1}function BAe({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function zAe(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function UAe(e,t){const n={negate:null,...t};return e.type==="LookaroundAssertion"&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&O9(e.body[0],{type:"Assertion",kind:"search_start"})}function QE(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function ya(e,t){const r=L9(e,{...t,unicodePropertyMap:_C}).body;return r.length>1||r[0].body.length>1?ii({body:r}):r[0].body[0]}function XE(e,t){return e.negate=t,e}function so(e,t){return e.parent=t,e}function un(e,t){return q9(e),e.parent=t,e}function VAe(e,t){const n=U9(t),r=zv(n.target,"ES2024"),s=zv(n.target,"ES2025"),i=n.rules.recursionLimit;if(!Number.isInteger(i)||i<2||i>20)throw new Error("Invalid recursionLimit; use 2-20");let a=null,o=null;if(!s){const h=[e.flags.ignoreCase];Ph(e,HAe,{getCurrentModI:()=>h.at(-1),popModI(){h.pop()},pushModI(m){h.push(m)},setHasCasedChar(){h.at(-1)?a=!0:o=!0}})}const c={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||a)&&!o)};let u=e;const l={accuracy:n.accuracy,appliedGlobalFlags:c,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:u,originMap:e._originMap,recursionLimit:i,useAppliedIgnoreCase:!!(!s&&a&&o),useFlagMods:s,useFlagV:r,verbose:n.verbose};function d(h){return l.lastNode=u,u=h,SAe(qAe[h.type],`Unexpected node type "${h.type}"`)(h,l,d)}const f={pattern:e.body.map(d).join("|"),flags:d(e.flags),options:{...e.options}};return r||(delete f.options.force.v,f.options.disable.v=!0,f.options.unicodeSetsPlugin=null),f._captureTransfers=new Map,f._hiddenCaptures=[],l.captureMap.forEach((h,m)=>{h.hidden&&f._hiddenCaptures.push(m),h.transferTo&&Im(f._captureTransfers,h.transferTo,[]).push(m)}),f}var HAe={"*":{enter({node:e},t){if(m3(e)){const n=t.getCurrentModI();t.pushModI(e.flags?$y({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){m3(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){kC(On(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),Q9(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&H9.has(e.value)&&t.setHasCasedChar()}},qAe={Alternative({body:e},t,n){return e.map(n).join("")},Assertion({kind:e,negate:t}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return t?Ge`\B`:Ge`\b`;throw new Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&t.accuracy==="strict"&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,n){const{body:r,name:s,number:i}=e,a={ignoreCase:t.currentFlags.ignoreCase},o=t.originMap.get(e);return o&&(a.hidden=!0,i>o.number&&(a.transferTo=o.number)),t.captureMap.set(i,a),`(${s?`?<${s}>`:""}${r.map(n).join("|")})`},Character({value:e},t){const n=On(e),r=ol(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&kC(n)){const s=V9(n);return t.inCharClass?s.join(""):s.length>1?`[${s.join("")}]`:s[0]}return n},CharacterClass(e,t,n){const{kind:r,negate:s,parent:i}=e;let{body:a}=e;if(r==="intersection"&&!t.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");Ma.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&a.some(p3)&&(a=[Z1(45),...a.filter(u=>!p3(u))]);const o=()=>`[${s?"^":""}${a.map(n).join(r==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||Ma.bugNestedClassIgnoresNegation)&&!s){const l=a.filter(d=>d.type==="CharacterClass"&&d.kind==="union"&&d.negate);if(l.length){const d=ii(),f=d.body[0];return d.parent=i,f.parent=d,a=a.filter(h=>!l.includes(h)),e.body=a,a.length?(e.parent=f,f.body.push(e)):d.body.pop(),l.forEach(h=>{const m=Su({body:[h]});h.parent=m,m.parent=d,d.body.push(m)}),n(d)}}t.inCharClass=!0;const u=o();return t.inCharClass=!1,u}const c=a[0];if(r==="union"&&!s&&c&&((!t.useFlagV||!t.verbose)&&i.kind==="union"&&!(Ma.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&i.kind==="intersection"&&a.length===1&&c.type!=="CharacterClassRange"))return a.map(n).join("");if(!t.useFlagV&&i.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return o()},CharacterClassRange(e,t){const n=e.min.value,r=e.max.value,s={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},i=ol(n,s),a=ol(r,s),o=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const c=Q9(e);YAe(c).forEach(l=>{o.add(Array.isArray(l)?`${ol(l[0],s)}-${ol(l[1],s)}`:ol(l,s))})}return`${i}-${a}${[...o].join("")}`},CharacterSet({kind:e,negate:t,value:n,key:r},s){if(e==="dot")return s.currentFlags.dotAll?s.appliedGlobalFlags.dotAll||s.useFlagMods?".":"[^]":Ge`[^\n]`;if(e==="digit")return t?Ge`\D`:Ge`\d`;if(e==="property"){if(s.useAppliedIgnoreCase&&s.currentFlags.ignoreCase&&H9.has(n))throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?Ge`\P`:Ge`\p`}{${r?`${r}=`:""}${n}}`}if(e==="word")return t?Ge`\W`:Ge`\w`;throw new Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")},Group({atomic:e,body:t,flags:n,parent:r},s,i){const a=s.currentFlags;n&&(s.currentFlags=$y(a,n));const o=t.map(i).join("|"),c=!s.verbose&&t.length===1&&r.type!=="Quantifier"&&!e&&(!s.useFlagMods||!n)?o:`(?${QAe(e,n,s.useFlagMods)}${o})`;return s.currentFlags=a,c},LookaroundAssertion({body:e,kind:t,negate:n},r,s){return`(?${`${t==="lookahead"?"":"<"}${n?"!":"="}`}${e.map(s).join("|")})`},Quantifier(e,t,n){return n(e.body)+XAe(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const r=n.recursionLimit;return t===0?`(?R=${r})`:Ge`\g<${t}&R=${r}>`}},GAe=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),KAe=new Set(["-","\\","]","^","["]),WAe=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),h3=new Map([[9,Ge`\t`],[10,Ge`\n`],[11,Ge`\v`],[12,Ge`\f`],[13,Ge`\r`],[8232,Ge`\u2028`],[8233,Ge`\u2029`],[65279,Ge`\uFEFF`]]),JAe=new RegExp("^\\p{Cased}$","u");function kC(e){return JAe.test(e)}function Q9(e,t){const n=!!t?.firstOnly,r=e.min.value,s=e.max.value,i=[];if(r<65&&(s===65535||s>=131071)||r===65536&&s>=131071)return i;for(let a=r;a<=s;a++){const o=On(a);if(!kC(o))continue;const c=V9(o).filter(u=>{const l=u.codePointAt(0);return l<r||l>s});if(c.length&&(i.push(...c),n))break}return i}function ol(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(h3.has(e))return h3.get(e);if(e<32||e>126&&e<160||e>262143||t&&ZAe(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const s=n?r?WAe:KAe:GAe,i=On(e);return(s.has(i)?"\\":"")+i}function YAe(e){const t=e.map(s=>s.codePointAt(0)).sort((s,i)=>s-i),n=[];let r=null;for(let s=0;s<t.length;s++)t[s+1]===t[s]+1?r??=t[s]:r===null?n.push(t[s]):(n.push([r,t[s]]),r=null);return n}function QAe(e,t,n){if(e)return">";let r="";if(t&&n){const{enable:s,disable:i}=t;r=(s?.ignoreCase?"i":"")+(s?.dotAll?"s":"")+(i?"-":"")+(i?.ignoreCase?"i":"")+(i?.dotAll?"s":"")}return`${r}:`}function XAe({kind:e,max:t,min:n}){let r;return!n&&t===1?r="?":!n&&t===1/0?r="*":n===1&&t===1/0?r="+":n===t?r=`{${n}}`:r=`{${n},${t===1/0?"":t}}`,r+{greedy:"",lazy:"?",possessive:"+"}[e]}function m3({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function ZAe(e){return e>47&&e<58}function p3({type:e,value:t}){return e==="Character"&&t===45}var eCe=class Uv extends RegExp{#e=new Map;#t=null;#r;#n=null;#s=null;rawOptions={};get source(){return this.#r||"(?:)"}constructor(t,n,r){const s=!!r?.lazyCompile;if(t instanceof RegExp){if(r)throw new Error("Cannot provide options when copying a regexp");const i=t;super(i,n),this.#r=i.source,i instanceof Uv&&(this.#e=i.#e,this.#n=i.#n,this.#s=i.#s,this.rawOptions=i.rawOptions)}else{const i={hiddenCaptures:[],strategy:null,transfers:[],...r};super(s?"":t,n),this.#r=t,this.#e=nCe(i.hiddenCaptures,i.transfers),this.#s=i.strategy,this.rawOptions=r??{}}s||(this.#t=this)}exec(t){if(!this.#t){const{lazyCompile:s,...i}=this.rawOptions;this.#t=new Uv(this.#r,this.flags,i)}const n=this.global||this.sticky,r=this.lastIndex;if(this.#s==="clip_search"&&n&&r){this.lastIndex=0;const s=this.#i(t.slice(r));return s&&(tCe(s,r,t,this.hasIndices),this.lastIndex+=r),s}return this.#i(t)}#i(t){this.#t.lastIndex=this.lastIndex;const n=super.exec.call(this.#t,t);if(this.lastIndex=this.#t.lastIndex,!n||!this.#e.size)return n;const r=[...n];n.length=1;let s;this.hasIndices&&(s=[...n.indices],n.indices.length=1);const i=[0];for(let a=1;a<r.length;a++){const{hidden:o,transferTo:c}=this.#e.get(a)??{};if(o?i.push(null):(i.push(n.length),n.push(r[a]),this.hasIndices&&n.indices.push(s[a])),c&&r[a]!==void 0){const u=i[c];if(!u)throw new Error(`Invalid capture transfer to "${u}"`);if(n[u]=r[a],this.hasIndices&&(n.indices[u]=s[a]),n.groups){this.#n||(this.#n=rCe(this.source));const l=this.#n.get(c);l&&(n.groups[l]=r[a],this.hasIndices&&(n.indices.groups[l]=s[a]))}}}return n}};function tCe(e,t,n,r){if(e.index+=t,e.input=n,r){const s=e.indices;for(let a=0;a<s.length;a++){const o=s[a];o&&(s[a]=[o[0]+t,o[1]+t])}const i=s.groups;i&&Object.keys(i).forEach(a=>{const o=i[a];o&&(i[a]=[o[0]+t,o[1]+t])})}}function nCe(e,t){const n=new Map;for(const r of e)n.set(r,{hidden:!0});for(const[r,s]of t)for(const i of s)Im(n,i,{}).transferTo=r;return n}function rCe(e){const t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map;let r=0,s=0,i;for(;i=t.exec(e);){const{0:a,groups:{capture:o,name:c}}=i;a==="["?r++:r?a==="]"&&r--:o&&(s++,c&&n.set(s,c))}return n}function X9(e,t){const n=sCe(e,t);return n.options?new eCe(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function sCe(e,t){const n=U9(t),r=L9(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:_C}),s=RAe(r,{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),i=VAe(s,n),a=EAe(i.pattern,{captureTransfers:i._captureTransfers,hiddenCaptures:i._hiddenCaptures,mode:"external"}),o=_Ae(a.pattern),c=yAe(o.pattern,{captureTransfers:a.captureTransfers,hiddenCaptures:a.hiddenCaptures}),u={pattern:c.pattern,flags:`${n.hasIndices?"d":""}${n.global?"g":""}${i.flags}${i.options.disable.v?"u":"v"}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const l=c.hiddenCaptures.sort((m,y)=>m-y),d=Array.from(c.captureTransfers),f=s._strategy,h=u.pattern.length>=n.lazyCompileLength;(l.length||d.length||f||h)&&(u.options={...l.length&&{hiddenCaptures:l},...d.length&&{transfers:d},...f&&{strategy:f},...h&&{lazyCompile:h}})}return u}function Z9(e,t){return X9(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function iCe(e={}){const t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||=n=>Z9(n,{target:t.target}),{createScanner(n){return new wIe(n,t)},createString(n){return{content:n}}}}var aCe=QA({bundledLanguages:()=>eC,bundledLanguagesAlias:()=>ZA,bundledLanguagesBase:()=>XA,bundledLanguagesInfo:()=>q1,bundledThemes:()=>nC,bundledThemesInfo:()=>tC,codeToHast:()=>w9,codeToHtml:()=>pC,codeToTokens:()=>S9,codeToTokensBase:()=>v9,codeToTokensWithThemes:()=>x9,createHighlighter:()=>mC,createJavaScriptRegexEngine:()=>iCe,createOnigurumaEngine:()=>NU,defaultJavaScriptRegexConstructor:()=>Z9,getLastGrammarState:()=>I9,getSingletonHighlighter:()=>T9,loadWasm:()=>sC});TU(aCe,EIe);const g3=new Map;function oCe(e,t){return`${t}::${e.length}::${e.slice(0,64)}`}function cCe(e,t){if(t)return t;const n=e.trimStart();return n.startsWith("{")||n.startsWith("[")?"json":n.startsWith("<")?"xml":n.startsWith("---")?"yaml":"json"}function eV(e){const{code:t,lang:n,className:r}=e,[s,i]=O.useState(null),[a,o]=O.useState(!1),c=O.useRef(!0),u=cCe(t,n),l=oCe(t,u);O.useEffect(()=>(c.current=!0,()=>{c.current=!1}),[]),O.useEffect(()=>{const f=g3.get(l);if(f){i(f);return}let h=!1;return pC(t,{lang:u,theme:"vitesse-dark"}).then(m=>{h||(g3.set(l,m),c.current&&i(m))}),()=>{h=!0}},[t,l,u]);const d=O.useCallback(()=>{navigator.clipboard.writeText(t).then(()=>{o(!0),setTimeout(()=>o(!1),1500)})},[t]);return b.jsxs("div",{className:qe("group relative overflow-auto",r),children:[b.jsx("button",{type:"button",onClick:d,className:"absolute right-2 top-2 z-10 rounded-md border border-border bg-card/90 p-1.5 text-muted-foreground/40 opacity-0 backdrop-blur-sm transition-all hover:text-foreground group-hover:opacity-100",title:"Copy to clipboard",children:a?b.jsx(JA,{className:"size-3"}):b.jsx(yU,{className:"size-3"})}),s?b.jsx("div",{className:"shiki-container text-[12px] leading-relaxed [&_pre]:!bg-transparent [&_pre]:p-3 [&_code]:font-mono",dangerouslySetInnerHTML:{__html:s}}):b.jsx("pre",{className:"p-3 font-mono text-[12px] leading-relaxed text-foreground/60",children:t})]})}function tV(e){const[t,n]=O.useState(null);O.useEffect(()=>{n(window.location.origin)},[]);const r=O.useMemo(()=>t?`npx add-mcp "${t}/mcp" --transport http --name "executor"`:'npx add-mcp "<this-server>/mcp" --transport http --name "executor"',[t]);return b.jsxs("section",{className:e.className??"rounded-2xl border border-border bg-card/80 p-5",children:[b.jsxs("div",{className:"mb-3 space-y-1",children:[b.jsx("h2",{className:"text-sm font-semibold text-foreground",children:e.title??"Install local MCP"}),b.jsx("p",{className:"text-[13px] text-muted-foreground",children:e.description??"Add this local executor server to an MCP client with one command. The URL uses the same origin as this web app."})]}),b.jsx(eV,{code:r,lang:"bash",className:"rounded-xl border border-border bg-background/70"})]})}const b3=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,y3=V1,nV=(e,t)=>n=>{var r;if(t?.variants==null)return y3(e,n?.class,n?.className);const{variants:s,defaultVariants:i}=t,a=Object.keys(s).map(u=>{const l=n?.[u],d=i?.[u];if(l===null)return null;const f=b3(l)||b3(d);return s[u][f]}),o=n&&Object.entries(n).reduce((u,l)=>{let[d,f]=l;return f===void 0||(u[d]=f),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,l)=>{let{class:d,className:f,...h}=l;return Object.entries(h).every(m=>{let[y,g]=m;return Array.isArray(g)?g.includes({...i,...o}[y]):{...i,...o}[y]===g})?[...u,d,f]:u},[]);return y3(e,a,c,n?.class,n?.className)},uCe=nV("inline-flex items-center rounded-full border px-2 py-0.5 text-[10px] font-medium tracking-wide uppercase",{variants:{variant:{default:"border-transparent bg-primary/15 text-primary",secondary:"border-transparent bg-secondary text-secondary-foreground",outline:"border-border text-muted-foreground",muted:"border-transparent bg-muted text-muted-foreground",get:"border-[var(--method-get)]/20 bg-[var(--method-get)]/10 text-[var(--method-get)]",post:"border-[var(--method-post)]/20 bg-[var(--method-post)]/10 text-[var(--method-post)]",put:"border-[var(--method-put)]/20 bg-[var(--method-put)]/10 text-[var(--method-put)]",delete:"border-[var(--method-delete)]/20 bg-[var(--method-delete)]/10 text-[var(--method-delete)]",destructive:"border-destructive/20 bg-destructive/10 text-destructive"}},defaultVariants:{variant:"default"}});function hi({className:e,variant:t,...n}){return b.jsx("span",{className:qe(uCe({variant:t}),e),...n})}function rV({method:e}){const t={GET:"get",POST:"post",PUT:"put",PATCH:"put",DELETE:"delete"}[e.toUpperCase()]??"outline";return b.jsx(hi,{variant:t,children:e})}const lCe=nV("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 outline-none focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:ring-offset-1 focus-visible:ring-offset-background cursor-pointer",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-accent hover:text-accent-foreground",destructive:"bg-destructive text-white hover:bg-destructive/90"},size:{default:"h-9 px-4 py-2",sm:"h-7 rounded-md px-2.5 text-xs",lg:"h-10 rounded-md px-6",icon:"h-8 w-8"}},defaultVariants:{variant:"default",size:"default"}});function $n({className:e,variant:t,size:n,...r}){return b.jsx("button",{className:qe(lCe({variant:t,size:n}),e),...r})}function dCe(){const e=Zz();return b.jsx("div",{className:"flex-1 overflow-y-auto",children:b.jsxs("div",{className:"mx-auto max-w-4xl px-6 py-10 lg:px-10 lg:py-14",children:[b.jsxs("div",{className:"flex items-end justify-between mb-8",children:[b.jsxs("div",{children:[b.jsx("h1",{className:"font-display text-3xl tracking-tight text-foreground lg:text-4xl",children:"Sources"}),b.jsx("p",{className:"mt-1.5 text-[14px] text-muted-foreground",children:"Connected tool providers in this workspace."})]}),b.jsx($r,{to:"/sources/add",children:b.jsxs($n,{size:"sm",children:[b.jsx(qo,{className:"size-3.5"}),"Add source"]})})]}),b.jsx(tV,{className:"mb-8"}),b.jsx(Fu,{loadable:e,loading:"Loading sources...",children:t=>t.length===0?b.jsxs("div",{className:"flex flex-col items-center justify-center rounded-2xl border border-dashed border-border py-20",children:[b.jsx("div",{className:"flex size-12 items-center justify-center rounded-2xl bg-muted text-muted-foreground mb-4",children:b.jsx(FSe,{className:"size-5"})}),b.jsx("p",{className:"text-[14px] font-medium text-foreground/70 mb-1",children:"No sources yet"}),b.jsx("p",{className:"text-[13px] text-muted-foreground/60 mb-5",children:"Add a source to get started."}),b.jsx($r,{to:"/sources/add",children:b.jsxs($n,{size:"sm",children:[b.jsx(qo,{className:"size-3.5"}),"Add source"]})})]}):b.jsx("div",{className:"grid gap-3 sm:grid-cols-2 lg:grid-cols-3",children:t.map(n=>b.jsx(fCe,{source:n},n.id))})})]})})}function fCe({source:e}){return b.jsxs($r,{to:"/sources/$sourceId",params:{sourceId:e.id},search:{tab:"model"},className:"group flex flex-col rounded-xl border border-border bg-card p-4 transition-all hover:border-primary/30 hover:shadow-[0_2px_12px_-4px_rgba(0,0,0,0.12)]",children:[b.jsxs("div",{className:"flex items-start justify-between gap-3 mb-3",children:[b.jsx("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-lg bg-primary/8 text-primary",children:b.jsx(H1,{endpoint:e.endpoint,kind:e.kind,className:"size-4.5"})}),b.jsx(hi,{variant:e.status==="connected"?"default":e.status==="error"?"destructive":"muted",className:"shrink-0",children:e.status})]}),b.jsx("h3",{className:"text-[14px] font-semibold text-foreground group-hover:text-primary transition-colors mb-0.5",children:e.name}),b.jsx("div",{className:"flex items-center gap-2 mt-auto pt-2",children:b.jsx(hi,{variant:"outline",className:"text-[9px]",children:e.kind})})]})}const sV=[{id:"deepwiki-mcp",name:"DeepWiki MCP",summary:"Repository docs and knowledge graphs via MCP.",kind:"mcp",endpoint:"https://mcp.deepwiki.com/mcp"},{id:"axiom-mcp",name:"Axiom MCP",summary:"Query, stream, and analyze logs, traces, and event data.",kind:"mcp",endpoint:"https://mcp.axiom.co/mcp"},{id:"neon-mcp",name:"Neon MCP",summary:"Manage Postgres databases, branches, and queries via MCP.",kind:"mcp",endpoint:"https://mcp.neon.tech/mcp"},{id:"neon-api",name:"Neon API",summary:"Projects, branches, endpoints, databases, and API keys.",kind:"openapi",endpoint:"https://console.neon.tech/api/v2",specUrl:"https://neon.com/api_spec/release/v2.json"},{id:"github-rest",name:"GitHub REST API",summary:"Repos, issues, pull requests, actions, and org settings.",kind:"openapi",endpoint:"https://api.github.com",specUrl:"https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.yaml"},{id:"github-graphql",name:"GitHub GraphQL",summary:"Issues, pull requests, discussions, and repository objects via GraphQL.",kind:"graphql",endpoint:"https://api.github.com/graphql"},{id:"gitlab-graphql",name:"GitLab GraphQL",summary:"Projects, merge requests, issues, CI pipelines, and users.",kind:"graphql",endpoint:"https://gitlab.com/api/graphql"},{id:"openai-api",name:"OpenAI API",summary:"Models, files, responses, and fine-tuning.",kind:"openapi",endpoint:"https://api.openai.com/v1",specUrl:"https://app.stainless.com/api/spec/documented/openai/openapi.documented.yml"},{id:"vercel-api",name:"Vercel API",summary:"Deployments, projects, domains, and environments.",kind:"openapi",endpoint:"https://api.vercel.com",specUrl:"https://openapi.vercel.sh"},{id:"stripe-api",name:"Stripe API",summary:"Payments, billing, subscriptions, and invoices.",kind:"openapi",endpoint:"https://api.stripe.com",specUrl:"https://raw.githubusercontent.com/stripe/openapi/master/openapi/spec3.json"},{id:"linear-graphql",name:"Linear GraphQL",summary:"Issues, teams, cycles, and projects.",kind:"graphql",endpoint:"https://api.linear.app/graphql"},{id:"monday-graphql",name:"Monday GraphQL",summary:"Boards, items, updates, users, and workspace metadata.",kind:"graphql",endpoint:"https://api.monday.com/v2"},{id:"anilist-graphql",name:"AniList GraphQL",summary:"Anime, manga, characters, media lists, and recommendations.",kind:"graphql",endpoint:"https://graphql.anilist.co"}],hCe=2*6e4,iV="executor:oauth-result:",mCe=["mcp","openapi","graphql","internal"],pCe=["auto","streamable-http","sse"],gCe=["none","bearer","oauth2"],My=e=>{const t=e.trim();return t.length>0?t:null},bCe=e=>{try{const t=xU(e);if(!t)return"";const n=t.indexOf(".");return n>0?t.slice(0,n):t}catch{return""}},_3=e=>{if(typeof window>"u")return null;const t=window.localStorage.getItem(`${iV}${e}`);if(!t)return null;try{return JSON.parse(t)}catch{return null}},k3=e=>{typeof window>"u"||window.localStorage.removeItem(`${iV}${e}`)},yCe=async e=>{if(typeof window>"u")throw new Error("OAuth popup is only available in a browser context");k3(e.sessionId);const t=window.open(e.authorizationUrl,"executor-source-oauth","popup=yes,width=520,height=720");if(!t)throw new Error("Popup blocked. Allow popups and try again.");return t.focus(),await new Promise((n,r)=>{let s=!1,i=0,a=0;const o=()=>{window.removeEventListener("message",l),i&&window.clearInterval(i),a&&window.clearTimeout(a),t.closed||t.close(),k3(e.sessionId)},c=d=>{s||(s=!0,o(),r(new Error(d)))},u=d=>{if(!d.ok){c(d.error||"OAuth failed");return}s||(s=!0,o(),n(d.auth))},l=d=>{if(d.origin!==window.location.origin)return;const f=d.data;!f||f.type!=="executor:oauth-result"||f.ok&&f.sessionId!==e.sessionId||!f.ok&&f.sessionId!==null&&f.sessionId!==e.sessionId||u(f)};window.addEventListener("message",l),a=window.setTimeout(()=>{c("OAuth popup timed out before completion. Please try again.")},hCe),i=window.setInterval(()=>{const d=_3(e.sessionId);if(d){u(d);return}t.closed&&(window.clearInterval(i),i=0,window.setTimeout(()=>{const f=_3(e.sessionId);if(f){u(f);return}c("OAuth popup was closed before completion.")},1500))},300)})},ZE=e=>e===null?"":JSON.stringify(e,null,2),E3=e=>({name:e?.name??"",kind:e?.kind??"openapi",endpoint:e?.endpoint??"",namespace:e?bCe(e.endpoint):"",enabled:!0,transport:e?.kind==="mcp"?"auto":"",queryParamsText:"",headersText:"",specUrl:e&&"specUrl"in e?e.specUrl:"",defaultHeadersText:"",authKind:"none",authHeaderName:"Authorization",authPrefix:"Bearer ",bearerProviderId:"",bearerHandle:"",oauthAccessProviderId:"",oauthAccessHandle:"",oauthRefreshProviderId:"",oauthRefreshHandle:""}),_Ce=e=>({name:e.name,kind:e.kind,endpoint:e.endpoint,namespace:e.namespace??"",enabled:e.enabled,transport:e.kind==="mcp"?e.transport??"auto":"",queryParamsText:ZE(e.queryParams),headersText:ZE(e.headers),specUrl:e.specUrl??"",defaultHeadersText:ZE(e.defaultHeaders),authKind:e.auth.kind,authHeaderName:e.auth.kind==="none"?"Authorization":e.auth.headerName,authPrefix:e.auth.kind==="none"?"Bearer ":e.auth.prefix,bearerProviderId:e.auth.kind==="bearer"?e.auth.token.providerId:"",bearerHandle:e.auth.kind==="bearer"?e.auth.token.handle:"",oauthAccessProviderId:e.auth.kind==="oauth2"?e.auth.accessToken.providerId:"",oauthAccessHandle:e.auth.kind==="oauth2"?e.auth.accessToken.handle:"",oauthRefreshProviderId:e.auth.kind==="oauth2"&&e.auth.refreshToken!==null?e.auth.refreshToken.providerId:"",oauthRefreshHandle:e.auth.kind==="oauth2"&&e.auth.refreshToken!==null?e.auth.refreshToken.handle:""}),Nl=(e,t)=>{const n=t.trim();if(n.length===0)return null;let r;try{r=JSON.parse(n)}catch{throw new Error(`${e} must be valid JSON.`)}if(r===null||Array.isArray(r)||typeof r!="object")throw new Error(`${e} must be a JSON object with string values.`);const s=Object.entries(r),i={};for(const[a,o]of s){if(typeof o!="string")throw new Error(`${e} must only contain string values.`);i[a]=o}return Object.keys(i).length===0?null:i},kCe=e=>{if(e.authKind==="none")return{kind:"none"};const t=e.authHeaderName.trim()||"Authorization",n=e.authPrefix;if(e.authKind==="bearer"){const o=e.bearerProviderId.trim(),c=e.bearerHandle.trim();if(!o||!c)throw new Error("Bearer auth requires a token. Select or create a secret.");return{kind:"bearer",headerName:t,prefix:n,token:{providerId:o,handle:c}}}const r=e.oauthAccessProviderId.trim(),s=e.oauthAccessHandle.trim();if(!r||!s)throw new Error("OAuth2 auth requires an access token. Select or create a secret.");const i=My(e.oauthRefreshProviderId),a=My(e.oauthRefreshHandle);if(i===null!=(a===null))throw new Error("OAuth2 refresh token provider ID and handle must be set together.");return{kind:"oauth2",headerName:t,prefix:n,accessToken:{providerId:r,handle:s},refreshToken:i===null||a===null?null:{providerId:i,handle:a}}},ECe=e=>{if(!(e.kind!=="mcp"&&e.kind!=="openapi"&&e.kind!=="graphql"))return e.enabled?"connected":"draft"},aV=e=>{const t=e.name.trim(),n=e.endpoint.trim();if(!t)throw new Error("Source name is required.");if(!n)throw new Error("Source endpoint is required.");const r={name:t,kind:e.kind,endpoint:n,status:ECe(e),enabled:e.enabled,namespace:My(e.namespace),auth:kCe(e)};if(e.kind==="mcp")return{...r,transport:e.transport===""?"auto":e.transport,queryParams:Nl("Query params",e.queryParamsText),headers:Nl("Request headers",e.headersText),specUrl:null,defaultHeaders:null};if(e.kind==="openapi"){const s=e.specUrl.trim();if(!s)throw new Error("OpenAPI sources require a spec URL.");return{...r,transport:null,queryParams:null,headers:null,specUrl:s,defaultHeaders:Nl("Default headers",e.defaultHeadersText)}}return e.kind==="graphql"?{...r,transport:null,queryParams:null,headers:null,specUrl:null,defaultHeaders:Nl("Default headers",e.defaultHeadersText)}:{...r,transport:null,queryParams:null,headers:null,specUrl:null,defaultHeaders:null}},wCe=e=>({...aV(e)}),SCe=e=>{if(e.kind!=="mcp")throw new Error("OAuth sign-in is only available for MCP sources.");const t=e.endpoint.trim();if(!t)throw new Error("Source endpoint is required before starting OAuth.");return{provider:"mcp",name:My(e.name),endpoint:t,transport:e.transport===""?"auto":e.transport,queryParams:Nl("Query params",e.queryParamsText),headers:Nl("Request headers",e.headersText)}};function vCe(){return b.jsx(oV,{mode:"create"},"create")}function xCe(e){const t=zwe(e.sourceId);return b.jsx(Fu,{loadable:t,loading:"Loading source...",children:n=>b.jsx(oV,{mode:"edit",source:n},`${n.id}:${n.updatedAt}`)})}function oV(e){const t=vd(),n=Gwe(),r=eU(),s=Kwe(),i=Wwe();jwe();const a=VA(),o=Xz(),[c,u]=O.useState(()=>e.source?_Ce(e.source):E3()),[l,d]=O.useState(null),[f,h]=O.useState(null),[m,y]=O.useState(!1),[g,p]=O.useState(null),_=n.status==="pending"||s.status==="pending",k=i.status==="pending",v=r.status==="pending"||m,w=c.authKind==="oauth2"&&c.oauthAccessHandle.trim().length>0?`${c.oauthAccessProviderId}:${c.oauthAccessHandle}:${c.oauthRefreshProviderId}:${c.oauthRefreshHandle}`:null,S=w!==null&&g===w,T=(H,G)=>{u(Q=>({...Q,[H]:G}))},I=H=>{h(H.id),u(G=>({...E3(H),name:G.name.trim().length>0?G.name:H.name,enabled:G.enabled})),d({tone:"info",text:`${H.name} loaded. Add auth if needed, then save.`})},$=async()=>{d(null);try{if(e.mode==="create"){const G=await n.mutateAsync(aV(c));t({to:"/sources/$sourceId",params:{sourceId:G.id},search:{tab:"model"}});return}if(!e.source)throw new Error("Cannot update a source before it has loaded.");const H=await s.mutateAsync({sourceId:e.source.id,payload:wCe(c)});t({to:"/sources/$sourceId",params:{sourceId:H.id},search:{tab:"model"}})}catch(H){d({tone:"error",text:H instanceof Error?H.message:"Failed saving source."})}},R=async()=>{d(null);try{const H=await r.mutateAsync(SCe(c));d({tone:"info",text:"Finish OAuth in the popup. Saving will create the source and connect its tools."}),y(!0);const G=await yCe({authorizationUrl:H.authorizationUrl,sessionId:H.sessionId});y(!1),o(),p(null),u(Q=>({...Q,authKind:"oauth2",authHeaderName:G.headerName,authPrefix:G.prefix,oauthAccessProviderId:G.accessToken.providerId,oauthAccessHandle:G.accessToken.handle,oauthRefreshProviderId:G.refreshToken?.providerId??"",oauthRefreshHandle:G.refreshToken?.handle??""})),d({tone:"success",text:"OAuth credentials are ready. Save the source to connect and index tools."})}catch(H){y(!1),d({tone:"error",text:H instanceof Error?H.message:"Failed starting OAuth."})}},z=async()=>{if(!(!e.source||k||!window.confirm(`Remove "${e.source.name}" and its indexed tools?`))){d(null);try{if(!(await i.mutateAsync(e.source.id)).removed)throw new Error("Source was not removed.");t({to:"/"})}catch(G){d({tone:"error",text:G instanceof Error?G.message:"Failed removing source."})}}},V=e.mode==="edit"&&e.source?{to:"/sources/$sourceId",params:{sourceId:e.source.id},search:{tab:"model"}}:{to:"/"};return b.jsx("div",{className:"flex-1 overflow-y-auto",children:b.jsxs("div",{className:"mx-auto max-w-3xl px-6 py-8 lg:px-10 lg:py-12",children:[b.jsxs($r,{...V,className:"inline-flex items-center gap-1.5 text-[12px] font-medium text-muted-foreground transition-colors hover:text-foreground mb-6",children:[b.jsx(kU,{className:"size-3.5"}),e.mode==="edit"?"Back to source":"Back"]}),b.jsxs("div",{className:"flex items-center justify-between gap-4 mb-6",children:[b.jsx("h1",{className:"font-display text-2xl tracking-tight text-foreground lg:text-3xl",children:e.mode==="edit"?"Edit source":"New source"}),b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx(hi,{variant:"outline",children:c.kind}),b.jsx(hi,{variant:c.enabled?"default":"muted",children:c.enabled?"enabled":"disabled"})]})]}),l&&b.jsx(ICe,{state:l,className:"mb-6"}),e.mode==="create"&&b.jsx(_c,{title:"Templates",className:"mb-6",children:b.jsx("div",{className:"grid gap-2 sm:grid-cols-2 lg:grid-cols-3",children:sV.map(H=>b.jsxs("button",{type:"button",onClick:()=>I(H),className:qe("rounded-xl border px-4 py-3 text-left transition-colors",f===H.id?"border-primary/40 bg-primary/8":"border-border bg-card/70 hover:bg-accent/50"),children:[b.jsxs("div",{className:"mb-1 flex items-center justify-between gap-2",children:[b.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[b.jsx("div",{className:"flex size-4 shrink-0 items-center justify-center text-muted-foreground",children:b.jsx(H1,{endpoint:H.endpoint,kind:H.kind,className:"size-4"})}),b.jsx("span",{className:"truncate text-[13px] font-medium text-foreground",children:H.name})]}),b.jsx(hi,{variant:"outline",className:"text-[9px]",children:H.kind})]}),b.jsx("span",{className:"text-[11px] text-muted-foreground line-clamp-1",children:H.summary})]},H.id))})}),b.jsxs("div",{className:"space-y-6",children:[b.jsx(_c,{title:"Basics",children:b.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[b.jsx(nr,{label:"Name",children:b.jsx(cl,{value:c.name,onChange:H=>T("name",H),placeholder:"GitHub REST"})}),b.jsx(nr,{label:"Kind",children:b.jsx(ew,{value:c.kind,onChange:H=>T("kind",H),options:mCe.map(H=>({value:H,label:H}))})}),b.jsx(nr,{label:"Endpoint",className:"sm:col-span-2",children:b.jsx(cl,{value:c.endpoint,onChange:H=>T("endpoint",H),placeholder:c.kind==="openapi"?"https://api.github.com":c.kind==="graphql"?"https://api.linear.app/graphql":"https://mcp.deepwiki.com/mcp",mono:!0})}),b.jsx(nr,{label:"Namespace",children:b.jsx(cl,{value:c.namespace,onChange:H=>T("namespace",H),placeholder:"github"})}),b.jsx(nr,{label:"Status",children:b.jsx(TCe,{checked:c.enabled,onChange:H=>T("enabled",H)})})]})}),c.kind==="mcp"&&b.jsx(_c,{title:"Transport",children:b.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[b.jsx(nr,{label:"Transport mode",children:b.jsx(ew,{value:c.transport||"auto",onChange:H=>T("transport",H),options:pCe.map(H=>({value:H,label:H}))})}),b.jsxs("div",{className:"sm:col-span-2 grid gap-4 sm:grid-cols-2",children:[b.jsx(nr,{label:"Query params (JSON)",children:b.jsx(s0,{value:c.queryParamsText,onChange:H=>T("queryParamsText",H),placeholder:`{
259
- "workspace": "demo"
260
- }`})}),b.jsx(nr,{label:"Headers (JSON)",children:b.jsx(s0,{value:c.headersText,onChange:H=>T("headersText",H),placeholder:`{
261
- "x-api-key": "..."
262
- }`})})]})]})}),c.kind==="openapi"&&b.jsx(_c,{title:"OpenAPI",children:b.jsxs("div",{className:"grid gap-4",children:[b.jsx(nr,{label:"Spec URL",children:b.jsx(cl,{value:c.specUrl,onChange:H=>T("specUrl",H),placeholder:"https://raw.githubusercontent.com/.../openapi.yaml",mono:!0})}),b.jsx(nr,{label:"Default headers (JSON)",children:b.jsx(s0,{value:c.defaultHeadersText,onChange:H=>T("defaultHeadersText",H),placeholder:`{
263
- "x-api-version": "2026-03-01"
264
- }`})})]})}),c.kind==="graphql"&&b.jsx(_c,{title:"GraphQL",children:b.jsx("div",{className:"grid gap-4",children:b.jsx(nr,{label:"Default headers (JSON)",children:b.jsx(s0,{value:c.defaultHeadersText,onChange:H=>T("defaultHeadersText",H),placeholder:`{
265
- "x-api-version": "2026-03-01"
266
- }`})})})}),b.jsx(_c,{title:"Authentication",children:b.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[c.kind==="mcp"&&b.jsxs("div",{className:"sm:col-span-2 rounded-lg border border-border bg-card/70 px-4 py-3",children:[b.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[b.jsxs("div",{className:"space-y-1",children:[b.jsx("p",{className:"text-[13px] font-medium text-foreground",children:"Sign in with OAuth"}),b.jsx("p",{className:"text-[12px] text-muted-foreground",children:"Starts the same MCP connection flow used by `executor.sources.add`."})]}),b.jsxs($n,{type:"button",variant:"outline",onClick:R,disabled:_||k||v,children:[v?b.jsx(Yi,{className:"size-3.5"}):null,c.authKind==="oauth2"&&c.oauthAccessHandle.trim().length>0?"Reconnect with OAuth":"Sign in with OAuth"]})]}),c.authKind==="oauth2"&&c.oauthAccessHandle.trim().length>0&&b.jsxs("div",{className:"mt-3 flex items-center justify-between gap-3 border-t border-border pt-3",children:[b.jsx("p",{className:"text-[12px] text-muted-foreground",children:"OAuth tokens are attached to this draft and stay hidden unless you need the raw refs."}),b.jsx("button",{type:"button",className:"text-[12px] font-medium text-muted-foreground transition-colors hover:text-foreground",onClick:()=>p(H=>H===w?null:w),children:S?"Hide token refs":"Show token refs"})]})]}),b.jsx(nr,{label:"Auth mode",children:b.jsx(ew,{value:c.authKind,onChange:H=>T("authKind",H),options:gCe.map(H=>({value:H,label:H}))})}),c.authKind!=="none"&&b.jsxs(b.Fragment,{children:[b.jsx(nr,{label:"Header name",children:b.jsx(cl,{value:c.authHeaderName,onChange:H=>T("authHeaderName",H),placeholder:"Authorization"})}),b.jsx(nr,{label:"Prefix",children:b.jsx(cl,{value:c.authPrefix,onChange:H=>T("authPrefix",H),placeholder:"Bearer "})})]}),c.authKind==="bearer"&&b.jsx(nr,{label:"Token",className:"sm:col-span-2",children:b.jsx(nw,{secrets:a,providerId:c.bearerProviderId,handle:c.bearerHandle,onSelect:(H,G)=>{T("bearerProviderId",H),T("bearerHandle",G)}})}),c.authKind==="oauth2"&&(c.kind!=="mcp"||c.oauthAccessHandle.trim().length===0||S)&&b.jsxs(b.Fragment,{children:[b.jsx(nr,{label:"Access token",className:"sm:col-span-2",children:b.jsx(nw,{secrets:a,providerId:c.oauthAccessProviderId,handle:c.oauthAccessHandle,onSelect:(H,G)=>{T("oauthAccessProviderId",H),T("oauthAccessHandle",G)}})}),b.jsx(nr,{label:"Refresh token (optional)",className:"sm:col-span-2",children:b.jsx(nw,{secrets:a,providerId:c.oauthRefreshProviderId,handle:c.oauthRefreshHandle,onSelect:(H,G)=>{T("oauthRefreshProviderId",H),T("oauthRefreshHandle",G)},allowEmpty:!0})})]})]})}),e.mode==="edit"&&e.source&&b.jsx(_c,{title:"Danger zone",children:b.jsxs($n,{variant:"outline",className:"border-destructive/30 text-destructive hover:bg-destructive/10 hover:text-destructive",onClick:z,disabled:k,children:[b.jsx(_U,{className:"size-3.5"}),k?"Removing…":"Remove source"]})}),b.jsxs("div",{className:"flex items-center justify-end gap-3 border-t border-border pt-5",children:[b.jsx($r,{...V,className:"inline-flex",children:b.jsx($n,{variant:"ghost",type:"button",children:"Cancel"})}),b.jsxs($n,{onClick:$,disabled:_,children:[e.mode==="edit"?b.jsx(YA,{className:"size-3.5"}):b.jsx(qo,{className:"size-3.5"}),_?e.mode==="edit"?"Saving…":"Creating…":e.mode==="edit"?"Save":"Create source"]})]})]})]})})}function _c(e){return b.jsxs("section",{className:qe("rounded-xl border border-border bg-card/80",e.className),children:[b.jsx("div",{className:"border-b border-border px-5 py-3",children:b.jsx("h2",{className:"text-sm font-semibold text-foreground",children:e.title})}),b.jsx("div",{className:"p-5",children:e.children})]})}function nr(e){return b.jsxs("label",{className:qe("block space-y-1.5",e.className),children:[b.jsx("span",{className:"text-[12px] font-medium text-foreground",children:e.label}),e.children]})}function cl(e){return b.jsx("input",{value:e.value,onChange:t=>e.onChange(t.target.value),placeholder:e.placeholder,className:qe("h-9 w-full rounded-lg border border-input bg-background px-3 text-[13px] text-foreground outline-none transition-colors placeholder:text-muted-foreground/35 focus:border-ring focus:ring-1 focus:ring-ring/25",e.mono&&"font-mono text-[12px]")})}function ew(e){return b.jsx("select",{value:e.value,onChange:t=>e.onChange(t.target.value),className:"h-9 w-full rounded-lg border border-input bg-background px-3 text-[13px] text-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring/25",children:e.options.map(t=>b.jsx("option",{value:t.value,children:t.label},t.value))})}function s0(e){return b.jsx("textarea",{value:e.value,onChange:t=>e.onChange(t.target.value),placeholder:e.placeholder,spellCheck:!1,className:"min-h-28 w-full rounded-lg border border-input bg-background px-3 py-2.5 font-mono text-[12px] leading-relaxed text-foreground outline-none transition-colors placeholder:text-muted-foreground/35 focus:border-ring focus:ring-1 focus:ring-ring/25"})}function TCe(e){return b.jsxs("button",{type:"button",onClick:()=>e.onChange(!e.checked),className:qe("flex h-9 w-full items-center justify-between rounded-lg border px-3 text-[13px] transition-colors",e.checked?"border-primary/40 bg-primary/8 text-foreground":"border-input bg-background text-muted-foreground hover:text-foreground"),children:[b.jsx("span",{children:e.checked?"Enabled":"Disabled"}),b.jsx("span",{className:qe("size-2 rounded-full",e.checked?"bg-primary":"bg-muted-foreground/30")})]})}function ICe(e){return b.jsx("div",{className:qe("rounded-lg border px-4 py-3 text-[13px]",e.state.tone==="success"&&"border-primary/30 bg-primary/8 text-foreground",e.state.tone==="info"&&"border-border bg-card text-muted-foreground",e.state.tone==="error"&&"border-destructive/30 bg-destructive/8 text-destructive",e.className),children:e.state.text})}const tw="__create_new__";function nw(e){const{secrets:t,providerId:n,handle:r,onSelect:s,allowEmpty:i}=e,a=qA(),[o,c]=O.useState(!1),[u,l]=O.useState(""),[d,f]=O.useState(""),[h,m]=O.useState(null),y=r||"",g=w=>{if(w===tw){c(!0),l(""),f(""),m(null);return}if(w===""){s("","");return}s("postgres",w)},p=async()=>{m(null);const w=u.trim();if(!w){m("Name is required.");return}if(!d){m("Value is required.");return}try{const S=await a.mutateAsync({name:w,value:d});s(S.providerId,S.id),c(!1)}catch(S){m(S instanceof Error?S.message:"Failed creating secret.")}};if(t.status!=="ready")return b.jsx("select",{disabled:!0,className:"h-9 w-full rounded-lg border border-input bg-background px-3 text-[13px] text-muted-foreground outline-none opacity-60",children:b.jsx("option",{children:"Loading…"})});const _=t.data,k=_.find(w=>w.id===r),v=r&&!k&&n!=="postgres";return b.jsxs("div",{className:"space-y-2",children:[b.jsxs("select",{value:o?tw:y,onChange:w=>g(w.target.value),className:"h-9 w-full rounded-lg border border-input bg-background px-3 text-[13px] text-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring/25",children:[i&&b.jsx("option",{value:"",children:"None"}),!i&&!y&&b.jsx("option",{value:"",children:"Select a secret…"}),_.map(w=>b.jsx("option",{value:w.id,children:w.name||w.id},w.id)),v&&b.jsxs("option",{value:r,children:[n,":",r]}),b.jsx("option",{value:tw,children:"+ Create new secret"})]}),o&&b.jsxs("div",{className:"rounded-lg border border-primary/20 bg-card/80 p-3 space-y-3",children:[h&&b.jsx("div",{className:"rounded-md border border-destructive/30 bg-destructive/8 px-3 py-2 text-[12px] text-destructive",children:h}),b.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[b.jsxs("label",{className:"block space-y-1",children:[b.jsx("span",{className:"text-[11px] font-medium text-muted-foreground",children:"Name"}),b.jsx("input",{value:u,onChange:w=>l(w.target.value),placeholder:"GitHub PAT",className:"h-8 w-full rounded-lg border border-input bg-background px-3 text-[12px] text-foreground outline-none transition-colors placeholder:text-muted-foreground/35 focus:border-ring focus:ring-1 focus:ring-ring/25",autoFocus:!0})]}),b.jsxs("label",{className:"block space-y-1",children:[b.jsx("span",{className:"text-[11px] font-medium text-muted-foreground",children:"Value"}),b.jsx("input",{type:"password",value:d,onChange:w=>f(w.target.value),placeholder:"ghp_...",className:"h-8 w-full rounded-lg border border-input bg-background px-3 font-mono text-[11px] text-foreground outline-none transition-colors placeholder:text-muted-foreground/35 focus:border-ring focus:ring-1 focus:ring-ring/25"})]})]}),b.jsxs("div",{className:"flex items-center justify-end gap-2",children:[b.jsx("button",{type:"button",onClick:()=>c(!1),className:"rounded-md px-2.5 py-1 text-[11px] font-medium text-muted-foreground transition-colors hover:text-foreground",children:"Cancel"}),b.jsxs($n,{size:"sm",onClick:p,disabled:a.status==="pending",children:[a.status==="pending"&&b.jsx(Yi,{className:"size-3"}),"Store & use"]})]})]})]})}function va(e){return b.jsxs("section",{className:qe("overflow-hidden rounded-lg border border-border bg-card/60",e.compact&&"min-h-48"),children:[b.jsx("div",{className:"border-b border-border px-3 py-2 text-[11px] font-medium uppercase tracking-wider text-muted-foreground/70",children:e.title}),e.body?b.jsx(eV,{code:e.body,lang:e.lang,className:"max-h-[32rem]"}):b.jsx("div",{className:"flex items-center justify-center p-6 text-[13px] text-muted-foreground/40",children:e.empty})]})}const nk=(function(e){if(e==null)return NCe;if(typeof e=="function")return rk(e);if(typeof e=="object")return Array.isArray(e)?ACe(e):CCe(e);if(typeof e=="string")return PCe(e);throw new Error("Expected function, string, or object as test")});function ACe(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=nk(e[n]);return rk(r);function r(...s){let i=-1;for(;++i<t.length;)if(t[i].apply(this,s))return!0;return!1}}function CCe(e){const t=e;return rk(n);function n(r){const s=r;let i;for(i in e)if(s[i]!==t[i])return!1;return!0}}function PCe(e){return rk(t);function t(n){return n&&n.type===e}}function rk(e){return t;function t(n,r,s){return!!(RCe(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function NCe(){return!0}function RCe(e){return e!==null&&typeof e=="object"&&"type"in e}const cV=[],th=!0,Vv=!1,Rl="skip";function EC(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const i=nk(s),a=r?-1:1;o(e,void 0,[])();function o(c,u,l){const d=c&&typeof c=="object"?c:{};if(typeof d.type=="string"){const h=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(c.type+(h?"<"+h+">":""))+")"})}return f;function f(){let h=cV,m,y,g;if((!t||i(c,u,l[l.length-1]||void 0))&&(h=OCe(n(c,l)),h[0]===Vv))return h;if("children"in c&&c.children){const p=c;if(p.children&&h[0]!==Rl)for(y=(r?p.children.length:-1)+a,g=l.concat(p);y>-1&&y<p.children.length;){const _=p.children[y];if(m=o(_,y,g)(),m[0]===Vv)return m;y=typeof m[1]=="number"?m[1]:y+a}}return h}}}function OCe(e){return Array.isArray(e)?e:typeof e=="number"?[th,e]:e==null?cV:[e]}function Zi(e,t,n,r){let s,i,a;typeof t=="function"&&typeof n!="function"?(i=void 0,a=t,s=n):(i=t,a=n,s=r),EC(e,i,o,s);function o(c,u){const l=u[u.length-1],d=l?l.children.indexOf(c):void 0;return a(c,d,l)}}const Ed={indicator:"indicator",textOnly:"text-only",remove:"remove"};function LCe({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:s=[],blockedImageClass:i="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:a="text-gray-500",linkBlockPolicy:o=Ed.indicator,imageBlockPolicy:c=Ed.indicator}){const u=t.length&&!t.every(d=>d==="*"),l=n.length&&!n.every(d=>d==="*");if(!e&&(u||l))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return d=>{const f=BCe(e,t,n,r,s,i,a,o,c);uV(d),Zi(d,f)}}function w3(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function DCe(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const $Ce=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),MCe=new Set(["javascript:","data:","file:","vbscript:"]);function S3(e,t,n,r=!1,s=!1,i=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!s)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return s&&r&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const l=e.substring(5);if(l&&l.length>0&&l!=="invalid")return e}}catch{return null}return null}const a=w3(e,n);if(!a||MCe.has(a.protocol)||!($Ce.has(a.protocol)||i.includes(a.protocol)||i.includes("*")))return null;if(a.protocol==="mailto:"||!a.protocol.match(/^https?:$/))return a.href;const c=DCe(e);return a&&t.some(u=>{const l=w3(u,n);return!l||l.origin!==a.origin?!1:a.href.startsWith(l.href)})?c?a.pathname+a.search+a.hash:a.href:t.includes("*")?a.protocol!=="https:"&&a.protocol!=="http:"?null:c?a.pathname+a.search+a.hash:a.href:null}function uV(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)uV(t)}}const rw=Symbol("node-seen");function jCe(e,t,n){return t===Ed.remove?{type:"remove"}:t===Ed.textOnly?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[...e.children]}}:{type:"replace",element:{type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(e.properties.href),class:n},children:[...e.children,{type:"text",value:" [blocked]"}]}}}function FCe(e,t,n){if(t===Ed.remove)return{type:"remove"};if(t===Ed.textOnly){const r=String(e.properties.alt||"");return r?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[{type:"text",value:r}]}}:{type:"remove"}}return{type:"replace",element:{type:"element",tagName:"span",properties:{class:n},children:[{type:"text",value:"[Image blocked: "+String(e.properties.alt||"No description")+"]"}]}}}const BCe=(e,t,n,r,s,i,a,o,c)=>{const u=(l,d,f)=>{if(l.type!=="element"||l[rw])return th;if(l.tagName==="a"){const h=S3(l.properties.href,t,e,!1,!1,s);if(h===null){if(l[rw]=!0,Zi(l,u),f&&typeof d=="number"){const m=jCe(l,o,a);if(m.type==="remove")return f.children.splice(d,1),[Rl,d];f.children[d]=m.element}return Rl}else return l.properties.href=h,l.properties.target="_blank",l.properties.rel="noopener noreferrer",th}if(l.tagName==="img"){const h=S3(l.properties.src,n,e,r,!0,s);if(h===null){if(l[rw]=!0,Zi(l,u),f&&typeof d=="number"){const m=FCe(l,c,i);if(m.type==="remove")return f.children.splice(d,1),[Rl,d];f.children[d]=m.element}return Rl}else return l.properties.src=h,th}return th};return u},lV=-1,sk=0,Nh=1,jy=2,wC=3,SC=4,vC=5,xC=6,dV=7,fV=8,v3=typeof self=="object"?self:globalThis,zCe=(e,t)=>{const n=(s,i)=>(e.set(i,s),s),r=s=>{if(e.has(s))return e.get(s);const[i,a]=t[s];switch(i){case sk:case lV:return n(a,s);case Nh:{const o=n([],s);for(const c of a)o.push(r(c));return o}case jy:{const o=n({},s);for(const[c,u]of a)o[r(c)]=r(u);return o}case wC:return n(new Date(a),s);case SC:{const{source:o,flags:c}=a;return n(new RegExp(o,c),s)}case vC:{const o=n(new Map,s);for(const[c,u]of a)o.set(r(c),r(u));return o}case xC:{const o=n(new Set,s);for(const c of a)o.add(r(c));return o}case dV:{const{name:o,message:c}=a;return n(new v3[o](c),s)}case fV:return n(BigInt(a),s);case"BigInt":return n(Object(BigInt(a)),s);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:o}=new Uint8Array(a);return n(new DataView(o),a)}}return n(new v3[i](a),s)};return r},x3=e=>zCe(new Map,e)(0),ul="",{toString:UCe}={},{keys:VCe}=Object,Rf=e=>{const t=typeof e;if(t!=="object"||!e)return[sk,t];const n=UCe.call(e).slice(8,-1);switch(n){case"Array":return[Nh,ul];case"Object":return[jy,ul];case"Date":return[wC,ul];case"RegExp":return[SC,ul];case"Map":return[vC,ul];case"Set":return[xC,ul];case"DataView":return[Nh,n]}return n.includes("Array")?[Nh,n]:n.includes("Error")?[dV,n]:[jy,n]},i0=([e,t])=>e===sk&&(t==="function"||t==="symbol"),HCe=(e,t,n,r)=>{const s=(a,o)=>{const c=r.push(a)-1;return n.set(o,c),c},i=a=>{if(n.has(a))return n.get(a);let[o,c]=Rf(a);switch(o){case sk:{let l=a;switch(c){case"bigint":o=fV,l=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);l=null;break;case"undefined":return s([lV],a)}return s([o,l],a)}case Nh:{if(c){let f=a;return c==="DataView"?f=new Uint8Array(a.buffer):c==="ArrayBuffer"&&(f=new Uint8Array(a)),s([c,[...f]],a)}const l=[],d=s([o,l],a);for(const f of a)l.push(i(f));return d}case jy:{if(c)switch(c){case"BigInt":return s([c,a.toString()],a);case"Boolean":case"Number":case"String":return s([c,a.valueOf()],a)}if(t&&"toJSON"in a)return i(a.toJSON());const l=[],d=s([o,l],a);for(const f of VCe(a))(e||!i0(Rf(a[f])))&&l.push([i(f),i(a[f])]);return d}case wC:return s([o,a.toISOString()],a);case SC:{const{source:l,flags:d}=a;return s([o,{source:l,flags:d}],a)}case vC:{const l=[],d=s([o,l],a);for(const[f,h]of a)(e||!(i0(Rf(f))||i0(Rf(h))))&&l.push([i(f),i(h)]);return d}case xC:{const l=[],d=s([o,l],a);for(const f of a)(e||!i0(Rf(f)))&&l.push(i(f));return d}}const{message:u}=a;return s([o,{name:c,message:u}],a)};return i},T3=(e,{json:t,lossy:n}={})=>{const r=[];return HCe(!(t||n),!!t,new Map,r)(e),r},vu=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?x3(T3(e,t)):structuredClone(e):(e,t)=>x3(T3(e,t));const I3=/[#.]/g;function qCe(e,t){const n=e||"",r={};let s=0,i,a;for(;s<n.length;){I3.lastIndex=s;const o=I3.exec(n),c=n.slice(s,o?o.index:n.length);c&&(i?i==="#"?r.id=c:Array.isArray(r.className)?r.className.push(c):r.className=[c]:a=c,s+=c.length),o&&(i=o[0],s++)}return{type:"element",tagName:a||t||"div",properties:r,children:[]}}function hV(e,t,n){const r=n?JCe(n):void 0;function s(i,a,...o){let c;if(i==null){c={type:"root",children:[]};const u=a;o.unshift(u)}else{c=qCe(i,t);const u=c.tagName.toLowerCase(),l=r?r.get(u):void 0;if(c.tagName=l||u,GCe(a))o.unshift(a);else for(const[d,f]of Object.entries(a))KCe(e,c.properties,d,f)}for(const u of o)Hv(c.children,u);return c.type==="element"&&c.tagName==="template"&&(c.content={type:"root",children:c.children},c.children=[]),c}return s}function GCe(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const s=t[r];if(s&&typeof s=="object"){if(!Array.isArray(s))return!0;const i=s;for(const a of i)if(typeof a!="number"&&typeof a!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function KCe(e,t,n,r){const s=Ap(e,n);let i;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;i=r}else typeof r=="boolean"?i=r:typeof r=="string"?s.spaceSeparated?i=HL(r):s.commaSeparated?i=VL(r):s.commaOrSpaceSeparated?i=HL(VL(r).join(" ")):i=A3(s,s.property,r):Array.isArray(r)?i=[...r]:i=s.property==="style"?WCe(r):String(r);if(Array.isArray(i)){const a=[];for(const o of i)a.push(A3(s,s.property,o));i=a}s.property==="className"&&Array.isArray(t.className)&&(i=t.className.concat(i)),t[s.property]=i}}function Hv(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)Hv(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Hv(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function A3(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Tm(n)===Tm(t)))return!0}return n}function WCe(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function JCe(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const YCe=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","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","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],QCe=hV(Xd,"div"),XCe=hV(aa,"g",YCe);function ZCe(e){const t=String(e),n=[];return{toOffset:s,toPoint:r};function r(i){if(typeof i=="number"&&i>-1&&i<=t.length){let a=0;for(;;){let o=n[a];if(o===void 0){const c=C3(t,n[a-1]);o=c===-1?t.length+1:c+1,n[a]=o}if(o>i)return{line:a+1,column:i-(a>0?n[a-1]:0)+1,offset:i};a++}}}function s(i){if(i&&typeof i.line=="number"&&typeof i.column=="number"&&!Number.isNaN(i.line)&&!Number.isNaN(i.column)){for(;n.length<i.line;){const o=n[n.length-1],c=C3(t,o),u=c===-1?t.length+1:c+1;if(o===u)break;n.push(u)}const a=(i.line>1?n[i.line-2]:0)+i.column-1;if(a<n[i.line-1])return a}}}function C3(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
267
- `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const zc={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},mV={}.hasOwnProperty,e2e=Object.prototype;function t2e(e,t){const n=t||{};return TC({file:n.file||void 0,location:!1,schema:n.space==="svg"?aa:Xd,verbose:n.verbose||!1},e)}function TC(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},X0(e,r,n),n}case"#document":case"#document-fragment":{const r=t,s="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:pV(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const i=String(e.file),a=ZCe(i),o=a.toPoint(0),c=a.toPoint(i.length);n.position={start:o,end:c}}return n}case"#documentType":{const r=t;return n={type:"doctype"},X0(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},X0(e,r,n),n}default:return n=n2e(e,t),n}}function pV(e,t){let n=-1;const r=[];for(;++n<t.length;){const s=TC(e,t[n]);r.push(s)}return r}function n2e(e,t){const n=e.schema;e.schema=t.namespaceURI===zc.svg?aa:Xd;let r=-1;const s={};for(;++r<t.attrs.length;){const o=t.attrs[r],c=(o.prefix?o.prefix+":":"")+o.name;mV.call(e2e,c)||(s[c]=o.value)}const a=(e.schema.space==="svg"?XCe:QCe)(t.tagName,s,pV(e,t.childNodes));if(X0(e,t,a),a.tagName==="template"){const o=t,c=o.sourceCodeLocation,u=c&&c.startTag&&Ol(c.startTag),l=c&&c.endTag&&Ol(c.endTag),d=TC(e,o.content);u&&l&&e.file&&(d.position={start:u.end,end:l.start}),a.content=d}return e.schema=n,a}function X0(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=r2e(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function r2e(e,t,n){const r=Ol(n);if(t.type==="element"){const s=t.children[t.children.length-1];if(r&&!n.endTag&&s&&s.position&&s.position.end&&(r.end=Object.assign({},s.position.end)),e.verbose){const i={};let a;if(n.attrs)for(a in n.attrs)mV.call(n.attrs,a)&&(i[Ap(e.schema,a).property]=Ol(n.attrs[a]));n.startTag;const o=Ol(n.startTag),c=n.endTag?Ol(n.endTag):void 0,u={opening:o};c&&(u.closing=c),u.properties=i,t.data={position:u}}}return r}function Ol(e){const t=P3({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=P3({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function P3(e){return e.line&&e.column?e:void 0}const s2e={},i2e={}.hasOwnProperty,gV=uC("type",{handlers:{root:o2e,element:f2e,text:l2e,comment:d2e,doctype:u2e}});function a2e(e,t){const r=(t||s2e).space;return gV(e,r==="svg"?aa:Xd)}function o2e(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=IC(e.children,n,t),tf(e,n),n}function c2e(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=IC(e.children,n,t),tf(e,n),n}function u2e(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return tf(e,t),t}function l2e(e){const t={nodeName:"#text",value:e.value,parentNode:null};return tf(e,t),t}function d2e(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return tf(e,t),t}function f2e(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=aa);const s=[];let i;if(e.properties){for(i in e.properties)if(i!=="children"&&i2e.call(e.properties,i)){const c=h2e(r,i,e.properties[i]);c&&s.push(c)}}const a=r.space,o={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:zc[a],childNodes:[],parentNode:null};return o.childNodes=IC(e.children,o,r),tf(e,o),e.tagName==="template"&&e.content&&(o.content=c2e(e.content,r)),o}function h2e(e,t,n){const r=Ap(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?lC(n):dC(n));const s={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const i=s.name.indexOf(":");i<0?s.prefix="":(s.name=s.name.slice(i+1),s.prefix=r.attribute.slice(0,i)),s.namespace=zc[r.space]}return s}function IC(e,t,n){let r=-1;const s=[];if(e)for(;++r<e.length;){const i=gV(e[r],n);i.parentNode=t,s.push(i)}return s}function tf(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const m2e=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),Wt="�";var L;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(L||(L={}));const Vr={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function bV(e){return e>=55296&&e<=57343}function p2e(e){return e>=56320&&e<=57343}function g2e(e,t){return(e-55296)*1024+9216+t}function yV(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function _V(e){return e>=64976&&e<=65007||m2e.has(e)}var te;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(te||(te={}));const b2e=65536;class y2e{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=b2e,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:s,offset:i}=this,a=s+n,o=i+n;return{code:t,startLine:r,endLine:r,startCol:a,endCol:a,startOffset:o,endOffset:o}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(p2e(n))return this.pos++,this._addGap(),g2e(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,L.EOF;return this._err(te.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,L.EOF;const r=this.html.charCodeAt(n);return r===L.CARRIAGE_RETURN?L.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,L.EOF;let t=this.html.charCodeAt(this.pos);return t===L.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,L.LINE_FEED):t===L.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,bV(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===L.LINE_FEED||t===L.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){yV(t)?this._err(te.controlCharacterInInputStream):_V(t)&&this._err(te.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var at;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(at||(at={}));function kV(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const _2e=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),k2e=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function E2e(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=k2e.get(e))!==null&&t!==void 0?t:e}var Jn;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Jn||(Jn={}));const w2e=32;var bo;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(bo||(bo={}));function qv(e){return e>=Jn.ZERO&&e<=Jn.NINE}function S2e(e){return e>=Jn.UPPER_A&&e<=Jn.UPPER_F||e>=Jn.LOWER_A&&e<=Jn.LOWER_F}function v2e(e){return e>=Jn.UPPER_A&&e<=Jn.UPPER_Z||e>=Jn.LOWER_A&&e<=Jn.LOWER_Z||qv(e)}function x2e(e){return e===Jn.EQUALS||v2e(e)}var Un;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Un||(Un={}));var Aa;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Aa||(Aa={}));class T2e{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Un.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Aa.Strict}startEntity(t){this.decodeMode=t,this.state=Un.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Un.EntityStart:return t.charCodeAt(n)===Jn.NUM?(this.state=Un.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Un.NamedEntity,this.stateNamedEntity(t,n));case Un.NumericStart:return this.stateNumericStart(t,n);case Un.NumericDecimal:return this.stateNumericDecimal(t,n);case Un.NumericHex:return this.stateNumericHex(t,n);case Un.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|w2e)===Jn.LOWER_X?(this.state=Un.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Un.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,s){if(n!==r){const i=r-n;this.result=this.result*Math.pow(s,i)+Number.parseInt(t.substr(n,i),s),this.consumed+=i}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(qv(s)||S2e(s))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(s,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(qv(s))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(s,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Jn.SEMI)this.consumed+=1;else if(this.decodeMode===Aa.Strict)return 0;return this.emitCodePoint(E2e(this.result),this.consumed),this.errors&&(t!==Jn.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let s=r[this.treeIndex],i=(s&bo.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const a=t.charCodeAt(n);if(this.treeIndex=I2e(r,s,this.treeIndex+Math.max(1,i),a),this.treeIndex<0)return this.result===0||this.decodeMode===Aa.Attribute&&(i===0||x2e(a))?0:this.emitNotTerminatedNamedEntity();if(s=r[this.treeIndex],i=(s&bo.VALUE_LENGTH)>>14,i!==0){if(a===Jn.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==Aa.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,s=(r[n]&bo.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,s,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:s}=this;return this.emitCodePoint(n===1?s[t]&~bo.VALUE_LENGTH:s[t+1],r),n===3&&this.emitCodePoint(s[t+2],r),r}end(){var t;switch(this.state){case Un.NamedEntity:return this.result!==0&&(this.decodeMode!==Aa.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Un.NumericDecimal:return this.emitNumericEntity(0,2);case Un.NumericHex:return this.emitNumericEntity(0,3);case Un.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Un.EntityStart:return 0}}}function I2e(e,t,n,r){const s=(t&bo.BRANCH_LENGTH)>>7,i=t&bo.JUMP_TABLE;if(s===0)return i!==0&&r===i?n:-1;if(i){const c=r-i;return c<0||c>=s?-1:e[n+c]-1}let a=n,o=a+s-1;for(;a<=o;){const c=a+o>>>1,u=e[c];if(u<r)a=c+1;else if(u>r)o=c-1;else return e[c+s]}return-1}var oe;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(oe||(oe={}));var nu;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(nu||(nu={}));var Rs;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Rs||(Rs={}));var Y;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(Y||(Y={}));var E;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(E||(E={}));const A2e=new Map([[Y.A,E.A],[Y.ADDRESS,E.ADDRESS],[Y.ANNOTATION_XML,E.ANNOTATION_XML],[Y.APPLET,E.APPLET],[Y.AREA,E.AREA],[Y.ARTICLE,E.ARTICLE],[Y.ASIDE,E.ASIDE],[Y.B,E.B],[Y.BASE,E.BASE],[Y.BASEFONT,E.BASEFONT],[Y.BGSOUND,E.BGSOUND],[Y.BIG,E.BIG],[Y.BLOCKQUOTE,E.BLOCKQUOTE],[Y.BODY,E.BODY],[Y.BR,E.BR],[Y.BUTTON,E.BUTTON],[Y.CAPTION,E.CAPTION],[Y.CENTER,E.CENTER],[Y.CODE,E.CODE],[Y.COL,E.COL],[Y.COLGROUP,E.COLGROUP],[Y.DD,E.DD],[Y.DESC,E.DESC],[Y.DETAILS,E.DETAILS],[Y.DIALOG,E.DIALOG],[Y.DIR,E.DIR],[Y.DIV,E.DIV],[Y.DL,E.DL],[Y.DT,E.DT],[Y.EM,E.EM],[Y.EMBED,E.EMBED],[Y.FIELDSET,E.FIELDSET],[Y.FIGCAPTION,E.FIGCAPTION],[Y.FIGURE,E.FIGURE],[Y.FONT,E.FONT],[Y.FOOTER,E.FOOTER],[Y.FOREIGN_OBJECT,E.FOREIGN_OBJECT],[Y.FORM,E.FORM],[Y.FRAME,E.FRAME],[Y.FRAMESET,E.FRAMESET],[Y.H1,E.H1],[Y.H2,E.H2],[Y.H3,E.H3],[Y.H4,E.H4],[Y.H5,E.H5],[Y.H6,E.H6],[Y.HEAD,E.HEAD],[Y.HEADER,E.HEADER],[Y.HGROUP,E.HGROUP],[Y.HR,E.HR],[Y.HTML,E.HTML],[Y.I,E.I],[Y.IMG,E.IMG],[Y.IMAGE,E.IMAGE],[Y.INPUT,E.INPUT],[Y.IFRAME,E.IFRAME],[Y.KEYGEN,E.KEYGEN],[Y.LABEL,E.LABEL],[Y.LI,E.LI],[Y.LINK,E.LINK],[Y.LISTING,E.LISTING],[Y.MAIN,E.MAIN],[Y.MALIGNMARK,E.MALIGNMARK],[Y.MARQUEE,E.MARQUEE],[Y.MATH,E.MATH],[Y.MENU,E.MENU],[Y.META,E.META],[Y.MGLYPH,E.MGLYPH],[Y.MI,E.MI],[Y.MO,E.MO],[Y.MN,E.MN],[Y.MS,E.MS],[Y.MTEXT,E.MTEXT],[Y.NAV,E.NAV],[Y.NOBR,E.NOBR],[Y.NOFRAMES,E.NOFRAMES],[Y.NOEMBED,E.NOEMBED],[Y.NOSCRIPT,E.NOSCRIPT],[Y.OBJECT,E.OBJECT],[Y.OL,E.OL],[Y.OPTGROUP,E.OPTGROUP],[Y.OPTION,E.OPTION],[Y.P,E.P],[Y.PARAM,E.PARAM],[Y.PLAINTEXT,E.PLAINTEXT],[Y.PRE,E.PRE],[Y.RB,E.RB],[Y.RP,E.RP],[Y.RT,E.RT],[Y.RTC,E.RTC],[Y.RUBY,E.RUBY],[Y.S,E.S],[Y.SCRIPT,E.SCRIPT],[Y.SEARCH,E.SEARCH],[Y.SECTION,E.SECTION],[Y.SELECT,E.SELECT],[Y.SOURCE,E.SOURCE],[Y.SMALL,E.SMALL],[Y.SPAN,E.SPAN],[Y.STRIKE,E.STRIKE],[Y.STRONG,E.STRONG],[Y.STYLE,E.STYLE],[Y.SUB,E.SUB],[Y.SUMMARY,E.SUMMARY],[Y.SUP,E.SUP],[Y.TABLE,E.TABLE],[Y.TBODY,E.TBODY],[Y.TEMPLATE,E.TEMPLATE],[Y.TEXTAREA,E.TEXTAREA],[Y.TFOOT,E.TFOOT],[Y.TD,E.TD],[Y.TH,E.TH],[Y.THEAD,E.THEAD],[Y.TITLE,E.TITLE],[Y.TR,E.TR],[Y.TRACK,E.TRACK],[Y.TT,E.TT],[Y.U,E.U],[Y.UL,E.UL],[Y.SVG,E.SVG],[Y.VAR,E.VAR],[Y.WBR,E.WBR],[Y.XMP,E.XMP]]);function nf(e){var t;return(t=A2e.get(e))!==null&&t!==void 0?t:E.UNKNOWN}const de=E,C2e={[oe.HTML]:new Set([de.ADDRESS,de.APPLET,de.AREA,de.ARTICLE,de.ASIDE,de.BASE,de.BASEFONT,de.BGSOUND,de.BLOCKQUOTE,de.BODY,de.BR,de.BUTTON,de.CAPTION,de.CENTER,de.COL,de.COLGROUP,de.DD,de.DETAILS,de.DIR,de.DIV,de.DL,de.DT,de.EMBED,de.FIELDSET,de.FIGCAPTION,de.FIGURE,de.FOOTER,de.FORM,de.FRAME,de.FRAMESET,de.H1,de.H2,de.H3,de.H4,de.H5,de.H6,de.HEAD,de.HEADER,de.HGROUP,de.HR,de.HTML,de.IFRAME,de.IMG,de.INPUT,de.LI,de.LINK,de.LISTING,de.MAIN,de.MARQUEE,de.MENU,de.META,de.NAV,de.NOEMBED,de.NOFRAMES,de.NOSCRIPT,de.OBJECT,de.OL,de.P,de.PARAM,de.PLAINTEXT,de.PRE,de.SCRIPT,de.SECTION,de.SELECT,de.SOURCE,de.STYLE,de.SUMMARY,de.TABLE,de.TBODY,de.TD,de.TEMPLATE,de.TEXTAREA,de.TFOOT,de.TH,de.THEAD,de.TITLE,de.TR,de.TRACK,de.UL,de.WBR,de.XMP]),[oe.MATHML]:new Set([de.MI,de.MO,de.MN,de.MS,de.MTEXT,de.ANNOTATION_XML]),[oe.SVG]:new Set([de.TITLE,de.FOREIGN_OBJECT,de.DESC]),[oe.XLINK]:new Set,[oe.XML]:new Set,[oe.XMLNS]:new Set},Gv=new Set([de.H1,de.H2,de.H3,de.H4,de.H5,de.H6]);Y.STYLE,Y.SCRIPT,Y.XMP,Y.IFRAME,Y.NOEMBED,Y.NOFRAMES,Y.PLAINTEXT;var j;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(j||(j={}));const fn={DATA:j.DATA,RCDATA:j.RCDATA,RAWTEXT:j.RAWTEXT,SCRIPT_DATA:j.SCRIPT_DATA,PLAINTEXT:j.PLAINTEXT,CDATA_SECTION:j.CDATA_SECTION};function P2e(e){return e>=L.DIGIT_0&&e<=L.DIGIT_9}function nh(e){return e>=L.LATIN_CAPITAL_A&&e<=L.LATIN_CAPITAL_Z}function N2e(e){return e>=L.LATIN_SMALL_A&&e<=L.LATIN_SMALL_Z}function io(e){return N2e(e)||nh(e)}function N3(e){return io(e)||P2e(e)}function a0(e){return e+32}function EV(e){return e===L.SPACE||e===L.LINE_FEED||e===L.TABULATION||e===L.FORM_FEED}function R3(e){return EV(e)||e===L.SOLIDUS||e===L.GREATER_THAN_SIGN}function R2e(e){return e===L.NULL?te.nullCharacterReference:e>1114111?te.characterReferenceOutsideUnicodeRange:bV(e)?te.surrogateCharacterReference:_V(e)?te.noncharacterCharacterReference:yV(e)||e===L.CARRIAGE_RETURN?te.controlCharacterReference:null}class O2e{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=j.DATA,this.returnState=j.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new y2e(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new T2e(_2e,(r,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(te.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(te.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const s=R2e(r);s&&this._err(s,1)}}:void 0)}_err(t,n=0){var r,s;(s=(r=this.handler).onParseError)===null||s===void 0||s.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:at.START_TAG,tagName:"",tagID:E.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:at.END_TAG,tagName:"",tagID:E.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:at.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:at.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(kV(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const s=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);s[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(te.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=nf(t.tagName),t.type===at.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(te.endTagWithAttributes),t.selfClosing&&this._err(te.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case at.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case at.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case at.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:at.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=EV(t)?at.WHITESPACE_CHARACTER:t===L.NULL?at.NULL_CHARACTER:at.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(at.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=j.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Aa.Attribute:Aa.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===j.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===j.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===j.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case j.DATA:{this._stateData(t);break}case j.RCDATA:{this._stateRcdata(t);break}case j.RAWTEXT:{this._stateRawtext(t);break}case j.SCRIPT_DATA:{this._stateScriptData(t);break}case j.PLAINTEXT:{this._statePlaintext(t);break}case j.TAG_OPEN:{this._stateTagOpen(t);break}case j.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case j.TAG_NAME:{this._stateTagName(t);break}case j.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case j.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case j.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case j.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case j.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case j.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case j.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case j.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case j.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case j.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case j.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case j.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case j.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case j.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case j.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case j.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case j.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case j.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case j.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case j.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case j.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case j.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case j.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case j.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case j.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case j.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case j.BOGUS_COMMENT:{this._stateBogusComment(t);break}case j.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case j.COMMENT_START:{this._stateCommentStart(t);break}case j.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case j.COMMENT:{this._stateComment(t);break}case j.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case j.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case j.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case j.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case j.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case j.COMMENT_END:{this._stateCommentEnd(t);break}case j.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case j.DOCTYPE:{this._stateDoctype(t);break}case j.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case j.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case j.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case j.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case j.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case j.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case j.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case j.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case j.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case j.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case j.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case j.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case j.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case j.CDATA_SECTION:{this._stateCdataSection(t);break}case j.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case j.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case j.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case j.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case L.LESS_THAN_SIGN:{this.state=j.TAG_OPEN;break}case L.AMPERSAND:{this._startCharacterReference();break}case L.NULL:{this._err(te.unexpectedNullCharacter),this._emitCodePoint(t);break}case L.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case L.AMPERSAND:{this._startCharacterReference();break}case L.LESS_THAN_SIGN:{this.state=j.RCDATA_LESS_THAN_SIGN;break}case L.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(Wt);break}case L.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case L.LESS_THAN_SIGN:{this.state=j.RAWTEXT_LESS_THAN_SIGN;break}case L.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(Wt);break}case L.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case L.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_LESS_THAN_SIGN;break}case L.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(Wt);break}case L.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case L.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(Wt);break}case L.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(io(t))this._createStartTagToken(),this.state=j.TAG_NAME,this._stateTagName(t);else switch(t){case L.EXCLAMATION_MARK:{this.state=j.MARKUP_DECLARATION_OPEN;break}case L.SOLIDUS:{this.state=j.END_TAG_OPEN;break}case L.QUESTION_MARK:{this._err(te.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=j.BOGUS_COMMENT,this._stateBogusComment(t);break}case L.EOF:{this._err(te.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=j.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(io(t))this._createEndTagToken(),this.state=j.TAG_NAME,this._stateTagName(t);else switch(t){case L.GREATER_THAN_SIGN:{this._err(te.missingEndTagName),this.state=j.DATA;break}case L.EOF:{this._err(te.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=j.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this.state=j.BEFORE_ATTRIBUTE_NAME;break}case L.SOLIDUS:{this.state=j.SELF_CLOSING_START_TAG;break}case L.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentTagToken();break}case L.NULL:{this._err(te.unexpectedNullCharacter),n.tagName+=Wt;break}case L.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(nh(t)?a0(t):t)}}_stateRcdataLessThanSign(t){t===L.SOLIDUS?this.state=j.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=j.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){io(t)?(this.state=j.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=j.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=j.BEFORE_ATTRIBUTE_NAME,!1;case L.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=j.SELF_CLOSING_START_TAG,!1;case L.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=j.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=j.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===L.SOLIDUS?this.state=j.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=j.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){io(t)?(this.state=j.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=j.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=j.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case L.SOLIDUS:{this.state=j.SCRIPT_DATA_END_TAG_OPEN;break}case L.EXCLAMATION_MARK:{this.state=j.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=j.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){io(t)?(this.state=j.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=j.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=j.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===L.HYPHEN_MINUS?(this.state=j.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=j.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===L.HYPHEN_MINUS?(this.state=j.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=j.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case L.HYPHEN_MINUS:{this.state=j.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case L.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case L.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(Wt);break}case L.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case L.HYPHEN_MINUS:{this.state=j.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case L.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case L.NULL:{this._err(te.unexpectedNullCharacter),this.state=j.SCRIPT_DATA_ESCAPED,this._emitChars(Wt);break}case L.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=j.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case L.HYPHEN_MINUS:{this._emitChars("-");break}case L.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case L.GREATER_THAN_SIGN:{this.state=j.SCRIPT_DATA,this._emitChars(">");break}case L.NULL:{this._err(te.unexpectedNullCharacter),this.state=j.SCRIPT_DATA_ESCAPED,this._emitChars(Wt);break}case L.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=j.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===L.SOLIDUS?this.state=j.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:io(t)?(this._emitChars("<"),this.state=j.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=j.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){io(t)?(this.state=j.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=j.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=j.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Vr.SCRIPT,!1)&&R3(this.preprocessor.peek(Vr.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Vr.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=j.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case L.HYPHEN_MINUS:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case L.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case L.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(Wt);break}case L.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case L.HYPHEN_MINUS:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case L.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case L.NULL:{this._err(te.unexpectedNullCharacter),this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Wt);break}case L.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case L.HYPHEN_MINUS:{this._emitChars("-");break}case L.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case L.GREATER_THAN_SIGN:{this.state=j.SCRIPT_DATA,this._emitChars(">");break}case L.NULL:{this._err(te.unexpectedNullCharacter),this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Wt);break}case L.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===L.SOLIDUS?(this.state=j.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Vr.SCRIPT,!1)&&R3(this.preprocessor.peek(Vr.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Vr.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=j.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.SOLIDUS:case L.GREATER_THAN_SIGN:case L.EOF:{this.state=j.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case L.EQUALS_SIGN:{this._err(te.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=j.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=j.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:case L.SOLIDUS:case L.GREATER_THAN_SIGN:case L.EOF:{this._leaveAttrName(),this.state=j.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case L.EQUALS_SIGN:{this._leaveAttrName(),this.state=j.BEFORE_ATTRIBUTE_VALUE;break}case L.QUOTATION_MARK:case L.APOSTROPHE:case L.LESS_THAN_SIGN:{this._err(te.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case L.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.name+=Wt;break}default:this.currentAttr.name+=String.fromCodePoint(nh(t)?a0(t):t)}}_stateAfterAttributeName(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.SOLIDUS:{this.state=j.SELF_CLOSING_START_TAG;break}case L.EQUALS_SIGN:{this.state=j.BEFORE_ATTRIBUTE_VALUE;break}case L.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentTagToken();break}case L.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=j.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.QUOTATION_MARK:{this.state=j.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case L.APOSTROPHE:{this.state=j.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case L.GREATER_THAN_SIGN:{this._err(te.missingAttributeValue),this.state=j.DATA,this.emitCurrentTagToken();break}default:this.state=j.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case L.QUOTATION_MARK:{this.state=j.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case L.AMPERSAND:{this._startCharacterReference();break}case L.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=Wt;break}case L.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case L.APOSTROPHE:{this.state=j.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case L.AMPERSAND:{this._startCharacterReference();break}case L.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=Wt;break}case L.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this._leaveAttrValue(),this.state=j.BEFORE_ATTRIBUTE_NAME;break}case L.AMPERSAND:{this._startCharacterReference();break}case L.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=j.DATA,this.emitCurrentTagToken();break}case L.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=Wt;break}case L.QUOTATION_MARK:case L.APOSTROPHE:case L.LESS_THAN_SIGN:case L.EQUALS_SIGN:case L.GRAVE_ACCENT:{this._err(te.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case L.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this._leaveAttrValue(),this.state=j.BEFORE_ATTRIBUTE_NAME;break}case L.SOLIDUS:{this._leaveAttrValue(),this.state=j.SELF_CLOSING_START_TAG;break}case L.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=j.DATA,this.emitCurrentTagToken();break}case L.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.missingWhitespaceBetweenAttributes),this.state=j.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case L.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=j.DATA,this.emitCurrentTagToken();break}case L.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.unexpectedSolidusInTag),this.state=j.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case L.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentComment(n);break}case L.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case L.NULL:{this._err(te.unexpectedNullCharacter),n.data+=Wt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Vr.DASH_DASH,!0)?(this._createCommentToken(Vr.DASH_DASH.length+1),this.state=j.COMMENT_START):this._consumeSequenceIfMatch(Vr.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Vr.DOCTYPE.length+1),this.state=j.DOCTYPE):this._consumeSequenceIfMatch(Vr.CDATA_START,!0)?this.inForeignNode?this.state=j.CDATA_SECTION:(this._err(te.cdataInHtmlContent),this._createCommentToken(Vr.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=j.BOGUS_COMMENT):this._ensureHibernation()||(this._err(te.incorrectlyOpenedComment),this._createCommentToken(2),this.state=j.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case L.HYPHEN_MINUS:{this.state=j.COMMENT_START_DASH;break}case L.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=j.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=j.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case L.HYPHEN_MINUS:{this.state=j.COMMENT_END;break}case L.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=j.DATA,this.emitCurrentComment(n);break}case L.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=j.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case L.HYPHEN_MINUS:{this.state=j.COMMENT_END_DASH;break}case L.LESS_THAN_SIGN:{n.data+="<",this.state=j.COMMENT_LESS_THAN_SIGN;break}case L.NULL:{this._err(te.unexpectedNullCharacter),n.data+=Wt;break}case L.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case L.EXCLAMATION_MARK:{n.data+="!",this.state=j.COMMENT_LESS_THAN_SIGN_BANG;break}case L.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=j.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===L.HYPHEN_MINUS?this.state=j.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=j.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===L.HYPHEN_MINUS?this.state=j.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=j.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==L.GREATER_THAN_SIGN&&t!==L.EOF&&this._err(te.nestedComment),this.state=j.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case L.HYPHEN_MINUS:{this.state=j.COMMENT_END;break}case L.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=j.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case L.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentComment(n);break}case L.EXCLAMATION_MARK:{this.state=j.COMMENT_END_BANG;break}case L.HYPHEN_MINUS:{n.data+="-";break}case L.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=j.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case L.HYPHEN_MINUS:{n.data+="--!",this.state=j.COMMENT_END_DASH;break}case L.GREATER_THAN_SIGN:{this._err(te.incorrectlyClosedComment),this.state=j.DATA,this.emitCurrentComment(n);break}case L.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=j.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this.state=j.BEFORE_DOCTYPE_NAME;break}case L.GREATER_THAN_SIGN:{this.state=j.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case L.EOF:{this._err(te.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingWhitespaceBeforeDoctypeName),this.state=j.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(nh(t))this._createDoctypeToken(String.fromCharCode(a0(t))),this.state=j.DOCTYPE_NAME;else switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.NULL:{this._err(te.unexpectedNullCharacter),this._createDoctypeToken(Wt),this.state=j.DOCTYPE_NAME;break}case L.GREATER_THAN_SIGN:{this._err(te.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=j.DATA;break}case L.EOF:{this._err(te.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=j.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this.state=j.AFTER_DOCTYPE_NAME;break}case L.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentDoctype(n);break}case L.NULL:{this._err(te.unexpectedNullCharacter),n.name+=Wt;break}case L.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(nh(t)?a0(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentDoctype(n);break}case L.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Vr.PUBLIC,!1)?this.state=j.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Vr.SYSTEM,!1)?this.state=j.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(te.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this.state=j.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case L.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=j.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case L.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=j.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case L.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=j.DATA,this.emitCurrentDoctype(n);break}case L.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.QUOTATION_MARK:{n.publicId="",this.state=j.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case L.APOSTROPHE:{n.publicId="",this.state=j.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case L.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=j.DATA,this.emitCurrentDoctype(n);break}case L.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case L.QUOTATION_MARK:{this.state=j.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case L.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=Wt;break}case L.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=j.DATA;break}case L.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case L.APOSTROPHE:{this.state=j.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case L.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=Wt;break}case L.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=j.DATA;break}case L.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this.state=j.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case L.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentDoctype(n);break}case L.QUOTATION_MARK:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case L.APOSTROPHE:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case L.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=j.DATA;break}case L.QUOTATION_MARK:{n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case L.APOSTROPHE:{n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case L.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this.state=j.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case L.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case L.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case L.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=j.DATA,this.emitCurrentDoctype(n);break}case L.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.QUOTATION_MARK:{n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case L.APOSTROPHE:{n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case L.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=j.DATA,this.emitCurrentDoctype(n);break}case L.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case L.QUOTATION_MARK:{this.state=j.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case L.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=Wt;break}case L.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=j.DATA;break}case L.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case L.APOSTROPHE:{this.state=j.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case L.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=Wt;break}case L.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=j.DATA;break}case L.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=j.DATA;break}case L.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case L.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=j.DATA;break}case L.NULL:{this._err(te.unexpectedNullCharacter);break}case L.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case L.RIGHT_SQUARE_BRACKET:{this.state=j.CDATA_SECTION_BRACKET;break}case L.EOF:{this._err(te.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===L.RIGHT_SQUARE_BRACKET?this.state=j.CDATA_SECTION_END:(this._emitChars("]"),this.state=j.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case L.GREATER_THAN_SIGN:{this.state=j.DATA;break}case L.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=j.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(L.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&N3(this.preprocessor.peek(1))?j.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){N3(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===L.SEMICOLON&&this._err(te.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const wV=new Set([E.DD,E.DT,E.LI,E.OPTGROUP,E.OPTION,E.P,E.RB,E.RP,E.RT,E.RTC]),O3=new Set([...wV,E.CAPTION,E.COLGROUP,E.TBODY,E.TD,E.TFOOT,E.TH,E.THEAD,E.TR]),Fy=new Set([E.APPLET,E.CAPTION,E.HTML,E.MARQUEE,E.OBJECT,E.TABLE,E.TD,E.TEMPLATE,E.TH]),L2e=new Set([...Fy,E.OL,E.UL]),D2e=new Set([...Fy,E.BUTTON]),L3=new Set([E.ANNOTATION_XML,E.MI,E.MN,E.MO,E.MS,E.MTEXT]),D3=new Set([E.DESC,E.FOREIGN_OBJECT,E.TITLE]),$2e=new Set([E.TR,E.TEMPLATE,E.HTML]),M2e=new Set([E.TBODY,E.TFOOT,E.THEAD,E.TEMPLATE,E.HTML]),j2e=new Set([E.TABLE,E.TEMPLATE,E.HTML]),F2e=new Set([E.TD,E.TH]);class B2e{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=E.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===E.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===oe.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const s=this._indexOf(t)+1;this.items.splice(s,0,n),this.tagIDs.splice(s,0,r),this.stackTop++,s===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,s===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==oe.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Gv,oe.HTML)}popUntilTableCellPopped(){this.popUntilPopped(F2e,oe.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(j2e,oe.HTML)}clearBackToTableBodyContext(){this.clearBackTo(M2e,oe.HTML)}clearBackToTableRowContext(){this.clearBackTo($2e,oe.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===E.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===E.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const s=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case oe.HTML:{if(s===t)return!0;if(n.has(s))return!1;break}case oe.SVG:{if(D3.has(s))return!1;break}case oe.MATHML:{if(L3.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Fy)}hasInListItemScope(t){return this.hasInDynamicScope(t,L2e)}hasInButtonScope(t){return this.hasInDynamicScope(t,D2e)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case oe.HTML:{if(Gv.has(n))return!0;if(Fy.has(n))return!1;break}case oe.SVG:{if(D3.has(n))return!1;break}case oe.MATHML:{if(L3.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===oe.HTML)switch(this.tagIDs[n]){case t:return!0;case E.TABLE:case E.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===oe.HTML)switch(this.tagIDs[t]){case E.TBODY:case E.THEAD:case E.TFOOT:return!0;case E.TABLE:case E.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===oe.HTML)switch(this.tagIDs[n]){case t:return!0;case E.OPTION:case E.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&wV.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&O3.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&O3.has(this.currentTagId);)this.pop()}}const sw=3;var ji;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(ji||(ji={}));const $3={type:ji.Marker};class z2e{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],s=n.length,i=this.treeAdapter.getTagName(t),a=this.treeAdapter.getNamespaceURI(t);for(let o=0;o<this.entries.length;o++){const c=this.entries[o];if(c.type===ji.Marker)break;const{element:u}=c;if(this.treeAdapter.getTagName(u)===i&&this.treeAdapter.getNamespaceURI(u)===a){const l=this.treeAdapter.getAttrList(u);l.length===s&&r.push({idx:o,attrs:l})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<sw)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<sw)return;const s=new Map(n.map(a=>[a.name,a.value]));let i=0;for(let a=0;a<r.length;a++){const o=r[a];o.attrs.every(c=>s.get(c.name)===c.value)&&(i+=1,i>=sw&&this.entries.splice(o.idx,1))}}insertMarker(){this.entries.unshift($3)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:ji.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:ji.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf($3);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===ji.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===ji.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===ji.Element&&n.element===t)}}const ao={createDocument(){return{nodeName:"#document",mode:Rs.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const s=e.childNodes.find(i=>i.nodeName==="#documentType");if(s)s.name=t,s.publicId=n,s.systemId=r;else{const i={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};ao.appendChild(e,i)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(ao.isTextNode(n)){n.value+=t;return}}ao.appendChild(e,ao.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&ao.isTextNode(r)?r.value+=t:ao.insertBefore(e,ao.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},SV="html",U2e="about:legacy-compat",V2e="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",vV=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],H2e=[...vV,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],q2e=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),xV=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],G2e=[...xV,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function M3(e,t){return t.some(n=>e.startsWith(n))}function K2e(e){return e.name===SV&&e.publicId===null&&(e.systemId===null||e.systemId===U2e)}function W2e(e){if(e.name!==SV)return Rs.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===V2e)return Rs.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),q2e.has(n))return Rs.QUIRKS;let r=t===null?H2e:vV;if(M3(n,r))return Rs.QUIRKS;if(r=t===null?xV:G2e,M3(n,r))return Rs.LIMITED_QUIRKS}return Rs.NO_QUIRKS}const j3={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},J2e="definitionurl",Y2e="definitionURL",Q2e=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),X2e=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:oe.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:oe.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:oe.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:oe.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:oe.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:oe.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:oe.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:oe.XML}],["xml:space",{prefix:"xml",name:"space",namespace:oe.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:oe.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:oe.XMLNS}]]),Z2e=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),ePe=new Set([E.B,E.BIG,E.BLOCKQUOTE,E.BODY,E.BR,E.CENTER,E.CODE,E.DD,E.DIV,E.DL,E.DT,E.EM,E.EMBED,E.H1,E.H2,E.H3,E.H4,E.H5,E.H6,E.HEAD,E.HR,E.I,E.IMG,E.LI,E.LISTING,E.MENU,E.META,E.NOBR,E.OL,E.P,E.PRE,E.RUBY,E.S,E.SMALL,E.SPAN,E.STRONG,E.STRIKE,E.SUB,E.SUP,E.TABLE,E.TT,E.U,E.UL,E.VAR]);function tPe(e){const t=e.tagID;return t===E.FONT&&e.attrs.some(({name:r})=>r===nu.COLOR||r===nu.SIZE||r===nu.FACE)||ePe.has(t)}function TV(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===J2e){e.attrs[t].name=Y2e;break}}function IV(e){for(let t=0;t<e.attrs.length;t++){const n=Q2e.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function AC(e){for(let t=0;t<e.attrs.length;t++){const n=X2e.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function nPe(e){const t=Z2e.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=nf(e.tagName))}function rPe(e,t){return t===oe.MATHML&&(e===E.MI||e===E.MO||e===E.MN||e===E.MS||e===E.MTEXT)}function sPe(e,t,n){if(t===oe.MATHML&&e===E.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===nu.ENCODING){const s=n[r].value.toLowerCase();return s===j3.TEXT_HTML||s===j3.APPLICATION_XML}}return t===oe.SVG&&(e===E.FOREIGN_OBJECT||e===E.DESC||e===E.TITLE)}function iPe(e,t,n,r){return(!r||r===oe.HTML)&&sPe(e,t,n)||(!r||r===oe.MATHML)&&rPe(e,t)}const aPe="hidden",oPe=8,cPe=3;var U;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(U||(U={}));const uPe={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},AV=new Set([E.TABLE,E.TBODY,E.TFOOT,E.THEAD,E.TR]),F3={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:ao,onParseError:null};class B3{constructor(t,n,r=null,s=null){this.fragmentContext=r,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=U.INITIAL,this.originalInsertionMode=U.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...F3,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new O2e(this.options,this),this.activeFormattingElements=new z2e(this.treeAdapter),this.fragmentContextID=r?nf(this.treeAdapter.getTagName(r)):E.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new B2e(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...F3,...n};t??(t=r.treeAdapter.createElement(Y.TEMPLATE,oe.HTML,[]));const s=r.treeAdapter.createElement("documentmock",oe.HTML,[]),i=new this(r,s,t);return i.fragmentContextID===E.TEMPLATE&&i.tmplInsertionModeStack.unshift(U.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var s;if(!this.onParseError)return;const i=(s=t.location)!==null&&s!==void 0?s:uPe,a={code:n,startLine:i.startLine,startCol:i.startCol,startOffset:i.startOffset,endLine:r?i.startLine:i.endLine,endCol:r?i.startCol:i.endCol,endOffset:r?i.startOffset:i.endOffset};this.onParseError(a)}onItemPush(t,n,r){var s,i;(i=(s=this.treeAdapter).onItemPush)===null||i===void 0||i.call(s,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,s;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(s=(r=this.treeAdapter).onItemPop)===null||s===void 0||s.call(r,t,this.openElements.current),n){let i,a;this.openElements.stackTop===0&&this.fragmentContext?(i=this.fragmentContext,a=this.fragmentContextID):{current:i,currentTagId:a}=this.openElements,this._setContextModes(i,a)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===oe.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,oe.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=U.TEXT}switchToPlaintextParsing(){this.insertionMode=U.TEXT,this.originalInsertionMode=U.IN_BODY,this.tokenizer.state=fn.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===Y.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==oe.HTML))switch(this.fragmentContextID){case E.TITLE:case E.TEXTAREA:{this.tokenizer.state=fn.RCDATA;break}case E.STYLE:case E.XMP:case E.IFRAME:case E.NOEMBED:case E.NOFRAMES:case E.NOSCRIPT:{this.tokenizer.state=fn.RAWTEXT;break}case E.SCRIPT:{this.tokenizer.state=fn.SCRIPT_DATA;break}case E.PLAINTEXT:{this.tokenizer.state=fn.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",s=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,s),t.location){const a=this.treeAdapter.getChildNodes(this.document).find(o=>this.treeAdapter.isDocumentTypeNode(o));a&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,oe.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,oe.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(Y.HTML,oe.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,E.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const s=this.treeAdapter.getChildNodes(n),i=r?s.lastIndexOf(r):s.length,a=s[i-1];if(this.treeAdapter.getNodeSourceCodeLocation(a)){const{endLine:c,endCol:u,endOffset:l}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:c,endCol:u,endOffset:l})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,s=this.treeAdapter.getTagName(t),i=n.type===at.END_TAG&&s===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,i)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===E.SVG&&this.treeAdapter.getTagName(n)===Y.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===oe.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===E.MGLYPH||t.tagID===E.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,oe.HTML)}_processToken(t){switch(t.type){case at.CHARACTER:{this.onCharacter(t);break}case at.NULL_CHARACTER:{this.onNullCharacter(t);break}case at.COMMENT:{this.onComment(t);break}case at.DOCTYPE:{this.onDoctype(t);break}case at.START_TAG:{this._processStartTag(t);break}case at.END_TAG:{this.onEndTag(t);break}case at.EOF:{this.onEof(t);break}case at.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const s=this.treeAdapter.getNamespaceURI(n),i=this.treeAdapter.getAttrList(n);return iPe(t,s,i,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(s=>s.type===ji.Marker||this.openElements.contains(s.element)),r=n===-1?t-1:n-1;for(let s=r;s>=0;s--){const i=this.activeFormattingElements.entries[s];this._insertElement(i.token,this.treeAdapter.getNamespaceURI(i.element)),i.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=U.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(E.P),this.openElements.popUntilTagNamePopped(E.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case E.TR:{this.insertionMode=U.IN_ROW;return}case E.TBODY:case E.THEAD:case E.TFOOT:{this.insertionMode=U.IN_TABLE_BODY;return}case E.CAPTION:{this.insertionMode=U.IN_CAPTION;return}case E.COLGROUP:{this.insertionMode=U.IN_COLUMN_GROUP;return}case E.TABLE:{this.insertionMode=U.IN_TABLE;return}case E.BODY:{this.insertionMode=U.IN_BODY;return}case E.FRAMESET:{this.insertionMode=U.IN_FRAMESET;return}case E.SELECT:{this._resetInsertionModeForSelect(t);return}case E.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case E.HTML:{this.insertionMode=this.headElement?U.AFTER_HEAD:U.BEFORE_HEAD;return}case E.TD:case E.TH:{if(t>0){this.insertionMode=U.IN_CELL;return}break}case E.HEAD:{if(t>0){this.insertionMode=U.IN_HEAD;return}break}}this.insertionMode=U.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===E.TEMPLATE)break;if(r===E.TABLE){this.insertionMode=U.IN_SELECT_IN_TABLE;return}}this.insertionMode=U.IN_SELECT}_isElementCausesFosterParenting(t){return AV.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case E.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===oe.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case E.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return C2e[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){FNe(this,t);return}switch(this.insertionMode){case U.INITIAL:{Of(this,t);break}case U.BEFORE_HTML:{Rh(this,t);break}case U.BEFORE_HEAD:{Oh(this,t);break}case U.IN_HEAD:{Lh(this,t);break}case U.IN_HEAD_NO_SCRIPT:{Dh(this,t);break}case U.AFTER_HEAD:{$h(this,t);break}case U.IN_BODY:case U.IN_CAPTION:case U.IN_CELL:case U.IN_TEMPLATE:{PV(this,t);break}case U.TEXT:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case U.IN_TABLE:case U.IN_TABLE_BODY:case U.IN_ROW:{iw(this,t);break}case U.IN_TABLE_TEXT:{$V(this,t);break}case U.IN_COLUMN_GROUP:{By(this,t);break}case U.AFTER_BODY:{zy(this,t);break}case U.AFTER_AFTER_BODY:{Z0(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){jNe(this,t);return}switch(this.insertionMode){case U.INITIAL:{Of(this,t);break}case U.BEFORE_HTML:{Rh(this,t);break}case U.BEFORE_HEAD:{Oh(this,t);break}case U.IN_HEAD:{Lh(this,t);break}case U.IN_HEAD_NO_SCRIPT:{Dh(this,t);break}case U.AFTER_HEAD:{$h(this,t);break}case U.TEXT:{this._insertCharacters(t);break}case U.IN_TABLE:case U.IN_TABLE_BODY:case U.IN_ROW:{iw(this,t);break}case U.IN_COLUMN_GROUP:{By(this,t);break}case U.AFTER_BODY:{zy(this,t);break}case U.AFTER_AFTER_BODY:{Z0(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Kv(this,t);return}switch(this.insertionMode){case U.INITIAL:case U.BEFORE_HTML:case U.BEFORE_HEAD:case U.IN_HEAD:case U.IN_HEAD_NO_SCRIPT:case U.AFTER_HEAD:case U.IN_BODY:case U.IN_TABLE:case U.IN_CAPTION:case U.IN_COLUMN_GROUP:case U.IN_TABLE_BODY:case U.IN_ROW:case U.IN_CELL:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:case U.IN_TEMPLATE:case U.IN_FRAMESET:case U.AFTER_FRAMESET:{Kv(this,t);break}case U.IN_TABLE_TEXT:{Lf(this,t);break}case U.AFTER_BODY:{gPe(this,t);break}case U.AFTER_AFTER_BODY:case U.AFTER_AFTER_FRAMESET:{bPe(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case U.INITIAL:{yPe(this,t);break}case U.BEFORE_HEAD:case U.IN_HEAD:case U.IN_HEAD_NO_SCRIPT:case U.AFTER_HEAD:{this._err(t,te.misplacedDoctype);break}case U.IN_TABLE_TEXT:{Lf(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,te.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?BNe(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case U.INITIAL:{Of(this,t);break}case U.BEFORE_HTML:{_Pe(this,t);break}case U.BEFORE_HEAD:{EPe(this,t);break}case U.IN_HEAD:{Ii(this,t);break}case U.IN_HEAD_NO_SCRIPT:{vPe(this,t);break}case U.AFTER_HEAD:{TPe(this,t);break}case U.IN_BODY:{vr(this,t);break}case U.IN_TABLE:{wd(this,t);break}case U.IN_TABLE_TEXT:{Lf(this,t);break}case U.IN_CAPTION:{wNe(this,t);break}case U.IN_COLUMN_GROUP:{NC(this,t);break}case U.IN_TABLE_BODY:{ok(this,t);break}case U.IN_ROW:{ck(this,t);break}case U.IN_CELL:{xNe(this,t);break}case U.IN_SELECT:{FV(this,t);break}case U.IN_SELECT_IN_TABLE:{INe(this,t);break}case U.IN_TEMPLATE:{CNe(this,t);break}case U.AFTER_BODY:{NNe(this,t);break}case U.IN_FRAMESET:{RNe(this,t);break}case U.AFTER_FRAMESET:{LNe(this,t);break}case U.AFTER_AFTER_BODY:{$Ne(this,t);break}case U.AFTER_AFTER_FRAMESET:{MNe(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?zNe(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case U.INITIAL:{Of(this,t);break}case U.BEFORE_HTML:{kPe(this,t);break}case U.BEFORE_HEAD:{wPe(this,t);break}case U.IN_HEAD:{SPe(this,t);break}case U.IN_HEAD_NO_SCRIPT:{xPe(this,t);break}case U.AFTER_HEAD:{IPe(this,t);break}case U.IN_BODY:{ak(this,t);break}case U.TEXT:{fNe(this,t);break}case U.IN_TABLE:{Am(this,t);break}case U.IN_TABLE_TEXT:{Lf(this,t);break}case U.IN_CAPTION:{SNe(this,t);break}case U.IN_COLUMN_GROUP:{vNe(this,t);break}case U.IN_TABLE_BODY:{Wv(this,t);break}case U.IN_ROW:{jV(this,t);break}case U.IN_CELL:{TNe(this,t);break}case U.IN_SELECT:{BV(this,t);break}case U.IN_SELECT_IN_TABLE:{ANe(this,t);break}case U.IN_TEMPLATE:{PNe(this,t);break}case U.AFTER_BODY:{UV(this,t);break}case U.IN_FRAMESET:{ONe(this,t);break}case U.AFTER_FRAMESET:{DNe(this,t);break}case U.AFTER_AFTER_BODY:{Z0(this,t);break}}}onEof(t){switch(this.insertionMode){case U.INITIAL:{Of(this,t);break}case U.BEFORE_HTML:{Rh(this,t);break}case U.BEFORE_HEAD:{Oh(this,t);break}case U.IN_HEAD:{Lh(this,t);break}case U.IN_HEAD_NO_SCRIPT:{Dh(this,t);break}case U.AFTER_HEAD:{$h(this,t);break}case U.IN_BODY:case U.IN_TABLE:case U.IN_CAPTION:case U.IN_COLUMN_GROUP:case U.IN_TABLE_BODY:case U.IN_ROW:case U.IN_CELL:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:{LV(this,t);break}case U.TEXT:{hNe(this,t);break}case U.IN_TABLE_TEXT:{Lf(this,t);break}case U.IN_TEMPLATE:{zV(this,t);break}case U.AFTER_BODY:case U.IN_FRAMESET:case U.AFTER_FRAMESET:case U.AFTER_AFTER_BODY:case U.AFTER_AFTER_FRAMESET:{PC(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===L.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case U.IN_HEAD:case U.IN_HEAD_NO_SCRIPT:case U.AFTER_HEAD:case U.TEXT:case U.IN_COLUMN_GROUP:case U.IN_SELECT:case U.IN_SELECT_IN_TABLE:case U.IN_FRAMESET:case U.AFTER_FRAMESET:{this._insertCharacters(t);break}case U.IN_BODY:case U.IN_CAPTION:case U.IN_CELL:case U.IN_TEMPLATE:case U.AFTER_BODY:case U.AFTER_AFTER_BODY:case U.AFTER_AFTER_FRAMESET:{CV(this,t);break}case U.IN_TABLE:case U.IN_TABLE_BODY:case U.IN_ROW:{iw(this,t);break}case U.IN_TABLE_TEXT:{DV(this,t);break}}}}function lPe(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):OV(e,t),n}function dPe(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const s=e.openElements.items[r];if(s===t.element)break;e._isSpecialElement(s,e.openElements.tagIDs[r])&&(n=s)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function fPe(e,t,n){let r=t,s=e.openElements.getCommonAncestor(t);for(let i=0,a=s;a!==n;i++,a=s){s=e.openElements.getCommonAncestor(a);const o=e.activeFormattingElements.getElementEntry(a),c=o&&i>=cPe;!o||c?(c&&e.activeFormattingElements.removeEntry(o),e.openElements.remove(a)):(a=hPe(e,o),r===t&&(e.activeFormattingElements.bookmark=o),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(a,r),r=a)}return r}function hPe(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function mPe(e,t,n){const r=e.treeAdapter.getTagName(t),s=nf(r);if(e._isElementCausesFosterParenting(s))e._fosterParentElement(n);else{const i=e.treeAdapter.getNamespaceURI(t);s===E.TEMPLATE&&i===oe.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function pPe(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:s}=n,i=e.treeAdapter.createElement(s.tagName,r,s.attrs);e._adoptNodes(t,i),e.treeAdapter.appendChild(t,i),e.activeFormattingElements.insertElementAfterBookmark(i,s),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,i,s.tagID)}function CC(e,t){for(let n=0;n<oPe;n++){const r=lPe(e,t);if(!r)break;const s=dPe(e,r);if(!s)break;e.activeFormattingElements.bookmark=r;const i=fPe(e,s,r.element),a=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(i),a&&mPe(e,a,i),pPe(e,s,r)}}function Kv(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function gPe(e,t){e._appendCommentNode(t,e.openElements.items[0])}function bPe(e,t){e._appendCommentNode(t,e.document)}function PC(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],s=e.treeAdapter.getNodeSourceCodeLocation(r);if(s&&!s.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const i=e.openElements.items[1],a=e.treeAdapter.getNodeSourceCodeLocation(i);a&&!a.endTag&&e._setEndLocation(i,t)}}}}function yPe(e,t){e._setDocumentType(t);const n=t.forceQuirks?Rs.QUIRKS:W2e(t);K2e(t)||e._err(t,te.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=U.BEFORE_HTML}function Of(e,t){e._err(t,te.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Rs.QUIRKS),e.insertionMode=U.BEFORE_HTML,e._processToken(t)}function _Pe(e,t){t.tagID===E.HTML?(e._insertElement(t,oe.HTML),e.insertionMode=U.BEFORE_HEAD):Rh(e,t)}function kPe(e,t){const n=t.tagID;(n===E.HTML||n===E.HEAD||n===E.BODY||n===E.BR)&&Rh(e,t)}function Rh(e,t){e._insertFakeRootElement(),e.insertionMode=U.BEFORE_HEAD,e._processToken(t)}function EPe(e,t){switch(t.tagID){case E.HTML:{vr(e,t);break}case E.HEAD:{e._insertElement(t,oe.HTML),e.headElement=e.openElements.current,e.insertionMode=U.IN_HEAD;break}default:Oh(e,t)}}function wPe(e,t){const n=t.tagID;n===E.HEAD||n===E.BODY||n===E.HTML||n===E.BR?Oh(e,t):e._err(t,te.endTagWithoutMatchingOpenElement)}function Oh(e,t){e._insertFakeElement(Y.HEAD,E.HEAD),e.headElement=e.openElements.current,e.insertionMode=U.IN_HEAD,e._processToken(t)}function Ii(e,t){switch(t.tagID){case E.HTML:{vr(e,t);break}case E.BASE:case E.BASEFONT:case E.BGSOUND:case E.LINK:case E.META:{e._appendElement(t,oe.HTML),t.ackSelfClosing=!0;break}case E.TITLE:{e._switchToTextParsing(t,fn.RCDATA);break}case E.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,fn.RAWTEXT):(e._insertElement(t,oe.HTML),e.insertionMode=U.IN_HEAD_NO_SCRIPT);break}case E.NOFRAMES:case E.STYLE:{e._switchToTextParsing(t,fn.RAWTEXT);break}case E.SCRIPT:{e._switchToTextParsing(t,fn.SCRIPT_DATA);break}case E.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=U.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(U.IN_TEMPLATE);break}case E.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:Lh(e,t)}}function SPe(e,t){switch(t.tagID){case E.HEAD:{e.openElements.pop(),e.insertionMode=U.AFTER_HEAD;break}case E.BODY:case E.BR:case E.HTML:{Lh(e,t);break}case E.TEMPLATE:{zu(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function zu(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==E.TEMPLATE&&e._err(t,te.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(E.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,te.endTagWithoutMatchingOpenElement)}function Lh(e,t){e.openElements.pop(),e.insertionMode=U.AFTER_HEAD,e._processToken(t)}function vPe(e,t){switch(t.tagID){case E.HTML:{vr(e,t);break}case E.BASEFONT:case E.BGSOUND:case E.HEAD:case E.LINK:case E.META:case E.NOFRAMES:case E.STYLE:{Ii(e,t);break}case E.NOSCRIPT:{e._err(t,te.nestedNoscriptInHead);break}default:Dh(e,t)}}function xPe(e,t){switch(t.tagID){case E.NOSCRIPT:{e.openElements.pop(),e.insertionMode=U.IN_HEAD;break}case E.BR:{Dh(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function Dh(e,t){const n=t.type===at.EOF?te.openElementsLeftAfterEof:te.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=U.IN_HEAD,e._processToken(t)}function TPe(e,t){switch(t.tagID){case E.HTML:{vr(e,t);break}case E.BODY:{e._insertElement(t,oe.HTML),e.framesetOk=!1,e.insertionMode=U.IN_BODY;break}case E.FRAMESET:{e._insertElement(t,oe.HTML),e.insertionMode=U.IN_FRAMESET;break}case E.BASE:case E.BASEFONT:case E.BGSOUND:case E.LINK:case E.META:case E.NOFRAMES:case E.SCRIPT:case E.STYLE:case E.TEMPLATE:case E.TITLE:{e._err(t,te.abandonedHeadElementChild),e.openElements.push(e.headElement,E.HEAD),Ii(e,t),e.openElements.remove(e.headElement);break}case E.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:$h(e,t)}}function IPe(e,t){switch(t.tagID){case E.BODY:case E.HTML:case E.BR:{$h(e,t);break}case E.TEMPLATE:{zu(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function $h(e,t){e._insertFakeElement(Y.BODY,E.BODY),e.insertionMode=U.IN_BODY,ik(e,t)}function ik(e,t){switch(t.type){case at.CHARACTER:{PV(e,t);break}case at.WHITESPACE_CHARACTER:{CV(e,t);break}case at.COMMENT:{Kv(e,t);break}case at.START_TAG:{vr(e,t);break}case at.END_TAG:{ak(e,t);break}case at.EOF:{LV(e,t);break}}}function CV(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function PV(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function APe(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function CPe(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function PPe(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,oe.HTML),e.insertionMode=U.IN_FRAMESET)}function NPe(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,oe.HTML)}function RPe(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Gv.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,oe.HTML)}function OPe(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,oe.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function LPe(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,oe.HTML),n||(e.formElement=e.openElements.current))}function DPe(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const s=e.openElements.tagIDs[r];if(n===E.LI&&s===E.LI||(n===E.DD||n===E.DT)&&(s===E.DD||s===E.DT)){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.popUntilTagNamePopped(s);break}if(s!==E.ADDRESS&&s!==E.DIV&&s!==E.P&&e._isSpecialElement(e.openElements.items[r],s))break}e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,oe.HTML)}function $Pe(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,oe.HTML),e.tokenizer.state=fn.PLAINTEXT}function MPe(e,t){e.openElements.hasInScope(E.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(E.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,oe.HTML),e.framesetOk=!1}function jPe(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(Y.A);n&&(CC(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,oe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function FPe(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,oe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function BPe(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(E.NOBR)&&(CC(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,oe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function zPe(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,oe.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function UPe(e,t){e.treeAdapter.getDocumentMode(e.document)!==Rs.QUIRKS&&e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._insertElement(t,oe.HTML),e.framesetOk=!1,e.insertionMode=U.IN_TABLE}function NV(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,oe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function RV(e){const t=kV(e,nu.TYPE);return t!=null&&t.toLowerCase()===aPe}function VPe(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,oe.HTML),RV(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function HPe(e,t){e._appendElement(t,oe.HTML),t.ackSelfClosing=!0}function qPe(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._appendElement(t,oe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function GPe(e,t){t.tagName=Y.IMG,t.tagID=E.IMG,NV(e,t)}function KPe(e,t){e._insertElement(t,oe.HTML),e.skipNextNewLine=!0,e.tokenizer.state=fn.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=U.TEXT}function WPe(e,t){e.openElements.hasInButtonScope(E.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,fn.RAWTEXT)}function JPe(e,t){e.framesetOk=!1,e._switchToTextParsing(t,fn.RAWTEXT)}function z3(e,t){e._switchToTextParsing(t,fn.RAWTEXT)}function YPe(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,oe.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===U.IN_TABLE||e.insertionMode===U.IN_CAPTION||e.insertionMode===U.IN_TABLE_BODY||e.insertionMode===U.IN_ROW||e.insertionMode===U.IN_CELL?U.IN_SELECT_IN_TABLE:U.IN_SELECT}function QPe(e,t){e.openElements.currentTagId===E.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,oe.HTML)}function XPe(e,t){e.openElements.hasInScope(E.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,oe.HTML)}function ZPe(e,t){e.openElements.hasInScope(E.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(E.RTC),e._insertElement(t,oe.HTML)}function eNe(e,t){e._reconstructActiveFormattingElements(),TV(t),AC(t),t.selfClosing?e._appendElement(t,oe.MATHML):e._insertElement(t,oe.MATHML),t.ackSelfClosing=!0}function tNe(e,t){e._reconstructActiveFormattingElements(),IV(t),AC(t),t.selfClosing?e._appendElement(t,oe.SVG):e._insertElement(t,oe.SVG),t.ackSelfClosing=!0}function U3(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,oe.HTML)}function vr(e,t){switch(t.tagID){case E.I:case E.S:case E.B:case E.U:case E.EM:case E.TT:case E.BIG:case E.CODE:case E.FONT:case E.SMALL:case E.STRIKE:case E.STRONG:{FPe(e,t);break}case E.A:{jPe(e,t);break}case E.H1:case E.H2:case E.H3:case E.H4:case E.H5:case E.H6:{RPe(e,t);break}case E.P:case E.DL:case E.OL:case E.UL:case E.DIV:case E.DIR:case E.NAV:case E.MAIN:case E.MENU:case E.ASIDE:case E.CENTER:case E.FIGURE:case E.FOOTER:case E.HEADER:case E.HGROUP:case E.DIALOG:case E.DETAILS:case E.ADDRESS:case E.ARTICLE:case E.SEARCH:case E.SECTION:case E.SUMMARY:case E.FIELDSET:case E.BLOCKQUOTE:case E.FIGCAPTION:{NPe(e,t);break}case E.LI:case E.DD:case E.DT:{DPe(e,t);break}case E.BR:case E.IMG:case E.WBR:case E.AREA:case E.EMBED:case E.KEYGEN:{NV(e,t);break}case E.HR:{qPe(e,t);break}case E.RB:case E.RTC:{XPe(e,t);break}case E.RT:case E.RP:{ZPe(e,t);break}case E.PRE:case E.LISTING:{OPe(e,t);break}case E.XMP:{WPe(e,t);break}case E.SVG:{tNe(e,t);break}case E.HTML:{APe(e,t);break}case E.BASE:case E.LINK:case E.META:case E.STYLE:case E.TITLE:case E.SCRIPT:case E.BGSOUND:case E.BASEFONT:case E.TEMPLATE:{Ii(e,t);break}case E.BODY:{CPe(e,t);break}case E.FORM:{LPe(e,t);break}case E.NOBR:{BPe(e,t);break}case E.MATH:{eNe(e,t);break}case E.TABLE:{UPe(e,t);break}case E.INPUT:{VPe(e,t);break}case E.PARAM:case E.TRACK:case E.SOURCE:{HPe(e,t);break}case E.IMAGE:{GPe(e,t);break}case E.BUTTON:{MPe(e,t);break}case E.APPLET:case E.OBJECT:case E.MARQUEE:{zPe(e,t);break}case E.IFRAME:{JPe(e,t);break}case E.SELECT:{YPe(e,t);break}case E.OPTION:case E.OPTGROUP:{QPe(e,t);break}case E.NOEMBED:case E.NOFRAMES:{z3(e,t);break}case E.FRAMESET:{PPe(e,t);break}case E.TEXTAREA:{KPe(e,t);break}case E.NOSCRIPT:{e.options.scriptingEnabled?z3(e,t):U3(e,t);break}case E.PLAINTEXT:{$Pe(e,t);break}case E.COL:case E.TH:case E.TD:case E.TR:case E.HEAD:case E.FRAME:case E.TBODY:case E.TFOOT:case E.THEAD:case E.CAPTION:case E.COLGROUP:break;default:U3(e,t)}}function nNe(e,t){if(e.openElements.hasInScope(E.BODY)&&(e.insertionMode=U.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function rNe(e,t){e.openElements.hasInScope(E.BODY)&&(e.insertionMode=U.AFTER_BODY,UV(e,t))}function sNe(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function iNe(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(E.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(E.FORM):n&&e.openElements.remove(n))}function aNe(e){e.openElements.hasInButtonScope(E.P)||e._insertFakeElement(Y.P,E.P),e._closePElement()}function oNe(e){e.openElements.hasInListItemScope(E.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(E.LI),e.openElements.popUntilTagNamePopped(E.LI))}function cNe(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function uNe(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function lNe(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function dNe(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(Y.BR,E.BR),e.openElements.pop(),e.framesetOk=!1}function OV(e,t){const n=t.tagName,r=t.tagID;for(let s=e.openElements.stackTop;s>0;s--){const i=e.openElements.items[s],a=e.openElements.tagIDs[s];if(r===a&&(r!==E.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=s&&e.openElements.shortenToLength(s);break}if(e._isSpecialElement(i,a))break}}function ak(e,t){switch(t.tagID){case E.A:case E.B:case E.I:case E.S:case E.U:case E.EM:case E.TT:case E.BIG:case E.CODE:case E.FONT:case E.NOBR:case E.SMALL:case E.STRIKE:case E.STRONG:{CC(e,t);break}case E.P:{aNe(e);break}case E.DL:case E.UL:case E.OL:case E.DIR:case E.DIV:case E.NAV:case E.PRE:case E.MAIN:case E.MENU:case E.ASIDE:case E.BUTTON:case E.CENTER:case E.FIGURE:case E.FOOTER:case E.HEADER:case E.HGROUP:case E.DIALOG:case E.ADDRESS:case E.ARTICLE:case E.DETAILS:case E.SEARCH:case E.SECTION:case E.SUMMARY:case E.LISTING:case E.FIELDSET:case E.BLOCKQUOTE:case E.FIGCAPTION:{sNe(e,t);break}case E.LI:{oNe(e);break}case E.DD:case E.DT:{cNe(e,t);break}case E.H1:case E.H2:case E.H3:case E.H4:case E.H5:case E.H6:{uNe(e);break}case E.BR:{dNe(e);break}case E.BODY:{nNe(e,t);break}case E.HTML:{rNe(e,t);break}case E.FORM:{iNe(e);break}case E.APPLET:case E.OBJECT:case E.MARQUEE:{lNe(e,t);break}case E.TEMPLATE:{zu(e,t);break}default:OV(e,t)}}function LV(e,t){e.tmplInsertionModeStack.length>0?zV(e,t):PC(e,t)}function fNe(e,t){var n;t.tagID===E.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function hNe(e,t){e._err(t,te.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function iw(e,t){if(e.openElements.currentTagId!==void 0&&AV.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=U.IN_TABLE_TEXT,t.type){case at.CHARACTER:{$V(e,t);break}case at.WHITESPACE_CHARACTER:{DV(e,t);break}}else Pp(e,t)}function mNe(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,oe.HTML),e.insertionMode=U.IN_CAPTION}function pNe(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,oe.HTML),e.insertionMode=U.IN_COLUMN_GROUP}function gNe(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Y.COLGROUP,E.COLGROUP),e.insertionMode=U.IN_COLUMN_GROUP,NC(e,t)}function bNe(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,oe.HTML),e.insertionMode=U.IN_TABLE_BODY}function yNe(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Y.TBODY,E.TBODY),e.insertionMode=U.IN_TABLE_BODY,ok(e,t)}function _Ne(e,t){e.openElements.hasInTableScope(E.TABLE)&&(e.openElements.popUntilTagNamePopped(E.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function kNe(e,t){RV(t)?e._appendElement(t,oe.HTML):Pp(e,t),t.ackSelfClosing=!0}function ENe(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,oe.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function wd(e,t){switch(t.tagID){case E.TD:case E.TH:case E.TR:{yNe(e,t);break}case E.STYLE:case E.SCRIPT:case E.TEMPLATE:{Ii(e,t);break}case E.COL:{gNe(e,t);break}case E.FORM:{ENe(e,t);break}case E.TABLE:{_Ne(e,t);break}case E.TBODY:case E.TFOOT:case E.THEAD:{bNe(e,t);break}case E.INPUT:{kNe(e,t);break}case E.CAPTION:{mNe(e,t);break}case E.COLGROUP:{pNe(e,t);break}default:Pp(e,t)}}function Am(e,t){switch(t.tagID){case E.TABLE:{e.openElements.hasInTableScope(E.TABLE)&&(e.openElements.popUntilTagNamePopped(E.TABLE),e._resetInsertionMode());break}case E.TEMPLATE:{zu(e,t);break}case E.BODY:case E.CAPTION:case E.COL:case E.COLGROUP:case E.HTML:case E.TBODY:case E.TD:case E.TFOOT:case E.TH:case E.THEAD:case E.TR:break;default:Pp(e,t)}}function Pp(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,ik(e,t),e.fosterParentingEnabled=n}function DV(e,t){e.pendingCharacterTokens.push(t)}function $V(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Lf(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Pp(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const MV=new Set([E.CAPTION,E.COL,E.COLGROUP,E.TBODY,E.TD,E.TFOOT,E.TH,E.THEAD,E.TR]);function wNe(e,t){const n=t.tagID;MV.has(n)?e.openElements.hasInTableScope(E.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(E.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=U.IN_TABLE,wd(e,t)):vr(e,t)}function SNe(e,t){const n=t.tagID;switch(n){case E.CAPTION:case E.TABLE:{e.openElements.hasInTableScope(E.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(E.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=U.IN_TABLE,n===E.TABLE&&Am(e,t));break}case E.BODY:case E.COL:case E.COLGROUP:case E.HTML:case E.TBODY:case E.TD:case E.TFOOT:case E.TH:case E.THEAD:case E.TR:break;default:ak(e,t)}}function NC(e,t){switch(t.tagID){case E.HTML:{vr(e,t);break}case E.COL:{e._appendElement(t,oe.HTML),t.ackSelfClosing=!0;break}case E.TEMPLATE:{Ii(e,t);break}default:By(e,t)}}function vNe(e,t){switch(t.tagID){case E.COLGROUP:{e.openElements.currentTagId===E.COLGROUP&&(e.openElements.pop(),e.insertionMode=U.IN_TABLE);break}case E.TEMPLATE:{zu(e,t);break}case E.COL:break;default:By(e,t)}}function By(e,t){e.openElements.currentTagId===E.COLGROUP&&(e.openElements.pop(),e.insertionMode=U.IN_TABLE,e._processToken(t))}function ok(e,t){switch(t.tagID){case E.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,oe.HTML),e.insertionMode=U.IN_ROW;break}case E.TH:case E.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(Y.TR,E.TR),e.insertionMode=U.IN_ROW,ck(e,t);break}case E.CAPTION:case E.COL:case E.COLGROUP:case E.TBODY:case E.TFOOT:case E.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE,wd(e,t));break}default:wd(e,t)}}function Wv(e,t){const n=t.tagID;switch(t.tagID){case E.TBODY:case E.TFOOT:case E.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE);break}case E.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE,Am(e,t));break}case E.BODY:case E.CAPTION:case E.COL:case E.COLGROUP:case E.HTML:case E.TD:case E.TH:case E.TR:break;default:Am(e,t)}}function ck(e,t){switch(t.tagID){case E.TH:case E.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,oe.HTML),e.insertionMode=U.IN_CELL,e.activeFormattingElements.insertMarker();break}case E.CAPTION:case E.COL:case E.COLGROUP:case E.TBODY:case E.TFOOT:case E.THEAD:case E.TR:{e.openElements.hasInTableScope(E.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY,ok(e,t));break}default:wd(e,t)}}function jV(e,t){switch(t.tagID){case E.TR:{e.openElements.hasInTableScope(E.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY);break}case E.TABLE:{e.openElements.hasInTableScope(E.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY,Wv(e,t));break}case E.TBODY:case E.TFOOT:case E.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(E.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=U.IN_TABLE_BODY,Wv(e,t));break}case E.BODY:case E.CAPTION:case E.COL:case E.COLGROUP:case E.HTML:case E.TD:case E.TH:break;default:Am(e,t)}}function xNe(e,t){const n=t.tagID;MV.has(n)?(e.openElements.hasInTableScope(E.TD)||e.openElements.hasInTableScope(E.TH))&&(e._closeTableCell(),ck(e,t)):vr(e,t)}function TNe(e,t){const n=t.tagID;switch(n){case E.TD:case E.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=U.IN_ROW);break}case E.TABLE:case E.TBODY:case E.TFOOT:case E.THEAD:case E.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),jV(e,t));break}case E.BODY:case E.CAPTION:case E.COL:case E.COLGROUP:case E.HTML:break;default:ak(e,t)}}function FV(e,t){switch(t.tagID){case E.HTML:{vr(e,t);break}case E.OPTION:{e.openElements.currentTagId===E.OPTION&&e.openElements.pop(),e._insertElement(t,oe.HTML);break}case E.OPTGROUP:{e.openElements.currentTagId===E.OPTION&&e.openElements.pop(),e.openElements.currentTagId===E.OPTGROUP&&e.openElements.pop(),e._insertElement(t,oe.HTML);break}case E.HR:{e.openElements.currentTagId===E.OPTION&&e.openElements.pop(),e.openElements.currentTagId===E.OPTGROUP&&e.openElements.pop(),e._appendElement(t,oe.HTML),t.ackSelfClosing=!0;break}case E.INPUT:case E.KEYGEN:case E.TEXTAREA:case E.SELECT:{e.openElements.hasInSelectScope(E.SELECT)&&(e.openElements.popUntilTagNamePopped(E.SELECT),e._resetInsertionMode(),t.tagID!==E.SELECT&&e._processStartTag(t));break}case E.SCRIPT:case E.TEMPLATE:{Ii(e,t);break}}}function BV(e,t){switch(t.tagID){case E.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===E.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===E.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===E.OPTGROUP&&e.openElements.pop();break}case E.OPTION:{e.openElements.currentTagId===E.OPTION&&e.openElements.pop();break}case E.SELECT:{e.openElements.hasInSelectScope(E.SELECT)&&(e.openElements.popUntilTagNamePopped(E.SELECT),e._resetInsertionMode());break}case E.TEMPLATE:{zu(e,t);break}}}function INe(e,t){const n=t.tagID;n===E.CAPTION||n===E.TABLE||n===E.TBODY||n===E.TFOOT||n===E.THEAD||n===E.TR||n===E.TD||n===E.TH?(e.openElements.popUntilTagNamePopped(E.SELECT),e._resetInsertionMode(),e._processStartTag(t)):FV(e,t)}function ANe(e,t){const n=t.tagID;n===E.CAPTION||n===E.TABLE||n===E.TBODY||n===E.TFOOT||n===E.THEAD||n===E.TR||n===E.TD||n===E.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(E.SELECT),e._resetInsertionMode(),e.onEndTag(t)):BV(e,t)}function CNe(e,t){switch(t.tagID){case E.BASE:case E.BASEFONT:case E.BGSOUND:case E.LINK:case E.META:case E.NOFRAMES:case E.SCRIPT:case E.STYLE:case E.TEMPLATE:case E.TITLE:{Ii(e,t);break}case E.CAPTION:case E.COLGROUP:case E.TBODY:case E.TFOOT:case E.THEAD:{e.tmplInsertionModeStack[0]=U.IN_TABLE,e.insertionMode=U.IN_TABLE,wd(e,t);break}case E.COL:{e.tmplInsertionModeStack[0]=U.IN_COLUMN_GROUP,e.insertionMode=U.IN_COLUMN_GROUP,NC(e,t);break}case E.TR:{e.tmplInsertionModeStack[0]=U.IN_TABLE_BODY,e.insertionMode=U.IN_TABLE_BODY,ok(e,t);break}case E.TD:case E.TH:{e.tmplInsertionModeStack[0]=U.IN_ROW,e.insertionMode=U.IN_ROW,ck(e,t);break}default:e.tmplInsertionModeStack[0]=U.IN_BODY,e.insertionMode=U.IN_BODY,vr(e,t)}}function PNe(e,t){t.tagID===E.TEMPLATE&&zu(e,t)}function zV(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(E.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):PC(e,t)}function NNe(e,t){t.tagID===E.HTML?vr(e,t):zy(e,t)}function UV(e,t){var n;if(t.tagID===E.HTML){if(e.fragmentContext||(e.insertionMode=U.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===E.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else zy(e,t)}function zy(e,t){e.insertionMode=U.IN_BODY,ik(e,t)}function RNe(e,t){switch(t.tagID){case E.HTML:{vr(e,t);break}case E.FRAMESET:{e._insertElement(t,oe.HTML);break}case E.FRAME:{e._appendElement(t,oe.HTML),t.ackSelfClosing=!0;break}case E.NOFRAMES:{Ii(e,t);break}}}function ONe(e,t){t.tagID===E.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==E.FRAMESET&&(e.insertionMode=U.AFTER_FRAMESET))}function LNe(e,t){switch(t.tagID){case E.HTML:{vr(e,t);break}case E.NOFRAMES:{Ii(e,t);break}}}function DNe(e,t){t.tagID===E.HTML&&(e.insertionMode=U.AFTER_AFTER_FRAMESET)}function $Ne(e,t){t.tagID===E.HTML?vr(e,t):Z0(e,t)}function Z0(e,t){e.insertionMode=U.IN_BODY,ik(e,t)}function MNe(e,t){switch(t.tagID){case E.HTML:{vr(e,t);break}case E.NOFRAMES:{Ii(e,t);break}}}function jNe(e,t){t.chars=Wt,e._insertCharacters(t)}function FNe(e,t){e._insertCharacters(t),e.framesetOk=!1}function VV(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==oe.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function BNe(e,t){if(tPe(t))VV(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===oe.MATHML?TV(t):r===oe.SVG&&(nPe(t),IV(t)),AC(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function zNe(e,t){if(t.tagID===E.P||t.tagID===E.BR){VV(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===oe.HTML){e._endTagOutsideForeignContent(t);break}const s=e.treeAdapter.getTagName(r);if(s.toLowerCase()===t.tagName){t.tagName=s,e.openElements.shortenToLength(n);break}}}Y.AREA,Y.BASE,Y.BASEFONT,Y.BGSOUND,Y.BR,Y.COL,Y.EMBED,Y.FRAME,Y.HR,Y.IMG,Y.INPUT,Y.KEYGEN,Y.LINK,Y.META,Y.PARAM,Y.SOURCE,Y.TRACK,Y.WBR;const uk=HV("end"),oa=HV("start");function HV(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function qV(e){const t=oa(e),n=uk(e);if(t&&n)return{start:t,end:n}}const UNe=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,VNe=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),V3={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function GV(e,t){const n=ZNe(e),r=uC("type",{handlers:{root:HNe,element:qNe,text:GNe,comment:WV,doctype:KNe,raw:JNe},unknown:YNe}),s={parser:n?new B3(V3):B3.getFragmentParser(void 0,V3),handle(o){r(o,s)},stitches:!1,options:t||{}};r(e,s),rf(s,oa());const i=n?s.parser.document:s.parser.getFragment(),a=t2e(i,{file:s.options.file});return s.stitches&&Zi(a,"comment",function(o,c,u){const l=o;if(l.value.stitch&&u&&c!==void 0){const d=u.children;return d[c]=l.value.stitch,c}}),a.type==="root"&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function KV(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function HNe(e,t){KV(e.children,t)}function qNe(e,t){QNe(e,t),KV(e.children,t),XNe(e,t)}function GNe(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:at.CHARACTER,chars:e.value,location:Np(e)};rf(t,oa(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function KNe(e,t){const n={type:at.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Np(e)};rf(t,oa(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function WNe(e,t){t.stitches=!0;const n=eRe(e);if("children"in e&&"children"in n){const r=GV({type:"root",children:e.children},t.options);n.children=r.children}WV({type:"comment",value:{stitch:n}},t)}function WV(e,t){const n=e.value,r={type:at.COMMENT,data:n,location:Np(e)};rf(t,oa(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function JNe(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,JV(t,oa(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(UNe,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function YNe(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))WNe(n,t);else{let r="";throw VNe.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function rf(e,t){JV(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=fn.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function JV(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function QNe(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===fn.PLAINTEXT)return;rf(t,oa(e));const r=t.parser.openElements.current;let s="namespaceURI"in r?r.namespaceURI:zc.html;s===zc.html&&n==="svg"&&(s=zc.svg);const i=a2e({...e,children:[]},{space:s===zc.svg?"svg":"html"}),a={type:at.START_TAG,tagName:n,tagID:nf(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in i?i.attrs:[],location:Np(e)};t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function XNe(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&i9.includes(n)||t.parser.tokenizer.state===fn.PLAINTEXT)return;rf(t,uk(e));const r={type:at.END_TAG,tagName:n,tagID:nf(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Np(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===fn.RCDATA||t.parser.tokenizer.state===fn.RAWTEXT||t.parser.tokenizer.state===fn.SCRIPT_DATA)&&(t.parser.tokenizer.state=fn.DATA)}function ZNe(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Np(e){const t=oa(e)||{line:void 0,column:void 0,offset:void 0},n=uk(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function eRe(e){return"children"in e?vu({...e,children:[]}):vu(e)}function Jv(e){return function(t,n){return GV(t,{...e,file:n})}}const kc=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Pc={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...kc,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...kc],h2:[["className","sr-only"]],img:[...kc,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...kc,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...kc],table:[...kc],ul:[...kc,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},uo={}.hasOwnProperty;function tRe(e,t){let n={type:"root",children:[]};const r={schema:t?{...Pc,...t}:Pc,stack:[]},s=YV(r,e);return s&&(Array.isArray(s)?s.length===1?n=s[0]:n.children=s:n=s),n}function YV(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return nRe(e,n);case"doctype":return rRe(e,n);case"element":return sRe(e,n);case"root":return iRe(e,n);case"text":return aRe(e,n)}}}function nRe(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),i={type:"comment",value:r<0?n:n.slice(0,r)};return Rp(i,t),i}}function rRe(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Rp(n,t),n}}function sRe(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=QV(e,t.children),s=oRe(e,t.properties);e.stack.pop();let i=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(i=!0,e.schema.ancestors&&uo.call(e.schema.ancestors,n))){const o=e.schema.ancestors[n];let c=-1;for(i=!1;++c<o.length;)e.stack.includes(o[c])&&(i=!0)}if(!i)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const a={type:"element",tagName:n,properties:s,children:r};return Rp(a,t),a}function iRe(e,t){const r={type:"root",children:QV(e,t.children)};return Rp(r,t),r}function aRe(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Rp(r,t),r}function QV(e,t){const n=[];if(Array.isArray(t)){const r=t;let s=-1;for(;++s<r.length;){const i=YV(e,r[s]);i&&(Array.isArray(i)?n.push(...i):n.push(i))}}return n}function oRe(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,s=e.schema.required,i=r&&uo.call(r,n)?r[n]:void 0,a=r&&uo.call(r,"*")?r["*"]:void 0,o=t&&typeof t=="object"?t:{},c={};let u;for(u in o)if(uo.call(o,u)){const l=o[u];let d=H3(e,q3(i,u),u,l);d==null&&(d=H3(e,q3(a,u),u,l)),d!=null&&(c[u]=d)}if(s&&uo.call(s,n)){const l=s[n];for(u in l)uo.call(l,u)&&!uo.call(c,u)&&(c[u]=l[u])}return c}function H3(e,t,n,r){return t?Array.isArray(r)?cRe(e,t,n,r):XV(e,t,n,r):void 0}function cRe(e,t,n,r){let s=-1;const i=[];for(;++s<r.length;){const a=XV(e,t,n,r[s]);(typeof a=="number"||typeof a=="string")&&i.push(a)}return i}function XV(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&uRe(e,n,r)){if(typeof t=="object"&&t.length>1){let s=!1,i=0;for(;++i<t.length;){const a=t[i];if(a&&typeof a=="object"&&"flags"in a){if(a.test(String(r))){s=!0;break}}else if(a===r){s=!0;break}}if(!s)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function uRe(e,t,n){const r=e.schema.protocols&&uo.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const s=String(n),i=s.indexOf(":"),a=s.indexOf("?"),o=s.indexOf("#"),c=s.indexOf("/");if(i<0||c>-1&&i>c||a>-1&&i>a||o>-1&&i>o)return!0;let u=-1;for(;++u<r.length;){const l=r[u];if(i===l.length&&s.slice(0,l.length)===l)return!0}return!1}function Rp(e,t){const n=qV(t);t.data&&(e.data=vu(t.data)),n&&(e.position=n)}function q3(e,t){let n,r=-1;if(e)for(;++r<e.length;){const s=e[r],i=typeof s=="string"?s:s[0];if(i===t)return s;i==="data*"&&(n=s)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function ZV(e){return function(t){return tRe(t,e)}}const Or=lc(/[A-Za-z]/),kr=lc(/[\dA-Za-z]/),lRe=lc(/[#-'*+\--9=?A-Z^-~]/);function Uy(e){return e!==null&&(e<32||e===127)}const Yv=lc(/\d/),dRe=lc(/[\dA-Fa-f]/),fRe=lc(/[!-/:-@[-`{-~]/);function De(e){return e!==null&&e<-2}function Bt(e){return e!==null&&(e<0||e===32)}function ft(e){return e===-2||e===-1||e===32}const lk=lc(new RegExp("\\p{P}|\\p{S}","u")),xu=lc(/\s/);function lc(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function hRe(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function mRe(e,t,n){const s=nk((n||{}).ignore||[]),i=pRe(t);let a=-1;for(;++a<i.length;)EC(e,"text",o);function o(u,l){let d=-1,f;for(;++d<l.length;){const h=l[d],m=f?f.children:void 0;if(s(h,m?m.indexOf(h):void 0,f))return;f=h}if(f)return c(u,l)}function c(u,l){const d=l[l.length-1],f=i[a][0],h=i[a][1];let m=0;const g=d.children.indexOf(u);let p=!1,_=[];f.lastIndex=0;let k=f.exec(u.value);for(;k;){const v=k.index,w={index:k.index,input:k.input,stack:[...l,u]};let S=h(...k,w);if(typeof S=="string"&&(S=S.length>0?{type:"text",value:S}:void 0),S===!1?f.lastIndex=v+1:(m!==v&&_.push({type:"text",value:u.value.slice(m,v)}),Array.isArray(S)?_.push(...S):S&&_.push(S),m=v+k[0].length,p=!0),!f.global)break;k=f.exec(u.value)}return p?(m<u.value.length&&_.push({type:"text",value:u.value.slice(m)}),d.children.splice(g,1,..._)):_=[u],g+_.length}}function pRe(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const s=n[r];t.push([gRe(s[0]),bRe(s[1])])}return t}function gRe(e){return typeof e=="string"?new RegExp(hRe(e),"g"):e}function bRe(e){return typeof e=="function"?e:function(){return e}}const aw="phrasing",ow=["autolink","link","image","label"];function yRe(){return{transforms:[xRe],enter:{literalAutolink:kRe,literalAutolinkEmail:cw,literalAutolinkHttp:cw,literalAutolinkWww:cw},exit:{literalAutolink:vRe,literalAutolinkEmail:SRe,literalAutolinkHttp:ERe,literalAutolinkWww:wRe}}}function _Re(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:aw,notInConstruct:ow},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:aw,notInConstruct:ow},{character:":",before:"[ps]",after:"\\/",inConstruct:aw,notInConstruct:ow}]}}function kRe(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function cw(e){this.config.enter.autolinkProtocol.call(this,e)}function ERe(e){this.config.exit.autolinkProtocol.call(this,e)}function wRe(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function SRe(e){this.config.exit.autolinkEmail.call(this,e)}function vRe(e){this.exit(e)}function xRe(e){mRe(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,TRe],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),IRe]],{ignore:["link","linkReference"]})}function TRe(e,t,n,r,s){let i="";if(!eH(s)||(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!ARe(n)))return!1;const a=CRe(n+r);if(!a[0])return!1;const o={type:"link",title:null,url:i+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[o,{type:"text",value:a[1]}]:o}function IRe(e,t,n,r){return!eH(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function ARe(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function CRe(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const s=Ny(e,"(");let i=Ny(e,")");for(;r!==-1&&s>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}function eH(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||xu(n)||lk(n))&&(!t||n!==47)}function mi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}tH.peek=jRe;function PRe(){this.buffer()}function NRe(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function RRe(){this.buffer()}function ORe(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function LRe(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=mi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function DRe(e){this.exit(e)}function $Re(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=mi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function MRe(e){this.exit(e)}function jRe(){return"["}function tH(e,t,n,r){const s=n.createTracker(r);let i=s.move("[^");const a=n.enter("footnoteReference"),o=n.enter("reference");return i+=s.move(n.safe(n.associationId(e),{after:"]",before:i})),o(),a(),i+=s.move("]"),i}function FRe(){return{enter:{gfmFootnoteCallString:PRe,gfmFootnoteCall:NRe,gfmFootnoteDefinitionLabelString:RRe,gfmFootnoteDefinition:ORe},exit:{gfmFootnoteCallString:LRe,gfmFootnoteCall:DRe,gfmFootnoteDefinitionLabelString:$Re,gfmFootnoteDefinition:MRe}}}function BRe(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:tH},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,s,i,a){const o=i.createTracker(a);let c=o.move("[^");const u=i.enter("footnoteDefinition"),l=i.enter("label");return c+=o.move(i.safe(i.associationId(r),{before:c,after:"]"})),l(),c+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),c+=o.move((t?`
268
- `:" ")+i.indentLines(i.containerFlow(r,o.current()),t?nH:zRe))),u(),c}}function zRe(e,t,n){return t===0?e:nH(e,t,n)}function nH(e,t,n){return(n?"":" ")+e}const URe=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];rH.peek=KRe;function VRe(){return{canContainEols:["delete"],enter:{strikethrough:qRe},exit:{strikethrough:GRe}}}function HRe(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:URe}],handlers:{delete:rH}}}function qRe(e){this.enter({type:"delete",children:[]},e)}function GRe(e){this.exit(e)}function rH(e,t,n,r){const s=n.createTracker(r),i=n.enter("strikethrough");let a=s.move("~~");return a+=n.containerPhrasing(e,{...s.current(),before:a,after:"~"}),a+=s.move("~~"),i(),a}function KRe(){return"~"}function WRe(e){return e.length}function JRe(e,t){const n=t||{},r=(n.align||[]).concat(),s=n.stringLength||WRe,i=[],a=[],o=[],c=[];let u=0,l=-1;for(;++l<e.length;){const y=[],g=[];let p=-1;for(e[l].length>u&&(u=e[l].length);++p<e[l].length;){const _=YRe(e[l][p]);if(n.alignDelimiters!==!1){const k=s(_);g[p]=k,(c[p]===void 0||k>c[p])&&(c[p]=k)}y.push(_)}a[l]=y,o[l]=g}let d=-1;if(typeof r=="object"&&"length"in r)for(;++d<u;)i[d]=G3(r[d]);else{const y=G3(r);for(;++d<u;)i[d]=y}d=-1;const f=[],h=[];for(;++d<u;){const y=i[d];let g="",p="";y===99?(g=":",p=":"):y===108?g=":":y===114&&(p=":");let _=n.alignDelimiters===!1?1:Math.max(1,c[d]-g.length-p.length);const k=g+"-".repeat(_)+p;n.alignDelimiters!==!1&&(_=g.length+_+p.length,_>c[d]&&(c[d]=_),h[d]=_),f[d]=k}a.splice(1,0,f),o.splice(1,0,h),l=-1;const m=[];for(;++l<a.length;){const y=a[l],g=o[l];d=-1;const p=[];for(;++d<u;){const _=y[d]||"";let k="",v="";if(n.alignDelimiters!==!1){const w=c[d]-(g[d]||0),S=i[d];S===114?k=" ".repeat(w):S===99?w%2?(k=" ".repeat(w/2+.5),v=" ".repeat(w/2-.5)):(k=" ".repeat(w/2),v=k):v=" ".repeat(w)}n.delimiterStart!==!1&&!d&&p.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&_==="")&&(n.delimiterStart!==!1||d)&&p.push(" "),n.alignDelimiters!==!1&&p.push(k),p.push(_),n.alignDelimiters!==!1&&p.push(v),n.padding!==!1&&p.push(" "),(n.delimiterEnd!==!1||d!==u-1)&&p.push("|")}m.push(n.delimiterEnd===!1?p.join("").replace(/ +$/,""):p.join(""))}return m.join(`
269
- `)}function YRe(e){return e==null?"":String(e)}function G3(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function QRe(e,t,n,r){const s=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const a=n.indentLines(n.containerFlow(e,i.current()),XRe);return s(),a}function XRe(e,t,n){return">"+(n?"":" ")+e}function ZRe(e,t){return K3(e,t.inConstruct,!0)&&!K3(e,t.notInConstruct,!1)}function K3(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function W3(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
270
- `&&ZRe(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
271
- `}function eOe(e,t){const n=String(e);let r=n.indexOf(t),s=r,i=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===s?++i>a&&(a=i):i=1,s=r+t.length,r=n.indexOf(t,s);return a}function tOe(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function nOe(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function rOe(e,t,n,r){const s=nOe(n),i=e.value||"",a=s==="`"?"GraveAccent":"Tilde";if(tOe(e,n)){const d=n.enter("codeIndented"),f=n.indentLines(i,sOe);return d(),f}const o=n.createTracker(r),c=s.repeat(Math.max(eOe(i,s)+1,3)),u=n.enter("codeFenced");let l=o.move(c);if(e.lang){const d=n.enter(`codeFencedLang${a}`);l+=o.move(n.safe(e.lang,{before:l,after:" ",encode:["`"],...o.current()})),d()}if(e.lang&&e.meta){const d=n.enter(`codeFencedMeta${a}`);l+=o.move(" "),l+=o.move(n.safe(e.meta,{before:l,after:`
272
- `,encode:["`"],...o.current()})),d()}return l+=o.move(`
273
- `),i&&(l+=o.move(i+`
274
- `)),l+=o.move(c),u(),l}function sOe(e,t,n){return(n?"":" ")+e}function RC(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function iOe(e,t,n,r){const s=RC(n),i=s==='"'?"Quote":"Apostrophe",a=n.enter("definition");let o=n.enter("label");const c=n.createTracker(r);let u=c.move("[");return u+=c.move(n.safe(n.associationId(e),{before:u,after:"]",...c.current()})),u+=c.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(o=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":`
275
- `,...c.current()}))),o(),e.title&&(o=n.enter(`title${i}`),u+=c.move(" "+s),u+=c.move(n.safe(e.title,{before:u,after:s,...c.current()})),u+=c.move(s),o()),a(),u}function aOe(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Cm(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Sd(e){if(e===null||Bt(e)||xu(e))return 1;if(lk(e))return 2}function Vy(e,t,n){const r=Sd(e),s=Sd(t);return r===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}sH.peek=oOe;function sH(e,t,n,r){const s=aOe(n),i=n.enter("emphasis"),a=n.createTracker(r),o=a.move(s);let c=a.move(n.containerPhrasing(e,{after:s,before:o,...a.current()}));const u=c.charCodeAt(0),l=Vy(r.before.charCodeAt(r.before.length-1),u,s);l.inside&&(c=Cm(u)+c.slice(1));const d=c.charCodeAt(c.length-1),f=Vy(r.after.charCodeAt(0),d,s);f.inside&&(c=c.slice(0,-1)+Cm(d));const h=a.move(s);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:l.outside},o+c+h}function oOe(e,t,n){return n.options.emphasis||"*"}const cOe={};function OC(e,t){const n=cOe,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return iH(e,r,s)}function iH(e,t,n){if(uOe(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return J3(e.children,t,n)}return Array.isArray(e)?J3(e,t,n):""}function J3(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=iH(e[s],t,n);return r.join("")}function uOe(e){return!!(e&&typeof e=="object")}function lOe(e,t){let n=!1;return Zi(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Vv}),!!((!e.depth||e.depth<3)&&OC(e)&&(t.options.setext||n))}function dOe(e,t,n,r){const s=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if(lOe(e,n)){const l=n.enter("headingSetext"),d=n.enter("phrasing"),f=n.containerPhrasing(e,{...i.current(),before:`
276
- `,after:`
277
- `});return d(),l(),f+`
278
- `+(s===1?"=":"-").repeat(f.length-(Math.max(f.lastIndexOf("\r"),f.lastIndexOf(`
279
- `))+1))}const a="#".repeat(s),o=n.enter("headingAtx"),c=n.enter("phrasing");i.move(a+" ");let u=n.containerPhrasing(e,{before:"# ",after:`
280
- `,...i.current()});return/^[\t ]/.test(u)&&(u=Cm(u.charCodeAt(0))+u.slice(1)),u=u?a+" "+u:a,n.options.closeAtx&&(u+=" "+a),c(),o(),u}aH.peek=fOe;function aH(e){return e.value||""}function fOe(){return"<"}oH.peek=hOe;function oH(e,t,n,r){const s=RC(n),i=s==='"'?"Quote":"Apostrophe",a=n.enter("image");let o=n.enter("label");const c=n.createTracker(r);let u=c.move("![");return u+=c.move(n.safe(e.alt,{before:u,after:"]",...c.current()})),u+=c.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),u+=c.move("<"),u+=c.move(n.safe(e.url,{before:u,after:">",...c.current()})),u+=c.move(">")):(o=n.enter("destinationRaw"),u+=c.move(n.safe(e.url,{before:u,after:e.title?" ":")",...c.current()}))),o(),e.title&&(o=n.enter(`title${i}`),u+=c.move(" "+s),u+=c.move(n.safe(e.title,{before:u,after:s,...c.current()})),u+=c.move(s),o()),u+=c.move(")"),a(),u}function hOe(){return"!"}cH.peek=mOe;function cH(e,t,n,r){const s=e.referenceType,i=n.enter("imageReference");let a=n.enter("label");const o=n.createTracker(r);let c=o.move("![");const u=n.safe(e.alt,{before:c,after:"]",...o.current()});c+=o.move(u+"]["),a();const l=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:c,after:"]",...o.current()});return a(),n.stack=l,i(),s==="full"||!u||u!==d?c+=o.move(d+"]"):s==="shortcut"?c=c.slice(0,-1):c+=o.move("]"),c}function mOe(){return"!"}uH.peek=pOe;function uH(e,t,n){let r=e.value||"",s="`",i=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(r);)s+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const a=n.unsafe[i],o=n.compilePattern(a);let c;if(a.atBreak)for(;c=o.exec(r);){let u=c.index;r.charCodeAt(u)===10&&r.charCodeAt(u-1)===13&&u--,r=r.slice(0,u)+" "+r.slice(c.index+1)}}return s+r+s}function pOe(){return"`"}function lH(e,t){const n=OC(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}dH.peek=gOe;function dH(e,t,n,r){const s=RC(n),i=s==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let o,c;if(lH(e,n)){const l=n.stack;n.stack=[],o=n.enter("autolink");let d=a.move("<");return d+=a.move(n.containerPhrasing(e,{before:d,after:">",...a.current()})),d+=a.move(">"),o(),n.stack=l,d}o=n.enter("link"),c=n.enter("label");let u=a.move("[");return u+=a.move(n.containerPhrasing(e,{before:u,after:"](",...a.current()})),u+=a.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(e.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(c=n.enter("destinationRaw"),u+=a.move(n.safe(e.url,{before:u,after:e.title?" ":")",...a.current()}))),c(),e.title&&(c=n.enter(`title${i}`),u+=a.move(" "+s),u+=a.move(n.safe(e.title,{before:u,after:s,...a.current()})),u+=a.move(s),c()),u+=a.move(")"),o(),u}function gOe(e,t,n){return lH(e,n)?"<":"["}fH.peek=bOe;function fH(e,t,n,r){const s=e.referenceType,i=n.enter("linkReference");let a=n.enter("label");const o=n.createTracker(r);let c=o.move("[");const u=n.containerPhrasing(e,{before:c,after:"]",...o.current()});c+=o.move(u+"]["),a();const l=n.stack;n.stack=[],a=n.enter("reference");const d=n.safe(n.associationId(e),{before:c,after:"]",...o.current()});return a(),n.stack=l,i(),s==="full"||!u||u!==d?c+=o.move(d+"]"):s==="shortcut"?c=c.slice(0,-1):c+=o.move("]"),c}function bOe(){return"["}function LC(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function yOe(e){const t=LC(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function _Oe(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function hH(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function kOe(e,t,n,r){const s=n.enter("list"),i=n.bulletCurrent;let a=e.ordered?_Oe(n):LC(n);const o=e.ordered?a==="."?")":".":yOe(n);let c=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const l=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&l&&(!l.children||!l.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),hH(n)===a&&l){let d=-1;for(;++d<e.children.length;){const f=e.children[d];if(f&&f.type==="listItem"&&f.children&&f.children[0]&&f.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(a=o),n.bulletCurrent=a;const u=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=i,s(),u}function EOe(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function wOe(e,t,n,r){const s=EOe(n);let i=n.bulletCurrent||LC(n);t&&t.type==="list"&&t.ordered&&(i=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+i);let a=i.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const o=n.createTracker(r);o.move(i+" ".repeat(a-i.length)),o.shift(a);const c=n.enter("listItem"),u=n.indentLines(n.containerFlow(e,o.current()),l);return c(),u;function l(d,f,h){return f?(h?"":" ".repeat(a))+d:(h?i:i+" ".repeat(a-i.length))+d}}function SOe(e,t,n,r){const s=n.enter("paragraph"),i=n.enter("phrasing"),a=n.containerPhrasing(e,r);return i(),s(),a}const vOe=nk(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function xOe(e,t,n,r){return(e.children.some(function(a){return vOe(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function TOe(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}mH.peek=IOe;function mH(e,t,n,r){const s=TOe(n),i=n.enter("strong"),a=n.createTracker(r),o=a.move(s+s);let c=a.move(n.containerPhrasing(e,{after:s,before:o,...a.current()}));const u=c.charCodeAt(0),l=Vy(r.before.charCodeAt(r.before.length-1),u,s);l.inside&&(c=Cm(u)+c.slice(1));const d=c.charCodeAt(c.length-1),f=Vy(r.after.charCodeAt(0),d,s);f.inside&&(c=c.slice(0,-1)+Cm(d));const h=a.move(s+s);return i(),n.attentionEncodeSurroundingInfo={after:f.outside,before:l.outside},o+c+h}function IOe(e,t,n){return n.options.strong||"*"}function AOe(e,t,n,r){return n.safe(e.value,r)}function COe(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function POe(e,t,n){const r=(hH(n)+(n.options.ruleSpaces?" ":"")).repeat(COe(n));return n.options.ruleSpaces?r.slice(0,-1):r}const pH={blockquote:QRe,break:W3,code:rOe,definition:iOe,emphasis:sH,hardBreak:W3,heading:dOe,html:aH,image:oH,imageReference:cH,inlineCode:uH,link:dH,linkReference:fH,list:kOe,listItem:wOe,paragraph:SOe,root:xOe,strong:mH,text:AOe,thematicBreak:POe},Y3=document.createElement("i");function DC(e){const t="&"+e+";";Y3.innerHTML=t;const n=Y3.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function gH(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}const NOe=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ROe(e){return e.replace(NOe,OOe)}function OOe(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),i=s===120||s===88;return gH(n.slice(i?2:1),i?16:10)}return DC(n)||e}function LOe(){return{enter:{table:DOe,tableData:Q3,tableHeader:Q3,tableRow:MOe},exit:{codeText:jOe,table:$Oe,tableData:uw,tableHeader:uw,tableRow:uw}}}function DOe(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function $Oe(e){this.exit(e),this.data.inTable=void 0}function MOe(e){this.enter({type:"tableRow",children:[]},e)}function uw(e){this.exit(e)}function Q3(e){this.enter({type:"tableCell",children:[]},e)}function jOe(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,FOe));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function FOe(e,t){return t==="|"?t:e}function BOe(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,s=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
281
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:f,table:a,tableCell:c,tableRow:o}};function a(h,m,y,g){return u(l(h,y,g),h.align)}function o(h,m,y,g){const p=d(h,y,g),_=u([p]);return _.slice(0,_.indexOf(`
282
- `))}function c(h,m,y,g){const p=y.enter("tableCell"),_=y.enter("phrasing"),k=y.containerPhrasing(h,{...g,before:i,after:i});return _(),p(),k}function u(h,m){return JRe(h,{align:m,alignDelimiters:r,padding:n,stringLength:s})}function l(h,m,y){const g=h.children;let p=-1;const _=[],k=m.enter("table");for(;++p<g.length;)_[p]=d(g[p],m,y);return k(),_}function d(h,m,y){const g=h.children;let p=-1;const _=[],k=m.enter("tableRow");for(;++p<g.length;)_[p]=c(g[p],h,m,y);return k(),_}function f(h,m,y){let g=pH.inlineCode(h,m,y);return y.stack.includes("tableCell")&&(g=g.replace(/\|/g,"\\$&")),g}}function zOe(){return{exit:{taskListCheckValueChecked:X3,taskListCheckValueUnchecked:X3,paragraph:VOe}}}function UOe(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:HOe}}}function X3(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function VOe(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const s=t.children;let i=-1,a;for(;++i<s.length;){const o=s[i];if(o.type==="paragraph"){a=o;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function HOe(e,t,n,r){const s=e.children[0],i=typeof e.checked=="boolean"&&s&&s.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);i&&o.move(a);let c=pH.listItem(e,t,n,{...r,...o.current()});return i&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),c;function u(l){return l+a}}function qOe(){return[yRe(),FRe(),VRe(),LOe(),zOe()]}function GOe(e){return{extensions:[_Re(),BRe(e),HRe(),BOe(e),UOe()]}}function ys(e,t,n,r){const s=e.length;let i=0,a;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);i<r.length;)a=r.slice(i,i+1e4),a.unshift(t,0),e.splice(...a),i+=1e4,t+=1e4}function Os(e,t){return e.length>0?(ys(e,e.length,0,t),e):t}const Z3={}.hasOwnProperty;function bH(e){const t={};let n=-1;for(;++n<e.length;)KOe(t,e[n]);return t}function KOe(e,t){let n;for(n in t){const s=(Z3.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let a;if(i)for(a in i){Z3.call(s,a)||(s[a]=[]);const o=i[a];WOe(s[a],Array.isArray(o)?o:o?[o]:[])}}}function WOe(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);ys(e,0,0,r)}const JOe={tokenize:tLe,partial:!0},yH={tokenize:nLe,partial:!0},_H={tokenize:rLe,partial:!0},kH={tokenize:sLe,partial:!0},YOe={tokenize:iLe,partial:!0},EH={name:"wwwAutolink",tokenize:ZOe,previous:SH},wH={name:"protocolAutolink",tokenize:eLe,previous:vH},Wa={name:"emailAutolink",tokenize:XOe,previous:xH},ca={};function QOe(){return{text:ca}}let Ec=48;for(;Ec<123;)ca[Ec]=Wa,Ec++,Ec===58?Ec=65:Ec===91&&(Ec=97);ca[43]=Wa;ca[45]=Wa;ca[46]=Wa;ca[95]=Wa;ca[72]=[Wa,wH];ca[104]=[Wa,wH];ca[87]=[Wa,EH];ca[119]=[Wa,EH];function XOe(e,t,n){const r=this;let s,i;return a;function a(d){return!Qv(d)||!xH.call(r,r.previous)||$C(r.events)?n(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(d))}function o(d){return Qv(d)?(e.consume(d),o):d===64?(e.consume(d),c):n(d)}function c(d){return d===46?e.check(YOe,l,u)(d):d===45||d===95||kr(d)?(i=!0,e.consume(d),c):l(d)}function u(d){return e.consume(d),s=!0,c}function l(d){return i&&s&&Or(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):n(d)}}function ZOe(e,t,n){const r=this;return s;function s(a){return a!==87&&a!==119||!SH.call(r,r.previous)||$C(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(JOe,e.attempt(yH,e.attempt(_H,i),n),n)(a))}function i(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function eLe(e,t,n){const r=this;let s="",i=!1;return a;function a(d){return(d===72||d===104)&&vH.call(r,r.previous)&&!$C(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(d),e.consume(d),o):n(d)}function o(d){if(Or(d)&&s.length<5)return s+=String.fromCodePoint(d),e.consume(d),o;if(d===58){const f=s.toLowerCase();if(f==="http"||f==="https")return e.consume(d),c}return n(d)}function c(d){return d===47?(e.consume(d),i?u:(i=!0,c)):n(d)}function u(d){return d===null||Uy(d)||Bt(d)||xu(d)||lk(d)?n(d):e.attempt(yH,e.attempt(_H,l),n)(d)}function l(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function tLe(e,t,n){let r=0;return s;function s(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),s):a===46&&r===3?(e.consume(a),i):n(a)}function i(a){return a===null?n(a):t(a)}}function nLe(e,t,n){let r,s,i;return a;function a(u){return u===46||u===95?e.check(kH,c,o)(u):u===null||Bt(u)||xu(u)||u!==45&&lk(u)?c(u):(i=!0,e.consume(u),a)}function o(u){return u===95?r=!0:(s=r,r=void 0),e.consume(u),a}function c(u){return s||r||!i?n(u):t(u)}}function rLe(e,t){let n=0,r=0;return s;function s(a){return a===40?(n++,e.consume(a),s):a===41&&r<n?i(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(kH,t,i)(a):a===null||Bt(a)||xu(a)?t(a):(e.consume(a),s)}function i(a){return a===41&&r++,e.consume(a),s}}function sLe(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),i):o===93?(e.consume(o),s):o===60||o===null||Bt(o)||xu(o)?t(o):n(o)}function s(o){return o===null||o===40||o===91||Bt(o)||xu(o)?t(o):r(o)}function i(o){return Or(o)?a(o):n(o)}function a(o){return o===59?(e.consume(o),r):Or(o)?(e.consume(o),a):n(o)}}function iLe(e,t,n){return r;function r(i){return e.consume(i),s}function s(i){return kr(i)?n(i):t(i)}}function SH(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Bt(e)}function vH(e){return!Or(e)}function xH(e){return!(e===47||Qv(e))}function Qv(e){return e===43||e===45||e===46||e===95||kr(e)}function $C(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function sf(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const i=e.charCodeAt(n);let a="";if(i===37&&kr(e.charCodeAt(n+1))&&kr(e.charCodeAt(n+2)))s=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(a=String.fromCharCode(i));else if(i>55295&&i<57344){const o=e.charCodeAt(n+1);i<56320&&o>56319&&o<57344?(a=String.fromCharCode(i,o),s=1):a="�"}else a=String.fromCharCode(i);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+s+1,a=""),s&&(n+=s,s=0)}return t.join("")+e.slice(r)}function dk(e,t,n){const r=[];let s=-1;for(;++s<e.length;){const i=e[s].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const Xv={name:"attention",resolveAll:aLe,tokenize:oLe};function aLe(e,t){let n=-1,r,s,i,a,o,c,u,l;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const d={...e[r][1].end},f={...e[n][1].start};eD(d,-c),eD(f,c),a={type:c>1?"strongSequence":"emphasisSequence",start:d,end:{...e[r][1].end}},o={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:f},i={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},s={type:c>1?"strong":"emphasis",start:{...a.start},end:{...o.end}},e[r][1].end={...a.start},e[n][1].start={...o.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=Os(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=Os(u,[["enter",s,t],["enter",a,t],["exit",a,t],["enter",i,t]]),u=Os(u,dk(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=Os(u,[["exit",i,t],["enter",o,t],["exit",o,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(l=2,u=Os(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):l=0,ys(e,r-1,n-r+3,u),n=r+u.length-l-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function oLe(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=Sd(r);let i;return a;function a(c){return i=c,e.enter("attentionSequence"),o(c)}function o(c){if(c===i)return e.consume(c),o;const u=e.exit("attentionSequence"),l=Sd(c),d=!l||l===2&&s||n.includes(c),f=!s||s===2&&l||n.includes(r);return u._open=!!(i===42?d:d&&(s||!f)),u._close=!!(i===42?f:f&&(l||!d)),t(c)}}function eD(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const cLe={name:"autolink",tokenize:uLe};function uLe(e,t,n){let r=0;return s;function s(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(h){return Or(h)?(e.consume(h),a):h===64?n(h):u(h)}function a(h){return h===43||h===45||h===46||kr(h)?(r=1,o(h)):u(h)}function o(h){return h===58?(e.consume(h),r=0,c):(h===43||h===45||h===46||kr(h))&&r++<32?(e.consume(h),o):(r=0,u(h))}function c(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||Uy(h)?n(h):(e.consume(h),c)}function u(h){return h===64?(e.consume(h),l):lRe(h)?(e.consume(h),u):n(h)}function l(h){return kr(h)?d(h):n(h)}function d(h){return h===46?(e.consume(h),r=0,l):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):f(h)}function f(h){if((h===45||kr(h))&&r++<63){const m=h===45?f:d;return e.consume(h),m}return n(h)}}function kt(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let i=0;return a;function a(c){return ft(c)?(e.enter(n),o(c)):t(c)}function o(c){return ft(c)&&i++<s?(e.consume(c),o):(e.exit(n),t(c))}}const Op={partial:!0,tokenize:lLe};function lLe(e,t,n){return r;function r(i){return ft(i)?kt(e,s,"linePrefix")(i):s(i)}function s(i){return i===null||De(i)?t(i):n(i)}}const TH={continuation:{tokenize:fLe},exit:hLe,name:"blockQuote",tokenize:dLe};function dLe(e,t,n){const r=this;return s;function s(a){if(a===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),i}return n(a)}function i(a){return ft(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function fLe(e,t,n){const r=this;return s;function s(a){return ft(a)?kt(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):i(a)}function i(a){return e.attempt(TH,t,n)(a)}}function hLe(e){e.exit("blockQuote")}const IH={name:"characterEscape",tokenize:mLe};function mLe(e,t,n){return r;function r(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),s}function s(i){return fRe(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const AH={name:"characterReference",tokenize:pLe};function pLe(e,t,n){const r=this;let s=0,i,a;return o;function o(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),c}function c(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),i=31,a=kr,l(d))}function u(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,a=dRe,l):(e.enter("characterReferenceValue"),i=7,a=Yv,l(d))}function l(d){if(d===59&&s){const f=e.exit("characterReferenceValue");return a===kr&&!DC(r.sliceSerialize(f))?n(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(d)&&s++<i?(e.consume(d),l):n(d)}}const tD={partial:!0,tokenize:bLe},nD={concrete:!0,name:"codeFenced",tokenize:gLe};function gLe(e,t,n){const r=this,s={partial:!0,tokenize:w};let i=0,a=0,o;return c;function c(S){return u(S)}function u(S){const T=r.events[r.events.length-1];return i=T&&T[1].type==="linePrefix"?T[2].sliceSerialize(T[1],!0).length:0,o=S,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),l(S)}function l(S){return S===o?(a++,e.consume(S),l):a<3?n(S):(e.exit("codeFencedFenceSequence"),ft(S)?kt(e,d,"whitespace")(S):d(S))}function d(S){return S===null||De(S)?(e.exit("codeFencedFence"),r.interrupt?t(S):e.check(tD,y,v)(S)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(S))}function f(S){return S===null||De(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(S)):ft(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),kt(e,h,"whitespace")(S)):S===96&&S===o?n(S):(e.consume(S),f)}function h(S){return S===null||De(S)?d(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(S))}function m(S){return S===null||De(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(S)):S===96&&S===o?n(S):(e.consume(S),m)}function y(S){return e.attempt(s,v,g)(S)}function g(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),p}function p(S){return i>0&&ft(S)?kt(e,_,"linePrefix",i+1)(S):_(S)}function _(S){return S===null||De(S)?e.check(tD,y,v)(S):(e.enter("codeFlowValue"),k(S))}function k(S){return S===null||De(S)?(e.exit("codeFlowValue"),_(S)):(e.consume(S),k)}function v(S){return e.exit("codeFenced"),t(S)}function w(S,T,I){let $=0;return R;function R(Q){return S.enter("lineEnding"),S.consume(Q),S.exit("lineEnding"),z}function z(Q){return S.enter("codeFencedFence"),ft(Q)?kt(S,V,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Q):V(Q)}function V(Q){return Q===o?(S.enter("codeFencedFenceSequence"),H(Q)):I(Q)}function H(Q){return Q===o?($++,S.consume(Q),H):$>=a?(S.exit("codeFencedFenceSequence"),ft(Q)?kt(S,G,"whitespace")(Q):G(Q)):I(Q)}function G(Q){return Q===null||De(Q)?(S.exit("codeFencedFence"),T(Q)):I(Q)}}}function bLe(e,t,n){const r=this;return s;function s(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i)}function i(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const lw={name:"codeIndented",tokenize:_Le},yLe={partial:!0,tokenize:kLe};function _Le(e,t,n){const r=this;return s;function s(u){return e.enter("codeIndented"),kt(e,i,"linePrefix",5)(u)}function i(u){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?a(u):n(u)}function a(u){return u===null?c(u):De(u)?e.attempt(yLe,a,c)(u):(e.enter("codeFlowValue"),o(u))}function o(u){return u===null||De(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),o)}function c(u){return e.exit("codeIndented"),t(u)}}function kLe(e,t,n){const r=this;return s;function s(a){return r.parser.lazy[r.now().line]?n(a):De(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):kt(e,i,"linePrefix",5)(a)}function i(a){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):De(a)?s(a):n(a)}}const ELe={name:"codeText",previous:SLe,resolve:wLe,tokenize:vLe};function wLe(e){let t=e.length-4,n=3,r,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)s===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(s=r):(r===t||e[r][1].type==="lineEnding")&&(e[s][1].type="codeTextData",r!==s+2&&(e[s][1].end=e[r-1][1].end,e.splice(s+2,r-s-2),t-=r-s-2,r=s+2),s=void 0);return e}function SLe(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function vLe(e,t,n){let r=0,s,i;return a;function a(d){return e.enter("codeText"),e.enter("codeTextSequence"),o(d)}function o(d){return d===96?(e.consume(d),r++,o):(e.exit("codeTextSequence"),c(d))}function c(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),c):d===96?(i=e.enter("codeTextSequence"),s=0,l(d)):De(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("codeTextData"),u(d))}function u(d){return d===null||d===32||d===96||De(d)?(e.exit("codeTextData"),c(d)):(e.consume(d),u)}function l(d){return d===96?(e.consume(d),s++,l):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(i.type="codeTextData",u(d))}}class xLe{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const s=n||0;this.setCursor(Math.trunc(t));const i=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&Df(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Df(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Df(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Df(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Df(this.left,n.reverse())}}}function Df(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function CH(e){const t={};let n=-1,r,s,i,a,o,c,u;const l=new xLe(e);for(;++n<l.length;){for(;n in t;)n=t[n];if(r=l.get(n),n&&r[1].type==="chunkFlow"&&l.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,i=0,i<c.length&&c[i][1].type==="lineEndingBlank"&&(i+=2),i<c.length&&c[i][1].type==="content"))for(;++i<c.length&&c[i][1].type!=="content";)c[i][1].type==="chunkText"&&(c[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,TLe(l,n)),n=t[n],u=!0);else if(r[1]._container){for(i=n,s=void 0;i--;)if(a=l.get(i),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(s&&(l.get(s)[1].type="lineEndingBlank"),a[1].type="lineEnding",s=i);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;s&&(r[1].end={...l.get(s)[1].start},o=l.slice(s,n),o.unshift(r),l.splice(s,n-s+1,o))}}return ys(e,0,Number.POSITIVE_INFINITY,l.slice(0)),!u}function TLe(e,t){const n=e.get(t)[1],r=e.get(t)[2];let s=t-1;const i=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const o=a.events,c=[],u={};let l,d,f=-1,h=n,m=0,y=0;const g=[y];for(;h;){for(;e.get(++s)[1]!==h;);i.push(s),h._tokenizer||(l=r.sliceStream(h),h.next||l.push(null),d&&a.defineSkip(h.start),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(l),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=h,h=h.next}for(h=n;++f<o.length;)o[f][0]==="exit"&&o[f-1][0]==="enter"&&o[f][1].type===o[f-1][1].type&&o[f][1].start.line!==o[f][1].end.line&&(y=f+1,g.push(y),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(a.events=[],h?(h._tokenizer=void 0,h.previous=void 0):g.pop(),f=g.length;f--;){const p=o.slice(g[f],g[f+1]),_=i.pop();c.push([_,_+p.length-1]),e.splice(_,2,p)}for(c.reverse(),f=-1;++f<c.length;)u[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return u}const ILe={resolve:CLe,tokenize:PLe},ALe={partial:!0,tokenize:NLe};function CLe(e){return CH(e),e}function PLe(e,t){let n;return r;function r(o){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(o)}function s(o){return o===null?i(o):De(o)?e.check(ALe,a,i)(o):(e.consume(o),s)}function i(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function a(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function NLe(e,t,n){const r=this;return s;function s(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),kt(e,i,"linePrefix")}function i(a){if(a===null||De(a))return n(a);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function PH(e,t,n,r,s,i,a,o,c){const u=c||Number.POSITIVE_INFINITY;let l=0;return d;function d(p){return p===60?(e.enter(r),e.enter(s),e.enter(i),e.consume(p),e.exit(i),f):p===null||p===32||p===41||Uy(p)?n(p):(e.enter(r),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),y(p))}function f(p){return p===62?(e.enter(i),e.consume(p),e.exit(i),e.exit(s),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===62?(e.exit("chunkString"),e.exit(o),f(p)):p===null||p===60||De(p)?n(p):(e.consume(p),p===92?m:h)}function m(p){return p===60||p===62||p===92?(e.consume(p),h):h(p)}function y(p){return!l&&(p===null||p===41||Bt(p))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(r),t(p)):l<u&&p===40?(e.consume(p),l++,y):p===41?(e.consume(p),l--,y):p===null||p===32||p===40||Uy(p)?n(p):(e.consume(p),p===92?g:y)}function g(p){return p===40||p===41||p===92?(e.consume(p),y):y(p)}}function NH(e,t,n,r,s,i){const a=this;let o=0,c;return u;function u(h){return e.enter(r),e.enter(s),e.consume(h),e.exit(s),e.enter(i),l}function l(h){return o>999||h===null||h===91||h===93&&!c||h===94&&!o&&"_hiddenFootnoteSupport"in a.parser.constructs?n(h):h===93?(e.exit(i),e.enter(s),e.consume(h),e.exit(s),e.exit(r),t):De(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),l):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===null||h===91||h===93||De(h)||o++>999?(e.exit("chunkString"),l(h)):(e.consume(h),c||(c=!ft(h)),h===92?f:d)}function f(h){return h===91||h===92||h===93?(e.consume(h),o++,d):d(h)}}function RH(e,t,n,r,s,i){let a;return o;function o(f){return f===34||f===39||f===40?(e.enter(r),e.enter(s),e.consume(f),e.exit(s),a=f===40?41:f,c):n(f)}function c(f){return f===a?(e.enter(s),e.consume(f),e.exit(s),e.exit(r),t):(e.enter(i),u(f))}function u(f){return f===a?(e.exit(i),c(a)):f===null?n(f):De(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),kt(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),l(f))}function l(f){return f===a||f===null||De(f)?(e.exit("chunkString"),u(f)):(e.consume(f),f===92?d:l)}function d(f){return f===a||f===92?(e.consume(f),l):l(f)}}function Mh(e,t){let n;return r;function r(s){return De(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):ft(s)?kt(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const RLe={name:"definition",tokenize:LLe},OLe={partial:!0,tokenize:DLe};function LLe(e,t,n){const r=this;let s;return i;function i(h){return e.enter("definition"),a(h)}function a(h){return NH.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function o(h){return s=mi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),c):n(h)}function c(h){return Bt(h)?Mh(e,u)(h):u(h)}function u(h){return PH(e,l,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function l(h){return e.attempt(OLe,d,d)(h)}function d(h){return ft(h)?kt(e,f,"whitespace")(h):f(h)}function f(h){return h===null||De(h)?(e.exit("definition"),r.parser.defined.push(s),t(h)):n(h)}}function DLe(e,t,n){return r;function r(o){return Bt(o)?Mh(e,s)(o):n(o)}function s(o){return RH(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function i(o){return ft(o)?kt(e,a,"whitespace")(o):a(o)}function a(o){return o===null||De(o)?t(o):n(o)}}const $Le={name:"hardBreakEscape",tokenize:MLe};function MLe(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),s}function s(i){return De(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const jLe={name:"headingAtx",resolve:FLe,tokenize:BLe};function FLe(e,t){let n=e.length-2,r=3,s,i;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(s={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},ys(e,r,n-r+1,[["enter",s,t],["enter",i,t],["exit",i,t],["exit",s,t]])),e}function BLe(e,t,n){let r=0;return s;function s(l){return e.enter("atxHeading"),i(l)}function i(l){return e.enter("atxHeadingSequence"),a(l)}function a(l){return l===35&&r++<6?(e.consume(l),a):l===null||Bt(l)?(e.exit("atxHeadingSequence"),o(l)):n(l)}function o(l){return l===35?(e.enter("atxHeadingSequence"),c(l)):l===null||De(l)?(e.exit("atxHeading"),t(l)):ft(l)?kt(e,o,"whitespace")(l):(e.enter("atxHeadingText"),u(l))}function c(l){return l===35?(e.consume(l),c):(e.exit("atxHeadingSequence"),o(l))}function u(l){return l===null||l===35||Bt(l)?(e.exit("atxHeadingText"),o(l)):(e.consume(l),u)}}const zLe=["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","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],rD=["pre","script","style","textarea"],ULe={concrete:!0,name:"htmlFlow",resolveTo:qLe,tokenize:GLe},VLe={partial:!0,tokenize:WLe},HLe={partial:!0,tokenize:KLe};function qLe(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function GLe(e,t,n){const r=this;let s,i,a,o,c;return u;function u(A){return l(A)}function l(A){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(A),d}function d(A){return A===33?(e.consume(A),f):A===47?(e.consume(A),i=!0,y):A===63?(e.consume(A),s=3,r.interrupt?t:C):Or(A)?(e.consume(A),a=String.fromCharCode(A),g):n(A)}function f(A){return A===45?(e.consume(A),s=2,h):A===91?(e.consume(A),s=5,o=0,m):Or(A)?(e.consume(A),s=4,r.interrupt?t:C):n(A)}function h(A){return A===45?(e.consume(A),r.interrupt?t:C):n(A)}function m(A){const P="CDATA[";return A===P.charCodeAt(o++)?(e.consume(A),o===P.length?r.interrupt?t:V:m):n(A)}function y(A){return Or(A)?(e.consume(A),a=String.fromCharCode(A),g):n(A)}function g(A){if(A===null||A===47||A===62||Bt(A)){const P=A===47,B=a.toLowerCase();return!P&&!i&&rD.includes(B)?(s=1,r.interrupt?t(A):V(A)):zLe.includes(a.toLowerCase())?(s=6,P?(e.consume(A),p):r.interrupt?t(A):V(A)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(A):i?_(A):k(A))}return A===45||kr(A)?(e.consume(A),a+=String.fromCharCode(A),g):n(A)}function p(A){return A===62?(e.consume(A),r.interrupt?t:V):n(A)}function _(A){return ft(A)?(e.consume(A),_):R(A)}function k(A){return A===47?(e.consume(A),R):A===58||A===95||Or(A)?(e.consume(A),v):ft(A)?(e.consume(A),k):R(A)}function v(A){return A===45||A===46||A===58||A===95||kr(A)?(e.consume(A),v):w(A)}function w(A){return A===61?(e.consume(A),S):ft(A)?(e.consume(A),w):k(A)}function S(A){return A===null||A===60||A===61||A===62||A===96?n(A):A===34||A===39?(e.consume(A),c=A,T):ft(A)?(e.consume(A),S):I(A)}function T(A){return A===c?(e.consume(A),c=null,$):A===null||De(A)?n(A):(e.consume(A),T)}function I(A){return A===null||A===34||A===39||A===47||A===60||A===61||A===62||A===96||Bt(A)?w(A):(e.consume(A),I)}function $(A){return A===47||A===62||ft(A)?k(A):n(A)}function R(A){return A===62?(e.consume(A),z):n(A)}function z(A){return A===null||De(A)?V(A):ft(A)?(e.consume(A),z):n(A)}function V(A){return A===45&&s===2?(e.consume(A),re):A===60&&s===1?(e.consume(A),me):A===62&&s===4?(e.consume(A),M):A===63&&s===3?(e.consume(A),C):A===93&&s===5?(e.consume(A),tt):De(A)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(VLe,K,H)(A)):A===null||De(A)?(e.exit("htmlFlowData"),H(A)):(e.consume(A),V)}function H(A){return e.check(HLe,G,K)(A)}function G(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),Q}function Q(A){return A===null||De(A)?H(A):(e.enter("htmlFlowData"),V(A))}function re(A){return A===45?(e.consume(A),C):V(A)}function me(A){return A===47?(e.consume(A),a="",ke):V(A)}function ke(A){if(A===62){const P=a.toLowerCase();return rD.includes(P)?(e.consume(A),M):V(A)}return Or(A)&&a.length<8?(e.consume(A),a+=String.fromCharCode(A),ke):V(A)}function tt(A){return A===93?(e.consume(A),C):V(A)}function C(A){return A===62?(e.consume(A),M):A===45&&s===2?(e.consume(A),C):V(A)}function M(A){return A===null||De(A)?(e.exit("htmlFlowData"),K(A)):(e.consume(A),M)}function K(A){return e.exit("htmlFlow"),t(A)}}function KLe(e,t,n){const r=this;return s;function s(a){return De(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):n(a)}function i(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function WLe(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Op,t,n)}}const JLe={name:"htmlText",tokenize:YLe};function YLe(e,t,n){const r=this;let s,i,a;return o;function o(C){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(C),c}function c(C){return C===33?(e.consume(C),u):C===47?(e.consume(C),w):C===63?(e.consume(C),k):Or(C)?(e.consume(C),I):n(C)}function u(C){return C===45?(e.consume(C),l):C===91?(e.consume(C),i=0,m):Or(C)?(e.consume(C),_):n(C)}function l(C){return C===45?(e.consume(C),h):n(C)}function d(C){return C===null?n(C):C===45?(e.consume(C),f):De(C)?(a=d,me(C)):(e.consume(C),d)}function f(C){return C===45?(e.consume(C),h):d(C)}function h(C){return C===62?re(C):C===45?f(C):d(C)}function m(C){const M="CDATA[";return C===M.charCodeAt(i++)?(e.consume(C),i===M.length?y:m):n(C)}function y(C){return C===null?n(C):C===93?(e.consume(C),g):De(C)?(a=y,me(C)):(e.consume(C),y)}function g(C){return C===93?(e.consume(C),p):y(C)}function p(C){return C===62?re(C):C===93?(e.consume(C),p):y(C)}function _(C){return C===null||C===62?re(C):De(C)?(a=_,me(C)):(e.consume(C),_)}function k(C){return C===null?n(C):C===63?(e.consume(C),v):De(C)?(a=k,me(C)):(e.consume(C),k)}function v(C){return C===62?re(C):k(C)}function w(C){return Or(C)?(e.consume(C),S):n(C)}function S(C){return C===45||kr(C)?(e.consume(C),S):T(C)}function T(C){return De(C)?(a=T,me(C)):ft(C)?(e.consume(C),T):re(C)}function I(C){return C===45||kr(C)?(e.consume(C),I):C===47||C===62||Bt(C)?$(C):n(C)}function $(C){return C===47?(e.consume(C),re):C===58||C===95||Or(C)?(e.consume(C),R):De(C)?(a=$,me(C)):ft(C)?(e.consume(C),$):re(C)}function R(C){return C===45||C===46||C===58||C===95||kr(C)?(e.consume(C),R):z(C)}function z(C){return C===61?(e.consume(C),V):De(C)?(a=z,me(C)):ft(C)?(e.consume(C),z):$(C)}function V(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),s=C,H):De(C)?(a=V,me(C)):ft(C)?(e.consume(C),V):(e.consume(C),G)}function H(C){return C===s?(e.consume(C),s=void 0,Q):C===null?n(C):De(C)?(a=H,me(C)):(e.consume(C),H)}function G(C){return C===null||C===34||C===39||C===60||C===61||C===96?n(C):C===47||C===62||Bt(C)?$(C):(e.consume(C),G)}function Q(C){return C===47||C===62||Bt(C)?$(C):n(C)}function re(C){return C===62?(e.consume(C),e.exit("htmlTextData"),e.exit("htmlText"),t):n(C)}function me(C){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),ke}function ke(C){return ft(C)?kt(e,tt,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):tt(C)}function tt(C){return e.enter("htmlTextData"),a(C)}}const MC={name:"labelEnd",resolveAll:e3e,resolveTo:t3e,tokenize:n3e},QLe={tokenize:r3e},XLe={tokenize:s3e},ZLe={tokenize:i3e};function e3e(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const s=r.type==="labelImage"?4:2;r.type="data",t+=s}}return e.length!==n.length&&ys(e,0,e.length,n),e}function t3e(e,t){let n=e.length,r=0,s,i,a,o;for(;n--;)if(s=e[n][1],i){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(i=n,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(a=n);const c={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[i][1].start},end:{...e[a][1].end}},l={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return o=[["enter",c,t],["enter",u,t]],o=Os(o,e.slice(i+1,i+r+3)),o=Os(o,[["enter",l,t]]),o=Os(o,dk(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=Os(o,[["exit",l,t],e[a-2],e[a-1],["exit",u,t]]),o=Os(o,e.slice(a+1)),o=Os(o,[["exit",c,t]]),ys(e,i,e.length,o),e}function n3e(e,t,n){const r=this;let s=r.events.length,i,a;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){i=r.events[s][1];break}return o;function o(f){return i?i._inactive?d(f):(a=r.parser.defined.includes(mi(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),c):n(f)}function c(f){return f===40?e.attempt(QLe,l,a?l:d)(f):f===91?e.attempt(XLe,l,a?u:d)(f):a?l(f):d(f)}function u(f){return e.attempt(ZLe,l,d)(f)}function l(f){return t(f)}function d(f){return i._balanced=!0,n(f)}}function r3e(e,t,n){return r;function r(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),s}function s(d){return Bt(d)?Mh(e,i)(d):i(d)}function i(d){return d===41?l(d):PH(e,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function a(d){return Bt(d)?Mh(e,c)(d):l(d)}function o(d){return n(d)}function c(d){return d===34||d===39||d===40?RH(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):l(d)}function u(d){return Bt(d)?Mh(e,l)(d):l(d)}function l(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):n(d)}}function s3e(e,t,n){const r=this;return s;function s(o){return NH.call(r,e,i,a,"reference","referenceMarker","referenceString")(o)}function i(o){return r.parser.defined.includes(mi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function a(o){return n(o)}}function i3e(e,t,n){return r;function r(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),s}function s(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}const a3e={name:"labelStartImage",resolveAll:MC.resolveAll,tokenize:o3e};function o3e(e,t,n){const r=this;return s;function s(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),i}function i(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),a):n(o)}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const c3e={name:"labelStartLink",resolveAll:MC.resolveAll,tokenize:u3e};function u3e(e,t,n){const r=this;return s;function s(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),i}function i(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const dw={name:"lineEnding",tokenize:l3e};function l3e(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),kt(e,t,"linePrefix")}}const eb={name:"thematicBreak",tokenize:d3e};function d3e(e,t,n){let r=0,s;return i;function i(u){return e.enter("thematicBreak"),a(u)}function a(u){return s=u,o(u)}function o(u){return u===s?(e.enter("thematicBreakSequence"),c(u)):r>=3&&(u===null||De(u))?(e.exit("thematicBreak"),t(u)):n(u)}function c(u){return u===s?(e.consume(u),r++,c):(e.exit("thematicBreakSequence"),ft(u)?kt(e,o,"whitespace")(u):o(u))}}const Hr={continuation:{tokenize:p3e},exit:b3e,name:"list",tokenize:m3e},f3e={partial:!0,tokenize:y3e},h3e={partial:!0,tokenize:g3e};function m3e(e,t,n){const r=this,s=r.events[r.events.length-1];let i=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,a=0;return o;function o(h){const m=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:Yv(h)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(eb,n,u)(h):u(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(h)}return n(h)}function c(h){return Yv(h)&&++a<10?(e.consume(h),c):(!r.interrupt||a<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),u(h)):n(h)}function u(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(Op,r.interrupt?n:l,e.attempt(f3e,f,d))}function l(h){return r.containerState.initialBlankLine=!0,i++,f(h)}function d(h){return ft(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),f):n(h)}function f(h){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function p3e(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Op,s,i);function s(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,kt(e,t,"listItemIndent",r.containerState.size+1)(o)}function i(o){return r.containerState.furtherBlankLines||!ft(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(h3e,t,a)(o))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,kt(e,e.attempt(Hr,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function g3e(e,t,n){const r=this;return kt(e,s,"listItemIndent",r.containerState.size+1);function s(i){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(i):n(i)}}function b3e(e){e.exit(this.containerState.type)}function y3e(e,t,n){const r=this;return kt(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(i){const a=r.events[r.events.length-1];return!ft(i)&&a&&a[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const sD={name:"setextUnderline",resolveTo:_3e,tokenize:k3e};function _3e(e,t){let n=e.length,r,s,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",i?(e.splice(s,0,["enter",a,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end={...e[i][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function k3e(e,t,n){const r=this;let s;return i;function i(u){let l=r.events.length,d;for(;l--;)if(r.events[l][1].type!=="lineEnding"&&r.events[l][1].type!=="linePrefix"&&r.events[l][1].type!=="content"){d=r.events[l][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||d)?(e.enter("setextHeadingLine"),s=u,a(u)):n(u)}function a(u){return e.enter("setextHeadingLineSequence"),o(u)}function o(u){return u===s?(e.consume(u),o):(e.exit("setextHeadingLineSequence"),ft(u)?kt(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||De(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const E3e={tokenize:C3e,partial:!0};function w3e(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:T3e,continuation:{tokenize:I3e},exit:A3e}},text:{91:{name:"gfmFootnoteCall",tokenize:x3e},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:S3e,resolveTo:v3e}}}}function S3e(e,t,n){const r=this;let s=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;s--;){const c=r.events[s][1];if(c.type==="labelImage"){a=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return o;function o(c){if(!a||!a._balanced)return n(c);const u=mi(r.sliceSerialize({start:a.end,end:r.now()}));return u.codePointAt(0)!==94||!i.includes(u.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function v3e(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function x3e(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,a;return o;function o(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),c}function c(d){return d!==94?n(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",u)}function u(d){if(i>999||d===93&&!a||d===null||d===91||Bt(d))return n(d);if(d===93){e.exit("chunkString");const f=e.exit("gfmFootnoteCallString");return s.includes(mi(r.sliceSerialize(f)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(d)}return Bt(d)||(a=!0),i++,e.consume(d),d===92?l:u}function l(d){return d===91||d===92||d===93?(e.consume(d),i++,u):u(d)}}function T3e(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a=0,o;return c;function c(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",l):n(m)}function l(m){if(a>999||m===93&&!o||m===null||m===91||Bt(m))return n(m);if(m===93){e.exit("chunkString");const y=e.exit("gfmFootnoteDefinitionLabelString");return i=mi(r.sliceSerialize(y)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),f}return Bt(m)||(o=!0),a++,e.consume(m),m===92?d:l}function d(m){return m===91||m===92||m===93?(e.consume(m),a++,l):l(m)}function f(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),s.includes(i)||s.push(i),kt(e,h,"gfmFootnoteDefinitionWhitespace")):n(m)}function h(m){return t(m)}}function I3e(e,t,n){return e.check(Op,t,e.attempt(E3e,t,n))}function A3e(e){e.exit("gfmFootnoteDefinition")}function C3e(e,t,n){const r=this;return kt(e,s,"gfmFootnoteDefinitionIndent",5);function s(i){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(i):n(i)}}function P3e(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:i,resolveAll:s};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(a,o){let c=-1;for(;++c<a.length;)if(a[c][0]==="enter"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._close){let u=c;for(;u--;)if(a[u][0]==="exit"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._open&&a[c][1].end.offset-a[c][1].start.offset===a[u][1].end.offset-a[u][1].start.offset){a[c][1].type="strikethroughSequence",a[u][1].type="strikethroughSequence";const l={type:"strikethrough",start:Object.assign({},a[u][1].start),end:Object.assign({},a[c][1].end)},d={type:"strikethroughText",start:Object.assign({},a[u][1].end),end:Object.assign({},a[c][1].start)},f=[["enter",l,o],["enter",a[u][1],o],["exit",a[u][1],o],["enter",d,o]],h=o.parser.constructs.insideSpan.null;h&&ys(f,f.length,0,dk(h,a.slice(u+1,c),o)),ys(f,f.length,0,[["exit",d,o],["enter",a[c][1],o],["exit",a[c][1],o],["exit",l,o]]),ys(a,u-1,c-u+3,f),c=u+f.length-2;break}}for(c=-1;++c<a.length;)a[c][1].type==="strikethroughSequenceTemporary"&&(a[c][1].type="data");return a}function i(a,o,c){const u=this.previous,l=this.events;let d=0;return f;function f(m){return u===126&&l[l.length-1][1].type!=="characterEscape"?c(m):(a.enter("strikethroughSequenceTemporary"),h(m))}function h(m){const y=Sd(u);if(m===126)return d>1?c(m):(a.consume(m),d++,h);if(d<2&&!n)return c(m);const g=a.exit("strikethroughSequenceTemporary"),p=Sd(m);return g._open=!p||p===2&&!!y,g._close=!y||y===2&&!!p,o(m)}}}class N3e{constructor(){this.map=[]}add(t,n,r){R3e(this,t,n,r)}consume(t){if(this.map.sort(function(i,a){return i[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let s=r.pop();for(;s;){for(const i of s)t.push(i);s=r.pop()}this.map.length=0}}function R3e(e,t,n,r){let s=0;if(!(n===0&&r.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...r);return}s+=1}e.map.push([t,n,r])}}function O3e(e,t){let n=!1;const r=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=r.length-1;r[i]=r[i]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function L3e(){return{flow:{null:{name:"table",tokenize:D3e,resolveAll:$3e}}}}function D3e(e,t,n){const r=this;let s=0,i=0,a;return o;function o(R){let z=r.events.length-1;for(;z>-1;){const G=r.events[z][1].type;if(G==="lineEnding"||G==="linePrefix")z--;else break}const V=z>-1?r.events[z][1].type:null,H=V==="tableHead"||V==="tableRow"?S:c;return H===S&&r.parser.lazy[r.now().line]?n(R):H(R)}function c(R){return e.enter("tableHead"),e.enter("tableRow"),u(R)}function u(R){return R===124||(a=!0,i+=1),l(R)}function l(R){return R===null?n(R):De(R)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),h):n(R):ft(R)?kt(e,l,"whitespace")(R):(i+=1,a&&(a=!1,s+=1),R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),a=!0,l):(e.enter("data"),d(R)))}function d(R){return R===null||R===124||Bt(R)?(e.exit("data"),l(R)):(e.consume(R),R===92?f:d)}function f(R){return R===92||R===124?(e.consume(R),d):d(R)}function h(R){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(R):(e.enter("tableDelimiterRow"),a=!1,ft(R)?kt(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):m(R))}function m(R){return R===45||R===58?g(R):R===124?(a=!0,e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),y):w(R)}function y(R){return ft(R)?kt(e,g,"whitespace")(R):g(R)}function g(R){return R===58?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),p):R===45?(i+=1,p(R)):R===null||De(R)?v(R):w(R)}function p(R){return R===45?(e.enter("tableDelimiterFiller"),_(R)):w(R)}function _(R){return R===45?(e.consume(R),_):R===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(R),e.exit("tableDelimiterMarker"),k):(e.exit("tableDelimiterFiller"),k(R))}function k(R){return ft(R)?kt(e,v,"whitespace")(R):v(R)}function v(R){return R===124?m(R):R===null||De(R)?!a||s!==i?w(R):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(R)):w(R)}function w(R){return n(R)}function S(R){return e.enter("tableRow"),T(R)}function T(R){return R===124?(e.enter("tableCellDivider"),e.consume(R),e.exit("tableCellDivider"),T):R===null||De(R)?(e.exit("tableRow"),t(R)):ft(R)?kt(e,T,"whitespace")(R):(e.enter("data"),I(R))}function I(R){return R===null||R===124||Bt(R)?(e.exit("data"),T(R)):(e.consume(R),R===92?$:I)}function $(R){return R===92||R===124?(e.consume(R),I):I(R)}}function $3e(e,t){let n=-1,r=!0,s=0,i=[0,0,0,0],a=[0,0,0,0],o=!1,c=0,u,l,d;const f=new N3e;for(;++n<e.length;){const h=e[n],m=h[1];h[0]==="enter"?m.type==="tableHead"?(o=!1,c!==0&&(iD(f,t,c,u,l),l=void 0,c=0),u={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[["enter",u,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,d=void 0,i=[0,0,0,0],a=[0,n+1,0,0],o&&(o=!1,l={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[["enter",l,t]])),s=m.type==="tableDelimiterRow"?2:l?3:1):s&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(i[1]!==0&&(a[0]=a[1],d=o0(f,t,i,s,void 0,d),i=[0,0,0,0]),a[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(i[1]!==0&&(a[0]=a[1],d=o0(f,t,i,s,void 0,d)),i=a,a=[i[1],n,0,0])):m.type==="tableHead"?(o=!0,c=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(c=n,i[1]!==0?(a[0]=a[1],d=o0(f,t,i,s,n,d)):a[1]!==0&&(d=o0(f,t,a,s,n,d)),s=0):s&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(a[3]=n)}for(c!==0&&iD(f,t,c,u,l),f.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=O3e(t.events,n))}return e}function o0(e,t,n,r,s,i){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(i.end=Object.assign({},El(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const c=El(t.events,n[1]);if(i={type:a,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",i,t]]),n[2]!==0){const u=El(t.events,n[2]),l=El(t.events,n[3]),d={type:o,start:Object.assign({},u),end:Object.assign({},l)};if(e.add(n[2],0,[["enter",d,t]]),r!==2){const f=t.events[n[2]],h=t.events[n[3]];if(f[1].end=Object.assign({},h[1].end),f[1].type="chunkText",f[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,y=n[3]-n[2]-1;e.add(m,y,[])}}e.add(n[3]+1,0,[["exit",d,t]])}return s!==void 0&&(i.end=Object.assign({},El(t.events,s)),e.add(s,0,[["exit",i,t]]),i=void 0),i}function iD(e,t,n,r,s){const i=[],a=El(t.events,n);s&&(s.end=Object.assign({},a),i.push(["exit",s,t])),r.end=Object.assign({},a),i.push(["exit",r,t]),e.add(n+1,0,i)}function El(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const M3e={name:"tasklistCheck",tokenize:F3e};function j3e(){return{text:{91:M3e}}}function F3e(e,t,n){const r=this;return s;function s(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),i)}function i(c){return Bt(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),a):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),a):n(c)}function a(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(c)}function o(c){return De(c)?t(c):ft(c)?e.check({tokenize:B3e},t,n)(c):n(c)}}function B3e(e,t,n){return kt(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function z3e(e){return bH([QOe(),w3e(),P3e(e),L3e(),j3e()])}const U3e={};function V3e(e){const t=this,n=e||U3e,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(z3e(n)),i.push(qOe()),a.push(GOe(n))}var H3e=Object.defineProperty,q3e=Object.defineProperties,G3e=Object.getOwnPropertyDescriptors,aD=Object.getOwnPropertySymbols,K3e=Object.prototype.hasOwnProperty,W3e=Object.prototype.propertyIsEnumerable,oD=(e,t,n)=>t in e?H3e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,OH=(e,t)=>{for(var n in t||(t={}))K3e.call(t,n)&&oD(e,n,t[n]);if(aD)for(var n of aD(t))W3e.call(t,n)&&oD(e,n,t[n]);return e},LH=(e,t)=>q3e(e,G3e(t)),ts=(e,t)=>{let n=!1,r=!1;for(let s=0;s<t;s+=1){if(e[s]==="\\"&&s+1<e.length&&e[s+1]==="`"){s+=1;continue}if(e.substring(s,s+3)==="```"){r=!r,s+=2;continue}!r&&e[s]==="`"&&(n=!n)}return n||r},J3e=(e,t)=>{let n=e.substring(t,t+3)==="```",r=t>0&&e.substring(t-1,t+2)==="```",s=t>1&&e.substring(t-2,t+1)==="```";return n||r||s},Y3e=e=>{let t=0;for(let n=0;n<e.length;n+=1){if(e[n]==="\\"&&n+1<e.length&&e[n+1]==="`"){n+=1;continue}e[n]==="`"&&!J3e(e,n)&&(t+=1)}return t},Ko=(e,t)=>{let n=!1,r=!1,s=-1;for(let i=0;i<e.length;i+=1){if(e[i]==="\\"&&i+1<e.length&&e[i+1]==="`"){i+=1;continue}if(e.substring(i,i+3)==="```"){r=!r,i+=2;continue}if(!r&&e[i]==="`")if(n){if(s<t&&t<i)return!0;n=!1,s=-1}else n=!0,s=i}return!1},Q3e=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,X3e=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(Q3e,(t,n,r,s)=>ts(e,s)?t:`${n}\\>${r}`),Z3e=/(\*\*)([^*]*\*?)$/,eDe=/(__)([^_]*?)$/,tDe=/(\*\*\*)([^*]*?)$/,nDe=/(\*)([^*]*?)$/,rDe=/(_)([^_]*?)$/,sDe=/(`)([^`]*?)$/,iDe=/(~~)([^~]*?)$/,Uu=/^[\s_~*`]*$/,DH=/^[\s]*[-*+][\s]+$/,aDe=/[\p{L}\p{N}_]/u,oDe=/^```[^`\n]*```?$/,cDe=/^\*{4,}$/,uDe=/(__)([^_]+)_$/,lDe=/(~~)([^~]+)~$/,cD=/~~/g,Wo=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:aDe.test(e)},dDe=(e,t)=>{let n=1;for(let r=t-1;r>=0;r-=1)if(e[r]==="]")n+=1;else if(e[r]==="["&&(n-=1,n===0))return r;return-1},$H=(e,t)=>{let n=1;for(let r=t+1;r<e.length;r+=1)if(e[r]==="[")n+=1;else if(e[r]==="]"&&(n-=1,n===0))return r;return-1},fk=(e,t)=>{let n=!1,r=!1;for(let s=0;s<e.length&&s<t;s+=1){if(e[s]==="\\"&&e[s+1]==="$"){s+=1;continue}e[s]==="$"&&(e[s+1]==="$"?(r=!r,s+=1,n=!1):r||(n=!n))}return n||r},fDe=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
283
- `)return!1}return!1},MH=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===")")return!1;if(e[n]==="(")return n>0&&e[n-1]==="]"?fDe(e,t):!1;if(e[n]===`
284
- `)return!1}return!1},hDe=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===">")return!1;if(e[n]==="<"){let r=n+1<e.length?e[n+1]:"";return r>="a"&&r<="z"||r>="A"&&r<="Z"||r==="/"}if(e[n]===`
285
- `)return!1}return!1},jC=(e,t,n)=>{let r=0;for(let c=t-1;c>=0;c-=1)if(e[c]===`
286
- `){r=c+1;break}let s=e.length;for(let c=t;c<e.length;c+=1)if(e[c]===`
287
- `){s=c;break}let i=e.substring(r,s),a=0,o=!1;for(let c of i)if(c===n)a+=1;else if(c!==" "&&c!==" "){o=!0;break}return a>=3&&!o},mDe=(e,t,n,r)=>n==="\\"||e.includes("$")&&fk(e,t)?!0:n!=="*"&&r==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(n==="*"||n&&r&&Wo(n)&&Wo(r)||(!n||n===" "||n===" "||n===`
288
- `)&&(!r||r===" "||r===" "||r===`
289
- `)),jH=e=>{let t=0,n=!1,r=e.length;for(let s=0;s<r;s+=1){if(e[s]==="`"&&s+2<r&&e[s+1]==="`"&&e[s+2]==="`"){n=!n,s+=2;continue}if(n||e[s]!=="*")continue;let i=s>0?e[s-1]:"",a=s<r-1?e[s+1]:"";mDe(e,s,i,a)||(t+=1)}return t},pDe=(e,t,n,r)=>!!(n==="\\"||e.includes("$")&&fk(e,t)||MH(e,t)||hDe(e,t)||n==="_"||r==="_"||n&&r&&Wo(n)&&Wo(r)),gDe=e=>{let t=0,n=!1,r=e.length;for(let s=0;s<r;s+=1){if(e[s]==="`"&&s+2<r&&e[s+1]==="`"&&e[s+2]==="`"){n=!n,s+=2;continue}if(n||e[s]!=="_")continue;let i=s>0?e[s-1]:"",a=s<r-1?e[s+1]:"";pDe(e,s,i,a)||(t+=1)}return t},bDe=e=>{let t=0,n=0,r=!1;for(let s=0;s<e.length;s+=1){if(e[s]==="`"&&s+2<e.length&&e[s+1]==="`"&&e[s+2]==="`"){n>=3&&(t+=Math.floor(n/3)),n=0,r=!r,s+=2;continue}r||(e[s]==="*"?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0))}return n>=3&&(t+=Math.floor(n/3)),t},FC=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]==="*"&&r+1<e.length&&e[r+1]==="*"&&(t+=1,r+=1)}return t},uD=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]==="_"&&r+1<e.length&&e[r+1]==="_"&&(t+=1,r+=1)}return t},yDe=(e,t,n)=>{if(!t||Uu.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
290
- `),s=r===-1?0:r+1,i=e.substring(s,n);return DH.test(i)&&t.includes(`
291
- `)?!0:jC(e,n,"*")},_De=e=>{let t=e.match(Z3e);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return ts(e,r)||Ko(e,r)||yDe(e,n,r)?e:FC(e)%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},kDe=(e,t,n)=>{if(!t||Uu.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
292
- `),s=r===-1?0:r+1,i=e.substring(s,n);return DH.test(i)&&t.includes(`
293
- `)?!0:jC(e,n,"_")},EDe=e=>{let t=e.match(eDe);if(!t){let s=e.match(uDe);if(s){let i=e.lastIndexOf(s[1]);if(!(ts(e,i)||Ko(e,i))&&uD(e)%2===1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return ts(e,r)||Ko(e,r)||kDe(e,n,r)?e:uD(e)%2===1?`${e}__`:e},wDe=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="*"&&e[n-1]!=="*"&&e[n+1]!=="*"&&e[n-1]!=="\\"&&!fk(e,n)){let r=n>0?e[n-1]:"",s=n<e.length-1?e[n+1]:"";if((!r||r===" "||r===" "||r===`
294
- `)&&(!s||s===" "||s===" "||s===`
295
- `)||r&&s&&Wo(r)&&Wo(s))continue;return n}}return-1},SDe=e=>{if(!e.match(nDe))return e;let t=wDe(e);if(t===-1||ts(e,t)||Ko(e,t))return e;let n=e.substring(t+1);return!n||Uu.test(n)?e:jH(e)%2===1?`${e}*`:e},FH=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="_"&&e[n-1]!=="_"&&e[n+1]!=="_"&&e[n-1]!=="\\"&&!fk(e,n)&&!MH(e,n)){let r=n>0?e[n-1]:"",s=n<e.length-1?e[n+1]:"";if(r&&s&&Wo(r)&&Wo(s))continue;return n}}return-1},vDe=e=>{let t=e.length;for(;t>0&&e[t-1]===`
296
- `;)t-=1;if(t<e.length){let n=e.slice(0,t),r=e.slice(t);return`${n}_${r}`}return`${e}_`},xDe=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(FC(t)%2!==1)return null;let n=t.indexOf("**"),r=FH(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},TDe=e=>{if(!e.match(rDe))return e;let t=FH(e);if(t===-1)return e;let n=e.substring(t+1);if(!n||Uu.test(n)||ts(e,t)||Ko(e,t))return e;if(gDe(e)%2===1){let r=xDe(e);return r!==null?r:vDe(e)}return e},IDe=e=>{let t=FC(e),n=jH(e);return t%2===0&&n%2===0},ADe=(e,t,n)=>!t||Uu.test(t)||ts(e,n)||Ko(e,n)?!0:jC(e,n,"*"),CDe=e=>{if(cDe.test(e))return e;let t=e.match(tDe);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return ADe(e,n,r)?e:bDe(e)%2===1?IDe(e)?e:`${e}***`:e},PDe=/<[a-zA-Z/][^>]*$/,NDe=e=>{let t=e.match(PDe);return!t||t.index===void 0||ts(e,t.index)?e:e.substring(0,t.index).trimEnd()},RDe=e=>!e.match(oDe)||e.includes(`
297
- `)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,ODe=e=>(e.match(/```/g)||[]).length%2===1,LDe=e=>{let t=RDe(e);if(t!==null)return t;let n=e.match(sDe);if(n&&!ODe(e)){let r=n[2];if(!r||Uu.test(r))return e;if(Y3e(e)%2===1)return`${e}\``}return e},DDe=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",$De=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!DDe(e,r)&&(n=!n),!n&&e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},MDe=e=>{let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
298
- `,t)!==-1&&!e.endsWith(`
299
- `)?`${e}
300
- $$`:`${e}$$`},jDe=e=>$De(e)%2===0?e:MDe(e),FDe=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let r=dDe(e,t);if(r===-1||ts(e,r))return null;let s=r>0&&e[r-1]==="!",i=s?r-1:r,a=e.substring(0,i);if(s)return a;let o=e.substring(r+1,t);return n==="text-only"?`${a}${o}`:`${a}[${o}](streamdown:incomplete-link)`},lD=(e,t)=>{for(let n=0;n<t;n++)if(e[n]==="["&&!ts(e,n)){if(n>0&&e[n-1]==="!")continue;let r=$H(e,n);if(r===-1)return n;if(r+1<e.length&&e[r+1]==="("){let s=e.indexOf(")",r+2);s!==-1&&(n=s)}}return t},BDe=(e,t,n)=>{let r=t>0&&e[t-1]==="!",s=r?t-1:t;if(!e.substring(t+1).includes("]")){let i=e.substring(0,s);if(r)return i;if(n==="text-only"){let a=lD(e,t);return e.substring(0,a)+e.substring(a+1)}return`${e}](streamdown:incomplete-link)`}if($H(e,t)===-1){let i=e.substring(0,s);if(r)return i;if(n==="text-only"){let a=lD(e,t);return e.substring(0,a)+e.substring(a+1)}return`${e}](streamdown:incomplete-link)`}return null},BH=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!ts(e,n)){let r=FDe(e,n,t);if(r!==null)return r}for(let r=e.length-1;r>=0;r-=1)if(e[r]==="["&&!ts(e,r)){let s=BDe(e,r,t);if(s!==null)return s}return e},zDe=/^-{1,2}$/,UDe=/^[\s]*-{1,2}[\s]+$/,VDe=/^={1,2}$/,HDe=/^[\s]*={1,2}[\s]+$/,qDe=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
301
- `);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),s=n.trim();if(zDe.test(s)&&!n.match(UDe)){let i=r.split(`
302
- `).at(-1);if(i&&i.trim().length>0)return`${e}​`}if(VDe.test(s)&&!n.match(HDe)){let i=r.split(`
303
- `).at(-1);if(i&&i.trim().length>0)return`${e}​`}return e},GDe=e=>{var t,n;let r=e.match(iDe);if(r){let s=r[2];if(!s||Uu.test(s))return e;let i=e.lastIndexOf(r[1]);if(ts(e,i)||Ko(e,i))return e;if(((t=e.match(cD))==null?void 0:t.length)%2===1)return`${e}~~`}else{let s=e.match(lDe);if(s){let i=e.lastIndexOf(s[0].slice(0,2));if(ts(e,i)||Ko(e,i))return e;if(((n=e.match(cD))==null?void 0:n.length)%2===1)return`${e}~`}}return e},fw=e=>e!==!1,us={COMPARISON_OPERATORS:-10,HTML_TAGS:-5,SETEXT_HEADINGS:0,LINKS:10,BOLD_ITALIC:20,BOLD:30,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,DEFAULT:100},KDe=[{handler:{name:"comparisonOperators",handle:X3e,priority:us.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:NDe,priority:us.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:qDe,priority:us.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:BH,priority:us.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:CDe,priority:us.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:_De,priority:us.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:EDe,priority:us.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:SDe,priority:us.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:TDe,priority:us.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:LDe,priority:us.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:GDe,priority:us.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:jDe,priority:us.KATEX},optionKey:"katex"}],WDe=e=>{var t;let n=(t=e?.linkMode)!=null?t:"protocol";return KDe.filter(({handler:r,optionKey:s})=>r.name==="links"?fw(e?.links)||fw(e?.images):fw(e?.[s])).map(({handler:r,earlyReturn:s})=>r.name==="links"?{handler:LH(OH({},r),{handle:i=>BH(i,n)}),earlyReturn:n==="protocol"?s:void 0}:{handler:r,earlyReturn:s})},JDe=(e,t)=>{var n;if(!e||typeof e!="string")return e;let r=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,s=WDe(t),i=((n=t?.handlers)!=null?n:[]).map(o=>{var c;return{handler:LH(OH({},o),{priority:(c=o.priority)!=null?c:us.DEFAULT}),earlyReturn:void 0}}),a=[...s,...i].sort((o,c)=>{var u,l;return((u=o.handler.priority)!=null?u:0)-((l=c.handler.priority)!=null?l:0)});for(let{handler:o,earlyReturn:c}of a)if(r=o.handle(r),c!=null&&c(r))return r;return r},YDe=JDe;const QDe=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,XDe=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ZDe={};function dD(e,t){return(ZDe.jsx?XDe:QDe).test(e)}var ll={},hw,fD;function e$e(){if(fD)return hw;fD=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,i=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,o=/^\s+|\s+$/g,c=`
304
- `,u="/",l="*",d="",f="comment",h="declaration";function m(g,p){if(typeof g!="string")throw new TypeError("First argument must be a string");if(!g)return[];p=p||{};var _=1,k=1;function v(G){var Q=G.match(t);Q&&(_+=Q.length);var re=G.lastIndexOf(c);k=~re?G.length-re:k+G.length}function w(){var G={line:_,column:k};return function(Q){return Q.position=new S(G),$(),Q}}function S(G){this.start=G,this.end={line:_,column:k},this.source=p.source}S.prototype.content=g;function T(G){var Q=new Error(p.source+":"+_+":"+k+": "+G);if(Q.reason=G,Q.filename=p.source,Q.line=_,Q.column=k,Q.source=g,!p.silent)throw Q}function I(G){var Q=G.exec(g);if(Q){var re=Q[0];return v(re),g=g.slice(re.length),Q}}function $(){I(n)}function R(G){var Q;for(G=G||[];Q=z();)Q!==!1&&G.push(Q);return G}function z(){var G=w();if(!(u!=g.charAt(0)||l!=g.charAt(1))){for(var Q=2;d!=g.charAt(Q)&&(l!=g.charAt(Q)||u!=g.charAt(Q+1));)++Q;if(Q+=2,d===g.charAt(Q-1))return T("End of comment missing");var re=g.slice(2,Q-2);return k+=2,v(re),g=g.slice(Q),k+=2,G({type:f,comment:re})}}function V(){var G=w(),Q=I(r);if(Q){if(z(),!I(s))return T("property missing ':'");var re=I(i),me=G({type:h,property:y(Q[0].replace(e,d)),value:re?y(re[0].replace(e,d)):d});return I(a),me}}function H(){var G=[];R(G);for(var Q;Q=V();)Q!==!1&&(G.push(Q),R(G));return G}return $(),H()}function y(g){return g?g.replace(o,d):d}return hw=m,hw}var hD;function t$e(){if(hD)return ll;hD=1;var e=ll&&ll.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ll,"__esModule",{value:!0}),ll.default=n;const t=e(e$e());function n(r,s){let i=null;if(!r||typeof r!="string")return i;const a=(0,t.default)(r),o=typeof s=="function";return a.forEach(c=>{if(c.type!=="declaration")return;const{property:u,value:l}=c;o?s(u,l,c):l&&(i=i||{},i[u]=l)}),i}return ll}var $f={},mD;function n$e(){if(mD)return $f;mD=1,Object.defineProperty($f,"__esModule",{value:!0}),$f.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,i=function(u){return!u||n.test(u)||e.test(u)},a=function(u,l){return l.toUpperCase()},o=function(u,l){return"".concat(l,"-")},c=function(u,l){return l===void 0&&(l={}),i(u)?u:(u=u.toLowerCase(),l.reactCompat?u=u.replace(s,o):u=u.replace(r,o),u.replace(t,a))};return $f.camelCase=c,$f}var Mf,pD;function r$e(){if(pD)return Mf;pD=1;var e=Mf&&Mf.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(t$e()),n=n$e();function r(s,i){var a={};return!s||typeof s!="string"||(0,t.default)(s,function(o,c){o&&c&&(a[(0,n.camelCase)(o,i)]=c)}),a}return r.default=r,Mf=r,Mf}var s$e=r$e();const i$e=t_(s$e);function jh(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?gD(e.position):"start"in e||"end"in e?gD(e):"line"in e||"column"in e?Zv(e):""}function Zv(e){return bD(e&&e.line)+":"+bD(e&&e.column)}function gD(e){return Zv(e&&e.start)+"-"+Zv(e&&e.end)}function bD(e){return e&&typeof e=="number"?e:1}class xr extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let s="",i={},a=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?s=t:!i.cause&&t&&(a=!0,s=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?i.ruleId=r:(i.source=r.slice(0,c),i.ruleId=r.slice(c+1))}if(!i.place&&i.ancestors&&i.ancestors){const c=i.ancestors[i.ancestors.length-1];c&&(i.place=c.position)}const o=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=o?o.line:void 0,this.name=jh(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}xr.prototype.file="";xr.prototype.name="";xr.prototype.reason="";xr.prototype.message="";xr.prototype.stack="";xr.prototype.column=void 0;xr.prototype.line=void 0;xr.prototype.ancestors=void 0;xr.prototype.cause=void 0;xr.prototype.fatal=void 0;xr.prototype.place=void 0;xr.prototype.ruleId=void 0;xr.prototype.source=void 0;const BC={}.hasOwnProperty,a$e=new Map,o$e=/[A-Z]/g,c$e=new Set(["table","tbody","thead","tfoot","tr"]),u$e=new Set(["td","th"]),zH="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function l$e(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=y$e(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=b$e(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?aa:Xd,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=UH(s,e,void 0);return i&&typeof i!="string"?i:s.create(e,s.Fragment,{children:i||void 0},void 0)}function UH(e,t,n){if(t.type==="element")return d$e(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return f$e(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return m$e(e,t,n);if(t.type==="mdxjsEsm")return h$e(e,t);if(t.type==="root")return p$e(e,t,n);if(t.type==="text")return g$e(e,t)}function d$e(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=aa,e.schema=s),e.ancestors.push(t);const i=HH(e,t.tagName,!1),a=_$e(e,t);let o=UC(e,t);return c$e.has(t.tagName)&&(o=o.filter(function(c){return typeof c=="string"?!X1(c):!0})),VH(e,a,i,t),zC(a,o),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function f$e(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Pm(e,t.position)}function h$e(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Pm(e,t.position)}function m$e(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=aa,e.schema=s),e.ancestors.push(t);const i=t.name===null?e.Fragment:HH(e,t.name,!0),a=k$e(e,t),o=UC(e,t);return VH(e,a,i,t),zC(a,o),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function p$e(e,t,n){const r={};return zC(r,UC(e,t)),e.create(t,e.Fragment,r,n)}function g$e(e,t){return t.value}function VH(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function zC(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function b$e(e,t,n){return r;function r(s,i,a,o){const u=Array.isArray(a.children)?n:t;return o?u(i,a,o):u(i,a)}}function y$e(e,t){return n;function n(r,s,i,a){const o=Array.isArray(i.children),c=oa(r);return t(s,i,a,o,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function _$e(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&BC.call(t.properties,s)){const i=E$e(e,s,t.properties[s]);if(i){const[a,o]=i;e.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&u$e.has(t.tagName)?r=o:n[a]=o}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function k$e(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const a=i.expression;a.type;const o=a.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else Pm(e,t.position);else{const s=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,i=e.evaluater.evaluateExpression(o.expression)}else Pm(e,t.position);else i=r.value===null?!0:r.value;n[s]=i}return n}function UC(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:a$e;for(;++r<t.children.length;){const i=t.children[r];let a;if(e.passKeys){const c=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(c){const u=s.get(c)||0;a=c+"-"+u,s.set(c,u+1)}}const o=UH(e,i,a);o!==void 0&&n.push(o)}return n}function E$e(e,t,n){const r=Ap(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?lC(n):dC(n)),r.property==="style"){let s=typeof n=="object"?n:w$e(e,String(n));return e.stylePropertyNameCase==="css"&&(s=S$e(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?Bxe[r.property]||r.property:r.attribute,n]}}function w$e(e,t){try{return i$e(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new xr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=zH+"#cannot-parse-style-attribute",s}}function HH(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let i=-1,a;for(;++i<s.length;){const o=dD(s[i])?{type:"Identifier",name:s[i]}:{type:"Literal",value:s[i]};a=a?{type:"MemberExpression",object:a,property:o,computed:!!(i&&o.type==="Literal"),optional:!1}:o}r=a}else r=dD(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return BC.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);Pm(e)}function Pm(e,t){const n=new xr("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=zH+"#cannot-handle-mdx-estrees-without-createevaluater",n}function S$e(e){const t={};let n;for(n in e)BC.call(e,n)&&(t[v$e(n)]=e[n]);return t}function v$e(e){let t=e.replace(o$e,x$e);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function x$e(e){return"-"+e.toLowerCase()}const mw={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},T$e={tokenize:I$e};function I$e(e){const t=e.attempt(this.parser.constructs.contentInitial,r,s);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),kt(e,t,"linePrefix")}function s(o){return e.enter("paragraph"),i(o)}function i(o){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,a(o)}function a(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return De(o)?(e.consume(o),e.exit("chunkText"),i):(e.consume(o),a)}}const A$e={tokenize:C$e},yD={tokenize:P$e};function C$e(e){const t=this,n=[];let r=0,s,i,a;return o;function o(k){if(r<n.length){const v=n[r];return t.containerState=v[1],e.attempt(v[0].continuation,c,u)(k)}return u(k)}function c(k){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&_();const v=t.events.length;let w=v,S;for(;w--;)if(t.events[w][0]==="exit"&&t.events[w][1].type==="chunkFlow"){S=t.events[w][1].end;break}p(r);let T=v;for(;T<t.events.length;)t.events[T][1].end={...S},T++;return ys(t.events,w+1,0,t.events.slice(v)),t.events.length=T,u(k)}return o(k)}function u(k){if(r===n.length){if(!s)return f(k);if(s.currentConstruct&&s.currentConstruct.concrete)return m(k);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(yD,l,d)(k)}function l(k){return s&&_(),p(r),f(k)}function d(k){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,m(k)}function f(k){return t.containerState={},e.attempt(yD,h,m)(k)}function h(k){return r++,n.push([t.currentConstruct,t.containerState]),f(k)}function m(k){if(k===null){s&&_(),p(0),e.consume(k);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:i}),y(k)}function y(k){if(k===null){g(e.exit("chunkFlow"),!0),p(0),e.consume(k);return}return De(k)?(e.consume(k),g(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(k),y)}function g(k,v){const w=t.sliceStream(k);if(v&&w.push(null),k.previous=i,i&&(i.next=k),i=k,s.defineSkip(k.start),s.write(w),t.parser.lazy[k.start.line]){let S=s.events.length;for(;S--;)if(s.events[S][1].start.offset<a&&(!s.events[S][1].end||s.events[S][1].end.offset>a))return;const T=t.events.length;let I=T,$,R;for(;I--;)if(t.events[I][0]==="exit"&&t.events[I][1].type==="chunkFlow"){if($){R=t.events[I][1].end;break}$=!0}for(p(r),S=T;S<t.events.length;)t.events[S][1].end={...R},S++;ys(t.events,I+1,0,t.events.slice(T)),t.events.length=S}}function p(k){let v=n.length;for(;v-- >k;){const w=n[v];t.containerState=w[1],w[0].exit.call(t,e)}n.length=k}function _(){s.write([null]),i=void 0,s=void 0,t.containerState._closeFlow=void 0}}function P$e(e,t,n){return kt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const N$e={tokenize:R$e};function R$e(e){const t=this,n=e.attempt(Op,r,e.attempt(this.parser.constructs.flowInitial,s,kt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(ILe,s)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const O$e={resolveAll:GH()},L$e=qH("string"),D$e=qH("text");function qH(e){return{resolveAll:GH(e==="text"?$$e:void 0),tokenize:t};function t(n){const r=this,s=this.parser.constructs[e],i=n.attempt(s,a,o);return a;function a(l){return u(l)?i(l):o(l)}function o(l){if(l===null){n.consume(l);return}return n.enter("data"),n.consume(l),c}function c(l){return u(l)?(n.exit("data"),i(l)):(n.consume(l),c)}function u(l){if(l===null)return!0;const d=s[l];let f=-1;if(d)for(;++f<d.length;){const h=d[f];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function GH(e){return t;function t(n,r){let s=-1,i;for(;++s<=n.length;)i===void 0?n[s]&&n[s][1].type==="data"&&(i=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==i+2&&(n[i][1].end=n[s-1][1].end,n.splice(i+2,s-i-2),s=i+2),i=void 0);return e?e(n,r):n}}function $$e(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],s=t.sliceStream(r);let i=s.length,a=-1,o=0,c;for(;i--;){const u=s[i];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)o++,a--;if(a)break;a=-1}else if(u===-2)c=!0,o++;else if(u!==-1){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(o=0),o){const u={type:n===e.length||c||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?a:r.start._bufferIndex+a,_index:r.start._index+i,line:r.end.line,column:r.end.column-o,offset:r.end.offset-o},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const M$e={42:Hr,43:Hr,45:Hr,48:Hr,49:Hr,50:Hr,51:Hr,52:Hr,53:Hr,54:Hr,55:Hr,56:Hr,57:Hr,62:TH},j$e={91:RLe},F$e={[-2]:lw,[-1]:lw,32:lw},B$e={35:jLe,42:eb,45:[sD,eb],60:ULe,61:sD,95:eb,96:nD,126:nD},z$e={38:AH,92:IH},U$e={[-5]:dw,[-4]:dw,[-3]:dw,33:a3e,38:AH,42:Xv,60:[cLe,JLe],91:c3e,92:[$Le,IH],93:MC,95:Xv,96:ELe},V$e={null:[Xv,O$e]},H$e={null:[42,95]},q$e={null:[]},G$e=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:H$e,contentInitial:j$e,disable:q$e,document:M$e,flow:B$e,flowInitial:F$e,insideSpan:V$e,string:z$e,text:U$e},Symbol.toStringTag,{value:"Module"}));function K$e(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},i=[];let a=[],o=[];const c={attempt:T(w),check:T(S),consume:_,enter:k,exit:v,interrupt:T(S,{interrupt:!0})},u={code:null,containerState:{},defineSkip:y,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:h,write:d};let l=t.tokenize.call(u,c);return t.resolveAll&&i.push(t),u;function d(z){return a=Os(a,z),g(),a[a.length-1]!==null?[]:(I(t,0),u.events=dk(i,u.events,u),u.events)}function f(z,V){return J$e(h(z),V)}function h(z){return W$e(a,z)}function m(){const{_bufferIndex:z,_index:V,line:H,column:G,offset:Q}=r;return{_bufferIndex:z,_index:V,line:H,column:G,offset:Q}}function y(z){s[z.line]=z.column,R()}function g(){let z;for(;r._index<a.length;){const V=a[r._index];if(typeof V=="string")for(z=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===z&&r._bufferIndex<V.length;)p(V.charCodeAt(r._bufferIndex));else p(V)}}function p(z){l=l(z)}function _(z){De(z)?(r.line++,r.column=1,r.offset+=z===-3?2:1,R()):z!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=z}function k(z,V){const H=V||{};return H.type=z,H.start=m(),u.events.push(["enter",H,u]),o.push(H),H}function v(z){const V=o.pop();return V.end=m(),u.events.push(["exit",V,u]),V}function w(z,V){I(z,V.from)}function S(z,V){V.restore()}function T(z,V){return H;function H(G,Q,re){let me,ke,tt,C;return Array.isArray(G)?K(G):"tokenize"in G?K([G]):M(G);function M(J){return be;function be(ge){const Ee=ge!==null&&J[ge],Oe=ge!==null&&J.null,q=[...Array.isArray(Ee)?Ee:Ee?[Ee]:[],...Array.isArray(Oe)?Oe:Oe?[Oe]:[]];return K(q)(ge)}}function K(J){return me=J,ke=0,J.length===0?re:A(J[ke])}function A(J){return be;function be(ge){return C=$(),tt=J,J.partial||(u.currentConstruct=J),J.name&&u.parser.constructs.disable.null.includes(J.name)?B():J.tokenize.call(V?Object.assign(Object.create(u),V):u,c,P,B)(ge)}}function P(J){return z(tt,C),Q}function B(J){return C.restore(),++ke<me.length?A(me[ke]):re}}}function I(z,V){z.resolveAll&&!i.includes(z)&&i.push(z),z.resolve&&ys(u.events,V,u.events.length-V,z.resolve(u.events.slice(V),u)),z.resolveTo&&(u.events=z.resolveTo(u.events,u))}function $(){const z=m(),V=u.previous,H=u.currentConstruct,G=u.events.length,Q=Array.from(o);return{from:G,restore:re};function re(){r=z,u.previous=V,u.currentConstruct=H,u.events.length=G,o=Q,R()}}function R(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function W$e(e,t){const n=t.start._index,r=t.start._bufferIndex,s=t.end._index,i=t.end._bufferIndex;let a;if(n===s)a=[e[n].slice(r,i)];else{if(a=e.slice(n,s),r>-1){const o=a[0];typeof o=="string"?a[0]=o.slice(r):a.shift()}i>0&&a.push(e[s].slice(0,i))}return a}function J$e(e,t){let n=-1;const r=[];let s;for(;++n<e.length;){const i=e[n];let a;if(typeof i=="string")a=i;else switch(i){case-5:{a="\r";break}case-4:{a=`
305
- `;break}case-3:{a=`\r
306
- `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&s)continue;a=" ";break}default:a=String.fromCharCode(i)}s=i===-2,r.push(a)}return r.join("")}function Y$e(e){const r={constructs:bH([G$e,...(e||{}).extensions||[]]),content:s(T$e),defined:[],document:s(A$e),flow:s(N$e),lazy:{},string:s(L$e),text:s(D$e)};return r;function s(i){return a;function a(o){return K$e(r,i,o)}}}function Q$e(e){for(;!CH(e););return e}const _D=/[\0\t\n\r]/g;function X$e(){let e=1,t="",n=!0,r;return s;function s(i,a,o){const c=[];let u,l,d,f,h;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(a||void 0).decode(i)),d=0,t="",n&&(i.charCodeAt(0)===65279&&d++,n=void 0);d<i.length;){if(_D.lastIndex=d,u=_D.exec(i),f=u&&u.index!==void 0?u.index:i.length,h=i.charCodeAt(f),!u){t=i.slice(d);break}if(h===10&&d===f&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),d<f&&(c.push(i.slice(d,f)),e+=f-d),h){case 0:{c.push(65533),e++;break}case 9:{for(l=Math.ceil(e/4)*4,c.push(-2);e++<l;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}d=f+1}return o&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const KH={}.hasOwnProperty;function Z$e(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),eMe(n)(Q$e(Y$e(n).document().write(X$e()(e,t,!0))))}function eMe(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(gt),autolinkProtocol:$,autolinkEmail:$,atxHeading:i(we),blockQuote:i(Oe),characterEscape:$,characterReference:$,codeFenced:i(q),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(q,a),codeText:i(W,a),codeTextData:$,data:$,codeFlowValue:$,definition:i(se),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(le),hardBreakEscape:i(Fe),hardBreakTrailing:i(Fe),htmlFlow:i(Ie,a),htmlFlowData:$,htmlText:i(Ie,a),htmlTextData:$,image:i(Me),label:a,link:i(gt),listItem:i(Ct),listItemValue:f,listOrdered:i(it,d),listUnordered:i(it),paragraph:i(zr),reference:A,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(we),strong:i(pn),thematicBreak:i(ss)},exit:{atxHeading:c(),atxHeadingSequence:w,autolink:c(),autolinkEmail:Ee,autolinkProtocol:ge,blockQuote:c(),characterEscapeValue:R,characterReferenceMarkerHexadecimal:B,characterReferenceMarkerNumeric:B,characterReferenceValue:J,characterReference:be,codeFenced:c(g),codeFencedFence:y,codeFencedFenceInfo:h,codeFencedFenceMeta:m,codeFlowValue:R,codeIndented:c(p),codeText:c(Q),codeTextData:R,data:R,definition:c(),definitionDestinationString:v,definitionLabelString:_,definitionTitleString:k,emphasis:c(),hardBreakEscape:c(V),hardBreakTrailing:c(V),htmlFlow:c(H),htmlFlowData:R,htmlText:c(G),htmlTextData:R,image:c(me),label:tt,labelText:ke,lineEnding:z,link:c(re),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:P,resourceDestinationString:C,resourceTitleString:M,resource:K,setextHeading:c(I),setextHeadingLineSequence:T,setextHeadingText:S,strong:c(),thematicBreak:c()}};WH(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(X){let ae={type:"root",children:[]};const Ae={stack:[ae],tokenStack:[],config:t,enter:o,exit:u,buffer:a,resume:l,data:n},xe=[];let xt=-1;for(;++xt<X.length;)if(X[xt][1].type==="listOrdered"||X[xt][1].type==="listUnordered")if(X[xt][0]==="enter")xe.push(xt);else{const Pe=xe.pop();xt=s(X,Pe,xt)}for(xt=-1;++xt<X.length;){const Pe=t[X[xt][0]];KH.call(Pe,X[xt][1].type)&&Pe[X[xt][1].type].call(Object.assign({sliceSerialize:X[xt][2].sliceSerialize},Ae),X[xt][1])}if(Ae.tokenStack.length>0){const Pe=Ae.tokenStack[Ae.tokenStack.length-1];(Pe[1]||kD).call(Ae,void 0,Pe[0])}for(ae.position={start:eo(X.length>0?X[0][1].start:{line:1,column:1,offset:0}),end:eo(X.length>0?X[X.length-2][1].end:{line:1,column:1,offset:0})},xt=-1;++xt<t.transforms.length;)ae=t.transforms[xt](ae)||ae;return ae}function s(X,ae,Ae){let xe=ae-1,xt=-1,Pe=!1,Ci,Ur,qu,of;for(;++xe<=Ae;){const is=X[xe];switch(is[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{is[0]==="enter"?xt++:xt--,of=void 0;break}case"lineEndingBlank":{is[0]==="enter"&&(Ci&&!of&&!xt&&!qu&&(qu=xe),of=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:of=void 0}if(!xt&&is[0]==="enter"&&is[1].type==="listItemPrefix"||xt===-1&&is[0]==="exit"&&(is[1].type==="listUnordered"||is[1].type==="listOrdered")){if(Ci){let Gu=xe;for(Ur=void 0;Gu--;){const ua=X[Gu];if(ua[1].type==="lineEnding"||ua[1].type==="lineEndingBlank"){if(ua[0]==="exit")continue;Ur&&(X[Ur][1].type="lineEndingBlank",Pe=!0),ua[1].type="lineEnding",Ur=Gu}else if(!(ua[1].type==="linePrefix"||ua[1].type==="blockQuotePrefix"||ua[1].type==="blockQuotePrefixWhitespace"||ua[1].type==="blockQuoteMarker"||ua[1].type==="listItemIndent"))break}qu&&(!Ur||qu<Ur)&&(Ci._spread=!0),Ci.end=Object.assign({},Ur?X[Ur][1].start:is[1].end),X.splice(Ur||xe,0,["exit",Ci,is[2]]),xe++,Ae++}if(is[1].type==="listItemPrefix"){const Gu={type:"listItem",_spread:!1,start:Object.assign({},is[1].start),end:void 0};Ci=Gu,X.splice(xe,0,["enter",Gu,is[2]]),xe++,Ae++,qu=void 0,of=!0}}}return X[ae][1]._spread=Pe,Ae}function i(X,ae){return Ae;function Ae(xe){o.call(this,X(xe),xe),ae&&ae.call(this,xe)}}function a(){this.stack.push({type:"fragment",children:[]})}function o(X,ae,Ae){this.stack[this.stack.length-1].children.push(X),this.stack.push(X),this.tokenStack.push([ae,Ae||void 0]),X.position={start:eo(ae.start),end:void 0}}function c(X){return ae;function ae(Ae){X&&X.call(this,Ae),u.call(this,Ae)}}function u(X,ae){const Ae=this.stack.pop(),xe=this.tokenStack.pop();if(xe)xe[0].type!==X.type&&(ae?ae.call(this,X,xe[0]):(xe[1]||kD).call(this,X,xe[0]));else throw new Error("Cannot close `"+X.type+"` ("+jh({start:X.start,end:X.end})+"): it’s not open");Ae.position.end=eo(X.end)}function l(){return OC(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(X){if(this.data.expectingFirstListItemValue){const ae=this.stack[this.stack.length-2];ae.start=Number.parseInt(this.sliceSerialize(X),10),this.data.expectingFirstListItemValue=void 0}}function h(){const X=this.resume(),ae=this.stack[this.stack.length-1];ae.lang=X}function m(){const X=this.resume(),ae=this.stack[this.stack.length-1];ae.meta=X}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const X=this.resume(),ae=this.stack[this.stack.length-1];ae.value=X.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function p(){const X=this.resume(),ae=this.stack[this.stack.length-1];ae.value=X.replace(/(\r?\n|\r)$/g,"")}function _(X){const ae=this.resume(),Ae=this.stack[this.stack.length-1];Ae.label=ae,Ae.identifier=mi(this.sliceSerialize(X)).toLowerCase()}function k(){const X=this.resume(),ae=this.stack[this.stack.length-1];ae.title=X}function v(){const X=this.resume(),ae=this.stack[this.stack.length-1];ae.url=X}function w(X){const ae=this.stack[this.stack.length-1];if(!ae.depth){const Ae=this.sliceSerialize(X).length;ae.depth=Ae}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function T(X){const ae=this.stack[this.stack.length-1];ae.depth=this.sliceSerialize(X).codePointAt(0)===61?1:2}function I(){this.data.setextHeadingSlurpLineEnding=void 0}function $(X){const Ae=this.stack[this.stack.length-1].children;let xe=Ae[Ae.length-1];(!xe||xe.type!=="text")&&(xe=Gs(),xe.position={start:eo(X.start),end:void 0},Ae.push(xe)),this.stack.push(xe)}function R(X){const ae=this.stack.pop();ae.value+=this.sliceSerialize(X),ae.position.end=eo(X.end)}function z(X){const ae=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ae=ae.children[ae.children.length-1];Ae.position.end=eo(X.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ae.type)&&($.call(this,X),R.call(this,X))}function V(){this.data.atHardBreak=!0}function H(){const X=this.resume(),ae=this.stack[this.stack.length-1];ae.value=X}function G(){const X=this.resume(),ae=this.stack[this.stack.length-1];ae.value=X}function Q(){const X=this.resume(),ae=this.stack[this.stack.length-1];ae.value=X}function re(){const X=this.stack[this.stack.length-1];if(this.data.inReference){const ae=this.data.referenceType||"shortcut";X.type+="Reference",X.referenceType=ae,delete X.url,delete X.title}else delete X.identifier,delete X.label;this.data.referenceType=void 0}function me(){const X=this.stack[this.stack.length-1];if(this.data.inReference){const ae=this.data.referenceType||"shortcut";X.type+="Reference",X.referenceType=ae,delete X.url,delete X.title}else delete X.identifier,delete X.label;this.data.referenceType=void 0}function ke(X){const ae=this.sliceSerialize(X),Ae=this.stack[this.stack.length-2];Ae.label=ROe(ae),Ae.identifier=mi(ae).toLowerCase()}function tt(){const X=this.stack[this.stack.length-1],ae=this.resume(),Ae=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ae.type==="link"){const xe=X.children;Ae.children=xe}else Ae.alt=ae}function C(){const X=this.resume(),ae=this.stack[this.stack.length-1];ae.url=X}function M(){const X=this.resume(),ae=this.stack[this.stack.length-1];ae.title=X}function K(){this.data.inReference=void 0}function A(){this.data.referenceType="collapsed"}function P(X){const ae=this.resume(),Ae=this.stack[this.stack.length-1];Ae.label=ae,Ae.identifier=mi(this.sliceSerialize(X)).toLowerCase(),this.data.referenceType="full"}function B(X){this.data.characterReferenceType=X.type}function J(X){const ae=this.sliceSerialize(X),Ae=this.data.characterReferenceType;let xe;Ae?(xe=gH(ae,Ae==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):xe=DC(ae);const xt=this.stack[this.stack.length-1];xt.value+=xe}function be(X){const ae=this.stack.pop();ae.position.end=eo(X.end)}function ge(X){R.call(this,X);const ae=this.stack[this.stack.length-1];ae.url=this.sliceSerialize(X)}function Ee(X){R.call(this,X);const ae=this.stack[this.stack.length-1];ae.url="mailto:"+this.sliceSerialize(X)}function Oe(){return{type:"blockquote",children:[]}}function q(){return{type:"code",lang:null,meta:null,value:""}}function W(){return{type:"inlineCode",value:""}}function se(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function le(){return{type:"emphasis",children:[]}}function we(){return{type:"heading",depth:0,children:[]}}function Fe(){return{type:"break"}}function Ie(){return{type:"html",value:""}}function Me(){return{type:"image",title:null,url:"",alt:null}}function gt(){return{type:"link",title:null,url:"",children:[]}}function it(X){return{type:"list",ordered:X.type==="listOrdered",start:null,spread:X._spread,children:[]}}function Ct(X){return{type:"listItem",spread:X._spread,checked:null,children:[]}}function zr(){return{type:"paragraph",children:[]}}function pn(){return{type:"strong",children:[]}}function Gs(){return{type:"text",value:""}}function ss(){return{type:"thematicBreak"}}}function eo(e){return{line:e.line,column:e.column,offset:e.offset}}function WH(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?WH(e,r):tMe(e,r)}}function tMe(e,t){let n;for(n in t)if(KH.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function kD(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+jh({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+jh({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+jh({start:t.start,end:t.end})+") is still open")}function nMe(e){const t=this;t.parser=n;function n(r){return Z$e(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function rMe(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function sMe(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
307
- `}]}function iMe(e,t){const n=t.value?t.value+`
308
- `:"",r={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(r.className=["language-"+s[0]]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function aMe(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function oMe(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function cMe(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=sf(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let a,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=i+1,o+=1,e.footnoteCounts.set(r,o);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,c);const u={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,u),e.applyData(t,u)}function uMe(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function lMe(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function JH(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const s=e.all(t),i=s[0];i&&i.type==="text"?i.value="["+i.value:s.unshift({type:"text",value:"["});const a=s[s.length-1];return a&&a.type==="text"?a.value+=r:s.push({type:"text",value:r}),s}function dMe(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return JH(e,t);const s={src:sf(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const i={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,i),e.applyData(t,i)}function fMe(e,t){const n={src:sf(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function hMe(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function mMe(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return JH(e,t);const s={href:sf(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const i={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function pMe(e,t){const n={href:sf(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function gMe(e,t,n){const r=e.all(t),s=n?bMe(n):YH(t),i={},a=[];if(typeof t.checked=="boolean"){const l=r[0];let d;l&&l.type==="element"&&l.tagName==="p"?d=l:(d={type:"element",tagName:"p",properties:{},children:[]},r.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const l=r[o];(s||o!==0||l.type!=="element"||l.tagName!=="p")&&a.push({type:"text",value:`
309
- `}),l.type==="element"&&l.tagName==="p"&&!s?a.push(...l.children):a.push(l)}const c=r[r.length-1];c&&(s||c.type!=="element"||c.tagName!=="p")&&a.push({type:"text",value:`
310
- `});const u={type:"element",tagName:"li",properties:i,children:a};return e.patch(t,u),e.applyData(t,u)}function bMe(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=YH(n[r])}return t}function YH(e){const t=e.spread;return t??e.children.length>1}function yMe(e,t){const n={},r=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<r.length;){const a=r[s];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)}function _Me(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function kMe(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function EMe(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function wMe(e,t){const n=e.all(t),r=n.shift(),s=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),s.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=oa(t.children[1]),c=uk(t.children[t.children.length-1]);o&&c&&(a.position={start:o,end:c}),s.push(a)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,i),e.applyData(t,i)}function SMe(e,t,n){const r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,o=a?a.length:t.children.length;let c=-1;const u=[];for(;++c<o;){const d=t.children[c],f={},h=a?a[c]:void 0;h&&(f.align=h);let m={type:"element",tagName:i,properties:f,children:[]};d&&(m.children=e.all(d),e.patch(d,m),m=e.applyData(d,m)),u.push(m)}const l={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,l),e.applyData(t,l)}function vMe(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const ED=9,wD=32;function xMe(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const i=[];for(;r;)i.push(SD(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return i.push(SD(t.slice(s),s>0,!1)),i.join("")}function SD(e,t,n){let r=0,s=e.length;if(t){let i=e.codePointAt(r);for(;i===ED||i===wD;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(s-1);for(;i===ED||i===wD;)s--,i=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function TMe(e,t){const n={type:"text",value:xMe(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function IMe(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const AMe={blockquote:rMe,break:sMe,code:iMe,delete:aMe,emphasis:oMe,footnoteReference:cMe,heading:uMe,html:lMe,imageReference:dMe,image:fMe,inlineCode:hMe,linkReference:mMe,link:pMe,listItem:gMe,list:yMe,paragraph:_Me,root:kMe,strong:EMe,table:wMe,tableCell:vMe,tableRow:SMe,text:TMe,thematicBreak:IMe,toml:c0,yaml:c0,definition:c0,footnoteDefinition:c0};function c0(){}function CMe(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function PMe(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function NMe(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||CMe,r=e.options.footnoteBackLabel||PMe,s=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let c=-1;for(;++c<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[c]);if(!u)continue;const l=e.all(u),d=String(u.identifier).toUpperCase(),f=sf(d.toLowerCase());let h=0;const m=[],y=e.footnoteCounts.get(d);for(;y!==void 0&&++h<=y;){m.length>0&&m.push({type:"text",value:" "});let _=typeof n=="string"?n:n(c,h);typeof _=="string"&&(_={type:"text",value:_}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+f+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,h),className:["data-footnote-backref"]},children:Array.isArray(_)?_:[_]})}const g=l[l.length-1];if(g&&g.type==="element"&&g.tagName==="p"){const _=g.children[g.children.length-1];_&&_.type==="text"?_.value+=" ":g.children.push({type:"text",value:" "}),g.children.push(...m)}else l.push(...m);const p={type:"element",tagName:"li",properties:{id:t+"fn-"+f},children:e.wrap(l,!0)};e.patch(u,p),o.push(p)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...vu(a),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
311
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:`
312
- `}]}}const ex={}.hasOwnProperty,RMe={};function OMe(e,t){const n=t||RMe,r=new Map,s=new Map,i=new Map,a={...AMe,...n.handlers},o={all:u,applyData:DMe,definitionById:r,footnoteById:s,footnoteCounts:i,footnoteOrder:[],handlers:a,one:c,options:n,patch:LMe,wrap:MMe};return Zi(e,function(l){if(l.type==="definition"||l.type==="footnoteDefinition"){const d=l.type==="definition"?r:s,f=String(l.identifier).toUpperCase();d.has(f)||d.set(f,l)}}),o;function c(l,d){const f=l.type,h=o.handlers[f];if(ex.call(o.handlers,f)&&h)return h(o,l,d);if(o.options.passThrough&&o.options.passThrough.includes(f)){if("children"in l){const{children:y,...g}=l,p=vu(g);return p.children=o.all(l),p}return vu(l)}return(o.options.unknownHandler||$Me)(o,l,d)}function u(l){const d=[];if("children"in l){const f=l.children;let h=-1;for(;++h<f.length;){const m=o.one(f[h],l);if(m){if(h&&f[h-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=vD(m.value)),!Array.isArray(m)&&m.type==="element")){const y=m.children[0];y&&y.type==="text"&&(y.value=vD(y.value))}Array.isArray(m)?d.push(...m):d.push(m)}}}return d}}function LMe(e,t){e.position&&(t.position=qV(e))}function DMe(e,t){let n=t;if(e&&e.data){const r=e.data.hName,s=e.data.hChildren,i=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&i&&Object.assign(n.properties,vu(i)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function $Me(e,t){const n=t.data||{},r="value"in t&&!(ex.call(n,"hProperties")||ex.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function MMe(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
313
- `});++r<e.length;)r&&n.push({type:"text",value:`
314
- `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
315
- `}),n}function vD(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function xD(e,t){const n=OMe(e,t),r=n.one(e,void 0),s=NMe(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&i.children.push({type:"text",value:`
316
- `},s),i}function jMe(e,t){return e&&"run"in e?async function(n,r){const s=xD(n,{file:r,...t});await e.run(s,r)}:function(n,r){return xD(n,{file:r,...e||t})}}function TD(e){if(e)throw e}var pw,ID;function FMe(){if(ID)return pw;ID=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(u){return typeof Array.isArray=="function"?Array.isArray(u):t.call(u)==="[object Array]"},i=function(u){if(!u||t.call(u)!=="[object Object]")return!1;var l=e.call(u,"constructor"),d=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!l&&!d)return!1;var f;for(f in u);return typeof f>"u"||e.call(u,f)},a=function(u,l){n&&l.name==="__proto__"?n(u,l.name,{enumerable:!0,configurable:!0,value:l.newValue,writable:!0}):u[l.name]=l.newValue},o=function(u,l){if(l==="__proto__")if(e.call(u,l)){if(r)return r(u,l).value}else return;return u[l]};return pw=function c(){var u,l,d,f,h,m,y=arguments[0],g=1,p=arguments.length,_=!1;for(typeof y=="boolean"&&(_=y,y=arguments[1]||{},g=2),(y==null||typeof y!="object"&&typeof y!="function")&&(y={});g<p;++g)if(u=arguments[g],u!=null)for(l in u)d=o(y,l),f=o(u,l),y!==f&&(_&&f&&(i(f)||(h=s(f)))?(h?(h=!1,m=d&&s(d)?d:[]):m=d&&i(d)?d:{},a(y,{name:l,newValue:c(_,m,f)})):typeof f<"u"&&a(y,{name:l,newValue:f}));return y},pw}var BMe=FMe();const gw=t_(BMe);function tx(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function zMe(){const e=[],t={run:n,use:r};return t;function n(...s){let i=-1;const a=s.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);o(null,...s);function o(c,...u){const l=e[++i];let d=-1;if(c){a(c);return}for(;++d<s.length;)(u[d]===null||u[d]===void 0)&&(u[d]=s[d]);s=u,l?UMe(l,o)(...u):a(null,...u)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function UMe(e,t){let n;return r;function r(...a){const o=e.length>a.length;let c;o&&a.push(s);try{c=e.apply(this,a)}catch(u){const l=u;if(o&&n)throw l;return s(l)}o||(c&&c.then&&typeof c.then=="function"?c.then(i,s):c instanceof Error?s(c):i(c))}function s(a,...o){n||(n=!0,t(a,...o))}function i(a){s(null,a)}}const $i={basename:VMe,dirname:HMe,extname:qMe,join:GMe,sep:"/"};function VMe(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Lp(e);let n=0,r=-1,s=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(i){n=s+1;break}}else r<0&&(i=!0,r=s+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,o=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(i){n=s+1;break}}else a<0&&(i=!0,a=s+1),o>-1&&(e.codePointAt(s)===t.codePointAt(o--)?o<0&&(r=s):(o=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function HMe(e){if(Lp(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function qMe(e){Lp(e);let t=e.length,n=-1,r=0,s=-1,i=0,a;for(;t--;){const o=e.codePointAt(t);if(o===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),o===46?s<0?s=t:i!==1&&(i=1):s>-1&&(i=-1)}return s<0||n<0||i===0||i===1&&s===n-1&&s===r+1?"":e.slice(s,n)}function GMe(...e){let t=-1,n;for(;++t<e.length;)Lp(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":KMe(n)}function KMe(e){Lp(e);const t=e.codePointAt(0)===47;let n=WMe(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function WMe(e,t){let n="",r=0,s=-1,i=0,a=-1,o,c;for(;++a<=e.length;){if(a<e.length)o=e.codePointAt(a);else{if(o===47)break;o=47}if(o===47){if(!(s===a-1||i===1))if(s!==a-1&&i===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),s=a,i=0;continue}}else if(n.length>0){n="",r=0,s=a,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(s+1,a):n=e.slice(s+1,a),r=a-s-1;s=a,i=0}else o===46&&i>-1?i++:i=-1}return n}function Lp(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const JMe={cwd:YMe};function YMe(){return"/"}function nx(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function QMe(e){if(typeof e=="string")e=new URL(e);else if(!nx(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return XMe(e)}function XMe(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const bw=["history","path","basename","stem","extname","dirname"];class ZMe{constructor(t){let n;t?nx(t)?n={path:t}:typeof t=="string"||e6e(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":JMe.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<bw.length;){const i=bw[r];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let s;for(s in n)bw.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?$i.basename(this.path):void 0}set basename(t){_w(t,"basename"),yw(t,"basename"),this.path=$i.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?$i.dirname(this.path):void 0}set dirname(t){AD(this.basename,"dirname"),this.path=$i.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?$i.extname(this.path):void 0}set extname(t){if(yw(t,"extname"),AD(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=$i.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){nx(t)&&(t=QMe(t)),_w(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?$i.basename(this.path,this.extname):void 0}set stem(t){_w(t,"stem"),yw(t,"stem"),this.path=$i.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const s=this.message(t,n,r);throw s.fatal=!0,s}info(t,n,r){const s=this.message(t,n,r);return s.fatal=void 0,s}message(t,n,r){const s=new xr(t,n,r);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function yw(e,t){if(e&&e.includes($i.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+$i.sep+"`")}function _w(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function AD(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function e6e(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const t6e=(function(e){const r=this.constructor.prototype,s=r[e],i=function(){return s.apply(i,arguments)};return Object.setPrototypeOf(i,r),i}),n6e={}.hasOwnProperty;class VC extends t6e{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=zMe()}copy(){const t=new VC;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(gw(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ww("data",this.frozen),this.namespace[t]=n,this):n6e.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ww("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const s=n.call(t,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=u0(t),r=this.parser||this.Parser;return kw("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),kw("process",this.parser||this.Parser),Ew("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(i,a){const o=u0(t),c=r.parse(o);r.run(c,o,function(l,d,f){if(l||!d||!f)return u(l);const h=d,m=r.stringify(h,f);i6e(m)?f.value=m:f.result=m,u(l,f)});function u(l,d){l||!d?a(l):i?i(d):n(void 0,d)}}}processSync(t){let n=!1,r;return this.freeze(),kw("processSync",this.parser||this.Parser),Ew("processSync",this.compiler||this.Compiler),this.process(t,s),PD("processSync","process",n),r;function s(i,a){n=!0,TD(i),r=a}}run(t,n,r){CD(t),this.freeze();const s=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(a,o){const c=u0(n);s.run(t,c,u);function u(l,d,f){const h=d||t;l?o(l):a?a(h):r(void 0,h,f)}}}runSync(t,n){let r=!1,s;return this.run(t,n,i),PD("runSync","run",r),s;function i(a,o){TD(a),s=o,r=!0}}stringify(t,n){this.freeze();const r=u0(n),s=this.compiler||this.Compiler;return Ew("stringify",s),CD(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(ww("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?o(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(u){if(typeof u=="function")c(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[l,...d]=u;c(l,d)}else a(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function a(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(u.plugins),u.settings&&(s.settings=gw(!0,s.settings,u.settings))}function o(u){let l=-1;if(u!=null)if(Array.isArray(u))for(;++l<u.length;){const d=u[l];i(d)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function c(u,l){let d=-1,f=-1;for(;++d<r.length;)if(r[d][0]===u){f=d;break}if(f===-1)r.push([u,...l]);else if(l.length>0){let[h,...m]=l;const y=r[f][1];tx(y)&&tx(h)&&(h=gw(!0,y,h)),r[f]=[u,h,...m]}}}}const r6e=new VC().freeze();function kw(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ew(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ww(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function CD(e){if(!tx(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function PD(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function u0(e){return s6e(e)?e:new ZMe(e)}function s6e(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function i6e(e){return typeof e=="string"||a6e(e)}function a6e(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function HC(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Vu=HC();function QH(e){Vu=e}var Nc={exec:()=>null};function wt(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(s,i)=>{let a=typeof i=="string"?i:i.source;return a=a.replace(Lr.caret,"$1"),n=n.replace(s,a),r},getRegex:()=>new RegExp(n,t)};return r}var o6e=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Lr={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=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},c6e=/^(?:[ \t]*(?:\n|$))+/,u6e=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,l6e=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Dp=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,d6e=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,qC=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,XH=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ZH=wt(XH).replace(/bull/g,qC).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(),f6e=wt(XH).replace(/bull/g,qC).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(),GC=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,h6e=/^[^\n]+/,KC=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,m6e=wt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",KC).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),p6e=wt(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,qC).getRegex(),hk="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",WC=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,g6e=wt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\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",WC).replace("tag",hk).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),e7=wt(GC).replace("hr",Dp).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"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",hk).getRegex(),b6e=wt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",e7).getRegex(),JC={blockquote:b6e,code:u6e,def:m6e,fences:l6e,heading:d6e,hr:Dp,html:g6e,lheading:ZH,list:p6e,newline:c6e,paragraph:e7,table:Nc,text:h6e},ND=wt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Dp).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",hk).getRegex(),y6e={...JC,lheading:f6e,table:ND,paragraph:wt(GC).replace("hr",Dp).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ND).replace("blockquote"," {0,3}>").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",hk).getRegex()},_6e={...JC,html:wt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",WC).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:Nc,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:wt(GC).replace("hr",Dp).replace("heading",` *#{1,6} *[^
317
- ]`).replace("lheading",ZH).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},k6e=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,E6e=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,t7=/^( {2,}|\\)\n(?!\s*$)/,w6e=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,mk=/[\p{P}\p{S}]/u,YC=/[\s\p{P}\p{S}]/u,n7=/[^\s\p{P}\p{S}]/u,S6e=wt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,YC).getRegex(),r7=/(?!~)[\p{P}\p{S}]/u,v6e=/(?!~)[\s\p{P}\p{S}]/u,x6e=/(?:[^\s\p{P}\p{S}]|~)/u,s7=/(?![*_])[\p{P}\p{S}]/u,T6e=/(?![*_])[\s\p{P}\p{S}]/u,I6e=/(?:[^\s\p{P}\p{S}]|[*_])/u,A6e=wt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",o6e?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),i7=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,C6e=wt(i7,"u").replace(/punct/g,mk).getRegex(),P6e=wt(i7,"u").replace(/punct/g,r7).getRegex(),a7="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",N6e=wt(a7,"gu").replace(/notPunctSpace/g,n7).replace(/punctSpace/g,YC).replace(/punct/g,mk).getRegex(),R6e=wt(a7,"gu").replace(/notPunctSpace/g,x6e).replace(/punctSpace/g,v6e).replace(/punct/g,r7).getRegex(),O6e=wt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,n7).replace(/punctSpace/g,YC).replace(/punct/g,mk).getRegex(),L6e=wt(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,s7).getRegex(),D6e="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",$6e=wt(D6e,"gu").replace(/notPunctSpace/g,I6e).replace(/punctSpace/g,T6e).replace(/punct/g,s7).getRegex(),M6e=wt(/\\(punct)/,"gu").replace(/punct/g,mk).getRegex(),j6e=wt(/^<(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(),F6e=wt(WC).replace("(?:-->|$)","-->").getRegex(),B6e=wt("^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",F6e).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Hy=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,z6e=wt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Hy).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),o7=wt(/^!?\[(label)\]\[(ref)\]/).replace("label",Hy).replace("ref",KC).getRegex(),c7=wt(/^!?\[(ref)\](?:\[\])?/).replace("ref",KC).getRegex(),U6e=wt("reflink|nolink(?!\\()","g").replace("reflink",o7).replace("nolink",c7).getRegex(),RD=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,QC={_backpedal:Nc,anyPunctuation:M6e,autolink:j6e,blockSkip:A6e,br:t7,code:E6e,del:Nc,delLDelim:Nc,delRDelim:Nc,emStrongLDelim:C6e,emStrongRDelimAst:N6e,emStrongRDelimUnd:O6e,escape:k6e,link:z6e,nolink:c7,punctuation:S6e,reflink:o7,reflinkSearch:U6e,tag:B6e,text:w6e,url:Nc},V6e={...QC,link:wt(/^!?\[(label)\]\((.*?)\)/).replace("label",Hy).getRegex(),reflink:wt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Hy).getRegex()},rx={...QC,emStrongRDelimAst:R6e,emStrongLDelim:P6e,delLDelim:L6e,delRDelim:$6e,url:wt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",RD).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:wt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",RD).getRegex()},H6e={...rx,br:wt(t7).replace("{2,}","*").getRegex(),text:wt(rx.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},l0={normal:JC,gfm:y6e,pedantic:_6e},jf={normal:QC,gfm:rx,breaks:H6e,pedantic:V6e},q6e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},OD=e=>q6e[e];function Li(e,t){if(t){if(Lr.escapeTest.test(e))return e.replace(Lr.escapeReplace,OD)}else if(Lr.escapeTestNoEncode.test(e))return e.replace(Lr.escapeReplaceNoEncode,OD);return e}function LD(e){try{e=encodeURI(e).replace(Lr.percentDecode,"%")}catch{return null}return e}function DD(e,t){let n=e.replace(Lr.findPipe,(i,a,o)=>{let c=!1,u=a;for(;--u>=0&&o[u]==="\\";)c=!c;return c?"|":" |"}),r=n.split(Lr.splitPipe),s=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;s<r.length;s++)r[s]=r[s].trim().replace(Lr.slashPipe,"|");return r}function Ff(e,t,n){let r=e.length;if(r===0)return"";let s=0;for(;s<r&&e.charAt(r-s-1)===t;)s++;return e.slice(0,r-s)}function G6e(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 K6e(e,t=0){let n=t,r="";for(let s of e)if(s===" "){let i=4-n%4;r+=" ".repeat(i),n+=i}else r+=s,n++;return r}function $D(e,t,n,r,s){let i=t.href,a=t.title||null,o=e[1].replace(s.other.outputLinkReplace,"$1");r.state.inLink=!0;let c={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:a,text:o,tokens:r.inlineTokens(o)};return r.state.inLink=!1,c}function W6e(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let s=r[1];return t.split(`
318
- `).map(i=>{let a=i.match(n.other.beginningSpace);if(a===null)return i;let[o]=a;return o.length>=s.length?i.slice(s.length):i}).join(`
319
- `)}var qy=class{options;rules;lexer;constructor(e){this.options=e||Vu}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 n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Ff(n,`
320
- `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],r=W6e(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:r}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let r=Ff(n,"#");(this.options.pedantic||!r||this.rules.other.endingSpaceChar.test(r))&&(n=r.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Ff(t[0],`
321
- `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=Ff(t[0],`
322
- `).split(`
323
- `),r="",s="",i=[];for(;n.length>0;){let a=!1,o=[],c;for(c=0;c<n.length;c++)if(this.rules.other.blockquoteStart.test(n[c]))o.push(n[c]),a=!0;else if(!a)o.push(n[c]);else break;n=n.slice(c);let u=o.join(`
324
- `),l=u.replace(this.rules.other.blockquoteSetextReplace,`
325
- $1`).replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}
326
- ${u}`:u,s=s?`${s}
327
- ${l}`:l;let d=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,i,!0),this.lexer.state.top=d,n.length===0)break;let f=i.at(-1);if(f?.type==="code")break;if(f?.type==="blockquote"){let h=f,m=h.raw+`
328
- `+n.join(`
329
- `),y=this.blockquote(m);i[i.length-1]=y,r=r.substring(0,r.length-h.raw.length)+y.raw,s=s.substring(0,s.length-h.text.length)+y.text;break}else if(f?.type==="list"){let h=f,m=h.raw+`
330
- `+n.join(`
331
- `),y=this.list(m);i[i.length-1]=y,r=r.substring(0,r.length-f.raw.length)+y.raw,s=s.substring(0,s.length-h.raw.length)+y.raw,n=m.substring(i.at(-1).raw.length).split(`
332
- `);continue}}return{type:"blockquote",raw:r,tokens:i,text:s}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,s={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 i=this.rules.other.listItemRegex(n),a=!1;for(;e;){let c=!1,u="",l="";if(!(t=i.exec(e))||this.rules.block.hr.test(e))break;u=t[0],e=e.substring(u.length);let d=K6e(t[2].split(`
333
- `,1)[0],t[1].length),f=e.split(`
334
- `,1)[0],h=!d.trim(),m=0;if(this.options.pedantic?(m=2,l=d.trimStart()):h?m=t[1].length+1:(m=d.search(this.rules.other.nonSpaceChar),m=m>4?1:m,l=d.slice(m),m+=t[1].length),h&&this.rules.other.blankLine.test(f)&&(u+=f+`
335
- `,e=e.substring(f.length+1),c=!0),!c){let y=this.rules.other.nextBulletRegex(m),g=this.rules.other.hrRegex(m),p=this.rules.other.fencesBeginRegex(m),_=this.rules.other.headingBeginRegex(m),k=this.rules.other.htmlBeginRegex(m),v=this.rules.other.blockquoteBeginRegex(m);for(;e;){let w=e.split(`
336
- `,1)[0],S;if(f=w,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),S=f):S=f.replace(this.rules.other.tabCharGlobal," "),p.test(f)||_.test(f)||k.test(f)||v.test(f)||y.test(f)||g.test(f))break;if(S.search(this.rules.other.nonSpaceChar)>=m||!f.trim())l+=`
337
- `+S.slice(m);else{if(h||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||p.test(d)||_.test(d)||g.test(d))break;l+=`
338
- `+f}h=!f.trim(),u+=w+`
339
- `,e=e.substring(w.length+1),d=S.slice(m)}}s.loose||(a?s.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(a=!0)),s.items.push({type:"list_item",raw:u,task:!!this.options.gfm&&this.rules.other.listIsTask.test(l),loose:!1,text:l,tokens:[]}),s.raw+=u}let o=s.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;s.raw=s.raw.trimEnd();for(let c of s.items){if(this.lexer.state.top=!1,c.tokens=this.lexer.blockTokens(c.text,[]),c.task){if(c.text=c.text.replace(this.rules.other.listReplaceTask,""),c.tokens[0]?.type==="text"||c.tokens[0]?.type==="paragraph"){c.tokens[0].raw=c.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),c.tokens[0].text=c.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let l=this.lexer.inlineQueue.length-1;l>=0;l--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[l].src)){this.lexer.inlineQueue[l].src=this.lexer.inlineQueue[l].src.replace(this.rules.other.listReplaceTask,"");break}}let u=this.rules.other.listTaskCheckbox.exec(c.raw);if(u){let l={type:"checkbox",raw:u[0]+" ",checked:u[0]!=="[ ]"};c.checked=l.checked,s.loose?c.tokens[0]&&["paragraph","text"].includes(c.tokens[0].type)&&"tokens"in c.tokens[0]&&c.tokens[0].tokens?(c.tokens[0].raw=l.raw+c.tokens[0].raw,c.tokens[0].text=l.raw+c.tokens[0].text,c.tokens[0].tokens.unshift(l)):c.tokens.unshift({type:"paragraph",raw:l.raw,text:l.raw,tokens:[l]}):c.tokens.unshift(l)}}if(!s.loose){let u=c.tokens.filter(d=>d.type==="space"),l=u.length>0&&u.some(d=>this.rules.other.anyLine.test(d.raw));s.loose=l}}if(s.loose)for(let c of s.items){c.loose=!0;for(let u of c.tokens)u.type==="text"&&(u.type="paragraph")}return s}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:r,title:s}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=DD(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
340
- `):[],i={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let a of r)this.rules.other.tableAlignRight.test(a)?i.align.push("right"):this.rules.other.tableAlignCenter.test(a)?i.align.push("center"):this.rules.other.tableAlignLeft.test(a)?i.align.push("left"):i.align.push(null);for(let a=0;a<n.length;a++)i.header.push({text:n[a],tokens:this.lexer.inline(n[a]),header:!0,align:i.align[a]});for(let a of s)i.rows.push(DD(a,i.header.length).map((o,c)=>({text:o,tokens:this.lexer.inline(o),header:!1,align:i.align[c]})));return i}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
341
- `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}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 n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let i=Ff(n.slice(0,-1),"\\");if((n.length-i.length)%2===0)return}else{let i=G6e(t[2],"()");if(i===-2)return;if(i>-1){let a=(t[0].indexOf("!")===0?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,a).trim(),t[3]=""}}let r=t[2],s="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(r);i&&(r=i[1],s=i[3])}else s=t[3]?t[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?r=r.slice(1):r=r.slice(1,-1)),$D(t,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.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 r=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=t[r.toLowerCase()];if(!s){let i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return $D(n,s,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let s=[...r[0]].length-1,i,a,o=s,c=0,u=r[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+s);(r=u.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])&&s%3&&!((s+a)%3)){c+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+c);let l=[...r[0]][0].length,d=e.slice(0,s+r.index+l+a);if(Math.min(s,a)%2){let h=d.slice(1,-1);return{type:"em",raw:d,text:h,tokens:this.lexer.inlineTokens(h)}}let f=d.slice(2,-2);return{type:"strong",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(n),s=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return r&&s&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}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 s=[...r[0]].length-1,i,a,o=s,c=this.rules.inline.delRDelim;for(c.lastIndex=0,t=t.slice(-1*e.length+s);(r=c.exec(t))!=null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i||(a=[...i].length,a!==s))continue;if(r[3]||r[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let u=[...r[0]][0].length,l=e.slice(0,s+r.index+u+a),d=l.slice(s,-s);return{type:"del",raw:l,text:d,tokens:this.lexer.inlineTokens(d)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,r;return t[2]==="@"?(n=t[1],r="mailto:"+n):(n=t[1],r=n),{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let n,r;if(t[2]==="@")n=t[0],r="mailto:"+n;else{let s;do s=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(s!==t[0]);n=t[0],t[1]==="www."?r="http://"+t[0]:r=t[0]}return{type:"link",raw:t[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},Ls=class sx{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Vu,this.options.tokenizer=this.options.tokenizer||new qy,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 n={other:Lr,block:l0.normal,inline:jf.normal};this.options.pedantic?(n.block=l0.pedantic,n.inline=jf.pedantic):this.options.gfm&&(n.block=l0.gfm,this.options.breaks?n.inline=jf.breaks:n.inline=jf.gfm),this.tokenizer.rules=n}static get rules(){return{block:l0,inline:jf}}static lex(t,n){return new sx(n).lex(t)}static lexInline(t,n){return new sx(n).inlineTokens(t)}lex(t){t=t.replace(Lr.carriageReturn,`
342
- `),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],r=!1){for(this.options.pedantic&&(t=t.replace(Lr.tabCharGlobal," ").replace(Lr.spaceLine,""));t;){let s;if(this.options.extensions?.block?.some(a=>(s=a.call({lexer:this},t,n))?(t=t.substring(s.raw.length),n.push(s),!0):!1))continue;if(s=this.tokenizer.space(t)){t=t.substring(s.raw.length);let a=n.at(-1);s.raw.length===1&&a!==void 0?a.raw+=`
343
- `:n.push(s);continue}if(s=this.tokenizer.code(t)){t=t.substring(s.raw.length);let a=n.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
344
- `)?"":`
345
- `)+s.raw,a.text+=`
346
- `+s.text,this.inlineQueue.at(-1).src=a.text):n.push(s);continue}if(s=this.tokenizer.fences(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.heading(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.hr(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.blockquote(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.list(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.html(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.def(t)){t=t.substring(s.raw.length);let a=n.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
347
- `)?"":`
348
- `)+s.raw,a.text+=`
349
- `+s.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title},n.push(s));continue}if(s=this.tokenizer.table(t)){t=t.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.lheading(t)){t=t.substring(s.raw.length),n.push(s);continue}let i=t;if(this.options.extensions?.startBlock){let a=1/0,o=t.slice(1),c;this.options.extensions.startBlock.forEach(u=>{c=u.call({lexer:this},o),typeof c=="number"&&c>=0&&(a=Math.min(a,c))}),a<1/0&&a>=0&&(i=t.substring(0,a+1))}if(this.state.top&&(s=this.tokenizer.paragraph(i))){let a=n.at(-1);r&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
350
- `)?"":`
351
- `)+s.raw,a.text+=`
352
- `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):n.push(s),r=i.length!==t.length,t=t.substring(s.raw.length);continue}if(s=this.tokenizer.text(t)){t=t.substring(s.raw.length);let a=n.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
353
- `)?"":`
354
- `)+s.raw,a.text+=`
355
- `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):n.push(s);continue}if(t){let a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){let r=t,s=null;if(this.tokens.links){let c=Object.keys(this.tokens.links);if(c.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(r))!=null;)c.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(r))!=null;)r=r.slice(0,s.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(r))!=null;)i=s[2]?s[2].length:0,r=r.slice(0,s.index+i)+"["+"a".repeat(s[0].length-i-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let a=!1,o="";for(;t;){a||(o=""),a=!1;let c;if(this.options.extensions?.inline?.some(l=>(c=l.call({lexer:this},t,n))?(t=t.substring(c.raw.length),n.push(c),!0):!1))continue;if(c=this.tokenizer.escape(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.tag(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.link(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(c.raw.length);let l=n.at(-1);c.type==="text"&&l?.type==="text"?(l.raw+=c.raw,l.text+=c.text):n.push(c);continue}if(c=this.tokenizer.emStrong(t,r,o)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.codespan(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.br(t)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.del(t,r,o)){t=t.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.autolink(t)){t=t.substring(c.raw.length),n.push(c);continue}if(!this.state.inLink&&(c=this.tokenizer.url(t))){t=t.substring(c.raw.length),n.push(c);continue}let u=t;if(this.options.extensions?.startInline){let l=1/0,d=t.slice(1),f;this.options.extensions.startInline.forEach(h=>{f=h.call({lexer:this},d),typeof f=="number"&&f>=0&&(l=Math.min(l,f))}),l<1/0&&l>=0&&(u=t.substring(0,l+1))}if(c=this.tokenizer.inlineText(u)){t=t.substring(c.raw.length),c.raw.slice(-1)!=="_"&&(o=c.raw.slice(-1)),a=!0;let l=n.at(-1);l?.type==="text"?(l.raw+=c.raw,l.text+=c.text):n.push(c);continue}if(t){let l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return n}},Gy=class{options;parser;constructor(t){this.options=t||Vu}space(t){return""}code({text:t,lang:n,escaped:r}){let s=(n||"").match(Lr.notSpaceStart)?.[0],i=t.replace(Lr.endingNewline,"")+`
356
- `;return s?'<pre><code class="language-'+Li(s)+'">'+(r?i:Li(i,!0))+`</code></pre>
357
- `:"<pre><code>"+(r?i:Li(i,!0))+`</code></pre>
358
- `}blockquote({tokens:t}){return`<blockquote>
359
- ${this.parser.parse(t)}</blockquote>
360
- `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:n}){return`<h${n}>${this.parser.parseInline(t)}</h${n}>
361
- `}hr(t){return`<hr>
362
- `}list(t){let n=t.ordered,r=t.start,s="";for(let o=0;o<t.items.length;o++){let c=t.items[o];s+=this.listitem(c)}let i=n?"ol":"ul",a=n&&r!==1?' start="'+r+'"':"";return"<"+i+a+`>
363
- `+s+"</"+i+`>
364
- `}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
365
- `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
366
- `}table(t){let n="",r="";for(let i=0;i<t.header.length;i++)r+=this.tablecell(t.header[i]);n+=this.tablerow({text:r});let s="";for(let i=0;i<t.rows.length;i++){let a=t.rows[i];r="";for(let o=0;o<a.length;o++)r+=this.tablecell(a[o]);s+=this.tablerow({text:r})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
367
- <thead>
368
- `+n+`</thead>
369
- `+s+`</table>
370
- `}tablerow({text:t}){return`<tr>
371
- ${t}</tr>
372
- `}tablecell(t){let n=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+n+`</${r}>
373
- `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Li(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:n,tokens:r}){let s=this.parser.parseInline(r),i=LD(t);if(i===null)return s;t=i;let a='<a href="'+t+'"';return n&&(a+=' title="'+Li(n)+'"'),a+=">"+s+"</a>",a}image({href:t,title:n,text:r,tokens:s}){s&&(r=this.parser.parseInline(s,this.parser.textRenderer));let i=LD(t);if(i===null)return Li(r);t=i;let a=`<img src="${t}" alt="${Li(r)}"`;return n&&(a+=` title="${Li(n)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Li(t.text)}},XC=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}},ti=class ix{options;renderer;textRenderer;constructor(t){this.options=t||Vu,this.options.renderer=this.options.renderer||new Gy,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new XC}static parse(t,n){return new ix(n).parse(t)}static parseInline(t,n){return new ix(n).parseInline(t)}parse(t){let n="";for(let r=0;r<t.length;r++){let s=t[r];if(this.options.extensions?.renderers?.[s.type]){let a=s,o=this.options.extensions.renderers[a.type].call({parser:this},a);if(o!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(a.type)){n+=o||"";continue}}let i=s;switch(i.type){case"space":{n+=this.renderer.space(i);break}case"hr":{n+=this.renderer.hr(i);break}case"heading":{n+=this.renderer.heading(i);break}case"code":{n+=this.renderer.code(i);break}case"table":{n+=this.renderer.table(i);break}case"blockquote":{n+=this.renderer.blockquote(i);break}case"list":{n+=this.renderer.list(i);break}case"checkbox":{n+=this.renderer.checkbox(i);break}case"html":{n+=this.renderer.html(i);break}case"def":{n+=this.renderer.def(i);break}case"paragraph":{n+=this.renderer.paragraph(i);break}case"text":{n+=this.renderer.text(i);break}default:{let a='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return n}parseInline(t,n=this.renderer){let r="";for(let s=0;s<t.length;s++){let i=t[s];if(this.options.extensions?.renderers?.[i.type]){let o=this.options.extensions.renderers[i.type].call({parser:this},i);if(o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){r+=o||"";continue}}let a=i;switch(a.type){case"escape":{r+=n.text(a);break}case"html":{r+=n.html(a);break}case"link":{r+=n.link(a);break}case"image":{r+=n.image(a);break}case"checkbox":{r+=n.checkbox(a);break}case"strong":{r+=n.strong(a);break}case"em":{r+=n.em(a);break}case"codespan":{r+=n.codespan(a);break}case"br":{r+=n.br(a);break}case"del":{r+=n.del(a);break}case"text":{r+=n.text(a);break}default:{let o='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return r}},rh=class{options;block;constructor(t){this.options=t||Vu}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?Ls.lex:Ls.lexInline}provideParser(){return this.block?ti.parse:ti.parseInline}},J6e=class{defaults=HC();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=ti;Renderer=Gy;TextRenderer=XC;Lexer=Ls;Tokenizer=qy;Hooks=rh;constructor(...t){this.use(...t)}walkTokens(t,n){let r=[];for(let s of t)switch(r=r.concat(n.call(this,s)),s.type){case"table":{let i=s;for(let a of i.header)r=r.concat(this.walkTokens(a.tokens,n));for(let a of i.rows)for(let o of a)r=r.concat(this.walkTokens(o.tokens,n));break}case"list":{let i=s;r=r.concat(this.walkTokens(i.items,n));break}default:{let i=s;this.defaults.extensions?.childTokens?.[i.type]?this.defaults.extensions.childTokens[i.type].forEach(a=>{let o=i[a].flat(1/0);r=r.concat(this.walkTokens(o,n))}):i.tokens&&(r=r.concat(this.walkTokens(i.tokens,n)))}}return r}use(...t){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let s={...r};if(s.async=this.defaults.async||s.async||!1,r.extensions&&(r.extensions.forEach(i=>{if(!i.name)throw new Error("extension name required");if("renderer"in i){let a=n.renderers[i.name];a?n.renderers[i.name]=function(...o){let c=i.renderer.apply(this,o);return c===!1&&(c=a.apply(this,o)),c}:n.renderers[i.name]=i.renderer}if("tokenizer"in i){if(!i.level||i.level!=="block"&&i.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=n[i.level];a?a.unshift(i.tokenizer):n[i.level]=[i.tokenizer],i.start&&(i.level==="block"?n.startBlock?n.startBlock.push(i.start):n.startBlock=[i.start]:i.level==="inline"&&(n.startInline?n.startInline.push(i.start):n.startInline=[i.start]))}"childTokens"in i&&i.childTokens&&(n.childTokens[i.name]=i.childTokens)}),s.extensions=n),r.renderer){let i=this.defaults.renderer||new Gy(this.defaults);for(let a in r.renderer){if(!(a in i))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let o=a,c=r.renderer[o],u=i[o];i[o]=(...l)=>{let d=c.apply(i,l);return d===!1&&(d=u.apply(i,l)),d||""}}s.renderer=i}if(r.tokenizer){let i=this.defaults.tokenizer||new qy(this.defaults);for(let a in r.tokenizer){if(!(a in i))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let o=a,c=r.tokenizer[o],u=i[o];i[o]=(...l)=>{let d=c.apply(i,l);return d===!1&&(d=u.apply(i,l)),d}}s.tokenizer=i}if(r.hooks){let i=this.defaults.hooks||new rh;for(let a in r.hooks){if(!(a in i))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let o=a,c=r.hooks[o],u=i[o];rh.passThroughHooks.has(a)?i[o]=l=>{if(this.defaults.async&&rh.passThroughHooksRespectAsync.has(a))return(async()=>{let f=await c.call(i,l);return u.call(i,f)})();let d=c.call(i,l);return u.call(i,d)}:i[o]=(...l)=>{if(this.defaults.async)return(async()=>{let f=await c.apply(i,l);return f===!1&&(f=await u.apply(i,l)),f})();let d=c.apply(i,l);return d===!1&&(d=u.apply(i,l)),d}}s.hooks=i}if(r.walkTokens){let i=this.defaults.walkTokens,a=r.walkTokens;s.walkTokens=function(o){let c=[];return c.push(a.call(this,o)),i&&(c=c.concat(i.call(this,o))),c}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return Ls.lex(t,n??this.defaults)}parser(t,n){return ti.parse(t,n??this.defaults)}parseMarkdown(t){return(n,r)=>{let s={...r},i={...this.defaults,...s},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&s.async===!1)return a(new 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 n>"u"||n===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(i.hooks&&(i.hooks.options=i,i.hooks.block=t),i.async)return(async()=>{let o=i.hooks?await i.hooks.preprocess(n):n,c=await(i.hooks?await i.hooks.provideLexer():t?Ls.lex:Ls.lexInline)(o,i),u=i.hooks?await i.hooks.processAllTokens(c):c;i.walkTokens&&await Promise.all(this.walkTokens(u,i.walkTokens));let l=await(i.hooks?await i.hooks.provideParser():t?ti.parse:ti.parseInline)(u,i);return i.hooks?await i.hooks.postprocess(l):l})().catch(a);try{i.hooks&&(n=i.hooks.preprocess(n));let o=(i.hooks?i.hooks.provideLexer():t?Ls.lex:Ls.lexInline)(n,i);i.hooks&&(o=i.hooks.processAllTokens(o)),i.walkTokens&&this.walkTokens(o,i.walkTokens);let c=(i.hooks?i.hooks.provideParser():t?ti.parse:ti.parseInline)(o,i);return i.hooks&&(c=i.hooks.postprocess(c)),c}catch(o){return a(o)}}}onError(t,n){return r=>{if(r.message+=`
374
- Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+Li(r.message+"",!0)+"</pre>";return n?Promise.resolve(s):s}if(n)return Promise.reject(r);throw r}}},Tu=new J6e;function $t(e,t){return Tu.parse(e,t)}$t.options=$t.setOptions=function(e){return Tu.setOptions(e),$t.defaults=Tu.defaults,QH($t.defaults),$t};$t.getDefaults=HC;$t.defaults=Vu;$t.use=function(...e){return Tu.use(...e),$t.defaults=Tu.defaults,QH($t.defaults),$t};$t.walkTokens=function(e,t){return Tu.walkTokens(e,t)};$t.parseInline=Tu.parseInline;$t.Parser=ti;$t.parser=ti.parse;$t.Renderer=Gy;$t.TextRenderer=XC;$t.Lexer=Ls;$t.lexer=Ls.lex;$t.Tokenizer=qy;$t.Hooks=rh;$t.parse=$t;$t.options;$t.setOptions;$t.use;$t.walkTokens;$t.parseInline;ti.parse;Ls.lex;var Y6e=300,Q6e="300px",X6e=500;function Z6e(e={}){let{immediate:t=!1,debounceDelay:n=Y6e,rootMargin:r=Q6e,idleTimeout:s=X6e}=e,[i,a]=O.useState(!1),o=O.useRef(null),c=O.useRef(null),u=O.useRef(null),l=O.useMemo(()=>h=>{let m=Date.now();return window.setTimeout(()=>{h({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-m))})},1)},[]),d=O.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(h,m)=>window.requestIdleCallback(h,m):l,[l]),f=O.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?h=>window.cancelIdleCallback(h):h=>{clearTimeout(h)},[]);return O.useEffect(()=>{if(t){a(!0);return}let h=o.current;if(!h)return;c.current&&(clearTimeout(c.current),c.current=null),u.current&&(f(u.current),u.current=null);let m=()=>{c.current&&(clearTimeout(c.current),c.current=null),u.current&&(f(u.current),u.current=null)},y=k=>{u.current=d(v=>{v.timeRemaining()>0||v.didTimeout?(a(!0),k.disconnect()):u.current=d(()=>{a(!0),k.disconnect()},{timeout:s/2})},{timeout:s})},g=k=>{m(),c.current=window.setTimeout(()=>{var v,w;let S=k.takeRecords();(S.length===0||(w=(v=S.at(-1))==null?void 0:v.isIntersecting)!=null&&w)&&y(k)},n)},p=(k,v)=>{k.isIntersecting?g(v):m()},_=new IntersectionObserver(k=>{for(let v of k)p(v,_)},{rootMargin:r,threshold:0});return _.observe(h),()=>{c.current&&clearTimeout(c.current),u.current&&f(u.current),_.disconnect()}},[t,n,r,s,f,d]),{shouldRender:i,containerRef:o}}var u7=/\s/,eje=/^\s+$/,tje=new Set(["code","pre","svg","math","annotation"]),nje=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",rje=e=>e.some(t=>nje(t)&&tje.has(t.tagName)),sje=e=>{let t=[],n="",r=!1;for(let s of e){let i=u7.test(s);i!==r&&n&&(t.push(n),n=""),n+=s,r=i}return n&&t.push(n),t},ije=e=>{let t=[],n="";for(let r of e)u7.test(r)?n+=r:(n&&(t.push(n),n=""),t.push(r));return n&&t.push(n),t},aje=(e,t,n,r,s)=>({type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:s?`--sd-animation:sd-${t};--sd-duration:0ms;--sd-easing:${r}`:`--sd-animation:sd-${t};--sd-duration:${n}ms;--sd-easing:${r}`},children:[{type:"text",value:e}]}),oje=(e,t,n,r,s)=>{let i=t.at(-1);if(!(i&&"children"in i))return;if(rje(t))return Rl;let a=i,o=a.children.indexOf(e);if(o===-1)return;let c=e.value;if(!c.trim()){s.count+=c.length;return}let u=n.sep==="char"?ije(c):sje(c),l=r.prevContentLength,d=u.map(f=>{let h=s.count;if(s.count+=f.length,eje.test(f))return{type:"text",value:f};let m=l>0&&h<l;return aje(f,n.animation,n.duration,n.easing,m)});return a.children.splice(o,1,...d),o+d.length},cje=0;function ax(e){var t,n,r,s;let i={animation:(t=e?.animation)!=null?t:"fadeIn",duration:(n=e?.duration)!=null?n:150,easing:(r=e?.easing)!=null?r:"ease",sep:(s=e?.sep)!=null?s:"word"},a={prevContentLength:0,lastRenderCharCount:0},o=cje++,c=()=>u=>{let l={count:0};EC(u,"text",(d,f)=>oje(d,f,i,a,l)),a.lastRenderCharCount=l.count,a.prevContentLength=0};return Object.defineProperty(c,"name",{value:`rehypeAnimate$${o}`}),{name:"animate",type:"animate",rehypePlugin:c,setPrevContentLength(u){a.prevContentLength=u},getLastRenderCharCount(){let u=a.lastRenderCharCount;return a.lastRenderCharCount=0,u}}}ax();var l7=O.createContext(!1),uje=()=>O.useContext(l7),ZC=(...e)=>WA(V1(e)),lje=(e,t)=>{if(!e||!t)return t;let n=`${e}:`;return t.split(/\s+/).filter(Boolean).map(r=>r.startsWith(n)?r:`${e}:${r}`).join(" ")},dje=e=>e?(...t)=>lje(e,WA(V1(t))):ZC,Jl=(e,t,n)=>{let r=typeof t=="string"?new Blob([t],{type:n}):t,s=URL.createObjectURL(r),i=document.createElement("a");i.href=s,i.download=e,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(s)},ox=O.createContext(ZC),dt=()=>O.useContext(ox),fje=ZC("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-6","before:mr-4","before:text-[13px]","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),hje=e=>{let t={};for(let n of e.split(";")){let r=n.indexOf(":");if(r>0){let s=n.slice(0,r).trim(),i=n.slice(r+1).trim();s&&i&&(t[s]=i)}}return t},mje=O.memo(({children:e,result:t,language:n,className:r,startLine:s,...i})=>{let a=dt(),o=O.useMemo(()=>a(fje),[a]),c=O.useMemo(()=>{let u={};return t.bg&&(u["--sdm-bg"]=t.bg),t.fg&&(u["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(u,hje(t.rootStyle)),u},[t.bg,t.fg,t.rootStyle]);return b.jsx("div",{className:a(r,"overflow-hidden rounded-md border border-border bg-background p-4 text-sm"),"data-language":n,"data-streamdown":"code-block-body",...i,children:b.jsx("pre",{className:a(r,"bg-[var(--sdm-bg,inherit]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]"),style:c,children:b.jsx("code",{className:a("[counter-increment:line_0] [counter-reset:line]"),style:s&&s>1?{counterReset:`line ${s-1}`}:void 0,children:t.tokens.map((u,l)=>b.jsx("span",{className:o,children:u.length===0||u.length===1&&u[0].content===""?`
375
- `:u.map((d,f)=>{let h={},m=!!d.bgColor;if(d.color&&(h["--sdm-c"]=d.color),d.bgColor&&(h["--sdm-tbg"]=d.bgColor),d.htmlStyle)for(let[y,g]of Object.entries(d.htmlStyle))y==="color"?h["--sdm-c"]=g:y==="background-color"?(h["--sdm-tbg"]=g,m=!0):h[y]=g;return b.jsx("span",{className:a("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",m&&"bg-[var(--sdm-tbg)]",m&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:h,...d.htmlAttrs,children:d.content},f)})},l))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className&&e.startLine===t.startLine),pje=({className:e,language:t,style:n,isIncomplete:r,...s})=>{let i=dt();return b.jsx("div",{className:i("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",e),"data-incomplete":r||void 0,"data-language":t,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...n},...s})},d7=O.createContext({code:""}),f7=()=>O.useContext(d7),gje=({language:e})=>{let t=dt();return b.jsx("div",{className:t("flex h-8 items-center text-muted-foreground text-xs"),"data-language":e,"data-streamdown":"code-block-header",children:b.jsx("span",{className:t("ml-1 font-mono lowercase"),children:e})})},bje=/\n+$/,yje=O.lazy(()=>x(()=>import("./highlighted-body-TPN3WLV5-D2YQWXND.js"),__vite__mapDeps([101,102])).then(e=>({default:e.HighlightedCodeBlockBody}))),_je=({code:e,language:t,className:n,children:r,isIncomplete:s=!1,startLine:i,...a})=>{let o=dt(),c=O.useMemo(()=>e.replace(bje,""),[e]),u=O.useMemo(()=>({bg:"transparent",fg:"inherit",tokens:c.split(`
376
- `).map(l=>[{content:l,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[c]);return b.jsx(d7.Provider,{value:{code:e},children:b.jsxs(pje,{isIncomplete:s,language:t,children:[b.jsx(gje,{language:t}),r?b.jsx("div",{className:o("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:b.jsx("div",{className:o("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"code-block-actions",children:r})}):null,b.jsx(O.Suspense,{fallback:b.jsx(mje,{className:n,language:t,result:u,startLine:i,...a}),children:b.jsx(yje,{className:n,code:c,language:t,raw:u,startLine:i,...a})})]})})},kje=e=>b.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b.jsx("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),Eje=e=>b.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b.jsx("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),wje=e=>b.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b.jsx("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),Sje=e=>b.jsxs("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[b.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),b.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),vje=e=>b.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b.jsx("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),xje=e=>b.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b.jsx("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),Tje=e=>b.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b.jsx("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),Ije=e=>b.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b.jsx("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),Aje=e=>b.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),Cje=e=>b.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:b.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),sh={CheckIcon:kje,CopyIcon:Eje,DownloadIcon:wje,ExternalLinkIcon:Ije,Loader2Icon:Sje,Maximize2Icon:vje,RotateCcwIcon:xje,XIcon:Tje,ZoomInIcon:Aje,ZoomOutIcon:Cje},h7=O.createContext(sh),Pje=(e,t)=>{if(e===t)return!0;if(!(e&&t))return e===t;let n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:n.every(s=>e[s]===t[s])},MD=({icons:e,children:t})=>{let n=O.useRef(e),r=O.useRef(e?{...sh,...e}:sh);Pje(n.current,e)||(n.current=e,r.current=e?{...sh,...e}:sh);let s=r.current;return b.jsx(h7.Provider,{value:s,children:t})},Ai=()=>O.useContext(h7),m7={copyCode:"Copy Code",downloadFile:"Download file",downloadDiagram:"Download diagram",downloadDiagramAsSvg:"Download diagram as SVG",downloadDiagramAsPng:"Download diagram as PNG",downloadDiagramAsMmd:"Download diagram as MMD",viewFullscreen:"View fullscreen",exitFullscreen:"Exit fullscreen",mermaidFormatSvg:"SVG",mermaidFormatPng:"PNG",mermaidFormatMmd:"MMD",copyTable:"Copy table",copyTableAsMarkdown:"Copy table as Markdown",copyTableAsCsv:"Copy table as CSV",copyTableAsTsv:"Copy table as TSV",downloadTable:"Download table",downloadTableAsCsv:"Download table as CSV",downloadTableAsMarkdown:"Download table as Markdown",tableFormatMarkdown:"Markdown",tableFormatCsv:"CSV",tableFormatTsv:"TSV",imageNotAvailable:"Image not available",downloadImage:"Download image",openExternalLink:"Open external link?",externalLinkWarning:"You're about to visit an external website.",close:"Close",copyLink:"Copy link",copied:"Copied",openLink:"Open link"},cx=O.createContext(m7),Ja=()=>O.useContext(cx),jD=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:s,code:i,...a})=>{let o=dt(),[c,u]=O.useState(!1),l=O.useRef(0),{code:d}=f7(),{isAnimating:f}=O.useContext(Es),h=Ja(),m=i??d,y=async()=>{var _;if(typeof window>"u"||!((_=navigator?.clipboard)!=null&&_.writeText)){t?.(new Error("Clipboard API not available"));return}try{c||(await navigator.clipboard.writeText(m),u(!0),e?.(),l.current=window.setTimeout(()=>u(!1),n))}catch(k){t?.(k)}};O.useEffect(()=>()=>{window.clearTimeout(l.current)},[]);let g=Ai(),p=c?g.CheckIcon:g.CopyIcon;return b.jsx("button",{className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",s),"data-streamdown":"code-block-copy-button",disabled:f,onClick:y,title:h.copyCode,type:"button",...a,children:r??b.jsx(p,{size:14})})},FD={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},Nje=({onDownload:e,onError:t,language:n,children:r,className:s,code:i,...a})=>{let o=dt(),{code:c}=f7(),{isAnimating:u}=O.useContext(Es),l=Ja(),d=Ai(),f=i??c,h=`file.${n&&n in FD?FD[n]:"txt"}`,m="text/plain",y=()=>{try{Jl(h,f,m),e?.()}catch(g){t?.(g)}};return b.jsx("button",{className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",s),"data-streamdown":"code-block-download-button",disabled:u,onClick:y,title:l.downloadFile,type:"button",...a,children:r??b.jsx(d.DownloadIcon,{size:14})})},BD=()=>{let{Loader2Icon:e}=Ai(),t=dt();return b.jsxs("div",{className:t("w-full divide-y divide-border overflow-hidden rounded-xl border border-border"),children:[b.jsx("div",{className:t("h-[46px] w-full bg-muted/80")}),b.jsx("div",{className:t("flex w-full items-center justify-center p-4"),children:b.jsx(e,{className:t("size-4 animate-spin")})})]})},Rje=/\.[^/.]+$/,Oje=({node:e,className:t,src:n,alt:r,onLoad:s,onError:i,...a})=>{let{DownloadIcon:o}=Ai(),c=dt(),u=O.useRef(null),[l,d]=O.useState(!1),[f,h]=O.useState(!1),m=Ja(),y=a.width!=null||a.height!=null,g=(l||y)&&!f,p=f&&!y;O.useEffect(()=>{let w=u.current;if(w!=null&&w.complete){let S=w.naturalWidth>0;d(S),h(!S)}},[]);let _=O.useCallback(w=>{d(!0),h(!1),s?.(w)},[s]),k=O.useCallback(w=>{d(!1),h(!0),i?.(w)},[i]),v=async()=>{if(n)try{let w=await(await fetch(n)).blob(),S=new URL(n,window.location.origin).pathname.split("/").pop()||"",T=S.split(".").pop(),I=S.includes(".")&&T!==void 0&&T.length<=4,$="";if(I)$=S;else{let R=w.type,z="png";R.includes("jpeg")||R.includes("jpg")?z="jpg":R.includes("png")?z="png":R.includes("svg")?z="svg":R.includes("gif")?z="gif":R.includes("webp")&&(z="webp"),$=`${(r||S||"image").replace(Rje,"")}.${z}`}Jl($,w,w.type)}catch{window.open(n,"_blank")}};return n?b.jsxs("div",{className:c("group relative my-4 inline-block"),"data-streamdown":"image-wrapper",children:[b.jsx("img",{alt:r,className:c("max-w-full rounded-lg",p&&"hidden",t),"data-streamdown":"image",onError:k,onLoad:_,ref:u,src:n,...a}),p&&b.jsx("span",{className:c("text-muted-foreground text-xs italic"),"data-streamdown":"image-fallback",children:m.imageNotAvailable}),b.jsx("div",{className:c("pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block")}),g&&b.jsx("button",{className:c("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:v,title:m.downloadImage,type:"button",children:b.jsx(o,{size:14})})]}):null},Fh=0,e2=()=>{Fh+=1,Fh===1&&(document.body.style.overflow="hidden")},t2=()=>{Fh=Math.max(0,Fh-1),Fh===0&&(document.body.style.overflow="")},Lje=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let{CheckIcon:s,CopyIcon:i,ExternalLinkIcon:a,XIcon:o}=Ai(),c=dt(),[u,l]=O.useState(!1),d=Ja(),f=O.useCallback(async()=>{try{await navigator.clipboard.writeText(e),l(!0),setTimeout(()=>l(!1),2e3)}catch{}},[e]),h=O.useCallback(()=>{r(),n()},[r,n]);return O.useEffect(()=>{if(t){e2();let m=y=>{y.key==="Escape"&&n()};return document.addEventListener("keydown",m),()=>{document.removeEventListener("keydown",m),t2()}}},[t,n]),t?b.jsx("div",{className:c("fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm"),"data-streamdown":"link-safety-modal",onClick:n,onKeyDown:m=>{m.key==="Escape"&&n()},role:"button",tabIndex:0,children:b.jsxs("div",{className:c("relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg"),onClick:m=>m.stopPropagation(),onKeyDown:m=>m.stopPropagation(),role:"presentation",children:[b.jsx("button",{className:c("absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:n,title:d.close,type:"button",children:b.jsx(o,{size:16})}),b.jsxs("div",{className:c("flex flex-col gap-2"),children:[b.jsxs("div",{className:c("flex items-center gap-2 font-semibold text-lg"),children:[b.jsx(a,{size:20}),b.jsx("span",{children:d.openExternalLink})]}),b.jsx("p",{className:c("text-muted-foreground text-sm"),children:d.externalLinkWarning})]}),b.jsx("div",{className:c("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),b.jsxs("div",{className:c("flex gap-2"),children:[b.jsx("button",{className:c("flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted"),onClick:f,type:"button",children:u?b.jsxs(b.Fragment,{children:[b.jsx(s,{size:14}),b.jsx("span",{children:d.copied})]}):b.jsxs(b.Fragment,{children:[b.jsx(i,{size:14}),b.jsx("span",{children:d.copyLink})]})}),b.jsxs("button",{className:c("flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90"),onClick:h,type:"button",children:[b.jsx(a,{size:14}),b.jsx("span",{children:d.openLink})]})]})]})}):null},ux=O.createContext(null),n2=()=>O.useContext(ux),ABe=()=>{var e;let t=n2();return(e=t?.code)!=null?e:null},r2=()=>{var e;let t=n2();return(e=t?.mermaid)!=null?e:null},Dje=e=>{var t;let n=n2();return n!=null&&n.renderers&&e&&(t=n.renderers.find(r=>Array.isArray(r.language)?r.language.includes(e):r.language===e))!=null?t:null},$je=(e,t)=>{var n;let r=(n=void 0)!=null?n:5;return new Promise((s,i)=>{let a="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),o=new Image;o.crossOrigin="anonymous",o.onload=()=>{let c=document.createElement("canvas"),u=o.width*r,l=o.height*r;c.width=u,c.height=l;let d=c.getContext("2d");if(!d){i(new Error("Failed to create 2D canvas context for PNG export"));return}d.drawImage(o,0,0,u,l),c.toBlob(f=>{if(!f){i(new Error("Failed to create PNG blob"));return}s(f)},"image/png")},o.onerror=()=>i(new Error("Failed to load SVG image")),o.src=a})},Mje=({chart:e,children:t,className:n,onDownload:r,config:s,onError:i})=>{let a=dt(),[o,c]=O.useState(!1),u=O.useRef(null),{isAnimating:l}=O.useContext(Es),d=Ai(),f=r2(),h=Ja(),m=async y=>{try{if(y==="mmd"){Jl("diagram.mmd",e,"text/plain"),c(!1),r?.(y);return}if(!f){i?.(new Error("Mermaid plugin not available"));return}let g=f.getMermaid(s),p=e.split("").reduce((v,w)=>(v<<5)-v+w.charCodeAt(0)|0,0),_=`mermaid-${Math.abs(p)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:k}=await g.render(_,e);if(!k){i?.(new Error("SVG not found. Please wait for the diagram to render."));return}if(y==="svg"){Jl("diagram.svg",k,"image/svg+xml"),c(!1),r?.(y);return}if(y==="png"){let v=await $je(k);Jl("diagram.png",v,"image/png"),r?.(y),c(!1);return}}catch(g){i?.(g)}};return O.useEffect(()=>{let y=g=>{let p=g.composedPath();u.current&&!p.includes(u.current)&&c(!1)};return document.addEventListener("mousedown",y),()=>{document.removeEventListener("mousedown",y)}},[]),b.jsxs("div",{className:a("relative"),ref:u,children:[b.jsx("button",{className:a("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:l,onClick:()=>c(!o),title:h.downloadDiagram,type:"button",children:t??b.jsx(d.DownloadIcon,{size:14})}),o?b.jsxs("div",{className:a("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[b.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>m("svg"),title:h.downloadDiagramAsSvg,type:"button",children:h.mermaidFormatSvg}),b.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>m("png"),title:h.downloadDiagramAsPng,type:"button",children:h.mermaidFormatPng}),b.jsx("button",{className:a("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>m("mmd"),title:h.downloadDiagramAsMmd,type:"button",children:h.mermaidFormatMmd})]}):null]})},jje=({chart:e,config:t,onFullscreen:n,onExit:r,className:s,...i})=>{let{Maximize2Icon:a,XIcon:o}=Ai(),c=dt(),[u,l]=O.useState(!1),{isAnimating:d,controls:f}=O.useContext(Es),h=Ja(),m=(()=>{if(typeof f=="boolean")return f;let g=f.mermaid;return g===!1?!1:g===!0||g===void 0?!0:g.panZoom!==!1})(),y=()=>{l(!u)};return O.useEffect(()=>{if(u){e2();let g=p=>{p.key==="Escape"&&l(!1)};return document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g),t2()}}},[u]),O.useEffect(()=>{u?n?.():r&&r()},[u,n,r]),b.jsxs(b.Fragment,{children:[b.jsx("button",{className:c("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",s),disabled:d,onClick:y,title:h.viewFullscreen,type:"button",...i,children:b.jsx(a,{size:14})}),u?Cx.createPortal(b.jsxs("div",{className:c("fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm"),onClick:y,onKeyDown:g=>{g.key==="Escape"&&y()},role:"button",tabIndex:0,children:[b.jsx("button",{className:c("absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:y,title:h.exitFullscreen,type:"button",children:b.jsx(o,{size:20})}),b.jsx("div",{className:c("flex size-full items-center justify-center p-4"),onClick:g=>g.stopPropagation(),onKeyDown:g=>g.stopPropagation(),role:"presentation",children:b.jsx(K7,{chart:e,className:c("size-full [&_svg]:h-auto [&_svg]:w-auto"),config:t,fullscreen:!0,showControls:m})})]}),document.body):null]})},p7=e=>{var t,n;let r=[],s=[],i=e.querySelectorAll("thead th");for(let o of i)r.push(((t=o.textContent)==null?void 0:t.trim())||"");let a=e.querySelectorAll("tbody tr");for(let o of a){let c=[],u=o.querySelectorAll("td");for(let l of u)c.push(((n=l.textContent)==null?void 0:n.trim())||"");s.push(c)}return{headers:r,rows:s}},g7=e=>{let{headers:t,rows:n}=e,r=o=>{let c=!1,u=!1;for(let l of o){if(l==='"'){c=!0,u=!0;break}(l===","||l===`
377
- `)&&(c=!0)}return c?u?`"${o.replace(/"/g,'""')}"`:`"${o}"`:o},s=t.length>0?n.length+1:n.length,i=new Array(s),a=0;t.length>0&&(i[a]=t.map(r).join(","),a+=1);for(let o of n)i[a]=o.map(r).join(","),a+=1;return i.join(`
378
- `)},Fje=e=>{let{headers:t,rows:n}=e,r=o=>{let c=!1;for(let l of o)if(l===" "||l===`
379
- `||l==="\r"){c=!0;break}if(!c)return o;let u=[];for(let l of o)l===" "?u.push("\\t"):l===`
380
- `?u.push("\\n"):l==="\r"?u.push("\\r"):u.push(l);return u.join("")},s=t.length>0?n.length+1:n.length,i=new Array(s),a=0;t.length>0&&(i[a]=t.map(r).join(" "),a+=1);for(let o of n)i[a]=o.map(r).join(" "),a+=1;return i.join(`
381
- `)},Sw=e=>{let t=!1;for(let r of e)if(r==="\\"||r==="|"){t=!0;break}if(!t)return e;let n=[];for(let r of e)r==="\\"?n.push("\\\\"):r==="|"?n.push("\\|"):n.push(r);return n.join("")},lx=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let r=new Array(n.length+2),s=0,i=t.map(o=>Sw(o));r[s]=`| ${i.join(" | ")} |`,s+=1;let a=new Array(t.length);for(let o=0;o<t.length;o+=1)a[o]="---";r[s]=`| ${a.join(" | ")} |`,s+=1;for(let o of n)if(o.length<t.length){let c=new Array(t.length);for(let u=0;u<t.length;u+=1)c[u]=u<o.length?Sw(o[u]):"";r[s]=`| ${c.join(" | ")} |`,s+=1}else{let c=o.map(u=>Sw(u));r[s]=`| ${c.join(" | ")} |`,s+=1}return r.join(`
382
- `)},b7=({children:e,className:t,onCopy:n,onError:r,timeout:s=2e3})=>{let i=dt(),[a,o]=O.useState(!1),[c,u]=O.useState(!1),l=O.useRef(null),d=O.useRef(0),{isAnimating:f}=O.useContext(Es),h=Ja(),m=async p=>{var _,k;if(typeof window>"u"||!((_=navigator?.clipboard)!=null&&_.write)){r?.(new Error("Clipboard API not available"));return}try{let v=(k=l.current)==null?void 0:k.closest('[data-streamdown="table-wrapper"]'),w=v?.querySelector("table");if(!w){r?.(new Error("Table not found"));return}let S=p7(w),T=({csv:g7,tsv:Fje,md:lx}[p]||lx)(S),I=new ClipboardItem({"text/plain":new Blob([T],{type:"text/plain"}),"text/html":new Blob([w.outerHTML],{type:"text/html"})});await navigator.clipboard.write([I]),u(!0),o(!1),n?.(p),d.current=window.setTimeout(()=>u(!1),s)}catch(v){r?.(v)}};O.useEffect(()=>{let p=_=>{let k=_.composedPath();l.current&&!k.includes(l.current)&&o(!1)};return document.addEventListener("mousedown",p),()=>{document.removeEventListener("mousedown",p),window.clearTimeout(d.current)}},[]);let y=Ai(),g=c?y.CheckIcon:y.CopyIcon;return b.jsxs("div",{className:i("relative"),ref:l,children:[b.jsx("button",{className:i("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:f,onClick:()=>o(!a),title:h.copyTable,type:"button",children:e??b.jsx(g,{height:14,width:14})}),a?b.jsxs("div",{className:i("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[b.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>m("md"),title:h.copyTableAsMarkdown,type:"button",children:h.tableFormatMarkdown}),b.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>m("csv"),title:h.copyTableAsCsv,type:"button",children:h.tableFormatCsv}),b.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>m("tsv"),title:h.copyTableAsTsv,type:"button",children:h.tableFormatTsv})]}):null]})},y7=({children:e,className:t,onDownload:n,onError:r})=>{let s=dt(),[i,a]=O.useState(!1),o=O.useRef(null),{isAnimating:c}=O.useContext(Es),u=Ja(),l=Ai(),d=f=>{var h;try{let m=(h=o.current)==null?void 0:h.closest('[data-streamdown="table-wrapper"]'),y=m?.querySelector("table");if(!y){r?.(new Error("Table not found"));return}let g=p7(y),p=f==="csv"?g7(g):lx(g);Jl(`table.${f==="csv"?"csv":"md"}`,p,f==="csv"?"text/csv":"text/markdown"),a(!1),n?.(f)}catch(m){r?.(m)}};return O.useEffect(()=>{let f=h=>{let m=h.composedPath();o.current&&!m.includes(o.current)&&a(!1)};return document.addEventListener("mousedown",f),()=>{document.removeEventListener("mousedown",f)}},[]),b.jsxs("div",{className:s("relative"),ref:o,children:[b.jsx("button",{className:s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:c,onClick:()=>a(!i),title:u.downloadTable,type:"button",children:e??b.jsx(l.DownloadIcon,{size:14})}),i?b.jsxs("div",{className:s("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[b.jsx("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>d("csv"),title:u.downloadTableAsCsv,type:"button",children:u.tableFormatCsv}),b.jsx("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>d("markdown"),title:u.downloadTableAsMarkdown,type:"button",children:u.tableFormatMarkdown})]}):null]})},Bje=({children:e,className:t,showCopy:n=!0,showDownload:r=!0})=>{let{Maximize2Icon:s,XIcon:i}=Ai(),a=dt(),[o,c]=O.useState(!1),{isAnimating:u}=O.useContext(Es),l=Ja(),d=()=>{c(!0)},f=()=>{c(!1)};return O.useEffect(()=>{if(o){e2();let h=m=>{m.key==="Escape"&&c(!1)};return document.addEventListener("keydown",h),()=>{document.removeEventListener("keydown",h),t2()}}},[o]),b.jsxs(b.Fragment,{children:[b.jsx("button",{className:a("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:u,onClick:d,title:l.viewFullscreen,type:"button",children:b.jsx(s,{size:14})}),o?Cx.createPortal(b.jsx("div",{"aria-label":l.viewFullscreen,"aria-modal":"true",className:a("fixed inset-0 z-50 flex flex-col bg-background"),"data-streamdown":"table-fullscreen",onClick:f,onKeyDown:h=>{h.key==="Escape"&&f()},role:"dialog",children:b.jsxs("div",{className:a("flex h-full flex-col"),onClick:h=>h.stopPropagation(),onKeyDown:h=>h.stopPropagation(),role:"presentation",children:[b.jsxs("div",{className:a("flex items-center justify-end gap-1 p-4"),children:[n?b.jsx(b7,{}):null,r?b.jsx(y7,{}):null,b.jsx("button",{className:a("rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:f,title:l.exitFullscreen,type:"button",children:b.jsx(i,{size:20})})]}),b.jsx("div",{className:a("flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10"),children:b.jsx("table",{className:a("w-full border-collapse border border-border"),"data-streamdown":"table",children:e})})]})}),document.body):null]})},zje=({children:e,className:t,showControls:n,showCopy:r=!0,showDownload:s=!0,showFullscreen:i=!0,...a})=>{let o=dt(),c=n&&r,u=n&&s,l=n&&i,d=c||u||l;return b.jsxs("div",{className:o("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"),"data-streamdown":"table-wrapper",children:[d?b.jsxs("div",{className:o("flex items-center justify-end gap-1"),children:[c?b.jsx(b7,{}):null,u?b.jsx(y7,{}):null,l?b.jsx(Bje,{showCopy:c,showDownload:u,children:e}):null]}):null,b.jsx("div",{className:o("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"),children:b.jsx("table",{className:o("w-full divide-y divide-border",t),"data-streamdown":"table",...a,children:e})})]})},Uje=/startLine=(\d+)/,Vje=O.lazy(()=>x(()=>Promise.resolve().then(()=>OFe),void 0).then(e=>({default:e.Mermaid}))),Hje=/language-([^\s]+)/;function pk(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,r=t.position.start,s=e.position.end,i=t.position.end;return n?.line===r?.line&&n?.column===r?.column&&s?.line===i?.line&&s?.column===i?.column}function an(e,t){return e.className===t.className&&pk(e.node,t.node)}var dx=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,vw=(e,t)=>{if(typeof e=="boolean")return e;let n=e.table;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},zD=(e,t)=>{if(typeof e=="boolean")return e;let n=e.code;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},d0=(e,t)=>{if(typeof e=="boolean")return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},s2=O.memo(({children:e,className:t,node:n,...r})=>{let s=dt();return b.jsx("ol",{className:s("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e})},(e,t)=>an(e,t));s2.displayName="MarkdownOl";var _7=O.memo(({children:e,className:t,node:n,...r})=>{let s=dt();return b.jsx("li",{className:s("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e})},(e,t)=>e.className===t.className&&pk(e.node,t.node));_7.displayName="MarkdownLi";var k7=O.memo(({children:e,className:t,node:n,...r})=>{let s=dt();return b.jsx("ul",{className:s("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e})},(e,t)=>an(e,t));k7.displayName="MarkdownUl";var E7=O.memo(({className:e,node:t,...n})=>{let r=dt();return b.jsx("hr",{className:r("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n})},(e,t)=>an(e,t));E7.displayName="MarkdownHr";var w7=O.memo(({children:e,className:t,node:n,...r})=>{let s=dt();return b.jsx("span",{className:s("font-semibold",t),"data-streamdown":"strong",...r,children:e})},(e,t)=>an(e,t));w7.displayName="MarkdownStrong";var qje=({children:e,className:t,href:n,node:r,...s})=>{let i=dt(),{linkSafety:a}=O.useContext(Es),[o,c]=O.useState(!1),u=n==="streamdown:incomplete-link",l=O.useCallback(async m=>{if(!(!(a!=null&&a.enabled&&n)||u)){if(m.preventDefault(),a.onLinkCheck&&await a.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}c(!0)}},[a,n,u]),d=O.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),f=O.useCallback(()=>{c(!1)},[]),h={url:n??"",isOpen:o,onClose:f,onConfirm:d};return a!=null&&a.enabled&&n?b.jsxs(b.Fragment,{children:[b.jsx("button",{className:i("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":u,"data-streamdown":"link",onClick:l,type:"button",children:e}),a.renderModal?a.renderModal(h):b.jsx(Lje,{...h})]}):b.jsx("a",{className:i("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":u,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...s,children:e})},S7=O.memo(qje,(e,t)=>an(e,t)&&e.href===t.href);S7.displayName="MarkdownA";var v7=O.memo(({children:e,className:t,node:n,...r})=>{let s=dt();return b.jsx("h1",{className:s("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e})},(e,t)=>an(e,t));v7.displayName="MarkdownH1";var x7=O.memo(({children:e,className:t,node:n,...r})=>{let s=dt();return b.jsx("h2",{className:s("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e})},(e,t)=>an(e,t));x7.displayName="MarkdownH2";var T7=O.memo(({children:e,className:t,node:n,...r})=>{let s=dt();return b.jsx("h3",{className:s("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e})},(e,t)=>an(e,t));T7.displayName="MarkdownH3";var I7=O.memo(({children:e,className:t,node:n,...r})=>{let s=dt();return b.jsx("h4",{className:s("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e})},(e,t)=>an(e,t));I7.displayName="MarkdownH4";var A7=O.memo(({children:e,className:t,node:n,...r})=>{let s=dt();return b.jsx("h5",{className:s("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e})},(e,t)=>an(e,t));A7.displayName="MarkdownH5";var C7=O.memo(({children:e,className:t,node:n,...r})=>{let s=dt();return b.jsx("h6",{className:s("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e})},(e,t)=>an(e,t));C7.displayName="MarkdownH6";var P7=O.memo(({children:e,className:t,node:n,...r})=>{let{controls:s}=O.useContext(Es),i=dx(s,"table"),a=vw(s,"copy"),o=vw(s,"download"),c=vw(s,"fullscreen");return b.jsx(zje,{className:t,showControls:i,showCopy:a,showDownload:o,showFullscreen:c,...r,children:e})},(e,t)=>an(e,t));P7.displayName="MarkdownTable";var N7=O.memo(({children:e,className:t,node:n,...r})=>{let s=dt();return b.jsx("thead",{className:s("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e})},(e,t)=>an(e,t));N7.displayName="MarkdownThead";var R7=O.memo(({children:e,className:t,node:n,...r})=>{let s=dt();return b.jsx("tbody",{className:s("divide-y divide-border",t),"data-streamdown":"table-body",...r,children:e})},(e,t)=>an(e,t));R7.displayName="MarkdownTbody";var O7=O.memo(({children:e,className:t,node:n,...r})=>{let s=dt();return b.jsx("tr",{className:s("border-border",t),"data-streamdown":"table-row",...r,children:e})},(e,t)=>an(e,t));O7.displayName="MarkdownTr";var L7=O.memo(({children:e,className:t,node:n,...r})=>{let s=dt();return b.jsx("th",{className:s("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...r,children:e})},(e,t)=>an(e,t));L7.displayName="MarkdownTh";var D7=O.memo(({children:e,className:t,node:n,...r})=>{let s=dt();return b.jsx("td",{className:s("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e})},(e,t)=>an(e,t));D7.displayName="MarkdownTd";var $7=O.memo(({children:e,className:t,node:n,...r})=>{let s=dt();return b.jsx("blockquote",{className:s("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...r,children:e})},(e,t)=>an(e,t));$7.displayName="MarkdownBlockquote";var M7=O.memo(({children:e,className:t,node:n,...r})=>{let s=dt();return b.jsx("sup",{className:s("text-sm",t),"data-streamdown":"superscript",...r,children:e})},(e,t)=>an(e,t));M7.displayName="MarkdownSup";var j7=O.memo(({children:e,className:t,node:n,...r})=>{let s=dt();return b.jsx("sub",{className:s("text-sm",t),"data-streamdown":"subscript",...r,children:e})},(e,t)=>an(e,t));j7.displayName="MarkdownSub";var F7=O.memo(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let s=a=>{var o,c;if(!O.isValidElement(a))return!1;let u=Array.isArray(a.props.children)?a.props.children:[a.props.children],l=!1,d=!1;for(let f of u)if(f){if(typeof f=="string")f.trim()!==""&&(l=!0);else if(O.isValidElement(f))if(((o=f.props)==null?void 0:o["data-footnote-backref"])!==void 0)d=!0;else{let h=Array.isArray(f.props.children)?f.props.children:[f.props.children];for(let m of h){if(typeof m=="string"&&m.trim()!==""){l=!0;break}if(O.isValidElement(m)&&((c=m.props)==null?void 0:c["data-footnote-backref"])===void 0){l=!0;break}}}}return d&&!l},i=Array.isArray(e)?e.map(a=>{if(!O.isValidElement(a))return a;if(a.type===s2){let o=(Array.isArray(a.props.children)?a.props.children:[a.props.children]).filter(c=>!s(c));return o.length===0?null:{...a,props:{...a.props,children:o}}}return a}):e;return(Array.isArray(i)?i.some(a=>a!==null):i!==null)?b.jsx("section",{className:t,...r,children:i}):null}return b.jsx("section",{className:t,...r,children:e})},(e,t)=>an(e,t));F7.displayName="MarkdownSection";var Gje=({node:e,className:t,children:n,...r})=>{var s,i;let a=dt(),o=!("data-block"in r),{mermaid:c,controls:u}=O.useContext(Es),l=r2(),d=uje(),f=t?.match(Hje),h=(s=f?.at(1))!=null?s:"",m=Dje(h);if(o)return b.jsx("code",{className:a("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...r,children:n});let y=(i=e?.properties)==null?void 0:i.metastring,g=y?.match(Uje),p=g?Number.parseInt(g[1],10):void 0,_=p!==void 0&&p>=1?p:void 0,k="";if(O.isValidElement(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?k=n.props.children:typeof n=="string"&&(k=n),m){let T=m.component;return b.jsx(O.Suspense,{fallback:b.jsx(BD,{}),children:b.jsx(T,{code:k,isIncomplete:d,language:h})})}if(h==="mermaid"&&l){let T=dx(u,"mermaid"),I=d0(u,"download"),$=d0(u,"copy"),R=d0(u,"fullscreen"),z=d0(u,"panZoom"),V=T&&(I||$||R);return b.jsx(O.Suspense,{fallback:b.jsx(BD,{}),children:b.jsxs("div",{className:a("group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",t),"data-streamdown":"mermaid-block",children:[b.jsx("div",{className:a("flex h-8 items-center text-muted-foreground text-xs"),children:b.jsx("span",{className:a("ml-1 font-mono lowercase"),children:"mermaid"})}),V?b.jsx("div",{className:a("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:b.jsxs("div",{className:a("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"mermaid-block-actions",children:[I?b.jsx(Mje,{chart:k,config:c?.config}):null,$?b.jsx(jD,{code:k}):null,R?b.jsx(jje,{chart:k,config:c?.config}):null]})}):null,b.jsx("div",{className:a("rounded-md border border-border bg-background"),children:b.jsx(Vje,{chart:k,config:c?.config,showControls:z})})]})})}let v=dx(u,"code"),w=zD(u,"download"),S=zD(u,"copy");return b.jsx(_je,{className:t,code:k,isIncomplete:d,language:h,startLine:_,children:v?b.jsxs(b.Fragment,{children:[w?b.jsx(Nje,{code:k,language:h}):null,S?b.jsx(jD,{}):null]}):null})},B7=O.memo(Gje,(e,t)=>e.className===t.className&&pk(e.node,t.node));B7.displayName="MarkdownCode";var z7=O.memo(Oje,(e,t)=>e.className===t.className&&pk(e.node,t.node));z7.displayName="MarkdownImg";var U7=O.memo(({children:e,node:t,...n})=>{let r=(Array.isArray(e)?e:[e]).filter(s=>s!=null&&s!=="");if(r.length===1&&O.isValidElement(r[0])){let s=r[0].props.node,i=s?.tagName;if(i==="img")return b.jsx(b.Fragment,{children:e});if(i==="code"&&"data-block"in r[0].props)return b.jsx(b.Fragment,{children:e})}return b.jsx("p",{...n,children:e})},(e,t)=>an(e,t));U7.displayName="MarkdownParagraph";var Kje={ol:s2,li:_7,ul:k7,hr:E7,strong:w7,a:S7,h1:v7,h2:x7,h3:T7,h4:I7,h5:A7,h6:C7,table:P7,thead:N7,tbody:R7,tr:O7,th:L7,td:D7,blockquote:$7,code:B7,img:z7,pre:({children:e})=>O.isValidElement(e)?O.cloneElement(e,{"data-block":"true"}):e,sup:M7,sub:j7,p:U7,section:F7},Wje=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,Jje=new RegExp("\\p{L}","u");function UD(e){let t=e.replace(/^#{1,6}\s+/gm,"").replace(/(\*{1,3}|_{1,3})/g,"").replace(/`[^`]*`/g,"").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^[\s>*\-+\d.]+/gm,"");for(let n of t){if(Wje.test(n))return"rtl";if(Jje.test(n))return"ltr"}return"ltr"}var Yje=/^[ \t]{0,3}(`{3,}|~{3,})/,Qje=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,VD=e=>{let t=e.split(`
383
- `),n=null,r=0;for(let s of t){let i=Yje.exec(s);if(n===null){if(i){let a=i[1];n=a[0],r=a.length}}else if(i){let a=i[1],o=a[0],c=a.length;o===n&&c>=r&&(n=null,r=0)}}return n!==null},Xje=e=>{let t=e.split(`
384
- `);for(let n of t){let r=n.trim();if(r.length>0&&r.includes("|")&&Qje.test(r))return!0}return!1},Zje=()=>e=>{Zi(e,"html",(t,n,r)=>{!r||typeof n!="number"||(r.children[n]={type:"text",value:t.value})})},HD=[],qD={allowDangerousHtml:!0},f0=new WeakMap,e4e=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let n=e.rehypePlugins,r=e.remarkPlugins,s=e.remarkRehypeOptions;if(!(n||r||s)){let l="default";return this.keyCache.set(e,l),l}let i=l=>{if(!l||l.length===0)return"";let d="";for(let f=0;f<l.length;f+=1){let h=l[f];if(f>0&&(d+=","),Array.isArray(h)){let[m,y]=h;if(typeof m=="function"){let g=f0.get(m);g||(g=m.name,f0.set(m,g)),d+=g}else d+=String(m);d+=":",d+=JSON.stringify(y)}else if(typeof h=="function"){let m=f0.get(h);m||(m=h.name,f0.set(h,m)),d+=m}else d+=String(h)}return d},a=i(n),o=i(r),c=s?JSON.stringify(s):"",u=`${o}::${a}::${c}`;return this.keyCache.set(e,u),u}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let r=this.cache.keys().next().value;r&&this.cache.delete(r)}this.cache.set(n,t)}clear(){this.cache.clear()}},GD=new e4e,V7=e=>{let t=t4e(e),n=e.children||"",r=t.runSync(t.parse(n),n);return c4e(r,e)},t4e=e=>{let t=GD.get(e);if(t)return t;let n=r4e(e);return GD.set(e,n),n},n4e=e=>e.some(t=>Array.isArray(t)?t[0]===Jv:t===Jv),r4e=e=>{let t=e.rehypePlugins||HD,n=e.remarkPlugins||HD,r=n4e(t)?n:[...n,Zje],s=e.remarkRehypeOptions?{...qD,...e.remarkRehypeOptions}:qD;return r6e().use(nMe).use(r).use(jMe,s).use(t)},s4e=e=>e,i4e=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:r}},a4e=(e,t)=>{var n;for(let r in mw)if(Object.hasOwn(mw,r)&&Object.hasOwn(e.properties,r)){let s=e.properties[r],i=mw[r];(i===null||i.includes(e.tagName))&&(e.properties[r]=(n=t(String(s||""),r,e))!=null?n:void 0)}},o4e=(e,t,n,r,s,i)=>{let a=!1;return r?a=!r.includes(e.tagName):s&&(a=s.includes(e.tagName)),!a&&i&&typeof t=="number"&&(a=!i(e,t,n)),a},c4e=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:s,skipHtml:i,unwrapDisallowed:a,urlTransform:o}=t;if(n||r||s||i||o){let c=o||s4e;Zi(e,(u,l,d)=>{if(u.type==="raw"&&d&&typeof l=="number")return i4e(d,l,i,u.value),l;if(u.type==="element"&&(a4e(u,c),o4e(u,l,d,r,s,n)&&d&&typeof l=="number"))return a&&u.children?d.children.splice(l,1,...u.children):d.children.splice(l,1),l})}return l$e(e,{Fragment:b.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:b.jsx,jsxs:b.jsxs,passKeys:!0,passNode:!0})},u4e=/\[\^[\w-]{1,200}\](?!:)/,l4e=/\[\^[\w-]{1,200}\]:/,d4e=/<(\w+)[\s>]/,f4e=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),KD=new Map,WD=new Map,h4e=e=>{let t=e.toLowerCase(),n=KD.get(t);if(n)return n;let r=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return KD.set(t,r),r},m4e=e=>{let t=e.toLowerCase(),n=WD.get(t);if(n)return n;let r=new RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return WD.set(t,r),r},JD=(e,t)=>{if(f4e.has(t.toLowerCase()))return 0;let n=e.match(h4e(t));if(!n)return 0;let r=0;for(let s of n)s.trimEnd().endsWith("/>")||(r+=1);return r},YD=(e,t)=>{let n=e.match(m4e(t));return n?n.length:0},p4e=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},g4e=e=>{let t=u4e.test(e),n=l4e.test(e);if(t||n)return[e];let r=Ls.lex(e,{gfm:!0}),s=[],i=[],a=!1;for(let o of r){let c=o.raw,u=s.length;if(i.length>0){s[u-1]+=c;let l=i.at(-1),d=JD(c,l),f=YD(c,l);for(let h=0;h<d;h+=1)i.push(l);for(let h=0;h<f;h+=1)i.length>0&&i.at(-1)===l&&i.pop();continue}if(o.type==="html"&&o.block){let l=c.match(d4e);if(l){let d=l[1],f=JD(c,d),h=YD(c,d);f>h&&i.push(d)}}if(u>0&&!a){let l=s[u-1];if(p4e(l)%2===1){s[u-1]=l+c;continue}}s.push(c),o.type!=="space"&&(a=o.type==="code")}return s},b4e=(e,t)=>{if(!t.length)return e;let n=e;for(let r of t){let s=new RegExp(`(<${r}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${r}\\s*>)`,"gi");n=n.replace(s,(i,a,o,c)=>{let u=o.replace(/\n\n/g,`
385
- <!---->
386
- `);return a+u+c})}return n},y4e=/([\\`*_~[\]|])/g,_4e=e=>e.replace(y4e,"\\$1"),k4e=(e,t)=>{if(!t.length)return e;let n=e;for(let r of t){let s=new RegExp(`(<${r}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${r}\\s*>)`,"gi");n=n.replace(s,(i,a,o,c)=>a+_4e(o)+c)}return n},H7=e=>e.type==="text"?e.value:"children"in e&&Array.isArray(e.children)?e.children.map(H7).join(""):"",E4e=e=>t=>{if(!e||e.length===0)return;let n=new Set(e.map(r=>r.toLowerCase()));Zi(t,"element",r=>{if(n.has(r.tagName.toLowerCase())){let s=H7(r);r.children=s?[{type:"text",value:s}]:[]}})},w4e=()=>e=>{Zi(e,"code",t=>{var n,r;t.meta&&(t.data=(n=t.data)!=null?n:{},t.data.hProperties={...(r=t.data.hProperties)!=null?r:{},metastring:t.meta})})},S4e=/^[ \t]*<[\w!/?-]/,v4e=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,x4e=e=>typeof e!="string"||e.length===0||!S4e.test(e)?e:e.replace(v4e,"$1"),QD,XD,ZD,e$,tb={...Pc,protocols:{...Pc.protocols,href:[...(XD=(QD=Pc.protocols)==null?void 0:QD.href)!=null?XD:[],"tel"]},attributes:{...Pc.attributes,code:[...(e$=(ZD=Pc.attributes)==null?void 0:ZD.code)!=null?e$:[],"metastring"]}},fx={raw:Jv,sanitize:[ZV,tb],harden:[LCe,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},T4e={gfm:[V3e,{}],codeMeta:w4e},t$=Object.values(fx),I4e=Object.values(T4e),A4e={block:" ▋",circle:" ●"},C4e={shikiTheme:["github-light","github-dark"],controls:!0,isAnimating:!1,mode:"streaming",mermaid:void 0,linkSafety:{enabled:!0}},Es=O.createContext(C4e),q7=O.memo(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:r,isIncomplete:s,dir:i,animatePlugin:a,...o})=>{if(a){let l=a.getLastRenderCharCount();a.setPrevContentLength(l)}let c=typeof e=="string"&&n?x4e(e):e,u=b.jsx(V7,{...o,children:c});return b.jsx(l7.Provider,{value:s,children:i?b.jsx("div",{dir:i,style:{display:"contents"},children:u}):u})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete||e.dir!==t.dir)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(s=>{var i,a;return((i=e.components)==null?void 0:i[s])!==((a=t.components)==null?void 0:a[s])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});q7.displayName="Block";var P4e=["github-light","github-dark"],G7=O.memo(({children:e,mode:t="streaming",dir:n,parseIncompleteMarkdown:r=!0,normalizeHtmlIndentation:s=!1,components:i,rehypePlugins:a=t$,remarkPlugins:o=I4e,className:c,shikiTheme:u=P4e,mermaid:l,controls:d=!0,isAnimating:f=!1,animated:h,BlockComponent:m=q7,parseMarkdownIntoBlocksFn:y=g4e,caret:g,plugins:p,remend:_,linkSafety:k={enabled:!0},allowedTags:v,literalTagContent:w,translations:S,icons:T,prefix:I,onAnimationStart:$,onAnimationEnd:R,...z})=>{let V=O.useId(),[H,G]=O.useTransition(),Q=O.useMemo(()=>dje(I),[I]),re=O.useRef(null),me=O.useRef($),ke=O.useRef(R);me.current=$,ke.current=R,O.useEffect(()=>{var Ie,Me,gt;if(t==="static")return;let it=re.current;if(re.current=f,it===null){f&&((Ie=me.current)==null||Ie.call(me));return}f&&!it?(Me=me.current)==null||Me.call(me):!f&&it&&((gt=ke.current)==null||gt.call(ke))},[f,t]);let tt=O.useMemo(()=>v?Object.keys(v):[],[v]),C=O.useMemo(()=>{if(typeof e!="string")return"";let Ie=t==="streaming"&&r?YDe(e,_):e;return w&&w.length>0&&(Ie=k4e(Ie,w)),tt.length>0&&(Ie=b4e(Ie,tt)),Ie},[e,t,r,_,tt,w]),M=O.useMemo(()=>y(C),[C,y]),[K,A]=O.useState(M);O.useEffect(()=>{t==="streaming"&&!ge?G(()=>{A(M)}):A(M)},[M,t]);let P=t==="streaming"?K:M,B=O.useMemo(()=>n==="auto"?P.map(UD):void 0,[P,n]),J=O.useMemo(()=>P.map((Ie,Me)=>`${V}-${Me}`),[P.length,V]),be=O.useMemo(()=>h===!0?"true":h?JSON.stringify(h):"",[h]),ge=O.useMemo(()=>be?be==="true"?ax():ax(h):null,[be]),Ee=O.useMemo(()=>{var Ie,Me;return{shikiTheme:(Me=(Ie=p?.code)==null?void 0:Ie.getThemes())!=null?Me:u,controls:d,isAnimating:f,mode:t,mermaid:l,linkSafety:k}},[u,d,f,t,l,k,p?.code]),Oe=O.useMemo(()=>S?JSON.stringify(S):"",[S]),q=O.useMemo(()=>({...m7,...S}),[Oe]),W=O.useMemo(()=>{let{inlineCode:Ie,...Me}=i??{},gt={...Kje,...Me};if(Ie){let it=gt.code;gt.code=Ct=>"data-block"in Ct?it?O.createElement(it,Ct):null:O.createElement(Ie,Ct)}return gt},[i]),se=O.useMemo(()=>{let Ie=[];return p!=null&&p.cjk&&(Ie=[...Ie,...p.cjk.remarkPluginsBefore]),Ie=[...Ie,...o],p!=null&&p.cjk&&(Ie=[...Ie,...p.cjk.remarkPluginsAfter]),p!=null&&p.math&&(Ie=[...Ie,p.math.remarkPlugin]),Ie},[o,p?.math,p?.cjk]),le=O.useMemo(()=>{var Ie;let Me=a;if(v&&Object.keys(v).length>0&&a===t$){let gt={...tb,tagNames:[...(Ie=tb.tagNames)!=null?Ie:[],...Object.keys(v)],attributes:{...tb.attributes,...v}};Me=[fx.raw,[ZV,gt],fx.harden]}return w&&w.length>0&&(Me=[...Me,[E4e,w]]),p!=null&&p.math&&(Me=[...Me,p.math.rehypePlugin]),ge&&f&&(Me=[...Me,ge.rehypePlugin]),Me},[a,p?.math,ge,f,v,w]),we=O.useMemo(()=>{if(!f||P.length===0)return!1;let Ie=P.at(-1);return VD(Ie)||Xje(Ie)},[f,P]),Fe=O.useMemo(()=>g&&f&&!we?{"--streamdown-caret":`"${A4e[g]}"`}:void 0,[g,f,we]);return t==="static"?b.jsx(cx.Provider,{value:q,children:b.jsx(ux.Provider,{value:p??null,children:b.jsx(Es.Provider,{value:Ee,children:b.jsx(MD,{icons:T,children:b.jsx(ox.Provider,{value:Q,children:b.jsx("div",{className:Q("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",c),dir:n==="auto"?UD(C):n,children:b.jsx(V7,{components:W,rehypePlugins:le,remarkPlugins:se,...z,children:C})})})})})})}):b.jsx(cx.Provider,{value:q,children:b.jsx(ux.Provider,{value:p??null,children:b.jsx(Es.Provider,{value:Ee,children:b.jsx(MD,{icons:T,children:b.jsx(ox.Provider,{value:Q,children:b.jsxs("div",{className:Q("space-y-4 whitespace-normal *:first:mt-0 *:last:mb-0",g&&!we?"*:last:after:inline *:last:after:align-baseline *:last:after:content-[var(--streamdown-caret)]":null,c),style:Fe,children:[P.length===0&&g&&f&&b.jsx("span",{}),P.map((Ie,Me)=>{var gt;let it=Me===P.length-1,Ct=f&&it&&VD(Ie);return b.jsx(m,{animatePlugin:ge,components:W,content:Ie,dir:(gt=B?.[Me])!=null?gt:n!=="auto"?n:void 0,index:Me,isIncomplete:Ct,rehypePlugins:le,remarkPlugins:se,shouldNormalizeHtmlIndentation:s,shouldParseIncompleteMarkdown:r,...z},J[Me])})]})})})})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation&&e.literalTagContent===t.literalTagContent&&JSON.stringify(e.translations)===JSON.stringify(t.translations)&&e.prefix===t.prefix&&e.dir===t.dir);G7.displayName="Streamdown";var N4e=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:s=.1,showControls:i=!0,initialZoom:a=1,fullscreen:o=!1})=>{let{RotateCcwIcon:c,ZoomInIcon:u,ZoomOutIcon:l}=Ai(),d=dt(),f=O.useRef(null),h=O.useRef(null),[m,y]=O.useState(a),[g,p]=O.useState({x:0,y:0}),[_,k]=O.useState(!1),[v,w]=O.useState({x:0,y:0}),[S,T]=O.useState({x:0,y:0}),I=O.useCallback(re=>{y(me=>Math.max(n,Math.min(r,me+re)))},[n,r]),$=O.useCallback(()=>{I(s)},[I,s]),R=O.useCallback(()=>{I(-s)},[I,s]),z=O.useCallback(()=>{y(a),p({x:0,y:0})},[a]),V=O.useCallback(re=>{re.preventDefault();let me=re.deltaY>0?-s:s;I(me)},[I,s]),H=O.useCallback(re=>{if(re.button!==0||re.isPrimary===!1)return;k(!0),w({x:re.clientX,y:re.clientY}),T(g);let me=re.currentTarget;me instanceof HTMLElement&&me.setPointerCapture(re.pointerId)},[g]),G=O.useCallback(re=>{if(!_)return;re.preventDefault();let me=re.clientX-v.x,ke=re.clientY-v.y;p({x:S.x+me,y:S.y+ke})},[_,v,S]),Q=O.useCallback(re=>{k(!1);let me=re.currentTarget;me instanceof HTMLElement&&me.releasePointerCapture(re.pointerId)},[]);return O.useEffect(()=>{let re=f.current;if(re)return re.addEventListener("wheel",V,{passive:!1}),()=>{re.removeEventListener("wheel",V)}},[V]),O.useEffect(()=>{let re=h.current;if(re&&_)return document.body.style.userSelect="none",re.addEventListener("pointermove",G,{passive:!1}),re.addEventListener("pointerup",Q),re.addEventListener("pointercancel",Q),()=>{document.body.style.userSelect="",re.removeEventListener("pointermove",G),re.removeEventListener("pointerup",Q),re.removeEventListener("pointercancel",Q)}},[_,G,Q]),b.jsxs("div",{className:d("relative flex flex-col",o?"h-full w-full":"min-h-28 w-full",t),ref:f,style:{cursor:_?"grabbing":"grab"},children:[i?b.jsxs("div",{className:d("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm",o?"bottom-4 left-4":"bottom-2 left-2"),children:[b.jsx("button",{className:d("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:m>=r,onClick:$,title:"Zoom in",type:"button",children:b.jsx(u,{size:16})}),b.jsx("button",{className:d("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:m<=n,onClick:R,title:"Zoom out",type:"button",children:b.jsx(l,{size:16})}),b.jsx("button",{className:d("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"),onClick:z,title:"Reset zoom and pan",type:"button",children:b.jsx(c,{size:16})})]}):null,b.jsx("div",{className:d("flex-1 origin-center transition-transform duration-150 ease-out",o?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:H,ref:h,role:"application",style:{transform:`translate(${g.x}px, ${g.y}px) scale(${m})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},K7=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:s=!0})=>{let i=dt(),[a,o]=O.useState(null),[c,u]=O.useState(!1),[l,d]=O.useState(""),[f,h]=O.useState(""),[m,y]=O.useState(0),{mermaid:g}=O.useContext(Es),p=r2(),_=g?.errorComponent,{shouldRender:k,containerRef:v}=Z6e({immediate:r});if(O.useEffect(()=>{if(k){if(!p){o("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{o(null),u(!0);let S=p.getMermaid(n),T=e.split("").reduce((R,z)=>(R<<5)-R+z.charCodeAt(0)|0,0),I=`mermaid-${Math.abs(T)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:$}=await S.render(I,e);d($),h($)}catch(S){if(!(f||l)){let T=S instanceof Error?S.message:"Failed to render Mermaid chart";o(T)}}finally{u(!1)}})()}},[e,n,m,k,p]),!(k||l||f))return b.jsx("div",{className:i("my-4 min-h-[200px]",t),ref:v});if(c&&!l&&!f)return b.jsx("div",{className:i("my-4 flex justify-center p-4",t),ref:v,children:b.jsxs("div",{className:i("flex items-center space-x-2 text-muted-foreground"),children:[b.jsx("div",{className:i("h-4 w-4 animate-spin rounded-full border-current border-b-2")}),b.jsx("span",{className:i("text-sm"),children:"Loading diagram..."})]})});if(a&&!l&&!f){let S=()=>y(T=>T+1);return _?b.jsx("div",{ref:v,children:b.jsx(_,{chart:e,error:a,retry:S})}):b.jsxs("div",{className:i("rounded-md bg-red-50 p-4",t),ref:v,children:[b.jsxs("p",{className:i("font-mono text-red-700 text-sm"),children:["Mermaid Error: ",a]}),b.jsxs("details",{className:i("mt-2"),children:[b.jsx("summary",{className:i("cursor-pointer text-red-600 text-xs"),children:"Show Code"}),b.jsx("pre",{className:i("mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs"),children:e})]})]})}let w=l||f;return b.jsx("div",{className:i("size-full",t),"data-streamdown":"mermaid",ref:v,children:b.jsx(N4e,{className:i(r?"size-full overflow-hidden":"overflow-hidden",t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:s,zoomStep:.1,children:b.jsx("div",{"aria-label":"Mermaid chart",className:i("flex justify-center",r?"size-full items-center":null),dangerouslySetInnerHTML:{__html:w},role:"img"})})})};let wn=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function Ky(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[s,i]of Object.entries(t?.colorReplacements||{}))typeof i=="string"?n[s]=i:s===r&&Object.assign(n,i);return n}function No(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function R4e(e){return Array.isArray(e)?e:[e]}async function W7(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function i2(e){return!e||["plaintext","txt","text","plain"].includes(e)}function J7(e){return e==="ansi"||i2(e)}function a2(e){return e==="none"}function Y7(e){return a2(e)}function Q7(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const n=Array.isArray(t)?t:t.split(/\s+/g);for(const r of n)r&&!e.properties.class.includes(r)&&e.properties.class.push(r);return e}function gk(e,t=!1){if(e.length===0)return[["",0]];const n=e.split(/(\r?\n)/g);let r=0;const s=[];for(let i=0;i<n.length;i+=2){const a=t?n[i]+(n[i+1]||""):n[i];s.push([a,r]),r+=n[i].length,r+=n[i+1]?.length||0}return s}function O4e(e){const t=gk(e,!0).map(([s])=>s);function n(s){if(s===e.length)return{line:t.length-1,character:t[t.length-1].length};let i=s,a=0;for(const o of t){if(i<o.length)break;i-=o.length,a++}return{line:a,character:i}}function r(s,i){let a=0;for(let o=0;o<s;o++)a+=t[o].length;return a+=i,a}return{lines:t,indexToPos:n,posToIndex:r}}const o2="light-dark()",L4e=["color","background-color"];function D4e(e,t){let n=0;const r=[];for(const s of t)s>n&&r.push({...e,content:e.content.slice(n,s),offset:e.offset+n}),n=s;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function $4e(e,t){const n=Array.from(t instanceof Set?t:new Set(t)).sort((r,s)=>r-s);return n.length?e.map(r=>r.flatMap(s=>{const i=n.filter(a=>s.offset<a&&a<s.offset+s.content.length).map(a=>a-s.offset).sort((a,o)=>a-o);return i.length?D4e(s,i):s})):e}function M4e(e,t,n,r,s="css-vars"){const i={content:e.content,explanation:e.explanation,offset:e.offset},a=t.map(l=>Wy(e.variants[l])),o=new Set(a.flatMap(l=>Object.keys(l))),c={},u=(l,d)=>{const f=d==="color"?"":d==="background-color"?"-bg":`-${d}`;return n+t[l]+(d==="color"?"":f)};return a.forEach((l,d)=>{for(const f of o){const h=l[f]||"inherit";if(d===0&&r&&L4e.includes(f))if(r===o2&&a.length>1){const m=t.findIndex(_=>_==="light"),y=t.findIndex(_=>_==="dark");if(m===-1||y===-1)throw new wn('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const g=a[m][f]||"inherit",p=a[y][f]||"inherit";c[f]=`light-dark(${g}, ${p})`,s==="css-vars"&&(c[u(d,f)]=h)}else c[f]=h;else s==="css-vars"&&(c[u(d,f)]=h)}}),i.htmlStyle=c,i}function Wy(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&Tt.Italic&&(t["font-style"]="italic"),e.fontStyle&Tt.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&Tt.Underline&&n.push("underline"),e.fontStyle&Tt.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function hx(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}const X7=new WeakMap;function bk(e,t){X7.set(e,t)}function Nm(e){return X7.get(e)}class af{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new af(Object.fromEntries(R4e(n).map(r=>[r,kd])),t)}constructor(...t){if(t.length===2){const[n,r]=t;this.lang=r,this._stacks=n}else{const[n,r,s]=t;this.lang=r,this._stacks={[s]:n}}}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return j4e(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function j4e(e){const t=[],n=new Set;function r(s){if(n.has(s))return;n.add(s);const i=s?.nameScopesList?.scopeName;i&&t.push(i),s.parent&&r(s.parent)}return r(e),t}function F4e(e,t){if(!(e instanceof af))throw new wn("Invalid grammar state");return e.getInternalStack(t)}function B4e(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let r=function(a){if(typeof a=="number"){if(a<0||a>n.source.length)throw new wn(`Invalid decoration offset: ${a}. Code length: ${n.source.length}`);return{...s.indexToPos(a),offset:a}}else{const o=s.lines[a.line];if(o===void 0)throw new wn(`Invalid decoration position ${JSON.stringify(a)}. Lines length: ${s.lines.length}`);let c=a.character;if(c<0&&(c=o.length+c),c<0||c>o.length)throw new wn(`Invalid decoration position ${JSON.stringify(a)}. Line ${a.line} length: ${o.length}`);return{...a,character:c,offset:s.posToIndex(a.line,c)}}};const s=O4e(n.source),i=(n.options.decorations||[]).map(a=>({...a,start:r(a.start),end:r(a.end)}));z4e(i),e.set(n.meta,{decorations:i,converter:s,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(!this.options.decorations?.length)return;const s=t(this).decorations.flatMap(a=>[a.start.offset,a.end.offset]);return $4e(n,s)},code(n){if(!this.options.decorations?.length)return;const r=t(this),s=Array.from(n.children).filter(l=>l.type==="element"&&l.tagName==="span");if(s.length!==r.converter.lines.length)throw new wn(`Number of lines in code element (${s.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function i(l,d,f,h){const m=s[l];let y="",g=-1,p=-1;if(d===0&&(g=0),f===0&&(p=0),f===Number.POSITIVE_INFINITY&&(p=m.children.length),g===-1||p===-1)for(let k=0;k<m.children.length;k++)y+=Z7(m.children[k]),g===-1&&y.length===d&&(g=k+1),p===-1&&y.length===f&&(p=k+1);if(g===-1)throw new wn(`Failed to find start index for decoration ${JSON.stringify(h.start)}`);if(p===-1)throw new wn(`Failed to find end index for decoration ${JSON.stringify(h.end)}`);const _=m.children.slice(g,p);if(!h.alwaysWrap&&_.length===m.children.length)o(m,h,"line");else if(!h.alwaysWrap&&_.length===1&&_[0].type==="element")o(_[0],h,"token");else{const k={type:"element",tagName:"span",properties:{},children:_};o(k,h,"wrapper"),m.children.splice(g,_.length,k)}}function a(l,d){s[l]=o(s[l],d,"line")}function o(l,d,f){const h=d.properties||{},m=d.transform||(y=>y);return l.tagName=d.tagName||"span",l.properties={...l.properties,...h,class:l.properties.class},d.properties?.class&&Q7(l,d.properties.class),l=m(l,f)||l,l}const c=[],u=r.decorations.sort((l,d)=>d.start.offset-l.start.offset||l.end.offset-d.end.offset);for(const l of u){const{start:d,end:f}=l;if(d.line===f.line)i(d.line,d.character,f.character,l);else if(d.line<f.line){i(d.line,d.character,Number.POSITIVE_INFINITY,l);for(let h=d.line+1;h<f.line;h++)c.unshift(()=>a(h,l));i(f.line,0,f.character,l)}}c.forEach(l=>l())}}}function z4e(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new wn(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){const s=e[r],i=n.start.offset<=s.start.offset&&s.start.offset<n.end.offset,a=n.start.offset<s.end.offset&&s.end.offset<=n.end.offset,o=s.start.offset<=n.start.offset&&n.start.offset<s.end.offset,c=s.start.offset<n.end.offset&&n.end.offset<=s.end.offset;if(i||a||o||c){if(i&&a||o&&c||o&&n.start.offset===n.end.offset||a&&s.start.offset===s.end.offset)continue;throw new wn(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(s.start)} intersect.`)}}}}function Z7(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(Z7).join(""):""}const U4e=[B4e()];function Jy(e){const t=V4e(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...U4e]}function V4e(e){const t=[],n=[],r=[];for(const s of e)switch(s.enforce){case"pre":t.push(s);break;case"post":n.push(s);break;default:r.push(s)}return{pre:t,post:n,normal:r}}var Uc=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],xw={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function H4e(e,t){const n=e.indexOf("\x1B",t);if(n!==-1&&e[n+1]==="["){const r=e.indexOf("m",n);if(r!==-1)return{sequence:e.substring(n+2,r).split(";"),startPosition:n,position:r+1}}return{position:e.length}}function n$(e){const t=e.shift();if(t==="2"){const n=e.splice(0,3).map(r=>Number.parseInt(r));return n.length!==3||n.some(r=>Number.isNaN(r))?void 0:{type:"rgb",rgb:n}}else if(t==="5"){const n=e.shift();if(n)return{type:"table",index:Number(n)}}}function q4e(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:"resetAll"});else if(r<=9)xw[r]&&t.push({type:"setDecoration",value:xw[r]});else if(r<=29){const s=xw[r-20];s&&(t.push({type:"resetDecoration",value:s}),s==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:Uc[r-30]}});else if(r===38){const s=n$(e);s&&t.push({type:"setForegroundColor",value:s})}else if(r===39)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:Uc[r-40]}});else if(r===48){const s=n$(e);s&&t.push({type:"setBackgroundColor",value:s})}else r===49?t.push({type:"resetBackgroundColor"}):r===53?t.push({type:"setDecoration",value:"overline"}):r===55?t.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:Uc[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Uc[r-100+8]}})}return t}function G4e(){let e=null,t=null,n=new Set;return{parse(r){const s=[];let i=0;do{const a=H4e(r,i),o=a.sequence?r.substring(i,a.startPosition):r.substring(i);if(o.length>0&&s.push({value:o,foreground:e,background:t,decorations:new Set(n)}),a.sequence){const c=q4e(a.sequence);for(const u of c)u.type==="resetAll"?(e=null,t=null,n.clear()):u.type==="resetForegroundColor"?e=null:u.type==="resetBackgroundColor"?t=null:u.type==="resetDecoration"&&n.delete(u.value);for(const u of c)u.type==="setForegroundColor"?e=u.value:u.type==="setBackgroundColor"?t=u.value:u.type==="setDecoration"&&n.add(u.value)}i=a.position}while(i<r.length);return s}}}var K4e={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function W4e(e=K4e){function t(o){return e[o]}function n(o){return`#${o.map(c=>Math.max(0,Math.min(c,255)).toString(16).padStart(2,"0")).join("")}`}let r;function s(){if(r)return r;r=[];for(let u=0;u<Uc.length;u++)r.push(t(Uc[u]));let o=[0,95,135,175,215,255];for(let u=0;u<6;u++)for(let l=0;l<6;l++)for(let d=0;d<6;d++)r.push(n([o[u],o[l],o[d]]));let c=8;for(let u=0;u<24;u++,c+=10)r.push(n([c,c,c]));return r}function i(o){return s()[o]}function a(o){switch(o.type){case"named":return t(o.name);case"rgb":return n(o.rgb);case"table":return i(o.index)}}return{value:a}}const J4e={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function Y4e(e,t,n){const r=Ky(e,n),s=gk(t),i=Object.fromEntries(Uc.map(c=>{const u=`terminal.ansi${c[0].toUpperCase()}${c.substring(1)}`,l=e.colors?.[u];return[c,l||J4e[c]]})),a=W4e(i),o=G4e();return s.map(c=>o.parse(c[0]).map(u=>{let l,d;u.decorations.has("reverse")?(l=u.background?a.value(u.background):e.bg,d=u.foreground?a.value(u.foreground):e.fg):(l=u.foreground?a.value(u.foreground):e.fg,d=u.background?a.value(u.background):void 0),l=No(l,r),d=No(d,r),u.decorations.has("dim")&&(l=Q4e(l));let f=Tt.None;return u.decorations.has("bold")&&(f|=Tt.Bold),u.decorations.has("italic")&&(f|=Tt.Italic),u.decorations.has("underline")&&(f|=Tt.Underline),u.decorations.has("strikethrough")&&(f|=Tt.Strikethrough),{content:u.value,offset:c[1],color:l,bgColor:d,fontStyle:f}}))}function Q4e(e){const t=e.match(/#([0-9a-f]{3,8})/i);if(t){const r=t[1];if(r.length===8){const s=Math.round(Number.parseInt(r.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${r.slice(0,6)}${s}`}else{if(r.length===6)return`#${r}80`;if(r.length===4){const s=r[0],i=r[1],a=r[2],o=r[3],c=Math.round(Number.parseInt(`${o}${o}`,16)/2).toString(16).padStart(2,"0");return`#${s}${s}${i}${i}${a}${a}${c}`}else if(r.length===3){const s=r[0],i=r[1],a=r[2];return`#${s}${s}${i}${i}${a}${a}80`}}}const n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function c2(e,t,n={}){const{theme:r=e.getLoadedThemes()[0]}=n,s=e.resolveLangAlias(n.lang||"text");if(i2(s)||a2(r))return gk(t).map(c=>[{content:c[0],offset:c[1]}]);const{theme:i,colorMap:a}=e.setTheme(r);if(s==="ansi")return Y4e(i,t,n);const o=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==o.name)throw new wn(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${o.name}"`);if(!n.grammarState.themes.includes(i.name))throw new wn(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return Z4e(t,o,i,a,n)}function X4e(...e){if(e.length===2)return Nm(e[1]);const[t,n,r={}]=e,{lang:s="text",theme:i=t.getLoadedThemes()[0]}=r;if(i2(s)||a2(i))throw new wn("Plain language does not have grammar state");if(s==="ansi")throw new wn("ANSI language does not have grammar state");const{theme:a,colorMap:o}=t.setTheme(i),c=t.getLanguage(s);return new af(u2(n,c,a,o,r).stateStack,c.name,a.name)}function Z4e(e,t,n,r,s){const i=u2(e,t,n,r,s),a=new af(i.stateStack,t.name,n.name);return bk(i.tokens,a),i.tokens}function u2(e,t,n,r,s){const i=Ky(n,s),{tokenizeMaxLineLength:a=0,tokenizeTimeLimit:o=500}=s,c=gk(e);let u=s.grammarState?F4e(s.grammarState,n.name)??kd:s.grammarContextCode!=null?u2(s.grammarContextCode,t,n,r,{...s,grammarState:void 0,grammarContextCode:void 0}).stateStack:kd,l=[];const d=[];for(let f=0,h=c.length;f<h;f++){const[m,y]=c[f];if(m===""){l=[],d.push([]);continue}if(a>0&&m.length>=a){l=[],d.push([{content:m,offset:y,color:"",fontStyle:0}]);continue}let g,p,_;s.includeExplanation&&(g=t.tokenizeLine(m,u,o),p=g.tokens,_=0);const k=t.tokenizeLine2(m,u,o),v=k.tokens.length/2;for(let w=0;w<v;w++){const S=k.tokens[2*w],T=w+1<v?k.tokens[2*w+2]:m.length;if(S===T)continue;const I=k.tokens[2*w+1],$=No(r[Go.getForeground(I)],i),R=Go.getFontStyle(I),z={content:m.substring(S,T),offset:y+S,color:$,fontStyle:R};if(s.includeExplanation){const V=[];if(s.includeExplanation!=="scopeName")for(const G of n.settings){let Q;switch(typeof G.scope){case"string":Q=G.scope.split(/,/).map(re=>re.trim());break;case"object":Q=G.scope;break;default:continue}V.push({settings:G,selectors:Q.map(re=>re.split(/ /))})}z.explanation=[];let H=0;for(;S+H<T;){const G=p[_],Q=m.substring(G.startIndex,G.endIndex);H+=Q.length,z.explanation.push({content:Q,scopes:s.includeExplanation==="scopeName"?e5e(G.scopes):t5e(V,G.scopes)}),_+=1}}l.push(z)}d.push(l),l=[],u=k.ruleStack}return{tokens:d,stateStack:u}}function e5e(e){return e.map(t=>({scopeName:t}))}function t5e(e,t){const n=[];for(let r=0,s=t.length;r<s;r++){const i=t[r];n[r]={scopeName:i,themeMatches:r5e(e,i,t.slice(0,r))}}return n}function r$(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function n5e(e,t,n){if(!r$(e[e.length-1],t))return!1;let r=e.length-2,s=n.length-1;for(;r>=0&&s>=0;)r$(e[r],n[s])&&(r-=1),s-=1;return r===-1}function r5e(e,t,n){const r=[];for(const{selectors:s,settings:i}of e)for(const a of s)if(n5e(a,t,n)){r.push(i);break}return r}function eq(e,t,n){const r=Object.entries(n.themes).filter(c=>c[1]).map(c=>({color:c[0],theme:c[1]})),s=r.map(c=>{const u=c2(e,t,{...n,theme:c.theme}),l=Nm(u),d=typeof c.theme=="string"?c.theme:c.theme.name;return{tokens:u,state:l,theme:d}}),i=s5e(...s.map(c=>c.tokens)),a=i[0].map((c,u)=>c.map((l,d)=>{const f={content:l.content,variants:{},offset:l.offset};return"includeExplanation"in n&&n.includeExplanation&&(f.explanation=l.explanation),i.forEach((h,m)=>{const{content:y,explanation:g,offset:p,..._}=h[u][d];f.variants[r[m].color]=_}),f})),o=s[0].state?new af(Object.fromEntries(s.map(c=>[c.theme,c.state?.getInternalStack(c.theme)])),s[0].state.lang):void 0;return o&&bk(a,o),a}function s5e(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){const s=e.map(c=>c[r]),i=t.map(()=>[]);t.forEach((c,u)=>c.push(i[u]));const a=s.map(()=>0),o=s.map(c=>c[0]);for(;o.every(c=>c);){const c=Math.min(...o.map(u=>u.content.length));for(let u=0;u<n;u++){const l=o[u];l.content.length===c?(i[u].push(l),a[u]+=1,o[u]=s[u][a[u]]):(i[u].push({...l,content:l.content.slice(0,c)}),o[u]={...l,content:l.content.slice(c),offset:l.offset+c})}}}return t}function Yy(e,t,n){let r,s,i,a,o,c;if("themes"in n){const{defaultColor:u="light",cssVariablePrefix:l="--shiki-",colorsRendering:d="css-vars"}=n,f=Object.entries(n.themes).filter(p=>p[1]).map(p=>({color:p[0],theme:p[1]})).sort((p,_)=>p.color===u?-1:_.color===u?1:0);if(f.length===0)throw new wn("`themes` option must not be empty");const h=eq(e,t,n);if(c=Nm(h),u&&o2!==u&&!f.find(p=>p.color===u))throw new wn(`\`themes\` option must contain the defaultColor key \`${u}\``);const m=f.map(p=>e.getTheme(p.theme)),y=f.map(p=>p.color);i=h.map(p=>p.map(_=>M4e(_,y,l,u,d))),c&&bk(i,c);const g=f.map(p=>Ky(p.theme,n));s=s$(f,m,g,l,u,"fg",d),r=s$(f,m,g,l,u,"bg",d),a=`shiki-themes ${m.map(p=>p.name).join(" ")}`,o=u?void 0:[s,r].join(";")}else if("theme"in n){const u=Ky(n.theme,n);i=c2(e,t,n);const l=e.getTheme(n.theme);r=No(l.bg,u),s=No(l.fg,u),a=l.name,c=Nm(i)}else throw new wn("Invalid options, either `theme` or `themes` must be provided");return{tokens:i,fg:s,bg:r,themeName:a,rootStyle:o,grammarState:c}}function s$(e,t,n,r,s,i,a){return e.map((o,c)=>{const u=No(t[c][i],n[c])||"inherit",l=`${r+o.color}${i==="bg"?"-bg":""}:${u}`;if(c===0&&s){if(s===o2&&e.length>1){const d=e.findIndex(y=>y.color==="light"),f=e.findIndex(y=>y.color==="dark");if(d===-1||f===-1)throw new wn('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const h=No(t[d][i],n[d])||"inherit",m=No(t[f][i],n[f])||"inherit";return`light-dark(${h}, ${m});${l}`}return u}return a==="css-vars"?l:null}).filter(o=>!!o).join(";")}function Qy(e,t,n,r={meta:{},options:n,codeToHast:(s,i)=>Qy(e,s,i),codeToTokens:(s,i)=>Yy(e,s,i)}){let s=t;for(const m of Jy(n))s=m.preprocess?.call(r,s,n)||s;let{tokens:i,fg:a,bg:o,themeName:c,rootStyle:u,grammarState:l}=Yy(e,s,n);const{mergeWhitespaces:d=!0,mergeSameStyleTokens:f=!1}=n;d===!0?i=a5e(i):d==="never"&&(i=o5e(i)),f&&(i=c5e(i));const h={...r,get source(){return s}};for(const m of Jy(n))i=m.tokens?.call(h,i)||i;return i5e(i,{...n,fg:a,bg:o,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??u},h,l)}function i5e(e,t,n,r=Nm(e)){const s=Jy(t),i=[],a={type:"root",children:[]},{structure:o="classic",tabindex:c="0"}=t,u={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?u.style=t.rootStyle:u.style=`background-color:${t.bg};color:${t.fg}`),c!==!1&&c!=null&&(u.tabindex=c.toString());for(const[y,g]of Object.entries(t.meta||{}))y.startsWith("_")||(u[y]=g);let l={type:"element",tagName:"pre",properties:u,children:[],data:t.data},d={type:"element",tagName:"code",properties:{},children:i};const f=[],h={...n,structure:o,addClassToHast:Q7,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return a},get pre(){return l},get code(){return d},get lines(){return f}};if(e.forEach((y,g)=>{g&&(o==="inline"?a.children.push({type:"element",tagName:"br",properties:{},children:[]}):o==="classic"&&i.push({type:"text",value:`
387
- `}));let p={type:"element",tagName:"span",properties:{class:"line"},children:[]},_=0;for(const k of y){let v={type:"element",tagName:"span",properties:{...k.htmlAttrs},children:[{type:"text",value:k.content}]};const w=hx(k.htmlStyle||Wy(k));w&&(v.properties.style=w);for(const S of s)v=S?.span?.call(h,v,g+1,_,p,k)||v;o==="inline"?a.children.push(v):o==="classic"&&p.children.push(v),_+=k.content.length}if(o==="classic"){for(const k of s)p=k?.line?.call(h,p,g+1)||p;f.push(p),i.push(p)}else o==="inline"&&f.push(p)}),o==="classic"){for(const y of s)d=y?.code?.call(h,d)||d;l.children.push(d);for(const y of s)l=y?.pre?.call(h,l)||l;a.children.push(l)}else if(o==="inline"){const y=[];let g={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const k of a.children)k.type==="element"&&k.tagName==="br"?(y.push(g),g={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(k.type==="element"||k.type==="text")&&g.children.push(k);y.push(g);let _={type:"element",tagName:"code",properties:{},children:y};for(const k of s)_=k?.code?.call(h,_)||_;a.children=[];for(let k=0;k<_.children.length;k++){k>0&&a.children.push({type:"element",tagName:"br",properties:{},children:[]});const v=_.children[k];v.type==="element"&&a.children.push(...v.children)}}let m=a;for(const y of s)m=y?.root?.call(h,m)||m;return r&&bk(m,r),m}function a5e(e){return e.map(t=>{const n=[];let r="",s;return t.forEach((i,a)=>{const c=!(i.fontStyle&&(i.fontStyle&Tt.Underline||i.fontStyle&Tt.Strikethrough));c&&i.content.match(/^\s+$/)&&t[a+1]?(s===void 0&&(s=i.offset),r+=i.content):r?(c?n.push({...i,offset:s,content:r+i.content}):n.push({content:r,offset:s},i),s=void 0,r=""):n.push(i)}),n})}function o5e(e){return e.map(t=>t.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const r=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!r)return n;const[,s,i,a]=r;if(!s&&!a)return n;const o=[{...n,offset:n.offset+s.length,content:i}];return s&&o.unshift({content:s,offset:n.offset}),a&&o.push({content:a,offset:n.offset+s.length+i.length}),o}))}function c5e(e){return e.map(t=>{const n=[];for(const r of t){if(n.length===0){n.push({...r});continue}const s=n[n.length-1],i=hx(s.htmlStyle||Wy(s)),a=hx(r.htmlStyle||Wy(r)),o=s.fontStyle&&(s.fontStyle&Tt.Underline||s.fontStyle&Tt.Strikethrough),c=r.fontStyle&&(r.fontStyle&Tt.Underline||r.fontStyle&Tt.Strikethrough);!o&&!c&&i===a?s.content+=r.content:n.push({...r})}return n})}const u5e=y9;function l5e(e,t,n){const r={meta:{},options:n,codeToHast:(i,a)=>Qy(e,i,a),codeToTokens:(i,a)=>Yy(e,i,a)};let s=u5e(Qy(e,t,n,r));for(const i of Jy(n))s=i.postprocess?.call(r,s,n)||s;return s}const i$={light:"#333333",dark:"#bbbbbb"},a$={light:"#fffffe",dark:"#1e1e1e"},o$="__shiki_resolved";function l2(e){if(e?.[o$])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){const o=t.settings?t.settings.find(c=>!c.name&&!c.scope):void 0;o?.settings?.foreground&&(r=o.settings.foreground),o?.settings?.background&&(n=o.settings.background),!r&&t?.colors?.["editor.foreground"]&&(r=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?i$.light:i$.dark),n||(n=t.type==="light"?a$.light:a$.dark),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let s=0;const i=new Map;function a(o){if(i.has(o))return i.get(o);s+=1;const c=`#${s.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${c}`]?a(o):(i.set(o,c),c)}t.settings=t.settings.map(o=>{const c=o.settings?.foreground&&!o.settings.foreground.startsWith("#"),u=o.settings?.background&&!o.settings.background.startsWith("#");if(!c&&!u)return o;const l={...o,settings:{...o.settings}};if(c){const d=a(o.settings.foreground);t.colorReplacements[d]=o.settings.foreground,l.settings.foreground=d}if(u){const d=a(o.settings.background);t.colorReplacements[d]=o.settings.background,l.settings.background=d}return l});for(const o of Object.keys(t.colors||{}))if((o==="editor.foreground"||o==="editor.background"||o.startsWith("terminal.ansi"))&&!t.colors[o]?.startsWith("#")){const c=a(t.colors[o]);t.colorReplacements[c]=t.colors[o],t.colors[o]=c}return Object.defineProperty(t,o$,{enumerable:!1,writable:!1,value:!0}),t}async function tq(e){return Array.from(new Set((await Promise.all(e.filter(t=>!J7(t)).map(async t=>await W7(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function nq(e){return(await Promise.all(e.map(async n=>Y7(n)?null:l2(await W7(n))))).filter(n=>!!n)}let d5e=3;function f5e(e,t=3){t>d5e||console.trace(`[SHIKI DEPRECATE]: ${e}`)}let Ll=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function rq(e,t){if(!t)return e;if(t[e]){const n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new Ll(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return e}class h5e extends WU{constructor(t,n,r,s={}){super(t),this._resolver=t,this._themes=n,this._langs=r,this._alias=s,this._themes.map(i=>this.loadTheme(i)),this.loadLanguages(this._langs)}_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;getTheme(t){return typeof t=="string"?this._resolvedThemes.get(t):this.loadTheme(t)}loadTheme(t){const n=l2(t);return n.name&&(this._resolvedThemes.set(n.name,n),this._loadedThemesCache=null),n}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(t){let n=this._textmateThemeCache.get(t);n||(n=Em.createFromRawTheme(t),this._textmateThemeCache.set(t,n)),this._syncRegistry.setTheme(n)}getGrammar(t){return t=rq(t,this._alias),this._resolvedGrammars.get(t)}loadLanguage(t){if(this.getGrammar(t.name))return;const n=new Set([...this._langMap.values()].filter(i=>i.embeddedLangsLazy?.includes(t.name)));this._resolver.addLanguage(t);const r={balancedBracketSelectors:t.balancedBracketSelectors||["*"],unbalancedBracketSelectors:t.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(t.scopeName,t);const s=this.loadGrammarWithConfiguration(t.scopeName,1,r);if(s.name=t.name,this._resolvedGrammars.set(t.name,s),t.aliases&&t.aliases.forEach(i=>{this._alias[i]=t.name}),this._loadedLanguagesCache=null,n.size)for(const i of n)this._resolvedGrammars.delete(i.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(i.scopeName),this._syncRegistry?._grammars?.delete(i.scopeName),this.loadLanguage(this._langMap.get(i.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(t){for(const s of t)this.resolveEmbeddedLanguages(s);const n=Array.from(this._langGraph.entries()),r=n.filter(([s,i])=>!i);if(r.length){const s=n.filter(([i,a])=>a?(a.embeddedLanguages||a.embeddedLangs)?.some(c=>r.map(([u])=>u).includes(c)):!1).filter(i=>!r.includes(i));throw new Ll(`Missing languages ${r.map(([i])=>`\`${i}\``).join(", ")}, required by ${s.map(([i])=>`\`${i}\``).join(", ")}`)}for(const[s,i]of n)this._resolver.addLanguage(i);for(const[s,i]of n)this.loadLanguage(i)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(t){this._langMap.set(t.name,t),this._langGraph.set(t.name,t);const n=t.embeddedLanguages??t.embeddedLangs;if(n)for(const r of n)this._langGraph.set(r,this._langMap.get(r))}}class m5e{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(t,n){this._onigLib={createOnigScanner:r=>t.createScanner(r),createOnigString:r=>t.createString(r)},n.forEach(r=>this.addLanguage(r))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(n=>{this._langs.set(n,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(n=>{this._injections.get(n)||this._injections.set(n,[]),this._injections.get(n).push(t.scopeName)})}getInjections(t){const n=t.split(".");let r=[];for(let s=1;s<=n.length;s++){const i=n.slice(0,s).join(".");r=[...r,...this._injections.get(i)||[]]}return r}}let Bf=0;function p5e(e){Bf+=1,e.warnings!==!1&&Bf>=10&&Bf%10===0&&console.warn(`[Shiki] ${Bf} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new Ll("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(l2),s=new m5e(e.engine,n),i=new h5e(s,r,n,e.langAlias);let a;function o(k){return rq(k,e.langAlias)}function c(k){p();const v=i.getGrammar(typeof k=="string"?k:k.name);if(!v)throw new Ll(`Language \`${k}\` not found, you may need to load it first`);return v}function u(k){if(k==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};p();const v=i.getTheme(k);if(!v)throw new Ll(`Theme \`${k}\` not found, you may need to load it first`);return v}function l(k){p();const v=u(k);a!==k&&(i.setTheme(v),a=k);const w=i.getColorMap();return{theme:v,colorMap:w}}function d(){return p(),i.getLoadedThemes()}function f(){return p(),i.getLoadedLanguages()}function h(...k){p(),i.loadLanguages(k.flat(1))}async function m(...k){return h(await tq(k))}function y(...k){p();for(const v of k.flat(1))i.loadTheme(v)}async function g(...k){return p(),y(await nq(k))}function p(){if(t)throw new Ll("Shiki instance has been disposed")}function _(){t||(t=!0,i.dispose(),Bf-=1)}return{setTheme:l,getTheme:u,getLanguage:c,getLoadedThemes:d,getLoadedLanguages:f,resolveLangAlias:o,loadLanguage:m,loadLanguageSync:h,loadTheme:g,loadThemeSync:y,dispose:_,[Symbol.dispose]:_}}async function g5e(e){e.engine||f5e("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([nq(e.themes||[]),tq(e.langs||[]),e.engine]);return p5e({...e,themes:t,langs:n,engine:r})}async function b5e(e){const t=await g5e(e);return{getLastGrammarState:(...n)=>X4e(t,...n),codeToTokensBase:(n,r)=>c2(t,n,r),codeToTokensWithThemes:(n,r)=>eq(t,n,r),codeToTokens:(n,r)=>Yy(t,n,r),codeToHast:(n,r)=>Qy(t,n,r),codeToHtml:(n,r)=>l5e(t,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function y5e(e){const t=e.langs,n=e.themes,r=e.engine;async function s(i){function a(d){if(typeof d=="string"){if(d=i.langAlias?.[d]||d,J7(d))return[];const f=t[d];if(!f)throw new wn(`Language \`${d}\` is not included in this bundle. You may want to load it from external source.`);return f}return d}function o(d){if(Y7(d))return"none";if(typeof d=="string"){const f=n[d];if(!f)throw new wn(`Theme \`${d}\` is not included in this bundle. You may want to load it from external source.`);return f}return d}const c=(i.themes??[]).map(d=>o(d)),u=(i.langs??[]).map(d=>a(d)),l=await b5e({engine:i.engine??r(),...i,themes:c,langs:u});return{...l,loadLanguage(...d){return l.loadLanguage(...d.map(a))},loadTheme(...d){return l.loadTheme(...d.map(o))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return s}const d2=[{id:"abap",name:"ABAP",import:(()=>x(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",import:(()=>x(()=>import("./actionscript-3-CoDkCxhg.js"),[]))},{id:"ada",name:"Ada",import:(()=>x(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>x(()=>import("./angular-html-CU67Zn6k.js").then(e=>e.f),__vite__mapDeps([103,104,105,106])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>x(()=>import("./angular-ts-BwZT4LLn.js"),__vite__mapDeps([107,103,104,105,106,108])))},{id:"apache",name:"Apache Conf",import:(()=>x(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>x(()=>import("./apex-D8_7TLub.js"),[]))},{id:"apl",name:"APL",import:(()=>x(()=>import("./apl-dKokRX4l.js"),__vite__mapDeps([109,104,105,106,110,111,112])))},{id:"applescript",name:"AppleScript",import:(()=>x(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>x(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>x(()=>import("./asciidoc-Ve4PFQV2.js"),[]))},{id:"asm",name:"Assembly",import:(()=>x(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>x(()=>import("./astro-CbQHKStN.js"),__vite__mapDeps([113,112,105,114,106,115,116])))},{id:"awk",name:"AWK",import:(()=>x(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>x(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>x(()=>import("./bat-BkioyH1T.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>x(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>x(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>x(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>x(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>x(()=>import("./bird2-DPOp833l.js"),[]))},{id:"blade",name:"Blade",import:(()=>x(()=>import("./blade-D4QpJJKB.js"),__vite__mapDeps([117,118,104,105,106,110,111,119,112])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>x(()=>import("./bsl-BO_Y6i37.js"),__vite__mapDeps([120,121])))},{id:"c",name:"C",import:(()=>x(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>x(()=>import("./c3-eo99z4R2.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>x(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>x(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([122,123])))},{id:"clarity",name:"Clarity",import:(()=>x(()=>import("./clarity-D53aC0YG.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>x(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>x(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>x(()=>import("./cobol-nwyudZeR.js"),__vite__mapDeps([124,104,105,106,111])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>x(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>x(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>x(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([125,105])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>x(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Coq",import:(()=>x(()=>import("./coq-DkFqJrB1.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>x(()=>import("./cpp-CofmeUqb.js"),__vite__mapDeps([126,127,128,129,119])))},{id:"crystal",name:"Crystal",import:(()=>x(()=>import("./crystal-tKQVLTB8.js"),__vite__mapDeps([130,104,105,106,119,129,131])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>x(()=>import("./csharp-COcwbKMJ.js"),[]))},{id:"css",name:"CSS",import:(()=>x(()=>import("./css-DPfMkruS.js"),[]))},{id:"csv",name:"CSV",import:(()=>x(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>x(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>x(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>x(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>x(()=>import("./dart-CF10PKvl.js"),[]))},{id:"dax",name:"DAX",import:(()=>x(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>x(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>x(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>x(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>x(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>x(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>x(()=>import("./edge-BkV0erSs.js"),__vite__mapDeps([132,114,104,105,106,118])))},{id:"elixir",name:"Elixir",import:(()=>x(()=>import("./elixir-CDX3lj18.js"),__vite__mapDeps([133,104,105,106])))},{id:"elm",name:"Elm",import:(()=>x(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([134,128,129])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>x(()=>import("./emacs-lisp-C9XAeP06.js"),[]))},{id:"erb",name:"ERB",import:(()=>x(()=>import("./erb-B12qg9BL.js"),__vite__mapDeps([135,104,105,106,136,137,110,111,119,138,114,139,116,126,127,128,129,131,140,141])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>x(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([142,143])))},{id:"fennel",name:"Fennel",import:(()=>x(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>x(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>x(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>x(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([144,145])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>x(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>x(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([146,143])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>x(()=>import("./gdresource-BOOCDP_w.js"),__vite__mapDeps([147,148,149])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>x(()=>import("./gdscript-C5YyOfLZ.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>x(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>x(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>x(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>x(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([150,151])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>x(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([152,131])))},{id:"gleam",name:"Gleam",import:(()=>x(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>x(()=>import("./glimmer-js-Rg0-pVw9.js"),__vite__mapDeps([153,105,114,106,104])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>x(()=>import("./glimmer-ts-U6CK756n.js"),__vite__mapDeps([154,114,106,105,104])))},{id:"glsl",name:"GLSL",import:(()=>x(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([128,129])))},{id:"gn",name:"GN",import:(()=>x(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>x(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>x(()=>import("./go-CxLEBnE3.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>x(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([138,105,114,139,116])))},{id:"groovy",name:"Groovy",import:(()=>x(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>x(()=>import("./hack-CaT9iCJl.js"),__vite__mapDeps([155,104,105,106,119])))},{id:"haml",name:"Ruby Haml",import:(()=>x(()=>import("./haml-B8DHNrY2.js"),__vite__mapDeps([137,105,106])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>x(()=>import("./handlebars-BL8al0AC.js"),__vite__mapDeps([156,104,105,106,141])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>x(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>x(()=>import("./haxe-CzTSHFRz.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>x(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>x(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>x(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>x(()=>import("./html-GMplVEZG.js"),__vite__mapDeps([104,105,106])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>x(()=>import("./html-derivative-BFtXZ54Q.js"),__vite__mapDeps([118,104,105,106])))},{id:"http",name:"HTTP",import:(()=>x(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([157,131,112,110,111,138,105,114,139,116])))},{id:"hurl",name:"Hurl",import:(()=>x(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([158,138,105,114,139,116,110,111,159])))},{id:"hxml",name:"HXML",import:(()=>x(()=>import("./hxml-Bvhsp5Yf.js"),__vite__mapDeps([160,161])))},{id:"hy",name:"Hy",import:(()=>x(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>x(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>x(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>x(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>x(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>x(()=>import("./jinja-4LBKfQ-Z.js"),__vite__mapDeps([162,104,105,106])))},{id:"jison",name:"Jison",import:(()=>x(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([163,105])))},{id:"json",name:"JSON",import:(()=>x(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>x(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>x(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>x(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>x(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>x(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>x(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>x(()=>import("./julia-CxzCAyBv.js"),__vite__mapDeps([164,126,127,128,129,119,123,105,165])))},{id:"just",name:"Just",import:(()=>x(()=>import("./just-Cw27pwNe.js"),__vite__mapDeps([166,131,105,114,167,104,106,110,111,119,123,136,137,138,139,116,126,127,128,129,140,141])))},{id:"kdl",name:"KDL",import:(()=>x(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>x(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>x(()=>import("./kusto-DZf3V79B.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>x(()=>import("./latex-CWtU0Tv5.js"),__vite__mapDeps([168,169,165])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>x(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>x(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>x(()=>import("./liquid-DYVedYrR.js"),__vite__mapDeps([170,104,105,106,112])))},{id:"llvm",name:"LLVM IR",import:(()=>x(()=>import("./llvm-DjAJT7YJ.js"),[]))},{id:"log",name:"Log file",import:(()=>x(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>x(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>x(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([140,129])))},{id:"luau",name:"Luau",import:(()=>x(()=>import("./luau-C-HG3fhB.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>x(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>x(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>x(()=>import("./marko-CnJfTvn9.js"),__vite__mapDeps([171,106,172,108,114])))},{id:"matlab",name:"MATLAB",import:(()=>x(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>x(()=>import("./mdc-BMNejdWA.js"),__vite__mapDeps([173,143,141,118,104,105,106])))},{id:"mdx",name:"MDX",import:(()=>x(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>x(()=>import("./mermaid-mWjccvbQ.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>x(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>x(()=>import("./mojo-rZm6bMo-.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>x(()=>import("./moonbit-_H4v1dQx.js"),[]))},{id:"move",name:"Move",import:(()=>x(()=>import("./move-IF9eRakj.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>x(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>x(()=>import("./nextflow-Zz6hmt5N.js"),__vite__mapDeps([174,175])))},{id:"nextflow-groovy",name:"nextflow-groovy",import:(()=>x(()=>import("./nextflow-groovy-BeH2EWoN.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>x(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([176,140,129])))},{id:"nim",name:"Nim",import:(()=>x(()=>import("./nim-CVrawwO9.js"),__vite__mapDeps([177,129,104,105,106,110,111,128,143])))},{id:"nix",name:"Nix",import:(()=>x(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>x(()=>import("./nushell-Cz2AlsmD.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>x(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>x(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>x(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>x(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>x(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"pascal",name:"Pascal",import:(()=>x(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>x(()=>import("./perl-C0TMdlhV.js"),__vite__mapDeps([167,104,105,106,110,111,119])))},{id:"php",name:"PHP",import:(()=>x(()=>import("./php-Dhbhpdrm.js"),__vite__mapDeps([178,104,105,106,110,111,119,112])))},{id:"pkl",name:"Pkl",import:(()=>x(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>x(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>x(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>x(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>x(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>x(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>x(()=>import("./powershell-Dpen1YoG.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>x(()=>import("./prisma-Dd19v3D-.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>x(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>x(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>x(()=>import("./pug-CGlum2m_.js"),__vite__mapDeps([179,105,106,104])))},{id:"puppet",name:"Puppet",import:(()=>x(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>x(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>x(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>x(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([180,105])))},{id:"qmldir",name:"QML Directory",import:(()=>x(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>x(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>x(()=>import("./r-Dspwwk_N.js"),[]))},{id:"racket",name:"Racket",import:(()=>x(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>x(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>x(()=>import("./razor-Uh8Bk_45.js"),__vite__mapDeps([181,104,105,106,182])))},{id:"reg",name:"Windows Registry Script",import:(()=>x(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>x(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>x(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>x(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>x(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>x(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>x(()=>import("./rst-BrH8l1NY.js"),__vite__mapDeps([183,118,104,105,106,126,127,128,129,119,123,131,141,184,136,137,110,111,138,114,139,116,140])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>x(()=>import("./ruby-Dw2BHqvy.js"),__vite__mapDeps([136,104,105,106,137,110,111,119,138,114,139,116,126,127,128,129,131,140,141])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>x(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>x(()=>import("./sas-cz2c8ADy.js"),__vite__mapDeps([185,119])))},{id:"sass",name:"Sass",import:(()=>x(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>x(()=>import("./scala-C151Ov-r.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>x(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>x(()=>import("./scss-OYdSNvt2.js"),__vite__mapDeps([108,106])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>x(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>x(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([186,187])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>x(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>x(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([188,131])))},{id:"smalltalk",name:"Smalltalk",import:(()=>x(()=>import("./smalltalk-BERRCDM3.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>x(()=>import("./solidity-rGO070M0.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>x(()=>import("./soy-Brmx7dQM.js"),__vite__mapDeps([189,104,105,106])))},{id:"sparql",name:"SPARQL",import:(()=>x(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([190,191])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>x(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>x(()=>import("./sql-BLtJtn59.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>x(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>x(()=>import("./stata-BH5u7GGu.js"),__vite__mapDeps([192,119])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>x(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>x(()=>import("./surrealql-Bq5Q-fJD.js"),__vite__mapDeps([193,105])))},{id:"svelte",name:"Svelte",import:(()=>x(()=>import("./svelte-C_ipcX3V.js"),__vite__mapDeps([194,105,114,106,115])))},{id:"swift",name:"Swift",import:(()=>x(()=>import("./swift-D82vCrfD.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>x(()=>import("./system-verilog-CnnmHF94.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>x(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>x(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>x(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>x(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>x(()=>import("./templ-P3uqSqPl.js"),__vite__mapDeps([195,196,105,106])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>x(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>x(()=>import("./tex-idrVyKtj.js"),__vite__mapDeps([169,165])))},{id:"toml",name:"TOML",import:(()=>x(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>x(()=>import("./ts-tags-zn1MmPIZ.js"),__vite__mapDeps([197,114,106,105,128,129,104,119,110,111])))},{id:"tsv",name:"TSV",import:(()=>x(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>x(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>x(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>x(()=>import("./twig-DNn4PbVi.js"),__vite__mapDeps([198,106,105,108,178,104,110,111,119,112,123,136,137,138,114,139,116,126,127,128,129,131,140,141])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>x(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>x(()=>import("./typespec-BGHnOYBU.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>x(()=>import("./typst-DHCkPAjA.js"),[]))},{id:"v",name:"V",import:(()=>x(()=>import("./v-BcVCzyr7.js"),[]))},{id:"vala",name:"Vala",import:(()=>x(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>x(()=>import("./vb-D17OF-Vu.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>x(()=>import("./verilog-BQ8w6xss.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>x(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>x(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>x(()=>import("./vue-DN_0RTcg.js"),__vite__mapDeps([199,106,105,114,112,104,118])))},{id:"vue-html",name:"Vue HTML",import:(()=>x(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([200,105])))},{id:"vue-vine",name:"Vue Vine",import:(()=>x(()=>import("./vue-vine-CQOfvN7w.js"),__vite__mapDeps([201,106,108,172,202,115,105])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>x(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>x(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>x(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>x(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>x(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>x(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>x(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>x(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([110,111])))},{id:"xsl",name:"XSL",import:(()=>x(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([203,110,111])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>x(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>x(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>x(()=>import("./zig-VOosw3JB.js"),[]))}],_5e=Object.fromEntries(d2.map(e=>[e.id,e.import])),k5e=Object.fromEntries(d2.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),sq={..._5e,...k5e},E5e=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>x(()=>import("./andromeeda-CF6_y_Qj.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>x(()=>import("./aurora-x-DOuLBLNn.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>x(()=>import("./ayu-dark-BXQCOcka.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>x(()=>import("./ayu-light-McBaoK3Y.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>x(()=>import("./ayu-mirage-urwrJgdN.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>x(()=>import("./catppuccin-frappe-BCqV45_h.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>x(()=>import("./catppuccin-latte-BWlfbWlw.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>x(()=>import("./catppuccin-macchiato-L0ooYkqX.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>x(()=>import("./catppuccin-mocha-CPxVXonm.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>x(()=>import("./dark-plus-DNUujdjh.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>x(()=>import("./dracula-Dl-8puSV.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>x(()=>import("./dracula-soft-CSMZw4vz.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>x(()=>import("./everforest-dark-BxQkAq-6.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>x(()=>import("./everforest-light-CcLVmqFl.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>x(()=>import("./github-dark-vbPMK5nw.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>x(()=>import("./github-dark-default-BuB7GGZr.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>x(()=>import("./github-dark-dimmed-CQQ2kH1a.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>x(()=>import("./github-dark-high-contrast-fZoHxlg3.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>x(()=>import("./github-light-CBO01_j6.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>x(()=>import("./github-light-default-DNniaknl.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>x(()=>import("./github-light-high-contrast-Kh_Z1r_U.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>x(()=>import("./gruvbox-dark-hard-B-lrt2RD.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>x(()=>import("./gruvbox-dark-medium-DqRMfHwY.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>x(()=>import("./gruvbox-dark-soft-0cd3aJ5k.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>x(()=>import("./gruvbox-light-hard-CdMyBl7-.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>x(()=>import("./gruvbox-light-medium-k_NbMmjL.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>x(()=>import("./gruvbox-light-soft-B_wmbOPu.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>x(()=>import("./horizon-Dr-pOaOB.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"dark",import:(()=>x(()=>import("./horizon-bright-Cn-bp-IR.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>x(()=>import("./houston-D7pTNItX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>x(()=>import("./kanagawa-dragon-9xlKYyML.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>x(()=>import("./kanagawa-lotus-D7R2-rgR.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>x(()=>import("./kanagawa-wave-DXzwPY55.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>x(()=>import("./laserwave-Crdg5MSq.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>x(()=>import("./light-plus-Keeg-hmX.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>x(()=>import("./material-theme-BjSij5jK.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>x(()=>import("./material-theme-darker-Ci314V8G.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>x(()=>import("./material-theme-lighter-BsHhGFQr.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>x(()=>import("./material-theme-ocean-DcalBkIS.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>x(()=>import("./material-theme-palenight-GGCMgrXw.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>x(()=>import("./min-dark-CDSXMz5a.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>x(()=>import("./min-light-CM5JNFAA.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>x(()=>import("./monokai-O2TR9gDo.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>x(()=>import("./night-owl-NZdGqbHT.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>x(()=>import("./night-owl-light-Dx-BWqtN.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>x(()=>import("./nord-BNMOv-tL.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>x(()=>import("./one-dark-pro-DnMjqbdW.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>x(()=>import("./one-light-dsKzgxTn.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>x(()=>import("./plastic-Ckcm5hoS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>x(()=>import("./poimandres-BbcZclLp.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>x(()=>import("./red-BQzOET_I.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>x(()=>import("./rose-pine-B3EY3h2-.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>x(()=>import("./rose-pine-dawn-6WQi5eS6.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>x(()=>import("./rose-pine-moon-BTPbmVvF.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>x(()=>import("./slack-dark-DBfAPHjY.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>x(()=>import("./slack-ochin-szRk-9hG.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>x(()=>import("./snazzy-light-CBYPMa6b.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>x(()=>import("./solarized-dark-Tf4Pofl7.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>x(()=>import("./solarized-light-n46tpZ2s.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>x(()=>import("./synthwave-84-CNQ9Fj-_.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>x(()=>import("./tokyo-night-J9jDJp4U.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>x(()=>import("./vesper-C5GDOJD3.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>x(()=>import("./vitesse-black-BeJXV_f5.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>x(()=>import("./vitesse-dark-mzFqOv-V.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>x(()=>import("./vitesse-light-BoFwUIac.js"),[]))}],w5e=Object.fromEntries(E5e.map(e=>[e.id,e.import]));class f2 extends Error{constructor(t){super(t),this.name="ShikiError"}}function S5e(){return 2147483648}function v5e(){return typeof performance<"u"?performance.now():Date.now()}const x5e=(e,t)=>e+(t-e%t)%t;async function T5e(e){let t,n;const r={};function s(h){n=h,r.HEAPU8=new Uint8Array(h),r.HEAPU32=new Uint32Array(h)}function i(h,m,y){r.HEAPU8.copyWithin(h,m,m+y)}function a(h){try{return t.grow(h-n.byteLength+65535>>>16),s(t.buffer),1}catch{}}function o(h){const m=r.HEAPU8.length;h=h>>>0;const y=S5e();if(h>y)return!1;for(let g=1;g<=4;g*=2){let p=m*(1+.2/g);p=Math.min(p,h+100663296);const _=Math.min(y,x5e(Math.max(h,p),65536));if(a(_))return!0}return!1}const c=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function u(h,m,y=1024){const g=m+y;let p=m;for(;h[p]&&!(p>=g);)++p;if(p-m>16&&h.buffer&&c)return c.decode(h.subarray(m,p));let _="";for(;m<p;){let k=h[m++];if(!(k&128)){_+=String.fromCharCode(k);continue}const v=h[m++]&63;if((k&224)===192){_+=String.fromCharCode((k&31)<<6|v);continue}const w=h[m++]&63;if((k&240)===224?k=(k&15)<<12|v<<6|w:k=(k&7)<<18|v<<12|w<<6|h[m++]&63,k<65536)_+=String.fromCharCode(k);else{const S=k-65536;_+=String.fromCharCode(55296|S>>10,56320|S&1023)}}return _}function l(h,m){return h?u(r.HEAPU8,h,m):""}const d={emscripten_get_now:v5e,emscripten_memcpy_big:i,emscripten_resize_heap:o,fd_write:()=>0};async function f(){const m=await e({env:d,wasi_snapshot_preview1:d});t=m.memory,s(t.buffer),Object.assign(r,m),r.UTF8ToString=l}return await f(),r}var I5e=Object.defineProperty,A5e=(e,t,n)=>t in e?I5e(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ln=(e,t,n)=>A5e(e,typeof t!="symbol"?t+"":t,n);let qn=null;function C5e(e){throw new f2(e.UTF8ToString(e.getLastOnigError()))}class yk{constructor(t){Ln(this,"utf16Length"),Ln(this,"utf8Length"),Ln(this,"utf16Value"),Ln(this,"utf8Value"),Ln(this,"utf16OffsetToUtf8"),Ln(this,"utf8OffsetToUtf16");const n=t.length,r=yk._utf8ByteLength(t),s=r!==n,i=s?new Uint32Array(n+1):null;s&&(i[n]=r);const a=s?new Uint32Array(r+1):null;s&&(a[r]=n);const o=new Uint8Array(r);let c=0;for(let u=0;u<n;u++){const l=t.charCodeAt(u);let d=l,f=!1;if(l>=55296&&l<=56319&&u+1<n){const h=t.charCodeAt(u+1);h>=56320&&h<=57343&&(d=(l-55296<<10)+65536|h-56320,f=!0)}s&&(i[u]=c,f&&(i[u+1]=c),d<=127?a[c+0]=u:d<=2047?(a[c+0]=u,a[c+1]=u):d<=65535?(a[c+0]=u,a[c+1]=u,a[c+2]=u):(a[c+0]=u,a[c+1]=u,a[c+2]=u,a[c+3]=u)),d<=127?o[c++]=d:d<=2047?(o[c++]=192|(d&1984)>>>6,o[c++]=128|(d&63)>>>0):d<=65535?(o[c++]=224|(d&61440)>>>12,o[c++]=128|(d&4032)>>>6,o[c++]=128|(d&63)>>>0):(o[c++]=240|(d&1835008)>>>18,o[c++]=128|(d&258048)>>>12,o[c++]=128|(d&4032)>>>6,o[c++]=128|(d&63)>>>0),f&&u++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=o,this.utf16OffsetToUtf8=i,this.utf8OffsetToUtf16=a}static _utf8ByteLength(t){let n=0;for(let r=0,s=t.length;r<s;r++){const i=t.charCodeAt(r);let a=i,o=!1;if(i>=55296&&i<=56319&&r+1<s){const c=t.charCodeAt(r+1);c>=56320&&c<=57343&&(a=(i-55296<<10)+65536|c-56320,o=!0)}a<=127?n+=1:a<=2047?n+=2:a<=65535?n+=3:n+=4,o&&r++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const _k=class Di{constructor(t){if(Ln(this,"id",++Di.LAST_ID),Ln(this,"_onigBinding"),Ln(this,"content"),Ln(this,"utf16Length"),Ln(this,"utf8Length"),Ln(this,"utf16OffsetToUtf8"),Ln(this,"utf8OffsetToUtf16"),Ln(this,"ptr"),!qn)throw new f2("Must invoke loadWasm first.");this._onigBinding=qn,this.content=t;const n=new yk(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!Di._sharedPtrInUse?(Di._sharedPtr||(Di._sharedPtr=qn.omalloc(1e4)),Di._sharedPtrInUse=!0,qn.HEAPU8.set(n.utf8Value,Di._sharedPtr),this.ptr=Di._sharedPtr):this.ptr=n.createString(qn)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===Di._sharedPtr?Di._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};Ln(_k,"LAST_ID",0);Ln(_k,"_sharedPtr",0);Ln(_k,"_sharedPtrInUse",!1);let iq=_k;class P5e{constructor(t){if(Ln(this,"_onigBinding"),Ln(this,"_ptr"),!qn)throw new f2("Must invoke loadWasm first.");const n=[],r=[];for(let o=0,c=t.length;o<c;o++){const u=new yk(t[o]);n[o]=u.createString(qn),r[o]=u.utf8Length}const s=qn.omalloc(4*t.length);qn.HEAPU32.set(n,s/4);const i=qn.omalloc(4*t.length);qn.HEAPU32.set(r,i/4);const a=qn.createOnigScanner(s,i,t.length);for(let o=0,c=t.length;o<c;o++)qn.ofree(n[o]);qn.ofree(i),qn.ofree(s),a===0&&C5e(qn),this._onigBinding=qn,this._ptr=a}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,r){let s=0;if(typeof r=="number"&&(s=r),typeof t=="string"){t=new iq(t);const i=this._findNextMatchSync(t,n,!1,s);return t.dispose(),i}return this._findNextMatchSync(t,n,!1,s)}_findNextMatchSync(t,n,r,s){const i=this._onigBinding,a=i.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),s);if(a===0)return null;const o=i.HEAPU32;let c=a/4;const u=o[c++],l=o[c++],d=[];for(let f=0;f<l;f++){const h=t.convertUtf8OffsetToUtf16(o[c++]),m=t.convertUtf8OffsetToUtf16(o[c++]);d[f]={start:h,end:m,length:m-h}}return{index:u,captureIndices:d}}}function N5e(e){return typeof e.instantiator=="function"}function R5e(e){return typeof e.default=="function"}function O5e(e){return typeof e.data<"u"}function L5e(e){return typeof Response<"u"&&e instanceof Response}function D5e(e){return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let h0;function $5e(e){if(h0)return h0;async function t(){qn=await T5e(async n=>{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),N5e(r)?r=await r.instantiator(n):R5e(r)?r=await r.default(n):(O5e(r)&&(r=r.data),L5e(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await M5e(r)(n):r=await j5e(r)(n):D5e(r)?r=await Tw(r)(n):r instanceof WebAssembly.Module?r=await Tw(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await Tw(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return h0=t(),h0}function Tw(e){return t=>WebAssembly.instantiate(e,t)}function M5e(e){return t=>WebAssembly.instantiateStreaming(e,t)}function j5e(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}async function F5e(e){return e&&await $5e(e),{createScanner(t){return new P5e(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new iq(t)}}}const B5e=y5e({langs:sq,themes:w5e,engine:()=>F5e(x(()=>import("./wasm-Ck_ssClF.js"),[]))}),c$=4294967295;class z5e{constructor(t,n={}){this.patterns=t,this.options=n;const{forgiving:r=!1,cache:s,regexConstructor:i}=n;if(!i)throw new Error("Option `regexConstructor` is not provided");this.regexps=t.map(a=>{if(typeof a!="string")return a;const o=s?.get(a);if(o){if(o instanceof RegExp)return o;if(r)return null;throw o}try{const c=i(a);return s?.set(a,c),c}catch(c){if(s?.set(a,c),r)return null;throw c}})}regexps;findNextMatchSync(t,n,r){const s=typeof t=="string"?t:t.content,i=[];function a(o,c,u=0){return{index:o,captureIndices:c.indices.map(l=>l==null?{start:c$,end:c$,length:0}:{start:l[0]+u,end:l[1]+u,length:l[1]-l[0]})}}for(let o=0;o<this.regexps.length;o++){const c=this.regexps[o];if(c)try{c.lastIndex=n;const u=c.exec(s);if(!u)continue;if(u.index===n)return a(o,u,0);i.push([o,u,0])}catch(u){if(this.options.forgiving)continue;throw u}}if(i.length){const o=Math.min(...i.map(c=>c[1].index));for(const[c,u,l]of i)if(u.index===o)return a(c,u,l)}return null}}function U5e(e,t){return X9(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function V5e(e={}){const t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||=n=>U5e(n,{target:t.target}),{createScanner(n){return new z5e(n,t)},createString(n){return{content:n}}}}var H5e=V5e({forgiving:!0}),q5e=Object.fromEntries(d2.flatMap(e=>{var t;return((t=e.aliases)!=null?t:[]).map(n=>[n,e.id])})),mx=new Set(Object.keys(sq)),u$=e=>{let t=e.trim().toLowerCase();return q5e[t]||(mx.has(t),t)},Iw=new Map,Aw=new Map,dl=new Map,Xy=e=>{var t;return typeof e=="string"?e:(t=e.name)!=null?t:"custom"},G5e=(e,t)=>`${e}-${Xy(t[0])}-${Xy(t[1])}`,K5e=(e,t,n)=>{let r=e.slice(0,100),s=e.length>100?e.slice(-100):"";return`${t}:${n[0]}:${n[1]}:${e.length}:${r}:${s}`},W5e=(e,t)=>{let n=G5e(e,t);if(Iw.has(n))return Iw.get(n);let r=B5e({themes:t,langs:[e],engine:H5e});return Iw.set(n,r),r};function aq(e={}){var t;let n=(t=e.themes)!=null?t:["github-light","github-dark"];return{name:"shiki",type:"code-highlighter",supportsLanguage(r){let s=u$(r);return mx.has(s)},getSupportedLanguages(){return Array.from(mx)},getThemes(){return n},highlight({code:r,language:s,themes:i},a){let o=u$(s),c=[Xy(i[0]),Xy(i[1])],u=K5e(r,o,c);return Aw.has(u)?Aw.get(u):(a&&(dl.has(u)||dl.set(u,new Set),dl.get(u).add(a)),W5e(o,i).then(l=>{let d=l.getLoadedLanguages().includes(o)?o:"text",f=l.codeToTokens(r,{lang:d,themes:{light:c[0],dark:c[1]}});Aw.set(u,f);let h=dl.get(u);if(h){for(let m of h)m(f);dl.delete(u)}}).catch(l=>{console.error("[Streamdown Code] Failed to highlight code:",l),dl.delete(u)}),null)}}}aq();const J5e=aq({themes:["vitesse-dark","vitesse-dark"]}),l$=["text-[13px] leading-relaxed text-muted-foreground","[&_p]:mb-[0.4em] [&_p:last-child]:mb-0","[&_strong]:text-foreground [&_strong]:font-semibold","[&_b]:text-foreground [&_b]:font-semibold","[&_code]:font-mono [&_code]:text-xs [&_code]:bg-muted [&_code]:border [&_code]:border-border","[&_code]:rounded-sm [&_code]:px-1.5 [&_code]:py-px [&_code]:text-primary","[&_pre]:bg-muted [&_pre]:border [&_pre]:border-border [&_pre]:rounded-md","[&_pre]:px-3 [&_pre]:py-2 [&_pre]:overflow-x-auto [&_pre]:my-2 [&_pre]:text-xs [&_pre]:leading-relaxed","[&_pre_code]:bg-transparent [&_pre_code]:border-0 [&_pre_code]:p-0 [&_pre_code]:text-inherit","[&_a]:text-primary [&_a]:underline [&_a]:underline-offset-2","[&_a]:decoration-primary/30 hover:[&_a]:decoration-primary/80","[&_ul]:pl-5 [&_ul]:my-1.5 [&_ol]:pl-5 [&_ol]:my-1.5","[&_li]:mb-0.5 [&_li_::marker]:text-muted-foreground","[&_table]:w-full [&_table]:border-collapse [&_table]:text-xs [&_table]:my-2","[&_th]:border [&_th]:border-border [&_th]:px-2 [&_th]:py-1 [&_th]:text-left [&_th]:bg-muted [&_th]:font-semibold [&_th]:text-foreground","[&_td]:border [&_td]:border-border [&_td]:px-2 [&_td]:py-1 [&_td]:text-left [&_td]:bg-background","[&_h1]:font-semibold [&_h1]:text-foreground [&_h1]:mt-2 [&_h1]:mb-1 [&_h1]:text-[15px]","[&_h2]:font-semibold [&_h2]:text-foreground [&_h2]:mt-2 [&_h2]:mb-1 [&_h2]:text-sm","[&_h3]:font-semibold [&_h3]:text-foreground [&_h3]:mt-2 [&_h3]:mb-1 [&_h3]:text-[13px]","[&_h4]:font-semibold [&_h4]:text-foreground [&_h4]:mt-2 [&_h4]:mb-1 [&_h4]:text-[13px]","[&_blockquote]:border-l-2 [&_blockquote]:border-border [&_blockquote]:pl-3 [&_blockquote]:my-1.5 [&_blockquote]:text-muted-foreground","[&_hr]:border-0 [&_hr]:border-t [&_hr]:border-border [&_hr]:my-2","[&_img]:max-w-full [&_img]:rounded"].join(" ");function Y5e(e){return b.jsx("div",{className:e.className?`${l$} ${e.className}`:l$,children:b.jsx(G7,{plugins:{code:J5e},controls:{code:!0},linkSafety:{enabled:!1},children:e.children})})}const Q5e=[{id:"model",label:"Tools"},{id:"discover",label:"Search"}];function X5e(e){const{sourceId:t,search:n,navigate:r}=e,s=Uwe(t),i=n.tool??(s.status==="ready"?s.data.tools[0]?.path:void 0),a=Vwe(t,n.tab==="model"?i??null:null),o=Hwe({sourceId:t,query:n.query??"",limit:12});return O.useEffect(()=>{if(n.tab!=="model"||n.tool||s.status!=="ready")return;const c=s.data.tools[0]?.path;c&&r({search:u=>({...u,tool:c}),replace:!0})},[s,r,n.tab,n.tool]),b.jsx(Fu,{loadable:s,loading:"Loading source...",children:c=>{const u=c.tools.find(l=>l.path===i)??c.tools[0]??null;return b.jsxs("div",{className:"flex h-full flex-col overflow-hidden",children:[b.jsxs("div",{className:"flex shrink-0 items-center justify-between border-b border-border bg-background/95 backdrop-blur-sm px-4 h-12",children:[b.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[b.jsx("h2",{className:"truncate text-sm font-semibold text-foreground",children:c.source.name}),b.jsx(hi,{variant:"outline",children:c.source.kind}),b.jsxs("span",{className:"hidden text-[11px] tabular-nums text-muted-foreground/50 sm:block",children:[c.toolCount," ",c.toolCount===1?"tool":"tools"]})]}),b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("div",{className:"flex items-center gap-0.5 rounded-lg bg-muted/50 p-0.5",children:Q5e.map(l=>b.jsx("button",{type:"button",onClick:()=>{r({search:d=>({...d,tab:l.id})})},className:qe("rounded-md px-3 py-1 text-[12px] font-medium transition-colors",l.id===n.tab?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:l.label},l.id))}),b.jsxs($r,{to:"/sources/$sourceId/edit",params:{sourceId:t},className:"inline-flex items-center gap-1.5 rounded-md border border-border bg-card px-2.5 py-1 text-[12px] font-medium text-muted-foreground transition-colors hover:text-foreground hover:bg-accent/50",children:[b.jsx(YA,{className:"size-3"}),"Edit"]})]})]}),b.jsxs("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:[n.tab==="model"&&b.jsx(Z5e,{bundle:c,detail:a,selectedToolPath:u?.path??null,onSelectTool:l=>{r({search:d=>({...d,tool:l,tab:"model"})})},sourceId:t}),n.tab==="discover"&&b.jsx(rFe,{bundle:c,discovery:o,initialQuery:n.query??"",onSubmitQuery:l=>{r({search:d=>({...d,query:l,tab:"discover"})})},onOpenTool:l=>{r({search:d=>({...d,tab:"model",tool:l})})}}),n.tab==="manifest"&&b.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:b.jsx(va,{title:"Manifest",body:c.manifestJson,empty:"No manifest available."})}),n.tab==="definitions"&&b.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:b.jsx(va,{title:"Definitions",body:c.definitionsJson,empty:"No definitions available."})}),n.tab==="raw"&&b.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:b.jsx(va,{title:"Raw document",body:c.rawDocumentText,empty:"No raw document."})})]})]})}})}function Z5e(e){const[t,n]=O.useState(""),r=O.useRef(null),s=t.trim().toLowerCase().split(/\s+/).filter(Boolean),i=e.bundle.tools.filter(a=>{if(s.length===0)return!0;const o=[a.path,a.description??"",a.title??"",a.method??""].join(" ").toLowerCase();return s.every(c=>o.includes(c))});return O.useEffect(()=>{const a=o=>{o.key==="/"&&document.activeElement?.tagName!=="INPUT"&&(o.preventDefault(),r.current?.focus()),o.key==="Escape"&&(r.current?.blur(),t.length>0&&n(""))};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[t]),b.jsxs(b.Fragment,{children:[b.jsxs("div",{className:"flex w-72 shrink-0 flex-col border-r border-border bg-card/30 lg:w-80 xl:w-[22rem]",children:[b.jsx("div",{className:"shrink-0 border-b border-border px-3 py-2",children:b.jsxs("div",{className:"relative",children:[b.jsx(bU,{className:"absolute left-2.5 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground/40"}),b.jsx("input",{ref:r,value:t,onChange:a=>n(a.target.value),placeholder:`Filter ${e.bundle.toolCount} tools…`,className:"h-8 w-full rounded-md border border-input bg-background pl-8 pr-8 text-[13px] outline-none transition-colors placeholder:text-muted-foreground/40 focus:border-ring focus:ring-1 focus:ring-ring/30"}),t.length>0?b.jsx("button",{type:"button",onClick:()=>n(""),className:"absolute right-2 top-1/2 -translate-y-1/2 rounded p-0.5 text-muted-foreground/40 hover:text-foreground",children:b.jsx(USe,{})}):b.jsx("kbd",{className:"absolute right-2.5 top-1/2 -translate-y-1/2 rounded border border-border bg-muted px-1 py-px text-[10px] text-muted-foreground/50",children:"/"})]})}),b.jsx("div",{className:"flex-1 overflow-y-auto",children:i.length===0?b.jsx("div",{className:"p-4 text-center text-[13px] text-muted-foreground/50",children:s.length>0?"No tools match your filter":"No tools available"}):b.jsx("div",{className:"p-1.5",children:b.jsx(tFe,{tools:i,selectedToolPath:e.selectedToolPath,onSelectTool:e.onSelectTool,search:t,isFiltered:s.length>0,sourceId:e.sourceId})})})]}),b.jsx("div",{className:"flex flex-1 flex-col min-w-0 overflow-hidden",children:b.jsx(Fu,{loadable:e.detail,loading:"Loading tool...",children:a=>a?b.jsx(nFe,{detail:a}):b.jsx(xv,{title:e.bundle.toolCount>0?"Select a tool":"No tools available",description:e.bundle.toolCount>0?"Choose from the list or press / to search":void 0})})})]})}function eFe(e){const t={segment:"",children:new Map};for(const n of e){const r=n.path.split(".");let s=t;for(const i of r)s.children.has(i)||s.children.set(i,{segment:i,children:new Map}),s=s.children.get(i);s.tool=n}return t}function tFe(e){const t=O.useMemo(()=>eFe(e.tools),[e.tools]),n=qwe(),r=[...t.children.values()].sort((s,i)=>s.segment.localeCompare(i.segment));return b.jsx("div",{className:"flex flex-col gap-px",children:r.map(s=>b.jsx(oq,{node:s,depth:0,selectedToolPath:e.selectedToolPath,onSelectTool:e.onSelectTool,search:e.search,defaultOpen:e.isFiltered,sourceId:e.sourceId,prefetch:n},s.segment))})}function oq(e){const{node:t,depth:n,selectedToolPath:r,onSelectTool:s,search:i,defaultOpen:a,sourceId:o,prefetch:c}=e,u=t.children.size>0,l=!!t.tool&&!u,d=O.useMemo(()=>{if(!r)return!1;function p(_){if(_.tool?.path===r)return!0;for(const k of _.children.values())if(p(k))return!0;return!1}return p(t)},[t,r]),[f,h]=O.useState(a||d);if(O.useEffect(()=>{(a||d)&&h(!0)},[a,d]),l)return b.jsx(d$,{tool:t.tool,active:t.tool.path===r,onSelect:()=>s(t.tool.path),search:i,depth:n,sourceId:o,prefetch:c});const m=8+n*16,y=[...t.children.values()].sort((p,_)=>p.segment.localeCompare(_.segment)),g=cq(t);return b.jsxs("div",{children:[t.tool?b.jsxs("div",{className:"flex items-center",children:[b.jsx("button",{type:"button",onClick:()=>h(p=>!p),className:"shrink-0 rounded p-0.5 text-muted-foreground/30 hover:text-muted-foreground",style:{marginLeft:m},children:b.jsx(kL,{className:qe("size-2.5 transition-transform duration-150",f&&"rotate-90")})}),b.jsx(d$,{tool:t.tool,active:t.tool.path===r,onSelect:()=>s(t.tool.path),search:i,depth:-1,className:"flex-1 pl-1",sourceId:o,prefetch:c})]}):b.jsxs("button",{type:"button",onClick:()=>h(p=>!p),className:qe("group flex w-full items-center gap-1.5 rounded-md py-1 pr-2.5 text-[12px] transition-colors hover:bg-accent/40",f?"text-foreground/80":"text-muted-foreground/60"),style:{paddingLeft:m},children:[b.jsx(kL,{className:qe("size-2.5 shrink-0 text-muted-foreground/30 transition-transform duration-150",f&&"rotate-90")}),b.jsx(BSe,{className:qe("size-3 shrink-0",f?"text-primary/60":"text-muted-foreground/30")}),b.jsx("span",{className:"flex-1 truncate text-left font-mono",children:uq(t.segment,i)}),b.jsx("span",{className:"shrink-0 tabular-nums text-[10px] text-muted-foreground/25",children:g})]}),f&&u&&b.jsxs("div",{className:"relative flex flex-col gap-px",children:[b.jsx("span",{className:"absolute top-0 bottom-1 w-px bg-border/40",style:{left:m+5},"aria-hidden":!0}),y.map(p=>b.jsx(oq,{node:p,depth:n+1,selectedToolPath:r,onSelectTool:s,search:i,defaultOpen:a,sourceId:o,prefetch:c},p.segment))]})]})}function cq(e){let t=e.tool?1:0;for(const n of e.children.values())t+=cq(n);return t}function d$(e){const t=O.useRef(null),n=e.depth>=0?8+e.depth*16+8:void 0,r=O.useRef(!1);O.useEffect(()=>{e.active&&t.current&&t.current.scrollIntoView({block:"nearest"})},[e.active]),O.useEffect(()=>{const i=t.current;if(!i||r.current)return;const a=new IntersectionObserver(o=>{o[0]?.isIntersecting&&!r.current&&(r.current=!0,e.prefetch(e.sourceId,e.tool.path),a.disconnect())},{threshold:0});return a.observe(i),()=>a.disconnect()},[e.prefetch,e.sourceId,e.tool.path]);const s=e.depth>=0?e.tool.path.split(".").pop()??e.tool.path:e.tool.path;return b.jsxs("button",{ref:t,type:"button",onClick:e.onSelect,className:qe("group flex w-full items-center gap-2 rounded-md py-1.5 pr-2.5 text-left transition-colors",e.active?"bg-primary/10 text-foreground border-l-2 border-l-primary":"hover:bg-accent/50 text-foreground/70 hover:text-foreground",e.className),style:n!=null?{paddingLeft:n}:void 0,children:[b.jsx(gU,{className:"size-3 shrink-0 text-muted-foreground/40"}),b.jsx("span",{className:"flex-1 truncate font-mono text-[12px]",children:uq(s,e.search)}),e.tool.method&&b.jsx(rV,{method:e.tool.method})]})}function nFe(e){const{detail:t}=e,[n,r]=O.useState(null),s=O.useCallback((i,a)=>{navigator.clipboard.writeText(i).then(()=>{r(a),setTimeout(()=>r(null),1500)})},[]);return b.jsxs("div",{className:"flex h-full flex-col overflow-hidden",children:[b.jsx("div",{className:"shrink-0 border-b border-border bg-background/95 backdrop-blur-sm",children:b.jsxs("div",{className:"flex items-start gap-3 px-5 py-3.5",children:[b.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary",children:b.jsx(gU,{className:"size-4"})}),b.jsxs("div",{className:"min-w-0 flex-1",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("h3",{className:"truncate text-sm font-semibold text-foreground",children:t.summary.path}),b.jsx(sFe,{text:t.summary.path,field:"path",copiedField:n,onCopy:s})]}),b.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-1.5",children:[t.summary.method&&b.jsx(rV,{method:t.summary.method}),t.summary.pathTemplate&&b.jsx("span",{className:"font-mono text-[11px] text-muted-foreground/60",children:t.summary.pathTemplate})]})]})]})}),b.jsx("div",{className:"flex-1 overflow-y-auto",children:b.jsxs("div",{className:"px-5 py-4 space-y-4",children:[t.summary.description&&b.jsx(Y5e,{children:t.summary.description}),b.jsxs("div",{className:"grid grid-cols-1 gap-3 xl:grid-cols-2",children:[b.jsx(va,{title:"Input",body:t.summary.inputType??null,lang:"typescript",empty:"No input."}),b.jsx(va,{title:"Output",body:t.summary.outputType??null,lang:"typescript",empty:"No output."})]}),b.jsxs("div",{className:"grid grid-cols-1 gap-2 xl:grid-cols-2",children:[b.jsx(va,{title:"Input schema",body:t.inputSchemaJson,empty:"No input schema.",compact:!0}),b.jsx(va,{title:"Output schema",body:t.outputSchemaJson,empty:"No output schema.",compact:!0}),t.exampleInputJson&&b.jsx(va,{title:"Example request",body:t.exampleInputJson,empty:"",compact:!0}),t.exampleOutputJson&&b.jsx(va,{title:"Example response",body:t.exampleOutputJson,empty:"",compact:!0})]})]})})]})}function rFe(e){const[t,n]=O.useState(e.initialQuery);return O.useEffect(()=>{n(e.initialQuery)},[e.initialQuery]),b.jsxs("div",{className:"flex flex-1 flex-col overflow-hidden",children:[b.jsx("div",{className:"shrink-0 border-b border-border px-4 py-3",children:b.jsxs("form",{className:"flex items-center gap-2 max-w-2xl",onSubmit:r=>{r.preventDefault(),e.onSubmitQuery(t.trim())},children:[b.jsxs("div",{className:"relative flex-1",children:[b.jsx(bU,{className:"absolute left-3 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground/40"}),b.jsx("input",{value:t,onChange:r=>n(r.target.value),placeholder:"Search tools\\u2026",className:"h-9 w-full rounded-md border border-input bg-background pl-9 pr-3 text-sm outline-none transition-colors placeholder:text-muted-foreground/40 focus:border-ring focus:ring-1 focus:ring-ring/30"})]}),b.jsx($n,{type:"submit",size:"sm",children:"Search"})]})}),b.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:b.jsx(Fu,{loadable:e.discovery,loading:"Searching\\u2026",children:r=>r.query.length===0?b.jsx(xv,{title:"Search your tools",description:"Type a query to find matching tools across this source."}):r.results.length===0?b.jsx(xv,{title:"No results",description:"Try different search terms."}):b.jsx("div",{className:"max-w-3xl space-y-2",children:r.results.map((s,i)=>b.jsxs("button",{type:"button",onClick:()=>e.onOpenTool(s.path),className:"group w-full rounded-lg border border-border bg-card/60 p-3.5 text-left transition-all hover:border-primary/30 hover:shadow-sm",children:[b.jsxs("div",{className:"flex items-center justify-between gap-3 mb-1.5",children:[b.jsxs("div",{className:"flex items-center gap-2.5 min-w-0",children:[b.jsx("span",{className:"flex size-5 shrink-0 items-center justify-center rounded-md bg-muted text-[10px] font-mono tabular-nums text-muted-foreground/60",children:i+1}),b.jsx("h4",{className:"truncate font-mono text-[13px] font-medium text-foreground group-hover:text-primary transition-colors",children:s.path})]}),b.jsx("span",{className:"shrink-0 font-mono text-xs tabular-nums text-muted-foreground/50",children:s.score.toFixed(2)})]}),s.description&&b.jsx("p",{className:"text-[12px] text-muted-foreground leading-relaxed line-clamp-2",children:s.description})]},s.path))})})})]})}function sFe(e){return b.jsx("button",{type:"button",onClick:()=>e.onCopy(e.text,e.field),className:"shrink-0 rounded p-1 text-muted-foreground/30 transition-colors hover:text-muted-foreground",title:`Copy ${e.field}`,children:e.copiedField===e.field?b.jsx(JA,{}):b.jsx(yU,{})})}function uq(e,t){if(!t.trim())return e;const n=t.trim().toLowerCase().split(/\s+/),r=e.toLowerCase(),s=[];for(const c of n){let u=0;for(;u<r.length;){const l=r.indexOf(c,u);if(l===-1)break;s.push([l,l+c.length]),u=l+1}}if(s.length===0)return e;s.sort((c,u)=>c[0]-u[0]);const i=[s[0]];for(let c=1;c<s.length;c++){const u=i[i.length-1],l=s[c];l[0]<=u[1]?u[1]=Math.max(u[1],l[1]):i.push(l)}const a=[];let o=0;for(const[c,u]of i)o<c&&a.push({text:e.slice(o,c),hl:!1}),a.push({text:e.slice(c,u),hl:!0}),o=u;return o<e.length&&a.push({text:e.slice(o),hl:!1}),b.jsx(b.Fragment,{children:a.map((c,u)=>c.hl?b.jsx("mark",{className:"rounded-sm bg-primary/20 text-foreground px-px",children:c.text},u):b.jsx("span",{children:c.text},u))})}function iFe(){const e=VA(),[t,n]=O.useState(!1),[r,s]=O.useState(null);return b.jsx("div",{className:"flex-1 overflow-y-auto",children:b.jsxs("div",{className:"mx-auto max-w-3xl px-6 py-10 lg:px-10 lg:py-14",children:[b.jsxs("div",{className:"flex items-end justify-between mb-8",children:[b.jsxs("div",{children:[b.jsx("h1",{className:"font-display text-3xl tracking-tight text-foreground lg:text-4xl",children:"Secrets"}),b.jsx("p",{className:"mt-1.5 text-[14px] text-muted-foreground",children:"Tokens and credentials stored in this instance."})]}),b.jsxs($n,{size:"sm",onClick:()=>{n(!0),s(null)},children:[b.jsx(qo,{className:"size-3.5"}),"Add secret"]})]}),t&&b.jsx(oFe,{onClose:()=>n(!1),className:"mb-6"}),b.jsx(Fu,{loadable:e,loading:"Loading secrets...",children:i=>i.length===0&&!t?b.jsx(aFe,{onAdd:()=>n(!0)}):b.jsxs("div",{className:"rounded-xl border border-border bg-card/80 divide-y divide-border overflow-hidden",children:[i.map(a=>b.jsx(cFe,{secret:a,isEditing:r===a.id,onEdit:()=>s(r===a.id?null:a.id),onCancelEdit:()=>s(null)},a.id)),i.length===0&&b.jsx("div",{className:"px-5 py-8 text-center text-[13px] text-muted-foreground/60",children:"No secrets yet. Add one above."})]})})]})})}function aFe(e){return b.jsxs("div",{className:"flex flex-col items-center justify-center rounded-2xl border border-dashed border-border py-20",children:[b.jsx("div",{className:"flex size-12 items-center justify-center rounded-2xl bg-muted text-muted-foreground mb-4",children:b.jsx(lq,{className:"size-5"})}),b.jsx("p",{className:"text-[14px] font-medium text-foreground/70 mb-1",children:"No secrets stored"}),b.jsx("p",{className:"text-[13px] text-muted-foreground/60 mb-5",children:"Secrets let you securely provide tokens for source authentication."}),b.jsxs($n,{size:"sm",onClick:e.onAdd,children:[b.jsx(qo,{className:"size-3.5"}),"Add secret"]})]})}function oFe(e){const t=qA(),[n,r]=O.useState(""),[s,i]=O.useState(""),[a,o]=O.useState(null),c=async()=>{o(null);const u=n.trim();if(!u){o("Name is required.");return}if(!s){o("Value is required.");return}try{await t.mutateAsync({name:u,value:s}),e.onClose()}catch(l){o(l instanceof Error?l.message:"Failed creating secret.")}};return b.jsxs("div",{className:qe("rounded-xl border border-primary/20 bg-card/80",e.className),children:[b.jsxs("div",{className:"border-b border-border px-5 py-3 flex items-center justify-between",children:[b.jsx("h2",{className:"text-sm font-semibold text-foreground",children:"New secret"}),b.jsx("button",{type:"button",onClick:e.onClose,className:"text-[12px] text-muted-foreground hover:text-foreground transition-colors",children:"Cancel"})]}),b.jsxs("div",{className:"p-5 space-y-4",children:[a&&b.jsx("div",{className:"rounded-lg border border-destructive/30 bg-destructive/8 px-4 py-2.5 text-[13px] text-destructive",children:a}),b.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[b.jsx(Zy,{label:"Name",children:b.jsx("input",{value:n,onChange:u=>r(u.target.value),placeholder:"GitHub PAT",className:"h-9 w-full rounded-lg border border-input bg-background px-3 text-[13px] text-foreground outline-none transition-colors placeholder:text-muted-foreground/35 focus:border-ring focus:ring-1 focus:ring-ring/25",autoFocus:!0})}),b.jsx(Zy,{label:"Value",children:b.jsx("input",{type:"password",value:s,onChange:u=>i(u.target.value),placeholder:"ghp_...",className:"h-9 w-full rounded-lg border border-input bg-background px-3 font-mono text-[12px] text-foreground outline-none transition-colors placeholder:text-muted-foreground/35 focus:border-ring focus:ring-1 focus:ring-ring/25"})})]}),b.jsx("div",{className:"flex justify-end",children:b.jsxs($n,{size:"sm",onClick:c,disabled:t.status==="pending",children:[t.status==="pending"?b.jsx(Yi,{className:"size-3.5"}):b.jsx(qo,{className:"size-3.5"}),"Store secret"]})})]})]})}function cFe(e){const{secret:t,isEditing:n}=e,r=Bwe(),[s,i]=O.useState(!1),a=async()=>{if(window.confirm(`Delete "${t.name||t.id}"? This cannot be undone. Sources using this secret will lose access.`)){i(!0);try{await r.mutateAsync(t.id)}catch{}finally{i(!1)}}},o=new Date(t.createdAt).toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"});return b.jsxs("div",{className:"px-5 py-3.5",children:[b.jsxs("div",{className:"flex items-center justify-between gap-4",children:[b.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[b.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-primary/8 text-primary",children:b.jsx(lq,{className:"size-3.5"})}),b.jsxs("div",{className:"min-w-0",children:[b.jsxs("div",{className:"flex items-center gap-2",children:[b.jsx("span",{className:"text-[13px] font-medium text-foreground truncate",children:t.name||"Unnamed secret"}),b.jsx(hi,{variant:"outline",className:"text-[9px] shrink-0",children:t.purpose.replace(/_/g," ")})]}),b.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[b.jsx("span",{className:"text-[11px] font-mono text-muted-foreground/50 truncate",children:t.id}),b.jsx("span",{className:"text-[11px] text-muted-foreground/40",children:o})]}),t.linkedSources.length>0&&b.jsxs("div",{className:"flex items-center gap-1.5 mt-1 flex-wrap",children:[b.jsx("span",{className:"text-[10px] text-muted-foreground/50",children:"Used by"}),t.linkedSources.map(c=>b.jsx($r,{to:"/sources/$sourceId",params:{sourceId:c.sourceId},search:{tab:"model"},className:"inline-flex items-center gap-1 rounded-md bg-accent/60 px-1.5 py-0.5 text-[10px] font-medium text-foreground/70 transition-colors hover:bg-accent hover:text-foreground",children:c.sourceName},c.sourceId))]})]})]}),b.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[b.jsxs("button",{type:"button",onClick:e.onEdit,className:qe("inline-flex items-center gap-1 rounded-md px-2 py-1.5 text-[11px] font-medium transition-colors",n?"bg-primary/10 text-primary":"text-muted-foreground hover:text-foreground hover:bg-accent/50"),children:[b.jsx(YA,{className:"size-3"}),"Edit"]}),b.jsxs("button",{type:"button",onClick:a,disabled:s,className:"inline-flex items-center gap-1 rounded-md px-2 py-1.5 text-[11px] font-medium text-muted-foreground transition-colors hover:text-destructive hover:bg-destructive/8 disabled:opacity-50",children:[s?b.jsx(Yi,{className:"size-3"}):b.jsx(_U,{className:"size-3"}),"Delete"]})]})]}),n&&b.jsx(uFe,{secret:t,onClose:e.onCancelEdit})]})}function uFe(e){const t=Fwe(),[n,r]=O.useState(e.secret.name??""),[s,i]=O.useState(""),[a,o]=O.useState(null),c=async()=>{o(null);const u={},l=n.trim();if(l&&l!==(e.secret.name??"")&&(u.name=l),s.length>0&&(u.value=s),Object.keys(u).length===0){e.onClose();return}try{await t.mutateAsync({secretId:e.secret.id,payload:u}),e.onClose()}catch(d){o(d instanceof Error?d.message:"Failed updating secret.")}};return b.jsxs("div",{className:"mt-3 pt-3 border-t border-border/50",children:[a&&b.jsx("div",{className:"rounded-lg border border-destructive/30 bg-destructive/8 px-4 py-2.5 text-[13px] text-destructive mb-3",children:a}),b.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[b.jsx(Zy,{label:"Name",children:b.jsx("input",{value:n,onChange:u=>r(u.target.value),placeholder:"Secret name",className:"h-8 w-full rounded-lg border border-input bg-background px-3 text-[12px] text-foreground outline-none transition-colors placeholder:text-muted-foreground/35 focus:border-ring focus:ring-1 focus:ring-ring/25",autoFocus:!0})}),b.jsx(Zy,{label:"New value (leave empty to keep current)",children:b.jsx("input",{type:"password",value:s,onChange:u=>i(u.target.value),placeholder:"Leave empty to keep existing",className:"h-8 w-full rounded-lg border border-input bg-background px-3 font-mono text-[11px] text-foreground outline-none transition-colors placeholder:text-muted-foreground/35 focus:border-ring focus:ring-1 focus:ring-ring/25"})})]}),b.jsxs("div",{className:"flex items-center justify-end gap-2 mt-3",children:[b.jsx("button",{type:"button",onClick:e.onClose,className:"rounded-md px-3 py-1.5 text-[12px] font-medium text-muted-foreground transition-colors hover:text-foreground",children:"Cancel"}),b.jsxs($n,{size:"sm",onClick:c,disabled:t.status==="pending",children:[t.status==="pending"&&b.jsx(Yi,{className:"size-3"}),"Save"]})]})]})}function Zy(e){return b.jsxs("label",{className:"block space-y-1",children:[b.jsx("span",{className:"text-[11px] font-medium text-muted-foreground",children:e.label}),e.children]})}function lq(e){return b.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",className:qe("size-4",e.className),children:[b.jsx("path",{d:"M10 6a4 4 0 10-4.9 3.9L2 13v1.5h2V13h1.5v-1.5H7l.6-.6A4 4 0 0010 6z",stroke:"currentColor",strokeWidth:"1.3",strokeLinejoin:"round"}),b.jsx("circle",{cx:"10.5",cy:"5.5",r:"1",fill:"currentColor"})]})}const lFe=["mcp","openapi","graphql"],dFe=["auto","streamable-http","sse"],fFe=["none","bearer","oauth2"],hFe=["none","bearer","basic","headers"],mFe=2*6e4,dq="executor:oauth-result:",xa=e=>{const t=e.trim();return t.length>0?t:null},e_=e=>{try{const t=xU(e);if(!t)return"";const n=t.indexOf(".");return n>0?t.slice(0,n):t}catch{return""}},px=(e,t)=>{const n=t.trim();if(n.length===0)return null;let r;try{r=JSON.parse(n)}catch{throw new Error(`${e} must be valid JSON.`)}if(r===null||Array.isArray(r)||typeof r!="object")throw new Error(`${e} must be a JSON object with string values.`);const s=Object.entries(r),i={};for(const[a,o]of s){if(typeof o!="string")throw new Error(`${e} must only contain string values.`);i[a]=o}return Object.keys(i).length===0?null:i},ih=e=>{if(!e||e.detectedKind==="unknown")return{kind:"openapi",endpoint:e?.endpoint??"",specUrl:e?.specUrl??"",name:e?.name??"",namespace:e?.namespace||e_(e?.endpoint??""),transport:"",authKind:"none",authHeaderName:"Authorization",authPrefix:"Bearer ",bearerToken:"",bearerProviderId:"",bearerHandle:"",queryParamsText:"",headersText:""};const t=e.detectedKind,n=e.authInference;let r="none",s="Authorization",i="Bearer ";return n.supported&&(n.suggestedKind==="bearer"||n.suggestedKind==="apiKey"?(r="bearer",s=n.headerName??"Authorization",i=n.prefix??"Bearer "):n.suggestedKind==="oauth2"?(r="oauth2",s=n.headerName??"Authorization",i=n.prefix??"Bearer "):n.suggestedKind==="basic"&&(r="bearer",s="Authorization",i="Basic ")),{kind:t,endpoint:e.endpoint,specUrl:e.specUrl??"",name:e.name??"",namespace:e.namespace||e_(e.endpoint),transport:t==="mcp"?e.transport??"auto":"",authKind:r,authHeaderName:s,authPrefix:i,bearerToken:"",bearerProviderId:"",bearerHandle:"",queryParamsText:"",headersText:""}},pFe=e=>({...ih(),kind:e.kind,endpoint:e.endpoint,specUrl:"specUrl"in e?e.specUrl:"",name:e.name,namespace:e_(e.endpoint),transport:e.kind==="mcp"?"auto":""}),gFe=e=>{if(e.kind==="none")return{kind:"none"};if(e.kind==="bearer"){if(!e.token.trim())throw new Error("Token is required for bearer probe auth.");return{kind:"bearer",headerName:xa(e.headerName),prefix:xa(e.prefix),token:e.token.trim()}}if(e.kind==="basic"){if(!e.username.trim())throw new Error("Username is required for basic probe auth.");return{kind:"basic",username:e.username.trim(),password:e.password}}const t=px("Probe headers",e.headersText);if(!t)throw new Error("At least one header is required for headers probe auth.");return{kind:"headers",headers:t}},bFe=e=>{const t=e.endpoint.trim();if(!t)throw new Error("Endpoint is required.");if(e.kind==="mcp")return{kind:"mcp",endpoint:t,name:xa(e.name),namespace:xa(e.namespace),transport:e.transport===""?"auto":e.transport,queryParams:px("Query params",e.queryParamsText),headers:px("Request headers",e.headersText)};const n=yFe(e);if(e.kind==="openapi"){const r=e.specUrl.trim();if(!r)throw new Error("OpenAPI sources require a spec URL.");return{kind:"openapi",endpoint:t,specUrl:r,name:xa(e.name),namespace:xa(e.namespace),auth:n}}return{kind:"graphql",endpoint:t,name:xa(e.name),namespace:xa(e.namespace),auth:n}},yFe=e=>{if(e.authKind==="none")return{kind:"none"};if(e.authKind==="bearer"){const t=xa(e.authHeaderName),n=e.authPrefix.length===0?null:e.authPrefix;if(e.bearerProviderId.trim()&&e.bearerHandle.trim())return{kind:"bearer",headerName:t,prefix:n,tokenRef:{providerId:e.bearerProviderId.trim(),handle:e.bearerHandle.trim()}};if(e.bearerToken.trim())return{kind:"bearer",headerName:t,prefix:n,token:e.bearerToken.trim()};throw new Error("Bearer auth requires a token. Select or create a secret, or enter a token directly.")}},f$=e=>{if(typeof window>"u")return null;const t=window.localStorage.getItem(`${dq}${e}`);if(!t)return null;try{return JSON.parse(t)}catch{return null}},h$=e=>{typeof window>"u"||window.localStorage.removeItem(`${dq}${e}`)},_Fe=async e=>{if(typeof window>"u")throw new Error("OAuth popup is only available in a browser context");h$(e.sessionId);const t=window.open(e.authorizationUrl,"executor-source-oauth","popup=yes,width=520,height=720");if(!t)throw new Error("Popup blocked. Allow popups and try again.");return t.focus(),await new Promise((n,r)=>{let s=!1,i=0,a=0;const o=()=>{window.removeEventListener("message",l),i&&window.clearInterval(i),a&&window.clearTimeout(a),t.closed||t.close(),h$(e.sessionId)},c=d=>{s||(s=!0,o(),r(new Error(d)))},u=d=>{if(!d.ok){c(d.error||"OAuth failed");return}s||(s=!0,o(),n(d.auth))},l=d=>{if(d.origin!==window.location.origin)return;const f=d.data;!f||f.type!=="executor:oauth-result"||f.ok&&f.sessionId!==e.sessionId||!f.ok&&f.sessionId!==null&&f.sessionId!==e.sessionId||u(f)};window.addEventListener("message",l),a=window.setTimeout(()=>{c("OAuth popup timed out before completion. Please try again.")},mFe),i=window.setInterval(()=>{const d=f$(e.sessionId);if(d){u(d);return}t.closed&&(window.clearInterval(i),i=0,window.setTimeout(()=>{const f=f$(e.sessionId);if(f){u(f);return}c("OAuth popup was closed before completion.")},1500))},300)})};function kFe(){const e=vd(),t=Jwe(),n=Ywe(),r=VA(),s=Xz();eU();const[i,a]=O.useState(""),[o,c]=O.useState(!1),[u,l]=O.useState({kind:"none",token:"",headerName:"Authorization",prefix:"Bearer ",username:"",password:"",headersText:""}),[d,f]=O.useState("idle"),[h,m]=O.useState(null),[y,g]=O.useState(ih()),[p,_]=O.useState(null),[k,v]=O.useState(null),[w,S]=O.useState(!1),[T,I]=O.useState(null),$=(M,K)=>{g(A=>({...A,[M]:K}))},R=(M,K)=>{l(A=>({...A,[M]:K}))},z=async()=>{I(null);const M=i.trim();if(!M){I({tone:"error",text:"Please enter a URL to discover."});return}f("discovering");try{const K={url:M,...o&&u.kind!=="none"?{probeAuth:gFe(u)}:{}},A=await t.mutateAsync(K);m(A),g(ih(A)),f("editing"),A.detectedKind==="unknown"?I({tone:"info",text:"Could not auto-detect the source type. Please configure manually."}):A.warnings.length>0&&I({tone:"info",text:A.warnings.join(" ")})}catch(K){f("idle"),I({tone:"error",text:K instanceof Error?K.message:"Discovery failed."})}},V=()=>{m(null),g(ih()),f("editing"),I(null)},H=async M=>{const K="specUrl"in M?M.specUrl:M.endpoint;a(M.endpoint),I(null),f("discovering");try{const A=await t.mutateAsync({url:K});m(A);const P=ih(A);P.name=M.name,P.endpoint=M.endpoint,P.namespace=e_(M.endpoint),"specUrl"in M&&(P.specUrl=M.specUrl),g(P),f("editing"),A.warnings.length>0&&I({tone:"info",text:A.warnings.join(" ")})}catch(A){m(null),g(pFe(M)),f("editing"),I({tone:"error",text:`Discovery failed for ${M.name}: ${A instanceof Error?A.message:"unknown error"}. Configure manually.`})}},G=async()=>{I(null);try{const M=bFe(y);f("connecting");const K=await n.mutateAsync(M);_(K),K.kind==="connected"?(f("connected"),I({tone:"success",text:`"${K.source.name}" connected successfully.`}),setTimeout(()=>{e({to:"/sources/$sourceId",params:{sourceId:K.source.id},search:{tab:"model"}})},1200)):K.kind==="credential_required"?(f("credential_required"),I({tone:"info",text:"This source requires credentials. Configure auth below, then connect again."}),y.authKind==="none"&&$("authKind","bearer")):K.kind==="oauth_required"&&(f("oauth_required"),v({source:K.source,sessionId:K.sessionId,authorizationUrl:K.authorizationUrl}),I({tone:"info",text:"This source requires OAuth authentication. Click the button below to sign in."}))}catch(M){f("editing"),I({tone:"error",text:M instanceof Error?M.message:"Connection failed."})}},Q=async()=>{if(k){I(null),S(!0);try{await _Fe({authorizationUrl:k.authorizationUrl,sessionId:k.sessionId}),s(),f("connected"),I({tone:"success",text:`"${k.source.name}" connected via OAuth.`}),setTimeout(()=>{e({to:"/sources/$sourceId",params:{sourceId:k.source.id},search:{tab:"model"}})},1200)}catch(M){I({tone:"error",text:M instanceof Error?M.message:"OAuth flow failed."})}finally{S(!1)}}},re=async()=>{await G()},me=()=>{f("editing"),I(null),_(null),v(null)},ke=d==="discovering",tt=d==="connecting",C=ke||tt||w;return b.jsx("div",{className:"flex-1 overflow-y-auto",children:b.jsxs("div",{className:"mx-auto max-w-3xl px-6 py-8 lg:px-10 lg:py-12",children:[b.jsxs($r,{to:"/",className:"inline-flex items-center gap-1.5 text-[12px] font-medium text-muted-foreground transition-colors hover:text-foreground mb-6",children:[b.jsx(kU,{className:"size-3.5"}),"Back"]}),b.jsxs("div",{className:"flex items-center justify-between gap-4 mb-6",children:[b.jsx("h1",{className:"font-display text-2xl tracking-tight text-foreground lg:text-3xl",children:"Add source"}),d==="editing"&&b.jsx(hi,{variant:"outline",children:y.kind}),d==="connected"&&b.jsx(hi,{variant:"default",children:"connected"})]}),T&&b.jsx(EFe,{state:T,className:"mb-6"}),(d==="idle"||d==="discovering")&&b.jsx(tV,{className:"mb-6 rounded-xl border border-border bg-card/80 p-5",title:"Install this executor as MCP",description:"Prefer a one-command setup? Install this local executor server into your MCP client, or add an external MCP source below."}),(d==="idle"||d==="discovering")&&b.jsx("div",{className:"space-y-6",children:b.jsx(fl,{title:"Discover",children:b.jsxs("div",{className:"space-y-4",children:[b.jsx("p",{className:"text-[13px] text-muted-foreground",children:"Enter a URL and we'll auto-detect the source type, endpoint, auth requirements, and more."}),b.jsx(gn,{label:"URL",children:b.jsxs("div",{className:"flex gap-2",children:[b.jsx("input",{value:i,onChange:M=>a(M.target.value),placeholder:"https://api.example.com or https://mcp.example.com/mcp",onKeyDown:M=>{M.key==="Enter"&&!ke&&z()},className:"h-9 flex-1 rounded-lg border border-input bg-background px-3 font-mono text-[12px] text-foreground outline-none transition-colors placeholder:text-muted-foreground/35 focus:border-ring focus:ring-1 focus:ring-ring/25"}),b.jsxs($n,{onClick:z,disabled:C,children:[ke?b.jsx(Yi,{className:"size-3.5"}):b.jsx(zSe,{className:"size-3.5"}),ke?"Discovering…":"Discover"]})]})}),b.jsx("div",{children:b.jsx("button",{type:"button",onClick:()=>c(!o),className:"text-[12px] font-medium text-muted-foreground transition-colors hover:text-foreground",children:o?"Hide probe auth":"Need auth to discover?"})}),o&&b.jsxs("div",{className:"rounded-lg border border-border bg-card/70 p-4 space-y-3",children:[b.jsx(gn,{label:"Auth type",children:b.jsx(m0,{value:u.kind,onChange:M=>R("kind",M),options:hFe.map(M=>({value:M,label:M}))})}),u.kind==="bearer"&&b.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[b.jsx(gn,{label:"Header name",children:b.jsx(Js,{value:u.headerName,onChange:M=>R("headerName",M),placeholder:"Authorization"})}),b.jsx(gn,{label:"Prefix",children:b.jsx(Js,{value:u.prefix,onChange:M=>R("prefix",M),placeholder:"Bearer "})}),b.jsx(gn,{label:"Token",className:"sm:col-span-2",children:b.jsx(Js,{value:u.token,onChange:M=>R("token",M),placeholder:"sk-...",mono:!0})})]}),u.kind==="basic"&&b.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[b.jsx(gn,{label:"Username",children:b.jsx(Js,{value:u.username,onChange:M=>R("username",M),placeholder:"user"})}),b.jsx(gn,{label:"Password",children:b.jsx(Js,{value:u.password,onChange:M=>R("password",M),placeholder:"pass"})})]}),u.kind==="headers"&&b.jsx(gn,{label:"Headers (JSON)",children:b.jsx(Cw,{value:u.headersText,onChange:M=>R("headersText",M),placeholder:`{
388
- "x-api-key": "..."
389
- }`})})]}),b.jsx("div",{className:"flex items-center justify-end border-t border-border pt-4",children:b.jsx("button",{type:"button",onClick:V,disabled:C,className:"text-[12px] font-medium text-muted-foreground transition-colors hover:text-foreground",children:"Skip discovery and configure manually"})}),b.jsxs("div",{className:"space-y-3 border-t border-border pt-4",children:[b.jsxs("div",{children:[b.jsx("p",{className:"text-[12px] font-medium text-foreground",children:"Start from a known source"}),b.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Load a real MCP, OpenAPI, or GraphQL template without running discovery first."})]}),b.jsx("div",{className:"grid gap-2 sm:grid-cols-2 lg:grid-cols-3",children:sV.map(M=>b.jsxs("button",{type:"button",onClick:()=>H(M),disabled:C,className:"rounded-xl border border-border bg-card/70 px-4 py-3 text-left transition-colors hover:bg-accent/50 disabled:opacity-60",children:[b.jsxs("div",{className:"mb-1 flex items-center justify-between gap-2",children:[b.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[b.jsx("div",{className:"flex size-4 shrink-0 items-center justify-center text-muted-foreground",children:b.jsx(H1,{endpoint:M.endpoint,kind:M.kind,className:"size-4"})}),b.jsx("span",{className:"truncate text-[13px] font-medium text-foreground",children:M.name})]}),b.jsx(hi,{variant:"outline",className:"text-[9px]",children:M.kind})]}),b.jsx("span",{className:"line-clamp-2 text-[11px] text-muted-foreground",children:M.summary})]},M.id))})]})]})})}),(d==="editing"||d==="connecting"||d==="credential_required")&&b.jsxs("div",{className:"space-y-6",children:[b.jsx(fl,{title:"Configuration",children:b.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[b.jsx(gn,{label:"Name",children:b.jsx(Js,{value:y.name,onChange:M=>$("name",M),placeholder:"My API"})}),b.jsx(gn,{label:"Kind",children:b.jsx(m0,{value:y.kind,onChange:M=>$("kind",M),options:lFe.map(M=>({value:M,label:M}))})}),b.jsx(gn,{label:"Endpoint",className:"sm:col-span-2",children:b.jsx(Js,{value:y.endpoint,onChange:M=>$("endpoint",M),placeholder:"https://api.example.com",mono:!0})}),b.jsx(gn,{label:"Namespace",children:b.jsx(Js,{value:y.namespace,onChange:M=>$("namespace",M),placeholder:"example"})}),y.kind==="openapi"&&b.jsx(gn,{label:"Spec URL",className:"sm:col-span-2",children:b.jsx(Js,{value:y.specUrl,onChange:M=>$("specUrl",M),placeholder:"https://example.com/openapi.yaml",mono:!0})})]})}),y.kind==="mcp"&&b.jsx(fl,{title:"Transport",children:b.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[b.jsx(gn,{label:"Transport mode",children:b.jsx(m0,{value:y.transport||"auto",onChange:M=>$("transport",M),options:dFe.map(M=>({value:M,label:M}))})}),b.jsxs("div",{className:"sm:col-span-2 grid gap-4 sm:grid-cols-2",children:[b.jsx(gn,{label:"Query params (JSON)",children:b.jsx(Cw,{value:y.queryParamsText,onChange:M=>$("queryParamsText",M),placeholder:`{
390
- "workspace": "demo"
391
- }`})}),b.jsx(gn,{label:"Headers (JSON)",children:b.jsx(Cw,{value:y.headersText,onChange:M=>$("headersText",M),placeholder:`{
392
- "x-api-key": "..."
393
- }`})})]})]})}),y.kind!=="mcp"&&b.jsx(fl,{title:"Authentication",children:b.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[b.jsx(gn,{label:"Auth mode",children:b.jsx(m0,{value:y.authKind,onChange:M=>$("authKind",M),options:fFe.map(M=>({value:M,label:M}))})}),y.authKind!=="none"&&b.jsxs(b.Fragment,{children:[b.jsx(gn,{label:"Header name",children:b.jsx(Js,{value:y.authHeaderName,onChange:M=>$("authHeaderName",M),placeholder:"Authorization"})}),b.jsx(gn,{label:"Prefix",children:b.jsx(Js,{value:y.authPrefix,onChange:M=>$("authPrefix",M),placeholder:"Bearer "})})]}),y.authKind==="bearer"&&b.jsx(gn,{label:"Token",className:"sm:col-span-2",children:b.jsx(wFe,{secrets:r,providerId:y.bearerProviderId,handle:y.bearerHandle,inlineToken:y.bearerToken,onSelectSecret:(M,K)=>{$("bearerProviderId",M),$("bearerHandle",K),$("bearerToken","")},onChangeToken:M=>{$("bearerToken",M),$("bearerProviderId",""),$("bearerHandle","")}})})]})}),b.jsxs("div",{className:"flex items-center justify-end gap-3 border-t border-border pt-5",children:[d==="credential_required"&&b.jsx($n,{variant:"ghost",type:"button",onClick:me,children:"Back to edit"}),b.jsx($r,{to:"/",className:"inline-flex",children:b.jsx($n,{variant:"ghost",type:"button",children:"Cancel"})}),b.jsxs($n,{onClick:d==="credential_required"?re:G,disabled:C,children:[tt?b.jsx(Yi,{className:"size-3.5"}):b.jsx(qo,{className:"size-3.5"}),tt?"Connecting…":"Connect"]})]})]}),d==="oauth_required"&&k&&b.jsx("div",{className:"space-y-6",children:b.jsx(fl,{title:"OAuth Authentication Required",children:b.jsxs("div",{className:"space-y-4",children:[b.jsxs("p",{className:"text-[13px] text-muted-foreground",children:["The source ",b.jsx("strong",{className:"text-foreground",children:k.source.name})," requires OAuth. Click the button below to open a popup and complete authentication."]}),b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsxs($n,{onClick:Q,disabled:w,children:[w?b.jsx(Yi,{className:"size-3.5"}):null,w?"Authenticating…":"Sign in with OAuth"]}),b.jsx($n,{variant:"ghost",onClick:me,children:"Back to edit"})]})]})})}),d==="connected"&&p&&b.jsx(fl,{title:"Connected",children:b.jsxs("div",{className:"flex items-center gap-3",children:[b.jsx("div",{className:"flex size-10 items-center justify-center rounded-full bg-primary/10 text-primary",children:b.jsx(JA,{className:"size-5"})}),b.jsxs("div",{children:[b.jsx("p",{className:"text-[14px] font-medium text-foreground",children:p.source.name}),b.jsx("p",{className:"text-[12px] text-muted-foreground",children:"Source connected. Redirecting..."})]})]})})]})})}function fl(e){return b.jsxs("section",{className:qe("rounded-xl border border-border bg-card/80",e.className),children:[b.jsx("div",{className:"border-b border-border px-5 py-3",children:b.jsx("h2",{className:"text-sm font-semibold text-foreground",children:e.title})}),b.jsx("div",{className:"p-5",children:e.children})]})}function gn(e){return b.jsxs("label",{className:qe("block space-y-1.5",e.className),children:[b.jsx("span",{className:"text-[12px] font-medium text-foreground",children:e.label}),e.children]})}function Js(e){return b.jsx("input",{value:e.value,onChange:t=>e.onChange(t.target.value),placeholder:e.placeholder,className:qe("h-9 w-full rounded-lg border border-input bg-background px-3 text-[13px] text-foreground outline-none transition-colors placeholder:text-muted-foreground/35 focus:border-ring focus:ring-1 focus:ring-ring/25",e.mono&&"font-mono text-[12px]")})}function m0(e){return b.jsx("select",{value:e.value,onChange:t=>e.onChange(t.target.value),className:"h-9 w-full rounded-lg border border-input bg-background px-3 text-[13px] text-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring/25",children:e.options.map(t=>b.jsx("option",{value:t.value,children:t.label},t.value))})}function Cw(e){return b.jsx("textarea",{value:e.value,onChange:t=>e.onChange(t.target.value),placeholder:e.placeholder,spellCheck:!1,className:"min-h-28 w-full rounded-lg border border-input bg-background px-3 py-2.5 font-mono text-[12px] leading-relaxed text-foreground outline-none transition-colors placeholder:text-muted-foreground/35 focus:border-ring focus:ring-1 focus:ring-ring/25"})}function EFe(e){return b.jsx("div",{className:qe("rounded-lg border px-4 py-3 text-[13px]",e.state.tone==="success"&&"border-primary/30 bg-primary/8 text-foreground",e.state.tone==="info"&&"border-border bg-card text-muted-foreground",e.state.tone==="error"&&"border-destructive/30 bg-destructive/8 text-destructive",e.className),children:e.state.text})}const Pw="__create_new__",Nw="__inline_token__";function wFe(e){const{secrets:t,providerId:n,handle:r,inlineToken:s,onSelectSecret:i,onChangeToken:a}=e,o=qA(),[c,u]=O.useState(!1),[l,d]=O.useState(!1),[f,h]=O.useState(""),[m,y]=O.useState(""),[g,p]=O.useState(null),_=c?Pw:l?Nw:r||"",k=S=>{if(S===Pw){u(!0),d(!1),h(""),y(""),p(null);return}if(S===Nw){d(!0),u(!1),i("","");return}if(S===""){d(!1),u(!1),i("","");return}d(!1),u(!1),i("postgres",S)},v=async()=>{p(null);const S=f.trim();if(!S){p("Name is required.");return}if(!m){p("Value is required.");return}try{const T=await o.mutateAsync({name:S,value:m});i(T.providerId,T.id),u(!1)}catch(T){p(T instanceof Error?T.message:"Failed creating secret.")}};if(t.status!=="ready")return b.jsx("select",{disabled:!0,className:"h-9 w-full rounded-lg border border-input bg-background px-3 text-[13px] text-muted-foreground outline-none opacity-60",children:b.jsx("option",{children:"Loading..."})});const w=t.data;return b.jsxs("div",{className:"space-y-2",children:[b.jsxs("select",{value:_,onChange:S=>k(S.target.value),className:"h-9 w-full rounded-lg border border-input bg-background px-3 text-[13px] text-foreground outline-none transition-colors focus:border-ring focus:ring-1 focus:ring-ring/25",children:[b.jsx("option",{value:"",children:"Select a secret..."}),w.map(S=>b.jsx("option",{value:S.id,children:S.name||S.id},S.id)),b.jsx("option",{value:Nw,children:"Paste token directly"}),b.jsx("option",{value:Pw,children:"+ Create new secret"})]}),l&&b.jsx("input",{type:"password",value:s,onChange:S=>a(S.target.value),placeholder:"sk-... or ghp_...",className:"h-9 w-full rounded-lg border border-input bg-background px-3 font-mono text-[12px] text-foreground outline-none transition-colors placeholder:text-muted-foreground/35 focus:border-ring focus:ring-1 focus:ring-ring/25",autoFocus:!0}),c&&b.jsxs("div",{className:"rounded-lg border border-primary/20 bg-card/80 p-3 space-y-3",children:[g&&b.jsx("div",{className:"rounded-md border border-destructive/30 bg-destructive/8 px-3 py-2 text-[12px] text-destructive",children:g}),b.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[b.jsxs("label",{className:"block space-y-1",children:[b.jsx("span",{className:"text-[11px] font-medium text-muted-foreground",children:"Name"}),b.jsx("input",{value:f,onChange:S=>h(S.target.value),placeholder:"API Key",className:"h-8 w-full rounded-lg border border-input bg-background px-3 text-[12px] text-foreground outline-none transition-colors placeholder:text-muted-foreground/35 focus:border-ring focus:ring-1 focus:ring-ring/25",autoFocus:!0})]}),b.jsxs("label",{className:"block space-y-1",children:[b.jsx("span",{className:"text-[11px] font-medium text-muted-foreground",children:"Value"}),b.jsx("input",{type:"password",value:m,onChange:S=>y(S.target.value),placeholder:"sk-...",className:"h-8 w-full rounded-lg border border-input bg-background px-3 font-mono text-[11px] text-foreground outline-none transition-colors placeholder:text-muted-foreground/35 focus:border-ring focus:ring-1 focus:ring-ring/25"})]})]}),b.jsxs("div",{className:"flex items-center justify-end gap-2",children:[b.jsx("button",{type:"button",onClick:()=>u(!1),className:"rounded-md px-2.5 py-1 text-[11px] font-medium text-muted-foreground transition-colors hover:text-foreground",children:"Cancel"}),b.jsxs($n,{size:"sm",onClick:v,disabled:o.status==="pending",children:[o.status==="pending"&&b.jsx(Yi,{className:"size-3"}),"Store & use"]})]})]})]})}const SFe=["model","discover","manifest","definitions","raw"],Hu=nK({component:mve}),vFe=Iu({getParentRoute:()=>Hu,path:"/",component:dCe}),xFe=Iu({getParentRoute:()=>Hu,path:"/sources/new",component:vCe}),TFe=Iu({getParentRoute:()=>Hu,path:"/sources/add",component:kFe}),nb=Iu({getParentRoute:()=>Hu,path:"/sources/$sourceId",validateSearch:e=>({tab:typeof e.tab=="string"&&SFe.includes(e.tab)?e.tab:"model",tool:typeof e.tool=="string"&&e.tool.length>0?e.tool:void 0,query:typeof e.query=="string"?e.query:void 0}),component:AFe}),fq=Iu({getParentRoute:()=>Hu,path:"/sources/$sourceId/edit",component:CFe}),IFe=Iu({getParentRoute:()=>Hu,path:"/secrets",component:iFe});function AFe(){const{sourceId:e}=nb.useParams(),t=nb.useSearch(),n=vd({from:nb.fullPath});return b.jsx(X5e,{sourceId:e,search:t,navigate:n})}function CFe(){const{sourceId:e}=fq.useParams();return b.jsx(xCe,{sourceId:e})}const PFe=Hu.addChildren([vFe,xFe,TFe,nb,fq,IFe]),NFe=dK({routeTree:PFe,defaultPreload:"intent"});function RFe(){return b.jsx(O.StrictMode,{children:b.jsx(Mwe,{children:b.jsx(mK,{router:NFe})})})}const NBe=Object.freeze(Object.defineProperty({__proto__:null,App:RFe},Symbol.toStringTag,{value:"Module"})),OFe=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:K7},Symbol.toStringTag,{value:"Module"}));export{mje as B,ABe as M,Es as R,NBe as m,O as r};