'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); const PartytownSnippet = "/* Partytown 0.8.0 - MIT builder.io */\n!function(t,e,n,i,r,o,a,d,s,c,l,p){function u(){p||(p=1,\"/\"==(a=(o.lib||\"/~partytown/\")+(o.debug?\"debug/\":\"\"))[0]&&(s=e.querySelectorAll('script[type=\"text/partytown\"]'),i!=t?i.dispatchEvent(new CustomEvent(\"pt1\",{detail:t})):(d=setTimeout(f,1e4),e.addEventListener(\"pt0\",w),r?h(1):n.serviceWorker?n.serviceWorker.register(a+(o.swPath||\"partytown-sw.js\"),{scope:a}).then((function(t){t.active?h():t.installing&&t.installing.addEventListener(\"statechange\",(function(t){\"activated\"==t.target.state&&h()}))}),console.error):f())))}function h(t){c=e.createElement(t?\"script\":\"iframe\"),t||(c.setAttribute(\"style\",\"display:block;width:0;height:0;border:0;visibility:hidden\"),c.setAttribute(\"aria-hidden\",!0)),c.src=a+\"partytown-\"+(t?\"atomics.js?v=0.8.0\":\"sandbox-sw.html?\"+Date.now()),e.querySelector(o.sandboxParent||\"body\").appendChild(c)}function f(n,r){for(w(),i==t&&(o.forward||[]).map((function(e){delete t[e.split(\".\")[0]]})),n=0;n { const { forward = [], ...filteredConfig } = config || {}; const configStr = JSON.stringify(filteredConfig, (k, v) => { if (typeof v === 'function') { v = String(v); if (v.startsWith(k + '(')) { v = 'function ' + v; } } return v; }); return [ `!(function(w,p,f,c){`, Object.keys(filteredConfig).length > 0 ? `c=w[p]=Object.assign(w[p]||{},${configStr});` : `c=w[p]=w[p]||{};`, `c[f]=(c[f]||[])`, forward.length > 0 ? `.concat(${JSON.stringify(forward)})` : ``, `})(window,'partytown','forward');`, snippetCode, ].join(''); }; /** * The `type` attribute for Partytown scripts, which does two things: * * 1. Prevents the `