\n <@title text=\"Editor Support\" anchorName=\"tooling\"/>\n <@content>\n \n Marko provides\n \n first-class support\n \n for the VSCode editor including syntax highlighting, Autocompletion,\n Hyperclick to quickly jump to referenced files,\n and Pretty printing to keep your code readable.\n
\n Community plugins also provide syntax highlighting for Sublime, Atom, Webstorm & others!
\n @content>\n <@visual.home-tooling__screenshot-window>\n \n \n \n \n \n \n \n \n @visual>\n <@action href=\"/docs/editor-plugins\" text=\"View editor plugins\"/>\n\n\nstyle {\n .home-tooling {\n background-color: #ab1ec3;\n background-image: linear-gradient(135deg, #c32176, #ab1ec3, #7729dc);\n }\n .home-tooling a:hover {\n color: #fff;\n }\n .home-tooling__screenshot-window {\n display: flex;\n flex:1;\n flex-direction: column;\n justify-content: flex-start;\n align-items: stretch;\n box-shadow: 0 0.75em 0.75em rgba(0,0,0,0.3);\n border-radius: 4px;\n overflow:hidden;\n width:30em;\n }\n\n .home-tooling__screenshot-screen {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n align-items: stretch;\n flex: 1;\n width:100%;\n overflow:hidden;\n position: relative;\n }\n\n .home-tooling__screenshot-screen img {\n position: absolute;\n top:0; left:0;\n height:100%;\n }\n\n @media (max-width:60em) {\n .home-tooling__screenshot-window {\n margin:auto;\n width:100%;\n max-width: 30em;\n }\n .home-tooling__screenshot-screen img {\n position: static;\n height:auto;\n width:100%;\n }\n }\n\n .home-tooling__screenshot-title {\n display: flex;\n flex-direction: row;\n align-items: center;\n height:22px;\n width:100%;\n background:linear-gradient(to bottom, #f6f6f6 0%, #ddd 100%);\n border-bottom:0;\n }\n\n .home-tooling__screenshot-title > div {\n border:1px solid #ccc;\n background:#fff;\n border-radius: 50%;\n height:12px;\n width:12px;\n margin-left:7px;\n }\n\n .home-tooling__screenshot-title .red {\n background: #ff6159;\n border-color:#e0453e;\n }\n\n .home-tooling__screenshot-title .yellow {\n background: #ffbd2e;\n border-color:#e09e19;\n }\n\n .home-tooling__screenshot-title .green {\n background: #28ca42;\n border-color:#10ab24;\n }\n}","import ghGot from \"gh-got\";\n\n\n <@title.home-community__title text=\"Join the Community\" anchorName=\"community\"/>\n <@content>\n Need help? Want to contribute? Get involved in the Marko Community!
\n @content>\n <@visual>\n \n \n \n \n \n Ask & answer StackOverflow questions with the marko tag \n \n \n \n \n \n Hang out in our Discord server , ask questions, & discuss project direction \n \n \n \n \n \n Tweet to @MarkoDevTeam or with the #markojs hashtag \n \n \n \n \n \n Browse the code, open issues, & make pull requests on the GitHub repo \n \n \n @visual>\n <@breakout>\n \n \n <@then|{ body }|>\n \n \n \n @then>\n \n \n @breakout>\n \n\nstyle {\n .home-community__title {\n color:#4927a9;\n }\n .home-community__locations {\n display:flex;\n padding-top:1em;\n }\n .home-community__location {\n display:flex;\n flex-direction: column;\n align-items: center;\n padding:1em;\n width:25%;\n }\n .home-community__logo{\n display:flex;\n justify-content: center;\n align-items: center;\n height:5em;\n }\n .home-community__logo img {\n width:3em;\n animation-duration: 1s;\n animation-fill-mode: both;\n animation-timing-function: ease-in-out;\n animation-iteration-count: 1;\n }\n .home-community__logo img:hover {\n animation-name: bounce;\n }\n .home-community__logo img:active {\n opacity: 0.8;\n }\n .home-community__contributors {\n line-height: 0;\n text-align: center;\n margin-top: 2em;\n position: relative;\n }\n .home-community__contributors img {\n border-radius: 4px;\n width:5%;\n position:relative;\n transition: transform 200ms;\n border:0.1vw solid #fff;\n background: #fff;\n box-sizing:border-box;\n transition: opacity 200ms;\n }\n @media (max-width: 50em) {\n .home-community__locations {\n flex-wrap: wrap;\n }\n .home-community__location {\n width:50%;\n }\n }\n @media (min-width:45em) {\n .home-community__contributors img {\n width:4%;\n }\n }\n @media (min-width:75em) {\n .home-community__contributors img {\n width:3%;\n }\n .home-community__contributors img:last-child {\n display: none;\n }\n }\n}\n"],"names":[],"sourceRoot":""}
\ No newline at end of file
diff --git a/assets/470a9a67.css.map.br b/assets/470a9a67.css.map.br
new file mode 100644
index 00000000..8f1d0815
Binary files /dev/null and b/assets/470a9a67.css.map.br differ
diff --git a/assets/470a9a67.css.map.gz b/assets/470a9a67.css.map.gz
new file mode 100644
index 00000000..e3f93be4
Binary files /dev/null and b/assets/470a9a67.css.map.gz differ
diff --git a/assets/499.46c86309.css b/assets/499.46c86309.css
new file mode 100644
index 00000000..2b88556f
--- /dev/null
+++ b/assets/499.46c86309.css
@@ -0,0 +1,2 @@
+/*! @docsearch/css 3.5.2 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */:root{--docsearch-primary-color:#5468ff;--docsearch-text-color:#1c1e21;--docsearch-spacing:12px;--docsearch-icon-stroke-width:1.4;--docsearch-highlight-color:var(--docsearch-primary-color);--docsearch-muted-color:#969faf;--docsearch-container-background:#656c85cc;--docsearch-logo-color:#5468ff;--docsearch-modal-width:560px;--docsearch-modal-height:600px;--docsearch-modal-background:#f5f6f7;--docsearch-modal-shadow:inset 1px 1px 0 0 #ffffff80,0 3px 8px 0 #555a64;--docsearch-searchbox-height:56px;--docsearch-searchbox-background:#ebedf0;--docsearch-searchbox-focus-background:#fff;--docsearch-searchbox-shadow:inset 0 0 0 2px var(--docsearch-primary-color);--docsearch-hit-height:56px;--docsearch-hit-color:#444950;--docsearch-hit-active-color:#fff;--docsearch-hit-background:#fff;--docsearch-hit-shadow:0 1px 3px 0 #d4d9e1;--docsearch-key-gradient:linear-gradient(-225deg,#d5dbe4,#f8f8f8);--docsearch-key-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 2px 1px #1e235a66;--docsearch-footer-height:44px;--docsearch-footer-background:#fff;--docsearch-footer-shadow:0 -1px 0 0 #e0e3e8,0 -3px 6px 0 #45629b1f}html[data-theme=dark]{--docsearch-text-color:#f5f6f7;--docsearch-container-background:#090a11cc;--docsearch-modal-background:#15172a;--docsearch-modal-shadow:inset 1px 1px 0 0 #2c2e40,0 3px 8px 0 #000309;--docsearch-searchbox-background:#090a11;--docsearch-searchbox-focus-background:#000;--docsearch-hit-color:#bec3c9;--docsearch-hit-shadow:none;--docsearch-hit-background:#090a11;--docsearch-key-gradient:linear-gradient(-26.5deg,#565872,#31355b);--docsearch-key-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 2px 2px 0 #0304094d;--docsearch-footer-background:#1e2136;--docsearch-footer-shadow:inset 0 1px 0 0 #494c6a80,0 -4px 8px 0 #0003;--docsearch-logo-color:#fff;--docsearch-muted-color:#7f8497}.DocSearch-Button{align-items:center;background:var(--docsearch-searchbox-background);border:0;border-radius:40px;color:var(--docsearch-muted-color);cursor:pointer;display:flex;font-weight:500;height:36px;justify-content:space-between;margin:0 0 0 16px;padding:0 8px;-webkit-user-select:none;user-select:none}.DocSearch-Button:active,.DocSearch-Button:focus,.DocSearch-Button:hover{background:var(--docsearch-searchbox-focus-background);box-shadow:var(--docsearch-searchbox-shadow);color:var(--docsearch-text-color);outline:none}.DocSearch-Button-Container{align-items:center;display:flex}.DocSearch-Search-Icon{stroke-width:1.6}.DocSearch-Button .DocSearch-Search-Icon{color:var(--docsearch-text-color)}.DocSearch-Button-Placeholder{font-size:1rem;padding:0 12px 0 6px}.DocSearch-Button-Keys{display:flex;min-width:calc(40px + .8em)}.DocSearch-Button-Key{align-items:center;background:var(--docsearch-key-gradient);border:0;border-radius:3px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);display:flex;height:18px;justify-content:center;margin-right:.4em;padding:0 0 2px;position:relative;top:-1px;width:20px}@media (max-width:768px){.DocSearch-Button-Keys,.DocSearch-Button-Placeholder{display:none}}.DocSearch--active{overflow:hidden!important}.DocSearch-Container,.DocSearch-Container *{box-sizing:border-box}.DocSearch-Container{background-color:var(--docsearch-container-background);height:100vh;left:0;position:fixed;top:0;width:100vw;z-index:200}.DocSearch-Container a{text-decoration:none}.DocSearch-Link{appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;font:inherit;margin:0;padding:0}.DocSearch-Modal{background:var(--docsearch-modal-background);border-radius:6px;box-shadow:var(--docsearch-modal-shadow);flex-direction:column;margin:60px auto auto;max-width:var(--docsearch-modal-width);position:relative}.DocSearch-SearchBar{display:flex;padding:var(--docsearch-spacing) var(--docsearch-spacing) 0}.DocSearch-Form{align-items:center;background:var(--docsearch-searchbox-focus-background);border-radius:4px;box-shadow:var(--docsearch-searchbox-shadow);display:flex;height:var(--docsearch-searchbox-height);margin:0;padding:0 var(--docsearch-spacing);position:relative;width:100%}.DocSearch-Input{appearance:none;background:#0000;border:0;color:var(--docsearch-text-color);flex:1;font:inherit;font-size:1.2em;height:100%;outline:none;padding:0 0 0 8px;width:80%}.DocSearch-Input::placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::-webkit-search-cancel-button,.DocSearch-Input::-webkit-search-decoration,.DocSearch-Input::-webkit-search-results-button,.DocSearch-Input::-webkit-search-results-decoration{display:none}.DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{margin:0;padding:0}.DocSearch-MagnifierLabel,.DocSearch-Reset{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}.DocSearch-Container--Stalled .DocSearch-MagnifierLabel,.DocSearch-LoadingIndicator{display:none}.DocSearch-Container--Stalled .DocSearch-LoadingIndicator{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Reset{stroke-width:var(--docsearch-icon-stroke-width);animation:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;right:0}}.DocSearch-Reset{stroke-width:var(--docsearch-icon-stroke-width);animation:fade-in .1s ease-in forwards;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;padding:2px;right:0}.DocSearch-Reset[hidden]{display:none}.DocSearch-Reset:hover{color:var(--docsearch-highlight-color)}.DocSearch-LoadingIndicator svg,.DocSearch-MagnifierLabel svg{height:24px;width:24px}.DocSearch-Cancel{display:none}.DocSearch-Dropdown{max-height:calc(var(--docsearch-modal-height) - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height));min-height:var(--docsearch-spacing);overflow-y:auto;overflow-y:overlay;padding:0 var(--docsearch-spacing);scrollbar-color:var(--docsearch-muted-color) var(--docsearch-modal-background);scrollbar-width:thin}.DocSearch-Dropdown::-webkit-scrollbar{width:12px}.DocSearch-Dropdown::-webkit-scrollbar-track{background:#0000}.DocSearch-Dropdown::-webkit-scrollbar-thumb{background-color:var(--docsearch-muted-color);border:3px solid var(--docsearch-modal-background);border-radius:20px}.DocSearch-Dropdown ul{list-style:none;margin:0;padding:0}.DocSearch-Label{font-size:.75em;line-height:1.6em}.DocSearch-Help,.DocSearch-Label{color:var(--docsearch-muted-color)}.DocSearch-Help{font-size:.9em;margin:0;-webkit-user-select:none;user-select:none}.DocSearch-Title{font-size:1.2em}.DocSearch-Logo a{display:flex}.DocSearch-Logo svg{color:var(--docsearch-logo-color);margin-left:8px}.DocSearch-Hits:last-of-type{margin-bottom:24px}.DocSearch-Hits mark{background:none;color:var(--docsearch-highlight-color)}.DocSearch-HitsFooter{color:var(--docsearch-muted-color);display:flex;font-size:.85em;justify-content:center;margin-bottom:var(--docsearch-spacing);padding:var(--docsearch-spacing)}.DocSearch-HitsFooter a{border-bottom:1px solid;color:inherit}.DocSearch-Hit{border-radius:4px;display:flex;padding-bottom:4px;position:relative}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit--deleting{transition:none}}.DocSearch-Hit--deleting{opacity:0;transition:all .25s linear}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit--favoriting{transition:none}}.DocSearch-Hit--favoriting{transform:scale(0);transform-origin:top center;transition:all .25s linear;transition-delay:.25s}.DocSearch-Hit a{background:var(--docsearch-hit-background);border-radius:4px;box-shadow:var(--docsearch-hit-shadow);display:block;padding-left:var(--docsearch-spacing);width:100%}.DocSearch-Hit-source{background:var(--docsearch-modal-background);color:var(--docsearch-highlight-color);font-size:.85em;font-weight:600;line-height:32px;margin:0 -4px;padding:8px 4px 0;position:sticky;top:0;z-index:10}.DocSearch-Hit-Tree{stroke-width:var(--docsearch-icon-stroke-width);color:var(--docsearch-muted-color);height:var(--docsearch-hit-height);opacity:.5;width:24px}.DocSearch-Hit[aria-selected=true] a{background-color:var(--docsearch-highlight-color)}.DocSearch-Hit[aria-selected=true] mark{text-decoration:underline}.DocSearch-Hit-Container{align-items:center;color:var(--docsearch-hit-color);display:flex;flex-direction:row;height:var(--docsearch-hit-height);padding:0 var(--docsearch-spacing) 0 0}.DocSearch-Hit-icon{height:20px;width:20px}.DocSearch-Hit-action,.DocSearch-Hit-icon{stroke-width:var(--docsearch-icon-stroke-width);color:var(--docsearch-muted-color)}.DocSearch-Hit-action{align-items:center;display:flex;height:22px;width:22px}.DocSearch-Hit-action svg{display:block;height:18px;width:18px}.DocSearch-Hit-action+.DocSearch-Hit-action{margin-left:6px}.DocSearch-Hit-action-button{appearance:none;background:none;border:0;border-radius:50%;color:inherit;cursor:pointer;padding:2px}svg.DocSearch-Hit-Select-Icon{display:none}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Select-Icon{display:block}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:#0003;transition:background-color .1s ease-in}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{transition:none}}.DocSearch-Hit-action-button:focus path,.DocSearch-Hit-action-button:hover path{fill:#fff}.DocSearch-Hit-content-wrapper{display:flex;flex:1 1 auto;flex-direction:column;font-weight:500;justify-content:center;line-height:1.2em;margin:0 8px;overflow-x:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;width:80%}.DocSearch-Hit-title{font-size:.9em}.DocSearch-Hit-path{color:var(--docsearch-muted-color);font-size:.75em}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Tree,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-action,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-icon,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-path,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-text,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-title,.DocSearch-Hit[aria-selected=true] mark{color:var(--docsearch-hit-active-color)!important}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:#0003;transition:none}}.DocSearch-ErrorScreen,.DocSearch-NoResults,.DocSearch-StartScreen{font-size:.9em;margin:0 auto;padding:36px 0;text-align:center;width:80%}.DocSearch-Screen-Icon{color:var(--docsearch-muted-color);padding-bottom:12px}.DocSearch-NoResults-Prefill-List{display:inline-block;padding-bottom:24px;text-align:left}.DocSearch-NoResults-Prefill-List ul{display:inline-block;padding:8px 0 0}.DocSearch-NoResults-Prefill-List li{list-style-position:inside;list-style-type:"» "}.DocSearch-Prefill{appearance:none;background:none;border:0;border-radius:1em;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;font-size:1em;font-weight:700;padding:0}.DocSearch-Prefill:focus,.DocSearch-Prefill:hover{outline:none;text-decoration:underline}.DocSearch-Footer{align-items:center;background:var(--docsearch-footer-background);border-radius:0 0 8px 8px;box-shadow:var(--docsearch-footer-shadow);display:flex;flex-direction:row-reverse;flex-shrink:0;height:var(--docsearch-footer-height);justify-content:space-between;padding:0 var(--docsearch-spacing);position:relative;-webkit-user-select:none;user-select:none;width:100%;z-index:300}.DocSearch-Commands{color:var(--docsearch-muted-color);display:flex;list-style:none;margin:0;padding:0}.DocSearch-Commands li{align-items:center;display:flex}.DocSearch-Commands li:not(:last-of-type){margin-right:.8em}.DocSearch-Commands-Key{align-items:center;background:var(--docsearch-key-gradient);border:0;border-radius:2px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);display:flex;height:18px;justify-content:center;margin-right:.4em;padding:0 0 1px;width:20px}@media (max-width:768px){:root{--docsearch-spacing:10px;--docsearch-footer-height:40px}.DocSearch-Dropdown{height:100%}.DocSearch-Container{height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh, 1vh)*100);position:absolute}.DocSearch-Footer{border-radius:0;bottom:0;position:absolute}.DocSearch-Hit-content-wrapper{display:flex;position:relative;width:80%}.DocSearch-Modal{border-radius:0;box-shadow:none;height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh, 1vh)*100);margin:0;max-width:100%;width:100%}.DocSearch-Dropdown{max-height:calc(var(--docsearch-vh, 1vh)*100 - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height))}.DocSearch-Cancel{appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;flex:none;font:inherit;font-size:1em;font-weight:500;margin-left:var(--docsearch-spacing);outline:none;overflow:hidden;padding:0;-webkit-user-select:none;user-select:none;white-space:nowrap}.DocSearch-Commands,.DocSearch-Hit-Tree{display:none}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}
+/*# sourceMappingURL=499.46c86309.css.map*/
\ No newline at end of file
diff --git a/assets/499.46c86309.css.br b/assets/499.46c86309.css.br
new file mode 100644
index 00000000..c4c6753e
Binary files /dev/null and b/assets/499.46c86309.css.br differ
diff --git a/assets/499.46c86309.css.gz b/assets/499.46c86309.css.gz
new file mode 100644
index 00000000..17c2bb01
Binary files /dev/null and b/assets/499.46c86309.css.gz differ
diff --git a/assets/499.46c86309.css.map b/assets/499.46c86309.css.map
new file mode 100644
index 00000000..55fd4bbc
--- /dev/null
+++ b/assets/499.46c86309.css.map
@@ -0,0 +1 @@
+{"version":3,"file":"499.46c86309.css","mappings":"AAAA,2GAA2G,CAC3G,MAAM,iCAAiC,CAAC,8BAA8B,CAAC,wBAAwB,CAAC,iCAAiC,CAAC,0DAA0D,CAAC,+BAA+B,CAAC,0CAAsD,CAAC,8BAA8B,CAAC,6BAA6B,CAAC,8BAA8B,CAAC,oCAAoC,CAAC,wEAAkF,CAAC,iCAAiC,CAAC,wCAAwC,CAAC,2CAA2C,CAAC,2EAA2E,CAAC,2BAA2B,CAAC,6BAA6B,CAAC,iCAAiC,CAAC,+BAA+B,CAAC,0CAA0C,CAAC,iEAAiE,CAAC,8FAAuG,CAAC,8BAA8B,CAAC,kCAAkC,CAAC,mEAA8E,CAAC,sBAAsB,8BAA8B,CAAC,0CAAkD,CAAC,oCAAoC,CAAC,sEAAsE,CAAC,wCAAwC,CAAC,2CAA2C,CAAC,6BAA6B,CAAC,2BAA2B,CAAC,kCAAkC,CAAC,kEAAkE,CAAC,+FAAqG,CAAC,qCAAqC,CAAC,sEAA0F,CAAC,2BAA2B,CAAC,+BAA+B,CAAC,kBAAkB,kBAAkB,CAAC,gDAAgD,CAAC,QAAQ,CAAC,kBAAkB,CAAC,kCAAkC,CAAC,cAAc,CAAC,YAAY,CAAC,eAAe,CAAC,WAAW,CAAC,6BAA6B,CAAC,iBAAiB,CAAC,aAAa,CAAC,wBAAe,CAAf,gBAAgB,CAAC,yEAAyE,sDAAsD,CAAC,4CAA4C,CAAC,iCAAiC,CAAC,YAAY,CAAC,4BAA4B,kBAAkB,CAAC,YAAY,CAAC,uBAAuB,gBAAgB,CAAC,yCAAyC,iCAAiC,CAAC,8BAA8B,cAAc,CAAC,oBAAoB,CAAC,uBAAuB,YAAY,CAAC,2BAA2B,CAAC,sBAAsB,kBAAkB,CAAC,wCAAwC,CAAiM,QAAQ,CAAxM,iBAAiB,CAAC,sCAAsC,CAAC,kCAAkC,CAAC,YAAY,CAAC,WAAW,CAAC,sBAAsB,CAAC,iBAAiB,CAAmB,eAAe,CAAjC,iBAAiB,CAA0B,QAAQ,CAAC,UAAU,CAAC,yBAAyB,qDAAqD,YAAY,CAAC,CAAC,mBAAmB,yBAAyB,CAAC,4CAA4C,qBAAqB,CAAC,qBAAqB,sDAAsD,CAAC,YAAY,CAAC,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,WAAW,CAAC,WAAW,CAAC,uBAAuB,oBAAoB,CAAC,gBAAgB,eAAe,CAAC,eAAe,CAAC,QAAQ,CAAC,sCAAsC,CAAC,cAAc,CAAC,YAAY,CAAC,QAAQ,CAAC,SAAS,CAAC,iBAAiB,4CAA4C,CAAC,iBAAiB,CAAC,wCAAwC,CAAC,qBAAqB,CAAC,qBAAqB,CAAC,sCAAsC,CAAC,iBAAiB,CAAC,qBAAqB,YAAY,CAAC,2DAA2D,CAAC,gBAAgB,kBAAkB,CAAC,sDAAsD,CAAC,iBAAiB,CAAC,4CAA4C,CAAC,YAAY,CAAC,wCAAwC,CAAC,QAAQ,CAAC,kCAAkC,CAAC,iBAAiB,CAAC,UAAU,CAAC,iBAAiB,eAAe,CAAC,gBAAsB,CAAC,QAAQ,CAAC,iCAAiC,CAAC,MAAM,CAAC,YAAY,CAAC,eAAe,CAAC,WAAW,CAAC,YAAY,CAAC,iBAAiB,CAAC,SAAS,CAAC,8BAA8B,kCAAkC,CAAC,SAAS,CAAC,+LAA+L,YAAY,CAAC,uEAAuE,QAAQ,CAAC,SAAS,CAAC,2CAA2C,kBAAkB,CAAC,sCAAsC,CAAC,YAAY,CAAC,sBAAsB,CAAC,oFAAoF,YAAY,CAAC,0DAA0D,kBAAkB,CAAC,sCAAsC,CAAC,YAAY,CAAC,sBAAsB,CAAC,kDAAkD,iBAAoJ,+CAA8C,CAAjL,cAAc,CAAC,eAAe,CAAC,eAAe,CAAC,QAAQ,CAAC,iBAAiB,CAAC,iCAAiC,CAAC,cAAc,CAAC,OAAuD,CAAC,CAAC,iBAAwL,+CAA8C,CAArN,sCAAsC,CAAC,eAAe,CAAC,eAAe,CAAC,QAAQ,CAAC,iBAAiB,CAAC,iCAAiC,CAAC,cAAc,CAAC,WAAW,CAAC,OAAuD,CAAC,yBAAyB,YAAY,CAAC,uBAAuB,sCAAsC,CAAC,8DAA8D,WAAW,CAAC,UAAU,CAAC,kBAAkB,YAAY,CAAC,oBAAoB,8IAA8I,CAAC,mCAAmC,CAAC,eAAe,CAAC,kBAAkB,CAAC,kCAAkC,CAAC,8EAA8E,CAAC,oBAAoB,CAAC,uCAAuC,UAAU,CAAC,6CAA6C,gBAAsB,CAAC,6CAA6C,6CAA6C,CAAC,kDAAkD,CAAC,kBAAkB,CAAC,uBAAuB,eAAe,CAAC,QAAQ,CAAC,SAAS,CAAC,iBAAiB,eAAe,CAAC,iBAAiB,CAAC,iCAAiC,kCAAkC,CAAC,gBAAgB,cAAc,CAAC,QAAQ,CAAC,wBAAe,CAAf,gBAAgB,CAAC,iBAAiB,eAAe,CAAC,kBAAkB,YAAY,CAAC,oBAAoB,iCAAiC,CAAC,eAAe,CAAC,6BAA6B,kBAAkB,CAAC,qBAAqB,eAAe,CAAC,sCAAsC,CAAC,sBAAsB,kCAAkC,CAAC,YAAY,CAAC,eAAe,CAAC,sBAAsB,CAAC,sCAAsC,CAAC,gCAAgC,CAAC,wBAAwB,uBAAuB,CAAC,aAAa,CAAC,eAAe,iBAAiB,CAAC,YAAY,CAAC,kBAAkB,CAAC,iBAAiB,CAAC,kDAAkD,yBAAyB,eAAe,CAAC,CAAC,yBAAyB,SAAS,CAAC,0BAA0B,CAAC,kDAAkD,2BAA2B,eAAe,CAAC,CAAC,2BAA2B,kBAAkB,CAAC,2BAA2B,CAAC,0BAA0B,CAAC,qBAAqB,CAAC,iBAAiB,0CAA0C,CAAC,iBAAiB,CAAC,sCAAsC,CAAC,aAAa,CAAC,qCAAqC,CAAC,UAAU,CAAC,sBAAsB,4CAA4C,CAAC,sCAAsC,CAAC,eAAe,CAAC,eAAe,CAAC,gBAAgB,CAAC,aAAa,CAAC,iBAAiB,CAAC,eAAe,CAAC,KAAK,CAAC,UAAU,CAAC,oBAAqG,+CAA+C,CAAhI,kCAAkC,CAAC,kCAAkC,CAAC,UAAU,CAAiD,UAAU,CAAC,qCAAqC,iDAAiD,CAAC,wCAAwC,yBAAyB,CAAC,yBAAyB,kBAAkB,CAAC,gCAAgC,CAAC,YAAY,CAAC,kBAAkB,CAAC,kCAAkC,CAAC,sCAAsC,CAAC,oBAAoB,WAAW,CAAC,UAAU,CAAC,0CAA6E,+CAA8C,CAAjF,kCAAkF,CAAC,sBAAsB,kBAAkB,CAAC,YAAY,CAAC,WAAW,CAAC,UAAU,CAAC,0BAA0B,aAAa,CAAC,WAAW,CAAC,UAAU,CAAC,4CAA4C,eAAe,CAAC,6BAA6B,eAAe,CAAC,eAAe,CAAC,QAAQ,CAAC,iBAAiB,CAAC,aAAa,CAAC,cAAc,CAAC,WAAW,CAAC,8BAA8B,YAAY,CAAC,8DAA8D,aAAa,CAAC,sEAAsE,gBAAyB,CAAC,uCAAuC,CAAC,kDAAkD,sEAAsE,eAAe,CAAC,CAAC,gFAAgF,SAAS,CAAC,+BAA+B,YAAY,CAAC,aAAa,CAAC,qBAAqB,CAAC,eAAe,CAAC,sBAAsB,CAAC,iBAAiB,CAAC,YAAY,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,sBAAsB,CAAC,kBAAkB,CAAC,SAAS,CAAC,qBAAqB,cAAc,CAAC,oBAAoB,kCAAkC,CAAC,eAAe,CAAC,qXAAqX,iDAAiD,CAAC,kDAAkD,sEAAsE,gBAAyB,CAAC,eAAe,CAAC,CAAC,mEAAmE,cAAc,CAAC,aAAa,CAAC,cAAc,CAAC,iBAAiB,CAAC,SAAS,CAAC,uBAAuB,kCAAkC,CAAC,mBAAmB,CAAC,kCAAkC,oBAAoB,CAAC,mBAAmB,CAAC,eAAe,CAAC,qCAAqC,oBAAoB,CAAC,eAAe,CAAC,qCAAqC,0BAA0B,CAAC,oBAAoB,CAAC,mBAAmB,eAAe,CAAC,eAAe,CAAC,QAAQ,CAAC,iBAAiB,CAAC,sCAAsC,CAAC,cAAc,CAAC,oBAAoB,CAAC,aAAa,CAAC,eAAe,CAAC,SAAS,CAAC,kDAAkD,YAAY,CAAC,yBAAyB,CAAC,kBAAkB,kBAAkB,CAAC,6CAA6C,CAAC,yBAAyB,CAAC,yCAAyC,CAAC,YAAY,CAAC,0BAA0B,CAAC,aAAa,CAAC,qCAAqC,CAAC,6BAA6B,CAAC,kCAAkC,CAAC,iBAAiB,CAAC,wBAAgB,CAAhB,gBAAgB,CAAC,UAAU,CAAC,WAAW,CAAC,oBAAoB,kCAAkC,CAAC,YAAY,CAAC,eAAe,CAAC,QAAQ,CAAC,SAAS,CAAC,uBAAuB,kBAAkB,CAAC,YAAY,CAAC,0CAA0C,iBAAiB,CAAC,wBAAwB,kBAAkB,CAAC,wCAAwC,CAA+K,QAAQ,CAAtL,iBAAiB,CAAC,sCAAsC,CAAmF,kCAAkC,CAApH,YAAY,CAAC,WAAW,CAAC,sBAAsB,CAAC,iBAAiB,CAAC,eAAe,CAA6C,UAAU,CAAC,yBAAyB,MAAM,wBAAwB,CAAC,8BAA8B,CAAC,oBAAoB,WAAW,CAAC,qBAAqB,YAAY,CAAC,6BAA6B,CAAC,yCAAyC,CAAC,iBAAiB,CAAC,kBAAkB,eAAe,CAAC,QAAQ,CAAC,iBAAiB,CAAC,+BAA+B,YAAY,CAAC,iBAAiB,CAAC,SAAS,CAAC,iBAAiB,eAAe,CAAC,eAAe,CAAC,YAAY,CAAC,6BAA6B,CAAC,yCAAyC,CAAC,QAAQ,CAAC,cAAc,CAAC,UAAU,CAAC,oBAAoB,6IAA6I,CAAC,kBAAkB,eAAe,CAAC,eAAe,CAAC,QAAQ,CAAC,sCAAsC,CAAC,cAAc,CAAC,oBAAoB,CAAC,SAAS,CAAC,YAAY,CAAC,aAAa,CAAC,eAAe,CAAC,oCAAoC,CAAC,YAAY,CAAC,eAAe,CAAC,SAAS,CAAC,wBAAgB,CAAhB,gBAAgB,CAAC,kBAAkB,CAAC,wCAAwC,YAAY,CAAC,CAAC,mBAAmB,GAAG,SAAS,CAAC,GAAG,SAAS,CAAC","sources":["webpack:///../../node_modules/@docsearch/css/dist/style.css"],"sourcesContent":["/*! @docsearch/css 3.5.2 | MIT License | © Algolia, Inc. and contributors | https://docsearch.algolia.com */\n:root{--docsearch-primary-color:#5468ff;--docsearch-text-color:#1c1e21;--docsearch-spacing:12px;--docsearch-icon-stroke-width:1.4;--docsearch-highlight-color:var(--docsearch-primary-color);--docsearch-muted-color:#969faf;--docsearch-container-background:rgba(101,108,133,0.8);--docsearch-logo-color:#5468ff;--docsearch-modal-width:560px;--docsearch-modal-height:600px;--docsearch-modal-background:#f5f6f7;--docsearch-modal-shadow:inset 1px 1px 0 0 hsla(0,0%,100%,0.5),0 3px 8px 0 #555a64;--docsearch-searchbox-height:56px;--docsearch-searchbox-background:#ebedf0;--docsearch-searchbox-focus-background:#fff;--docsearch-searchbox-shadow:inset 0 0 0 2px var(--docsearch-primary-color);--docsearch-hit-height:56px;--docsearch-hit-color:#444950;--docsearch-hit-active-color:#fff;--docsearch-hit-background:#fff;--docsearch-hit-shadow:0 1px 3px 0 #d4d9e1;--docsearch-key-gradient:linear-gradient(-225deg,#d5dbe4,#f8f8f8);--docsearch-key-shadow:inset 0 -2px 0 0 #cdcde6,inset 0 0 1px 1px #fff,0 1px 2px 1px rgba(30,35,90,0.4);--docsearch-footer-height:44px;--docsearch-footer-background:#fff;--docsearch-footer-shadow:0 -1px 0 0 #e0e3e8,0 -3px 6px 0 rgba(69,98,155,0.12)}html[data-theme=dark]{--docsearch-text-color:#f5f6f7;--docsearch-container-background:rgba(9,10,17,0.8);--docsearch-modal-background:#15172a;--docsearch-modal-shadow:inset 1px 1px 0 0 #2c2e40,0 3px 8px 0 #000309;--docsearch-searchbox-background:#090a11;--docsearch-searchbox-focus-background:#000;--docsearch-hit-color:#bec3c9;--docsearch-hit-shadow:none;--docsearch-hit-background:#090a11;--docsearch-key-gradient:linear-gradient(-26.5deg,#565872,#31355b);--docsearch-key-shadow:inset 0 -2px 0 0 #282d55,inset 0 0 1px 1px #51577d,0 2px 2px 0 rgba(3,4,9,0.3);--docsearch-footer-background:#1e2136;--docsearch-footer-shadow:inset 0 1px 0 0 rgba(73,76,106,0.5),0 -4px 8px 0 rgba(0,0,0,0.2);--docsearch-logo-color:#fff;--docsearch-muted-color:#7f8497}.DocSearch-Button{align-items:center;background:var(--docsearch-searchbox-background);border:0;border-radius:40px;color:var(--docsearch-muted-color);cursor:pointer;display:flex;font-weight:500;height:36px;justify-content:space-between;margin:0 0 0 16px;padding:0 8px;user-select:none}.DocSearch-Button:active,.DocSearch-Button:focus,.DocSearch-Button:hover{background:var(--docsearch-searchbox-focus-background);box-shadow:var(--docsearch-searchbox-shadow);color:var(--docsearch-text-color);outline:none}.DocSearch-Button-Container{align-items:center;display:flex}.DocSearch-Search-Icon{stroke-width:1.6}.DocSearch-Button .DocSearch-Search-Icon{color:var(--docsearch-text-color)}.DocSearch-Button-Placeholder{font-size:1rem;padding:0 12px 0 6px}.DocSearch-Button-Keys{display:flex;min-width:calc(40px + .8em)}.DocSearch-Button-Key{align-items:center;background:var(--docsearch-key-gradient);border-radius:3px;box-shadow:var(--docsearch-key-shadow);color:var(--docsearch-muted-color);display:flex;height:18px;justify-content:center;margin-right:.4em;position:relative;padding:0 0 2px;border:0;top:-1px;width:20px}@media (max-width:768px){.DocSearch-Button-Keys,.DocSearch-Button-Placeholder{display:none}}.DocSearch--active{overflow:hidden!important}.DocSearch-Container,.DocSearch-Container *{box-sizing:border-box}.DocSearch-Container{background-color:var(--docsearch-container-background);height:100vh;left:0;position:fixed;top:0;width:100vw;z-index:200}.DocSearch-Container a{text-decoration:none}.DocSearch-Link{appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;font:inherit;margin:0;padding:0}.DocSearch-Modal{background:var(--docsearch-modal-background);border-radius:6px;box-shadow:var(--docsearch-modal-shadow);flex-direction:column;margin:60px auto auto;max-width:var(--docsearch-modal-width);position:relative}.DocSearch-SearchBar{display:flex;padding:var(--docsearch-spacing) var(--docsearch-spacing) 0}.DocSearch-Form{align-items:center;background:var(--docsearch-searchbox-focus-background);border-radius:4px;box-shadow:var(--docsearch-searchbox-shadow);display:flex;height:var(--docsearch-searchbox-height);margin:0;padding:0 var(--docsearch-spacing);position:relative;width:100%}.DocSearch-Input{appearance:none;background:transparent;border:0;color:var(--docsearch-text-color);flex:1;font:inherit;font-size:1.2em;height:100%;outline:none;padding:0 0 0 8px;width:80%}.DocSearch-Input::placeholder{color:var(--docsearch-muted-color);opacity:1}.DocSearch-Input::-webkit-search-cancel-button,.DocSearch-Input::-webkit-search-decoration,.DocSearch-Input::-webkit-search-results-button,.DocSearch-Input::-webkit-search-results-decoration{display:none}.DocSearch-LoadingIndicator,.DocSearch-MagnifierLabel,.DocSearch-Reset{margin:0;padding:0}.DocSearch-MagnifierLabel,.DocSearch-Reset{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}.DocSearch-Container--Stalled .DocSearch-MagnifierLabel,.DocSearch-LoadingIndicator{display:none}.DocSearch-Container--Stalled .DocSearch-LoadingIndicator{align-items:center;color:var(--docsearch-highlight-color);display:flex;justify-content:center}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Reset{animation:none;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;right:0;stroke-width:var(--docsearch-icon-stroke-width)}}.DocSearch-Reset{animation:fade-in .1s ease-in forwards;appearance:none;background:none;border:0;border-radius:50%;color:var(--docsearch-icon-color);cursor:pointer;padding:2px;right:0;stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Reset[hidden]{display:none}.DocSearch-Reset:hover{color:var(--docsearch-highlight-color)}.DocSearch-LoadingIndicator svg,.DocSearch-MagnifierLabel svg{height:24px;width:24px}.DocSearch-Cancel{display:none}.DocSearch-Dropdown{max-height:calc(var(--docsearch-modal-height) - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height));min-height:var(--docsearch-spacing);overflow-y:auto;overflow-y:overlay;padding:0 var(--docsearch-spacing);scrollbar-color:var(--docsearch-muted-color) var(--docsearch-modal-background);scrollbar-width:thin}.DocSearch-Dropdown::-webkit-scrollbar{width:12px}.DocSearch-Dropdown::-webkit-scrollbar-track{background:transparent}.DocSearch-Dropdown::-webkit-scrollbar-thumb{background-color:var(--docsearch-muted-color);border:3px solid var(--docsearch-modal-background);border-radius:20px}.DocSearch-Dropdown ul{list-style:none;margin:0;padding:0}.DocSearch-Label{font-size:.75em;line-height:1.6em}.DocSearch-Help,.DocSearch-Label{color:var(--docsearch-muted-color)}.DocSearch-Help{font-size:.9em;margin:0;user-select:none}.DocSearch-Title{font-size:1.2em}.DocSearch-Logo a{display:flex}.DocSearch-Logo svg{color:var(--docsearch-logo-color);margin-left:8px}.DocSearch-Hits:last-of-type{margin-bottom:24px}.DocSearch-Hits mark{background:none;color:var(--docsearch-highlight-color)}.DocSearch-HitsFooter{color:var(--docsearch-muted-color);display:flex;font-size:.85em;justify-content:center;margin-bottom:var(--docsearch-spacing);padding:var(--docsearch-spacing)}.DocSearch-HitsFooter a{border-bottom:1px solid;color:inherit}.DocSearch-Hit{border-radius:4px;display:flex;padding-bottom:4px;position:relative}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit--deleting{transition:none}}.DocSearch-Hit--deleting{opacity:0;transition:all .25s linear}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit--favoriting{transition:none}}.DocSearch-Hit--favoriting{transform:scale(0);transform-origin:top center;transition:all .25s linear;transition-delay:.25s}.DocSearch-Hit a{background:var(--docsearch-hit-background);border-radius:4px;box-shadow:var(--docsearch-hit-shadow);display:block;padding-left:var(--docsearch-spacing);width:100%}.DocSearch-Hit-source{background:var(--docsearch-modal-background);color:var(--docsearch-highlight-color);font-size:.85em;font-weight:600;line-height:32px;margin:0 -4px;padding:8px 4px 0;position:sticky;top:0;z-index:10}.DocSearch-Hit-Tree{color:var(--docsearch-muted-color);height:var(--docsearch-hit-height);opacity:.5;stroke-width:var(--docsearch-icon-stroke-width);width:24px}.DocSearch-Hit[aria-selected=true] a{background-color:var(--docsearch-highlight-color)}.DocSearch-Hit[aria-selected=true] mark{text-decoration:underline}.DocSearch-Hit-Container{align-items:center;color:var(--docsearch-hit-color);display:flex;flex-direction:row;height:var(--docsearch-hit-height);padding:0 var(--docsearch-spacing) 0 0}.DocSearch-Hit-icon{height:20px;width:20px}.DocSearch-Hit-action,.DocSearch-Hit-icon{color:var(--docsearch-muted-color);stroke-width:var(--docsearch-icon-stroke-width)}.DocSearch-Hit-action{align-items:center;display:flex;height:22px;width:22px}.DocSearch-Hit-action svg{display:block;height:18px;width:18px}.DocSearch-Hit-action+.DocSearch-Hit-action{margin-left:6px}.DocSearch-Hit-action-button{appearance:none;background:none;border:0;border-radius:50%;color:inherit;cursor:pointer;padding:2px}svg.DocSearch-Hit-Select-Icon{display:none}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Select-Icon{display:block}.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:rgba(0,0,0,.2);transition:background-color .1s ease-in}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{transition:none}}.DocSearch-Hit-action-button:focus path,.DocSearch-Hit-action-button:hover path{fill:#fff}.DocSearch-Hit-content-wrapper{display:flex;flex:1 1 auto;flex-direction:column;font-weight:500;justify-content:center;line-height:1.2em;margin:0 8px;overflow-x:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap;width:80%}.DocSearch-Hit-title{font-size:.9em}.DocSearch-Hit-path{color:var(--docsearch-muted-color);font-size:.75em}.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-action,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-icon,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-path,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-text,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-title,.DocSearch-Hit[aria-selected=true] .DocSearch-Hit-Tree,.DocSearch-Hit[aria-selected=true] mark{color:var(--docsearch-hit-active-color)!important}@media screen and (prefers-reduced-motion:reduce){.DocSearch-Hit-action-button:focus,.DocSearch-Hit-action-button:hover{background:rgba(0,0,0,.2);transition:none}}.DocSearch-ErrorScreen,.DocSearch-NoResults,.DocSearch-StartScreen{font-size:.9em;margin:0 auto;padding:36px 0;text-align:center;width:80%}.DocSearch-Screen-Icon{color:var(--docsearch-muted-color);padding-bottom:12px}.DocSearch-NoResults-Prefill-List{display:inline-block;padding-bottom:24px;text-align:left}.DocSearch-NoResults-Prefill-List ul{display:inline-block;padding:8px 0 0}.DocSearch-NoResults-Prefill-List li{list-style-position:inside;list-style-type:\"» \"}.DocSearch-Prefill{appearance:none;background:none;border:0;border-radius:1em;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;font-size:1em;font-weight:700;padding:0}.DocSearch-Prefill:focus,.DocSearch-Prefill:hover{outline:none;text-decoration:underline}.DocSearch-Footer{align-items:center;background:var(--docsearch-footer-background);border-radius:0 0 8px 8px;box-shadow:var(--docsearch-footer-shadow);display:flex;flex-direction:row-reverse;flex-shrink:0;height:var(--docsearch-footer-height);justify-content:space-between;padding:0 var(--docsearch-spacing);position:relative;user-select:none;width:100%;z-index:300}.DocSearch-Commands{color:var(--docsearch-muted-color);display:flex;list-style:none;margin:0;padding:0}.DocSearch-Commands li{align-items:center;display:flex}.DocSearch-Commands li:not(:last-of-type){margin-right:.8em}.DocSearch-Commands-Key{align-items:center;background:var(--docsearch-key-gradient);border-radius:2px;box-shadow:var(--docsearch-key-shadow);display:flex;height:18px;justify-content:center;margin-right:.4em;padding:0 0 1px;color:var(--docsearch-muted-color);border:0;width:20px}@media (max-width:768px){:root{--docsearch-spacing:10px;--docsearch-footer-height:40px}.DocSearch-Dropdown{height:100%}.DocSearch-Container{height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh, 1vh)*100);position:absolute}.DocSearch-Footer{border-radius:0;bottom:0;position:absolute}.DocSearch-Hit-content-wrapper{display:flex;position:relative;width:80%}.DocSearch-Modal{border-radius:0;box-shadow:none;height:100vh;height:-webkit-fill-available;height:calc(var(--docsearch-vh, 1vh)*100);margin:0;max-width:100%;width:100%}.DocSearch-Dropdown{max-height:calc(var(--docsearch-vh, 1vh)*100 - var(--docsearch-searchbox-height) - var(--docsearch-spacing) - var(--docsearch-footer-height))}.DocSearch-Cancel{appearance:none;background:none;border:0;color:var(--docsearch-highlight-color);cursor:pointer;display:inline-block;flex:none;font:inherit;font-size:1em;font-weight:500;margin-left:var(--docsearch-spacing);outline:none;overflow:hidden;padding:0;user-select:none;white-space:nowrap}.DocSearch-Commands,.DocSearch-Hit-Tree{display:none}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}"],"names":[],"sourceRoot":""}
\ No newline at end of file
diff --git a/assets/499.46c86309.css.map.br b/assets/499.46c86309.css.map.br
new file mode 100644
index 00000000..462e3c12
Binary files /dev/null and b/assets/499.46c86309.css.map.br differ
diff --git a/assets/499.46c86309.css.map.gz b/assets/499.46c86309.css.map.gz
new file mode 100644
index 00000000..f4f7f8e3
Binary files /dev/null and b/assets/499.46c86309.css.map.gz differ
diff --git a/assets/499.e87b5cbc.js b/assets/499.e87b5cbc.js
new file mode 100644
index 00000000..6d743df5
--- /dev/null
+++ b/assets/499.e87b5cbc.js
@@ -0,0 +1,2 @@
+"use strict";(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([[499],{"../components/app-layout/components/layout-search/doc-search.js":(a,e,s)=>{s.d(e,{init:()=>n});var o=s("../../node_modules/@docsearch/js/dist/esm/index.js");function n(a){(0,o.Z)({container:a,indexName:"markojs",appId:"GB0QQV5RQM",apiKey:"82f1b630f11e1afa4767f051af953a28"})}}}]);
+//# sourceMappingURL=499.e87b5cbc.js.map
\ No newline at end of file
diff --git a/assets/499.e87b5cbc.js.br b/assets/499.e87b5cbc.js.br
new file mode 100644
index 00000000..74703dfc
--- /dev/null
+++ b/assets/499.e87b5cbc.js.br
@@ -0,0 +1 @@
+ dӦ{.v}[}O]"UmO;adnиncx[2qSQP&o(4~nw|ۥ\I̔-B0"?hDY?
0Kz!0,BБ'8fܠPx8N}@#h\qZO1%LrY
XTaesIvZ}_UT+Avqǩ].byv\L|~BƼ]'o~`g
\ No newline at end of file
diff --git a/assets/499.e87b5cbc.js.map b/assets/499.e87b5cbc.js.map
new file mode 100644
index 00000000..ac98eb10
--- /dev/null
+++ b/assets/499.e87b5cbc.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"499.e87b5cbc.js","mappings":"8OAGO,SAASA,EAAKC,IACnBC,EAAAA,EAAAA,GAAU,CACRD,YACAE,UAAW,UACXC,MAAO,aACPC,OAAQ,oCAEZ,C","sources":["webpack:///../components/app-layout/components/layout-search/doc-search.js"],"sourcesContent":["import '@docsearch/css';\nimport docsearch from '@docsearch/js';\n\nexport function init(container) {\n docsearch({\n container,\n indexName: 'markojs',\n appId: 'GB0QQV5RQM',\n apiKey: '82f1b630f11e1afa4767f051af953a28',\n });\n}\n"],"names":["init","container","docsearch","indexName","appId","apiKey"],"sourceRoot":""}
\ No newline at end of file
diff --git a/assets/499.e87b5cbc.js.map.br b/assets/499.e87b5cbc.js.map.br
new file mode 100644
index 00000000..404c1d79
Binary files /dev/null and b/assets/499.e87b5cbc.js.map.br differ
diff --git a/assets/499.e87b5cbc.js.map.gz b/assets/499.e87b5cbc.js.map.gz
new file mode 100644
index 00000000..ba978160
Binary files /dev/null and b/assets/499.e87b5cbc.js.map.gz differ
diff --git a/assets/664.6a733e1a.js b/assets/664.6a733e1a.js
deleted file mode 100644
index e86d51e0..00000000
--- a/assets/664.6a733e1a.js
+++ /dev/null
@@ -1,2 +0,0 @@
-(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([[664],{"../components/repl/index.marko":(e,t,r)=>{"use strict";r.d(t,{Z:()=>oe});var n=r("../../node_modules/marko/dist/runtime/vdom/index.js"),s=r("../../node_modules/@marko/tags-api-preview/dist/util/replace-assignments/index.mjs"),o=r("../../node_modules/@marko/tags-api-preview/dist/transform/cached-values/index-browser.mjs"),a=r("../../node_modules/@marko/tags-api-preview/dist/transform/native-tag-var/index-browser.mjs"),i=r("../../node_modules/@marko/tags-api-preview/dist/components/lifecycle/index.mjs"),l=r("../../node_modules/@marko/tags-api-preview/dist/components/_instance/index.marko"),c=r("../../node_modules/marko/dist/runtime/helpers/render-tag.js"),d=r.n(c),p=r("../../node_modules/marko/dist/runtime/helpers/class-value.js"),u=r.n(p),f=r("../../node_modules/@marko/tags-api-preview/dist/chunk-5R2Z7TR6.mjs"),m=r("../../node_modules/marko/dist/runtime/components/renderer.js"),y=r.n(m),h=r("../../node_modules/marko/dist/runtime/components/registry.js"),g=r("../../node_modules/marko/dist/runtime/components/defineComponent.js"),b=r.n(g);const v="6o3N4O4f",x=(0,n.t)(v),w=x;(0,h.r)(v,(()=>x));const k={onCreate(){this.state={}}};x._=y()((function(e,t,r,n,c,p){(0,f.begin)();try{var m=n,y=c;const{selectedIndexChange:p,filesChange:f,files:h,selectedIndex:g}=e,b=f||(e=>m.setState("0",e)),v=f?h:"0"in y?y[0]:y[0]=h,x=p||(e=>m.setState("1",e)),w=p?g:"1"in y?y[1]:y[1]=g,k=v[w];t.be("div",{class:"file-tabs"},"0",n,null,1);{const e="2"in y?y[2]:y[2]=1,c=e=>m.setState("2",e);let p=0;for(const e of v||[]){let n=p++;const c=`[${n}]`;d()(l.default,{renderBody:(t,r,p,f)=>{var m=r,y=p;const h="0"in f?f[0]:f[0]=!1,g=e=>p.setState("0",e),E=k===e,S=n>0;t.be("div",{class:u()(["file-tab",{selected:E}])},"2"+c,y,null,1,{onclick:m.d("click",(function(){E?(0,s.default)(g,!0):((0,s.default)(g,!1),(0,s.default)(x,n))}),!1)}),h&&E&&S?d()(l.default,{renderBody:(t,r,l,c)=>{var d=r,p=l;const u="0"in c?c[0]:c[0]=e.name,f=(0,o.cache)((0,o.cached)(l,[u,v])||function(){const t={...e,name:u,path:e.path.replace(e.name,u)};(0,s.default)(b,[...v.slice(0,n),t,...v.slice(n+1)]),(0,s.default)(g,!1)}),m=(0,a.default)(l,"0");var y=e=>l.setState("0",e);t.e("input",{type:"text",size:u.length,value:u},"@0",p,0,0,{pa:[y&&"value"],onblur:d.d("blur",f,!1),onkeydown:d.d("keydown",(function(e){"Enter"===e.code&&f()}),!1),oninput:d.d("input",(e=>{y(e.target.value)}),!1)}),(0,i.default)(p,{onMount:(0,o.cache)((0,o.cached)(l,[u])||function(){m().focus(),m().setSelectionRange(0,u.indexOf("."))})})}},t,m,"3"+c):t.t(e.name,y),S&&(t.be("button",{class:"file-close"},"4"+c,y,null,1,{onclick:m.d("click",(function(t){window.confirm(`Delete ${e.path}?`)&&(w>=n&&(0,s.default)(x,w-1),(0,s.default)(b,[...v.slice(0,n),...v.slice(n+1)])),t.stopPropagation()}),!1)}),t.t("×",y),t.ee()),t.ee()}},t,r,"1"+c)}t.be("button",{class:"new-file"},"5",n,null,1,{onclick:r.d("click",(function(){const t={name:`Component${e}.marko`,path:`/components/Component${e}.marko`,content:""},r=v.length;(0,s.default)(b,v.concat(t)),(0,s.default)(x,r),(0,s.default)(c,e+1)}),!1)}),t.t("+",n),t.ee()}t.ee()}finally{(0,f.end)()}}),{t:v},k),x.Component=b()(k,x._);var E=r("../../node_modules/marko/dist/runtime/helpers/self-iterator.js"),S=r.n(E),C=r("../../node_modules/marko/dist/runtime/helpers/dynamic-tag.js"),T=r.n(C),D=r("../../node_modules/marko/dist/runtime/vdom/helpers/v-element.js"),I=r.n(D);const A="QAUP5peK",j=(0,n.t)(A),L=j,_=I()("div",{class:"pane-divider"},"3",null,0,1);(0,h.r)(A,(()=>j));const M={};j._=y()((function(e,t,r,n,s,o){(0,f.begin)();try{const{actions:s,body:o}=e;t.be("div",{class:"pane"},"0",n,null,1),t.be("div",{class:"pane-actions"},"1",n,null,1),T()(t,s.renderBody,null,null,null,null,r,"2"),t.ee(),t.n(_,n),t.be("div",{class:"pane-body"},"4",n,null,1),T()(t,o.renderBody,null,null,null,null,r,"5"),t.ee(),t.ee()}finally{(0,f.end)()}}),{t:A,i:!0},M),j.Component=b()(M,j._);var $=r("../../node_modules/@marko/tags-api-preview/dist/components/effect/index.mjs");const N="rRMAwOPg",R=(0,n.t)(N),F=R;(0,h.r)(N,(()=>R));const P={onCreate(){this.state={}}};R._=y()((function(e,t,r,n,s,i){(0,f.begin)();try{var l=n;const{value:s,valueChange:i,renderBody:c,class:d}=e,p=(0,a.default)(l,"0");t.be("select",{class:u()(d)},"@0",n,null,1,{onchange:r.d("change",(function(e){i(e.target.value)}),!1)}),T()(t,c,null,null,null,null,r,"0"),t.ee(),(0,$.default)(n,(0,o.cache)((0,o.cached)(l,[s,c,i])||function(){p().value=s}))}finally{(0,f.end)()}}),{t:N},P),R.Component=b()(P,R._);var O=r("../../node_modules/lz-string/libs/lz-string.js"),U=r("../../node_modules/@marko/tags-api-preview/dist/translate/native-tag-handlers/index-browser.mjs"),B=r("../../node_modules/marko/dist/runtime/vdom/helpers/attrs.js"),z=r.n(B);const q="ftG9dvL8",W=(0,n.t)(q),V=W,H=I()("span",null,"1",null,1,0).t("Open in playground ");(0,h.r)(q,(()=>W));const Z={};W._=y()((function(e,t,r,n,s,o){(0,f.begin)();try{const{files:s,...o}=e;var a={};t.be("a",z()((0,U.default)({...o,href:`/playground/#${(0,O.compressToEncodedURIComponent)(JSON.stringify(s))}`,target:"_top",class:"playground-link"},r,"a",a)),"0",n,null,4,{...a}),t.n(H,n),t.t("↗",n),t.ee()}finally{(0,f.end)()}}),{t:q,i:!0},Z),W.Component=b()(Z,W._);var K=r("../../node_modules/@marko/tags-api-preview/dist/components/return/index-browser.mjs");const Y="dL815V5K",J=(0,n.t)(Y),G=J;(0,h.r)(Y,(()=>J));const X={onCreate(){this.state={}}};J._=y()((function(e,t,r,n,a,i){(0,f.begin)();try{var l=n,c=a;const{value:t,fallback:r}=e,i="0"in c?c[0]:c[0]=window.matchMedia(t).matches,d=e=>l.setState("0",e);(0,$.default)(n,(0,o.cache)((0,o.cached)(l,[t])||function(){const e=window.matchMedia(t),r=()=>(0,s.default)(d,!!e.matches);return e.addEventListener("change",r),(0,s.default)(d,!!e.matches),()=>e.removeEventListener("change",r)})),e._return&&e._return({value:i},1)}finally{(0,f.end)()}}),{t:Y},X),J.Component=b()(X,J._);const Q="V970f081",ee=(0,n.t)(Q),te=ee;(0,h.r)(Q,(()=>ee));const re={onCreate(){this.state={}}};ee._=y()((function(e,t,r,n,i,c){(0,f.begin)();try{var p=n,m=i;const{left:c,right:f}=e,b="0"in m?m[0]:m[0]=.5,v=e=>p.setState("0",e),x="1"in m?m[1]:m[1]=!1,w=e=>p.setState("1",e);var y=(0,K.default)(p);d()(G,{value:"(max-aspect-ratio: 1/1)",_return:y},t,r,"0");const{value:k}=y(),E=(0,a.default)(p,"0");t.be("div",{class:u()(["panes",x&&"resizing"])},"@0",n,null,1);var h={};t.be("div",z()((0,U.default)({...c,style:`flex-grow:${b}`},r,"div",h)),"1",n,null,4,{...h}),T()(t,c.renderBody,null,null,null,null,r,"2"),t.ee(),t.be("div",{class:"divider"},"3",n,null,1),t.e("div",{class:"inner"},"4",n,0,1,{onmousedown:r.d("mousedown",(function(e){(0,s.default)(w,!0),e.preventDefault(),e.stopPropagation()}),!1)}),t.ee();var g={};t.be("div",z()((0,U.default)({...f,style:"flex-grow:"+(1-b)},r,"div",g)),"5",n,null,4,{...g}),T()(t,f.renderBody,null,null,null,null,r,"6"),t.ee(),t.ee(),x&&d()(l.default,{renderBody:(e,t,r,n)=>{var a=r;(0,$.default)(a,(0,o.cache)((0,o.cached)(r,[k])||function(){const e=e=>{if(e.buttons||e.which){const t=E().getBoundingClientRect(),r=k?(e.clientY-t.top)/t.height:(e.clientX-t.left)/t.width;r>0&&(0,s.default)(v,Math.min(.8,Math.max(.2,r)))}else(0,s.default)(w,!1)};return window.addEventListener("mousemove",e),()=>window.removeEventListener("mousemove",e)}))}},t,r,"7")}finally{(0,f.end)()}}),{t:Q},re),ee.Component=b()(re,ee._);const ne="Y/QiYO60",se=(0,n.t)(ne),oe=se,ae=I()("option",{value:"preview"},"10",null,1,0).t("App Preview"),ie=I()("option",{value:"compiled-html"},"11",null,1,0).t("Compiled (HTML)"),le=I()("option",{value:"compiled-vdom"},"12",null,1,0).t("Compiled (DOM)");(0,h.r)(ne,(()=>se));const ce={onCreate(){this.state={}}};se._=y()((function(e,t,n,a,c,p){(0,f.begin)();try{var u=a,m=c;const{filesChange:p,getCompilerOptions:f,files:y}=e,h="0"in m?m[0]:m[0]=0,g=e=>u.setState("0",e),b="1"in m?m[1]:m[1]="preview",v=e=>u.setState("1",e),x="2"in m?m[2]:m[2]=!1,k=e=>u.setState("2",e),E=y[h];d()(te,{left:{class:"editor-container",renderBody:e=>{d()(L,{actions:{renderBody:e=>{d()(l.default,{renderBody:(e,t,r,n)=>{var a=t;d()(w,{files:y,filesChange:p,selectedIndex:h,selectedIndexChange:(0,o.cache)((0,o.cached)(r,[])||(e=>(0,s.default)(g,e)))},e,a,"3")}},e,n,"2")},[Symbol.iterator]:S()},body:{renderBody:e=>{d()(l.default,{renderBody:(e,t,n,a)=>{var c=t,u=n;const f="0"in a?a[0]:a[0]=null,m=e=>n.setState("0",e);f&&d()(l.default,{renderBody:(e,t,r,n)=>{var a=t;T()(e,f,(()=>({value:E.content,filename:E.path,valueChange:(0,o.cache)((0,o.cached)(r,[E,y,h])||function(e){const t={...E,content:e};(0,s.default)(p,[...y.slice(0,h),t,...y.slice(h+1)]),(0,s.default)(k,!0)})})),null,null,null,a,"6")}},e,c,"5"),(0,i.default)(u,{onMount:(0,o.cache)((0,o.cached)(n,[])||(async()=>{const e=await Promise.all([r.e(103),r.e(410),r.e(109),r.e(888),r.e(176)]).then(r.bind(r,"../components/repl/components/editor.marko"));await e.loading,(0,s.default)(m,e)}))})}},e,n,"4")},[Symbol.iterator]:S()}},e,n,"1")},[Symbol.iterator]:S()},right:{renderBody:e=>{d()(L,{actions:{renderBody:e=>{d()(l.default,{renderBody:(e,t,r,n)=>{var a=t,i=r;d()(F,{value:b,valueChange:(0,o.cache)((0,o.cached)(r,[])||function(e){(0,s.default)(v,e),(0,s.default)(k,!1)}),class:"preview-select",renderBody:e=>{e.n(ae,i),e.n(ie,i),e.n(le,i)}},e,a,"9"),d()(V,{files:y},e,a,"13")}},e,n,"8")},[Symbol.iterator]:S()},body:{renderBody:e=>{d()(l.default,{renderBody:(e,t,n,a)=>{var l=t,c=n;const d="0"in a?a[0]:a[0]=null,p=e=>n.setState("0",e);T()(e,d,(()=>({type:b,files:y,selectedFile:E,getCompilerOptions:f,debounce:x})),null,null,null,l,"15"),(0,i.default)(c,{onMount:(0,o.cache)((0,o.cached)(n,[])||(async()=>{(0,s.default)(p,await Promise.all([r.e(103),r.e(641),r.e(410),r.e(995),r.e(888),r.e(551),r.e(25)]).then(r.bind(r,"../components/repl/components/preview.marko")))}))})}},e,n,"14")},[Symbol.iterator]:S()}},e,n,"7")},[Symbol.iterator]:S()}},t,n,"0")}finally{(0,f.end)()}}),{t:ne},ce),se.Component=b()(ce,se._)},"./playground/components/hash-value.marko":(e,t,r)=>{"use strict";r.d(t,{Z:()=>h});var n=r("../../node_modules/marko/dist/runtime/vdom/index.js"),s=r("../../node_modules/lz-string/libs/lz-string.js"),o=r("../../node_modules/@marko/tags-api-preview/dist/transform/cached-values/index-browser.mjs"),a=r("../../node_modules/@marko/tags-api-preview/dist/util/replace-assignments/index.mjs"),i=r("../../node_modules/@marko/tags-api-preview/dist/components/lifecycle/index.mjs"),l=r("../../node_modules/@marko/tags-api-preview/dist/chunk-5R2Z7TR6.mjs"),c=r("../../node_modules/marko/dist/runtime/components/renderer.js"),d=r.n(c),p=r("../../node_modules/marko/dist/runtime/components/registry.js"),u=r("../../node_modules/marko/dist/runtime/components/defineComponent.js"),f=r.n(u);const m="41NMzc7K",y=(0,n.t)(m),h=y;(0,p.r)(m,(()=>y));const g={onCreate(){this.state={}}};y._=d()((function(e,t,r,n,c,d){(0,l.begin)();try{var p=n,u=c;const{value:t}=e,r="0"in u?u[0]:u[0]=function(){try{return JSON.parse((0,s.decompressFromEncodedURIComponent)(window.location.hash.slice(1)))}catch(e){console.error(e)}}()||t,l=e=>p.setState("0",e);(0,i.default)(n,{onMount:(0,o.cache)((0,o.cached)(p,[])||function(){window.addEventListener("hashchange",this.handler=()=>{try{this.isUpdating?this.isUpdating=!1:(0,a.default)(l,JSON.parse((0,s.decompressFromEncodedURIComponent)(window.location.hash.slice(1))))}catch(e){console.error(e)}})}),onUpdate:(0,o.cache)((0,o.cached)(p,[r])||function(){this.isUpdating=!0,window.location.hash=(0,s.compressToEncodedURIComponent)(JSON.stringify(r))}),onDestroy:(0,o.cache)((0,o.cached)(p,[])||function(){window.removeEventListener("hashchange",this.handler)})}),e._return&&e._return({value:r,valueChange:(0,o.cache)((0,o.cached)(p,[])||(e=>(0,a.default)(l,e)))},1)}finally{(0,l.end)()}}),{t:m},g),y.Component=f()(g,y._)},"./playground/v6/index.marko?browser-entry":(e,t,r)=>{"use strict";var n={};r.r(n),r.d(n,{analyze:()=>an,taglibs:()=>cn,translate:()=>ln});var s=r("../../node_modules/marko/dist/runtime/components/index.js"),o=(r("../components/app-layout/favicon.png"),r("../logos/marko.svg"),r("../components/app-layout/components/layout-header/component-browser.js")),a=r.n(o),i=r("../components/app-layout/components/layout-sidebar/components/version-switcher/component-browser.js"),l=r.n(i),c=r("../components/app-layout/components/layout-sidebar/component-browser.js"),d=r.n(c),p=(r("../components/app-footer/openjsf.svg"),r("../components/app-footer/osi.svg"),r("../components/app-footer/ebay.svg"),r("../logos/discord.svg"),r("../../node_modules/marko/dist/runtime/vdom/index.js")),u=r("../../browser-shims/compiler/index.js"),f=r("../../node_modules/@marko/babel-utils/dist/index.js"),m=r("../../node_modules/path-browserify/index.js"),y=r.n(m);function h(){return"html"===b().output}function g(){return!h()}function b(){return Ot.hub.file.markoOpts}function v(){return b().optimize}var x=/^<.*>$|\.marko$/;function w(e){const t=e.node.extra??={};if(void 0===t.tagNameType){const r=e.get("name");if(r.isStringLiteral()){if(t.tagNameType="@"===r.node.value[0]?3:(0,f.isNativeTag)(e)?0:1,1===t.tagNameType){const r=(0,f.loadFileForTag)(e),n=r?.ast.program;"class"===n?.extra.___featureType&&(t.tagNameType=2,t.___featureType="class")}t.tagNameNullable=t.tagNameNullable=!1}else{const e=[r];let n,s,o=!1;for(;(n=e.pop())&&2!==s;)if(n.isConditionalExpression())e.push(n.get("test")),e.push(n.get("consequent")),n.node.alternate&&e.push(n.get("alternate"));else if(n.isLogicalExpression())"||"===n.node.operator?e.push(n.get("left")):o=!0,e.push(n.get("right"));else if(n.isAssignmentExpression())e.push(n.get("right"));else if(n.isBinaryExpression())s="+"!==n.node.operator||void 0!==s?2:0;else if(n.isStringLiteral()||n.isTemplateLiteral())s=void 0!==s?2:0;else if(n.isNullLiteral())o=!0;else if(n.isIdentifier()){if("undefined"===n.node.name){o=!0;continue}const t=n.scope.getBinding(n.node.name);if(!t){s=2;continue}if("module"===t.kind){const e=t.path.parent;s=x.test(e.source.value)&&e.specifiers.some((e=>u.types.isImportDefaultSpecifier(e)))?void 0!==s&&1!==s?2:1:2;continue}const r=t.path;if(r.isMarkoTag()&&"local"===t.kind){const t=r.get("name").node.value;if("tag"===t){s=void 0!==s&&1!==s?2:1;continue}if("const"===t){e.push(r.get("attributes")[0].get("value"));continue}if("let"===t){s=2;continue}continue}s=2}else s=2;t.tagNameType=s,t.tagNameNullable=o,t.tagNameDynamic=!0}void 0===t.tagNameType&&(t.tagNameType=2)}return t.tagNameType}function k(e){const t=e.node.extra??={};let r=t.section;if(!r){const n=e.parentPath?E(e.parentPath):void 0,s=e.parentPath?.get("name"),o=e.isProgram()?"":Ot.scope.generateUid(s.toString()+"Body"),a=e.hub.file.path.node.extra??={},i=a.sections??=[];r=t.section={id:i.length,name:o,depth:n?n.depth+1:0,parent:n},i.push(r)}return r}function E(e){let t=e;for(;;){if("Program"===t.type||"MarkoTagBody"===t.type&&0!==w(t.parentPath))return k(t);t=t.parentPath}}function S(e){let t,r=e;for(;void 0===(t=r.node.extra?.section);)r=r.parentPath;return I(t,r),t}function C(e,t){return[r=>{const n=Ot.state[e]??={};return n[r.id]??=t&&t(r)},(t,r)=>{(Ot.state[e]??={})[t.id]=r}]}var[T]=C("scopeIdIdentifier",(e=>Ot.scope.generateUidIdentifier(`scope${e.id}_id`))),[D,I]=C("sectionPath"),[A]=C("scopeIdentifier",(()=>u.types.identifier("undefined"))),j=(e,t)=>{const r=A(e);return t||"undefined"!==r.name||(r.name=Ot.scope.generateUid(`scope${e.id}_`)),r};function L(e){const{sections:t}=Ot.node.extra;t?.forEach(e)}var _=class{constructor(e){this.compare=e}add(e,t){return e?Array.isArray(e)?$(this.compare,e,t):M(this.compare,e,t):t}addAll(e,t){if(e){if(Array.isArray(e)){if(t)if(Array.isArray(t))for(const r of t)$(this.compare,e,r);else $(this.compare,e,t);return e}return t?Array.isArray(t)?$(this.compare,[...t],e):M(this.compare,t,e):e}return Array.isArray(t)?[...t]:t}find(e,t){if(e){if(!Array.isArray(e))return 0===this.compare(e,t)?e:void 0;{let r=e.length,n=0;for(;n>>1,o=e[s],a=this.compare(o,t);if(0===a)return o;a>0?r=s:n=s+1}}}}clone(e){return Array.isArray(e)?[...e]:e}size(e){return e?Array.isArray(e)?e.length:1:0}toArray(e,t){return e?Array.isArray(e)?e.map(t):[t(e)]:[]}*iterate(e){if(e)if(Array.isArray(e))for(const t of e)yield t;else yield e}};function M(e,t,r){const n=e(t,r);return 0===n?t:n<0?[t,r]:[r,t]}function $(e,t,r){const n=t.length;let s=n,o=0;for(;o>>1,a=e(t[n],r);if(0===a)return t;a>0?s=n:o=n+1}let a=r;for(;o[void 0,void 0,void 0]));function R(e,t,r,n,s=n){const o=r.extra??={};if(o.reserve){const e=o.reserve;return e.name+="_"+n,e}const a=N(t),i=o.reserve={id:0,type:e,name:n,debugKey:s,section:t};return a[e]?i.id=a[e].push(i)-1:a[e]=[i],i}function F(e){return v()?u.types.numericLiteral(e.id):u.types.stringLiteral(e.debugKey+(0===e.type?`/${e.id}`:""))}var P=new _((function(e,t){return e.section.id-t.section.id||e.type-t.type||e.id-t.id})),O=new WeakMap,U=new _((function(e,t){const r=e.length,n=r-t.length;if(0!==n)return n;for(let n=0;n[]));function q(e,t){const r=t.scope,n=t.getBindingIdentifiers();for(const t in n){const s=r.getBinding(t).referencePaths.concat(r.getBinding(t).constantViolations.filter((e=>e.isAssignmentExpression()&&"="!==e.node.operator))),o=R(1,e,n[t],t);for(const e of s){const t=Z(e.scope.path),r=H(t||e),n=r.parentPath,s=t??r;if(s){const e=s.node.id?.name;e||n.isMarkoAttribute()&&!n.node.default&&((s.node.extra??={}).name=n.node.name),W(s,"references",o)}W(n,`${r.listKey||r.key}References`,o)}}}function W(e,t,r){const n=E(e),s=e.node.extra??={},o=s[t];o?o!==r&&(s[t]=G(J(n,P.add(P.clone(o),r))),Q(o)&&X(J(n,o))):s[t]=r}function V(e,t){let r;for(const[n,s]of t){const t=n[s];Q(t)&&X(J(e,t)),r=P.addAll(r,t),delete n[s]}return Q(r)&&(r=G(J(e,r))),r}function H(e){let t=e;for(;!K(t.parentPath);)t=t.parentPath;return t}function Z(e){let t=e;if(!t.isProgram()){for(;!Y(t);){if(K(t))return;t=t.parentPath}return t}}function K(e){switch(e.type){case"MarkoTag":case"MarkoTagBody":case"MarkoAttribute":case"MarkoSpreadAttribute":case"MarkoPlaceholder":case"MarkoScriptlet":return!0;default:return!1}}function Y(e){switch(e.type){case"FunctionExpression":case"ArrowFunctionExpression":return!0;default:return!1}}function J(e,t){const r=B(e);let n=U.find(r,t);return n||(n=t,z(e,U.add(r,t))),n}function G(e){return O.set(e,(O.get(e)||0)+1),e}function X(e){return O.set(e,O.get(e)-1),e}function Q(e){return Array.isArray(e)}function ee(e){return e||0===e?e+"":""}var te=ae((e=>{let t="",r=0;for(let n=0,s=e.length;n{let n="",s=0,o=e.indexOf(t,s);for(;-1!==o;)n+=e.slice(s,o)+r,s=o+1,o=e.indexOf(t,s);return s?n+e.slice(s):e}}function oe(e){const t=e.length;let r=0;do{switch(e[r]){case'"':return ie(e,r+1,"'","'");case"'":case">":case" ":case"\t":case"\n":case"\r":case"\f":return ie(e,r+1,'"',""");default:r++}}while(r{if(!t&&0!==t)return"";switch(typeof t){case"string":return e(t);case"boolean":return"true";case"number":return t+"";default:return e(t+"")}}}function ie(e,t,r,n){let s=r,o=0;for(let a=t,i=e.length;au.types.templateElement({raw:e}))),r)):n?u.types.stringLiteral(n):void 0}function De(e,t){e[e.length-1]+=t}function Ie(e,t,r){for(let n=e.length-1;n>=t;n--)e[n+r]=e[n]}var[Ae]=C("walks",(()=>[""])),[je]=C("walkComment",(()=>[])),[Le]=C("steps",(()=>[])),_e={32:"get",33:"before",35:"after",36:"inside",37:"replace",38:"endChild",47:"beginChild",67:"next",97:"over",107:"out",117:"multiplier",91:"nextEnd",106:"overEnd",116:"outEnd",126:"multiplierEnd"};function Me(e){Le(S(e)).push(0)}function $e(e){Le(S(e)).push(1)}function Ne(e){Le(S(e)).push(0,1)}function Re(e,t){const{reserve:r}=e.node.extra;if(t&&(!r||0!==r.type))throw e.buildCodeFrameError("Tried to visit a node that was not marked as needing to visit during analyze.");if(h())return;const n=S(e),s=Le(n),o=Ae(n),a=je(n);let i="";if(s.length){const e=[];let t=0;for(const r of s)0===r?(t++,e.push(67)):(t--,t>=0?(e.length=e.lastIndexOf(67),e.push(97)):(e.length=e.lastIndexOf(107)+1,e.push(107),t=0));let r=e[0],n=0;for(const t of e)t!==r?(a.push(`${_e[r]}(${n})`),i+=Fe(r,n),r=t,n=1):n++;a.push(`${_e[r]}(${n})`),i+=Fe(r,n),s.length=0}void 0!==t&&(32!==t&&We(e)``,a.push(`${_e[t]}`),i+=String.fromCharCode(t)),De(o,i)}function Fe(e,t){switch(e){case 67:return Pe(t,e,20);case 97:case 107:return Pe(t,e,10);default:throw new Error(`Unexpected walk code: ${e}`)}}function Pe(e,t,r){let n="";if(e>=r){const t=Math.floor(e/r);n+=Pe(t,117,10),e-=t*r}return n+=String.fromCharCode(t+e),n}function Oe(e){const t=Te(Ae(e))||u.types.stringLiteral("");return""!==t.value&&(t.leadingComments=[{type:"CommentBlock",value:" "+je(e).join(", ")+" "}]),t}var[Ue]=C("renderer",(e=>u.types.identifier(e.name))),[Be]=C("writes",(()=>[""])),[ze,qe]=C("registerRenderer",(()=>!1));function We(e){const t=S(e);return(e,...r)=>{const n=r.length,s=Be(t);De(s,e[0]);for(let t=0;t{const n=r.length,s=Be(t);s[0]+=e[n];for(let t=0;t tag does not support ...spread attributes.`)}function Xe(e){if(e.node.body.body.length)throw e.get("name").buildCodeFrameError(`The <${e.get("name")}> tag does not support body content.`)}var[Qe,et]=C("returnId"),tt={translate(e){(0,f.assertNoVar)(e),(0,f.assertNoParams)(e),Xe(e),Ge(e);const t=S(e),{node:r,hub:{file:n}}=e,[s]=r.attributes;if(!u.types.isMarkoAttribute(s)||!s.default)throw e.get("name").buildCodeFrameError("The '' tag requires default attribute like ''.");if(r.attributes.length>1){const t=r.attributes[1].loc?.start,n=r.attributes[r.attributes.length-1].loc?.end,s="The '' tag only supports a default attribute.";throw null==t||null==n?e.get("name").buildCodeFrameError(s):e.hub.buildError({loc:{start:t,end:n}},s,Error)}if(h()){Ze(e);const r=n.path.scope.generateUidIdentifier("return");et(t,r),e.replaceWith(u.types.variableDeclaration("const",[u.types.variableDeclarator(r,s.value)]))[0].skip()}else Tt(t,s.extra?.valueReferences,{identifier:Ee("tagVarSignal"),hasDownstreamIntersections:()=>!0},s.value),e.remove()},autocomplete:[{displayText:"return=",description:"Provides a value for use in a parent template.",snippet:"return=${1:value}",descriptionMoreURL:"https://markojs.com/docs/core-tags/#return"}]},[rt]=C("signals",(()=>new Map)),[nt,st]=C("queue");function ot(e,t){st(S(e.get("body")),t)}var[at]=C("closures",(()=>[])),it=(e,t,r)=>{let n=e;for(;void 0!==n&&n!==t;)at(n).push(r),n=n.parent},[lt,ct]=C("forceResumeScope"),[dt]=C("serializedScopeProperties",(()=>new Map)),[pt,ut]=C("register");function ft(e,t){ut(S(e.get("body")),t)}var mt=()=>u.types.stringLiteral("SIGNAL NOT INITIALIZED");function yt(e,t){const r=rt(e);let n=r.get(t);if(!n){if(r.set(t,n={identifier:u.types.identifier(Et(e,t)),reserve:t,section:e,values:[],intersection:void 0,render:[],effect:[],effectInlineReferences:void 0,subscribers:[],closures:new Map,hasDownstreamIntersections:()=>n.intersection||n.closures.size||n.values.some((e=>e.signal.hasDownstreamIntersections()))?(n.hasDownstreamIntersections=()=>!0,!0):(n.hasDownstreamIntersections=()=>!1,!1),build:mt}),h())return n;if(t){if(Array.isArray(t))kt(t,n),n.build=()=>Se("intersection",u.types.numericLiteral(t.length),gt(n,[Ut],t));else if(t.section!==e){const r=yt(t.section,t);it(e,t.section,n.identifier),r.closures.set(e,n),n.build=()=>{const r=nt(e),s=xe(e,t.section),o=s.object===Ut;return Se(r&&o?"closure":"dynamicClosure",F(t),gt(n,[Ut,u.types.identifier(t.name)]),o?null:u.types.arrowFunctionExpression([Ut],s),bt(n),vt(n))}}}else n.build=()=>gt(n,[Ut])}return n}function ht(e,t=F(e)){const r=yt(e.section,e);return r.build=()=>{const n=gt(r,[Ut,u.types.identifier(e.name)]),s=bt(r),o=vt(r);return n.body.body.length>0||s||o?Se("value",t,n,s,o):n},r.valueAccessor=t,r}function gt(e,t,r){const n=e.section;for(const t of e.values)e.render.push(u.types.expressionStatement(u.types.callExpression(t.signal.identifier,[t.scope,t.value])));return r&&e.render.unshift(u.types.variableDeclaration("const",[u.types.variableDeclarator(ve(n,r),Ut)])),u.types.arrowFunctionExpression(t,u.types.blockStatement(e.render))}function bt(e){let t=e.intersection;const r=e.section,n=Array.from(e.closures.entries()).sort((([e],[t])=>e.id-t.id));for(const[s,o]of n){const n=nt(s),a=s.parent===r;n&&a?t=xt(t,n(o.identifier)):e.hasDynamicSubscribers||(e.hasDynamicSubscribers=!0)}return e.hasDynamicSubscribers&&(e.hasDynamicSubscribers=!0,t=xt(t,Se("dynamicSubscribers",e.valueAccessor))),Array.isArray(t)?Se("intersections",u.types.arrayExpression(t)):t}function vt(e){let t;for(const r of e.values)r.signal.hasDownstreamIntersections()&&(t=xt(t,r.intersectionExpression??u.types.identifier(r.signal.identifier.name)));return Array.isArray(t)?Se("values",u.types.arrayExpression(t)):t}function xt(e,t){return e?Array.isArray(e)?(e.push(t),e):[e,t]:t}function wt(e,t){const r=Array.isArray(e)?e:Object.values(e);if(r.length){const e=Ot.scope.generateUidIdentifier("destructure"),n=r.map((e=>ht(e.extra?.reserve))),s=u.types.variableDeclaration("let",r.map((e=>u.types.variableDeclarator(e))));return{get identifier(){const e=Ot.scope.generateUidIdentifier("destructure");return Ot.pushContainer("body",[u.types.variableDeclaration("const",[u.types.variableDeclarator(e,this.build(!0))])]),e},build(o){return o&&!this.hasDownstreamIntersections()?u.types.arrowFunctionExpression([Ut,t],u.types.blockStatement(n.map(((e,t)=>u.types.expressionStatement(u.types.callExpression(e.identifier,[Ut,r[t]])))))):u.types.arrowFunctionExpression([Ut,e,Bt],u.types.blockStatement([s,u.types.ifStatement(u.types.unaryExpression("!",Bt),u.types.expressionStatement(u.types.assignmentExpression("=",t,e))),...n.map(((e,t)=>u.types.expressionStatement(u.types.callExpression(e.identifier,[Ut,r[t],Bt]))))]))},hasDownstreamIntersections:()=>r.some((e=>{const t=e.extra.reserve;return yt(t.section,t).hasDownstreamIntersections()}))}}}function kt(e,t){if(Array.isArray(e))return void e.forEach((e=>kt(e,t)));const r=yt(t.section,e);r.intersection=xt(r.intersection,t.identifier)}function Et(e,t){let r;if(t)if(Array.isArray(t)){r="expr";for(const e of t)r+=`_${e.name}`}else r=t.name;else r="setup";return r+=e.name.replace("_","$"),Ot.scope.generateUid(r)}function St(e){for(let t=e.length-1;t>=0;t--){const r=e[t];if(u.types.isArrowFunctionExpression(r)){const n=r.body.body;n&&(0===n.length?e[t]=u.types.nullLiteral():1===n.length&&u.types.isExpressionStatement(n[0])&&(r.body=n[0].expression))}}for(let t=e.length-1;u.types.isNullLiteral(e[t]);)e.length=t--}function Ct(e,t,r,n,s,o){const a=yt(t,r),i=a[e]??=[];if(Array.isArray(n)?i.push(...n):i.push(n),"effect"===e)if(Array.isArray(s))for(const e of s)!o&&u.types.isFunction(e)||Dt(a,e);else!o&&u.types.isFunction(s)||Dt(a,s)}function Tt(e,t,r,n,s=Ut,o){yt(e,t).values.push({signal:r,value:n,scope:s,intersectionExpression:o})}function Dt(e,t){e.effectInlineReferences=P.addAll(e.effectInlineReferences,t.extra?.references)}function It(e,t){const{markoOpts:{optimize:r},opts:{filename:n}}=Ot.hub.file;let s="";if(t)if("string"==typeof t)s+=`_${t}`;else if(Array.isArray(t))for(const e of t)s+=`_${e.name}`;else s+=`_${t.name}`;return(0,f.getTemplateId)(r,`${n}_${e.id}${s}`)}function At(e,t){const r=jt(e),n=jt(t);for(let e=Math.max(r.length,n.length)-1;e>=0;e--){const t=(n[e]??-1)-(r[e]??-1);if(0!==t)return t}return 0}function jt({reserve:e}){return e?Array.isArray(e)?e.map(Lt).sort():[Lt(e)]:[]}function Lt(e){return 1e4*(0===e.type?1:0)+e.id}function _t(e,t){Ct("effect",e,t,void 0,[])}function Mt(e,t){const r=E(e),n=Ot.node.extra.intersectionsBySection?.[r.id]??[],s=Array.from(rt(r).values()),o=T(r),a=[];for(const e of n)for(const t of e)0!==t.type&&P.add(a,t);for(let t=s.length;t--;)if(s[t].effect.length){const n=s[t].reserve;P.addAll(a,n),e.pushContainer("body",u.types.expressionStatement(Se("writeEffect",o,u.types.stringLiteral(It(r,n)))))}const i=new Set,l=dt(r),c=a.reduce(((e,t)=>{const n=F(t);return t.section.id===r.id?(e.push(u.types.objectProperty(n,u.types.identifier(t.name))),i.add(n.value)):(dt(t.section).set(n,u.types.identifier(t.name)),dt(r).set(u.types.stringLiteral("_"),Se("serializedScope",T(t.section)))),e}),[]);t&&void 0!==Qe(r)&&c.push(u.types.objectProperty(u.types.stringLiteral("/"),t));for(const[e,t]of l)i.has(e.value)||(c.push(u.types.objectProperty(e,t,!u.types.isLiteral(e))),i.add(e.value));if(c.length||lt(r)){const t=pt(r);e.pushContainer("body",u.types.expressionStatement(Se("writeScope",o,t?t(u.types.objectExpression(c)):u.types.objectExpression(c))))}e.get("body").length&&e.unshiftContainer("body",u.types.variableDeclaration("const",[u.types.variableDeclarator(o,Se("nextScopeId"))]))}var $t={FunctionExpression:{exit:Nt},ArrowFunctionExpression:{exit:Nt}};function Nt(e,{root:t,section:r}){const{node:n}=e,{extra:s}=n,o=s?.references,a=e.hub.file.path.scope.generateUidIdentifier(s?.name);o&&("BlockStatement"!==n.body.type&&(n.body=u.types.blockStatement([u.types.returnStatement(n.body)])),n.body.body.unshift(u.types.variableDeclaration("const",[u.types.variableDeclarator(ve(r,o),Ut)])));let i=e.parentPath;for(;i;){if(i.isFunction())return;if(i===t)return;i=i.parentPath}t.insertBefore(u.types.variableDeclaration("const",[u.types.variableDeclarator(a,n)])),n.params.unshift(Ut),e.replaceWith(Se("bindFunction",Ut,a))}function Rt(e){return rt(e).get(void 0)?.identifier}var Ft={translate:{exit(e){Re(e);const t=S(e),r=u.types.identifier("template"),n=u.types.identifier("walks"),s=u.types.identifier("setup"),o=u.types.identifier("attrs"),a=u.types.identifier("closures"),{attrs:i}=e.node.extra,{walks:l,writes:c,setup:d}=Ye(t);if(function(e){const{sections:t}=Ot.node.extra;for(let r=t.length;r--;)e(t[r])}((r=>{const n=D(r),s=n.isProgram()?void 0:function(e,t=u.types.arrayPattern(e.map((e=>e.node)))){return wt(e.reduce(((e,t)=>Object.assign(e,t.getBindingIdentifiers())),{}),u.types.objectPattern([u.types.objectProperty(u.types.identifier("value"),t)]))}(n.get("params"));if(function(e){const t=[...rt(e).values()].sort(At);for(const r of t){let t;if(r.effect.length){const n=u.types.identifier(`${r.identifier.name}_effect`);r.effectInlineReferences&&r.effect.unshift(u.types.variableDeclaration("const",[u.types.variableDeclarator(ve(e,r.effectInlineReferences),Ut)])),t=u.types.variableDeclarator(n,Se("register",u.types.stringLiteral(It(e,r.reserve)),u.types.arrowFunctionExpression([Ut],1===r.effect.length&&u.types.isExpressionStatement(r.effect[0])?r.effect[0].expression:u.types.blockStatement(r.effect)))),r.render.push(u.types.expressionStatement(Se("queueEffect",Ut,n)))}const n=r.register?Se("register",u.types.stringLiteral(It(e,r.reserve)),r.build()):r.build();u.types.isCallExpression(n)&&St(n.arguments);const s=u.types.variableDeclarator(r.identifier,n),o=Ot.pushContainer("body",t?[u.types.variableDeclaration("const",[t]),u.types.variableDeclaration("const",[s])]:u.types.variableDeclaration("const",[s]));for(const t of o)t.traverse($t,{root:t,section:e})}}(r),r!==t){const{walks:t,writes:n,setup:o,register:a}=Ye(r),i=at(r),l=Ue(r),c=Se("createRenderer",n,t,o,i.length&&u.types.arrayExpression(i),void 0,void 0,void 0,void 0,s?.build());e.node.body.push(u.types.variableDeclaration("const",[u.types.variableDeclarator(l,a?Se("register",u.types.stringLiteral(It(r,"renderer")),c):c)]))}})),i){const r=[];for(const e in i.bindings){const n=i.bindings[e],s=yt(t,n.extra.reserve).identifier;r.push(u.types.exportSpecifier(s,s))}e.node.body.push(u.types.exportNamedDeclaration(u.types.variableDeclaration("const",[u.types.variableDeclarator(o,u.types.isIdentifier(i.var)?yt(t,i.var.extra.reserve).identifier:wt(i.bindings,i.var)?.build())])),u.types.exportNamedDeclaration(null,r))}const p=at(t);e.node.body.push(u.types.exportNamedDeclaration(u.types.variableDeclaration("const",[u.types.variableDeclarator(r,c||u.types.stringLiteral(""))])),u.types.exportNamedDeclaration(u.types.variableDeclaration("const",[u.types.variableDeclarator(n,l||u.types.stringLiteral(""))])),u.types.exportNamedDeclaration(u.types.variableDeclaration("const",[u.types.variableDeclarator(s,u.types.isNullLiteral(d)||!d?u.types.functionExpression(null,[],u.types.blockStatement([])):d)]))),p.length&&e.node.body.push(u.types.exportNamedDeclaration(u.types.variableDeclaration("const",[u.types.variableDeclarator(a,u.types.arrayExpression(p))])));const{markoOpts:{optimize:m},opts:{filename:y}}=e.hub.file;e.node.body.push(u.types.exportDefaultDeclaration(Se("createTemplate",Se("createRenderer",r,n,s,p.length&&a,void 0,void 0,void 0,void 0,i&&o),u.types.stringLiteral((0,f.getTemplateId)(m,`${y}`)))))}}};function Pt(e){return e.isImportDeclaration()||e.isExportDeclaration()||e.isMarkoScriptlet({static:!0})}var Ot,Ut,Bt,zt={translate:{exit(e){const t=S(e),r=e.scope.generateUidIdentifier("tagVar");Ke(e),Mt(e,r);const n=Qe(t);void 0!==n&&e.pushContainer("body",u.types.returnStatement(n));const s=[];for(const t of e.get("body"))Pt(t)?t.isMarkoScriptlet()&&t.replaceWithMultiple(t.node.body):(s.push(t.node),t.remove());const o=e.scope.generateUidIdentifier("renderer"),{attrs:a}=e.node.extra,{markoOpts:{optimize:i},opts:{filename:l}}=e.hub.file;e.pushContainer("body",[u.types.variableDeclaration("const",[u.types.variableDeclarator(o,Se("createRenderer",u.types.arrowFunctionExpression([a?a.var:u.types.identifier("input"),r],u.types.blockStatement(s))))]),u.types.exportDefaultDeclaration(Se("createTemplate",o,u.types.stringLiteral((0,f.getTemplateId)(i,`${l}`))))])}}},qt=new WeakMap,Wt={migrate:{enter(e){qt.set(e,Ot),Ot=e},exit(){Ot.scope.crawl(),Ot=qt.get(Ot)}},analyze:{enter(e){qt.set(e,Ot),Ot=e,k(e)},exit(){L((e=>{let t=0;for(const r of N(e))if(r)for(const e of r)e.id=t,t+=1})),function(){const e=(Ot.node.extra??={}).intersectionsBySection={};L((t=>{e[t.id]=B(t).filter((e=>O.get(e)>0))}))}(),Ot=qt.get(Ot)}},translate:{enter(e){if(qt.set(e,Ot),Ot=e,Ut=g()?e.scope.generateUidIdentifier("scope"):null,Bt=g()?e.scope.generateUidIdentifier("clean"):null,"hydrate"===b().output)return e.skip(),e.node.body=[u.types.importDeclaration([],u.types.stringLiteral(e.hub.file.opts.filename))],void((e.node.extra.hasInteractiveChild||e.node.extra.isInteractive)&&e.node.body.push(u.types.expressionStatement(Se("init"))))},exit(e){h()?zt.translate.exit(e):Ft.translate.exit(e),Ot=qt.get(Ot)}}},Vt={translate:{exit(e){const t=e.get("source"),r=t.node.value;t.node.value=(0,f.resolveTagImport)(t,r)||r}}},Ht={translate(e){h()&&We(e)``,e.remove()}},Zt=new WeakMap;function Kt(e,t){return Zt.get(e.node)?.(e,t)}var Yt={translate:{exit(e){if(g()){const t="="===e.node.operator?e.node.right:u.types.binaryExpression(e.node.operator.slice(0,-1),e.node.left,e.node.right),r=Kt(e,t);r&&e.replaceWith(r)}}}},Jt={translate:{exit(e){if(g()){const t=Kt(e,u.types.binaryExpression("++"===e.node.operator?"+":"-",e.node.argument,u.types.numericLiteral(1)));t&&e.replaceWith(e.node.prefix||e.parentPath.isExpressionStatement()?t:u.types.sequenceExpression([t,e.node.argument]))}}}},Gt={translate(e){h()&&We(e)`${e.node.value}?>`,e.remove()}},Xt={translate(e){h()&&We(e)``,e.remove()}},Qt={translate(e){const t=e.container.slice(e.key+1);let r=!1;if(h())for(const e of t){if(u.types.isMarkoPlaceholder(e)){r=!0;break}if(u.types.isMarkoTag(e)||u.types.isMarkoText(e))break}We(e)`${e.node.value}${r?"":""}`,Ne(e),e.remove()}};function er(e,t){if(!e)return!1;const{node:r}=t,n=rr(e)?e.default:e;return nr(n)?n(t,u.types):n.enter&&n.enter(t,u.types),r!==t.node}function tr(e,t){if(!e)return!1;const{node:r}=t,n=rr(e)?e.default:e;return!nr(n)&&n.exit&&n.exit(t,u.types),r!==t.node}function rr(e){return Boolean(e.default)}function nr(e){return"function"==typeof e}function sr(e){const{extra:t}=e.node;t.nestedAttributeTags={},t.hoistedControlFlows=0,or(t,!1,!1,e)}function or(e,t,r,n){let s=!1;for(const o of n.get("body").get("body"))o.isMarkoTag()&&ar(e,t,r,o)&&(s=!0);return s}function ar(e,t,r,n){if((0,f.isTransparentTag)(n)){if(or(e,t||(0,f.isLoopTag)(n),!0,n))return(0,f.isTransparentTag)(n.parentPath.parentPath)||e.hoistedControlFlows++,!0}else if((0,f.isAttributeTag)(n)){const s=n.node.name.value.slice(1),o=e.nestedAttributeTags,a=o[s],i=a||(o[s]={dynamic:!1,repeated:!1});return i.dynamic||=r,i.repeated||=t||void 0!==a,!0}return!1}var ir=/^[0-9A-Z_$]+$/i;function lr(e,t=!1){const{node:r}=e;let n=u.types.objectExpression([]);const s=n.extra={};for(const e of r.attributes){const t=e.value;u.types.isMarkoSpreadAttribute(e)?n.properties.push(u.types.spreadElement(t)):n.properties.push(u.types.objectProperty((o=e.name,ir.test(o)?u.types.identifier(o):u.types.stringLiteral(o)),t))}var o;if(t){const{body:t,params:s}=r.body;let o=r.extra.hoistedControlFlows;if(o)for(const t of e.get("body").get("body"))if(e.insertBefore(t.node),t.remove(),(t.isConditional()||t.isLoop())&&! --o)break;t.length&&n.properties.push(u.types.objectMethod("method",u.types.identifier("renderBody"),s.length?[u.types.objectPattern([u.types.objectProperty(u.types.identifier("value"),u.types.arrayPattern(s))])]:[],u.types.blockStatement(t)))}if(n.properties.length&&1===n.properties.length){const[e]=n.properties;u.types.isSpreadElement(e)&&(n=e.argument,n.extra=s)}return n}function cr(e){if(u.types.isObjectExpression(e)){const t=e.properties[e.properties.length-1];if(u.types.isObjectMethod(t)&&"renderBody"===t.key.name)return t}}function dr(e,t,r="const"){const{node:{var:n}}=e;n&&(e.get("var").remove(),e.insertBefore(u.types.variableDeclaration(r,[u.types.variableDeclarator(u.types.cloneDeep(n),t)])),e.hub.file.path.scope.crawl())}function pr(e){let{extra:t}=e.node;if(t||(t=e.node.extra={}),void 0===t.confident){const r=e.get("value"),{confident:n,value:s}=r.evaluate();t.computed=s,t.confident=n}return t}var ur={analyze:{enter(e){const{node:t}=e,r=e.get("attributes");let n=e.has("var")?E(e):void 0;if(r.some(fr));else for(const t of r){const r=t.node,{name:s}=r;mr(s)?(n??=E(e),(Ot.node.extra??{}).isInteractive=!0):pr(t).confident||(n??=E(e))}const s=t.var?t.var.name:t.name.value;void 0!==n&&R(0,n,t,s,`#${e.get("name").evaluate().value}`)}},translate:{enter(e){const{extra:t}=e.node,r=h(),n=e.get("name"),s=e.get("attributes"),o=(0,f.getTagDef)(e),a=s.some((e=>e.isMarkoSpreadAttribute())),i=We(e),l=S(e);if(r&&t.tagNameNullable&&Ze(e),e.has("var"))if(r)dr(e,u.types.arrowFunctionExpression([],u.types.blockStatement([u.types.throwStatement(u.types.newExpression(u.types.identifier("Error"),[u.types.stringLiteral("Cannot reference DOM node from server")]))])));else{const r=e.node.var.name,n=e.scope.getBinding(r).referencePaths;let s;for(const e of n){const n=S(e);e.parentPath?.isCallExpression()?e.parentPath.replaceWith(u.types.expressionStatement(we(n,t.reserve))):(s??=u.types.identifier(r+"_getter"),e.replaceWith(Se("bindFunction",xe(n,t.reserve.section),s)))}s&&Ot.pushContainer("body",u.types.variableDeclaration("const",[u.types.variableDeclarator(s,u.types.arrowFunctionExpression([Ut],u.types.memberExpression(Ut,F(t.reserve),!0)))]))}let c;if(t.reserve&&(c=F(t.reserve),Re(e,32)),i`<${n.node}`,a){const t=Se("attrs",Ut,lr(e));r?i`${t}`:e.insertBefore(u.types.expressionStatement(t))}else for(const e of s){const t=e.node.name,n=e.node.extra??{},s=e.get("value"),{confident:o,computed:a,valueReferences:p}=n;switch(t){case"class":case"style":{const e=`${t}Attr`;o?i`${Ce()[e](a)}`:r?i`${Se(e,s.node)}`:Ct("render",l,p,u.types.expressionStatement(Se(e,u.types.memberExpression(Ut,c,!0),s.node)));break}default:o?i`${Ce().attr(t,a)}`:r?mr(t)?_t(l,p):i`${Se("attr",u.types.stringLiteral(t),s.node)}`:mr(t)?Ct("effect",l,p,u.types.expressionStatement(Se("on",u.types.memberExpression(Ut,c,!0),u.types.stringLiteral("-"===(d=t).charAt(2)?d.slice(3):d.charAt(2).toLowerCase()+d.slice(3)),s.node)),s.node):Ct("render",l,p,u.types.expressionStatement(Se("attr",u.types.memberExpression(Ut,c,!0),u.types.stringLiteral(t),s.node)))}}var d;if(o&&o.parseOptions?.openTagOnly)switch(o.htmlType){case"svg":case"math":i`/>`;break;default:i`>`}else i`>`;r&&t.tagNameNullable&&e.insertBefore(u.types.ifStatement(n.node,He(e)))[0].skip(),Me(e)},exit(e){const{extra:t}=e.node,r=h(),n=(0,f.getTagDef)(e)?.parseOptions?.openTagOnly;r&&t.tagNameNullable&&Ke(e),e.insertBefore(e.node.body.body).forEach((e=>e.skip())),n||We(e)`${e.node.name}>`,r&&t.tagNameNullable&&e.insertBefore(u.types.ifStatement(e.node.name,He(e)))[0].skip(),t.reserve&&Je(e),$e(e),e.remove()}}};function fr(e){return"MarkoSpreadAttribute"===e.type}function mr(e){return/^on[A-Z-]/.test(e)}var yr={analyze:{enter(e){!function(e){e.has("var")&&q(E(e),e.get("var"));const t=e.get("body");t.get("body").length&&t.get("params").length&&q(E(t),t)}(e);const t=e.get("body");t.get("body").length&&k(t),(0,f.getTagDef)(e)?.template&&R(0,E(e),e.node,"#childScope");const r=(0,f.loadFileForTag)(e),n=r?.ast.program.extra;(n?.isInteractive||n?.hasInteractiveChild)&&((Ot.node.extra??{}).hasInteractiveChild=!0)},exit(e){const t=(0,f.getTagDef)(e),r=t?.template,n=E(e);r&&(e.node.extra.attrsReferences=V(n,e.node.attributes.filter((e=>e.extra?.valueReferences)).map((e=>[e.extra,"valueReferences"]))))}},translate:{enter(e){Re(e),h()&&Ze(e)},exit(e){h()?function(e){const t=e.get("body"),{node:r}=e;let n;if(Ke(e),Mt(t),u.types.isStringLiteral(r.name)){const{file:t}=e.hub,s=r.name.value,o=hr(e);n=u.types.memberExpression((0,f.importDefault)(t,o,s),u.types.identifier("_"))}else n=r.name;const s=r.var,o=lr(e,!0),a=cr(o);if(r.extra.tagNameNullable){let t,r=br(n,lr(e));if(a){t=e.scope.generateUidIdentifier("renderBody");const[r]=e.insertBefore(u.types.variableDeclaration("const",[u.types.variableDeclarator(t,Se("createRenderer",u.types.arrowFunctionExpression(a.params.length?[u.types.objectPattern([u.types.objectProperty(u.types.identifier("value"),u.types.arrayPattern(a.params))])]:[],a.body)))]));r.skip(),o.properties[o.properties.length-1]=u.types.objectProperty(u.types.identifier("renderBody"),t)}s&&(dr(e,u.types.unaryExpression("void",u.types.numericLiteral(0)),"let"),r=u.types.assignmentExpression("=",s,r)),e.replaceWith(u.types.ifStatement(n,u.types.expressionStatement(r),t&&gr(t)))[0].skip()}else if(s){const t=S(e);dr(e,br(n,o,Se("register",Se("createRenderer",u.types.arrowFunctionExpression([],u.types.blockStatement([]))),u.types.stringLiteral(It(t,r.var.extra?.reserve)),T(t)))),function(e){ct(e,!0)}(t),e.remove()}else e.replaceWith(gr(n,o))[0].skip()}(e):function(e){const t=S(e),r=S(e.get("body")),{node:n}=e,s=We(e),o=n.extra.reserve,{file:a}=e.hub,i=n.name.value,l=hr(e),c=(0,f.loadFileForTag)(e).ast.program,d=(0,f.importNamed)(a,l,"setup",i);let p;c.extra.attrs&&(p=(0,f.importNamed)(a,l,"attrs",`${i}_attrs`)),s`${(0,f.importNamed)(a,l,"template",`${i}_template`)}`,function(e,t){const r=Ae(S(e));je(S(e)).push(`${_e[47]}`,t.name,_e[38]),De(r,String.fromCharCode(47)),r.push(t,String.fromCharCode(38))}(e,(0,f.importNamed)(a,l,"walks",`${i}_walks`)),c.extra.closures&&at(t).push(Se("childClosures",(0,f.importNamed)(a,l,"closures",`${i}_closures`),F(o)));let m=lr(e);if(r!==t&&(m??=u.types.objectExpression([]),m.properties.push(u.types.objectProperty(u.types.identifier("renderBody"),Se("bindRenderer",Ut,Ue(r))))),n.var){const e=ht(n.var.extra.reserve);e.register=!0,Ct("render",t,void 0,u.types.expressionStatement(Se("setTagVar",Ut,F(o),e.identifier)))}Ct("render",t,void 0,u.types.expressionStatement(u.types.callExpression(d,[we(t,o)]))),m&&p&&Tt(t,e.node.extra.attrsReferences,{identifier:p,hasDownstreamIntersections:()=>!0},m,we(t,o),Se("inChild",F(o),u.types.identifier(p.name))),e.remove()}(e)}}};function hr(e){const{node:t,hub:{file:r}}=e,n=u.types.isStringLiteral(t.name);let s;if(n){const t=(0,f.getTagDef)(e),n=t?.template;s=n&&(0,f.resolveRelativePath)(r,n)}if(!s)throw e.get("name").buildCodeFrameError(`Unable to find entry point for custom tag <${n?t.name.value:t.name}>.`);const o=r.metadata.marko.tags;return o.includes(s)||o.push(s),s}function gr(e,...t){return u.types.expressionStatement(br(e,...t))}function br(e,...t){return u.types.callExpression(e,t.filter(Boolean))}function vr(e){const t=e.body;return 1===t.length&&u.types.isExpressionStatement(t[0])?t[0].expression:u.types.isBlockStatement(e)?e:u.types.blockStatement(t)}var xr={analyze:{enter(e){R(0,E(e),e.node,"dynamicTagName","#text"),yr.analyze.enter(e)},exit(e){e.node.extra.attrsReferences=V(E(e),e.node.attributes.filter((e=>e.extra?.valueReferences)).map((e=>[e.extra,"valueReferences"]))),W(e,"attrsReferences",e.node.extra.reserve)}},translate:{enter(e){Re(e,37),Ne(e),h()&&Ze(e)},exit(e){const{node:t}=e;let r=t.name;if(u.types.isStringLiteral(r)){const{file:t}=e.hub,n=hr(e);r=(0,f.importDefault)(t,n,r.value)}if("class"===e.node.extra?.___featureType)if((0,f.importDefault)(e.hub.file,`marko/src/runtime/helpers/tags-compat-${h()?"html":"dom"}.js`,"marko_tags_compat"),h()){const t=(0,f.importNamed)(e.hub.file,"marko/src/runtime/helpers/tags-compat-html.js","serialized5to6");Ot.pushContainer("body",u.types.expressionStatement(u.types.callExpression(t,[u.types.identifier(r.name),u.types.stringLiteral((0,f.getTemplateId)(v(),(0,f.loadFileForTag)(e).metadata.marko.id))])))}else Ot.pushContainer("body",u.types.expressionStatement(Se("register",u.types.stringLiteral((0,f.getTemplateId)(v(),(0,f.loadFileForTag)(e).metadata.marko.id)),u.types.identifier(r.name))));if(h()){Ke(e),Mt(e.get("body"));const n=lr(e,!0),s=u.types.isObjectExpression(n)&&!n.properties.length,o=cr(n),a=[r,s?u.types.nullLiteral():n];o&&(n.properties.pop(),a.push(Se("createRenderer",u.types.arrowFunctionExpression(o.params.length?[u.types.objectPattern([u.types.objectProperty(u.types.identifier("value"),u.types.arrayPattern(o.params))])]:[],vr(o.body)))));const i=Ot.scope.generateUidIdentifier("dynamicScope"),l=Se("dynamicTag",...a);t.var?(dr(e,l),e.remove()):e.replaceWith(u.types.variableDeclaration("const",[u.types.variableDeclarator(i,l)]))[0].skip();const c=S(e);We(e)`${Se("markResumeControlEnd",T(c),F(t.extra.reserve))}`,dt(c).set(u.types.stringLiteral(F(t.extra.reserve).value+"!"),i),dt(c).set(u.types.stringLiteral(F(t.extra.reserve).value+"("),u.types.isIdentifier(r)?u.types.identifier(r.name):r)}else{const n=S(e),s=S(e.get("body")),o=n!==s&&Ue(s),a=t.extra?.reserve,i=yt(n,a);i.build=()=>Se("conditional",F(a),gt(i,[Ut]),bt(i),vt(i)),i.hasDownstreamIntersections=()=>!0,Tt(n,t.extra?.nameReferences,i,o?u.types.logicalExpression("||",r,o):r);const l=lr(e,!0);if(!u.types.isObjectExpression(l)||l.properties.length||o){const r=u.types.arrowFunctionExpression([],l),s=Ot.scope.generateUidIdentifier(e.get("name").toString()+"_input");let i=!1;Tt(n,t.extra?.attrsReferences,{get identifier(){return i||(Ot.pushContainer("body",u.types.variableDeclaration("const",[u.types.variableDeclarator(s,Se("dynamicTagAttrs",F(a),o))])),i=!0),s},hasDownstreamIntersections:()=>!0},r)}e.remove()}}}},wr={analyze:{enter(e){const t=e.get("body");t.get("body").length&&k(t)}},translate:{enter(e){if(S(e.get("body")),function(e){const t=Be(S(e));return Boolean(t.length>1||t[0])}(e))throw e.get("name").buildCodeFrameError("Dynamic @tags cannot be mixed with body content.")},exit(e){(0,f.assertNoVar)(e),Ke(e);const t=(0,f.findParentTag)(e);if(!t)throw e.get("name").buildCodeFrameError("@tags must be nested within another tag.");const r=t.node.extra;if(0===r.tagNameType)throw e.get("name").buildCodeFrameError("@tags cannot be nested under native tags.");const n=e.node.name.value.slice(1),s=r.nestedAttributeTags[n],o=lr(e,!0);if(s.dynamic)s.identifier||(s.identifier=t.scope.generateUidIdentifier(n),t.insertBefore(s.repeated?u.types.variableDeclaration("const",[u.types.variableDeclarator(s.identifier,u.types.arrayExpression([]))]):u.types.variableDeclaration("let",[u.types.variableDeclarator(s.identifier)])),t.pushContainer("attributes",u.types.markoAttribute(n,s.identifier))),e.replaceWith(u.types.expressionStatement(s.repeated?u.types.callExpression(u.types.memberExpression(s.identifier,u.types.identifier("push")),[o]):u.types.assignmentExpression("=",s.identifier,o)));else if(s.repeated){const r=t.get("attributes").find((e=>e.node.name===n));r?r.get("value").pushContainer("elements",o):t.pushContainer("attributes",u.types.markoAttribute(n,u.types.arrayExpression([o]))),e.remove()}else t.pushContainer("attributes",u.types.markoAttribute(n,o)),e.remove()}}},kr={analyze:{enter(e){const t=(0,f.getTagDef)(e),r=w(e),n=t?.analyzer?.hook;if(n)er(n,e);else switch(r){case 0:ur.analyze.enter(e);break;case 1:yr.analyze.enter(e);break;case 3:wr.analyze.enter(e);break;case 2:xr.analyze.enter(e)}},exit(e){const t=(0,f.getTagDef)(e),r=w(e),n=t?.analyzer?.hook;if(n)tr(n,e);else if(0!==r)switch(sr(e),r){case 1:yr.analyze.exit(e);break;case 3:break;case 2:xr.analyze.exit(e)}}},translate:{enter(e){const t=(0,f.getTagDef)(e),r=e.node.extra;if((0,f.assertNoArgs)(e),t?.translator)return t.translator.path&&e.hub.file.metadata.marko.watchFiles.push(t.translator.path),void er(t.translator.hook,e);for(const t of e.get("attributes"))if(t.isMarkoAttribute()){if(t.node.arguments)throw t.buildCodeFrameError(`Unsupported arguments on the "${t.node.name}" attribute.`);if(t.node.modifier){if(!(0,f.isNativeTag)(t.parentPath))throw t.buildCodeFrameError(`Unsupported modifier "${t.node.modifier}".`);t.node.name+=`:${t.node.modifier}`}}if(r.tagNameDynamic&&r.tagNameNullable&&!e.get("name").isIdentifier()&&h()){const t=e.scope.generateUidIdentifier("tagName"),[r]=e.insertBefore(u.types.variableDeclaration("const",[u.types.variableDeclarator(t,e.node.name)]));r.skip(),e.set("name",t)}switch(r.tagNameType){case 0:ur.translate.enter(e);break;case 1:yr.translate.enter(e);break;case 2:xr.translate.enter(e);break;case 3:wr.translate.enter(e)}},exit(e){const t=(0,f.getTagDef)(e)?.translator;if(t)tr(t.hook,e);else switch(e.node.extra.tagNameType){case 0:ur.translate.exit(e);break;case 1:yr.translate.exit(e);break;case 2:xr.translate.exit(e);break;case 3:wr.translate.exit(e)}}}},Er="marko-core";function Sr(e){return e.isMarkoTag()&&(0,f.getTagDef)(e)?.taglibId===Er}function Cr(e,t){return Sr(e)&&e.node.name.value===t}var Tr={script:"escapeScript",style:"escapeStyle"},Dr={analyze(e){const{node:t}=e,{confident:r,computed:n}=pr(e);(!r||!t.escape&&n)&&(R(0,E(e),t,"placeholder","#text"),function(e){let t=e.getPrevSibling();for(;t.node&&Ir(t);)t=t.getPrevSibling();if((t.node||u.types.isProgram(e.parentPath))&&(!u.types.isMarkoTag(t)||!(0,f.isNativeTag)(t)))return e.node.extra.needsMarker=!0;let r=e.getNextSibling();for(;r.node&&Ir(r);)r=r.getNextSibling();if((r.node||u.types.isProgram(e.parentPath))&&(!u.types.isMarkoTag(r)||!(0,f.isNativeTag)(r)))return e.node.extra.needsMarker=!0;e.node.extra.needsMarker=!1}(e))},translate(e){const t=h(),r=We(e),n=e.node.extra,{confident:s,computed:o,valueReferences:a,reserve:i}=n,l=t||s&&(e.node.escape||!o),c=l?e.node.escape?Tr[function({parentPath:e}){return e.isMarkoTag()&&(0,f.isNativeTag)(e)&&e.node.name.value||""}(e)]||"escapeXML":"toString":e.node.escape?"data":"html";s&&l?r`${Ce()[c](o)}`:(n.needsMarker?Re(e,37):(t||r` `,Re(e,32)),t?(r`${Se(c,e.node.value)}`,Je(e)):Ct("render",S(e),a,u.types.expressionStatement("data"===c?Se("data",u.types.memberExpression(Ut,F(i),!0),e.node.value):Se("html",Ut,e.node.value,F(i))))),Ne(e),e.remove()}};function Ir(e){return u.types.isMarkoComment(e)||u.types.isMarkoTag(e)&&Sr(e)&&["let","const","effect","lifecycle","attrs","get","id"].includes(e.node.name.value)}var Ar={translate(e){if(h()){if(e.node.static)return;e.replaceWithMultiple(e.node.body)}else e.node.static?e.replaceWithMultiple(e.node.body):(Ct("render",S(e),e.node.extra?.bodyReferences,e.node.body),e.remove())}},jr=/^\[if |`}e.remove()}},_r={parse(e){const{node:t}=e;e.replaceWith((0,f.parseStatements)(e.hub.file,t.rawValue,t.start,t.end)[0])},parseOptions:{rootOnly:!0,rawOpenTag:!0,openTagOnly:!0,ignoreAttributes:!0,relaxRequireCommas:!0},autocomplete:[{displayText:'import from ""',description:"Use to import external modules, follows the same syntax as JavaScript imports.",snippet:'import ${2} from "${1:path}"',descriptionMoreURL:"https://markojs.com/docs/syntax/#importing-external-files"}]},Mr={parse(e){const{node:t}=e;e.replaceWith((0,f.parseStatements)(e.hub.file,t.rawValue,t.start,t.end)[0])},parseOptions:{rootOnly:!0,rawOpenTag:!0,openTagOnly:!0,ignoreAttributes:!0,relaxRequireCommas:!0},autocomplete:[{displayText:"export "}]},$r={analyze(e){if(e.has("var")){const t=e.get("var"),r=t.getBindingIdentifiers();q(E(e),t),(Ot.node.extra??={}).attrs={bindings:r,var:t.node}}},translate(e){const t=Ot.node.extra?.attrs?.bindings;if(t)for(const e in t)ht(t[e].extra.reserve);e.remove()},attributes:{},autocomplete:[{displayText:"attrs/{ ... }",description:"Use to receive the attributes passed into this template.",snippet:"attrs/{ $1 }$2"}]};function Nr(e){const t=e.body;return 1===t.length?t[0]:u.types.isBlockStatement(e)?e:u.types.blockStatement(t)}var Rr={analyze:{enter(e){R(0,E(e),e.node,"if","#text"),yr.analyze.enter(e)},exit(e){sr(e),Or(e)}},translate:{enter(e){const{node:t}=e,[r]=t.attributes;if((0,f.assertNoVar)(e),(0,f.assertNoParams)(e),!u.types.isMarkoAttribute(r)||!r.default)throw e.get("name").buildCodeFrameError("The '' tag requires a default attribute like ''.");if(t.attributes.length>1){const r=t.attributes[1].loc?.start,n=t.attributes[t.attributes.length-1].loc?.end,s="The '' tag only supports a default attribute.";throw null==r||null==n?e.get("name").buildCodeFrameError(s):e.hub.buildError({loc:{start:r,end:n}},s,Error)}Re(e,37),Ne(e),h()&&Ze(e)},exit(e){Ur(e)}},attributes:{},autocomplete:[{snippet:"if=${1:condition}",description:"Use to display content only if the condition is met.",descriptionMoreURL:"https://markojs.com/docs/core-tags/#if-else-if-else"}]},Fr=new WeakMap;function Pr(e,t){const r=Fr.get(e)??[],n=e.getNextSibling(),s=!(Cr(n,"else")||Cr(n,"else-if"));return r.push({tag:e,section:t}),s||Fr.set(n,r),[s,r]}function Or(e){const t=E(e),r=E(e.get("body")),[n,s]=Pr(e,r);if(n){const e=s[0].tag.node.extra,r=V(t,s.filter((({tag:e})=>e.node.attributes[0]?.extra?.valueReferences)).map((({tag:e})=>[e.node.attributes[0].extra,"valueReferences"])));e.conditionalReferences=r,e.isStateful=!!r,e.singleNodeOptimization=s.every((({tag:e})=>1===e.node.body.body.length))}}function Ur(e){const t=e.get("body"),r=S(e),n=S(t),[s,o]=Pr(e,n),a=o[0].tag.node.extra,i=a.isStateful,l=a.singleNodeOptimization;if(h()&&(i&&(l||Ve(t)`${Se("markResumeScopeStart",T(n))}`,ft(e,(e=>u.types.assignmentExpression("=",j(n),e))),dt(n).set(u.types.stringLiteral("_"),Se("serializedScope",T(r)))),Ke(e),Mt(t)),s){const{extra:t}=o[0].tag.node;if(g()){let e=u.types.nullLiteral();for(let r=o.length;r--;){const{tag:n,section:s}=o[r],[a]=n.node.attributes,l=Ue(s);ot(n,(e=>Se("inConditionalScope",e,F(t.reserve)))),i&&qe(s,!0),n.remove(),e=a?u.types.conditionalExpression(a.value,l,e):l}const n=yt(r,t.reserve);n.build=()=>Se("conditional",F(t.reserve),gt(n,[Ut])),n.hasDownstreamIntersections=()=>o.some((e=>at(e.section).length>0)),Tt(r,t.conditionalReferences,n,e)}else{const n=We(e),s=e.getNextSibling(),a=e.scope.generateUidIdentifier("ifScopeId"),c=j(o[0].section),d=e.scope.generateUidIdentifier("ifRenderer");let p;for(let e=o.length;e--;){const{tag:t,section:r}=o[e];j(r,!0).name=c.name,i&&(t.node.body.body.push(u.types.expressionStatement(Se("register",u.types.assignmentExpression("=",d,Se("createRenderer",u.types.arrowFunctionExpression([],u.types.blockStatement([])))),u.types.stringLiteral(It(r,"renderer"))))),l&&t.node.body.body.push(u.types.expressionStatement(u.types.assignmentExpression("=",a,T(r)))));const[n]=t.node.attributes,s=Nr(t.node.body);p=n?u.types.ifStatement(n.value,s,p):s,t.remove()}i?(s.insertBefore([u.types.variableDeclaration("let",[l&&u.types.variableDeclarator(a),u.types.variableDeclarator(c),u.types.variableDeclarator(d)].filter(Boolean)),p]),l?n`${Se("markResumeControlSingleNodeEnd",T(r),F(t.reserve),a)}`:n`${Se("markResumeControlEnd",T(r),F(t.reserve))}`,dt(r).set(u.types.stringLiteral(F(t.reserve).value+"!"),c),dt(r).set(u.types.stringLiteral(F(t.reserve).value+"("),d)):s.insertBefore(p)}}}var Br={analyze:{enter(e){yr.analyze.enter(e)},exit(e){Or(e)}},translate:{enter(e){const{node:t}=e,[r]=t.attributes;if((0,f.assertNoVar)(e),(0,f.assertNoParams)(e),!u.types.isMarkoAttribute(r)||!r.default)throw e.get("name").buildCodeFrameError("The '' tag requires a default attribute like ''.");if(t.attributes.length>1){const r=t.attributes[1].loc?.start,n=t.attributes[t.attributes.length-1].loc?.end,s="The '' tag only supports a default attribute.";throw null==r||null==n?e.get("name").buildCodeFrameError(s):e.hub.buildError({loc:{start:r,end:n}},s,Error)}},exit(e){Ur(e)}},attributes:{},autocomplete:[{snippet:"else-if=${1:condition}",description:"Use after an or tag to display content if those conditions do not match and this one does.",descriptionMoreURL:"https://markojs.com/docs/core-tags/#if-else-if-else"}]},zr={analyze:{enter(e){yr.analyze.enter(e)},exit(e){Or(e)}},translate:{enter(e){const{node:t}=e,[r]=t.attributes;if((0,f.assertNoVar)(e),(0,f.assertNoParams)(e),t.attributes.length>1||r&&"if"!==r.name){const r=t.attributes[1].loc?.start,n=t.attributes[t.attributes.length-1].loc?.end,s="The '' tag only supports an if attribute.";throw null==r||null==n?e.get("name").buildCodeFrameError(s):e.hub.buildError({loc:{start:r,end:n}},s,Error)}},exit(e){Ur(e)}},attributes:{},autocomplete:[{description:"Use after an or tag to display content if those conditions do not match.",descriptionMoreURL:"https://markojs.com/docs/core-tags/#if-else-if-else"}]},qr={translate(e){const{node:t}=e,[r]=t.attributes;if((0,f.assertNoParams)(e),Xe(e),!t.var)throw e.get("name").buildCodeFrameError("The 'const' tag requires a tag variable.");if(!r)throw e.get("name").buildCodeFrameError("The 'const' tag requires a default attribute.");if(t.attributes.length>1||!u.types.isMarkoAttribute(r)||!r.default&&"value"!==r.name)throw e.get("name").buildCodeFrameError("The 'const' tag only supports the 'default' attribute.");if(g()){const t=S(e),s=r.extra?.valueReferences;Tt(t,s,(n=e.get("var")).isIdentifier()?ht(n.node.extra.reserve):wt(Object.values(n.getBindingIdentifiers()),n.node),r.value)}else dr(e,r.value);var n;e.remove()},attributes:{},autocomplete:[{description:"Use to create an constant binding.",descriptionMoreURL:"https://markojs.com/docs/core-tags/#const"}]},Wr={analyze(e){R(1,E(e),e.node,"cleanup"),(Ot.node.extra??{}).isInteractive=!0},translate:{exit(e){const{node:t}=e,[r]=t.attributes;if((0,f.assertNoParams)(e),Xe(e),!r)throw e.get("name").buildCodeFrameError("The 'effect' tag requires a default attribute.");if(t.attributes.length>1||!u.types.isMarkoAttribute(r)||!r.default&&"value"!==r.name)throw e.get("name").buildCodeFrameError("The 'effect' tag only supports the 'default' attribute.");const n=S(e);if(g()){const{value:t}=r;let s=null;(u.types.isFunctionExpression(t)||u.types.isArrowFunctionExpression(t)&&u.types.isBlockStatement(t.body))&&(s=t.body.body,u.types.traverse(t.body,(e=>{u.types.isReturnStatement(e)&&(s=null)}))),Ct("effect",n,r.extra?.valueReferences,s||u.types.expressionStatement(Se("userEffect",Ut,F(e.node.extra.reserve),r.value)),t,!!s)}else _t(n,r.extra?.valueReferences);e.remove()}},attributes:{},autocomplete:[{description:"Use to create a side effects.",descriptionMoreURL:"https://markojs.com/docs/core-tags/#effect"}]},Vr={analyze:{enter(e){yr.analyze.enter(e),R(1,E(e),e.node,"cleanup"),(Ot.node.extra??{}).isInteractive=!0},exit(e){yr.analyze.exit(e);const t=E(e);e.node.extra.attrsReferences=V(t,e.node.attributes.filter((e=>e.extra?.valueReferences)).map((e=>[e.extra,"valueReferences"])))}},translate:{exit(e){const{node:t}=e;(0,f.assertNoParams)(e),Xe(e);const r=S(e);if(g()){const n=lr(e);Ct("effect",r,t.extra.attrsReferences,u.types.expressionStatement(Se("lifecycle",Ut,F(e.node.extra.reserve),n)),t.attributes.map((e=>e.value)))}else _t(r,t.extra.attrsReferences);e.remove()}},attributes:{},autocomplete:[{description:"Use to create a side effects.",descriptionMoreURL:"https://markojs.com/docs/core-tags/#effect"}]},Hr={translate(e){const{node:t}=e,{var:r}=t,n=Se("nextTagId");if((0,f.assertNoArgs)(e),(0,f.assertNoAttributes)(e),Xe(e),(0,f.assertNoParams)(e),!t.var)throw e.get("name").buildCodeFrameError("The 'id' tag requires a tag variable.");if(!u.types.isIdentifier(r))throw e.get("var").buildCodeFrameError("The 'id' tag cannot be destructured");if(h())e.replaceWith(u.types.variableDeclaration("const",[u.types.variableDeclarator(t.var,n)]));else{const t=ht(r.extra.reserve);Tt(S(e),void 0,t,n),e.remove()}},attributes:{},autocomplete:[{displayText:"id/",description:"Use to create a unique identifier.",snippet:"id/${1:name}",descriptionMoreURL:"https://markojs.com/docs/core-tags/#id"}]},Zr={analyze:{enter(e){const t=function(e){return e.node.extra??={},u.types.isMarkoTag(e.parentPath?.parent)&&(0,f.getTagDef)(e.parentPath.parentPath)?.html?e.node.extra.isOnlyChild=1===e.parent.body.length:e.node.extra.isOnlyChild=!1}(e),r=t?e.parentPath.parent:void 0,n=r?.name?.value;R(0,E(e),t?r:e.node,"for",t?`#${n}`:"#text"),yr.analyze.enter(e)},exit(e){sr(e);const t=E(e);e.node.extra.attrsReferences=V(t,e.node.attributes.filter((e=>u.types.isMarkoAttribute(e)&&void 0!==e.extra?.valueReferences)).map((e=>[e.extra,"valueReferences"]))),e.node.extra.isStateful=!!e.node.extra.attrsReferences&&!Object.keys(e.node.extra.nestedAttributeTags).length,e.node.extra.singleNodeOptimization=1===e.node.body.body.length}},translate:{enter(e){!function(e){const t=e.node.attributes,r=e.node.body.params.length>0;if((0,f.assertNoVar)(e),Jr(t,"of")){if((0,f.assertAllowedAttributes)(e,["of","by"]),!r)throw e.buildCodeFrameError("Invalid 'for of' tag, missing |value, index| params.")}else if(Jr(t,"in")){if((0,f.assertAllowedAttributes)(e,["in","by"]),!r)throw e.buildCodeFrameError("Invalid 'for in' tag, missing |key, value| params.")}else{if(!Jr(t,"to"))throw e.buildCodeFrameError("Invalid 'for' tag, missing an 'of', 'in' or 'to' attribute.");(0,f.assertAllowedAttributes)(e,["from","to","step","by"])}}(e);const{extra:{isOnlyChild:t}}=e.node;t||(Re(e,37),Ne(e)),h()&&Ze(e)},exit(e){h()?Yr.exit(e):Kr.exit(e)}},attributes:{of:{type:"expression",autocomplete:[{description:"Iterates over a list of items."}]},in:{type:"expression",autocomplete:[{description:"Iterates over the keys and values of an object."}]},to:{type:"number",autocomplete:[{description:"Iterates up to the provided number (inclusive)"}]},from:{type:"number",autocomplete:[{description:"Iterates starting from the provided number (inclusive)"}]},step:{type:"number",autocomplete:[{description:"The amount to increment during each interation (with from/to)"}]}},autocomplete:[{snippet:"for|${1:value, index}| of=${3:array}",description:"Use to iterate over lists, object properties, or between ranges.",descriptionMoreURL:"https://markojs.com/docs/core-tags/#iterating-over-a-list"},{snippet:"for|${1:name, value}| in=${3:object}",descriptionMoreURL:"https://markojs.com/docs/core-tags/#iterating-over-an-objects-properties"},{snippet:"for|${1:index}| from=${2:number} to=${3:number} step=${4:number}",descriptionMoreURL:"https://markojs.com/docs/core-tags/#iterating-between-a-range-of-numbers"}]},Kr={exit(e){const t=e.get("body"),r=S(e),n=S(t),{node:s}=e,{attributes:o,extra:{isOnlyChild:a,attrsReferences:i}}=s,{extra:{reserve:l}}=a?e.parentPath.parent:e.node,c=Object.values(t.getBindingIdentifiers());ot(e,(e=>Se("inLoopScope",e,F(l)))),e.remove();const d=Ue(n),p=Jr(o,"of"),f=Jr(o,"to"),m=Jr(o,"in"),y=[];let h;if(p)h="loopOf",y.push(p.value);else if(m)h="loopIn",y.push(m.value);else{if(!f)throw e.get("name").buildCodeFrameError("Invalid tag. Expected either an 'of', 'to', or 'in' attribute.");{const e=Jr(o,"from"),t=Jr(o,"step");h="loopTo",y.push(f.value,e?e.value:u.types.numericLiteral(0),t?t.value:u.types.numericLiteral(1))}}const g=Jr(o,"by");g&&y.push(g.value);const b=yt(r,l);b.build=()=>Se(h,F(l),d),b.hasDownstreamIntersections=()=>{for(const e of c)if(yt(n,e.extra.reserve).hasDownstreamIntersections())return!0;return at(n).length>0},Tt(r,i,b,u.types.arrayExpression(y))}},Yr={exit(e){const t=e.get("body"),r=S(e),n=S(t),{node:s}=e,{attributes:o,body:{body:a,params:i},extra:{isStateful:l,singleNodeOptimization:c,isOnlyChild:d}}=s,{extra:{reserve:p}}=d?e.parentPath.parent:s,f=e.get("name"),m=Jr(o,"of"),y=Jr(o,"in"),h=Jr(o,"to"),g=Jr(o,"by"),b=u.types.blockStatement(a),v=We(e),x=[];let w,k=u.types.identifier("NOO");if(l&&(c||Ve(t)`${Se("markResumeScopeStart",T(n))}`,ft(e,(e=>{const t=Ot.scope.generateUidIdentifier("s");return u.types.callExpression(u.types.arrowFunctionExpression([t],u.types.sequenceExpression([u.types.callExpression(u.types.memberExpression(j(n),u.types.identifier("set")),[k,t]),t])),[e])})),dt(n).set(u.types.stringLiteral("_"),Se("serializedScope",T(r)))),g&&l){const e=Ot.scope.generateUidIdentifier("by");x.push(u.types.variableDeclaration("const",[u.types.variableDeclarator(e,g.value)])),w=[],k=u.types.callExpression(e,w)}if(y){const[e,t]=i;k=e,t&&b.body.unshift(u.types.variableDeclaration("const",[u.types.variableDeclarator(t,u.types.memberExpression(y.value,e,!0))])),x.push(u.types.forInStatement(u.types.variableDeclaration("const",[u.types.variableDeclarator(e)]),y.value,b))}else if(m){let t=m.value,[r,n,s]=i;if(!r)throw f.buildCodeFrameError("Invalid 'for of' tag, missing |value, index| params.");if(!u.types.isIdentifier(r)&&w){const e=Ot.scope.generateUidIdentifier("v");b.body.unshift(u.types.variableDeclaration("const",[u.types.variableDeclarator(r,e)])),r=e}if(n||l){n??=Ot.scope.generateUidIdentifier("i");const t=e.scope.generateUidIdentifierBasedOnNode(n,"i");x.push(u.types.variableDeclaration("let",[u.types.variableDeclarator(t,u.types.numericLiteral(0))])),b.body.unshift(u.types.variableDeclaration("let",[u.types.variableDeclarator(n,u.types.updateExpression("++",t))]))}s&&(u.types.isIdentifier(s)&&(t=s),x.push(u.types.variableDeclaration("const",[u.types.variableDeclarator(s,m.value)]))),w?w.push(r,n):k=n,x.push(u.types.forOfStatement(u.types.variableDeclaration("const",[u.types.variableDeclarator(r)]),t,b))}else if(h){const t=Jr(o,"step")?.value??u.types.numericLiteral(1),r=Jr(o,"from")?.value??u.types.numericLiteral(0);let[n]=i;const s=e.scope.generateUidIdentifier("steps"),a=e.scope.generateUidIdentifier("i"),c=e.scope.generateUidIdentifier("step"),d=e.scope.generateUidIdentifier("from");(n||l)&&(n??=Ot.scope.generateUidIdentifier("i"),k=n,b.body.unshift(u.types.variableDeclaration("const",[u.types.variableDeclarator(n,u.types.binaryExpression("+",d,u.types.binaryExpression("*",a,c)))]))),x.push(u.types.forStatement(u.types.variableDeclaration("let",[u.types.variableDeclarator(d,u.types.logicalExpression("??",r,u.types.numericLiteral(0))),u.types.variableDeclarator(c,u.types.logicalExpression("??",t,u.types.numericLiteral(1))),u.types.variableDeclarator(s,u.types.binaryExpression("/",u.types.binaryExpression("-",h.value,d),c)),u.types.variableDeclarator(a,u.types.numericLiteral(0))]),u.types.binaryExpression("<=",a,s),u.types.updateExpression("++",a),b))}if(l){const t=e.scope.generateUidIdentifier("forScopeIds"),s=j(n);x.unshift(u.types.variableDeclaration("const",[c&&u.types.variableDeclarator(t,u.types.arrayExpression([])),u.types.variableDeclarator(s,u.types.newExpression(u.types.identifier("Map"),[]))].filter(Boolean))),c?(b.body.push(u.types.expressionStatement(u.types.callExpression(u.types.memberExpression(t,u.types.identifier("push")),[T(n)]))),v`${Se("markResumeControlSingleNodeEnd",T(r),F(p),t)}`):v`${Se("markResumeControlEnd",T(r),F(p))}`,dt(r).set(u.types.stringLiteral(F(p).value+"("),u.types.conditionalExpression(u.types.memberExpression(s,u.types.identifier("size")),s,u.types.identifier("undefined")))}Ke(e),Mt(t),b.body.push(u.types.expressionStatement(Se("maybeFlush"))),e.replaceWithMultiple(x)}};function Jr(e,t){return e.find((e=>u.types.isMarkoAttribute(e)&&e.name===t))}var Gr={analyze:{enter(e){0===E(e).id&&((Ot.node.extra??={}).closures=!0),yr.analyze.enter(e)},exit:yr.analyze.exit},translate(e){(0,f.assertNoParams)(e),Xe(e),h()&&Ze(e);const{node:t,hub:{file:r}}=e,[n]=t.attributes;let s;if(!t.var)throw e.get("name").buildCodeFrameError(" requires a variable to be defined, eg .");if(void 0===n)s="$";else{if(!u.types.isMarkoAttribute(n)||!n.default||!u.types.isStringLiteral(n.value))throw e.get("name").buildCodeFrameError("The '' tag requires default attribute that is a string that resolves to a Marko file like '' or '\">'.");if(t.attributes.length>1){const r=t.attributes[1].loc?.start,n=t.attributes[t.attributes.length-1].loc?.end,s="The '' tag only supports a default attribute.";throw null==r||null==n?e.get("name").buildCodeFrameError(s):e.hub.buildError({loc:{start:r,end:n}},s,Error)}const o=e.get("attributes")[0].get("value");if("."===n.value.value)s=r.metadata.marko.id;else{const e=(0,f.resolveTagImport)(o,o.node.value);if(!e)throw o.buildCodeFrameError("Unable to resolve template provided to '' tag.");s=(0,f.getTemplateId)(r.markoOpts.optimize,y().resolve(r.opts.filename,"..",e))}}h()?e.replaceWith(u.types.variableDeclaration("const",[u.types.variableDeclarator(t.var,Se("getInContext",u.types.stringLiteral(s)))])):(!function(e,t){const r=t.section,n=yt(r,t);at(r).push(n.identifier),n.build=()=>Se("contextClosure",F(t),u.types.stringLiteral(e),gt(n,[Ut,u.types.identifier(t.name)]))}(s,Object.values(e.get("var").getBindingIdentifiers())[0].extra.reserve),e.remove())},autocomplete:[{displayText:'get/=""',description:"Gets a value provided from another template.",snippet:'get/${1:name}="${2:from}"',descriptionMoreURL:"https://markojs.com/docs/core-tags/#get"}]},Xr={analyze:{enter(e){R(0,E(e),e.node,"put","#text"),yr.analyze.enter(e)},exit(e){yr.analyze.exit(e)}},translate:{enter(e){const{node:t}=e,[r]=t.attributes;if(!t.body.body.length)throw e.buildCodeFrameError("The '' tag requires body content that the context is forwarded through.");if(!u.types.isMarkoAttribute(r)||!r.default)throw e.get("name").buildCodeFrameError("The '' tag requires default attribute like ''.");if(t.attributes.length>1){const r=t.attributes[1].loc?.start,n=t.attributes[t.attributes.length-1].loc?.end,s="The '' tag only supports a default attribute.";throw null==r||null==n?e.get("name").buildCodeFrameError(s):e.hub.buildError({loc:{start:r,end:n}},s,Error)}if(h())Ze(e),e.insertBefore(u.types.expressionStatement(Se("pushContext",u.types.stringLiteral(e.hub.file.metadata.marko.id),r.value)));else{Re(e,37),Ne(e);const n=S(e.get("body")),s=Ue(n);!function(e,t,r,n,s){const o=t.section,a=F(t),i=u.types.stringLiteral(`${t.id}:`),l=ht(t,i);Tt(o,r,l,n),l.hasDynamicSubscribers=!0,l.hasDownstreamIntersections=()=>!0,Ct("render",t.section,void 0,u.types.expressionStatement(Se("initContextProvider",Ut,a,i,u.types.stringLiteral(e),s)))}(e.hub.file.metadata.marko.id,t.extra.reserve,r.extra?.valueReferences,r.value,s)}},exit(e){(0,f.assertNoParams)(e),(0,f.assertNoVar)(e),h()&&(Ke(e),Mt(e.get("body")),e.insertAfter(u.types.expressionStatement(Se("popContext")))),e.replaceWithMultiple(e.node.body.body)}},autocomplete:[{displayText:"put=",description:"Sets a value which can be read from a child template.",snippet:"put=${1:value}",descriptionMoreURL:"https://markojs.com/docs/core-tags/#put"}]},Qr={migrate:[e=>e.remove()]},en={taglibId:Er,"":_r,"":Mr,"":$r,"":Rr,"":Br,"":zr,"":Zr,"":{translate(e){const{node:t}=e,r=t.var,n=t.attributes.find((e=>u.types.isMarkoAttribute(e)&&(e.default||"value"===e.name)))??u.types.markoAttribute("value",u.types.identifier("undefined"));if((0,f.assertNoParams)(e),Xe(e),!r)throw e.get("name").buildCodeFrameError("The 'let' tag requires a tag variable.");if(!u.types.isIdentifier(r))throw e.get("var").buildCodeFrameError("The 'let' cannot be destructured.");if(g()){const t=S(e),s=r.extra.reserve,o=ht(s),a=n.extra?.valueReferences;if(a){let r;Tt(t,a,{get identifier(){return r||(r=e.scope.generateUidIdentifier(o.identifier.name+"_init"),Ot.pushContainer("body",u.types.variableDeclaration("const",[u.types.variableDeclarator(r,Se("initValue",F(s),o.identifier))]))),r},hasDownstreamIntersections:()=>o.hasDownstreamIntersections()},n.value)}else Tt(t,a,o,n.value);!function(e,t){for(const r of e.constantViolations)Zt.set(r.node,t)}(e.scope.getBinding(s.name),((e,t)=>function(e,t,r){return Se("queueSource",xe(r,e.section),e.identifier,t)}(o,t,S(e))))}else dr(e,n.value);e.remove()},attributes:{},autocomplete:[{description:"Use to create a mutable binding.",descriptionMoreURL:"https://markojs.com/docs/core-tags/#let"}]},"":qr,"":Wr,"":Vr,"":Hr,"":{analyze(){},translate:{enter(e){Me(e),We(e)``,e.remove()}},parseOptions:{text:!0},attributes:{},autocomplete:[{description:"Use to create an html comment that is not stripped from the output.",descriptionMoreURL:"https://markojs.com/docs/core-tags/#html-comment"}]},"":{translate:{enter(e){if(h()&&Ze(e),!e.node.var)throw e.get("name").buildCodeFrameError(" requires a variable to be defined, eg .")},exit(e){h()&&Ke(e),e.replaceWith(u.types.variableDeclaration("const",[u.types.variableDeclarator(e.node.var,Se("createRenderer",u.types.arrowFunctionExpression(e.node.body.params,vr(e.node.body))))]))}},attributes:{},autocomplete:[{displayText:"tag/||",description:"Creates a reusable fragment within the template.",snippet:"tag/${1:name}|${2:param1, param2}|",descriptionMoreURL:"https://markojs.com/docs/core-tags/#tag"}]},"":Xr,"":Gr,"":tt,""," \n\n\n \n <${actions.renderBody}/>\n \n \n \n <${body.renderBody}/>\n \n\n\n\n"," \n\n <${renderBody}/>\n \n\n // back to the original value. So we track those values as well,\n // so we can re-set the 's value.\n renderBody; valueChange;\n}/>","import { compressToEncodedURIComponent } from \"lz-string\";\n\n \n\n Open in playground ↗\n\n\n\n\n"," \n \n\n isMatch = !!mq.matches;\n mq.addEventListener(\"change\", listener);\n isMatch = !!mq.matches;\n return () => mq.removeEventListener(\"change\", listener);\n}/>\n\n "," \n\n \n \n \n\n\n
\n <${left.renderBody}/>\n
\n
\n \n \n \n <${right.renderBody}/>\n
\n\n\n {\n if (e.buttons || e.which) {\n const rect = container().getBoundingClientRect();\n const fraction = isVertical \n ? (e.clientY - rect.top) / rect.height \n : (e.clientX - rect.left) / rect.width;\n if (fraction > 0) {\n // it seems a drag event with no position is fired when we stop\n // so we'll ignore that value\n editorSize = Math.min(0.8, Math.max(0.2, fraction));\n }\n } else {\n resizing = false;\n }\n };\n window.addEventListener(\"mousemove\", handler);\n return () => window.removeEventListener(\"mousemove\", handler);\n }/>\n \n\n"," \n \n \n \n \n\n\n\n\n <@left class=\"editor-container\">\n \n <@actions>\n \n @actions>\n <@body>\n \n \n \n \n { \n const e = await import(\"./components/editor\");\n await e.loading;\n activeEditor = e;\n })/>\n @body>\n \n @left>\n <@right>\n \n <@actions>\n \n App Preview \n Compiled (HTML) \n Compiled (DOM) \n \n \n \n @actions>\n <@body>\n \n <${preview} \n type=previewType\n files=files\n selectedFile=selectedFile\n getCompilerOptions=getCompilerOptions\n debounce=debounce/>\n { \n preview = await import(\"./components/preview\");\n })/>\n @body>\n \n @right>\n ","import { compressToEncodedURIComponent, decompressFromEncodedURIComponent } from \"lz-string\";\n\nstatic function getInitialValue() {\n try {\n if (typeof window !== \"undefined\") {\n return JSON.parse(decompressFromEncodedURIComponent(window.location.hash.slice(1)));\n }\n } catch(e) {\n console.error(e);\n }\n}\n\n \n \n {\n try {\n if (!this.isUpdating) {\n value = JSON.parse(decompressFromEncodedURIComponent(window.location.hash.slice(1)));\n } else {\n this.isUpdating = false;\n }\n } catch(e) {\n console.error(e);\n }\n });\n } \n onUpdate() {\n this.isUpdating = true;\n window.location.hash = compressToEncodedURIComponent(JSON.stringify(value));\n }\n onDestroy() {\n window.removeEventListener(\"hashchange\", this.handler);\n }/>\n \n","// src/visitors/program/index.ts\nimport { types as t13 } from \"@marko/compiler\";\n\n// src/util/marko-config.ts\nfunction isOutputHTML() {\n return getMarkoOpts().output === \"html\";\n}\nfunction isOutputDOM() {\n return !isOutputHTML();\n}\nfunction getMarkoOpts() {\n return currentProgramPath.hub.file.markoOpts;\n}\nfunction isOptimize() {\n return getMarkoOpts().optimize;\n}\n\n// src/util/sections.ts\nimport { types as t2 } from \"@marko/compiler\";\n\n// src/util/tag-name-type.ts\nimport { types as t } from \"@marko/compiler\";\nimport { isNativeTag, loadFileForTag } from \"@marko/babel-utils\";\nvar MARKO_FILE_REG = /^<.*>$|\\.marko$/;\nfunction analyzeTagNameType(tag) {\n const extra = tag.node.extra ??= {};\n if (extra.tagNameType === void 0) {\n const name = tag.get(\"name\");\n if (name.isStringLiteral()) {\n extra.tagNameType = name.node.value[0] === \"@\" ? 3 /* AttributeTag */ : isNativeTag(tag) ? 0 /* NativeTag */ : 1 /* CustomTag */;\n if (extra.tagNameType === 1 /* CustomTag */) {\n const childFile = loadFileForTag(tag);\n const childProgram = childFile?.ast.program;\n if (childProgram?.extra.___featureType === \"class\") {\n extra.tagNameType = 2 /* DynamicTag */;\n extra.___featureType = \"class\";\n }\n }\n extra.tagNameNullable = extra.tagNameNullable = false;\n } else {\n const pending = [name];\n let path3;\n let type = void 0;\n let nullable = false;\n while ((path3 = pending.pop()) && type !== 2 /* DynamicTag */) {\n if (path3.isConditionalExpression()) {\n pending.push(path3.get(\"test\"));\n pending.push(path3.get(\"consequent\"));\n if (path3.node.alternate) {\n pending.push(path3.get(\"alternate\"));\n }\n } else if (path3.isLogicalExpression()) {\n if (path3.node.operator === \"||\") {\n pending.push(path3.get(\"left\"));\n } else {\n nullable = true;\n }\n pending.push(path3.get(\"right\"));\n } else if (path3.isAssignmentExpression()) {\n pending.push(path3.get(\"right\"));\n } else if (path3.isBinaryExpression()) {\n type = path3.node.operator !== \"+\" || type !== void 0 ? 2 /* DynamicTag */ : 0 /* NativeTag */;\n } else if (path3.isStringLiteral() || path3.isTemplateLiteral()) {\n type = type !== void 0 ? 2 /* DynamicTag */ : 0 /* NativeTag */;\n } else if (path3.isNullLiteral()) {\n nullable = true;\n } else if (path3.isIdentifier()) {\n if (path3.node.name === \"undefined\") {\n nullable = true;\n continue;\n }\n const binding = path3.scope.getBinding(path3.node.name);\n if (!binding) {\n type = 2 /* DynamicTag */;\n continue;\n }\n if (binding.kind === \"module\") {\n const decl = binding.path.parent;\n if (MARKO_FILE_REG.test(decl.source.value) && decl.specifiers.some((it) => t.isImportDefaultSpecifier(it))) {\n type = type !== void 0 && type !== 1 /* CustomTag */ ? 2 /* DynamicTag */ : 1 /* CustomTag */;\n } else {\n type = 2 /* DynamicTag */;\n }\n continue;\n }\n const bindingTag = binding.path;\n if (bindingTag.isMarkoTag() && binding.kind === \"local\") {\n const bindingTagName = bindingTag.get(\"name\").node.value;\n if (bindingTagName === \"tag\") {\n type = type !== void 0 && type !== 1 /* CustomTag */ ? 2 /* DynamicTag */ : 1 /* CustomTag */;\n continue;\n }\n if (bindingTagName === \"const\") {\n pending.push(\n bindingTag.get(\n \"attributes\"\n )[0].get(\"value\")\n );\n continue;\n }\n if (bindingTagName === \"let\") {\n type = 2 /* DynamicTag */;\n continue;\n }\n continue;\n }\n type = 2 /* DynamicTag */;\n } else {\n type = 2 /* DynamicTag */;\n }\n }\n extra.tagNameType = type;\n extra.tagNameNullable = nullable;\n extra.tagNameDynamic = true;\n }\n if (extra.tagNameType === void 0) {\n extra.tagNameType = 2 /* DynamicTag */;\n }\n }\n return extra.tagNameType;\n}\n\n// src/util/sections.ts\nfunction startSection(path3) {\n const extra = path3.node.extra ??= {};\n let section = extra.section;\n if (!section) {\n const parentSection = path3.parentPath ? getOrCreateSection(path3.parentPath) : void 0;\n const sectionNamePath = path3.parentPath?.get(\n \"name\"\n );\n const sectionName = path3.isProgram() ? \"\" : currentProgramPath.scope.generateUid(\n sectionNamePath.toString() + \"Body\"\n );\n const programExtra = path3.hub.file.path.node.extra ??= {};\n const sections = programExtra.sections ??= [];\n section = extra.section = {\n id: sections.length,\n name: sectionName,\n depth: parentSection ? parentSection.depth + 1 : 0,\n parent: parentSection\n };\n sections.push(section);\n }\n return section;\n}\nfunction getOrCreateSection(path3) {\n let cur = path3;\n while (true) {\n if (cur.type === \"Program\" || cur.type === \"MarkoTagBody\" && analyzeTagNameType(cur.parentPath) !== 0 /* NativeTag */) {\n return startSection(cur);\n }\n cur = cur.parentPath;\n }\n}\nfunction getSection(path3) {\n let section;\n let currentPath = path3;\n while ((section = currentPath.node.extra?.section) === void 0) {\n currentPath = currentPath.parentPath;\n }\n _setSectionPath(\n section,\n currentPath\n );\n return section;\n}\nfunction createSectionState(key, init) {\n return [\n (section) => {\n const arrayOfSectionData = currentProgramPath.state[key] ??= {};\n const sectionData = arrayOfSectionData[section.id] ??= init && init(section);\n return sectionData;\n },\n (section, value) => {\n const arrayOfSectionData = currentProgramPath.state[key] ??= {};\n arrayOfSectionData[section.id] = value;\n }\n ];\n}\nvar [getScopeIdIdentifier] = createSectionState(\n \"scopeIdIdentifier\",\n (section) => currentProgramPath.scope.generateUidIdentifier(`scope${section.id}_id`)\n);\nvar [getSectionPath, _setSectionPath] = createSectionState(\"sectionPath\");\nvar [_getScopeIdentifier] = createSectionState(\n \"scopeIdentifier\",\n () => t2.identifier(\"undefined\")\n);\nvar getScopeIdentifier = (section, ignoreDefault) => {\n const scopeId = _getScopeIdentifier(section);\n if (!ignoreDefault && scopeId.name === \"undefined\") {\n scopeId.name = currentProgramPath.scope.generateUid(`scope${section.id}_`);\n }\n return scopeId;\n};\nfunction forEachSection(fn) {\n const { sections } = currentProgramPath.node.extra;\n sections?.forEach(fn);\n}\nfunction forEachSectionReverse(fn) {\n const { sections } = currentProgramPath.node.extra;\n for (let i = sections.length; i--; ) {\n fn(sections[i]);\n }\n}\n\n// src/util/reserve.ts\nimport { types as t3 } from \"@marko/compiler\";\n\n// src/util/sorted-repeatable.ts\nvar SortedRepeatable = class {\n constructor(compare) {\n this.compare = compare;\n }\n add(data, item) {\n return data ? Array.isArray(data) ? insertSorted(this.compare, data, item) : joinItems(this.compare, data, item) : item;\n }\n addAll(data, items) {\n if (data) {\n if (Array.isArray(data)) {\n if (items) {\n if (Array.isArray(items)) {\n for (const item of items) {\n insertSorted(this.compare, data, item);\n }\n } else {\n insertSorted(this.compare, data, items);\n }\n }\n return data;\n }\n if (items) {\n if (Array.isArray(items)) {\n return insertSorted(this.compare, [...items], data);\n }\n return joinItems(this.compare, items, data);\n }\n return data;\n }\n if (Array.isArray(items)) {\n return [...items];\n }\n return items;\n }\n find(data, item) {\n if (data) {\n if (Array.isArray(data)) {\n let max = data.length;\n let pos = 0;\n while (pos < max) {\n const mid = pos + max >>> 1;\n const cur = data[mid];\n const compareResult = this.compare(cur, item);\n if (compareResult === 0)\n return cur;\n if (compareResult > 0)\n max = mid;\n else\n pos = mid + 1;\n }\n } else {\n return this.compare(data, item) === 0 ? data : void 0;\n }\n }\n }\n clone(item) {\n return Array.isArray(item) ? [...item] : item;\n }\n size(data) {\n return data ? Array.isArray(data) ? data.length : 1 : 0;\n }\n toArray(data, map) {\n if (data) {\n if (Array.isArray(data)) {\n return data.map(map);\n }\n return [map(data)];\n }\n return [];\n }\n *iterate(data) {\n if (data) {\n if (Array.isArray(data)) {\n for (const item of data) {\n yield item;\n }\n } else {\n yield data;\n }\n }\n }\n};\nfunction joinItems(compare, a, b) {\n const compareResult = compare(a, b);\n return compareResult === 0 ? a : compareResult < 0 ? [a, b] : [b, a];\n}\nfunction insertSorted(compare, data, item) {\n const len = data.length;\n let max = len;\n let pos = 0;\n while (pos < max) {\n const mid = pos + max >>> 1;\n const compareResult = compare(data[mid], item);\n if (compareResult === 0)\n return data;\n if (compareResult > 0)\n max = mid;\n else\n pos = mid + 1;\n }\n let cur = item;\n while (pos < len) {\n const next = cur;\n cur = data[pos];\n data[pos++] = next;\n }\n data[len] = cur;\n return data;\n}\n\n// src/util/reserve.ts\nvar [getReservesByType] = createSectionState(\n \"reservesByType\",\n () => [void 0, void 0, void 0]\n);\nfunction reserveScope(type, section, node, name, debugKey = name) {\n const extra = node.extra ??= {};\n if (extra.reserve) {\n const reserve2 = extra.reserve;\n reserve2.name += \"_\" + name;\n return reserve2;\n }\n const reservesByType = getReservesByType(section);\n const reserve = extra.reserve = {\n id: 0,\n type,\n name,\n debugKey,\n section\n };\n if (reservesByType[type]) {\n reserve.id = reservesByType[type].push(reserve) - 1;\n } else {\n reservesByType[type] = [reserve];\n }\n return reserve;\n}\nfunction assignFinalIds() {\n forEachSection((section) => {\n let curIndex = 0;\n for (const reserves of getReservesByType(section)) {\n if (reserves) {\n for (const reserve of reserves) {\n reserve.id = curIndex;\n curIndex += 1;\n }\n }\n }\n });\n}\nfunction getScopeAccessorLiteral(reserve) {\n if (isOptimize()) {\n return t3.numericLiteral(reserve.id);\n }\n return t3.stringLiteral(\n reserve.debugKey + (reserve.type === 0 /* Visit */ ? `/${reserve.id}` : \"\")\n );\n}\nvar repeatableReserves = new SortedRepeatable(function compareReserves(a, b) {\n return a.section.id - b.section.id || a.type - b.type || a.id - b.id;\n});\n\n// src/util/references.ts\nvar intersectionSubscribeCounts = /* @__PURE__ */ new WeakMap();\nvar repeatableIntersections = new SortedRepeatable(compareIntersections);\nvar [getIntersectionsBySection, setIntersectionsBySection] = createSectionState(\"intersectionsBySection\", () => []);\nfunction trackReferences(tag) {\n if (tag.has(\"var\")) {\n trackReferencesForBindings(getOrCreateSection(tag), tag.get(\"var\"));\n }\n const body = tag.get(\"body\");\n if (body.get(\"body\").length && body.get(\"params\").length) {\n trackReferencesForBindings(getOrCreateSection(body), body);\n }\n}\nfunction trackReferencesForBindings(section, path3) {\n const scope = path3.scope;\n const bindings = path3.getBindingIdentifiers();\n for (const name in bindings) {\n const references = scope.getBinding(name).referencePaths.concat(\n /*\n https://github.com/babel/babel/issues/11313\n We need this so we can handle `+=` and friends\n */\n scope.getBinding(name).constantViolations.filter(\n (path4) => path4.isAssignmentExpression() && path4.node.operator !== \"=\"\n )\n );\n const identifier = bindings[name];\n const binding = reserveScope(1 /* Store */, section, identifier, name);\n for (const reference of references) {\n const fnRoot = getFnRoot(reference.scope.path);\n const exprRoot = getExprRoot(fnRoot || reference);\n const markoRoot = exprRoot.parentPath;\n const immediateRoot = fnRoot ?? exprRoot;\n if (immediateRoot) {\n const name2 = immediateRoot.node.id?.name;\n if (!name2) {\n if (markoRoot.isMarkoAttribute() && !markoRoot.node.default) {\n (immediateRoot.node.extra ??= {}).name = markoRoot.node.name;\n }\n }\n addBindingToReferences(immediateRoot, \"references\", binding);\n }\n addBindingToReferences(\n markoRoot,\n `${exprRoot.listKey || exprRoot.key}References`,\n binding\n );\n }\n }\n}\nfunction addBindingToReferences(path3, referencesKey, binding) {\n const section = getOrCreateSection(path3);\n const extra = path3.node.extra ??= {};\n const prevReferences = extra[referencesKey];\n if (prevReferences) {\n if (prevReferences !== binding) {\n extra[referencesKey] = addSubscriber(\n getIntersection(\n section,\n repeatableReserves.add(\n repeatableReserves.clone(prevReferences),\n binding\n )\n )\n );\n if (isIntersection(prevReferences)) {\n removeSubscriber(getIntersection(section, prevReferences));\n }\n }\n } else {\n extra[referencesKey] = binding;\n }\n}\nfunction mergeReferences(section, groupEntries) {\n let newReferences;\n for (const [extra, key] of groupEntries) {\n const references = extra[key];\n if (isIntersection(references)) {\n removeSubscriber(getIntersection(section, references));\n }\n newReferences = repeatableReserves.addAll(newReferences, references);\n delete extra[key];\n }\n if (isIntersection(newReferences)) {\n newReferences = addSubscriber(getIntersection(section, newReferences));\n }\n return newReferences;\n}\nfunction getExprRoot(path3) {\n let curPath = path3;\n while (!isMarkoPath(curPath.parentPath)) {\n curPath = curPath.parentPath;\n }\n return curPath;\n}\nfunction getFnRoot(path3) {\n let curPath = path3;\n if (curPath.isProgram())\n return;\n while (!isFunctionExpression(curPath)) {\n if (isMarkoPath(curPath))\n return;\n curPath = curPath.parentPath;\n }\n return curPath;\n}\nfunction isMarkoPath(path3) {\n switch (path3.type) {\n case \"MarkoTag\":\n case \"MarkoTagBody\":\n case \"MarkoAttribute\":\n case \"MarkoSpreadAttribute\":\n case \"MarkoPlaceholder\":\n case \"MarkoScriptlet\":\n return true;\n default:\n return false;\n }\n}\nfunction isFunctionExpression(path3) {\n switch (path3.type) {\n case \"FunctionExpression\":\n case \"ArrowFunctionExpression\":\n return true;\n default:\n return false;\n }\n}\nfunction compareIntersections(a, b) {\n const len = a.length;\n const lenDelta = len - b.length;\n if (lenDelta !== 0) {\n return lenDelta;\n }\n for (let i = 0; i < len; i++) {\n const compareResult = repeatableReserves.compare(a[i], b[i]);\n if (compareResult !== 0) {\n return compareResult;\n }\n }\n return 0;\n}\nfunction finalizeIntersections() {\n const intersectionsBySection = (currentProgramPath.node.extra ??= {}).intersectionsBySection = {};\n forEachSection((section) => {\n intersectionsBySection[section.id] = getIntersectionsBySection(\n section\n ).filter(\n (intersection) => intersectionSubscribeCounts.get(intersection) > 0\n );\n });\n}\nfunction getIntersection(section, references) {\n const intersections = getIntersectionsBySection(section);\n let intersection = repeatableIntersections.find(intersections, references);\n if (!intersection) {\n intersection = references;\n setIntersectionsBySection(\n section,\n repeatableIntersections.add(intersections, references)\n );\n }\n return intersection;\n}\nfunction addSubscriber(intersection) {\n intersectionSubscribeCounts.set(\n intersection,\n (intersectionSubscribeCounts.get(intersection) || 0) + 1\n );\n return intersection;\n}\nfunction removeSubscriber(intersection) {\n intersectionSubscribeCounts.set(\n intersection,\n intersectionSubscribeCounts.get(intersection) - 1\n );\n return intersection;\n}\nfunction isIntersection(references) {\n return Array.isArray(references);\n}\n\n// src/util/runtime.ts\nimport { types as t5 } from \"@marko/compiler\";\nimport { importNamed } from \"@marko/babel-utils\";\n\n// ../runtime/src/html/content.ts\nfunction toString(val) {\n return val || val === 0 ? val + \"\" : \"\";\n}\nvar escapeXML = escapeIfNeeded((val) => {\n let result = \"\";\n let lastPos = 0;\n for (let i = 0, len = val.length; i < len; i++) {\n let replacement;\n switch (val[i]) {\n case \"<\":\n replacement = \"<\";\n break;\n case \"&\":\n replacement = \"&\";\n break;\n default:\n continue;\n }\n result += val.slice(lastPos, i) + replacement;\n lastPos = i + 1;\n }\n if (lastPos) {\n return result + val.slice(lastPos);\n }\n return val;\n});\nvar escapeScript = escapeIfNeeded(escapeTagEnding(\"script\"));\nvar escapeStyle = escapeIfNeeded(escapeTagEnding(\"style\"));\nfunction escapeTagEnding(tagName) {\n const openTag = `${tagName}`;\n const escaped = `<\\\\/${tagName}`;\n return (val) => {\n let result = \"\";\n let lastPos = 0;\n let i = val.indexOf(openTag, lastPos);\n while (i !== -1) {\n result += val.slice(lastPos, i) + escaped;\n lastPos = i + 1;\n i = val.indexOf(openTag, lastPos);\n }\n if (lastPos) {\n return result + val.slice(lastPos);\n }\n return val;\n };\n}\nfunction escapeAttrValue(val) {\n const len = val.length;\n let i = 0;\n do {\n switch (val[i]) {\n case '\"':\n return quoteValue(val, i + 1, \"'\", \"'\");\n case \"'\":\n case \">\":\n case \" \":\n case \"\t\":\n case \"\\n\":\n case \"\\r\":\n case \"\\f\":\n return quoteValue(val, i + 1, '\"', \""\");\n default:\n i++;\n break;\n }\n } while (i < len);\n return val;\n}\nfunction escapeIfNeeded(escape) {\n return (val) => {\n if (!val && val !== 0) {\n return \"\";\n }\n switch (typeof val) {\n case \"string\":\n return escape(val);\n case \"boolean\":\n return \"true\";\n case \"number\":\n return val + \"\";\n default:\n return escape(val + \"\");\n }\n };\n}\nfunction quoteValue(val, startPos, quote, escaped) {\n let result = quote;\n let lastPos = 0;\n for (let i = startPos, len = val.length; i < len; i++) {\n if (val[i] === quote) {\n result += val.slice(lastPos, i) + escaped;\n lastPos = i + 1;\n }\n }\n return result + (lastPos ? val.slice(lastPos) : val) + quote;\n}\n\n// ../runtime/src/common/helpers.ts\nfunction classValue(value) {\n return toDelimitedString(value, \" \", stringifyClassObject);\n}\nfunction stringifyClassObject(name, value) {\n if (isVoid(value)) {\n return \"\";\n }\n return name;\n}\nfunction styleValue(value) {\n return toDelimitedString(value, \";\", stringifyStyleObject);\n}\nvar NON_DIMENSIONAL = /^(--|ta|or|li|z)|n-c|i(do|nk|m|t)|w$|we/;\nfunction stringifyStyleObject(name, value) {\n if (isVoid(value)) {\n return \"\";\n }\n if (typeof value === \"number\" && value && !NON_DIMENSIONAL.test(name)) {\n value += \"px\";\n }\n return `${name}:${value}`;\n}\nfunction toDelimitedString(val, delimiter, stringify) {\n switch (typeof val) {\n case \"string\":\n return val;\n case \"object\":\n if (val !== null) {\n let result = \"\";\n let curDelimiter = \"\";\n if (Array.isArray(val)) {\n for (const v of val) {\n const part = toDelimitedString(v, delimiter, stringify);\n if (part !== \"\") {\n result += curDelimiter + part;\n curDelimiter = delimiter;\n }\n }\n } else {\n for (const name in val) {\n const v = val[name];\n const part = stringify(name, v);\n if (part !== \"\") {\n result += curDelimiter + part;\n curDelimiter = delimiter;\n }\n }\n }\n return result;\n }\n }\n return \"\";\n}\nfunction isVoid(value) {\n return value == null || value === false;\n}\n\n// ../runtime/src/html/attrs.ts\nfunction classAttr(val) {\n return stringAttr(\"class\", classValue(val));\n}\nfunction styleAttr(val) {\n return stringAttr(\"style\", styleValue(val));\n}\nfunction attr(name, val) {\n return isVoid(val) ? \"\" : nonVoidUntypedAttr(name, val);\n}\nfunction stringAttr(name, val) {\n return val && ` ${name}=${escapeAttrValue(val)}`;\n}\nfunction nonVoidUntypedAttr(name, val) {\n switch (typeof val) {\n case \"string\":\n return ` ${name + attrAssignment(val)}`;\n case \"boolean\":\n return ` ${name}`;\n case \"number\":\n return ` ${name}=${val}`;\n case \"object\":\n if (val instanceof RegExp) {\n return ` ${name}=${escapeAttrValue(val.source)}`;\n }\n default:\n return ` ${name + attrAssignment(val + \"\")}`;\n }\n}\nfunction attrAssignment(val) {\n return val ? `=${escapeAttrValue(val)}` : \"\";\n}\n\n// ../runtime/src/html/reorder-runtime.ts\nfunction reorder_runtime_default(id, doc, walker, node, replacementNode, targetParent, targetNode, refNode, nextNode, runtimePrefix) {\n runtimePrefix = \"RUNTIME_ID$\";\n id = runtimePrefix + id;\n doc = document;\n walker = doc[runtimePrefix + \"w\"] || (doc[runtimePrefix + \"w\"] = doc.createTreeWalker(\n doc,\n 128\n /** NodeFilter.SHOW_COMMENT */\n ));\n while (node = walker.nextNode()) {\n if (node.data.indexOf(runtimePrefix) === 0) {\n walker[node.data] = node;\n }\n }\n replacementNode = doc.getElementById(id);\n targetNode = walker[id];\n targetParent = targetNode.parentNode;\n while (refNode = replacementNode.firstChild) {\n targetParent.insertBefore(refNode, targetNode);\n }\n nextNode = replacementNode.parentNode;\n nextNode.removeChild(replacementNode.nextSibling);\n nextNode.removeChild(replacementNode);\n refNode = walker[id + \"/\"];\n while (nextNode = targetNode.nextSibling, targetParent.removeChild(targetNode) !== refNode) {\n targetNode = nextNode;\n }\n}\n\n// ../runtime/src/html/serializer.ts\nvar { hasOwnProperty } = Object.prototype;\nvar REF_START_CHARS = \"hjkmoquxzABCDEFGHIJKLNPQRTUVWXYZ$_\";\nvar REF_START_CHARS_LEN = REF_START_CHARS.length;\nvar REF_CHARS = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789$_\";\nvar REF_CHARS_LEN = REF_CHARS.length;\nvar SYMBOL_REGISTRY_ID = Symbol(\"REGISTRY_ID\");\nvar SYMBOL_SCOPE = Symbol(\"SCOPE\");\nvar SYMBOL_SERIALIZE = Symbol(\"SERIALIZE\");\n\n// ../runtime/src/html/writer.ts\nvar runtimeId = \"M\" /* DEFAULT_RUNTIME_ID */;\nvar reorderRuntimeString = String(reorder_runtime_default).replace(\n \"RUNTIME_ID\",\n runtimeId\n);\n\n// src/util/scope-read.ts\nimport { types as t4 } from \"@marko/compiler\";\nfunction createScopeReadPattern(section, references) {\n const rootDepth = section.depth;\n const rootPattern = t4.objectPattern([]);\n let nestedPatterns;\n for (const ref of repeatableReserves.iterate(references)) {\n if (ref.name.includes(\"#\"))\n continue;\n const propertyKey = getScopeAccessorLiteral(ref);\n const propertyValue = t4.identifier(ref.name);\n const isShorthand = propertyKey.value === propertyValue.name;\n let pattern = rootPattern;\n if (ref.section !== section) {\n if (!nestedPatterns)\n nestedPatterns = [rootPattern];\n const relativeDepth = rootDepth - ref.section.depth;\n let i = nestedPatterns.length;\n let prev = nestedPatterns[i - 1];\n for (; i <= relativeDepth; i++) {\n const nestedPattern = t4.objectPattern([]);\n prev.properties.push(\n t4.objectProperty(t4.identifier(\"_\"), nestedPattern)\n );\n nestedPatterns.push(nestedPattern);\n prev = nestedPattern;\n }\n pattern = nestedPatterns[relativeDepth];\n }\n pattern.properties.push(\n t4.objectProperty(\n isShorthand ? propertyValue : propertyKey,\n propertyValue,\n false,\n isShorthand\n )\n );\n }\n return rootPattern;\n}\nfunction getScopeExpression(section, targetSection) {\n let scope = scopeIdentifier;\n const diff = section.depth - targetSection.depth;\n for (let i = 0; i < diff; i++) {\n scope = t4.memberExpression(scope, t4.identifier(\"_\"));\n }\n if (diff < 0) {\n throw new Error(\"Unable to find scope for reference.\");\n }\n return scope;\n}\nfunction createScopeReadExpression(section, reference) {\n return t4.memberExpression(\n getScopeExpression(section, reference.section),\n getScopeAccessorLiteral(reference),\n true\n );\n}\n\n// src/util/runtime.ts\nvar pureFunctions = [\n \"createTemplate\",\n \"createRenderer\",\n \"value\",\n \"intersection\",\n \"closure\",\n \"dynamicClosure\",\n \"contextClosure\",\n \"loopOf\",\n \"loopIn\",\n \"loopTo\",\n \"conditional\",\n \"bindFunction\",\n \"bindRenderer\"\n];\nfunction importRuntime(name) {\n const { output } = getMarkoOpts();\n return importNamed(currentProgramPath.hub.file, getRuntimePath(output), name);\n}\nfunction callRuntime(name, ...args) {\n const callExpression2 = t5.callExpression(\n importRuntime(name),\n filterArguments(args)\n );\n if (pureFunctions.includes(\n name\n )) {\n callExpression2.leadingComments = [\n {\n type: \"CommentBlock\",\n value: ` @__PURE__ `\n }\n ];\n }\n return callExpression2;\n}\nfunction getHTMLRuntime() {\n return {\n escapeXML,\n toString,\n attr,\n classAttr,\n styleAttr,\n escapeScript,\n escapeStyle\n };\n}\nfunction getRuntimePath(output) {\n const { optimize } = getMarkoOpts();\n return `@marko/runtime-fluurt/${false ? \"src\" : optimize ? \"dist\" : \"dist/debug\"}/${output === \"html\" ? \"html\" : \"dom\"}`;\n}\nfunction filterArguments(args) {\n const filteredArgs = [];\n for (let i = args.length; i--; ) {\n const arg = args[i];\n if (arg || filteredArgs.length) {\n filteredArgs[i] = arg || t5.unaryExpression(\"void\", t5.numericLiteral(0));\n }\n }\n return filteredArgs;\n}\n\n// src/visitors/program/dom.ts\nimport { types as t11 } from \"@marko/compiler\";\nimport { getTemplateId as getTemplateId2 } from \"@marko/babel-utils\";\n\n// src/util/signals.ts\nimport { types as t10 } from \"@marko/compiler\";\nimport { getTemplateId } from \"@marko/babel-utils\";\n\n// src/core/return.ts\nimport { types as t9 } from \"@marko/compiler\";\nimport { assertNoParams, assertNoVar } from \"@marko/babel-utils\";\n\n// src/util/writer.ts\nimport { types as t8 } from \"@marko/compiler\";\n\n// src/util/to-template-string-or-literal.ts\nimport { types as t6 } from \"@marko/compiler\";\nfunction toTemplateOrStringLiteral(parts) {\n const strs = [];\n const exprs = [];\n let curStr = parts[0];\n for (let i = 1; i < parts.length; i++) {\n let content = parts[i];\n if (typeof content === \"object\") {\n if (t6.isStringLiteral(content)) {\n content = content.value;\n } else if (t6.isTemplateLiteral(content)) {\n let nextIndex = i + 1;\n const exprLen = content.expressions.length;\n shiftItems(parts, nextIndex, content.quasis.length + exprLen);\n for (let j = 0; j < exprLen; j++) {\n parts[nextIndex++] = content.quasis[j].value.raw;\n parts[nextIndex++] = content.expressions[j];\n }\n parts[nextIndex] = content.quasis[exprLen].value.raw;\n continue;\n } else {\n exprs.push(content);\n strs.push(curStr);\n curStr = \"\";\n continue;\n }\n }\n curStr += content;\n }\n if (exprs.length) {\n strs.push(curStr);\n return t6.templateLiteral(\n strs.map((raw) => t6.templateElement({ raw })),\n exprs\n );\n } else if (curStr) {\n return t6.stringLiteral(curStr);\n }\n}\nfunction appendLiteral(arr, str) {\n arr[arr.length - 1] += str;\n}\nfunction shiftItems(list, start, offset) {\n for (let i = list.length - 1; i >= start; i--) {\n list[i + offset] = list[i];\n }\n}\n\n// src/util/walks.ts\nimport { types as t7 } from \"@marko/compiler\";\nvar [getWalks] = createSectionState(\n \"walks\",\n () => [\"\"]\n);\nvar [getWalkComment] = createSectionState(\n \"walkComment\",\n () => []\n);\nvar [getSteps] = createSectionState(\"steps\", () => []);\nvar walkCodeToName = {\n [32 /* Get */]: \"get\",\n [33 /* Before */]: \"before\",\n [35 /* After */]: \"after\",\n [36 /* Inside */]: \"inside\",\n [37 /* Replace */]: \"replace\",\n [38 /* EndChild */]: \"endChild\",\n [47 /* BeginChild */]: \"beginChild\",\n [67 /* Next */]: \"next\",\n [97 /* Over */]: \"over\",\n [107 /* Out */]: \"out\",\n [117 /* Multiplier */]: \"multiplier\",\n [91 /* NextEnd */]: \"nextEnd\",\n [106 /* OverEnd */]: \"overEnd\",\n [116 /* OutEnd */]: \"outEnd\",\n [126 /* MultiplierEnd */]: \"multiplierEnd\"\n};\nfunction enter(path3) {\n getSteps(getSection(path3)).push(0 /* enter */);\n}\nfunction exit(path3) {\n getSteps(getSection(path3)).push(1 /* exit */);\n}\nfunction enterShallow(path3) {\n getSteps(getSection(path3)).push(0 /* enter */, 1 /* exit */);\n}\nfunction injectWalks(path3, expr) {\n const walks = getWalks(getSection(path3));\n const walkComment = getWalkComment(getSection(path3));\n walkComment.push(\n `${walkCodeToName[47 /* BeginChild */]}`,\n expr.name,\n walkCodeToName[38 /* EndChild */]\n );\n appendLiteral(walks, String.fromCharCode(47 /* BeginChild */));\n walks.push(expr, String.fromCharCode(38 /* EndChild */));\n}\nfunction visit(path3, code) {\n const { reserve } = path3.node.extra;\n if (code && (!reserve || reserve.type !== 0 /* Visit */)) {\n throw path3.buildCodeFrameError(\n \"Tried to visit a node that was not marked as needing to visit during analyze.\"\n );\n }\n if (isOutputHTML()) {\n return;\n }\n const section = getSection(path3);\n const steps = getSteps(section);\n const walks = getWalks(section);\n const walkComment = getWalkComment(section);\n let walkString = \"\";\n if (steps.length) {\n const walks2 = [];\n let depth = 0;\n for (const step of steps) {\n if (step === 0 /* enter */) {\n depth++;\n walks2.push(67 /* Next */);\n } else {\n depth--;\n if (depth >= 0) {\n walks2.length = walks2.lastIndexOf(67 /* Next */);\n walks2.push(97 /* Over */);\n } else {\n walks2.length = walks2.lastIndexOf(107 /* Out */) + 1;\n walks2.push(107 /* Out */);\n depth = 0;\n }\n }\n }\n let current = walks2[0];\n let count = 0;\n for (const walk of walks2) {\n if (walk !== current) {\n walkComment.push(`${walkCodeToName[current]}(${count})`);\n walkString += nCodeString(current, count);\n current = walk;\n count = 1;\n } else {\n count++;\n }\n }\n walkComment.push(`${walkCodeToName[current]}(${count})`);\n walkString += nCodeString(current, count);\n steps.length = 0;\n }\n if (code !== void 0) {\n if (code !== 32 /* Get */) {\n writeTo(path3)``;\n }\n walkComment.push(`${walkCodeToName[code]}`);\n walkString += String.fromCharCode(code);\n }\n appendLiteral(walks, walkString);\n}\nfunction nCodeString(code, number) {\n switch (code) {\n case 67 /* Next */:\n return toCharString(number, code, 20 /* Next */);\n case 97 /* Over */:\n return toCharString(number, code, 10 /* Over */);\n case 107 /* Out */:\n return toCharString(number, code, 10 /* Out */);\n default:\n throw new Error(`Unexpected walk code: ${code}`);\n }\n}\nfunction toCharString(number, startCode, rangeSize) {\n let result = \"\";\n if (number >= rangeSize) {\n const multiplier = Math.floor(number / rangeSize);\n result += toCharString(\n multiplier,\n 117 /* Multiplier */,\n 10 /* Multiplier */\n );\n number -= multiplier * rangeSize;\n }\n result += String.fromCharCode(startCode + number);\n return result;\n}\nfunction getWalkString(section) {\n const walkLiteral = toTemplateOrStringLiteral(getWalks(section)) || t7.stringLiteral(\"\");\n if (walkLiteral.value !== \"\") {\n walkLiteral.leadingComments = [\n {\n type: \"CommentBlock\",\n value: \" \" + getWalkComment(section).join(\", \") + \" \"\n }\n ];\n }\n return walkLiteral;\n}\n\n// src/util/writer.ts\nvar [getRenderer] = createSectionState(\n \"renderer\",\n (section) => t8.identifier(section.name)\n);\nvar [getWrites] = createSectionState(\n \"writes\",\n () => [\"\"]\n);\nvar [getRegisterRenderer, setRegisterRenderer] = createSectionState(\n \"registerRenderer\",\n () => false\n);\nfunction writeTo(path3) {\n const section = getSection(path3);\n return (strs, ...exprs) => {\n const exprsLen = exprs.length;\n const writes = getWrites(section);\n appendLiteral(writes, strs[0]);\n for (let i = 0; i < exprsLen; i++) {\n writes.push(exprs[i], strs[i + 1]);\n }\n };\n}\nfunction writePrependTo(path3) {\n const section = getSection(path3);\n return (strs, ...exprs) => {\n const exprsLen = exprs.length;\n const writes = getWrites(section);\n writes[0] += strs[exprsLen];\n for (let i = 0; i < exprsLen; i++) {\n writes.unshift(strs[i], exprs[i]);\n }\n };\n}\nfunction consumeHTML(path3) {\n const writes = getWrites(getSection(path3));\n const result = toTemplateOrStringLiteral(writes);\n writes.length = 0;\n writes[0] = \"\";\n if (result) {\n return t8.expressionStatement(callRuntime(\"write\", result));\n }\n}\nfunction hasPendingHTML(path3) {\n const writes = getWrites(getSection(path3));\n return Boolean(writes.length > 1 || writes[0]);\n}\nfunction flushBefore(path3) {\n const expr = consumeHTML(path3);\n if (expr) {\n path3.insertBefore(expr)[0].skip();\n }\n}\nfunction flushInto(path3) {\n const target = path3.isProgram() ? path3 : path3.get(\"body\");\n const expr = consumeHTML(target);\n if (expr) {\n target.pushContainer(\"body\", expr)[0].skip();\n }\n}\nfunction getSectionMeta(section) {\n const writes = getWrites(section);\n return {\n setup: getSetup(section),\n walks: getWalkString(section),\n writes: toTemplateOrStringLiteral(writes) || t8.stringLiteral(\"\"),\n register: getRegisterRenderer(section)\n };\n}\nfunction markNode(path3) {\n const section = getSection(path3);\n const { reserve } = path3.node.extra;\n if (reserve?.type !== 0 /* Visit */) {\n throw path3.buildCodeFrameError(\n \"Tried to mark a node that was not determined to need a mark during analyze.\"\n );\n }\n if (isOutputHTML()) {\n writeTo(path3)`${callRuntime(\n \"markResumeNode\",\n getScopeIdIdentifier(section),\n getScopeAccessorLiteral(reserve)\n )}`;\n }\n}\n\n// src/util/assert.ts\nfunction assertNoSpreadAttrs(tag) {\n for (const attr2 of tag.get(\"attributes\")) {\n if (attr2.isMarkoSpreadAttribute()) {\n throw attr2.buildCodeFrameError(\n `The <${tag.get(\"name\")}> tag does not support ...spread attributes.`\n );\n }\n }\n}\nfunction assertNoBodyContent(tag) {\n if (tag.node.body.body.length) {\n throw tag.get(\"name\").buildCodeFrameError(\n `The <${tag.get(\"name\")}> tag does not support body content.`\n );\n }\n}\n\n// src/core/return.ts\nvar [returnId, _setReturnId] = createSectionState(\n \"returnId\"\n);\nvar return_default = {\n translate(tag) {\n assertNoVar(tag);\n assertNoParams(tag);\n assertNoBodyContent(tag);\n assertNoSpreadAttrs(tag);\n const section = getSection(tag);\n const {\n node,\n hub: { file }\n } = tag;\n const [defaultAttr] = node.attributes;\n if (!t9.isMarkoAttribute(defaultAttr) || !defaultAttr.default) {\n throw tag.get(\"name\").buildCodeFrameError(\n `The '' tag requires default attribute like ''.`\n );\n }\n if (node.attributes.length > 1) {\n const start = node.attributes[1].loc?.start;\n const end = node.attributes[node.attributes.length - 1].loc?.end;\n const msg = `The '' tag only supports a default attribute.`;\n if (start == null || end == null) {\n throw tag.get(\"name\").buildCodeFrameError(msg);\n } else {\n throw tag.hub.buildError(\n { loc: { start, end } },\n msg,\n Error\n );\n }\n }\n if (isOutputHTML()) {\n flushBefore(tag);\n const returnId2 = file.path.scope.generateUidIdentifier(\"return\");\n _setReturnId(section, returnId2);\n tag.replaceWith(\n t9.variableDeclaration(\"const\", [\n t9.variableDeclarator(returnId2, defaultAttr.value)\n ])\n )[0].skip();\n } else {\n addValue(\n section,\n defaultAttr.extra?.valueReferences,\n {\n identifier: importRuntime(\"tagVarSignal\"),\n hasDownstreamIntersections: () => true\n },\n defaultAttr.value\n );\n tag.remove();\n }\n },\n autocomplete: [\n {\n displayText: \"return=\",\n description: \"Provides a value for use in a parent template.\",\n snippet: \"return=${1:value}\",\n descriptionMoreURL: \"https://markojs.com/docs/core-tags/#return\"\n }\n ]\n};\n\n// src/util/signals.ts\nvar [getSignals] = createSectionState(\n \"signals\",\n () => /* @__PURE__ */ new Map()\n);\nvar [getSubscribeBuilder, _setSubscribeBuilder] = createSectionState(\"queue\");\nfunction setSubscriberBuilder(tag, builder) {\n _setSubscribeBuilder(getSection(tag.get(\"body\")), builder);\n}\nvar [getClosures] = createSectionState(\n \"closures\",\n () => []\n);\nvar addClosure = (fromSection, toSection, closure) => {\n let currentSection = fromSection;\n while (currentSection !== void 0 && currentSection !== toSection) {\n getClosures(currentSection).push(closure);\n currentSection = currentSection.parent;\n }\n};\nvar [forceResumeScope, _setForceResumeScope] = createSectionState(\"forceResumeScope\");\nfunction setForceResumeScope(section) {\n _setForceResumeScope(section, true);\n}\nvar [getSerializedScopeProperties] = createSectionState(\"serializedScopeProperties\", () => /* @__PURE__ */ new Map());\nvar [getRegisterScopeBuilder, _setRegisterScopeBuilder] = createSectionState(\"register\");\nfunction setRegisterScopeBuilder(tag, builder) {\n _setRegisterScopeBuilder(getSection(tag.get(\"body\")), builder);\n}\nvar unimplementedBuild = () => {\n return t10.stringLiteral(\"SIGNAL NOT INITIALIZED\");\n};\nfunction getSignal(section, reserve) {\n const signals = getSignals(section);\n let signal = signals.get(reserve);\n if (!signal) {\n signals.set(\n reserve,\n signal = {\n identifier: t10.identifier(generateSignalName(section, reserve)),\n reserve,\n section,\n values: [],\n intersection: void 0,\n render: [],\n effect: [],\n effectInlineReferences: void 0,\n subscribers: [],\n closures: /* @__PURE__ */ new Map(),\n hasDownstreamIntersections: () => {\n if (signal.intersection || signal.closures.size || signal.values.some((v) => v.signal.hasDownstreamIntersections())) {\n signal.hasDownstreamIntersections = () => true;\n return true;\n } else {\n signal.hasDownstreamIntersections = () => false;\n return false;\n }\n },\n build: unimplementedBuild\n }\n );\n if (isOutputHTML()) {\n return signal;\n } else if (!reserve) {\n signal.build = () => getSignalFn(signal, [scopeIdentifier]);\n } else if (Array.isArray(reserve)) {\n subscribe(reserve, signal);\n signal.build = () => {\n return callRuntime(\n \"intersection\",\n t10.numericLiteral(reserve.length),\n getSignalFn(signal, [scopeIdentifier], reserve)\n );\n };\n } else if (reserve.section !== section) {\n const provider = getSignal(reserve.section, reserve);\n addClosure(section, reserve.section, signal.identifier);\n provider.closures.set(section, signal);\n signal.build = () => {\n const builder = getSubscribeBuilder(section);\n const ownerScope = getScopeExpression(section, reserve.section);\n const isImmediateOwner = ownerScope.object === scopeIdentifier;\n return callRuntime(\n builder && isImmediateOwner ? \"closure\" : \"dynamicClosure\",\n getScopeAccessorLiteral(reserve),\n getSignalFn(signal, [scopeIdentifier, t10.identifier(reserve.name)]),\n isImmediateOwner ? null : t10.arrowFunctionExpression([scopeIdentifier], ownerScope),\n buildSignalIntersections(signal),\n buildSignalValuesWithIntersections(signal)\n );\n };\n }\n }\n return signal;\n}\nfunction initValue(reserve, valueAccessor = getScopeAccessorLiteral(reserve)) {\n const section = reserve.section;\n const signal = getSignal(section, reserve);\n signal.build = () => {\n const fn = getSignalFn(signal, [\n scopeIdentifier,\n t10.identifier(reserve.name)\n ]);\n const intersections = buildSignalIntersections(signal);\n const valuesWithIntersections = buildSignalValuesWithIntersections(signal);\n if (fn.body.body.length > 0 || intersections || valuesWithIntersections) {\n return callRuntime(\n \"value\",\n valueAccessor,\n fn,\n intersections,\n valuesWithIntersections\n );\n } else {\n return fn;\n }\n };\n signal.valueAccessor = valueAccessor;\n return signal;\n}\nfunction initContextProvider(templateId, reserve, providers, compute, renderer) {\n const section = reserve.section;\n const scopeAccessor = getScopeAccessorLiteral(reserve);\n const valueAccessor = t10.stringLiteral(\n `${reserve.id}${\":\" /* CONTEXT_VALUE */}`\n );\n const signal = initValue(reserve, valueAccessor);\n addValue(section, providers, signal, compute);\n signal.hasDynamicSubscribers = true;\n signal.hasDownstreamIntersections = () => true;\n addStatement(\n \"render\",\n reserve.section,\n void 0,\n t10.expressionStatement(\n callRuntime(\n \"initContextProvider\",\n scopeIdentifier,\n scopeAccessor,\n valueAccessor,\n t10.stringLiteral(templateId),\n renderer\n )\n )\n );\n return signal;\n}\nfunction initContextConsumer(templateId, reserve) {\n const section = reserve.section;\n const signal = getSignal(section, reserve);\n getClosures(section).push(signal.identifier);\n signal.build = () => {\n return callRuntime(\n \"contextClosure\",\n getScopeAccessorLiteral(reserve),\n t10.stringLiteral(templateId),\n getSignalFn(signal, [scopeIdentifier, t10.identifier(reserve.name)])\n );\n };\n return signal;\n}\nfunction getSignalFn(signal, params, references) {\n const section = signal.section;\n for (const value of signal.values) {\n signal.render.push(\n t10.expressionStatement(\n t10.callExpression(value.signal.identifier, [value.scope, value.value])\n )\n );\n }\n if (references) {\n signal.render.unshift(\n t10.variableDeclaration(\"const\", [\n t10.variableDeclarator(\n createScopeReadPattern(section, references),\n scopeIdentifier\n )\n ])\n );\n }\n return t10.arrowFunctionExpression(params, t10.blockStatement(signal.render));\n}\nfunction buildSignalIntersections(signal) {\n let intersections = signal.intersection;\n const section = signal.section;\n const closureEntries = Array.from(signal.closures.entries()).sort(\n ([a], [b]) => a.id - b.id\n );\n for (const [closureSection, closureSignal] of closureEntries) {\n const builder = getSubscribeBuilder(closureSection);\n const isImmediateOwner = closureSection.parent === section;\n if (builder && isImmediateOwner) {\n intersections = pushRepeatable(\n intersections,\n builder(closureSignal.identifier)\n );\n } else if (!signal.hasDynamicSubscribers) {\n signal.hasDynamicSubscribers = true;\n }\n }\n if (signal.hasDynamicSubscribers) {\n signal.hasDynamicSubscribers = true;\n intersections = pushRepeatable(\n intersections,\n callRuntime(\"dynamicSubscribers\", signal.valueAccessor)\n );\n }\n return Array.isArray(intersections) ? callRuntime(\"intersections\", t10.arrayExpression(intersections)) : intersections;\n}\nfunction buildSignalValuesWithIntersections(signal) {\n let valuesWithIntersections;\n for (const value of signal.values) {\n if (value.signal.hasDownstreamIntersections()) {\n valuesWithIntersections = pushRepeatable(\n valuesWithIntersections,\n value.intersectionExpression ?? t10.identifier(value.signal.identifier.name)\n );\n }\n }\n return Array.isArray(valuesWithIntersections) ? callRuntime(\"values\", t10.arrayExpression(valuesWithIntersections)) : valuesWithIntersections;\n}\nfunction pushRepeatable(repeatable, value) {\n if (!repeatable) {\n return value;\n } else if (Array.isArray(repeatable)) {\n repeatable.push(value);\n return repeatable;\n } else {\n return [repeatable, value];\n }\n}\nfunction getTagVarSignal(varPath) {\n if (varPath.isIdentifier()) {\n return initValue(varPath.node.extra.reserve);\n } else {\n return getDestructureSignal(\n Object.values(varPath.getBindingIdentifiers()),\n varPath.node\n );\n }\n}\nfunction getTagParamsSignal(paramsPaths, pattern = t10.arrayPattern(\n paramsPaths.map((path3) => path3.node)\n)) {\n const parameterBindings = paramsPaths.reduce((bindingsLookup, path3) => {\n return Object.assign(bindingsLookup, path3.getBindingIdentifiers());\n }, {});\n return getDestructureSignal(\n parameterBindings,\n t10.objectPattern([t10.objectProperty(t10.identifier(\"value\"), pattern)])\n );\n}\nfunction getDestructureSignal(bindingsByName, destructurePattern) {\n const bindings = Array.isArray(bindingsByName) ? bindingsByName : Object.values(bindingsByName);\n if (bindings.length) {\n const valueIdentifier = currentProgramPath.scope.generateUidIdentifier(\"destructure\");\n const bindingSignals = bindings.map(\n (binding) => initValue(binding.extra?.reserve)\n );\n const declarations = t10.variableDeclaration(\n \"let\",\n bindings.map((binding) => t10.variableDeclarator(binding))\n );\n return {\n get identifier() {\n const name = currentProgramPath.scope.generateUidIdentifier(\"destructure\");\n currentProgramPath.pushContainer(\"body\", [\n t10.variableDeclaration(\"const\", [\n t10.variableDeclarator(name, this.build(true))\n ])\n ]);\n return name;\n },\n build(canCallOnlyWhenDirty) {\n if (canCallOnlyWhenDirty && !this.hasDownstreamIntersections()) {\n return t10.arrowFunctionExpression(\n [scopeIdentifier, destructurePattern],\n t10.blockStatement(\n bindingSignals.map(\n (signal, i) => t10.expressionStatement(\n t10.callExpression(signal.identifier, [\n scopeIdentifier,\n bindings[i]\n ])\n )\n )\n )\n );\n }\n return t10.arrowFunctionExpression(\n [scopeIdentifier, valueIdentifier, cleanIdentifier],\n t10.blockStatement([\n declarations,\n t10.ifStatement(\n t10.unaryExpression(\"!\", cleanIdentifier),\n t10.expressionStatement(\n t10.assignmentExpression(\"=\", destructurePattern, valueIdentifier)\n )\n ),\n ...bindingSignals.map(\n (signal, i) => t10.expressionStatement(\n t10.callExpression(signal.identifier, [\n scopeIdentifier,\n bindings[i],\n cleanIdentifier\n ])\n )\n )\n ])\n );\n },\n hasDownstreamIntersections() {\n return bindings.some((binding) => {\n const reserve = binding.extra.reserve;\n const signal = getSignal(reserve.section, reserve);\n return signal.hasDownstreamIntersections();\n });\n }\n };\n }\n}\nfunction subscribe(provider, subscriber) {\n if (Array.isArray(provider)) {\n provider.forEach((p) => subscribe(p, subscriber));\n return;\n }\n const providerSignal = getSignal(subscriber.section, provider);\n providerSignal.intersection = pushRepeatable(\n providerSignal.intersection,\n subscriber.identifier\n );\n}\nfunction generateSignalName(section, references) {\n let name;\n if (references) {\n if (Array.isArray(references)) {\n name = \"expr\";\n for (const ref of references) {\n name += `_${ref.name}`;\n }\n } else {\n name = references.name;\n }\n } else {\n name = \"setup\";\n }\n name += section.name.replace(\"_\", \"$\");\n return currentProgramPath.scope.generateUid(name);\n}\nfunction queueSource(source, value, targetSection) {\n return callRuntime(\n \"queueSource\",\n getScopeExpression(targetSection, source.section),\n source.identifier,\n value\n );\n}\nfunction finalizeSignalArgs(args) {\n for (let i = args.length - 1; i >= 0; i--) {\n const arg = args[i];\n if (t10.isArrowFunctionExpression(arg)) {\n const body = arg.body.body;\n if (body) {\n if (body.length === 0) {\n args[i] = t10.nullLiteral();\n } else if (body.length === 1 && t10.isExpressionStatement(body[0])) {\n arg.body = body[0].expression;\n }\n }\n }\n }\n for (let i = args.length - 1; t10.isNullLiteral(args[i]); ) {\n args.length = i--;\n }\n}\nfunction addStatement(type, targetSection, references, statement, originalNodes, isInlined) {\n const signal = getSignal(targetSection, references);\n const statements = signal[type] ??= [];\n if (Array.isArray(statement)) {\n statements.push(...statement);\n } else {\n statements.push(statement);\n }\n if (type === \"effect\") {\n if (Array.isArray(originalNodes)) {\n for (const node of originalNodes) {\n if (isInlined || !t10.isFunction(node)) {\n addEffectReferences(signal, node);\n }\n }\n } else {\n if (isInlined || !t10.isFunction(originalNodes)) {\n addEffectReferences(signal, originalNodes);\n }\n }\n }\n}\nfunction addValue(targetSection, references, signal, value, scope = scopeIdentifier, intersectionExpression) {\n getSignal(targetSection, references).values.push({\n signal,\n value,\n scope,\n intersectionExpression\n });\n}\nfunction addEffectReferences(signal, expression) {\n signal.effectInlineReferences = repeatableReserves.addAll(\n signal.effectInlineReferences,\n expression.extra?.references\n );\n}\nfunction getResumeRegisterId(section, references) {\n const {\n markoOpts: { optimize },\n opts: { filename }\n } = currentProgramPath.hub.file;\n let name = \"\";\n if (references) {\n if (typeof references === \"string\") {\n name += `_${references}`;\n } else if (Array.isArray(references)) {\n for (const ref of references) {\n name += `_${ref.name}`;\n }\n } else {\n name += `_${references.name}`;\n }\n }\n return getTemplateId(optimize, `${filename}_${section.id}${name}`);\n}\nfunction writeSignals(section) {\n const signals = [...getSignals(section).values()].sort(sortSignals);\n for (const signal of signals) {\n let effectDeclarator;\n if (signal.effect.length) {\n const effectIdentifier = t10.identifier(`${signal.identifier.name}_effect`);\n if (signal.effectInlineReferences) {\n signal.effect.unshift(\n t10.variableDeclaration(\"const\", [\n t10.variableDeclarator(\n createScopeReadPattern(section, signal.effectInlineReferences),\n scopeIdentifier\n )\n ])\n );\n }\n effectDeclarator = t10.variableDeclarator(\n effectIdentifier,\n callRuntime(\n \"register\",\n t10.stringLiteral(getResumeRegisterId(section, signal.reserve)),\n t10.arrowFunctionExpression(\n [scopeIdentifier],\n signal.effect.length === 1 && t10.isExpressionStatement(signal.effect[0]) ? signal.effect[0].expression : t10.blockStatement(signal.effect)\n )\n )\n );\n signal.render.push(\n t10.expressionStatement(\n callRuntime(\"queueEffect\", scopeIdentifier, effectIdentifier)\n )\n );\n }\n const value = signal.register ? callRuntime(\n \"register\",\n t10.stringLiteral(getResumeRegisterId(section, signal.reserve)),\n signal.build()\n ) : signal.build();\n if (t10.isCallExpression(value)) {\n finalizeSignalArgs(value.arguments);\n }\n const signalDeclarator = t10.variableDeclarator(signal.identifier, value);\n const roots = currentProgramPath.pushContainer(\n \"body\",\n effectDeclarator ? [\n t10.variableDeclaration(\"const\", [effectDeclarator]),\n t10.variableDeclaration(\"const\", [signalDeclarator])\n ] : t10.variableDeclaration(\"const\", [signalDeclarator])\n );\n for (const root of roots) {\n root.traverse(bindFunctionsVisitor, { root, section });\n }\n }\n}\nfunction sortSignals(a, b) {\n const aReserves = getReserves(a);\n const bReserves = getReserves(b);\n for (let i = Math.max(aReserves.length, bReserves.length) - 1; i >= 0; i--) {\n const diff = (bReserves[i] ?? -1) - (aReserves[i] ?? -1);\n if (diff !== 0)\n return diff;\n }\n return 0;\n}\nfunction getReserves({ reserve }) {\n if (!reserve) {\n return [];\n } else if (Array.isArray(reserve)) {\n return reserve.map(getMappedId).sort();\n } else {\n return [getMappedId(reserve)];\n }\n}\nfunction getMappedId(reserve) {\n return (reserve.type === 0 ? 1 : 0) * 1e4 + reserve.id;\n}\nfunction addHTMLEffectCall(section, references) {\n addStatement(\"effect\", section, references, void 0, []);\n}\nfunction writeHTMLResumeStatements(path3, tagVarIdentifier) {\n const section = getOrCreateSection(path3);\n const intersections = currentProgramPath.node.extra.intersectionsBySection?.[section.id] ?? [];\n const allSignals = Array.from(getSignals(section).values());\n const scopeIdIdentifier = getScopeIdIdentifier(section);\n const serializedReferences = [];\n for (const intersection of intersections) {\n for (const reference of intersection) {\n if (reference.type !== 0 /* Visit */) {\n repeatableReserves.add(serializedReferences, reference);\n }\n }\n }\n for (let i = allSignals.length; i--; ) {\n if (allSignals[i].effect.length) {\n const signalRefs = allSignals[i].reserve;\n repeatableReserves.addAll(serializedReferences, signalRefs);\n path3.pushContainer(\n \"body\",\n t10.expressionStatement(\n callRuntime(\n \"writeEffect\",\n scopeIdIdentifier,\n t10.stringLiteral(getResumeRegisterId(section, signalRefs))\n )\n )\n );\n }\n }\n const accessors = /* @__PURE__ */ new Set();\n const additionalProperties = getSerializedScopeProperties(section);\n const serializedProperties = serializedReferences.reduce((acc, ref) => {\n const accessor = getScopeAccessorLiteral(ref);\n if (ref.section.id === section.id) {\n acc.push(t10.objectProperty(accessor, t10.identifier(ref.name)));\n accessors.add(accessor.value);\n } else {\n getSerializedScopeProperties(ref.section).set(\n accessor,\n t10.identifier(ref.name)\n );\n getSerializedScopeProperties(section).set(\n t10.stringLiteral(\"_\"),\n callRuntime(\"serializedScope\", getScopeIdIdentifier(ref.section))\n // TODO: section.parent\n );\n }\n return acc;\n }, []);\n if (tagVarIdentifier && returnId(section) !== void 0) {\n serializedProperties.push(\n t10.objectProperty(\n t10.stringLiteral(\"/\" /* TAG_VARIABLE */),\n tagVarIdentifier\n )\n );\n }\n for (const [key, value] of additionalProperties) {\n if (!accessors.has(key.value)) {\n serializedProperties.push(\n t10.objectProperty(key, value, !t10.isLiteral(key))\n );\n accessors.add(key.value);\n }\n }\n if (serializedProperties.length || forceResumeScope(section)) {\n const builder = getRegisterScopeBuilder(section);\n path3.pushContainer(\n \"body\",\n t10.expressionStatement(\n callRuntime(\n \"writeScope\",\n scopeIdIdentifier,\n builder ? builder(t10.objectExpression(serializedProperties)) : t10.objectExpression(serializedProperties)\n )\n )\n );\n }\n if (path3.get(\"body\").length) {\n path3.unshiftContainer(\n \"body\",\n t10.variableDeclaration(\"const\", [\n t10.variableDeclarator(scopeIdIdentifier, callRuntime(\"nextScopeId\"))\n ])\n );\n }\n}\nvar bindFunctionsVisitor = {\n FunctionExpression: { exit: bindFunction },\n ArrowFunctionExpression: { exit: bindFunction }\n};\nfunction bindFunction(fn, { root, section }) {\n const { node } = fn;\n const { extra } = node;\n const references = extra?.references;\n const program = fn.hub.file.path;\n const functionIdentifier = program.scope.generateUidIdentifier(extra?.name);\n if (references) {\n if (node.body.type !== \"BlockStatement\") {\n node.body = t10.blockStatement([t10.returnStatement(node.body)]);\n }\n node.body.body.unshift(\n t10.variableDeclaration(\"const\", [\n t10.variableDeclarator(\n createScopeReadPattern(section, references),\n scopeIdentifier\n )\n ])\n );\n }\n let parent = fn.parentPath;\n while (parent) {\n if (parent.isFunction())\n return;\n if (parent === root)\n return;\n parent = parent.parentPath;\n }\n root.insertBefore(\n t10.variableDeclaration(\"const\", [\n t10.variableDeclarator(functionIdentifier, node)\n ])\n );\n node.params.unshift(scopeIdentifier);\n fn.replaceWith(\n callRuntime(\"bindFunction\", scopeIdentifier, functionIdentifier)\n );\n}\nfunction getSetup(section) {\n return getSignals(section).get(void 0)?.identifier;\n}\n\n// src/visitors/program/dom.ts\nvar dom_default = {\n translate: {\n exit(program) {\n visit(program);\n const section = getSection(program);\n const templateIdentifier = t11.identifier(\"template\");\n const walksIdentifier = t11.identifier(\"walks\");\n const setupIdentifier = t11.identifier(\"setup\");\n const attrsSignalIdentifier = t11.identifier(\"attrs\");\n const closuresIdentifier = t11.identifier(\"closures\");\n const { attrs: attrs2 } = program.node.extra;\n const { walks, writes, setup } = getSectionMeta(section);\n forEachSectionReverse((childSection) => {\n const sectionPath = getSectionPath(childSection);\n const tagParamsSignal = sectionPath.isProgram() ? void 0 : getTagParamsSignal(\n sectionPath.get(\"params\")\n );\n writeSignals(childSection);\n if (childSection !== section) {\n const { walks: walks2, writes: writes2, setup: setup2, register: register2 } = getSectionMeta(childSection);\n const closures2 = getClosures(childSection);\n const identifier = getRenderer(childSection);\n const renderer = callRuntime(\n \"createRenderer\",\n writes2,\n walks2,\n setup2,\n closures2.length && t11.arrayExpression(closures2),\n void 0,\n void 0,\n void 0,\n void 0,\n tagParamsSignal?.build()\n );\n program.node.body.push(\n t11.variableDeclaration(\"const\", [\n t11.variableDeclarator(\n identifier,\n register2 ? callRuntime(\n \"register\",\n t11.stringLiteral(\n getResumeRegisterId(childSection, \"renderer\")\n ),\n renderer\n ) : renderer\n )\n ])\n );\n }\n });\n if (attrs2) {\n const exportSpecifiers = [];\n for (const name in attrs2.bindings) {\n const bindingIdentifier = attrs2.bindings[name];\n const signalIdentifier = getSignal(\n section,\n bindingIdentifier.extra.reserve\n ).identifier;\n exportSpecifiers.push(\n t11.exportSpecifier(signalIdentifier, signalIdentifier)\n );\n }\n program.node.body.push(\n t11.exportNamedDeclaration(\n t11.variableDeclaration(\"const\", [\n t11.variableDeclarator(\n attrsSignalIdentifier,\n t11.isIdentifier(attrs2.var) ? getSignal(\n section,\n attrs2.var.extra.reserve\n ).identifier : getDestructureSignal(attrs2.bindings, attrs2.var)?.build()\n )\n ])\n ),\n t11.exportNamedDeclaration(null, exportSpecifiers)\n );\n }\n const closures = getClosures(section);\n program.node.body.push(\n t11.exportNamedDeclaration(\n t11.variableDeclaration(\"const\", [\n t11.variableDeclarator(\n templateIdentifier,\n writes || t11.stringLiteral(\"\")\n )\n ])\n ),\n t11.exportNamedDeclaration(\n t11.variableDeclaration(\"const\", [\n t11.variableDeclarator(walksIdentifier, walks || t11.stringLiteral(\"\"))\n ])\n ),\n t11.exportNamedDeclaration(\n t11.variableDeclaration(\"const\", [\n t11.variableDeclarator(\n setupIdentifier,\n t11.isNullLiteral(setup) || !setup ? t11.functionExpression(null, [], t11.blockStatement([])) : setup\n )\n ])\n )\n );\n if (closures.length) {\n program.node.body.push(\n t11.exportNamedDeclaration(\n t11.variableDeclaration(\"const\", [\n t11.variableDeclarator(\n closuresIdentifier,\n t11.arrayExpression(closures)\n )\n ])\n )\n );\n }\n const {\n markoOpts: { optimize },\n opts: { filename }\n } = program.hub.file;\n program.node.body.push(\n t11.exportDefaultDeclaration(\n callRuntime(\n \"createTemplate\",\n callRuntime(\n \"createRenderer\",\n templateIdentifier,\n walksIdentifier,\n setupIdentifier,\n closures.length && closuresIdentifier,\n void 0,\n void 0,\n void 0,\n void 0,\n attrs2 && attrsSignalIdentifier\n ),\n t11.stringLiteral(getTemplateId2(optimize, `${filename}`))\n )\n )\n );\n }\n }\n};\n\n// src/visitors/program/html.ts\nimport { types as t12 } from \"@marko/compiler\";\nimport { getTemplateId as getTemplateId3 } from \"@marko/babel-utils\";\n\n// src/util/is-static.ts\nfunction isStatic(path3) {\n return path3.isImportDeclaration() || path3.isExportDeclaration() || path3.isMarkoScriptlet({ static: true });\n}\n\n// src/visitors/program/html.ts\nvar html_default = {\n translate: {\n exit(program) {\n const section = getSection(program);\n const tagVarIdentifier = program.scope.generateUidIdentifier(\"tagVar\");\n flushInto(program);\n writeHTMLResumeStatements(program, tagVarIdentifier);\n const returnIdentifier = returnId(section);\n if (returnIdentifier !== void 0) {\n program.pushContainer(\"body\", t12.returnStatement(returnIdentifier));\n }\n const renderContent = [];\n for (const child of program.get(\"body\")) {\n if (!isStatic(child)) {\n renderContent.push(child.node);\n child.remove();\n } else if (child.isMarkoScriptlet()) {\n child.replaceWithMultiple(child.node.body);\n }\n }\n const rendererId = program.scope.generateUidIdentifier(\"renderer\");\n const { attrs: attrs2 } = program.node.extra;\n const {\n markoOpts: { optimize },\n opts: { filename }\n } = program.hub.file;\n program.pushContainer(\"body\", [\n t12.variableDeclaration(\"const\", [\n t12.variableDeclarator(\n rendererId,\n callRuntime(\n \"createRenderer\",\n t12.arrowFunctionExpression(\n [\n attrs2 ? attrs2.var : t12.identifier(\"input\"),\n tagVarIdentifier\n ],\n t12.blockStatement(renderContent)\n )\n )\n )\n ]),\n t12.exportDefaultDeclaration(\n callRuntime(\n \"createTemplate\",\n rendererId,\n t12.stringLiteral(getTemplateId3(optimize, `${filename}`))\n )\n )\n ]);\n }\n }\n};\n\n// src/visitors/program/index.ts\nvar currentProgramPath;\nvar scopeIdentifier;\nvar cleanIdentifier;\nvar previousProgramPath = /* @__PURE__ */ new WeakMap();\nvar program_default = {\n migrate: {\n enter(program) {\n previousProgramPath.set(program, currentProgramPath);\n currentProgramPath = program;\n },\n exit() {\n currentProgramPath.scope.crawl();\n currentProgramPath = previousProgramPath.get(currentProgramPath);\n }\n },\n analyze: {\n enter(program) {\n previousProgramPath.set(program, currentProgramPath);\n currentProgramPath = program;\n startSection(program);\n },\n exit() {\n assignFinalIds();\n finalizeIntersections();\n currentProgramPath = previousProgramPath.get(currentProgramPath);\n }\n },\n translate: {\n enter(program) {\n previousProgramPath.set(program, currentProgramPath);\n currentProgramPath = program;\n scopeIdentifier = isOutputDOM() ? program.scope.generateUidIdentifier(\"scope\") : null;\n cleanIdentifier = isOutputDOM() ? program.scope.generateUidIdentifier(\"clean\") : null;\n if (getMarkoOpts().output === \"hydrate\") {\n program.skip();\n program.node.body = [\n t13.importDeclaration(\n [],\n t13.stringLiteral(program.hub.file.opts.filename)\n )\n ];\n if (program.node.extra.hasInteractiveChild || program.node.extra.isInteractive) {\n program.node.body.push(t13.expressionStatement(callRuntime(\"init\")));\n }\n return;\n }\n },\n exit(program) {\n if (isOutputHTML()) {\n html_default.translate.exit(program);\n } else {\n dom_default.translate.exit(program);\n }\n currentProgramPath = previousProgramPath.get(currentProgramPath);\n }\n }\n};\n\n// src/visitors/import-declaration.ts\nimport { resolveTagImport } from \"@marko/babel-utils\";\nvar import_declaration_default = {\n translate: {\n exit(path3) {\n const source = path3.get(\"source\");\n const request = source.node.value;\n source.node.value = resolveTagImport(source, request) || request;\n }\n }\n};\n\n// src/visitors/document-type.ts\nvar document_type_default = {\n translate(documentType) {\n if (isOutputHTML()) {\n writeTo(documentType)``;\n }\n documentType.remove();\n }\n};\n\n// src/visitors/assignment-expression.ts\nimport { types as t14 } from \"@marko/compiler\";\n\n// src/util/replace-assignments.ts\nvar assignmentReplacer = /* @__PURE__ */ new WeakMap();\nfunction getReplacement(assignment, value) {\n return assignmentReplacer.get(assignment.node)?.(assignment, value);\n}\nfunction registerAssignmentReplacer(binding, map) {\n for (const assignment of binding.constantViolations) {\n assignmentReplacer.set(assignment.node, map);\n }\n}\n\n// src/visitors/assignment-expression.ts\nvar assignment_expression_default = {\n translate: {\n exit(assignment) {\n if (isOutputDOM()) {\n const value = assignment.node.operator === \"=\" ? assignment.node.right : t14.binaryExpression(\n assignment.node.operator.slice(\n 0,\n -1\n ),\n assignment.node.left,\n assignment.node.right\n );\n const replacement = getReplacement(assignment, value);\n if (replacement) {\n assignment.replaceWith(replacement);\n }\n }\n }\n }\n};\n\n// src/visitors/update-expression.ts\nimport { types as t15 } from \"@marko/compiler\";\nvar update_expression_default = {\n translate: {\n exit(assignment) {\n if (isOutputDOM()) {\n const value = t15.binaryExpression(\n assignment.node.operator === \"++\" ? \"+\" : \"-\",\n assignment.node.argument,\n t15.numericLiteral(1)\n );\n const replacement = getReplacement(assignment, value);\n if (replacement) {\n assignment.replaceWith(\n assignment.node.prefix || assignment.parentPath.isExpressionStatement() ? replacement : t15.sequenceExpression([replacement, assignment.node.argument])\n );\n }\n }\n }\n }\n};\n\n// src/visitors/declaration.ts\nvar declaration_default = {\n translate(declaration) {\n if (isOutputHTML()) {\n writeTo(declaration)`${declaration.node.value}?>`;\n }\n declaration.remove();\n }\n};\n\n// src/visitors/cdata.ts\nvar cdata_default = {\n translate(cdata) {\n if (isOutputHTML()) {\n writeTo(cdata)``;\n }\n cdata.remove();\n }\n};\n\n// src/visitors/text.ts\nimport { types as t16 } from \"@marko/compiler\";\nvar text_default = {\n translate(text) {\n const followingSiblings = text.container.slice(\n text.key + 1\n );\n let needsSeparator = false;\n if (isOutputHTML()) {\n for (const sibling of followingSiblings) {\n if (t16.isMarkoPlaceholder(sibling)) {\n needsSeparator = true;\n break;\n } else if (t16.isMarkoTag(sibling) || t16.isMarkoText(sibling)) {\n break;\n }\n }\n }\n writeTo(text)`${text.node.value}${needsSeparator ? \"\" : \"\"}`;\n enterShallow(text);\n text.remove();\n }\n};\n\n// src/visitors/tag/index.ts\nimport { types as t26 } from \"@marko/compiler\";\nimport {\n assertNoArgs,\n getTagDef as getTagDef3,\n isNativeTag as isNativeTag2\n} from \"@marko/babel-utils\";\n\n// src/util/plugin-hooks.ts\nimport { types as t17 } from \"@marko/compiler\";\nfunction enter2(modulePlugin, path3) {\n if (!modulePlugin) {\n return false;\n }\n const { node } = path3;\n const plugin = isModulePlugin(modulePlugin) ? modulePlugin.default : modulePlugin;\n if (isFunctionPlugin(plugin)) {\n plugin(path3, t17);\n } else if (plugin.enter) {\n plugin.enter(path3, t17);\n }\n return node !== path3.node;\n}\nfunction exit2(modulePlugin, path3) {\n if (!modulePlugin) {\n return false;\n }\n const { node } = path3;\n const plugin = isModulePlugin(modulePlugin) ? modulePlugin.default : modulePlugin;\n if (!isFunctionPlugin(plugin) && plugin.exit) {\n plugin.exit(path3, t17);\n }\n return node !== path3.node;\n}\nfunction isModulePlugin(plugin) {\n return Boolean(plugin.default);\n}\nfunction isFunctionPlugin(plugin) {\n return typeof plugin === \"function\";\n}\n\n// src/util/nested-attribute-tags.ts\nimport {\n isAttributeTag,\n isLoopTag,\n isTransparentTag\n} from \"@marko/babel-utils\";\nfunction analyzeAttributeTags(tag) {\n const { extra } = tag.node;\n extra.nestedAttributeTags = {};\n extra.hoistedControlFlows = 0;\n analyzeChildren(extra, false, false, tag);\n}\nfunction analyzeChildren(rootExtra, repeated, dynamic, tag) {\n let hasAttributeTags = false;\n for (const child of tag.get(\"body\").get(\"body\")) {\n if (child.isMarkoTag()) {\n if (analyzeChild(rootExtra, repeated, dynamic, child)) {\n hasAttributeTags = true;\n }\n }\n }\n return hasAttributeTags;\n}\nfunction analyzeChild(rootExtra, repeated, dynamic, tag) {\n if (isTransparentTag(tag)) {\n if (analyzeChildren(rootExtra, repeated || isLoopTag(tag), true, tag)) {\n if (!isTransparentTag(tag.parentPath.parentPath)) {\n rootExtra.hoistedControlFlows++;\n }\n return true;\n }\n } else if (isAttributeTag(tag)) {\n const attrName = tag.node.name.value.slice(1);\n const lookup = rootExtra.nestedAttributeTags;\n const existing = lookup[attrName];\n const info = existing || (lookup[attrName] = {\n dynamic: false,\n repeated: false\n });\n info.dynamic ||= dynamic;\n info.repeated ||= repeated || existing !== void 0;\n return true;\n }\n return false;\n}\n\n// src/visitors/tag/native-tag.ts\nimport { types as t21 } from \"@marko/compiler\";\nimport { getTagDef } from \"@marko/babel-utils\";\n\n// src/util/attrs-to-object.ts\nimport { types as t19 } from \"@marko/compiler\";\n\n// src/util/to-property-name.ts\nimport { types as t18 } from \"@marko/compiler\";\nvar IDENTIFIER_REG = /^[0-9A-Z_$]+$/i;\nfunction toPropertyName(name) {\n return IDENTIFIER_REG.test(name) ? t18.identifier(name) : t18.stringLiteral(name);\n}\n\n// src/util/attrs-to-object.ts\nfunction attrsToObject(tag, withRenderBody = false) {\n const { node } = tag;\n let result = t19.objectExpression([]);\n const resultExtra = result.extra = {};\n for (const attr2 of node.attributes) {\n const value = attr2.value;\n if (t19.isMarkoSpreadAttribute(attr2)) {\n result.properties.push(t19.spreadElement(value));\n } else {\n result.properties.push(\n t19.objectProperty(toPropertyName(attr2.name), value)\n );\n }\n }\n if (withRenderBody) {\n const { body, params } = node.body;\n let hoistedControlFlows = node.extra.hoistedControlFlows;\n if (hoistedControlFlows) {\n for (const child of tag.get(\"body\").get(\"body\")) {\n tag.insertBefore(child.node);\n child.remove();\n if (child.isConditional() || child.isLoop()) {\n if (!--hoistedControlFlows) {\n break;\n }\n }\n }\n }\n if (body.length) {\n result.properties.push(\n t19.objectMethod(\n \"method\",\n t19.identifier(\"renderBody\"),\n params.length ? [\n t19.objectPattern([\n t19.objectProperty(\n t19.identifier(\"value\"),\n t19.arrayPattern(params)\n )\n ])\n ] : [],\n t19.blockStatement(body)\n )\n );\n }\n }\n if (result.properties.length) {\n if (result.properties.length === 1) {\n const [prop] = result.properties;\n if (t19.isSpreadElement(prop)) {\n result = prop.argument;\n result.extra = resultExtra;\n }\n }\n }\n return result;\n}\nfunction getRenderBodyProp(attrsObject) {\n if (t19.isObjectExpression(attrsObject)) {\n const lastProp = attrsObject.properties[attrsObject.properties.length - 1];\n if (t19.isObjectMethod(lastProp) && lastProp.key.name === \"renderBody\") {\n return lastProp;\n }\n }\n}\n\n// src/util/translate-var.ts\nimport { types as t20 } from \"@marko/compiler\";\nfunction translateVar(tag, initialValue, kind = \"const\") {\n const {\n node: { var: tagVar }\n } = tag;\n if (!tagVar) {\n return;\n }\n tag.get(\"var\").remove();\n tag.insertBefore(\n t20.variableDeclaration(kind, [\n t20.variableDeclarator(t20.cloneDeep(tagVar), initialValue)\n ])\n );\n tag.hub.file.path.scope.crawl();\n}\n\n// src/util/evaluate.ts\nfunction evaluate(path3) {\n let { extra } = path3.node;\n if (!extra) {\n extra = path3.node.extra = {};\n }\n if (extra.confident === void 0) {\n const value = path3.get(\"value\");\n const { confident, value: computed } = value.evaluate();\n extra.computed = computed;\n extra.confident = confident;\n }\n return extra;\n}\n\n// src/visitors/tag/native-tag.ts\nvar native_tag_default = {\n analyze: {\n enter(tag) {\n const { node } = tag;\n const attrs2 = tag.get(\"attributes\");\n let section = tag.has(\"var\") ? getOrCreateSection(tag) : void 0;\n if (attrs2.some(isSpreadAttr)) {\n } else {\n for (const attr2 of attrs2) {\n const attrNode = attr2.node;\n const { name: name2 } = attrNode;\n if (isEventHandler(name2)) {\n section ??= getOrCreateSection(tag);\n (currentProgramPath.node.extra ?? {}).isInteractive = true;\n } else if (!evaluate(attr2).confident) {\n section ??= getOrCreateSection(tag);\n }\n }\n }\n const name = node.var ? node.var.name : node.name.value;\n if (section !== void 0) {\n reserveScope(\n 0 /* Visit */,\n section,\n node,\n name,\n `#${tag.get(\"name\").evaluate().value}`\n );\n }\n }\n },\n translate: {\n enter(tag) {\n const { extra } = tag.node;\n const isHTML = isOutputHTML();\n const name = tag.get(\"name\");\n const attrs2 = tag.get(\"attributes\");\n const tagDef = getTagDef(tag);\n const hasSpread = attrs2.some((attr2) => attr2.isMarkoSpreadAttribute());\n const write2 = writeTo(tag);\n const section = getSection(tag);\n if (isHTML && extra.tagNameNullable) {\n flushBefore(tag);\n }\n if (tag.has(\"var\")) {\n if (isHTML) {\n translateVar(\n tag,\n t21.arrowFunctionExpression(\n [],\n t21.blockStatement([\n t21.throwStatement(\n t21.newExpression(t21.identifier(\"Error\"), [\n t21.stringLiteral(\"Cannot reference DOM node from server\")\n ])\n )\n ])\n )\n );\n } else {\n const varName = tag.node.var.name;\n const references = tag.scope.getBinding(varName).referencePaths;\n let createElFunction = void 0;\n for (const reference of references) {\n const referenceSection = getSection(reference);\n if (reference.parentPath?.isCallExpression()) {\n reference.parentPath.replaceWith(\n t21.expressionStatement(\n createScopeReadExpression(referenceSection, extra.reserve)\n )\n );\n } else {\n createElFunction ??= t21.identifier(varName + \"_getter\");\n reference.replaceWith(\n callRuntime(\n \"bindFunction\",\n getScopeExpression(referenceSection, extra.reserve.section),\n createElFunction\n )\n );\n }\n }\n if (createElFunction) {\n currentProgramPath.pushContainer(\n \"body\",\n t21.variableDeclaration(\"const\", [\n t21.variableDeclarator(\n createElFunction,\n t21.arrowFunctionExpression(\n [scopeIdentifier],\n t21.memberExpression(\n scopeIdentifier,\n getScopeAccessorLiteral(extra.reserve),\n true\n )\n )\n )\n ])\n );\n }\n }\n }\n let visitAccessor;\n if (extra.reserve) {\n visitAccessor = getScopeAccessorLiteral(extra.reserve);\n visit(tag, 32 /* Get */);\n }\n write2`<${name.node}`;\n if (hasSpread) {\n const attrsCallExpr = callRuntime(\n \"attrs\",\n scopeIdentifier,\n attrsToObject(tag)\n );\n if (isHTML) {\n write2`${attrsCallExpr}`;\n } else {\n tag.insertBefore(t21.expressionStatement(attrsCallExpr));\n }\n } else {\n for (const attr2 of attrs2) {\n const name2 = attr2.node.name;\n const extra2 = attr2.node.extra ?? {};\n const value = attr2.get(\"value\");\n const { confident, computed, valueReferences } = extra2;\n switch (name2) {\n case \"class\":\n case \"style\": {\n const helper = `${name2}Attr`;\n if (confident) {\n write2`${getHTMLRuntime()[helper](computed)}`;\n } else if (isHTML) {\n write2`${callRuntime(helper, value.node)}`;\n } else {\n addStatement(\n \"render\",\n section,\n valueReferences,\n t21.expressionStatement(\n callRuntime(\n helper,\n t21.memberExpression(scopeIdentifier, visitAccessor, true),\n value.node\n )\n )\n );\n }\n break;\n }\n default:\n if (confident) {\n write2`${getHTMLRuntime().attr(name2, computed)}`;\n } else if (isHTML) {\n if (isEventHandler(name2)) {\n addHTMLEffectCall(section, valueReferences);\n } else {\n write2`${callRuntime(\n \"attr\",\n t21.stringLiteral(name2),\n value.node\n )}`;\n }\n } else if (isEventHandler(name2)) {\n addStatement(\n \"effect\",\n section,\n valueReferences,\n t21.expressionStatement(\n callRuntime(\n \"on\",\n t21.memberExpression(scopeIdentifier, visitAccessor, true),\n t21.stringLiteral(getEventHandlerName(name2)),\n value.node\n )\n ),\n value.node\n );\n } else {\n addStatement(\n \"render\",\n section,\n valueReferences,\n t21.expressionStatement(\n callRuntime(\n \"attr\",\n t21.memberExpression(scopeIdentifier, visitAccessor, true),\n t21.stringLiteral(name2),\n value.node\n )\n )\n );\n }\n break;\n }\n }\n }\n if (tagDef && tagDef.parseOptions?.openTagOnly) {\n switch (tagDef.htmlType) {\n case \"svg\":\n case \"math\":\n write2`/>`;\n break;\n default:\n write2`>`;\n break;\n }\n } else {\n write2`>`;\n }\n if (isHTML && extra.tagNameNullable) {\n tag.insertBefore(t21.ifStatement(name.node, consumeHTML(tag)))[0].skip();\n }\n enter(tag);\n },\n exit(tag) {\n const { extra } = tag.node;\n const isHTML = isOutputHTML();\n const openTagOnly = getTagDef(tag)?.parseOptions?.openTagOnly;\n if (isHTML && extra.tagNameNullable) {\n flushInto(tag);\n }\n tag.insertBefore(tag.node.body.body).forEach((child) => child.skip());\n if (!openTagOnly) {\n writeTo(tag)`${tag.node.name}>`;\n }\n if (isHTML && extra.tagNameNullable) {\n tag.insertBefore(\n t21.ifStatement(tag.node.name, consumeHTML(tag))\n )[0].skip();\n }\n if (extra.reserve) {\n markNode(tag);\n }\n exit(tag);\n tag.remove();\n }\n }\n};\nfunction isSpreadAttr(attr2) {\n return attr2.type === \"MarkoSpreadAttribute\";\n}\nfunction isEventHandler(propName) {\n return /^on[A-Z-]/.test(propName);\n}\nfunction getEventHandlerName(propName) {\n return propName.charAt(2) === \"-\" ? propName.slice(3) : propName.charAt(2).toLowerCase() + propName.slice(3);\n}\n\n// src/visitors/tag/custom-tag.ts\nimport { types as t22 } from \"@marko/compiler\";\nimport {\n getTagDef as getTagDef2,\n importDefault,\n importNamed as importNamed2,\n loadFileForTag as loadFileForTag2,\n resolveRelativePath\n} from \"@marko/babel-utils\";\nvar custom_tag_default = {\n analyze: {\n enter(tag) {\n trackReferences(tag);\n const body = tag.get(\"body\");\n if (body.get(\"body\").length) {\n startSection(body);\n }\n if (getTagDef2(tag)?.template) {\n reserveScope(\n 0 /* Visit */,\n getOrCreateSection(tag),\n tag.node,\n \"#childScope\"\n );\n }\n const childFile = loadFileForTag2(tag);\n const childProgramExtra = childFile?.ast.program.extra;\n const hasInteractiveChild = childProgramExtra?.isInteractive || childProgramExtra?.hasInteractiveChild;\n if (hasInteractiveChild) {\n (currentProgramPath.node.extra ?? {}).hasInteractiveChild = true;\n }\n },\n exit(tag) {\n const tagDef = getTagDef2(tag);\n const template = tagDef?.template;\n const section = getOrCreateSection(tag);\n if (template) {\n tag.node.extra.attrsReferences = mergeReferences(\n section,\n tag.node.attributes.filter((attr2) => attr2.extra?.valueReferences).map((attr2) => [attr2.extra, \"valueReferences\"])\n );\n }\n }\n },\n translate: {\n enter(tag) {\n visit(tag);\n if (isOutputHTML()) {\n flushBefore(tag);\n }\n },\n exit(tag) {\n if (isOutputHTML()) {\n translateHTML(tag);\n } else {\n translateDOM(tag);\n }\n }\n }\n};\nfunction translateHTML(tag) {\n const tagBody = tag.get(\"body\");\n const { node } = tag;\n let tagIdentifier;\n flushInto(tag);\n writeHTMLResumeStatements(tagBody);\n if (t22.isStringLiteral(node.name)) {\n const { file } = tag.hub;\n const tagName = node.name.value;\n const relativePath = getTagRelativePath(tag);\n tagIdentifier = t22.memberExpression(\n importDefault(file, relativePath, tagName),\n t22.identifier(\"_\")\n );\n } else {\n tagIdentifier = node.name;\n }\n const tagVar = node.var;\n const attrsObject = attrsToObject(tag, true);\n const renderBodyProp = getRenderBodyProp(attrsObject);\n if (node.extra.tagNameNullable) {\n let renderBodyId = void 0;\n let renderTagExpr = callExpression(\n tagIdentifier,\n attrsToObject(tag)\n );\n if (renderBodyProp) {\n renderBodyId = tag.scope.generateUidIdentifier(\"renderBody\");\n const [renderBodyPath] = tag.insertBefore(\n t22.variableDeclaration(\"const\", [\n t22.variableDeclarator(\n renderBodyId,\n callRuntime(\n \"createRenderer\",\n t22.arrowFunctionExpression(\n renderBodyProp.params.length ? [\n t22.objectPattern([\n t22.objectProperty(\n t22.identifier(\"value\"),\n t22.arrayPattern(renderBodyProp.params)\n )\n ])\n ] : [],\n renderBodyProp.body\n )\n )\n )\n ])\n );\n renderBodyPath.skip();\n attrsObject.properties[attrsObject.properties.length - 1] = t22.objectProperty(t22.identifier(\"renderBody\"), renderBodyId);\n }\n if (tagVar) {\n translateVar(tag, t22.unaryExpression(\"void\", t22.numericLiteral(0)), \"let\");\n renderTagExpr = t22.assignmentExpression(\"=\", tagVar, renderTagExpr);\n }\n tag.replaceWith(\n t22.ifStatement(\n tagIdentifier,\n t22.expressionStatement(renderTagExpr),\n renderBodyId && callStatement(renderBodyId)\n )\n )[0].skip();\n } else if (tagVar) {\n const section = getSection(tag);\n translateVar(\n tag,\n callExpression(\n tagIdentifier,\n attrsObject,\n callRuntime(\n \"register\",\n callRuntime(\n \"createRenderer\",\n t22.arrowFunctionExpression([], t22.blockStatement([]))\n ),\n t22.stringLiteral(\n getResumeRegisterId(\n section,\n node.var.extra?.reserve\n )\n ),\n getScopeIdIdentifier(section)\n )\n )\n );\n setForceResumeScope(section);\n tag.remove();\n } else {\n tag.replaceWith(callStatement(tagIdentifier, attrsObject))[0].skip();\n }\n}\nfunction translateDOM(tag) {\n const tagSection = getSection(tag);\n const tagBody = tag.get(\"body\");\n const tagBodySection = getSection(tagBody);\n const { node } = tag;\n const write2 = writeTo(tag);\n const binding = node.extra.reserve;\n const { file } = tag.hub;\n const tagName = node.name.value;\n const relativePath = getTagRelativePath(tag);\n const childFile = loadFileForTag2(tag);\n const childProgram = childFile.ast.program;\n const tagIdentifier = importNamed2(file, relativePath, \"setup\", tagName);\n let tagAttrsIdentifier;\n if (childProgram.extra.attrs) {\n tagAttrsIdentifier = importNamed2(\n file,\n relativePath,\n \"attrs\",\n `${tagName}_attrs`\n );\n }\n write2`${importNamed2(file, relativePath, \"template\", `${tagName}_template`)}`;\n injectWalks(\n tag,\n importNamed2(file, relativePath, \"walks\", `${tagName}_walks`)\n );\n if (childProgram.extra.closures) {\n getClosures(tagSection).push(\n callRuntime(\n \"childClosures\",\n importNamed2(file, relativePath, \"closures\", `${tagName}_closures`),\n getScopeAccessorLiteral(binding)\n )\n );\n }\n let attrsObject = attrsToObject(tag);\n if (tagBodySection !== tagSection) {\n attrsObject ??= t22.objectExpression([]);\n attrsObject.properties.push(\n t22.objectProperty(\n t22.identifier(\"renderBody\"),\n callRuntime(\n \"bindRenderer\",\n scopeIdentifier,\n getRenderer(tagBodySection)\n )\n )\n );\n }\n if (node.var) {\n const source = initValue(\n // TODO: support destructuring\n node.var.extra.reserve\n );\n source.register = true;\n addStatement(\n \"render\",\n tagSection,\n void 0,\n t22.expressionStatement(\n callRuntime(\n \"setTagVar\",\n scopeIdentifier,\n getScopeAccessorLiteral(binding),\n source.identifier\n )\n )\n );\n }\n addStatement(\n \"render\",\n tagSection,\n void 0,\n t22.expressionStatement(\n t22.callExpression(tagIdentifier, [\n createScopeReadExpression(tagSection, binding)\n ])\n )\n );\n if (attrsObject && tagAttrsIdentifier) {\n addValue(\n tagSection,\n tag.node.extra.attrsReferences,\n {\n identifier: tagAttrsIdentifier,\n hasDownstreamIntersections: () => true\n },\n attrsObject,\n createScopeReadExpression(tagSection, binding),\n callRuntime(\n \"inChild\",\n getScopeAccessorLiteral(binding),\n t22.identifier(tagAttrsIdentifier.name)\n )\n );\n }\n tag.remove();\n}\nfunction getTagRelativePath(tag) {\n const {\n node,\n hub: { file }\n } = tag;\n const nameIsString = t22.isStringLiteral(node.name);\n let relativePath;\n if (nameIsString) {\n const tagDef = getTagDef2(tag);\n const template = tagDef?.template;\n relativePath = template && resolveRelativePath(file, template);\n }\n if (!relativePath) {\n throw tag.get(\"name\").buildCodeFrameError(\n `Unable to find entry point for custom tag <${nameIsString ? node.name.value : node.name}>.`\n );\n }\n const tags = file.metadata.marko.tags;\n if (!tags.includes(relativePath)) {\n tags.push(relativePath);\n }\n return relativePath;\n}\nfunction callStatement(id, ...args) {\n return t22.expressionStatement(callExpression(id, ...args));\n}\nfunction callExpression(id, ...args) {\n return t22.callExpression(id, args.filter(Boolean));\n}\n\n// src/visitors/tag/dynamic-tag.ts\nimport { types as t24 } from \"@marko/compiler\";\n\n// src/util/to-first-expression-or-block.ts\nimport { types as t23 } from \"@marko/compiler\";\nfunction toFirstExpressionOrBlock(body) {\n const nodes = body.body;\n if (nodes.length === 1 && t23.isExpressionStatement(nodes[0])) {\n return nodes[0].expression;\n }\n if (t23.isBlockStatement(body)) {\n return body;\n }\n return t23.blockStatement(nodes);\n}\n\n// src/visitors/tag/dynamic-tag.ts\nimport {\n getTemplateId as getTemplateId4,\n importDefault as importDefault2,\n importNamed as importNamed3,\n loadFileForTag as loadFileForTag3\n} from \"@marko/babel-utils\";\nvar dynamic_tag_default = {\n analyze: {\n enter(tag) {\n reserveScope(\n 0 /* Visit */,\n getOrCreateSection(tag),\n tag.node,\n \"dynamicTagName\",\n \"#text\"\n );\n custom_tag_default.analyze.enter(tag);\n },\n exit(tag) {\n tag.node.extra.attrsReferences = mergeReferences(\n getOrCreateSection(tag),\n tag.node.attributes.filter((attr2) => attr2.extra?.valueReferences).map((attr2) => [attr2.extra, \"valueReferences\"])\n );\n addBindingToReferences(tag, \"attrsReferences\", tag.node.extra.reserve);\n }\n },\n translate: {\n enter(tag) {\n visit(tag, 37 /* Replace */);\n enterShallow(tag);\n if (isOutputHTML()) {\n flushBefore(tag);\n }\n },\n exit(tag) {\n const { node } = tag;\n let tagExpression = node.name;\n if (t24.isStringLiteral(tagExpression)) {\n const { file } = tag.hub;\n const relativePath = getTagRelativePath(tag);\n tagExpression = importDefault2(file, relativePath, tagExpression.value);\n }\n if (tag.node.extra?.___featureType === \"class\") {\n importDefault2(\n tag.hub.file,\n `marko/src/runtime/helpers/tags-compat-${isOutputHTML() ? \"html\" : \"dom\"}.js`,\n \"marko_tags_compat\"\n );\n if (isOutputHTML()) {\n const serialized5to6 = importNamed3(\n tag.hub.file,\n `marko/src/runtime/helpers/tags-compat-html.js`,\n \"serialized5to6\"\n );\n currentProgramPath.pushContainer(\n \"body\",\n t24.expressionStatement(\n t24.callExpression(serialized5to6, [\n t24.identifier(tagExpression.name),\n t24.stringLiteral(\n getTemplateId4(\n isOptimize(),\n loadFileForTag3(tag).metadata.marko.id\n )\n )\n ])\n )\n );\n } else {\n currentProgramPath.pushContainer(\n \"body\",\n t24.expressionStatement(\n callRuntime(\n \"register\",\n t24.stringLiteral(\n getTemplateId4(\n isOptimize(),\n loadFileForTag3(tag).metadata.marko.id\n )\n ),\n t24.identifier(tagExpression.name)\n )\n )\n );\n }\n }\n if (isOutputHTML()) {\n flushInto(tag);\n writeHTMLResumeStatements(tag.get(\"body\"));\n const attrsObject = attrsToObject(tag, true);\n const emptyAttrs = t24.isObjectExpression(attrsObject) && !attrsObject.properties.length;\n const renderBodyProp = getRenderBodyProp(attrsObject);\n const args = [\n tagExpression,\n emptyAttrs ? t24.nullLiteral() : attrsObject\n ];\n if (renderBodyProp) {\n attrsObject.properties.pop();\n args.push(\n callRuntime(\n \"createRenderer\",\n t24.arrowFunctionExpression(\n renderBodyProp.params.length ? [\n t24.objectPattern([\n t24.objectProperty(\n t24.identifier(\"value\"),\n t24.arrayPattern(renderBodyProp.params)\n )\n ])\n ] : [],\n toFirstExpressionOrBlock(renderBodyProp.body)\n )\n )\n );\n }\n const dynamicScopeIdentifier = currentProgramPath.scope.generateUidIdentifier(\"dynamicScope\");\n const dynamicTagExpr = callRuntime(\"dynamicTag\", ...args);\n if (node.var) {\n translateVar(tag, dynamicTagExpr);\n tag.remove();\n } else {\n tag.replaceWith(\n t24.variableDeclaration(\"const\", [\n t24.variableDeclarator(dynamicScopeIdentifier, dynamicTagExpr)\n ])\n )[0].skip();\n }\n const section = getSection(tag);\n writeTo(tag)`${callRuntime(\n \"markResumeControlEnd\",\n getScopeIdIdentifier(section),\n getScopeAccessorLiteral(node.extra.reserve)\n )}`;\n getSerializedScopeProperties(section).set(\n t24.stringLiteral(\n getScopeAccessorLiteral(node.extra.reserve).value + \"!\"\n ),\n dynamicScopeIdentifier\n );\n getSerializedScopeProperties(section).set(\n t24.stringLiteral(\n getScopeAccessorLiteral(node.extra.reserve).value + \"(\"\n ),\n t24.isIdentifier(tagExpression) ? t24.identifier(tagExpression.name) : tagExpression\n );\n } else {\n const section = getSection(tag);\n const bodySection = getSection(tag.get(\"body\"));\n const hasBody = section !== bodySection;\n const renderBodyIdentifier = hasBody && getRenderer(bodySection);\n const tagNameReserve = node.extra?.reserve;\n const signal = getSignal(section, tagNameReserve);\n signal.build = () => {\n return callRuntime(\n \"conditional\",\n getScopeAccessorLiteral(tagNameReserve),\n getSignalFn(signal, [scopeIdentifier]),\n buildSignalIntersections(signal),\n buildSignalValuesWithIntersections(signal)\n );\n };\n signal.hasDownstreamIntersections = () => true;\n addValue(\n section,\n node.extra?.nameReferences,\n signal,\n renderBodyIdentifier ? t24.logicalExpression(\"||\", tagExpression, renderBodyIdentifier) : tagExpression\n );\n const attrsObject = attrsToObject(tag, true);\n const emptyAttrs = t24.isObjectExpression(attrsObject) && !attrsObject.properties.length;\n if (!emptyAttrs || renderBodyIdentifier) {\n const attrsGetter = t24.arrowFunctionExpression([], attrsObject);\n const id = currentProgramPath.scope.generateUidIdentifier(\n tag.get(\"name\").toString() + \"_input\"\n );\n let added = false;\n addValue(\n section,\n node.extra?.attrsReferences,\n {\n get identifier() {\n if (!added) {\n currentProgramPath.pushContainer(\n \"body\",\n t24.variableDeclaration(\"const\", [\n t24.variableDeclarator(\n id,\n callRuntime(\n \"dynamicTagAttrs\",\n getScopeAccessorLiteral(tagNameReserve),\n renderBodyIdentifier\n )\n )\n ])\n );\n added = true;\n }\n return id;\n },\n hasDownstreamIntersections: () => true\n },\n attrsGetter\n );\n }\n tag.remove();\n }\n }\n }\n};\n\n// src/visitors/tag/attribute-tag.ts\nimport { types as t25 } from \"@marko/compiler\";\nimport { assertNoVar as assertNoVar2, findParentTag } from \"@marko/babel-utils\";\nvar attribute_tag_default = {\n analyze: {\n enter(tag) {\n const body = tag.get(\"body\");\n if (body.get(\"body\").length) {\n startSection(body);\n }\n }\n },\n translate: {\n enter(tag) {\n getSection(tag.get(\"body\"));\n if (hasPendingHTML(tag)) {\n throw tag.get(\"name\").buildCodeFrameError(\n \"Dynamic @tags cannot be mixed with body content.\"\n );\n }\n },\n exit(tag) {\n assertNoVar2(tag);\n flushInto(tag);\n const parentTag = findParentTag(tag);\n if (!parentTag) {\n throw tag.get(\"name\").buildCodeFrameError(\"@tags must be nested within another tag.\");\n }\n const parentExtra = parentTag.node.extra;\n if (parentExtra.tagNameType === 0 /* NativeTag */) {\n throw tag.get(\"name\").buildCodeFrameError(\"@tags cannot be nested under native tags.\");\n }\n const attrName = tag.node.name.value.slice(1);\n const info = parentExtra.nestedAttributeTags[attrName];\n const attrsObject = attrsToObject(tag, true);\n if (info.dynamic) {\n if (!info.identifier) {\n info.identifier = parentTag.scope.generateUidIdentifier(attrName);\n parentTag.insertBefore(\n info.repeated ? t25.variableDeclaration(\"const\", [\n t25.variableDeclarator(info.identifier, t25.arrayExpression([]))\n ]) : t25.variableDeclaration(\"let\", [\n t25.variableDeclarator(info.identifier)\n ])\n );\n parentTag.pushContainer(\n \"attributes\",\n t25.markoAttribute(attrName, info.identifier)\n );\n }\n tag.replaceWith(\n t25.expressionStatement(\n info.repeated ? t25.callExpression(\n t25.memberExpression(info.identifier, t25.identifier(\"push\")),\n [attrsObject]\n ) : t25.assignmentExpression(\"=\", info.identifier, attrsObject)\n )\n );\n } else if (info.repeated) {\n const existingAttr = parentTag.get(\"attributes\").find((attr2) => attr2.node.name === attrName);\n if (existingAttr) {\n existingAttr.get(\"value\").pushContainer(\"elements\", attrsObject);\n } else {\n parentTag.pushContainer(\n \"attributes\",\n t25.markoAttribute(attrName, t25.arrayExpression([attrsObject]))\n );\n }\n tag.remove();\n } else {\n parentTag.pushContainer(\n \"attributes\",\n t25.markoAttribute(attrName, attrsObject)\n );\n tag.remove();\n }\n }\n }\n};\n\n// src/visitors/tag/index.ts\nvar tag_default = {\n analyze: {\n enter(tag) {\n const tagDef = getTagDef3(tag);\n const type = analyzeTagNameType(tag);\n const hook = tagDef?.analyzer?.hook;\n if (hook) {\n enter2(hook, tag);\n return;\n }\n switch (type) {\n case 0 /* NativeTag */:\n native_tag_default.analyze.enter(tag);\n break;\n case 1 /* CustomTag */:\n custom_tag_default.analyze.enter(tag);\n break;\n case 3 /* AttributeTag */:\n attribute_tag_default.analyze.enter(tag);\n break;\n case 2 /* DynamicTag */:\n dynamic_tag_default.analyze.enter(tag);\n break;\n }\n },\n exit(tag) {\n const tagDef = getTagDef3(tag);\n const type = analyzeTagNameType(tag);\n const hook = tagDef?.analyzer?.hook;\n if (hook) {\n exit2(hook, tag);\n return;\n }\n if (type === 0 /* NativeTag */) {\n return;\n }\n analyzeAttributeTags(tag);\n switch (type) {\n case 1 /* CustomTag */:\n custom_tag_default.analyze.exit(tag);\n break;\n case 3 /* AttributeTag */:\n break;\n case 2 /* DynamicTag */:\n dynamic_tag_default.analyze.exit(tag);\n break;\n }\n }\n },\n translate: {\n enter(tag) {\n const tagDef = getTagDef3(tag);\n const extra = tag.node.extra;\n assertNoArgs(tag);\n if (tagDef?.translator) {\n if (tagDef.translator.path) {\n tag.hub.file.metadata.marko.watchFiles.push(tagDef.translator.path);\n }\n enter2(tagDef.translator.hook, tag);\n return;\n }\n for (const attr2 of tag.get(\"attributes\")) {\n if (attr2.isMarkoAttribute()) {\n if (attr2.node.arguments) {\n throw attr2.buildCodeFrameError(\n `Unsupported arguments on the \"${attr2.node.name}\" attribute.`\n );\n }\n if (attr2.node.modifier) {\n if (isNativeTag2(attr2.parentPath)) {\n attr2.node.name += `:${attr2.node.modifier}`;\n } else {\n throw attr2.buildCodeFrameError(\n `Unsupported modifier \"${attr2.node.modifier}\".`\n );\n }\n }\n }\n }\n if (extra.tagNameDynamic && extra.tagNameNullable && !tag.get(\"name\").isIdentifier() && isOutputHTML()) {\n const tagNameId = tag.scope.generateUidIdentifier(\"tagName\");\n const [tagNameVarPath] = tag.insertBefore(\n t26.variableDeclaration(\"const\", [\n t26.variableDeclarator(tagNameId, tag.node.name)\n ])\n );\n tagNameVarPath.skip();\n tag.set(\"name\", tagNameId);\n }\n switch (extra.tagNameType) {\n case 0 /* NativeTag */:\n native_tag_default.translate.enter(tag);\n break;\n case 1 /* CustomTag */:\n custom_tag_default.translate.enter(tag);\n break;\n case 2 /* DynamicTag */:\n dynamic_tag_default.translate.enter(tag);\n break;\n case 3 /* AttributeTag */:\n attribute_tag_default.translate.enter(tag);\n break;\n }\n },\n exit(tag) {\n const translator = getTagDef3(tag)?.translator;\n if (translator) {\n exit2(translator.hook, tag);\n return;\n }\n switch (tag.node.extra.tagNameType) {\n case 0 /* NativeTag */:\n native_tag_default.translate.exit(tag);\n break;\n case 1 /* CustomTag */:\n custom_tag_default.translate.exit(tag);\n break;\n case 2 /* DynamicTag */:\n dynamic_tag_default.translate.exit(tag);\n break;\n case 3 /* AttributeTag */:\n attribute_tag_default.translate.exit(tag);\n break;\n }\n }\n }\n};\n\n// src/visitors/placeholder.ts\nimport { types as t27 } from \"@marko/compiler\";\nimport { isNativeTag as isNativeTag3 } from \"@marko/babel-utils\";\n\n// src/util/is-core-tag.ts\nimport { getTagDef as getTagDef4 } from \"@marko/babel-utils\";\nvar taglibId = \"marko-core\";\nfunction isCoreTag(tag) {\n return tag.isMarkoTag() && getTagDef4(tag)?.taglibId === taglibId;\n}\nfunction isCoreTagName(tag, name) {\n return isCoreTag(tag) && tag.node.name.value === name;\n}\n\n// src/visitors/placeholder.ts\nvar ESCAPE_TYPES = {\n script: \"escapeScript\",\n style: \"escapeStyle\"\n};\nvar placeholder_default = {\n analyze(placeholder) {\n const { node } = placeholder;\n const { confident, computed } = evaluate(placeholder);\n if (!(confident && (node.escape || !computed))) {\n reserveScope(\n 0 /* Visit */,\n getOrCreateSection(placeholder),\n node,\n \"placeholder\",\n \"#text\"\n );\n needsMarker(placeholder);\n }\n },\n translate(placeholder) {\n const isHTML = isOutputHTML();\n const write2 = writeTo(placeholder);\n const extra = placeholder.node.extra;\n const { confident, computed, valueReferences, reserve } = extra;\n const canWriteHTML = isHTML || confident && (placeholder.node.escape || !computed);\n const method = canWriteHTML ? placeholder.node.escape ? ESCAPE_TYPES[getParentTagName(placeholder)] || \"escapeXML\" : \"toString\" : placeholder.node.escape ? \"data\" : \"html\";\n if (confident && canWriteHTML) {\n write2`${getHTMLRuntime()[method](computed)}`;\n } else {\n if (extra.needsMarker) {\n visit(placeholder, 37 /* Replace */);\n } else {\n if (!isHTML)\n write2` `;\n visit(placeholder, 32 /* Get */);\n }\n if (isHTML) {\n write2`${callRuntime(\n method,\n placeholder.node.value\n )}`;\n markNode(placeholder);\n } else {\n addStatement(\n \"render\",\n getSection(placeholder),\n valueReferences,\n t27.expressionStatement(\n method === \"data\" ? callRuntime(\n \"data\",\n t27.memberExpression(\n scopeIdentifier,\n getScopeAccessorLiteral(reserve),\n true\n ),\n placeholder.node.value\n ) : callRuntime(\n \"html\",\n scopeIdentifier,\n placeholder.node.value,\n getScopeAccessorLiteral(reserve)\n )\n )\n );\n }\n }\n enterShallow(placeholder);\n placeholder.remove();\n }\n};\nfunction getParentTagName({ parentPath }) {\n return parentPath.isMarkoTag() && isNativeTag3(parentPath) && parentPath.node.name.value || \"\";\n}\nfunction noOutput(path3) {\n return t27.isMarkoComment(path3) || t27.isMarkoTag(path3) && isCoreTag(path3) && [\"let\", \"const\", \"effect\", \"lifecycle\", \"attrs\", \"get\", \"id\"].includes(\n path3.node.name.value\n );\n}\nfunction needsMarker(placeholder) {\n let prev = placeholder.getPrevSibling();\n while (prev.node && noOutput(prev)) {\n prev = prev.getPrevSibling();\n }\n if ((prev.node || t27.isProgram(placeholder.parentPath)) && !(t27.isMarkoTag(prev) && isNativeTag3(prev))) {\n return placeholder.node.extra.needsMarker = true;\n }\n let next = placeholder.getNextSibling();\n while (next.node && noOutput(next)) {\n next = next.getNextSibling();\n }\n if ((next.node || t27.isProgram(placeholder.parentPath)) && !(t27.isMarkoTag(next) && isNativeTag3(next))) {\n return placeholder.node.extra.needsMarker = true;\n }\n return placeholder.node.extra.needsMarker = false;\n}\n\n// src/visitors/scriptlet.ts\nvar scriptlet_default = {\n translate(scriptlet) {\n if (isOutputHTML()) {\n if (scriptlet.node.static)\n return;\n scriptlet.replaceWithMultiple(scriptlet.node.body);\n } else {\n if (scriptlet.node.static) {\n scriptlet.replaceWithMultiple(scriptlet.node.body);\n } else {\n addStatement(\n \"render\",\n getSection(scriptlet),\n scriptlet.node.extra?.bodyReferences,\n scriptlet.node.body\n );\n scriptlet.remove();\n }\n }\n }\n};\n\n// src/visitors/comment.ts\nvar ieConditionalCommentRegExp = /^\\[if |`;\n }\n }\n comment.remove();\n }\n};\n\n// src/core/import.ts\nimport { parseStatements } from \"@marko/babel-utils\";\nvar import_default = {\n parse(tag) {\n const { node } = tag;\n tag.replaceWith(\n parseStatements(tag.hub.file, node.rawValue, node.start, node.end)[0]\n );\n },\n parseOptions: {\n rootOnly: true,\n rawOpenTag: true,\n openTagOnly: true,\n ignoreAttributes: true,\n relaxRequireCommas: true\n },\n autocomplete: [\n {\n displayText: 'import from \"\"',\n description: \"Use to import external modules, follows the same syntax as JavaScript imports.\",\n snippet: 'import ${2} from \"${1:path}\"',\n descriptionMoreURL: \"https://markojs.com/docs/syntax/#importing-external-files\"\n }\n ]\n};\n\n// src/core/export.ts\nimport { parseStatements as parseStatements2 } from \"@marko/babel-utils\";\nvar export_default = {\n parse(tag) {\n const { node } = tag;\n tag.replaceWith(\n parseStatements2(tag.hub.file, node.rawValue, node.start, node.end)[0]\n );\n },\n parseOptions: {\n rootOnly: true,\n rawOpenTag: true,\n openTagOnly: true,\n ignoreAttributes: true,\n relaxRequireCommas: true\n },\n autocomplete: [\n {\n displayText: \"export \"\n }\n ]\n};\n\n// src/core/attrs.ts\nvar attrs_default = {\n analyze(tag) {\n if (tag.has(\"var\")) {\n const varPath = tag.get(\"var\");\n const bindings = varPath.getBindingIdentifiers();\n trackReferencesForBindings(getOrCreateSection(tag), varPath);\n (currentProgramPath.node.extra ??= {}).attrs = {\n bindings,\n var: varPath.node\n // pathsToId: getPathsToId(varPath.node)\n };\n }\n },\n translate(tag) {\n const bindings = currentProgramPath.node.extra?.attrs?.bindings;\n if (bindings) {\n for (const key in bindings) {\n initValue(bindings[key].extra.reserve);\n }\n }\n tag.remove();\n },\n attributes: {},\n autocomplete: [\n {\n displayText: \"attrs/{ ... }\",\n description: \"Use to receive the attributes passed into this template.\",\n snippet: \"attrs/{ $1 }$2\"\n }\n ]\n};\n\n// src/core/condition/if.ts\nimport { types as t29 } from \"@marko/compiler\";\nimport { assertNoParams as assertNoParams2, assertNoVar as assertNoVar3 } from \"@marko/babel-utils\";\n\n// src/util/to-first-statement-or-block.ts\nimport { types as t28 } from \"@marko/compiler\";\nfunction toFirstStatementOrBlock(body) {\n const nodes = body.body;\n if (nodes.length === 1) {\n return nodes[0];\n }\n if (t28.isBlockStatement(body)) {\n return body;\n }\n return t28.blockStatement(nodes);\n}\n\n// src/core/condition/if.ts\nvar if_default = {\n analyze: {\n enter(tag) {\n reserveScope(\n 0 /* Visit */,\n getOrCreateSection(tag),\n tag.node,\n \"if\",\n \"#text\"\n );\n custom_tag_default.analyze.enter(tag);\n },\n exit(tag) {\n analyzeAttributeTags(tag);\n exitBranchAnalyze(tag);\n }\n },\n translate: {\n enter(tag) {\n const { node } = tag;\n const [testAttr] = node.attributes;\n assertNoVar3(tag);\n assertNoParams2(tag);\n if (!t29.isMarkoAttribute(testAttr) || !testAttr.default) {\n throw tag.get(\"name\").buildCodeFrameError(\n `The '' tag requires a default attribute like ''.`\n );\n }\n if (node.attributes.length > 1) {\n const start = node.attributes[1].loc?.start;\n const end = node.attributes[node.attributes.length - 1].loc?.end;\n const msg = `The '' tag only supports a default attribute.`;\n if (start == null || end == null) {\n throw tag.get(\"name\").buildCodeFrameError(msg);\n } else {\n throw tag.hub.buildError(\n { loc: { start, end } },\n msg,\n Error\n );\n }\n }\n visit(tag, 37 /* Replace */);\n enterShallow(tag);\n if (isOutputHTML()) {\n flushBefore(tag);\n }\n },\n exit(tag) {\n exitBranchTranslate(tag);\n }\n },\n attributes: {},\n autocomplete: [\n {\n snippet: \"if=${1:condition}\",\n description: \"Use to display content only if the condition is met.\",\n descriptionMoreURL: \"https://markojs.com/docs/core-tags/#if-else-if-else\"\n }\n ]\n};\nvar BRANCHES_LOOKUP = /* @__PURE__ */ new WeakMap();\nfunction getBranches(tag, bodySection) {\n const branches = BRANCHES_LOOKUP.get(tag) ?? [];\n const nextTag = tag.getNextSibling();\n const isLast = !(isCoreTagName(nextTag, \"else\") || isCoreTagName(nextTag, \"else-if\"));\n branches.push({\n tag,\n section: bodySection\n });\n if (!isLast) {\n BRANCHES_LOOKUP.set(nextTag, branches);\n }\n return [isLast, branches];\n}\nfunction exitBranchAnalyze(tag) {\n const section = getOrCreateSection(tag);\n const tagBody = tag.get(\"body\");\n const bodySection = getOrCreateSection(tagBody);\n const [isLast, branches] = getBranches(tag, bodySection);\n if (isLast) {\n const rootExtra = branches[0].tag.node.extra;\n const conditionalReferences = mergeReferences(\n section,\n branches.filter(({ tag: tag2 }) => tag2.node.attributes[0]?.extra?.valueReferences).map(({ tag: tag2 }) => [tag2.node.attributes[0].extra, \"valueReferences\"])\n );\n rootExtra.conditionalReferences = conditionalReferences;\n rootExtra.isStateful = !!conditionalReferences;\n rootExtra.singleNodeOptimization = branches.every(({ tag: tag2 }) => {\n return tag2.node.body.body.length === 1;\n });\n }\n}\nfunction exitBranchTranslate(tag) {\n const tagBody = tag.get(\"body\");\n const section = getSection(tag);\n const bodySection = getSection(tagBody);\n const [isLast, branches] = getBranches(tag, bodySection);\n const rootExtra = branches[0].tag.node.extra;\n const isStateful = rootExtra.isStateful;\n const singleNodeOptimization = rootExtra.singleNodeOptimization;\n if (isOutputHTML()) {\n if (isStateful) {\n if (!singleNodeOptimization) {\n writePrependTo(tagBody)`${callRuntime(\n \"markResumeScopeStart\",\n getScopeIdIdentifier(bodySection)\n )}`;\n }\n setRegisterScopeBuilder(tag, (scope) => {\n return t29.assignmentExpression(\n \"=\",\n getScopeIdentifier(bodySection),\n scope\n );\n });\n getSerializedScopeProperties(bodySection).set(\n t29.stringLiteral(\"_\"),\n callRuntime(\"serializedScope\", getScopeIdIdentifier(section))\n );\n }\n flushInto(tag);\n writeHTMLResumeStatements(tagBody);\n }\n if (isLast) {\n const { extra } = branches[0].tag.node;\n if (isOutputDOM()) {\n let expr = t29.nullLiteral();\n for (let i = branches.length; i--; ) {\n const { tag: tag2, section: section2 } = branches[i];\n const [testAttr] = tag2.node.attributes;\n const id = getRenderer(section2);\n setSubscriberBuilder(tag2, (subscriber) => {\n return callRuntime(\n \"inConditionalScope\",\n subscriber,\n getScopeAccessorLiteral(extra.reserve)\n /*writer.getRenderer(section)*/\n );\n });\n if (isStateful) {\n setRegisterRenderer(section2, true);\n }\n tag2.remove();\n if (testAttr) {\n expr = t29.conditionalExpression(testAttr.value, id, expr);\n } else {\n expr = id;\n }\n }\n const signal = getSignal(section, extra.reserve);\n signal.build = () => {\n return callRuntime(\n \"conditional\",\n getScopeAccessorLiteral(extra.reserve),\n getSignalFn(signal, [scopeIdentifier])\n );\n };\n signal.hasDownstreamIntersections = () => branches.some((b) => getClosures(b.section).length > 0);\n addValue(\n section,\n extra.conditionalReferences,\n signal,\n expr\n );\n } else {\n const write2 = writeTo(tag);\n const nextTag = tag.getNextSibling();\n const ifScopeIdIdentifier = tag.scope.generateUidIdentifier(\"ifScopeId\");\n const ifScopeIdentifier = getScopeIdentifier(branches[0].section);\n const ifRendererIdentifier = tag.scope.generateUidIdentifier(\"ifRenderer\");\n let statement;\n for (let i = branches.length; i--; ) {\n const { tag: tag2, section: section2 } = branches[i];\n const branchScopeIdentifier = getScopeIdentifier(section2, true);\n branchScopeIdentifier.name = ifScopeIdentifier.name;\n if (isStateful) {\n tag2.node.body.body.push(\n t29.expressionStatement(\n callRuntime(\n \"register\",\n t29.assignmentExpression(\n \"=\",\n ifRendererIdentifier,\n callRuntime(\n \"createRenderer\",\n t29.arrowFunctionExpression([], t29.blockStatement([]))\n )\n ),\n t29.stringLiteral(getResumeRegisterId(section2, \"renderer\"))\n )\n )\n );\n if (singleNodeOptimization) {\n tag2.node.body.body.push(\n t29.expressionStatement(\n t29.assignmentExpression(\n \"=\",\n ifScopeIdIdentifier,\n getScopeIdIdentifier(section2)\n )\n )\n );\n }\n }\n const [testAttr] = tag2.node.attributes;\n const curStatement = toFirstStatementOrBlock(tag2.node.body);\n if (testAttr) {\n statement = t29.ifStatement(testAttr.value, curStatement, statement);\n } else {\n statement = curStatement;\n }\n tag2.remove();\n }\n if (!isStateful) {\n nextTag.insertBefore(statement);\n } else {\n nextTag.insertBefore([\n t29.variableDeclaration(\n \"let\",\n [\n singleNodeOptimization && t29.variableDeclarator(ifScopeIdIdentifier),\n t29.variableDeclarator(ifScopeIdentifier),\n t29.variableDeclarator(ifRendererIdentifier)\n ].filter(Boolean)\n ),\n statement\n ]);\n if (singleNodeOptimization) {\n write2`${callRuntime(\n \"markResumeControlSingleNodeEnd\",\n getScopeIdIdentifier(section),\n getScopeAccessorLiteral(extra.reserve),\n ifScopeIdIdentifier\n )}`;\n } else {\n write2`${callRuntime(\n \"markResumeControlEnd\",\n getScopeIdIdentifier(section),\n getScopeAccessorLiteral(extra.reserve)\n )}`;\n }\n getSerializedScopeProperties(section).set(\n t29.stringLiteral(getScopeAccessorLiteral(extra.reserve).value + \"!\"),\n ifScopeIdentifier\n );\n getSerializedScopeProperties(section).set(\n t29.stringLiteral(getScopeAccessorLiteral(extra.reserve).value + \"(\"),\n ifRendererIdentifier\n );\n }\n }\n }\n}\n\n// src/core/condition/else-if.ts\nimport { types as t30 } from \"@marko/compiler\";\nimport { assertNoParams as assertNoParams3, assertNoVar as assertNoVar4 } from \"@marko/babel-utils\";\nvar else_if_default = {\n analyze: {\n enter(tag) {\n custom_tag_default.analyze.enter(tag);\n },\n exit(tag) {\n exitBranchAnalyze(tag);\n }\n },\n translate: {\n enter(tag) {\n const { node } = tag;\n const [defaultAttr] = node.attributes;\n assertNoVar4(tag);\n assertNoParams3(tag);\n if (!t30.isMarkoAttribute(defaultAttr) || !defaultAttr.default) {\n throw tag.get(\"name\").buildCodeFrameError(\n `The '' tag requires a default attribute like ''.`\n );\n }\n if (node.attributes.length > 1) {\n const start = node.attributes[1].loc?.start;\n const end = node.attributes[node.attributes.length - 1].loc?.end;\n const msg = `The '' tag only supports a default attribute.`;\n if (start == null || end == null) {\n throw tag.get(\"name\").buildCodeFrameError(msg);\n } else {\n throw tag.hub.buildError(\n { loc: { start, end } },\n msg,\n Error\n );\n }\n }\n },\n exit(tag) {\n exitBranchTranslate(tag);\n }\n },\n attributes: {},\n autocomplete: [\n {\n snippet: \"else-if=${1:condition}\",\n description: \"Use after an or tag to display content if those conditions do not match and this one does.\",\n descriptionMoreURL: \"https://markojs.com/docs/core-tags/#if-else-if-else\"\n }\n ]\n};\n\n// src/core/condition/else.ts\nimport { assertNoParams as assertNoParams4, assertNoVar as assertNoVar5 } from \"@marko/babel-utils\";\nvar else_default = {\n analyze: {\n enter(tag) {\n custom_tag_default.analyze.enter(tag);\n },\n exit(tag) {\n exitBranchAnalyze(tag);\n }\n },\n translate: {\n enter(tag) {\n const { node } = tag;\n const [testAttr] = node.attributes;\n assertNoVar5(tag);\n assertNoParams4(tag);\n if (node.attributes.length > 1 || testAttr && testAttr.name !== \"if\") {\n const start = node.attributes[1].loc?.start;\n const end = node.attributes[node.attributes.length - 1].loc?.end;\n const msg = `The '' tag only supports an if attribute.`;\n if (start == null || end == null) {\n throw tag.get(\"name\").buildCodeFrameError(msg);\n } else {\n throw tag.hub.buildError(\n { loc: { start, end } },\n msg,\n Error\n );\n }\n }\n },\n exit(tag) {\n exitBranchTranslate(tag);\n }\n },\n attributes: {},\n autocomplete: [\n {\n description: \"Use after an or tag to display content if those conditions do not match.\",\n descriptionMoreURL: \"https://markojs.com/docs/core-tags/#if-else-if-else\"\n }\n ]\n};\n\n// src/core/const.ts\nimport { types as t31 } from \"@marko/compiler\";\nimport { assertNoParams as assertNoParams5 } from \"@marko/babel-utils\";\nvar const_default = {\n translate(tag) {\n const { node } = tag;\n const [defaultAttr] = node.attributes;\n assertNoParams5(tag);\n assertNoBodyContent(tag);\n if (!node.var) {\n throw tag.get(\"name\").buildCodeFrameError(\"The 'const' tag requires a tag variable.\");\n }\n if (!defaultAttr) {\n throw tag.get(\"name\").buildCodeFrameError(\"The 'const' tag requires a default attribute.\");\n }\n if (node.attributes.length > 1 || !t31.isMarkoAttribute(defaultAttr) || !defaultAttr.default && defaultAttr.name !== \"value\") {\n throw tag.get(\"name\").buildCodeFrameError(\n \"The 'const' tag only supports the 'default' attribute.\"\n );\n }\n if (isOutputDOM()) {\n const section = getSection(tag);\n const references = defaultAttr.extra?.valueReferences;\n const derivation = getTagVarSignal(tag.get(\"var\"));\n addValue(section, references, derivation, defaultAttr.value);\n } else {\n translateVar(tag, defaultAttr.value);\n }\n tag.remove();\n },\n attributes: {},\n autocomplete: [\n {\n description: \"Use to create an constant binding.\",\n descriptionMoreURL: \"https://markojs.com/docs/core-tags/#const\"\n }\n ]\n};\n\n// src/core/effect.ts\nimport { types as t32 } from \"@marko/compiler\";\nimport { assertNoParams as assertNoParams6 } from \"@marko/babel-utils\";\nvar effect_default = {\n analyze(tag) {\n reserveScope(\n 1 /* Store */,\n getOrCreateSection(tag),\n tag.node,\n \"cleanup\"\n );\n (currentProgramPath.node.extra ?? {}).isInteractive = true;\n },\n translate: {\n exit(tag) {\n const { node } = tag;\n const [defaultAttr] = node.attributes;\n assertNoParams6(tag);\n assertNoBodyContent(tag);\n if (!defaultAttr) {\n throw tag.get(\"name\").buildCodeFrameError(\n \"The 'effect' tag requires a default attribute.\"\n );\n }\n if (node.attributes.length > 1 || !t32.isMarkoAttribute(defaultAttr) || !defaultAttr.default && defaultAttr.name !== \"value\") {\n throw tag.get(\"name\").buildCodeFrameError(\n \"The 'effect' tag only supports the 'default' attribute.\"\n );\n }\n const section = getSection(tag);\n if (isOutputDOM()) {\n const { value } = defaultAttr;\n let inlineStatements = null;\n if (t32.isFunctionExpression(value) || t32.isArrowFunctionExpression(value) && t32.isBlockStatement(value.body)) {\n inlineStatements = value.body.body;\n t32.traverse(value.body, (node2) => {\n if (t32.isReturnStatement(node2)) {\n inlineStatements = null;\n }\n });\n }\n addStatement(\n \"effect\",\n section,\n defaultAttr.extra?.valueReferences,\n inlineStatements || t32.expressionStatement(\n callRuntime(\n \"userEffect\",\n scopeIdentifier,\n getScopeAccessorLiteral(tag.node.extra.reserve),\n defaultAttr.value\n )\n ),\n value,\n !!inlineStatements\n );\n } else {\n addHTMLEffectCall(section, defaultAttr.extra?.valueReferences);\n }\n tag.remove();\n }\n },\n attributes: {},\n autocomplete: [\n {\n description: \"Use to create a side effects.\",\n descriptionMoreURL: \"https://markojs.com/docs/core-tags/#effect\"\n }\n ]\n};\n\n// src/core/lifecycle.ts\nimport { types as t33 } from \"@marko/compiler\";\nimport { assertNoParams as assertNoParams7 } from \"@marko/babel-utils\";\nvar lifecycle_default = {\n analyze: {\n enter(tag) {\n custom_tag_default.analyze.enter(tag);\n reserveScope(\n 1 /* Store */,\n getOrCreateSection(tag),\n tag.node,\n \"cleanup\"\n );\n (currentProgramPath.node.extra ?? {}).isInteractive = true;\n },\n exit(tag) {\n custom_tag_default.analyze.exit(tag);\n const section = getOrCreateSection(tag);\n tag.node.extra.attrsReferences = mergeReferences(\n section,\n tag.node.attributes.filter((attr2) => attr2.extra?.valueReferences).map((attr2) => [attr2.extra, \"valueReferences\"])\n );\n }\n },\n translate: {\n exit(tag) {\n const { node } = tag;\n assertNoParams7(tag);\n assertNoBodyContent(tag);\n const section = getSection(tag);\n if (isOutputDOM()) {\n const attrsObject = attrsToObject(tag);\n addStatement(\n \"effect\",\n section,\n node.extra.attrsReferences,\n t33.expressionStatement(\n callRuntime(\n \"lifecycle\",\n scopeIdentifier,\n getScopeAccessorLiteral(tag.node.extra.reserve),\n attrsObject\n )\n ),\n node.attributes.map((a) => a.value)\n );\n } else {\n addHTMLEffectCall(section, node.extra.attrsReferences);\n }\n tag.remove();\n }\n },\n attributes: {},\n autocomplete: [\n {\n description: \"Use to create a side effects.\",\n descriptionMoreURL: \"https://markojs.com/docs/core-tags/#effect\"\n }\n ]\n};\n\n// src/core/id.ts\nimport { types as t34 } from \"@marko/compiler\";\nimport {\n assertNoArgs as assertNoArgs2,\n assertNoAttributes,\n assertNoParams as assertNoParams8\n} from \"@marko/babel-utils\";\nvar id_default = {\n translate(tag) {\n const { node } = tag;\n const { var: tagVar } = node;\n const id = callRuntime(\"nextTagId\");\n assertNoArgs2(tag);\n assertNoAttributes(tag);\n assertNoBodyContent(tag);\n assertNoParams8(tag);\n if (!node.var) {\n throw tag.get(\"name\").buildCodeFrameError(\"The 'id' tag requires a tag variable.\");\n }\n if (!t34.isIdentifier(tagVar)) {\n throw tag.get(\"var\").buildCodeFrameError(\"The 'id' tag cannot be destructured\");\n }\n if (isOutputHTML()) {\n tag.replaceWith(\n t34.variableDeclaration(\"const\", [t34.variableDeclarator(node.var, id)])\n );\n } else {\n const source = initValue(tagVar.extra.reserve);\n addValue(getSection(tag), void 0, source, id);\n tag.remove();\n }\n },\n attributes: {},\n autocomplete: [\n {\n displayText: \"id/\",\n description: \"Use to create a unique identifier.\",\n snippet: \"id/${1:name}\",\n descriptionMoreURL: \"https://markojs.com/docs/core-tags/#id\"\n }\n ]\n};\n\n// src/core/for.ts\nimport { types as t35 } from \"@marko/compiler\";\nimport {\n assertAllowedAttributes,\n assertNoVar as assertNoVar6,\n getTagDef as getTagDef5\n} from \"@marko/babel-utils\";\nvar for_default = {\n analyze: {\n enter(tag) {\n const isOnlyChild = checkOnlyChild(tag);\n const parentTag = isOnlyChild ? tag.parentPath.parent : void 0;\n const parentTagName = parentTag?.name?.value;\n reserveScope(\n 0 /* Visit */,\n getOrCreateSection(tag),\n isOnlyChild ? parentTag : tag.node,\n \"for\",\n isOnlyChild ? `#${parentTagName}` : \"#text\"\n );\n custom_tag_default.analyze.enter(tag);\n },\n exit(tag) {\n analyzeAttributeTags(tag);\n const section = getOrCreateSection(tag);\n tag.node.extra.attrsReferences = mergeReferences(\n section,\n tag.node.attributes.filter(\n (attr2) => t35.isMarkoAttribute(attr2) && attr2.extra?.valueReferences !== void 0\n ).map((attr2) => [attr2.extra, \"valueReferences\"])\n );\n tag.node.extra.isStateful = !!tag.node.extra.attrsReferences && !Object.keys(tag.node.extra.nestedAttributeTags).length;\n tag.node.extra.singleNodeOptimization = tag.node.body.body.length === 1;\n }\n },\n translate: {\n enter(tag) {\n validateFor(tag);\n const {\n extra: { isOnlyChild }\n } = tag.node;\n if (!isOnlyChild) {\n visit(tag, 37 /* Replace */);\n enterShallow(tag);\n }\n if (isOutputHTML()) {\n flushBefore(tag);\n }\n },\n exit(tag) {\n if (isOutputHTML()) {\n translateHTML2.exit(tag);\n } else {\n translateDOM2.exit(tag);\n }\n }\n },\n attributes: {\n of: {\n type: \"expression\",\n autocomplete: [\n {\n description: \"Iterates over a list of items.\"\n }\n ]\n },\n in: {\n type: \"expression\",\n autocomplete: [\n {\n description: \"Iterates over the keys and values of an object.\"\n }\n ]\n },\n to: {\n type: \"number\",\n autocomplete: [\n {\n description: \"Iterates up to the provided number (inclusive)\"\n }\n ]\n },\n from: {\n type: \"number\",\n autocomplete: [\n {\n description: \"Iterates starting from the provided number (inclusive)\"\n }\n ]\n },\n step: {\n type: \"number\",\n autocomplete: [\n {\n description: \"The amount to increment during each interation (with from/to)\"\n }\n ]\n }\n },\n autocomplete: [\n {\n snippet: \"for|${1:value, index}| of=${3:array}\",\n description: \"Use to iterate over lists, object properties, or between ranges.\",\n descriptionMoreURL: \"https://markojs.com/docs/core-tags/#iterating-over-a-list\"\n },\n {\n snippet: \"for|${1:name, value}| in=${3:object}\",\n descriptionMoreURL: \"https://markojs.com/docs/core-tags/#iterating-over-an-objects-properties\"\n },\n {\n snippet: \"for|${1:index}| from=${2:number} to=${3:number} step=${4:number}\",\n descriptionMoreURL: \"https://markojs.com/docs/core-tags/#iterating-between-a-range-of-numbers\"\n }\n ]\n};\nvar translateDOM2 = {\n exit(tag) {\n const tagBody = tag.get(\"body\");\n const tagSection = getSection(tag);\n const bodySection = getSection(tagBody);\n const { node } = tag;\n const {\n attributes,\n extra: { isOnlyChild, attrsReferences }\n } = node;\n const {\n extra: { reserve }\n } = isOnlyChild ? tag.parentPath.parent : tag.node;\n const paramIdentifiers = Object.values(\n tagBody.getBindingIdentifiers()\n );\n setSubscriberBuilder(tag, (signal2) => {\n return callRuntime(\n \"inLoopScope\",\n signal2,\n getScopeAccessorLiteral(reserve)\n );\n });\n tag.remove();\n const rendererId = getRenderer(bodySection);\n const ofAttr = findName(attributes, \"of\");\n const toAttr = findName(attributes, \"to\");\n const inAttr = findName(attributes, \"in\");\n const loopArgs = [];\n let loopKind;\n if (ofAttr) {\n loopKind = \"loopOf\";\n loopArgs.push(ofAttr.value);\n } else if (inAttr) {\n loopKind = \"loopIn\";\n loopArgs.push(inAttr.value);\n } else if (toAttr) {\n const fromAttr = findName(attributes, \"from\");\n const stepAttr = findName(attributes, \"step\");\n loopKind = \"loopTo\";\n loopArgs.push(\n toAttr.value,\n fromAttr ? fromAttr.value : t35.numericLiteral(0),\n stepAttr ? stepAttr.value : t35.numericLiteral(1)\n );\n } else {\n throw tag.get(\"name\").buildCodeFrameError(\n \"Invalid tag. Expected either an 'of', 'to', or 'in' attribute.\"\n );\n }\n const byAttr = findName(attributes, \"by\");\n if (byAttr) {\n loopArgs.push(byAttr.value);\n }\n const signal = getSignal(tagSection, reserve);\n signal.build = () => {\n return callRuntime(\n loopKind,\n getScopeAccessorLiteral(reserve),\n rendererId\n );\n };\n signal.hasDownstreamIntersections = () => {\n for (const identifier of paramIdentifiers) {\n if (getSignal(\n bodySection,\n identifier.extra.reserve\n ).hasDownstreamIntersections()) {\n return true;\n }\n }\n return getClosures(bodySection).length > 0;\n };\n addValue(tagSection, attrsReferences, signal, t35.arrayExpression(loopArgs));\n }\n};\nvar translateHTML2 = {\n exit(tag) {\n const tagBody = tag.get(\"body\");\n const tagSection = getSection(tag);\n const bodySection = getSection(tagBody);\n const { node } = tag;\n const {\n attributes,\n body: { body, params },\n extra: { isStateful, singleNodeOptimization, isOnlyChild }\n } = node;\n const {\n extra: { reserve }\n } = isOnlyChild ? tag.parentPath.parent : node;\n const namePath = tag.get(\"name\");\n const ofAttr = findName(attributes, \"of\");\n const inAttr = findName(attributes, \"in\");\n const toAttr = findName(attributes, \"to\");\n const byAttr = findName(attributes, \"by\");\n const block = t35.blockStatement(body);\n const write2 = writeTo(tag);\n const replacement = [];\n let byParams;\n let keyExpression = t35.identifier(\"NOO\");\n if (isStateful) {\n if (!singleNodeOptimization) {\n writePrependTo(tagBody)`${callRuntime(\n \"markResumeScopeStart\",\n getScopeIdIdentifier(bodySection)\n )}`;\n }\n setRegisterScopeBuilder(tag, (scope) => {\n const tempScopeIdentifier = currentProgramPath.scope.generateUidIdentifier(\"s\");\n return t35.callExpression(\n t35.arrowFunctionExpression(\n [tempScopeIdentifier],\n t35.sequenceExpression([\n t35.callExpression(\n t35.memberExpression(\n getScopeIdentifier(bodySection),\n t35.identifier(\"set\")\n ),\n [keyExpression, tempScopeIdentifier]\n ),\n tempScopeIdentifier\n ])\n ),\n [scope]\n );\n });\n getSerializedScopeProperties(bodySection).set(\n t35.stringLiteral(\"_\"),\n callRuntime(\"serializedScope\", getScopeIdIdentifier(tagSection))\n );\n }\n if (byAttr && isStateful) {\n const byIdentifier = currentProgramPath.scope.generateUidIdentifier(\"by\");\n replacement.push(\n t35.variableDeclaration(\"const\", [\n t35.variableDeclarator(byIdentifier, byAttr.value)\n ])\n );\n byParams = [];\n keyExpression = t35.callExpression(byIdentifier, byParams);\n }\n if (inAttr) {\n const [keyParam, valParam] = params;\n keyExpression = keyParam;\n if (valParam) {\n block.body.unshift(\n t35.variableDeclaration(\"const\", [\n t35.variableDeclarator(\n valParam,\n t35.memberExpression(inAttr.value, keyParam, true)\n )\n ])\n );\n }\n replacement.push(\n t35.forInStatement(\n t35.variableDeclaration(\"const\", [t35.variableDeclarator(keyParam)]),\n inAttr.value,\n block\n )\n );\n } else if (ofAttr) {\n let ofAttrValue = ofAttr.value;\n let [valParam, indexParam, loopParam] = params;\n if (!valParam) {\n throw namePath.buildCodeFrameError(\n \"Invalid 'for of' tag, missing |value, index| params.\"\n );\n }\n if (!t35.isIdentifier(valParam) && byParams) {\n const tempValParam = currentProgramPath.scope.generateUidIdentifier(\"v\");\n block.body.unshift(\n t35.variableDeclaration(\"const\", [\n t35.variableDeclarator(valParam, tempValParam)\n ])\n );\n valParam = tempValParam;\n }\n if (indexParam || isStateful) {\n indexParam ??= currentProgramPath.scope.generateUidIdentifier(\"i\");\n const indexName = tag.scope.generateUidIdentifierBasedOnNode(\n indexParam,\n \"i\"\n );\n replacement.push(\n t35.variableDeclaration(\"let\", [\n t35.variableDeclarator(indexName, t35.numericLiteral(0))\n ])\n );\n block.body.unshift(\n t35.variableDeclaration(\"let\", [\n t35.variableDeclarator(\n indexParam,\n t35.updateExpression(\"++\", indexName)\n )\n ])\n );\n }\n if (loopParam) {\n if (t35.isIdentifier(loopParam)) {\n ofAttrValue = loopParam;\n }\n replacement.push(\n t35.variableDeclaration(\"const\", [\n t35.variableDeclarator(loopParam, ofAttr.value)\n ])\n );\n }\n if (byParams) {\n byParams.push(valParam, indexParam);\n } else {\n keyExpression = indexParam;\n }\n replacement.push(\n t35.forOfStatement(\n t35.variableDeclaration(\"const\", [t35.variableDeclarator(valParam)]),\n ofAttrValue,\n block\n )\n );\n } else if (toAttr) {\n const stepValue = findName(attributes, \"step\")?.value ?? t35.numericLiteral(1);\n const fromValue = findName(attributes, \"from\")?.value ?? t35.numericLiteral(0);\n let [indexParam] = params;\n const stepsName = tag.scope.generateUidIdentifier(\"steps\");\n const indexName = tag.scope.generateUidIdentifier(\"i\");\n const stepName = tag.scope.generateUidIdentifier(\"step\");\n const fromName = tag.scope.generateUidIdentifier(\"from\");\n if (indexParam || isStateful) {\n indexParam ??= currentProgramPath.scope.generateUidIdentifier(\"i\");\n keyExpression = indexParam;\n block.body.unshift(\n t35.variableDeclaration(\"const\", [\n t35.variableDeclarator(\n indexParam,\n t35.binaryExpression(\n \"+\",\n fromName,\n t35.binaryExpression(\"*\", indexName, stepName)\n )\n )\n ])\n );\n }\n replacement.push(\n t35.forStatement(\n t35.variableDeclaration(\"let\", [\n t35.variableDeclarator(\n fromName,\n t35.logicalExpression(\"??\", fromValue, t35.numericLiteral(0))\n ),\n t35.variableDeclarator(\n stepName,\n t35.logicalExpression(\"??\", stepValue, t35.numericLiteral(1))\n ),\n t35.variableDeclarator(\n stepsName,\n t35.binaryExpression(\n \"/\",\n t35.binaryExpression(\"-\", toAttr.value, fromName),\n stepName\n )\n ),\n t35.variableDeclarator(indexName, t35.numericLiteral(0))\n ]),\n t35.binaryExpression(\"<=\", indexName, stepsName),\n t35.updateExpression(\"++\", indexName),\n block\n )\n );\n }\n if (isStateful) {\n const forScopeIdsIdentifier = tag.scope.generateUidIdentifier(\"forScopeIds\");\n const forScopesIdentifier = getScopeIdentifier(bodySection);\n replacement.unshift(\n t35.variableDeclaration(\n \"const\",\n [\n singleNodeOptimization && t35.variableDeclarator(\n forScopeIdsIdentifier,\n t35.arrayExpression([])\n ),\n t35.variableDeclarator(\n forScopesIdentifier,\n t35.newExpression(t35.identifier(\"Map\"), [])\n )\n ].filter(Boolean)\n )\n );\n if (singleNodeOptimization) {\n block.body.push(\n t35.expressionStatement(\n t35.callExpression(\n t35.memberExpression(forScopeIdsIdentifier, t35.identifier(\"push\")),\n [getScopeIdIdentifier(bodySection)]\n )\n )\n );\n write2`${callRuntime(\n \"markResumeControlSingleNodeEnd\",\n getScopeIdIdentifier(tagSection),\n getScopeAccessorLiteral(reserve),\n forScopeIdsIdentifier\n )}`;\n } else {\n write2`${callRuntime(\n \"markResumeControlEnd\",\n getScopeIdIdentifier(tagSection),\n getScopeAccessorLiteral(reserve)\n )}`;\n }\n getSerializedScopeProperties(tagSection).set(\n t35.stringLiteral(getScopeAccessorLiteral(reserve).value + \"(\"),\n t35.conditionalExpression(\n t35.memberExpression(forScopesIdentifier, t35.identifier(\"size\")),\n forScopesIdentifier,\n t35.identifier(\"undefined\")\n )\n );\n }\n flushInto(tag);\n writeHTMLResumeStatements(tagBody);\n block.body.push(t35.expressionStatement(callRuntime(\"maybeFlush\")));\n tag.replaceWithMultiple(replacement);\n }\n};\nfunction findName(arr, value) {\n return arr.find((obj) => t35.isMarkoAttribute(obj) && obj.name === value);\n}\nfunction validateFor(tag) {\n const attrs2 = tag.node.attributes;\n const hasParams = tag.node.body.params.length > 0;\n assertNoVar6(tag);\n if (findName(attrs2, \"of\")) {\n assertAllowedAttributes(tag, [\"of\", \"by\"]);\n if (!hasParams) {\n throw tag.buildCodeFrameError(\n `Invalid 'for of' tag, missing |value, index| params.`\n );\n }\n } else if (findName(attrs2, \"in\")) {\n assertAllowedAttributes(tag, [\"in\", \"by\"]);\n if (!hasParams) {\n throw tag.buildCodeFrameError(\n `Invalid 'for in' tag, missing |key, value| params.`\n );\n }\n } else if (findName(attrs2, \"to\")) {\n assertAllowedAttributes(tag, [\"from\", \"to\", \"step\", \"by\"]);\n } else {\n throw tag.buildCodeFrameError(\n \"Invalid 'for' tag, missing an 'of', 'in' or 'to' attribute.\"\n );\n }\n}\nfunction checkOnlyChild(tag) {\n tag.node.extra ??= {};\n if (t35.isMarkoTag(tag.parentPath?.parent) && getTagDef5(tag.parentPath.parentPath)?.html) {\n return tag.node.extra.isOnlyChild = tag.parent.body.length === 1;\n }\n return tag.node.extra.isOnlyChild = false;\n}\n\n// src/core/get.ts\nimport path from \"path\";\nimport { types as t36 } from \"@marko/compiler\";\nimport {\n assertNoParams as assertNoParams9,\n getTemplateId as getTemplateId5,\n resolveTagImport as resolveTagImport2\n} from \"@marko/babel-utils\";\nvar get_default = {\n analyze: {\n enter(tag) {\n const section = getOrCreateSection(tag);\n if (section.id === 0) {\n (currentProgramPath.node.extra ??= {}).closures = true;\n }\n custom_tag_default.analyze.enter(tag);\n },\n exit: custom_tag_default.analyze.exit\n },\n translate(tag) {\n assertNoParams9(tag);\n assertNoBodyContent(tag);\n if (isOutputHTML()) {\n flushBefore(tag);\n }\n const {\n node,\n hub: { file }\n } = tag;\n const [defaultAttr] = node.attributes;\n let refId;\n if (!node.var) {\n throw tag.get(\"name\").buildCodeFrameError(\n \" requires a variable to be defined, eg .\"\n );\n }\n if (defaultAttr === void 0) {\n refId = \"$\";\n } else {\n if (!t36.isMarkoAttribute(defaultAttr) || !defaultAttr.default || !t36.isStringLiteral(defaultAttr.value)) {\n throw tag.get(\"name\").buildCodeFrameError(\n `The '' tag requires default attribute that is a string that resolves to a Marko file like '' or '\">'.`\n );\n }\n if (node.attributes.length > 1) {\n const start = node.attributes[1].loc?.start;\n const end = node.attributes[node.attributes.length - 1].loc?.end;\n const msg = `The '' tag only supports a default attribute.`;\n if (start == null || end == null) {\n throw tag.get(\"name\").buildCodeFrameError(msg);\n } else {\n throw tag.hub.buildError(\n { loc: { start, end } },\n msg,\n Error\n );\n }\n }\n const defaultAttrValue = tag.get(\"attributes\")[0].get(\"value\");\n if (defaultAttr.value.value === \".\") {\n refId = file.metadata.marko.id;\n } else {\n const relativeReferencePath = resolveTagImport2(\n defaultAttrValue,\n defaultAttrValue.node.value\n );\n if (!relativeReferencePath) {\n throw defaultAttrValue.buildCodeFrameError(\n \"Unable to resolve template provided to '' tag.\"\n );\n }\n refId = getTemplateId5(\n file.markoOpts.optimize,\n path.resolve(\n file.opts.filename,\n \"..\",\n relativeReferencePath\n )\n );\n }\n }\n if (isOutputHTML()) {\n tag.replaceWith(\n t36.variableDeclaration(\"const\", [\n t36.variableDeclarator(\n node.var,\n callRuntime(\"getInContext\", t36.stringLiteral(refId))\n )\n ])\n );\n } else {\n const identifiers = Object.values(\n tag.get(\"var\").getBindingIdentifiers()\n );\n initContextConsumer(refId, identifiers[0].extra.reserve);\n tag.remove();\n }\n },\n autocomplete: [\n {\n displayText: 'get/=\"\"',\n description: \"Gets a value provided from another template.\",\n snippet: 'get/${1:name}=\"${2:from}\"',\n descriptionMoreURL: \"https://markojs.com/docs/core-tags/#get\"\n }\n ]\n};\n\n// src/core/html-comment.ts\nimport {\n assertNoAttributeTags,\n assertNoAttributes as assertNoAttributes2,\n assertNoParams as assertNoParams10,\n assertNoVar as assertNoVar7\n} from \"@marko/babel-utils\";\nvar html_comment_default = {\n analyze() {\n },\n translate: {\n enter(tag) {\n enter(tag);\n writeTo(tag)``;\n tag.remove();\n }\n },\n parseOptions: {\n // TODO: fix the types for Tag or parseOptions or something\n text: true\n },\n attributes: {},\n autocomplete: [\n {\n description: \"Use to create an html comment that is not stripped from the output.\",\n descriptionMoreURL: \"https://markojs.com/docs/core-tags/#html-comment\"\n }\n ]\n};\n\n// src/core/let.ts\nimport { types as t37 } from \"@marko/compiler\";\nimport { assertNoParams as assertNoParams11 } from \"@marko/babel-utils\";\nvar let_default = {\n translate(tag) {\n const { node } = tag;\n const tagVar = node.var;\n const defaultAttr = node.attributes.find(\n (attr2) => t37.isMarkoAttribute(attr2) && (attr2.default || attr2.name === \"value\")\n ) ?? t37.markoAttribute(\"value\", t37.identifier(\"undefined\"));\n assertNoParams11(tag);\n assertNoBodyContent(tag);\n if (!tagVar) {\n throw tag.get(\"name\").buildCodeFrameError(\"The 'let' tag requires a tag variable.\");\n }\n if (!t37.isIdentifier(tagVar)) {\n throw tag.get(\"var\").buildCodeFrameError(\"The 'let' cannot be destructured.\");\n }\n if (isOutputDOM()) {\n const section = getSection(tag);\n const binding = tagVar.extra.reserve;\n const source = initValue(binding);\n const references = defaultAttr.extra?.valueReferences;\n const isSetup = !references;\n if (!isSetup) {\n let initValueId;\n addValue(\n section,\n references,\n {\n get identifier() {\n if (!initValueId) {\n initValueId = tag.scope.generateUidIdentifier(\n source.identifier.name + \"_init\"\n );\n currentProgramPath.pushContainer(\n \"body\",\n t37.variableDeclaration(\"const\", [\n t37.variableDeclarator(\n initValueId,\n callRuntime(\n \"initValue\",\n getScopeAccessorLiteral(binding),\n source.identifier\n )\n )\n ])\n );\n }\n return initValueId;\n },\n hasDownstreamIntersections() {\n return source.hasDownstreamIntersections();\n }\n },\n defaultAttr.value\n );\n } else {\n addValue(section, references, source, defaultAttr.value);\n }\n registerAssignmentReplacer(\n tag.scope.getBinding(binding.name),\n (assignment, value) => queueSource(source, value, getSection(assignment))\n );\n } else {\n translateVar(tag, defaultAttr.value);\n }\n tag.remove();\n },\n attributes: {},\n autocomplete: [\n {\n description: \"Use to create a mutable binding.\",\n descriptionMoreURL: \"https://markojs.com/docs/core-tags/#let\"\n }\n ]\n};\n\n// src/core/put.ts\nimport { types as t38 } from \"@marko/compiler\";\nimport { assertNoParams as assertNoParams12, assertNoVar as assertNoVar8 } from \"@marko/babel-utils\";\nvar put_default = {\n analyze: {\n enter(tag) {\n reserveScope(\n 0 /* Visit */,\n getOrCreateSection(tag),\n tag.node,\n \"put\",\n \"#text\"\n );\n custom_tag_default.analyze.enter(tag);\n },\n exit(tag) {\n custom_tag_default.analyze.exit(tag);\n }\n },\n translate: {\n enter(tag) {\n const { node } = tag;\n const [defaultAttr] = node.attributes;\n if (!node.body.body.length) {\n throw tag.buildCodeFrameError(\n `The '' tag requires body content that the context is forwarded through.`\n );\n }\n if (!t38.isMarkoAttribute(defaultAttr) || !defaultAttr.default) {\n throw tag.get(\"name\").buildCodeFrameError(\n `The '' tag requires default attribute like ''.`\n );\n }\n if (node.attributes.length > 1) {\n const start = node.attributes[1].loc?.start;\n const end = node.attributes[node.attributes.length - 1].loc?.end;\n const msg = `The '' tag only supports a default attribute.`;\n if (start == null || end == null) {\n throw tag.get(\"name\").buildCodeFrameError(msg);\n } else {\n throw tag.hub.buildError(\n { loc: { start, end } },\n msg,\n Error\n );\n }\n }\n if (isOutputHTML()) {\n flushBefore(tag);\n tag.insertBefore(\n t38.expressionStatement(\n callRuntime(\n \"pushContext\",\n t38.stringLiteral(tag.hub.file.metadata.marko.id),\n defaultAttr.value\n )\n )\n );\n } else {\n visit(tag, 37 /* Replace */);\n enterShallow(tag);\n const bodySection = getSection(tag.get(\"body\"));\n const rendererId = getRenderer(bodySection);\n initContextProvider(\n tag.hub.file.metadata.marko.id,\n node.extra.reserve,\n defaultAttr.extra?.valueReferences,\n defaultAttr.value,\n rendererId\n );\n }\n },\n exit(tag) {\n assertNoParams12(tag);\n assertNoVar8(tag);\n if (isOutputHTML()) {\n flushInto(tag);\n writeHTMLResumeStatements(tag.get(\"body\"));\n tag.insertAfter(t38.expressionStatement(callRuntime(\"popContext\")));\n }\n tag.replaceWithMultiple(tag.node.body.body);\n }\n },\n autocomplete: [\n {\n displayText: \"put=\",\n description: \"Sets a value which can be read from a child template.\",\n snippet: \"put=${1:value}\",\n descriptionMoreURL: \"https://markojs.com/docs/core-tags/#put\"\n }\n ]\n};\n\n// src/core/style.ts\nimport path2 from \"path\";\nimport { assertNoParams as assertNoParams13, importDefault as importDefault3 } from \"@marko/babel-utils\";\nimport { types as t39 } from \"@marko/compiler\";\nvar style_default = {\n translate(tag) {\n const {\n hub: { file }\n } = tag;\n assertNoParams13(tag);\n assertNoSpreadAttrs(tag);\n let type = \"text/css\";\n const attrs2 = tag.get(\"attributes\");\n const base = path2.basename(file.opts.sourceFileName);\n const typeAttr = attrs2.find(\n (attr2) => attr2.isMarkoAttribute() && attr2.node.name === \"type\"\n );\n const classAttr2 = attrs2.find(\n (attr2) => attr2.isMarkoAttribute() && attr2.node.name === \"class\"\n );\n if (typeAttr && classAttr2) {\n throw classAttr2.buildCodeFrameError(\n `"," \n\n\n \n <${actions.renderBody}/>\n \n