\n\n`; var t; if ((this.ensureNotAborted(), "html" !== this.options.target)) { let t; if ( "sb3" === this.project.type && "zip-one-asset" !== this.options.target ) { t = await (await K()).loadAsync(this.project.arrayBuffer); for (const e of Object.keys(t.files)) (t.files["assets/" + e] = t.files[e]), delete t.files[e]; } else (t = new (await K())()), t.file("project.zip", this.project.arrayBuffer); return ( t.file("index.html", e), t.file("script.js", this.script), this.options.target.startsWith("nwjs-") ? (t = await this.addNwJS(t)) : this.options.target.startsWith("electron-") ? (t = await this.addElectron(t)) : "webview-mac" === this.options.target && (t = await this.addWebViewMac(t)), this.ensureNotAborted(), { data: await t.generateAsync( { type: "arraybuffer", compression: "DEFLATE", platform: "UNIX", }, (e) => { this.dispatchEvent( new R.a("zip-progress", { detail: { progress: e.percent / 100 }, }) ); } ), type: "application/zip", filename: this.generateFilename("zip"), } ); } return { data: e, type: "text/html", filename: this.generateFilename("html"), }; } } (ae.getDefaultPackageNameFromFileName = (e) => (e = (e = (e = (e = e.split(".")[0]).replace( /[^\-a-z ]/gi, "" )).trim()).replace(/ /g, "-")).toLowerCase() || "packaged-project"), (ae.getWindowTitleFromFileName = (e) => { const t = e.split("."); return ( t.length > 1 && t.pop(), (e = t.join(".").trim()) || "Packaged Project" ); }), (ae.usesUnsafeOptions = (e) => { const t = ae.DEFAULT_OPTIONS(), r = (e) => [ e.custom, e.extensions, e.cloudVariables.unsafeCloudBehaviors, ]; return JSON.stringify(r(t)) !== JSON.stringify(r(e)); }), (ae.DEFAULT_OPTIONS = () => ({ turbo: !1, interpolation: !1, framerate: 30, highQualityPen: !1, maxClones: 300, fencing: !0, miscLimits: !0, stageWidth: 480, stageHeight: 360, resizeMode: "preserve-ratio", autoplay: !1, username: "player####", closeWhenStopped: !1, projectId: "", custom: { css: "", js: "" }, appearance: { background: "#000000", foreground: "#ffffff", accent: Y.ACCENT_COLOR, }, loadingScreen: { progressBar: !0, text: "", imageMode: "normal", image: null, }, controls: { greenFlag: { enabled: !1 }, stopAll: { enabled: !1 }, fullscreen: { enabled: !1 }, pause: { enabled: !1 }, }, monitors: { editableLists: !1, variableColor: "#ff8c1a", listColor: "#fc662c", }, compiler: { enabled: !0, warpTimer: !1 }, packagedRuntime: !0, target: "html", app: { icon: null, packageName: ae.getDefaultPackageNameFromFileName(""), windowTitle: ae.getWindowTitleFromFileName(""), windowMode: "window", version: "1.0.0", }, chunks: { gamepad: !1, pointerlock: !1 }, cloudVariables: { mode: "ws", cloudHost: "wss://clouddata.turbowarp.org", custom: {}, specialCloudBehaviors: !1, unsafeCloudBehaviors: !1, }, cursor: { type: "auto", custom: null, center: { x: 0, y: 0 } }, extensions: [], bakeExtensions: !0, maxTextureDimension: 2048, })); var se = ae; var ce = (e, t) => { const r = document.createElement("a"); (r.download = e), (r.href = t), document.body.appendChild(r), r.click(), r.remove(); }, le = r(7); function ue(e) { Object(n.e)( e, "svelte-1u9hge", ".alternative.svelte-1u9hge{font-size:smaller}" ); } function de(e) { let t, r, i, o, a, s = e[4]("downloads.useWorkaround") + ""; return { c() { (t = Object(n.v)("p")), (r = Object(n.v)("button")), (i = Object(n.Y)(s)), (r.disabled = e[3]), Object(n.g)(t, "class", "alternative svelte-1u9hge"); }, m(s, c) { Object(n.E)(s, t, c), Object(n.d)(t, r), Object(n.d)(r, i), o || ((a = Object(n.G)(r, "click", e[5])), (o = !0)); }, p(e, t) { 16 & t && s !== (s = e[4]("downloads.useWorkaround") + "") && Object(n.Q)(i, s), 8 & t && (r.disabled = e[3]); }, d(e) { e && Object(n.u)(t), (o = !1), a(); }, }; } function pe(e) { let t, r, i, o, a, s = e[4]("downloads.link") .replace("{size}", (e[2].size / 1e3 / 1e3).toFixed(2) + "MB") .replace("{filename}", e[0]) + "", c = le.a && e[0].endsWith(".html"), l = c && de(e); return { c() { (t = Object(n.v)("div")), (r = Object(n.v)("p")), (i = Object(n.v)("a")), (o = Object(n.Y)(s)), (a = Object(n.U)()), l && l.c(), Object(n.g)(i, "href", e[1]), Object(n.g)(i, "download", e[0]); }, m(e, s) { Object(n.E)(e, t, s), Object(n.d)(t, r), Object(n.d)(r, i), Object(n.d)(i, o), Object(n.d)(t, a), l && l.m(t, null); }, p(e, r) { 21 & r && s !== (s = e[4]("downloads.link") .replace( "{size}", (e[2].size / 1e3 / 1e3).toFixed(2) + "MB" ) .replace("{filename}", e[0]) + "") && Object(n.Q)(o, s), 2 & r && Object(n.g)(i, "href", e[1]), 1 & r && Object(n.g)(i, "download", e[0]), 1 & r && (c = le.a && e[0].endsWith(".html")), c ? l ? l.p(e, r) : ((l = de(e)), l.c(), l.m(t, null)) : l && (l.d(1), (l = null)); }, d(e) { e && Object(n.u)(t), l && l.d(); }, }; } function he(e) { let t, r; return ( (t = new s.a({ props: { center: !0, $$slots: { default: [pe] }, $$scope: { ctx: e }, }, })), { c() { Object(n.o)(t.$$.fragment); }, m(e, i) { Object(n.H)(t, e, i), (r = !0); }, p(e, [r]) { const n = {}; 95 & r && (n.$$scope = { dirty: r, ctx: e }), t.$set(n); }, i(e) { r || (Object(n.cb)(t.$$.fragment, e), (r = !0)); }, o(e) { Object(n.db)(t.$$.fragment, e), (r = !1); }, d(e) { Object(n.s)(t, e); }, } ); } function fe(e, t, r) { let i; Object(n.l)(e, o.a, (e) => r(4, (i = e))); let a, { name: s } = t, { url: c } = t, { blob: l } = t; return ( (e.$$set = (e) => { "name" in e && r(0, (s = e.name)), "url" in e && r(1, (c = e.url)), "blob" in e && r(2, (l = e.blob)); }), [ s, c, l, a, i, async () => { r(3, (a = !0)); try { const e = new (await K())(); e.file(s, l); const t = await e.generateAsync({ type: "blob", compression: "DEFLATE", }), r = s.replace(/\.html$/, ".zip"), n = URL.createObjectURL(t); ce(r, n), URL.revokeObjectURL(n); } catch (e) { console.error(e); } r(3, (a = !1)); }, ] ); } class be extends n.a { constructor(e) { super(), Object(n.C)( this, e, fe, he, n.M, { name: 0, url: 1, blob: 2 }, ue ); } } var me = be, ge = r(17), ve = r(12); const je = []; class ye { constructor(e, t, r) { (this.name = e), (this.version = t), (this.storeName = r), (this.db = null), (this.dbPromise = null), je.push(this); } open() { if (this.db) return this.db; if (this.dbPromise) return this.dbPromise; if ("undefined" == typeof indexedDB) throw new Error("indexedDB is not supported"); return ( (this.dbPromise = (() => { if ( !( !navigator.userAgentData && /Safari\//.test(navigator.userAgent) && !/Chrom(e|ium)\//.test(navigator.userAgent) ) || !indexedDB.databases ) return Promise.resolve(); let e; return new Promise((t) => { const r = () => indexedDB.databases().finally(t); (e = setInterval(r, 100)), r(); }).finally(() => clearInterval(e)); })() .then( () => new Promise((e, t) => { const r = indexedDB.open(this.name, this.version); (r.onupgradeneeded = (e) => { e.target.result.createObjectStore(this.storeName, { keyPath: "id", }); }), (r.onsuccess = (t) => { const r = t.target.result; e(r); }), (r.onerror = (e) => { t(new Error("IDB Error " + e.target.error)); }); }) ) .then((e) => ((this.dbPromise = null), (this.db = e), e)) .catch((e) => { throw ((this.dbPromise = null), e); })), this.dbPromise ); } close() { this.db && (this.db.close(), (this.db = null)), this.dbPromise && (this.dbPromise.then((e) => { e.close(); }), (this.dbPromise = null)); } async createTransaction(e) { const t = await this.open(), r = t.transaction(this.storeName, e), n = r.objectStore(this.storeName); return { db: t, transaction: r, store: n }; } async deleteEverything() { const { transaction: e, store: t } = await this.createTransaction( "readwrite" ); return new Promise((r, n) => { ye.setTransactionErrorHandler(e, n); t.clear().onsuccess = () => { r(); }; }); } } ye.setTransactionErrorHandler = (e, t) => { e.onerror = () => { t(new Error("Transaction error: " + e.error)); }; }; window.addEventListener("pagehide", () => { for (const e of je) e.close(); }); var we = ye; const ke = new we("p4-local-settings", 1, "blobs"), Oe = (e, t, r) => { const n = new Blob([e], { type: t }); return (n.name = r), n; }, _e = async (e) => { const { transaction: t, store: r } = await ke.createTransaction( "readonly" ); return new Promise((n, i) => { we.setTransactionErrorHandler(t, i); r.get(e).onsuccess = (e) => { const t = e.target.result; if (t) { const e = t.data; e instanceof Blob ? n( (async (e) => { const t = await Object($.a)(e); return Oe(t, e.type, e.name); })(e) ) : n(Oe(e, t.type, t.name)); } else n(null); }; }); }; var Ae = (e) => { let t = !1; const r = Object(ve.b)(null, () => r.subscribe((r) => { t && (async (e, t) => { const r = t ? await Object($.a)(t) : null, { transaction: n, store: i } = await ke.createTransaction("readwrite"); return new Promise((o, a) => { we.setTransactionErrorHandler(n, a); (t ? i.put({ id: e, data: r, type: t.type, name: t.name, }) : i.delete(e) ).onsuccess = () => { o(); }; }); })(e, r).catch((e) => { console.warn(e); }); }) ); return ( _e(e).then((e) => { (t = !0), e && r.set(e); }), r ); }, xe = r(2); const Se = le.c ? "*" : location.origin, Ee = new WeakMap(); window.addEventListener("message", (e) => { if ("*" !== Se && e.origin !== location.origin) return; const t = e.data; if (t && "hello" === t.preview) { const t = e.source, r = Ee.get(t); r && t.postMessage({ blob: r }, Se); } }); var ze = class { constructor() { const e = `\n\n\n ${B( o.a.translate("preview.loading") )}\n \n \n \n\n\n
\n \n
\n
\n \n \n\n`; if (!(le.c && le.b) && "undefined" == typeof IsDesktop) { const t = URL.createObjectURL(new Blob([e], { type: "text/html" })) + "#do-not-share-this-link-it-will-not-work-for-others"; this.window = window.open(t); } else (this.window = window.open("about:blank")), this.window && this.window.document.write(e); if (!this.window) throw new Error("Cannot open popup"); } setContent(e) { Ee.set(this.window, e), this.window.postMessage({ blob: e }, Se); } setProgress(e, t) { this.window.postMessage({ progress: e, text: t }, Se); } close() { this.window.close(); } }; const Ce = (e) => { if (e instanceof Blob) return e; if (Array.isArray(e)) { const t = []; for (const r of e) t.push(Ce(r)); return t; } if (e && "object" == typeof e) { const t = {}; for (const r of Object.keys(e)) t[r] = Ce(e[r]); return t; } return e; }; var Ie = Ce; const Te = new we("p4-large-assets", 1, "assets"), Pe = (e) => (e.sha256 ? e.sha256 : `${W}-${JSON.stringify(e.src)}`); (async () => { const { transaction: e, store: t } = await Te.createTransaction( "readwrite" ); new Promise((r, n) => { we.setTransactionErrorHandler(e, n); t.getAllKeys().onsuccess = async (e) => { const n = e.target.result, i = Object.values(N).map(Pe), o = n.filter((e) => !i.includes(e)); for (const e of o) await new Promise((r) => { t.delete(e).onsuccess = () => { r(); }; }); r(); }; }); })(); var Re, Le = async (e) => { const { transaction: t, store: r } = await Te.createTransaction( "readonly" ); return new Promise((n, i) => { we.setTransactionErrorHandler(t, i); const o = Pe(e); r.get(o).onsuccess = (e) => { const t = e.target.result; n(t ? t.data : null); }; }); }, Be = async (e, t) => { const { transaction: r, store: n } = await Te.createTransaction( "readwrite" ); return new Promise((i, o) => { we.setTransactionErrorHandler(r, o); const a = Pe(e); n.put({ id: a, data: t }).onsuccess = () => { i(); }; }); }; (Re = new (class { getCachedAsset(e) { return Le(e); } async cacheAsset(e, t) { await Be(e, t); } getAppIcon(e) { return e ? "image/png" === e.type ? Object($.a)(e) : new Promise((t, r) => { const n = URL.createObjectURL(e), i = new Image(); (i.onload = () => { (i.onload = null), (i.onerror = null); const e = document.createElement("canvas"), o = e.getContext("2d"); o ? ((e.width = i.width), (e.height = i.height), o.drawImage(i, 0, 0), e.toBlob((e) => { URL.revokeObjectURL(n), t(Object($.a)(e)); })) : r( new Error( "Cannot get rendering context for icon conversion" ) ); }), (i.onerror = () => { (i.onload = null), (i.onerror = null), r(new Error("Cannot load icon")); }), (i.src = n); }) : Object(M.a)({ url: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAQAAABecRxxAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAEk5JREFUeNrt3fuzVfV5gPGtiIKXZiYRbX+zM/UP6OTSHhAIVuOFmpC2ar2gUVQwSSMiok6cVDATNcQxpZNGjEEjHW3IeE3Ee7WKqTWo8TaZqohy4Jyzvos6UbxrePtDHEcRDuecvfbe6/J5nr8A3u/77HXWXnvvVgsAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFSCGJ8OzA7NT0sXp6vzm9OD2bNpXdqQXiF34oa0Lns2PZjfnK5OF+enZYekv4jdbFQl6J+YpmUL8+vSE9k7KchizN5Jj6efZQvT1P6JtqyErJ+QHZZdnj+S3nVY2VHfTf+d/SA7dP0EW1cKhvbL5qXV6Q1Hk131jXR7Pndwkg3sGa98Kj89vze97zCyZ76X7k5z/u9PbGOXyT+bLU9bHECWwrfSquyQ2MVeduPu/u7ZSem3Dh1L5xPZ7BhvQzv5ur9POj9tctRYWjdm5w7tZVM7wMCe6aw06Iix9ObpPG8WFnvZPy4/w/KzQm5Kc2JXm1vMhf8Mf/Ozgj6eT7e9bZLtn25wlFhV85UD+9riMZOOTrlDxEr7Sn6GNwjH9tq/2vFhLbxtaD8bPbr1PywNODisjVn+t7Z6pPf8x6d/cWRYM7dml/tQ8QgYnJT+03FhLX0w/akNH5ahv3bpzzo/Kbj587Z8x3/5f9XHellz30rH2PTtP/BzTvqDA8La+376lm3/5Kv/YkeDjfFSG//R+/67pCscCjbKH3k86MP1z65yINi4x4R/LAF//Nt/qcPARrrM9rfS9xwENtVsiTv/jgGbbJPfEciP8p2+bLh/yGY196m/Nx0ANt7X88818+O+Gw2fTJEG8j9r3if+/svgyQ9c07AvFPeBX/JjTwUsbdL6H5G2Gjn5EbfmM5ty82+/NGTg5DZm2f7NeO7/dsMmt/NY0K1NuPz/mkGTO7gTcELN139gX1/0Te7QzYOT6v36/x+GTA5zDXBdnR/9nWHA5E6cVtfbf+PSk8ZL7sTHa/qzovlcwyVH4Cl1vP23px/4Jkfkpv6J9fvwz7kGS47wVuD8ut393ztlxkqO0JT2rlcAzjdUchTXAOfU68O//UZKjsKNsXt9Xv9PNlBylNcA9XksOP3WOMnRPg9Ql/v/kw2THL1Df1WP1/9rjJIcgz+pwfq/8qn0ulGSY3BLvk/1HwA+3SDJMVr9h4Lze42RHKN3VHz9Byel94yRHKPvVfwLQrJ5hki28TTAadV+B2C1EZJjt9JfFLp+QnrDCMk2fP35Par7B8BhBki25+aDqxuAy42PbNNLq3sH4FHjI9v04Yquf//E7B3jI9v07fUTqvkI0HTDIwt4J2BKNe8ALDQ6soBnARZU8wpgpdGRBXhNNW8B+hkQsggfq+T3ALoFSBbiWzGueq//BxocWYyDB1TvFuChxkYWdBtwhi8CIZtr9b4YJH3X2MiCngRYUr0AXG1sZEEBWF69PwFuMTayIG+s3hXAQ8ZGFuQD1bsCeMbYyIJ8qnpXAOuNjSzIF6oXgE3GRhZkf/UCkBsbWZCpegF41djIgvx99QLwmrGRBfmaAJACIACkAAgAKQACQAqAAJACIACkAAgAKQACQAqAAJACIACkAAgAKQACQAqAAJACIACkAAgAKQACQAqAAJACIACkAAgAKQDVCcCLbfhSTQ7Ny239L3BbBaD0AcjizrgoZsW06GvLaXFsXBZrKrr4j8TlcVxMb/P/gJ88FbPiorgrMgEoZwDujRMLHvnX49GKLf8TcXZMtqwddXbcJwBlC0AWV8aUDgx7atxQofW/Iw6xoF1wciyNIQEoUwAu6uC4l1Vk/a/tSAK5fRcLQHkCcHWHh72sEuvv0r+7rhCAcgTgmZja8WEvLfn6r7T+Pbgp+LQAlCEAF3Rl3Mu8+nMbLxCA3gdgfdtv+lX9KsCrf6+cGusFoNcBWNXFgS+1/vyYNwpArwPwva4OfKn150e8TAB6HYBzuzzypdafH7pIAHodgHldH/oyt/74gfMEoNcBmNuDsS/16s/oi76YKwBNDEDvE2D9BUAAehiA3ibA+guAAPQ4AL1LgPUXAAEoQQB6kwDrLwACUJIAdD8B1l8ABKBEAehuAqy/AAhAyQLQ17Uvh7jS+guAAJQvAH0xv+MfCtkQ51s3ARCAcgagL74Uy+PlDv0LN8a1caRlEwABKG8A/vjh0G/Ev8XP4864pxDvjlVxZcyPL1o0ARCA8geAAiAAAkABEAABoAAIgABQAARAACgAAiAAFAABEAAKgAAIAAVAAASAAiAAAkABEAABoAAIgABQAARAACgAAiAAFAABEAAKgAAIAAVAAASAAiAAAkABEABSAASAFAABIAVAAEgBEABSAASAFAABIAVAAEgBEABSAASAFAABIAVAAEgBEABSAASAFAABIAVAAEgBEABSAASAAiAAAkABEAABoAAIgABQAARAACgAAiAAFAABEAAKgAAIAAVAAASAAiAAAkABEAABoAAIgABQAARAACgAAiAAFAABEAAKgAAIAAVAAASAAiAAAkABEAABoAAIgABQAASAFAABIAWgUQE4yzFkzzxbAHodgCWOIXvmxQLQ6wBc7RiyZ64QgF4H4BnHkD3zaQHodQBSnOwgsiee3K31F4DhvM9RZE+8VwDKEIAUCx1Gdt1F3Vt/ARjejTHbgWRXPS42CEBZApDiufiaQ8mueWo81831F4CdOxCXxjRHkx13WlwWA91dfwEYmU/FkpjpiLJjzowl3XvrTwDG4lCsjdVxfawcs9fED+Pb8eUKH9Mj4/y4Ila08X/Abb0+VsfayKI3p1oAeuAjsSgmV275z4o1vTumFID6BCBFiodjVqVe+e+3KgIgAEX6QsypyPqfEL+zKAIgAMU/ZTCvEuu/zpoIgAA0MwHWXwAEoLEJsP4CIACNTYD1FwABaGwCrL8ACEBjE2D9BUAAGpsA6y8AAtDYBFh/ARCAxibA+guAADQ2AdZfAASgsQmw/gIgAI1NgPUXAAFobAKsvwAIQGMTYP0FQAAamwDrLwACUDL748yu/Q7NeosgAAJQNgdjaVd+hqLfGgiAAJTTO+P4Di7/0XGrFRAAASizQ3FfXBInxpExpaC1nxxHxPGxJO6KQQsgAAIwEh+NZXFqHNXWT4RMi1kxN67qzfe/F+CzsSK+Hl+N6Q383v7D4x/jO/Gr7v9whwD0PgCPxjcLPUxT4sJ4tmIH5blYElP9gEd8JVbV68vRBWBn/ntHfhjs4PhVhY7JQ3Gk5f/Qb8ZLAtCUAPywY8doSqysyCG52Wv/Nh5fnwQIwHCu6ugxmhzXVuCI3BIHWflP+I0YEoC6B+D5OLjDx6j8CbD+O/I6Aah7ABZ34RhNLvVBusn6D/NzaRsEoM4B2NCRm39Vugrw6j+8qwSgzgG4pWsHqZwJsP47c4EA1DkAl3XxKJXvDwEX/yP5I0AAahyARV09TOW6CvDqP7I3cgcFoL4BOLPLx6k8VwFe/UfqcwJQ3wDM7fpxKsdVgFf/kfu/AiAA9UqA9RcAAehZAHqdAOsvAALQ0wD0MgHWXwAEoOcB6FUCrL8ACEApAtCLBFh/ARCA0gSg2wmw/gIgAKUKQF9Mjp927UPP1l8ABKBkAeiLvvjnjn8H3WB83yILgACUMwB9MSt+0bGvnsji1jjGGguAAJQ3AH3RF4fHhXFD3BW/Lsx74uexOGZaYQEQgPIHgAIgAAJAARAAAaAACIAAUAAEQAAoAAIgABQAARAACoAACAAFQAAEgAIgAAJAARAAAaAACIAAUAAEQAAoAAIgABQAARAACoAACAAFQAAEgAIgAAJAARAAUgAEgBQAASAFQABIARAACoAACAAFQAAEgAIgAAJAARAAAaAACIAAUAAEQAAoAAIgABQAARAACoAACAAFQAAEgAIgAAJAARAAAaAACIAAUAAEQAAoAAIgABQAARAACoAACAAFQAAEgAIgAAJAARAAAaAACIAAUAAEQAAoAAIgABQAARAACoAACAAFQAAEgAIgAAJAARAAAaAACIAAUAAEQAAoAAIgABQAARAACoAAkAIgAKQANCoAZzng3IkvCUB9A3CRA85hnVH99ReAHXulI85hPU4A6hyAxxxxDusVAlDnAKQ4xiHnDp0c/yMA9Q7AbY45d+jCOqy/AAxnFvMcdG7Xg+NJAah7AFKsi79z2PkJp8Qv67H+ArAzn4yjHXh+zGmxqi7rLwA7d30sismOPT/wmFhTn/UXgJG5JubHdIe/8ff9Z8fKGKzT+gvAyO2Pu+P6WBZL2/DCODNmVHgFpsfc+HZb/wPV9IpYEbfFs/VafQHojZvijphTweU/KW6L/jquQLMVgN74yzisQsv/N3FjZJZFAASgOJ+OYyuy/rNirUURAAEo/v2Fkyqw/n8fv7MmAiAAzUyA9RcAAWhsAqy/AAhAYxNg/QVAABqbAOsvAALQ2ARYfwEQgMYmwPoLgAA0NgHWXwAEoLEJsP4CIACNTYD1FwABaGwCrL8ACEBjE2D9BUAAGpsA6y8AAtDYBFh/ARCAxibA+guAAJTMdTG7S+v/D9ZfAASgfG6KC7qw/mfGi9ZAAASgjGZxfXy5g8t/eKyIIUsgAAJQXjfGqlgUM2NKoV9wfWQsiBtigwUQAAGohkPxYmEOOPgUAFIABIAUAAEgBUAASAEQAFIABIAUAAEgBUAASAEQAFIABIAUAAEgBUAASAEQAFIABIAUAAEgBUAASAEQAFIABIAUAAEgBUAASAEYVQBeNTayIH9fvQDkxkYWZKpeADYZG1mQ/dULwHpjIwvyhcoFIH/G2MiCfKp6VwAPGhtZkPdXLwA3GRtZkL+oXgB+YmxkMWZXVi8A3zU2sqAALKneTcDTjY0syFMqF4DsUGMjizH/YvX+BDjQ2MhiHDygcgGI3dLbBkcW4JsxrlU90hNGRxbgb1pVJP3M6MgCXFHJAGQLjY4s4Bbg2dW8AphqdGQBTwFMrmQA+idm7xge2aZvP79Hq5rkjxgf2aYPtapK9gPjI9v0kuoG4EvGR7Z5C3BGZQPw/B7pdQMk23BLZe8AtFqtVrrdCMk2Xv9vblWZfK4Rkm04p9IBGNg3vWeI5Bh999VPt6pNutsYyTF6e6vqpDnGSI7Rk6sfgL3TFoMkx/IOQL5Pq/qkFUZJjt5seasOZH1GSY7ezV9o1QNfDUKO2sdadSE70TjJUT4CdFxtAhDj0wYDJUdhf4xv1YfsXCMlR/H6P79VJ4b2SkOGSo7QwYE9W/UiX2Cs5Aj9p1bd6J+YNhksOZK//9dPaNWPdKrRkiN4AGh2q47Eruk3hkvuxLWxa6ueZJPTVgMmh3FrOqhVX/KVRkwO44pWndn4mZQZMrkD84F9W/Umm23M5A48tlV/0m0GTW7Hm1pNYHBSGjRschs31f7y/8M/Aw7zbgC5zd3/I1rNIbvcyMmPeEmrScRu6X5DJz949u++GNdqFkP7pX6DJ1OkDYOTWs1j8+fTG4bPxrsl/WWrmeQz0/sOABvt+0NfaTWX9C1HgI3+6//MVrNJFzsEbKr5d1rIv+8gsJH+0Pa3Wq3YJf+xw8DG+aPYxfZ/kAAPBrFh/qv1//i9gPMcCjbGS2389t4R8KYgG/DGX+Pv/O8wAYen1xwQ1trX86Ns+o7fEficB4RZ43f9X27sU38jZWDf/B4HhbX0gWx/Gz6CTwrmS31fAGvm1nRJ4z7xN3ayQ/yOEGvkUKO+7qMIBif57kDWxJsa82VfBb8rcHRKjg+r/dqfnWST27kleJ37Aazs3/0rXv20LW6TzV9Iv3aYWDnX1vpHvrr6vsCu6VQ3BVkh+7OTPOtfbAR2z89IA44WS29K5/VPtLEdYGiv/Jy0wRFjeZ/0y+db/s5eCYzPT0iPO2osnY/lx8VuNrQ7nxn4bLbcB4dYEl/Lr8sOsZXdjsA+6ZR0R3rXAWTPfDetTienvW1jz9j4mfz07Na0xWFkV92S35LmeJe/NO8RbD44XZoeTm87muyob6c16ZJ8Ruxu60rI+gnpoHxBuiatTW85rCzMN9PatCJfkE15fg9bVo1rgnFDf57PSKdki7Or0o3pgfR0Wpe/lF4hhzd/Ka1LT6cH0o3Z8mxxOiWfMXiAD/ICAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAV/h81asvqVuQJ8QAAAABJRU5ErkJggg==", type: "arraybuffer", }); } readAsURL(e, t) { return Object($.c)(e).catch((e) => { throw new Error(`${t}: ${e}`); }); } fetchExtensionScript(e) { return Object(M.a)({ type: "text", url: e }); } })()), (J = Re); var Ue = se, De = r(26); const Ne = (e) => { let t = ""; const r = new Uint8Array(e); for (let e = 0; e < r.byteLength; e++) t += String.fromCharCode(r[e]); return btoa(t); }, Me = (e) => { const t = atob(e), r = new Uint8Array(t.length); for (let e = 0; e < t.length; e++) r[e] = t.charCodeAt(e); return r.buffer; }, $e = (e) => null !== e && "object" == typeof e, Fe = async (e) => { if (Array.isArray(e)) return e; const t = {}; for (const r of Object.keys(e)) { if ("__isBlob" === r) throw new Error("Can't serialize special key: __isBlob"); const n = e[r]; if (n instanceof Blob) { const e = await Object($.a)(n); t[r] = { __isBlob: !0, type: n.type, name: n.name || "", data: Ne(e), }; } else $e(n) ? (t[r] = await Fe(n)) : (t[r] = n); } return t; }, He = (e) => { if (Array.isArray(e)) return e; const t = {}; for (const r of Object.keys(e)) { const n = e[r]; if ($e(n)) if (n.__isBlob) { const e = new Blob([Me(n.data)], { type: n.type }); (e.name = n.name), (t[r] = e); } else t[r] = He(n); else t[r] = n; } return t; }; var We = r(30); function qe(e) { Object(n.e)( e, "svelte-1iqxbmk", '.option.svelte-1iqxbmk{display:block;margin:4px 0}.group.svelte-1iqxbmk{margin:12px 0}p.svelte-1iqxbmk{margin:8px 0}.group.svelte-1iqxbmk:last-child,.option.svelte-1iqxbmk:last-child,p.svelte-1iqxbmk:last-child{margin-bottom:0}textarea.svelte-1iqxbmk{box-sizing:border-box;width:100%;min-width:100%;height:150px}input[type="text"].svelte-1iqxbmk{width:200px}input[type="text"].shorter.svelte-1iqxbmk{width:150px}input[type="number"].svelte-1iqxbmk{width:50px}input.svelte-1iqxbmk:invalid{outline:2px solid red}.warning.svelte-1iqxbmk{font-weight:bold;background:yellow;color:black;padding:10px;border-radius:10px}.buttons.svelte-1iqxbmk{display:flex}.button.svelte-1iqxbmk{margin-right:4px}.side-buttons.svelte-1iqxbmk{display:flex;margin-left:auto}' ); } function Ve(e, t, r) { const n = e.slice(); return (n[112] = t[r]), (n[113] = t), (n[114] = r), n; } function Ze(e) { let t, r, i = e[7]("options.customUsernameWarning") + ""; return { c() { (t = Object(n.v)("p")), (r = Object(n.Y)(i)), Object(n.g)(t, "class", "warning svelte-1iqxbmk"); }, m(e, i) { Object(n.E)(e, t, i), Object(n.d)(t, r); }, p(e, t) { 128 & t[0] && i !== (i = e[7]("options.customUsernameWarning") + "") && Object(n.Q)(r, i); }, d(e) { e && Object(n.u)(t); }, }; } function Ye(e) { let t, r, i, o, a, s, c, l, u, d, p, h, f, b, m, g, v, j, y, w, k, O, _, A, x, S, E, C, I, T, P, R, L, B, U, D, N, M, $, F, H, W, q, V, Z, Y, G, Q, J, K, X, ee, te, re, ne, ie, oe, ae, se, ce, le, ue, de, pe, he, fe, be, me, ge, ve, je, ye, we, ke, Oe, _e, Ae, xe, Se, Ee, ze, Ce, Ie, Te, Pe, Re, Le, Be, Ue, De, Ne, Me, $e, Fe, He, We, qe, Ve, Ye, Ge, Qe, Je, Ke, Xe, et, tt = e[7]("options.runtimeOptions") + "", rt = e[7]("options.turbo") + "", nt = e[7]("options.framerate") + "", it = e[7]("options.interpolation") + "", ot = e[7]("options.highQualityPen") + "", at = e[7]("options.infiniteClones") + "", st = e[7]("options.removeFencing") + "", ct = e[7]("options.removeMiscLimits") + "", lt = e[7]("options.username") + "", ut = e[7]("options.closeWhenStopped") + "", dt = e[7]("options.stage") + "", pt = e[7]("options.stageSize") + "", ht = e[7]("options.preserveRatio") + "", ft = e[7]("options.stretch") + "", bt = e[7]("options.dynamicResize") + "", mt = e[10] && (function (e) { let t, r, i = e[7]("options.storedWarning") + ""; return { c() { (t = Object(n.v)("div")), (r = Object(n.Y)(i)), Object(n.g)(t, "class", "group svelte-1iqxbmk"); }, m(e, i) { Object(n.E)(e, t, i), Object(n.d)(t, r); }, p(e, t) { 128 & t[0] && i !== (i = e[7]("options.storedWarning") + "") && Object(n.Q)(r, i); }, d(e) { e && Object(n.u)(t); }, }; })(e); (v = new z({ props: { slug: "custom-fps" } })), (x = new z({ props: { slug: "interpolation" } })), (L = new z({ props: { slug: "high-quality-pen" } })), (W = new z({ props: { slug: "infinite-clones" } })), (X = new z({ props: { slug: "remove-fencing" } })), (ce = new z({ props: { slug: "remove-misc-limits" } })); let gt = e[0].username !== e[5].username && 0 !== e[8].length && Ze(e); return ( (Ie = new z({ props: { slug: "custom-stage-size" } })), (Qe = new z({ props: { slug: "packager/dynamic-stage-resize" }, })), (Ke = Object(n.D)(e[39][4])), { c() { (t = Object(n.v)("div")), (r = Object(n.v)("h2")), (i = Object(n.Y)(tt)), (o = Object(n.U)()), mt && mt.c(), (a = Object(n.U)()), (s = Object(n.v)("label")), (c = Object(n.v)("input")), (l = Object(n.U)()), (u = Object(n.Y)(rt)), (d = Object(n.U)()), (p = Object(n.v)("div")), (h = Object(n.v)("label")), (f = Object(n.Y)(nt)), (b = Object(n.U)()), (m = Object(n.v)("input")), (g = Object(n.U)()), Object(n.o)(v.$$.fragment), (j = Object(n.U)()), (y = Object(n.v)("div")), (w = Object(n.v)("label")), (k = Object(n.v)("input")), (O = Object(n.U)()), (_ = Object(n.Y)(it)), (A = Object(n.U)()), Object(n.o)(x.$$.fragment), (S = Object(n.U)()), (E = Object(n.v)("div")), (C = Object(n.v)("label")), (I = Object(n.v)("input")), (T = Object(n.U)()), (P = Object(n.Y)(ot)), (R = Object(n.U)()), Object(n.o)(L.$$.fragment), (B = Object(n.U)()), (U = Object(n.v)("div")), (D = Object(n.v)("label")), (N = Object(n.v)("input")), ($ = Object(n.U)()), (F = Object(n.Y)(at)), (H = Object(n.U)()), Object(n.o)(W.$$.fragment), (q = Object(n.U)()), (V = Object(n.v)("div")), (Z = Object(n.v)("label")), (Y = Object(n.v)("input")), (Q = Object(n.U)()), (J = Object(n.Y)(st)), (K = Object(n.U)()), Object(n.o)(X.$$.fragment), (ee = Object(n.U)()), (te = Object(n.v)("div")), (re = Object(n.v)("label")), (ne = Object(n.v)("input")), (oe = Object(n.U)()), (ae = Object(n.Y)(ct)), (se = Object(n.U)()), Object(n.o)(ce.$$.fragment), (le = Object(n.U)()), (ue = Object(n.v)("label")), (de = Object(n.Y)(lt)), (pe = Object(n.U)()), (he = Object(n.v)("input")), (fe = Object(n.U)()), gt && gt.c(), (be = Object(n.U)()), (me = Object(n.v)("label")), (ge = Object(n.v)("input")), (ve = Object(n.U)()), (je = Object(n.Y)(ut)), (ye = Object(n.U)()), (we = Object(n.v)("h3")), (ke = Object(n.Y)(dt)), (Oe = Object(n.U)()), (_e = Object(n.v)("label")), (Ae = Object(n.Y)(pt)), (xe = Object(n.U)()), (Se = Object(n.v)("input")), (Ee = Object(n.Y)("\n ×\n ")), (ze = Object(n.v)("input")), (Ce = Object(n.U)()), Object(n.o)(Ie.$$.fragment), (Te = Object(n.U)()), (Pe = Object(n.v)("div")), (Re = Object(n.v)("label")), (Le = Object(n.v)("input")), (Be = Object(n.U)()), (Ue = Object(n.Y)(ht)), (De = Object(n.U)()), (Ne = Object(n.v)("label")), (Me = Object(n.v)("input")), ($e = Object(n.U)()), (Fe = Object(n.Y)(ft)), (He = Object(n.U)()), (We = Object(n.v)("label")), (qe = Object(n.v)("input")), (Ve = Object(n.U)()), (Ye = Object(n.Y)(bt)), (Ge = Object(n.U)()), Object(n.o)(Qe.$$.fragment), Object(n.g)(c, "type", "checkbox"), Object(n.g)(c, "class", "svelte-1iqxbmk"), Object(n.g)(s, "class", "option svelte-1iqxbmk"), Object(n.g)(m, "type", "number"), Object(n.g)(m, "min", "0"), Object(n.g)(m, "max", "240"), Object(n.g)(m, "class", "svelte-1iqxbmk"), Object(n.g)(p, "class", "option svelte-1iqxbmk"), Object(n.g)(k, "type", "checkbox"), Object(n.g)(k, "class", "svelte-1iqxbmk"), Object(n.g)(y, "class", "option svelte-1iqxbmk"), Object(n.g)(I, "type", "checkbox"), Object(n.g)(I, "class", "svelte-1iqxbmk"), Object(n.g)(E, "class", "option svelte-1iqxbmk"), Object(n.g)(N, "type", "checkbox"), (N.checked = M = e[0].maxClones === It), Object(n.g)(N, "class", "svelte-1iqxbmk"), Object(n.g)(U, "class", "option svelte-1iqxbmk"), Object(n.g)(Y, "type", "checkbox"), (Y.checked = G = !e[0].fencing), Object(n.g)(Y, "class", "svelte-1iqxbmk"), Object(n.g)(V, "class", "option svelte-1iqxbmk"), Object(n.g)(ne, "type", "checkbox"), (ne.checked = ie = !e[0].miscLimits), Object(n.g)(ne, "class", "svelte-1iqxbmk"), Object(n.g)(te, "class", "option svelte-1iqxbmk"), Object(n.g)(he, "type", "text"), Object(n.g)(he, "class", "shorter svelte-1iqxbmk"), Object(n.g)(ue, "class", "option svelte-1iqxbmk"), Object(n.g)(ge, "type", "checkbox"), Object(n.g)(ge, "class", "svelte-1iqxbmk"), Object(n.g)(me, "class", "option svelte-1iqxbmk"), Object(n.g)(Se, "type", "number"), Object(n.g)(Se, "min", "1"), Object(n.g)(Se, "max", "4096"), Object(n.g)(Se, "step", "1"), Object(n.g)(Se, "class", "svelte-1iqxbmk"), Object(n.g)(ze, "type", "number"), Object(n.g)(ze, "min", "1"), Object(n.g)(ze, "max", "4096"), Object(n.g)(ze, "step", "1"), Object(n.g)(ze, "class", "svelte-1iqxbmk"), Object(n.g)(_e, "class", "option svelte-1iqxbmk"), Object(n.g)(Le, "type", "radio"), Object(n.g)(Le, "name", "resize-mode"), (Le.__value = "preserve-ratio"), (Le.value = Le.__value), Object(n.g)(Le, "class", "svelte-1iqxbmk"), Object(n.g)(Re, "class", "option svelte-1iqxbmk"), Object(n.g)(Me, "type", "radio"), Object(n.g)(Me, "name", "resize-mode"), (Me.__value = "stretch"), (Me.value = Me.__value), Object(n.g)(Me, "class", "svelte-1iqxbmk"), Object(n.g)(Ne, "class", "option svelte-1iqxbmk"), Object(n.g)(qe, "type", "radio"), Object(n.g)(qe, "name", "resize-mode"), (qe.__value = "dynamic-resize"), (qe.value = qe.__value), Object(n.g)(qe, "class", "svelte-1iqxbmk"), Object(n.g)(We, "class", "option svelte-1iqxbmk"), Object(n.g)(Pe, "class", "group svelte-1iqxbmk"), Ke.p(Le, Me, qe); }, m(z, M) { Object(n.E)(z, t, M), Object(n.d)(t, r), Object(n.d)(r, i), Object(n.d)(t, o), mt && mt.m(t, null), Object(n.d)(t, a), Object(n.d)(t, s), Object(n.d)(s, c), (c.checked = e[0].turbo), Object(n.d)(s, l), Object(n.d)(s, u), Object(n.d)(t, d), Object(n.d)(t, p), Object(n.d)(p, h), Object(n.d)(h, f), Object(n.d)(h, b), Object(n.d)(h, m), Object(n.R)(m, e[0].framerate), Object(n.d)(p, g), Object(n.H)(v, p, null), Object(n.d)(t, j), Object(n.d)(t, y), Object(n.d)(y, w), Object(n.d)(w, k), (k.checked = e[0].interpolation), Object(n.d)(w, O), Object(n.d)(w, _), Object(n.d)(y, A), Object(n.H)(x, y, null), Object(n.d)(t, S), Object(n.d)(t, E), Object(n.d)(E, C), Object(n.d)(C, I), (I.checked = e[0].highQualityPen), Object(n.d)(C, T), Object(n.d)(C, P), Object(n.d)(E, R), Object(n.H)(L, E, null), Object(n.d)(t, B), Object(n.d)(t, U), Object(n.d)(U, D), Object(n.d)(D, N), Object(n.d)(D, $), Object(n.d)(D, F), Object(n.d)(U, H), Object(n.H)(W, U, null), Object(n.d)(t, q), Object(n.d)(t, V), Object(n.d)(V, Z), Object(n.d)(Z, Y), Object(n.d)(Z, Q), Object(n.d)(Z, J), Object(n.d)(V, K), Object(n.H)(X, V, null), Object(n.d)(t, ee), Object(n.d)(t, te), Object(n.d)(te, re), Object(n.d)(re, ne), Object(n.d)(re, oe), Object(n.d)(re, ae), Object(n.d)(te, se), Object(n.H)(ce, te, null), Object(n.d)(t, le), Object(n.d)(t, ue), Object(n.d)(ue, de), Object(n.d)(ue, pe), Object(n.d)(ue, he), Object(n.R)(he, e[0].username), Object(n.d)(t, fe), gt && gt.m(t, null), Object(n.d)(t, be), Object(n.d)(t, me), Object(n.d)(me, ge), (ge.checked = e[0].closeWhenStopped), Object(n.d)(me, ve), Object(n.d)(me, je), Object(n.d)(t, ye), Object(n.d)(t, we), Object(n.d)(we, ke), Object(n.d)(t, Oe), Object(n.d)(t, _e), Object(n.d)(_e, Ae), Object(n.d)(_e, xe), Object(n.d)(_e, Se), Object(n.R)(Se, e[0].stageWidth), Object(n.d)(_e, Ee), Object(n.d)(_e, ze), Object(n.R)(ze, e[0].stageHeight), Object(n.d)(_e, Ce), Object(n.H)(Ie, _e, null), Object(n.d)(t, Te), Object(n.d)(t, Pe), Object(n.d)(Pe, Re), Object(n.d)(Re, Le), (Le.checked = Le.__value === e[0].resizeMode), Object(n.d)(Re, Be), Object(n.d)(Re, Ue), Object(n.d)(Pe, De), Object(n.d)(Pe, Ne), Object(n.d)(Ne, Me), (Me.checked = Me.__value === e[0].resizeMode), Object(n.d)(Ne, $e), Object(n.d)(Ne, Fe), Object(n.d)(Pe, He), Object(n.d)(Pe, We), Object(n.d)(We, qe), (qe.checked = qe.__value === e[0].resizeMode), Object(n.d)(We, Ve), Object(n.d)(We, Ye), Object(n.d)(We, Ge), Object(n.H)(Qe, We, null), (Je = !0), Xe || ((et = [ Object(n.G)(c, "change", e[27]), Object(n.G)(m, "input", e[28]), Object(n.G)(k, "change", e[29]), Object(n.G)(I, "change", e[30]), Object(n.G)(N, "change", e[31]), Object(n.G)(Y, "change", e[32]), Object(n.G)(ne, "change", e[33]), Object(n.G)(he, "input", e[34]), Object(n.G)(ge, "change", e[35]), Object(n.G)(Se, "input", e[36]), Object(n.G)(ze, "input", e[37]), Object(n.G)(Le, "change", e[38]), Object(n.G)(Me, "change", e[40]), Object(n.G)(qe, "change", e[41]), ]), (Xe = !0)); }, p(e, r) { (!Je || 128 & r[0]) && tt !== (tt = e[7]("options.runtimeOptions") + "") && Object(n.Q)(i, tt), e[10] && mt.p(e, r), 1 & r[0] && (c.checked = e[0].turbo), (!Je || 128 & r[0]) && rt !== (rt = e[7]("options.turbo") + "") && Object(n.Q)(u, rt), (!Je || 128 & r[0]) && nt !== (nt = e[7]("options.framerate") + "") && Object(n.Q)(f, nt), 1 & r[0] && Object(n.ab)(m.value) !== e[0].framerate && Object(n.R)(m, e[0].framerate), 1 & r[0] && (k.checked = e[0].interpolation), (!Je || 128 & r[0]) && it !== (it = e[7]("options.interpolation") + "") && Object(n.Q)(_, it), 1 & r[0] && (I.checked = e[0].highQualityPen), (!Je || 128 & r[0]) && ot !== (ot = e[7]("options.highQualityPen") + "") && Object(n.Q)(P, ot), (!Je || (1 & r[0] && M !== (M = e[0].maxClones === It))) && (N.checked = M), (!Je || 128 & r[0]) && at !== (at = e[7]("options.infiniteClones") + "") && Object(n.Q)(F, at), (!Je || (1 & r[0] && G !== (G = !e[0].fencing))) && (Y.checked = G), (!Je || 128 & r[0]) && st !== (st = e[7]("options.removeFencing") + "") && Object(n.Q)(J, st), (!Je || (1 & r[0] && ie !== (ie = !e[0].miscLimits))) && (ne.checked = ie), (!Je || 128 & r[0]) && ct !== (ct = e[7]("options.removeMiscLimits") + "") && Object(n.Q)(ae, ct), (!Je || 128 & r[0]) && lt !== (lt = e[7]("options.username") + "") && Object(n.Q)(de, lt), 1 & r[0] && he.value !== e[0].username && Object(n.R)(he, e[0].username), e[0].username !== e[5].username && 0 !== e[8].length ? gt ? gt.p(e, r) : ((gt = Ze(e)), gt.c(), gt.m(t, be)) : gt && (gt.d(1), (gt = null)), 1 & r[0] && (ge.checked = e[0].closeWhenStopped), (!Je || 128 & r[0]) && ut !== (ut = e[7]("options.closeWhenStopped") + "") && Object(n.Q)(je, ut), (!Je || 128 & r[0]) && dt !== (dt = e[7]("options.stage") + "") && Object(n.Q)(ke, dt), (!Je || 128 & r[0]) && pt !== (pt = e[7]("options.stageSize") + "") && Object(n.Q)(Ae, pt), 1 & r[0] && Object(n.ab)(Se.value) !== e[0].stageWidth && Object(n.R)(Se, e[0].stageWidth), 1 & r[0] && Object(n.ab)(ze.value) !== e[0].stageHeight && Object(n.R)(ze, e[0].stageHeight), 1 & r[0] && (Le.checked = Le.__value === e[0].resizeMode), (!Je || 128 & r[0]) && ht !== (ht = e[7]("options.preserveRatio") + "") && Object(n.Q)(Ue, ht), 1 & r[0] && (Me.checked = Me.__value === e[0].resizeMode), (!Je || 128 & r[0]) && ft !== (ft = e[7]("options.stretch") + "") && Object(n.Q)(Fe, ft), 1 & r[0] && (qe.checked = qe.__value === e[0].resizeMode), (!Je || 128 & r[0]) && bt !== (bt = e[7]("options.dynamicResize") + "") && Object(n.Q)(Ye, bt); }, i(e) { Je || (Object(n.cb)(v.$$.fragment, e), Object(n.cb)(x.$$.fragment, e), Object(n.cb)(L.$$.fragment, e), Object(n.cb)(W.$$.fragment, e), Object(n.cb)(X.$$.fragment, e), Object(n.cb)(ce.$$.fragment, e), Object(n.cb)(Ie.$$.fragment, e), Object(n.cb)(Qe.$$.fragment, e), (Je = !0)); }, o(e) { Object(n.db)(v.$$.fragment, e), Object(n.db)(x.$$.fragment, e), Object(n.db)(L.$$.fragment, e), Object(n.db)(W.$$.fragment, e), Object(n.db)(X.$$.fragment, e), Object(n.db)(ce.$$.fragment, e), Object(n.db)(Ie.$$.fragment, e), Object(n.db)(Qe.$$.fragment, e), (Je = !1); }, d(e) { e && Object(n.u)(t), mt && mt.d(), Object(n.s)(v), Object(n.s)(x), Object(n.s)(L), Object(n.s)(W), Object(n.s)(X), Object(n.s)(ce), gt && gt.d(), Object(n.s)(Ie), Object(n.s)(Qe), Ke.r(), (Xe = !1), Object(n.L)(et); }, } ); } function Ge(e) { let t, r, i, o, a, s, c, l, u, d, p, h, f = e[7]("options.sizeNormal") + "", b = e[7]("options.sizeStretch") + ""; return ( (d = Object(n.D)(e[39][3])), { c() { (t = Object(n.v)("label")), (r = Object(n.v)("input")), (i = Object(n.U)()), (o = Object(n.Y)(f)), (a = Object(n.U)()), (s = Object(n.v)("label")), (c = Object(n.v)("input")), (l = Object(n.U)()), (u = Object(n.Y)(b)), Object(n.g)(r, "type", "radio"), Object(n.g)(r, "name", "loading-screen-mode"), (r.__value = "normal"), (r.value = r.__value), Object(n.g)(r, "class", "svelte-1iqxbmk"), Object(n.g)(t, "class", "option svelte-1iqxbmk"), Object(n.g)(c, "type", "radio"), Object(n.g)(c, "name", "loading-screen-mode"), (c.__value = "stretch"), (c.value = c.__value), Object(n.g)(c, "class", "svelte-1iqxbmk"), Object(n.g)(s, "class", "option svelte-1iqxbmk"), d.p(r, c); }, m(d, f) { Object(n.E)(d, t, f), Object(n.d)(t, r), (r.checked = r.__value === e[0].loadingScreen.imageMode), Object(n.d)(t, i), Object(n.d)(t, o), Object(n.E)(d, a, f), Object(n.E)(d, s, f), Object(n.d)(s, c), (c.checked = c.__value === e[0].loadingScreen.imageMode), Object(n.d)(s, l), Object(n.d)(s, u), p || ((h = [ Object(n.G)(r, "change", e[48]), Object(n.G)(c, "change", e[49]), ]), (p = !0)); }, p(e, t) { 1 & t[0] && (r.checked = r.__value === e[0].loadingScreen.imageMode), 128 & t[0] && f !== (f = e[7]("options.sizeNormal") + "") && Object(n.Q)(o, f), 1 & t[0] && (c.checked = c.__value === e[0].loadingScreen.imageMode), 128 & t[0] && b !== (b = e[7]("options.sizeStretch") + "") && Object(n.Q)(u, b); }, d(e) { e && Object(n.u)(t), e && Object(n.u)(a), e && Object(n.u)(s), d.r(), (p = !1), Object(n.L)(h); }, } ); } function Qe(e) { let t, r = e[7]("options.autoplayHint") + ""; return { c() { t = Object(n.Y)(r); }, m(e, r) { Object(n.E)(e, t, r); }, p(e, i) { 128 & i[0] && r !== (r = e[7]("options.autoplayHint") + "") && Object(n.Q)(t, r); }, d(e) { e && Object(n.u)(t); }, }; } function Je(e) { let t, r, i, o, a, s, c, l, u, d, p, h, f, b, m, g, v, y, w, k, O, _, A, x, S, E, z, C, I, T, R, L, B, U, D, N, M, $, F, H, W, q, V, Z, Y, G, Q, J, K, X, ee, te, re, ne, ie, oe, ae, se, ce, le, ue, de, pe, he, fe, be, me, ge, ve, je, ye, we, ke, Oe, _e, Ae, xe, Se, Ee, ze, Ce, Ie, Te, Pe, Re, Le, Be, Ue, De, Ne, Me, $e, Fe, He, We, qe, Ve, Ze, Ye, Je, Ke, Xe, et, tt, rt, nt, it, ot, at, st, ct, lt, ut = e[7]("options.playerOptions") + "", dt = e[7]("options.pageTitle") + "", pt = e[7]("options.icon") + "", ht = e[7]("options.loadingScreen") + "", ft = e[7]("options.showProgressBar") + "", bt = e[7]("options.loadingScreenText") + "", mt = e[7]("options.loadingScreenImage") + "", gt = e[7]("options.controls") + "", vt = e[7]("options.autoplay") + "", jt = e[7]("options.showFlag") + "", yt = e[7]("options.showStop") + "", wt = e[7]("options.showPause") + "", kt = e[7]("options.showFullscreen") + "", Ot = e[7]("options.controlsHelp") + "", _t = e[7]("options.colors") + "", At = e[7]("options.backgroundColor") + "", xt = e[7]("options.foregroundColor") + "", St = e[7]("options.accentColor") + "", Et = e[7]("options.monitors") + "", zt = e[7]("options.editableLists") + "", Ct = e[7]("options.variableColor") + "", It = e[7]("options.listColor") + ""; function Tt(t) { e[44](t); } let Pt = { previewSizes: [ [64, 64], [32, 32], [16, 16], ], }; function Rt(t) { e[47](t); } void 0 !== e[3] && (Pt.file = e[3]), (f = new j({ props: Pt })), n.i.push(() => Object(n.h)(f, "file", Tt)); let Lt = { previewSizes: [["", ""]] }; void 0 !== e[1] && (Lt.file = e[1]), (B = new j({ props: Lt })), n.i.push(() => Object(n.h)(B, "file", Rt)); let Bt = e[1] && Ge(e), Ut = e[0].autoplay && Qe(e); function Dt(t) { e[55](t); } let Nt = {}; function Mt(t) { e[56](t); } void 0 !== e[0].appearance.background && (Nt.value = e[0].appearance.background), (Oe = new P({ props: Nt })), n.i.push(() => Object(n.h)(Oe, "value", Dt)); let $t = {}; function Ft(t) { e[57](t); } void 0 !== e[0].appearance.foreground && ($t.value = e[0].appearance.foreground), (ze = new P({ props: $t })), n.i.push(() => Object(n.h)(ze, "value", Mt)); let Ht = {}; function Wt(t) { e[59](t); } void 0 !== e[0].appearance.accent && (Ht.value = e[0].appearance.accent), (Le = new P({ props: Ht })), n.i.push(() => Object(n.h)(Le, "value", Ft)); let qt = {}; function Vt(t) { e[60](t); } void 0 !== e[0].monitors.variableColor && (qt.value = e[0].monitors.variableColor), (Je = new P({ props: qt })), n.i.push(() => Object(n.h)(Je, "value", Wt)); let Zt = {}; return ( void 0 !== e[0].monitors.listColor && (Zt.value = e[0].monitors.listColor), (nt = new P({ props: Zt })), n.i.push(() => Object(n.h)(nt, "value", Vt)), { c() { (t = Object(n.v)("div")), (r = Object(n.v)("h2")), (i = Object(n.Y)(ut)), (o = Object(n.U)()), (a = Object(n.v)("label")), (s = Object(n.Y)(dt)), (c = Object(n.U)()), (l = Object(n.v)("input")), (u = Object(n.U)()), (d = Object(n.v)("div")), (p = Object(n.Y)(pt)), (h = Object(n.U)()), Object(n.o)(f.$$.fragment), (m = Object(n.U)()), (g = Object(n.v)("h3")), (v = Object(n.Y)(ht)), (y = Object(n.U)()), (w = Object(n.v)("label")), (k = Object(n.v)("input")), (O = Object(n.U)()), (_ = Object(n.Y)(ft)), (A = Object(n.U)()), (x = Object(n.v)("label")), (S = Object(n.Y)(bt)), (E = Object(n.U)()), (z = Object(n.v)("input")), (I = Object(n.U)()), (T = Object(n.v)("div")), (R = Object(n.Y)(mt)), (L = Object(n.U)()), Object(n.o)(B.$$.fragment), (D = Object(n.U)()), Bt && Bt.c(), (N = Object(n.U)()), (M = Object(n.v)("h3")), ($ = Object(n.Y)(gt)), (F = Object(n.U)()), (H = Object(n.v)("div")), (W = Object(n.v)("label")), (q = Object(n.v)("input")), (V = Object(n.U)()), (Z = Object(n.Y)(vt)), (Y = Object(n.U)()), Ut && Ut.c(), (G = Object(n.U)()), (Q = Object(n.v)("label")), (J = Object(n.v)("input")), (K = Object(n.U)()), (X = Object(n.Y)(jt)), (ee = Object(n.U)()), (te = Object(n.v)("label")), (re = Object(n.v)("input")), (ne = Object(n.U)()), (ie = Object(n.Y)(yt)), (oe = Object(n.U)()), (ae = Object(n.v)("label")), (se = Object(n.v)("input")), (ce = Object(n.U)()), (le = Object(n.Y)(wt)), (ue = Object(n.U)()), (de = Object(n.v)("label")), (pe = Object(n.v)("input")), (he = Object(n.U)()), (fe = Object(n.Y)(kt)), (be = Object(n.U)()), (me = Object(n.v)("p")), (ge = Object(n.Y)(Ot)), (ve = Object(n.U)()), (je = Object(n.v)("h3")), (ye = Object(n.Y)(_t)), (we = Object(n.U)()), (ke = Object(n.v)("label")), Object(n.o)(Oe.$$.fragment), (Ae = Object(n.U)()), (xe = Object(n.Y)(At)), (Se = Object(n.U)()), (Ee = Object(n.v)("label")), Object(n.o)(ze.$$.fragment), (Ie = Object(n.U)()), (Te = Object(n.Y)(xt)), (Pe = Object(n.U)()), (Re = Object(n.v)("label")), Object(n.o)(Le.$$.fragment), (Ue = Object(n.U)()), (De = Object(n.Y)(St)), (Ne = Object(n.U)()), (Me = Object(n.v)("h3")), ($e = Object(n.Y)(Et)), (Fe = Object(n.U)()), (He = Object(n.v)("label")), (We = Object(n.v)("input")), (qe = Object(n.U)()), (Ve = Object(n.Y)(zt)), (Ze = Object(n.U)()), (Ye = Object(n.v)("label")), Object(n.o)(Je.$$.fragment), (Xe = Object(n.U)()), (et = Object(n.Y)(Ct)), (tt = Object(n.U)()), (rt = Object(n.v)("label")), Object(n.o)(nt.$$.fragment), (ot = Object(n.U)()), (at = Object(n.Y)(It)), Object(n.g)(l, "type", "text"), Object(n.g)(l, "class", "svelte-1iqxbmk"), Object(n.g)(a, "class", "option svelte-1iqxbmk"), Object(n.g)(d, "class", "option svelte-1iqxbmk"), Object(n.g)(k, "type", "checkbox"), Object(n.g)(k, "class", "svelte-1iqxbmk"), Object(n.g)(w, "class", "option svelte-1iqxbmk"), Object(n.g)(z, "type", "text"), Object(n.g)( z, "placeholder", (C = e[7]("options.loadingScreenTextPlaceholder")) ), Object(n.g)(z, "class", "svelte-1iqxbmk"), Object(n.g)(x, "class", "option svelte-1iqxbmk"), Object(n.g)(T, "class", "option svelte-1iqxbmk"), Object(n.g)(q, "type", "checkbox"), Object(n.g)(q, "class", "svelte-1iqxbmk"), Object(n.g)(W, "class", "option svelte-1iqxbmk"), Object(n.g)(H, "class", "group svelte-1iqxbmk"), Object(n.g)(J, "type", "checkbox"), Object(n.g)(J, "class", "svelte-1iqxbmk"), Object(n.g)(Q, "class", "option svelte-1iqxbmk"), Object(n.g)(re, "type", "checkbox"), Object(n.g)(re, "class", "svelte-1iqxbmk"), Object(n.g)(te, "class", "option svelte-1iqxbmk"), Object(n.g)(se, "type", "checkbox"), Object(n.g)(se, "class", "svelte-1iqxbmk"), Object(n.g)(ae, "class", "option svelte-1iqxbmk"), Object(n.g)(pe, "type", "checkbox"), Object(n.g)(pe, "class", "svelte-1iqxbmk"), Object(n.g)(de, "class", "option svelte-1iqxbmk"), Object(n.g)(me, "class", "svelte-1iqxbmk"), Object(n.g)(ke, "class", "option svelte-1iqxbmk"), Object(n.g)(Ee, "class", "option svelte-1iqxbmk"), Object(n.g)(Re, "class", "option svelte-1iqxbmk"), Object(n.g)(We, "type", "checkbox"), Object(n.g)(We, "class", "svelte-1iqxbmk"), Object(n.g)(He, "class", "option svelte-1iqxbmk"), Object(n.g)(Ye, "class", "option svelte-1iqxbmk"), Object(n.g)(rt, "class", "option svelte-1iqxbmk"); }, m(b, j) { Object(n.E)(b, t, j), Object(n.d)(t, r), Object(n.d)(r, i), Object(n.d)(t, o), Object(n.d)(t, a), Object(n.d)(a, s), Object(n.d)(a, c), Object(n.d)(a, l), Object(n.R)(l, e[0].app.windowTitle), Object(n.d)(t, u), Object(n.d)(t, d), Object(n.d)(d, p), Object(n.d)(d, h), Object(n.H)(f, d, null), Object(n.d)(t, m), Object(n.d)(t, g), Object(n.d)(g, v), Object(n.d)(t, y), Object(n.d)(t, w), Object(n.d)(w, k), (k.checked = e[0].loadingScreen.progressBar), Object(n.d)(w, O), Object(n.d)(w, _), Object(n.d)(t, A), Object(n.d)(t, x), Object(n.d)(x, S), Object(n.d)(x, E), Object(n.d)(x, z), Object(n.R)(z, e[0].loadingScreen.text), Object(n.d)(t, I), Object(n.d)(t, T), Object(n.d)(T, R), Object(n.d)(T, L), Object(n.H)(B, T, null), Object(n.d)(t, D), Bt && Bt.m(t, null), Object(n.d)(t, N), Object(n.d)(t, M), Object(n.d)(M, $), Object(n.d)(t, F), Object(n.d)(t, H), Object(n.d)(H, W), Object(n.d)(W, q), (q.checked = e[0].autoplay), Object(n.d)(W, V), Object(n.d)(W, Z), Object(n.d)(H, Y), Ut && Ut.m(H, null), Object(n.d)(t, G), Object(n.d)(t, Q), Object(n.d)(Q, J), (J.checked = e[0].controls.greenFlag.enabled), Object(n.d)(Q, K), Object(n.d)(Q, X), Object(n.d)(t, ee), Object(n.d)(t, te), Object(n.d)(te, re), (re.checked = e[0].controls.stopAll.enabled), Object(n.d)(te, ne), Object(n.d)(te, ie), Object(n.d)(t, oe), Object(n.d)(t, ae), Object(n.d)(ae, se), (se.checked = e[0].controls.pause.enabled), Object(n.d)(ae, ce), Object(n.d)(ae, le), Object(n.d)(t, ue), Object(n.d)(t, de), Object(n.d)(de, pe), (pe.checked = e[0].controls.fullscreen.enabled), Object(n.d)(de, he), Object(n.d)(de, fe), Object(n.d)(t, be), Object(n.d)(t, me), Object(n.d)(me, ge), Object(n.d)(t, ve), Object(n.d)(t, je), Object(n.d)(je, ye), Object(n.d)(t, we), Object(n.d)(t, ke), Object(n.H)(Oe, ke, null), Object(n.d)(ke, Ae), Object(n.d)(ke, xe), Object(n.d)(t, Se), Object(n.d)(t, Ee), Object(n.H)(ze, Ee, null), Object(n.d)(Ee, Ie), Object(n.d)(Ee, Te), Object(n.d)(t, Pe), Object(n.d)(t, Re), Object(n.H)(Le, Re, null), Object(n.d)(Re, Ue), Object(n.d)(Re, De), Object(n.d)(t, Ne), Object(n.d)(t, Me), Object(n.d)(Me, $e), Object(n.d)(t, Fe), Object(n.d)(t, He), Object(n.d)(He, We), (We.checked = e[0].monitors.editableLists), Object(n.d)(He, qe), Object(n.d)(He, Ve), Object(n.d)(t, Ze), Object(n.d)(t, Ye), Object(n.H)(Je, Ye, null), Object(n.d)(Ye, Xe), Object(n.d)(Ye, et), Object(n.d)(t, tt), Object(n.d)(t, rt), Object(n.H)(nt, rt, null), Object(n.d)(rt, ot), Object(n.d)(rt, at), (st = !0), ct || ((lt = [ Object(n.G)(l, "input", e[43]), Object(n.G)(k, "change", e[45]), Object(n.G)(z, "input", e[46]), Object(n.G)(q, "change", e[50]), Object(n.G)(J, "change", e[51]), Object(n.G)(re, "change", e[52]), Object(n.G)(se, "change", e[53]), Object(n.G)(pe, "change", e[54]), Object(n.G)(We, "change", e[58]), ]), (ct = !0)); }, p(e, r) { (!st || 128 & r[0]) && ut !== (ut = e[7]("options.playerOptions") + "") && Object(n.Q)(i, ut), (!st || 128 & r[0]) && dt !== (dt = e[7]("options.pageTitle") + "") && Object(n.Q)(s, dt), 1 & r[0] && l.value !== e[0].app.windowTitle && Object(n.R)(l, e[0].app.windowTitle), (!st || 128 & r[0]) && pt !== (pt = e[7]("options.icon") + "") && Object(n.Q)(p, pt); const o = {}; !b && 8 & r[0] && ((b = !0), (o.file = e[3]), Object(n.b)(() => (b = !1))), f.$set(o), (!st || 128 & r[0]) && ht !== (ht = e[7]("options.loadingScreen") + "") && Object(n.Q)(v, ht), 1 & r[0] && (k.checked = e[0].loadingScreen.progressBar), (!st || 128 & r[0]) && ft !== (ft = e[7]("options.showProgressBar") + "") && Object(n.Q)(_, ft), (!st || 128 & r[0]) && bt !== (bt = e[7]("options.loadingScreenText") + "") && Object(n.Q)(S, bt), (!st || (128 & r[0] && C !== (C = e[7]( "options.loadingScreenTextPlaceholder" )))) && Object(n.g)(z, "placeholder", C), 1 & r[0] && z.value !== e[0].loadingScreen.text && Object(n.R)(z, e[0].loadingScreen.text), (!st || 128 & r[0]) && mt !== (mt = e[7]("options.loadingScreenImage") + "") && Object(n.Q)(R, mt); const a = {}; !U && 2 & r[0] && ((U = !0), (a.file = e[1]), Object(n.b)(() => (U = !1))), B.$set(a), e[1] ? Bt ? Bt.p(e, r) : ((Bt = Ge(e)), Bt.c(), Bt.m(t, N)) : Bt && (Bt.d(1), (Bt = null)), (!st || 128 & r[0]) && gt !== (gt = e[7]("options.controls") + "") && Object(n.Q)($, gt), 1 & r[0] && (q.checked = e[0].autoplay), (!st || 128 & r[0]) && vt !== (vt = e[7]("options.autoplay") + "") && Object(n.Q)(Z, vt), e[0].autoplay ? Ut ? Ut.p(e, r) : ((Ut = Qe(e)), Ut.c(), Ut.m(H, null)) : Ut && (Ut.d(1), (Ut = null)), 1 & r[0] && (J.checked = e[0].controls.greenFlag.enabled), (!st || 128 & r[0]) && jt !== (jt = e[7]("options.showFlag") + "") && Object(n.Q)(X, jt), 1 & r[0] && (re.checked = e[0].controls.stopAll.enabled), (!st || 128 & r[0]) && yt !== (yt = e[7]("options.showStop") + "") && Object(n.Q)(ie, yt), 1 & r[0] && (se.checked = e[0].controls.pause.enabled), (!st || 128 & r[0]) && wt !== (wt = e[7]("options.showPause") + "") && Object(n.Q)(le, wt), 1 & r[0] && (pe.checked = e[0].controls.fullscreen.enabled), (!st || 128 & r[0]) && kt !== (kt = e[7]("options.showFullscreen") + "") && Object(n.Q)(fe, kt), (!st || 128 & r[0]) && Ot !== (Ot = e[7]("options.controlsHelp") + "") && Object(n.Q)(ge, Ot), (!st || 128 & r[0]) && _t !== (_t = e[7]("options.colors") + "") && Object(n.Q)(ye, _t); const c = {}; !_e && 1 & r[0] && ((_e = !0), (c.value = e[0].appearance.background), Object(n.b)(() => (_e = !1))), Oe.$set(c), (!st || 128 & r[0]) && At !== (At = e[7]("options.backgroundColor") + "") && Object(n.Q)(xe, At); const u = {}; !Ce && 1 & r[0] && ((Ce = !0), (u.value = e[0].appearance.foreground), Object(n.b)(() => (Ce = !1))), ze.$set(u), (!st || 128 & r[0]) && xt !== (xt = e[7]("options.foregroundColor") + "") && Object(n.Q)(Te, xt); const d = {}; !Be && 1 & r[0] && ((Be = !0), (d.value = e[0].appearance.accent), Object(n.b)(() => (Be = !1))), Le.$set(d), (!st || 128 & r[0]) && St !== (St = e[7]("options.accentColor") + "") && Object(n.Q)(De, St), (!st || 128 & r[0]) && Et !== (Et = e[7]("options.monitors") + "") && Object(n.Q)($e, Et), 1 & r[0] && (We.checked = e[0].monitors.editableLists), (!st || 128 & r[0]) && zt !== (zt = e[7]("options.editableLists") + "") && Object(n.Q)(Ve, zt); const h = {}; !Ke && 1 & r[0] && ((Ke = !0), (h.value = e[0].monitors.variableColor), Object(n.b)(() => (Ke = !1))), Je.$set(h), (!st || 128 & r[0]) && Ct !== (Ct = e[7]("options.variableColor") + "") && Object(n.Q)(et, Ct); const m = {}; !it && 1 & r[0] && ((it = !0), (m.value = e[0].monitors.listColor), Object(n.b)(() => (it = !1))), nt.$set(m), (!st || 128 & r[0]) && It !== (It = e[7]("options.listColor") + "") && Object(n.Q)(at, It); }, i(e) { st || (Object(n.cb)(f.$$.fragment, e), Object(n.cb)(B.$$.fragment, e), Object(n.cb)(Oe.$$.fragment, e), Object(n.cb)(ze.$$.fragment, e), Object(n.cb)(Le.$$.fragment, e), Object(n.cb)(Je.$$.fragment, e), Object(n.cb)(nt.$$.fragment, e), (st = !0)); }, o(e) { Object(n.db)(f.$$.fragment, e), Object(n.db)(B.$$.fragment, e), Object(n.db)(Oe.$$.fragment, e), Object(n.db)(ze.$$.fragment, e), Object(n.db)(Le.$$.fragment, e), Object(n.db)(Je.$$.fragment, e), Object(n.db)(nt.$$.fragment, e), (st = !1); }, d(e) { e && Object(n.u)(t), Object(n.s)(f), Object(n.s)(B), Bt && Bt.d(), Ut && Ut.d(), Object(n.s)(Oe), Object(n.s)(ze), Object(n.s)(Le), Object(n.s)(Je), Object(n.s)(nt), (ct = !1), Object(n.L)(lt); }, } ); } function Ke(e) { let t, r, i, o, s, c, l, u, d, p, h, f, b, m, g, v, y, w, k, O, _, A = e[7]("options.cursorHelp") + "", x = e[7]("options.cursorCenter") + "", S = e[7]("options.automaticallyCenter") + ""; function E(t) { e[65](t); } let z = { previewSizes: [ [32, 32], [16, 16], ], }; return ( void 0 !== e[2] && (z.file = e[2]), (r = new j({ props: z })), n.i.push(() => Object(n.h)(r, "file", E)), { c() { (t = Object(n.v)("div")), Object(n.o)(r.$$.fragment), (o = Object(n.U)()), (s = Object(n.v)("p")), (c = Object(n.Y)(A)), (l = Object(n.U)()), (u = Object(n.v)("label")), (d = Object(n.Y)(x)), (p = Object(n.Y)("\n \n X: ")), (h = Object(n.v)("input")), (f = Object(n.Y)("\n Y: ")), (b = Object(n.v)("input")), (m = Object(n.U)()), (g = Object(n.v)("button")), (v = Object(n.Y)(S)), Object(n.g)(s, "class", "svelte-1iqxbmk"), Object(n.g)(h, "type", "number"), Object(n.g)(h, "min", "0"), Object(n.g)(h, "class", "svelte-1iqxbmk"), Object(n.g)(b, "type", "number"), Object(n.g)(b, "min", "0"), Object(n.g)(b, "class", "svelte-1iqxbmk"), (g.disabled = y = !e[2]), Object(n.g)(u, "class", "option svelte-1iqxbmk"), Object(n.g)(t, "class", "option svelte-1iqxbmk"); }, m(i, a) { Object(n.E)(i, t, a), Object(n.H)(r, t, null), Object(n.d)(t, o), Object(n.d)(t, s), Object(n.d)(s, c), Object(n.d)(t, l), Object(n.d)(t, u), Object(n.d)(u, d), Object(n.d)(u, p), Object(n.d)(u, h), Object(n.R)(h, e[0].cursor.center.x), Object(n.d)(u, f), Object(n.d)(u, b), Object(n.R)(b, e[0].cursor.center.y), Object(n.d)(u, m), Object(n.d)(u, g), Object(n.d)(g, v), (k = !0), O || ((_ = [ Object(n.G)(h, "input", e[66]), Object(n.G)(b, "input", e[67]), Object(n.G)(g, "click", e[16]), ]), (O = !0)); }, p(e, t) { const o = {}; !i && 4 & t[0] && ((i = !0), (o.file = e[2]), Object(n.b)(() => (i = !1))), r.$set(o), (!k || 128 & t[0]) && A !== (A = e[7]("options.cursorHelp") + "") && Object(n.Q)(c, A), (!k || 128 & t[0]) && x !== (x = e[7]("options.cursorCenter") + "") && Object(n.Q)(d, x), 1 & t[0] && Object(n.ab)(h.value) !== e[0].cursor.center.x && Object(n.R)(h, e[0].cursor.center.x), 1 & t[0] && Object(n.ab)(b.value) !== e[0].cursor.center.y && Object(n.R)(b, e[0].cursor.center.y), (!k || 128 & t[0]) && S !== (S = e[7]("options.automaticallyCenter") + "") && Object(n.Q)(v, S), (!k || (4 & t[0] && y !== (y = !e[2]))) && (g.disabled = y); }, i(e) { k || (Object(n.cb)(r.$$.fragment, e), w || Object(n.c)(() => { (w = Object(n.p)(t, a.b, {})), w.start(); }), (k = !0)); }, o(e) { Object(n.db)(r.$$.fragment, e), (k = !1); }, d(e) { e && Object(n.u)(t), Object(n.s)(r), (O = !1), Object(n.L)(_); }, } ); } function Xe(e) { let t, r, i, o, a, s, c, l, u, d, p, h, f, b, m, g, v, j, y, w, k, O, _, A, x, S, E, z, C, I, T, P, R, L, B, U, D, N, M, $, F, H, W = e[7]("options.interaction") + "", q = e[7]("options.normalCursor") + "", V = e[7]("options.noCursor") + "", Z = e[7]("options.customCursor") + "", Y = e[7]("options.pointerlock") + "", G = e[7]("options.pointerlockHelp") + "", Q = e[7]("options.gamepad") + "", J = e[7]("options.gamepadHelp") + "", K = "custom" === e[0].cursor.type && Ke(e); return ( ($ = Object(n.D)(e[39][2])), { c() { (t = Object(n.v)("div")), (r = Object(n.v)("h2")), (i = Object(n.Y)(W)), (o = Object(n.U)()), (a = Object(n.v)("div")), (s = Object(n.v)("label")), (c = Object(n.v)("input")), (l = Object(n.U)()), (u = Object(n.Y)(q)), (d = Object(n.U)()), (p = Object(n.v)("label")), (h = Object(n.v)("input")), (f = Object(n.U)()), (b = Object(n.Y)(V)), (m = Object(n.U)()), (g = Object(n.v)("label")), (v = Object(n.v)("input")), (j = Object(n.U)()), (y = Object(n.Y)(Z)), (w = Object(n.U)()), K && K.c(), (k = Object(n.U)()), (O = Object(n.v)("div")), (_ = Object(n.v)("label")), (A = Object(n.v)("input")), (x = Object(n.U)()), (S = Object(n.Y)(Y)), (E = Object(n.U)()), (z = Object(n.v)("a")), (C = Object(n.Y)(G)), (I = Object(n.U)()), (T = Object(n.v)("div")), (P = Object(n.v)("label")), (R = Object(n.v)("input")), (L = Object(n.U)()), (B = Object(n.Y)(Q)), (U = Object(n.U)()), (D = Object(n.v)("a")), (N = Object(n.Y)(J)), Object(n.g)(c, "type", "radio"), Object(n.g)(c, "name", "cursor-type"), (c.__value = "auto"), (c.value = c.__value), Object(n.g)(c, "class", "svelte-1iqxbmk"), Object(n.g)(s, "class", "option svelte-1iqxbmk"), Object(n.g)(h, "type", "radio"), Object(n.g)(h, "name", "cursor-type"), (h.__value = "none"), (h.value = h.__value), Object(n.g)(h, "class", "svelte-1iqxbmk"), Object(n.g)(p, "class", "option svelte-1iqxbmk"), Object(n.g)(v, "type", "radio"), Object(n.g)(v, "name", "cursor-type"), (v.__value = "custom"), (v.value = v.__value), Object(n.g)(v, "class", "svelte-1iqxbmk"), Object(n.g)(g, "class", "option svelte-1iqxbmk"), Object(n.g)(a, "class", "group svelte-1iqxbmk"), Object(n.g)(A, "type", "checkbox"), Object(n.g)(A, "class", "svelte-1iqxbmk"), Object(n.g)(_, "class", "option svelte-1iqxbmk"), Object(n.g)( z, "href", "https://experiments.turbowarp.org/pointerlock/" ), Object(n.g)(z, "target", "_blank"), Object(n.g)(z, "rel", "noopener noreferrer"), Object(n.g)(O, "class", "group svelte-1iqxbmk"), Object(n.g)(R, "type", "checkbox"), Object(n.g)(R, "class", "svelte-1iqxbmk"), Object(n.g)(P, "class", "option svelte-1iqxbmk"), Object(n.g)( D, "href", "https://turbowarp.org/addons#gamepad" ), Object(n.g)(D, "target", "_blank"), Object(n.g)(D, "rel", "noopener noreferrer"), Object(n.g)(T, "class", "group svelte-1iqxbmk"), $.p(c, h, v); }, m($, W) { Object(n.E)($, t, W), Object(n.d)(t, r), Object(n.d)(r, i), Object(n.d)(t, o), Object(n.d)(t, a), Object(n.d)(a, s), Object(n.d)(s, c), (c.checked = c.__value === e[0].cursor.type), Object(n.d)(s, l), Object(n.d)(s, u), Object(n.d)(a, d), Object(n.d)(a, p), Object(n.d)(p, h), (h.checked = h.__value === e[0].cursor.type), Object(n.d)(p, f), Object(n.d)(p, b), Object(n.d)(a, m), Object(n.d)(a, g), Object(n.d)(g, v), (v.checked = v.__value === e[0].cursor.type), Object(n.d)(g, j), Object(n.d)(g, y), Object(n.d)(t, w), K && K.m(t, null), Object(n.d)(t, k), Object(n.d)(t, O), Object(n.d)(O, _), Object(n.d)(_, A), (A.checked = e[0].chunks.pointerlock), Object(n.d)(_, x), Object(n.d)(_, S), Object(n.d)(O, E), Object(n.d)(O, z), Object(n.d)(z, C), Object(n.d)(t, I), Object(n.d)(t, T), Object(n.d)(T, P), Object(n.d)(P, R), (R.checked = e[0].chunks.gamepad), Object(n.d)(P, L), Object(n.d)(P, B), Object(n.d)(T, U), Object(n.d)(T, D), Object(n.d)(D, N), (M = !0), F || ((H = [ Object(n.G)(c, "change", e[62]), Object(n.G)(h, "change", e[63]), Object(n.G)(v, "change", e[64]), Object(n.G)(A, "change", e[68]), Object(n.G)(R, "change", e[69]), ]), (F = !0)); }, p(e, r) { (!M || 128 & r[0]) && W !== (W = e[7]("options.interaction") + "") && Object(n.Q)(i, W), 1 & r[0] && (c.checked = c.__value === e[0].cursor.type), (!M || 128 & r[0]) && q !== (q = e[7]("options.normalCursor") + "") && Object(n.Q)(u, q), 1 & r[0] && (h.checked = h.__value === e[0].cursor.type), (!M || 128 & r[0]) && V !== (V = e[7]("options.noCursor") + "") && Object(n.Q)(b, V), 1 & r[0] && (v.checked = v.__value === e[0].cursor.type), (!M || 128 & r[0]) && Z !== (Z = e[7]("options.customCursor") + "") && Object(n.Q)(y, Z), "custom" === e[0].cursor.type ? K ? (K.p(e, r), 1 & r[0] && Object(n.cb)(K, 1)) : ((K = Ke(e)), K.c(), Object(n.cb)(K, 1), K.m(t, k)) : K && (Object(n.z)(), Object(n.db)(K, 1, 1, () => { K = null; }), Object(n.k)()), 1 & r[0] && (A.checked = e[0].chunks.pointerlock), (!M || 128 & r[0]) && Y !== (Y = e[7]("options.pointerlock") + "") && Object(n.Q)(S, Y), (!M || 128 & r[0]) && G !== (G = e[7]("options.pointerlockHelp") + "") && Object(n.Q)(C, G), 1 & r[0] && (R.checked = e[0].chunks.gamepad), (!M || 128 & r[0]) && Q !== (Q = e[7]("options.gamepad") + "") && Object(n.Q)(B, Q), (!M || 128 & r[0]) && J !== (J = e[7]("options.gamepadHelp") + "") && Object(n.Q)(N, J); }, i(e) { M || (Object(n.cb)(K), (M = !0)); }, o(e) { Object(n.db)(K), (M = !1); }, d(e) { e && Object(n.u)(t), K && K.d(), $.r(), (F = !1), Object(n.L)(H); }, } ); } function et(e) { let t, r, i = e[7]("options.noCloudVariables") + ""; return { c() { (t = Object(n.v)("p")), (r = Object(n.Y)(i)), Object(n.g)(t, "class", "svelte-1iqxbmk"); }, m(e, i) { Object(n.E)(e, t, i), Object(n.d)(t, r); }, p(e, t) { 128 & t[0] && i !== (i = e[7]("options.noCloudVariables") + "") && Object(n.Q)(r, i); }, i: n.I, o: n.I, d(e) { e && Object(n.u)(t); }, }; } function tt(e) { let t, r, i, o, a, s, c, l, u, d, p, h, f, b, m, g, v, j, y, w, k, O, _, A, x, S, E, C, I, T, P, R, L, B, U, D, N, M, $, F, H, W, q, V, Z, Y, G, Q, J, K = e[7]("options.mode") + "", X = e[7]("options.cloudVariables-ws") + "", ee = e[7]("options.cloudVariables-local") + "", te = e[7]("options.cloudVariables-ignore") + "", re = e[7]("options.cloudVariables-custom") + "", ne = e[7]("options.cloudVariables-ws-help") + "", ie = e[7]("options.cloudVariables-local-help") + "", oe = e[7]("options.cloudVariables-ignore-help") + "", ae = e[7]("options.cloudVariables-custom-help") + "", se = e[7]("options.specialCloudBehaviors") + "", ce = e[7]("options.unsafeCloudBehaviors") + "", le = e[7]("options.implicitCloudHint").replace("{cloud}", "☁") + "", ue = "custom" === e[0].cloudVariables.mode && rt(e), de = ("ws" === e[0].cloudVariables.mode || "custom" === e[0].cloudVariables.mode) && it(e); (B = new z({ props: { slug: "packager/special-cloud-behaviors" }, })), (W = new z({ props: { slug: "packager/special-cloud-behaviors#eval" }, })); let pe = e[0].cloudVariables.unsafeCloudBehaviors && ot(e); return { c() { (t = Object(n.v)("label")), (r = Object(n.Y)(K)), (i = Object(n.U)()), (o = Object(n.v)("select")), (a = Object(n.v)("option")), (s = Object(n.Y)(X)), (c = Object(n.v)("option")), (l = Object(n.Y)(ee)), (u = Object(n.v)("option")), (d = Object(n.Y)(te)), (p = Object(n.v)("option")), (h = Object(n.Y)(re)), (f = Object(n.U)()), ue && ue.c(), (b = Object(n.U)()), de && de.c(), (m = Object(n.U)()), (g = Object(n.v)("p")), (v = Object(n.Y)(ne)), (j = Object(n.U)()), (y = Object(n.v)("p")), (w = Object(n.Y)(ie)), (k = Object(n.U)()), (O = Object(n.v)("p")), (_ = Object(n.Y)(oe)), (A = Object(n.U)()), (x = Object(n.v)("p")), (S = Object(n.Y)(ae)), (E = Object(n.U)()), (C = Object(n.v)("div")), (I = Object(n.v)("label")), (T = Object(n.v)("input")), (P = Object(n.U)()), (R = Object(n.Y)(se)), (L = Object(n.U)()), Object(n.o)(B.$$.fragment), (U = Object(n.U)()), (D = Object(n.v)("div")), (N = Object(n.v)("label")), (M = Object(n.v)("input")), ($ = Object(n.U)()), (F = Object(n.Y)(ce)), (H = Object(n.U)()), Object(n.o)(W.$$.fragment), (q = Object(n.U)()), pe && pe.c(), (V = Object(n.U)()), (Z = Object(n.v)("p")), (Y = Object(n.Y)(le)), (a.__value = "ws"), (a.value = a.__value), (c.__value = "local"), (c.value = c.__value), (u.__value = ""), (u.value = u.__value), (p.__value = "custom"), (p.value = p.__value), void 0 === e[0].cloudVariables.mode && Object(n.c)(() => e[71].call(o)), Object(n.g)(t, "class", "option svelte-1iqxbmk"), Object(n.g)(g, "class", "svelte-1iqxbmk"), Object(n.g)(y, "class", "svelte-1iqxbmk"), Object(n.g)(O, "class", "svelte-1iqxbmk"), Object(n.g)(x, "class", "svelte-1iqxbmk"), Object(n.g)(T, "type", "checkbox"), Object(n.g)(T, "class", "svelte-1iqxbmk"), Object(n.g)(C, "class", "option svelte-1iqxbmk"), Object(n.g)(M, "type", "checkbox"), Object(n.g)(M, "class", "svelte-1iqxbmk"), Object(n.g)(D, "class", "option svelte-1iqxbmk"), Object(n.g)(Z, "class", "svelte-1iqxbmk"); }, m(z, K) { Object(n.E)(z, t, K), Object(n.d)(t, r), Object(n.d)(t, i), Object(n.d)(t, o), Object(n.d)(o, a), Object(n.d)(a, s), Object(n.d)(o, c), Object(n.d)(c, l), Object(n.d)(o, u), Object(n.d)(u, d), Object(n.d)(o, p), Object(n.d)(p, h), Object(n.N)(o, e[0].cloudVariables.mode, !0), Object(n.E)(z, f, K), ue && ue.m(z, K), Object(n.E)(z, b, K), de && de.m(z, K), Object(n.E)(z, m, K), Object(n.E)(z, g, K), Object(n.d)(g, v), Object(n.E)(z, j, K), Object(n.E)(z, y, K), Object(n.d)(y, w), Object(n.E)(z, k, K), Object(n.E)(z, O, K), Object(n.d)(O, _), Object(n.E)(z, A, K), Object(n.E)(z, x, K), Object(n.d)(x, S), Object(n.E)(z, E, K), Object(n.E)(z, C, K), Object(n.d)(C, I), Object(n.d)(I, T), (T.checked = e[0].cloudVariables.specialCloudBehaviors), Object(n.d)(I, P), Object(n.d)(I, R), Object(n.d)(C, L), Object(n.H)(B, C, null), Object(n.E)(z, U, K), Object(n.E)(z, D, K), Object(n.d)(D, N), Object(n.d)(N, M), (M.checked = e[0].cloudVariables.unsafeCloudBehaviors), Object(n.d)(N, $), Object(n.d)(N, F), Object(n.d)(D, H), Object(n.H)(W, D, null), Object(n.E)(z, q, K), pe && pe.m(z, K), Object(n.E)(z, V, K), Object(n.E)(z, Z, K), Object(n.d)(Z, Y), (G = !0), Q || ((J = [ Object(n.G)(o, "change", e[71]), Object(n.G)(T, "change", e[74]), Object(n.G)(M, "change", e[75]), ]), (Q = !0)); }, p(e, t) { (!G || 128 & t[0]) && K !== (K = e[7]("options.mode") + "") && Object(n.Q)(r, K), (!G || 128 & t[0]) && X !== (X = e[7]("options.cloudVariables-ws") + "") && Object(n.Q)(s, X), (!G || 128 & t[0]) && ee !== (ee = e[7]("options.cloudVariables-local") + "") && Object(n.Q)(l, ee), (!G || 128 & t[0]) && te !== (te = e[7]("options.cloudVariables-ignore") + "") && Object(n.Q)(d, te), (!G || 128 & t[0]) && re !== (re = e[7]("options.cloudVariables-custom") + "") && Object(n.Q)(h, re), 1 & t[0] && Object(n.N)(o, e[0].cloudVariables.mode), "custom" === e[0].cloudVariables.mode ? ue ? (ue.p(e, t), 1 & t[0] && Object(n.cb)(ue, 1)) : ((ue = rt(e)), ue.c(), Object(n.cb)(ue, 1), ue.m(b.parentNode, b)) : ue && (Object(n.z)(), Object(n.db)(ue, 1, 1, () => { ue = null; }), Object(n.k)()), "ws" === e[0].cloudVariables.mode || "custom" === e[0].cloudVariables.mode ? de ? (de.p(e, t), 1 & t[0] && Object(n.cb)(de, 1)) : ((de = it(e)), de.c(), Object(n.cb)(de, 1), de.m(m.parentNode, m)) : de && (Object(n.z)(), Object(n.db)(de, 1, 1, () => { de = null; }), Object(n.k)()), (!G || 128 & t[0]) && ne !== (ne = e[7]("options.cloudVariables-ws-help") + "") && Object(n.Q)(v, ne), (!G || 128 & t[0]) && ie !== (ie = e[7]("options.cloudVariables-local-help") + "") && Object(n.Q)(w, ie), (!G || 128 & t[0]) && oe !== (oe = e[7]("options.cloudVariables-ignore-help") + "") && Object(n.Q)(_, oe), (!G || 128 & t[0]) && ae !== (ae = e[7]("options.cloudVariables-custom-help") + "") && Object(n.Q)(S, ae), 1 & t[0] && (T.checked = e[0].cloudVariables.specialCloudBehaviors), (!G || 128 & t[0]) && se !== (se = e[7]("options.specialCloudBehaviors") + "") && Object(n.Q)(R, se), 1 & t[0] && (M.checked = e[0].cloudVariables.unsafeCloudBehaviors), (!G || 128 & t[0]) && ce !== (ce = e[7]("options.unsafeCloudBehaviors") + "") && Object(n.Q)(F, ce), e[0].cloudVariables.unsafeCloudBehaviors ? pe ? pe.p(e, t) : ((pe = ot(e)), pe.c(), pe.m(V.parentNode, V)) : pe && (pe.d(1), (pe = null)), (!G || 128 & t[0]) && le !== (le = e[7]("options.implicitCloudHint").replace( "{cloud}", "☁" ) + "") && Object(n.Q)(Y, le); }, i(e) { G || (Object(n.cb)(ue), Object(n.cb)(de), Object(n.cb)(B.$$.fragment, e), Object(n.cb)(W.$$.fragment, e), (G = !0)); }, o(e) { Object(n.db)(ue), Object(n.db)(de), Object(n.db)(B.$$.fragment, e), Object(n.db)(W.$$.fragment, e), (G = !1); }, d(e) { e && Object(n.u)(t), e && Object(n.u)(f), ue && ue.d(e), e && Object(n.u)(b), de && de.d(e), e && Object(n.u)(m), e && Object(n.u)(g), e && Object(n.u)(j), e && Object(n.u)(y), e && Object(n.u)(k), e && Object(n.u)(O), e && Object(n.u)(A), e && Object(n.u)(x), e && Object(n.u)(E), e && Object(n.u)(C), Object(n.s)(B), e && Object(n.u)(U), e && Object(n.u)(D), Object(n.s)(W), e && Object(n.u)(q), pe && pe.d(e), e && Object(n.u)(V), e && Object(n.u)(Z), (Q = !1), Object(n.L)(J); }, }; } function rt(e) { let t, r, i, o = e[8], s = []; for (let t = 0; t < o.length; t += 1) s[t] = nt(Ve(e, o, t)); return { c() { t = Object(n.v)("div"); for (let e = 0; e < s.length; e += 1) s[e].c(); }, m(e, r) { Object(n.E)(e, t, r); for (let e = 0; e < s.length; e += 1) s[e] && s[e].m(t, null); i = !0; }, p(e, r) { if (385 & r[0]) { let n; for (o = e[8], n = 0; n < o.length; n += 1) { const i = Ve(e, o, n); s[n] ? s[n].p(i, r) : ((s[n] = nt(i)), s[n].c(), s[n].m(t, null)); } for (; n < s.length; n += 1) s[n].d(1); s.length = o.length; } }, i(e) { i || (e && Object(n.c)(() => { i && (r || (r = Object(n.n)(t, a.a, {}, !0)), r.run(1)); }), (i = !0)); }, o(e) { e && (r || (r = Object(n.n)(t, a.a, {}, !1)), r.run(0)), (i = !1); }, d(e) { e && Object(n.u)(t), Object(n.t)(s, e), e && r && r.end(); }, }; } function nt(e) { let t, r, i, o, a, s, c, l, u, d, p, h, f, b = e[7]("options.cloudVariables-ws") + "", m = e[7]("options.cloudVariables-local") + "", g = e[7]("options.cloudVariables-ignore") + "", v = e[112] + ""; function j() { e[72].call(r, e[112]); } return { c() { (t = Object(n.v)("label")), (r = Object(n.v)("select")), (i = Object(n.v)("option")), (o = Object(n.Y)(b)), (a = Object(n.v)("option")), (s = Object(n.Y)(m)), (c = Object(n.v)("option")), (l = Object(n.Y)(g)), (u = Object(n.U)()), (d = Object(n.Y)(v)), (p = Object(n.U)()), (i.__value = "ws"), (i.value = i.__value), (a.__value = "local"), (a.value = a.__value), (c.__value = ""), (c.value = c.__value), void 0 === e[0].cloudVariables.custom[e[112]] && Object(n.c)(j), Object(n.g)(t, "class", "option svelte-1iqxbmk"); }, m(b, m) { Object(n.E)(b, t, m), Object(n.d)(t, r), Object(n.d)(r, i), Object(n.d)(i, o), Object(n.d)(r, a), Object(n.d)(a, s), Object(n.d)(r, c), Object(n.d)(c, l), Object(n.N)(r, e[0].cloudVariables.custom[e[112]], !0), Object(n.d)(t, u), Object(n.d)(t, d), Object(n.d)(t, p), h || ((f = Object(n.G)(r, "change", j)), (h = !0)); }, p(t, i) { (e = t), 128 & i[0] && b !== (b = e[7]("options.cloudVariables-ws") + "") && Object(n.Q)(o, b), 128 & i[0] && m !== (m = e[7]("options.cloudVariables-local") + "") && Object(n.Q)(s, m), 128 & i[0] && g !== (g = e[7]("options.cloudVariables-ignore") + "") && Object(n.Q)(l, g), 257 & i[0] && Object(n.N)(r, e[0].cloudVariables.custom[e[112]]); }, d(e) { e && Object(n.u)(t), (h = !1), f(); }, }; } function it(e) { let t, r, i, o, s, c, l, u, d, p = e[7]("options.cloudVariablesHost") + ""; return { c() { (t = Object(n.v)("div")), (r = Object(n.v)("label")), (i = Object(n.Y)(p)), (o = Object(n.U)()), (s = Object(n.v)("input")), Object(n.g)(s, "type", "text"), Object(n.g)(s, "pattern", "wss?:.*"), Object(n.g)(s, "class", "svelte-1iqxbmk"), Object(n.g)(r, "class", "option svelte-1iqxbmk"); }, m(a, c) { Object(n.E)(a, t, c), Object(n.d)(t, r), Object(n.d)(r, i), Object(n.d)(r, o), Object(n.d)(r, s), Object(n.R)(s, e[0].cloudVariables.cloudHost), (l = !0), u || ((d = Object(n.G)(s, "input", e[73])), (u = !0)); }, p(e, t) { (!l || 128 & t[0]) && p !== (p = e[7]("options.cloudVariablesHost") + "") && Object(n.Q)(i, p), 1 & t[0] && s.value !== e[0].cloudVariables.cloudHost && Object(n.R)(s, e[0].cloudVariables.cloudHost); }, i(e) { l || (e && Object(n.c)(() => { l && (c || (c = Object(n.n)(t, a.a, {}, !0)), c.run(1)); }), (l = !0)); }, o(e) { e && (c || (c = Object(n.n)(t, a.a, {}, !1)), c.run(0)), (l = !1); }, d(e) { e && Object(n.u)(t), e && c && c.end(), (u = !1), d(); }, }; } function ot(e) { let t, r, i = e[7]("options.unsafeCloudBehaviorsWarning") + ""; return { c() { (t = Object(n.v)("p")), (r = Object(n.Y)(i)), Object(n.g)(t, "class", "warning svelte-1iqxbmk"); }, m(e, i) { Object(n.E)(e, t, i), Object(n.d)(t, r); }, p(e, t) { 128 & t[0] && i !== (i = e[7]("options.unsafeCloudBehaviorsWarning") + "") && Object(n.Q)(r, i); }, d(e) { e && Object(n.u)(t); }, }; } function at(e) { let t, r, i, o, a, s, c, l = e[7]("options.cloudVariables") + ""; const u = [tt, et], d = []; return ( (a = (function (e, t) { return e[8].length > 0 ? 0 : 1; })(e)), (s = d[a] = u[a](e)), { c() { (t = Object(n.v)("div")), (r = Object(n.v)("h2")), (i = Object(n.Y)(l)), (o = Object(n.U)()), s.c(); }, m(e, s) { Object(n.E)(e, t, s), Object(n.d)(t, r), Object(n.d)(r, i), Object(n.d)(t, o), d[a].m(t, null), (c = !0); }, p(e, t) { (!c || 128 & t[0]) && l !== (l = e[7]("options.cloudVariables") + "") && Object(n.Q)(i, l), s.p(e, t); }, i(e) { c || (Object(n.cb)(s), (c = !0)); }, o(e) { Object(n.db)(s), (c = !1); }, d(e) { e && Object(n.u)(t), d[a].d(); }, } ); } function st(e) { let t, r, i, o, a, s, c, l, u, d, p, h, f, b, m, g, v, j, y, w, k, O, A, x, S, E, C, I, T, P, R, L, B, U, D, N, M, $, F, H, W, q, V, Z, Y, G, Q, J, K, X, ee, te, re, ne, ie, oe, ae, se, ce, le, ue, de, pe, he, fe, be, me, ge, ve, je, ye, we = e[7]("options.advancedOptions") + "", ke = e[7]("options.advancedSummary") + "", Oe = e[7]("options.enableCompiler") + "", _e = e[7]("options.warpTimer") + "", Ae = e[7]("options.customExtensions") + "", xe = e[7]("options.customExtensionsSecurity") + "", Se = e[7]("options.bakeExtensions") + "", Ee = e[7]("options.customCSS") + "", ze = e[7]("options.customJS") + "", Ce = e[7]("options.projectId") + "", Ie = e[7]("options.projectIdHelp") + "", Te = e[7]("options.packagedRuntime") + "", Pe = e[7]("options.maxTextureDimension") + ""; function Re(t) { e[79](t); } (m = new z({ props: { slug: "disable-compiler" } })), (A = new z({ props: { slug: "warp-timer" } })), (I = new z({ props: { slug: "development/custom-extensions" } })); let Le = {}; return ( void 0 !== e[0].extensions && (Le.extensions = e[0].extensions), (P = new _({ props: Le })), n.i.push(() => Object(n.h)(P, "extensions", Re)), { c() { (t = Object(n.v)("div")), (r = Object(n.v)("h2")), (i = Object(n.Y)(we)), (o = Object(n.U)()), (a = Object(n.v)("details")), (s = Object(n.v)("summary")), (c = Object(n.Y)(ke)), (l = Object(n.U)()), (u = Object(n.v)("div")), (d = Object(n.v)("label")), (p = Object(n.v)("input")), (h = Object(n.U)()), (f = Object(n.Y)(Oe)), (b = Object(n.U)()), Object(n.o)(m.$$.fragment), (g = Object(n.U)()), (v = Object(n.v)("div")), (j = Object(n.v)("label")), (y = Object(n.v)("input")), (w = Object(n.U)()), (k = Object(n.Y)(_e)), (O = Object(n.U)()), Object(n.o)(A.$$.fragment), (x = Object(n.U)()), (S = Object(n.v)("label")), (E = Object(n.Y)(Ae)), (C = Object(n.U)()), Object(n.o)(I.$$.fragment), (T = Object(n.U)()), Object(n.o)(P.$$.fragment), (L = Object(n.U)()), (B = Object(n.v)("p")), (U = Object(n.Y)(xe)), (D = Object(n.U)()), (N = Object(n.v)("label")), (M = Object(n.v)("input")), ($ = Object(n.U)()), (F = Object(n.Y)(Se)), (H = Object(n.U)()), (W = Object(n.v)("label")), (q = Object(n.Y)(Ee)), (V = Object(n.U)()), (Z = Object(n.v)("textarea")), (Y = Object(n.U)()), (G = Object(n.v)("label")), (Q = Object(n.Y)(ze)), (J = Object(n.U)()), (K = Object(n.v)("textarea")), (X = Object(n.U)()), (ee = Object(n.v)("label")), (te = Object(n.Y)(Ce)), (re = Object(n.U)()), (ne = Object(n.v)("input")), (ie = Object(n.U)()), (oe = Object(n.v)("p")), (ae = Object(n.Y)(Ie)), (se = Object(n.U)()), (ce = Object(n.v)("label")), (le = Object(n.v)("input")), (ue = Object(n.U)()), (de = Object(n.Y)(Te)), (pe = Object(n.U)()), (he = Object(n.v)("label")), (fe = Object(n.v)("input")), (me = Object(n.U)()), (ge = Object(n.Y)(Pe)), Object(n.g)(p, "type", "checkbox"), Object(n.g)(p, "class", "svelte-1iqxbmk"), Object(n.g)(u, "class", "option svelte-1iqxbmk"), Object(n.g)(y, "type", "checkbox"), Object(n.g)(y, "class", "svelte-1iqxbmk"), Object(n.g)(v, "class", "option svelte-1iqxbmk"), Object(n.g)(B, "class", "warning svelte-1iqxbmk"), Object(n.g)(S, "class", "option svelte-1iqxbmk"), Object(n.g)(M, "type", "checkbox"), Object(n.g)(M, "class", "svelte-1iqxbmk"), Object(n.g)(N, "class", "option svelte-1iqxbmk"), Object(n.g)(Z, "class", "svelte-1iqxbmk"), Object(n.g)(W, "class", "option svelte-1iqxbmk"), Object(n.g)(K, "class", "svelte-1iqxbmk"), Object(n.g)(G, "class", "option svelte-1iqxbmk"), Object(n.g)(ne, "type", "text"), Object(n.g)(ne, "class", "svelte-1iqxbmk"), Object(n.g)(ee, "class", "option svelte-1iqxbmk"), Object(n.g)(oe, "class", "svelte-1iqxbmk"), Object(n.g)(le, "type", "checkbox"), Object(n.g)(le, "class", "svelte-1iqxbmk"), Object(n.g)(ce, "class", "option svelte-1iqxbmk"), Object(n.g)(fe, "type", "checkbox"), (fe.checked = be = e[0].maxTextureDimension !== e[5].maxTextureDimension), Object(n.g)(fe, "class", "svelte-1iqxbmk"), Object(n.g)(he, "class", "option svelte-1iqxbmk"), (a.open = e[15]); }, m(_, z) { Object(n.E)(_, t, z), Object(n.d)(t, r), Object(n.d)(r, i), Object(n.d)(t, o), Object(n.d)(t, a), Object(n.d)(a, s), Object(n.d)(s, c), Object(n.d)(a, l), Object(n.d)(a, u), Object(n.d)(u, d), Object(n.d)(d, p), (p.checked = e[0].compiler.enabled), Object(n.d)(d, h), Object(n.d)(d, f), Object(n.d)(u, b), Object(n.H)(m, u, null), Object(n.d)(a, g), Object(n.d)(a, v), Object(n.d)(v, j), Object(n.d)(j, y), (y.checked = e[0].compiler.warpTimer), Object(n.d)(j, w), Object(n.d)(j, k), Object(n.d)(v, O), Object(n.H)(A, v, null), Object(n.d)(a, x), Object(n.d)(a, S), Object(n.d)(S, E), Object(n.d)(S, C), Object(n.H)(I, S, null), Object(n.d)(S, T), Object(n.H)(P, S, null), Object(n.d)(S, L), Object(n.d)(S, B), Object(n.d)(B, U), Object(n.d)(a, D), Object(n.d)(a, N), Object(n.d)(N, M), (M.checked = e[0].bakeExtensions), Object(n.d)(N, $), Object(n.d)(N, F), Object(n.d)(a, H), Object(n.d)(a, W), Object(n.d)(W, q), Object(n.d)(W, V), Object(n.d)(W, Z), Object(n.R)(Z, e[0].custom.css), Object(n.d)(a, Y), Object(n.d)(a, G), Object(n.d)(G, Q), Object(n.d)(G, J), Object(n.d)(G, K), Object(n.R)(K, e[0].custom.js), Object(n.d)(a, X), Object(n.d)(a, ee), Object(n.d)(ee, te), Object(n.d)(ee, re), Object(n.d)(ee, ne), Object(n.R)(ne, e[0].projectId), Object(n.d)(a, ie), Object(n.d)(a, oe), Object(n.d)(oe, ae), Object(n.d)(a, se), Object(n.d)(a, ce), Object(n.d)(ce, le), (le.checked = e[0].packagedRuntime), Object(n.d)(ce, ue), Object(n.d)(ce, de), Object(n.d)(a, pe), Object(n.d)(a, he), Object(n.d)(he, fe), Object(n.d)(he, me), Object(n.d)(he, ge), (ve = !0), je || ((ye = [ Object(n.G)(p, "change", e[77]), Object(n.G)(y, "change", e[78]), Object(n.G)(M, "change", e[80]), Object(n.G)(Z, "input", e[81]), Object(n.G)(K, "input", e[82]), Object(n.G)(ne, "input", e[83]), Object(n.G)(le, "change", e[84]), Object(n.G)(fe, "change", e[85]), ]), (je = !0)); }, p(e, t) { (!ve || 128 & t[0]) && we !== (we = e[7]("options.advancedOptions") + "") && Object(n.Q)(i, we), (!ve || 128 & t[0]) && ke !== (ke = e[7]("options.advancedSummary") + "") && Object(n.Q)(c, ke), 1 & t[0] && (p.checked = e[0].compiler.enabled), (!ve || 128 & t[0]) && Oe !== (Oe = e[7]("options.enableCompiler") + "") && Object(n.Q)(f, Oe), 1 & t[0] && (y.checked = e[0].compiler.warpTimer), (!ve || 128 & t[0]) && _e !== (_e = e[7]("options.warpTimer") + "") && Object(n.Q)(k, _e), (!ve || 128 & t[0]) && Ae !== (Ae = e[7]("options.customExtensions") + "") && Object(n.Q)(E, Ae); const r = {}; !R && 1 & t[0] && ((R = !0), (r.extensions = e[0].extensions), Object(n.b)(() => (R = !1))), P.$set(r), (!ve || 128 & t[0]) && xe !== (xe = e[7]("options.customExtensionsSecurity") + "") && Object(n.Q)(U, xe), 1 & t[0] && (M.checked = e[0].bakeExtensions), (!ve || 128 & t[0]) && Se !== (Se = e[7]("options.bakeExtensions") + "") && Object(n.Q)(F, Se), (!ve || 128 & t[0]) && Ee !== (Ee = e[7]("options.customCSS") + "") && Object(n.Q)(q, Ee), 1 & t[0] && Object(n.R)(Z, e[0].custom.css), (!ve || 128 & t[0]) && ze !== (ze = e[7]("options.customJS") + "") && Object(n.Q)(Q, ze), 1 & t[0] && Object(n.R)(K, e[0].custom.js), (!ve || 128 & t[0]) && Ce !== (Ce = e[7]("options.projectId") + "") && Object(n.Q)(te, Ce), 1 & t[0] && ne.value !== e[0].projectId && Object(n.R)(ne, e[0].projectId), (!ve || 128 & t[0]) && Ie !== (Ie = e[7]("options.projectIdHelp") + "") && Object(n.Q)(ae, Ie), 1 & t[0] && (le.checked = e[0].packagedRuntime), (!ve || 128 & t[0]) && Te !== (Te = e[7]("options.packagedRuntime") + "") && Object(n.Q)(de, Te), (!ve || (33 & t[0] && be !== (be = e[0].maxTextureDimension !== e[5].maxTextureDimension))) && (fe.checked = be), (!ve || 128 & t[0]) && Pe !== (Pe = e[7]("options.maxTextureDimension") + "") && Object(n.Q)(ge, Pe); }, i(e) { ve || (Object(n.cb)(m.$$.fragment, e), Object(n.cb)(A.$$.fragment, e), Object(n.cb)(I.$$.fragment, e), Object(n.cb)(P.$$.fragment, e), (ve = !0)); }, o(e) { Object(n.db)(m.$$.fragment, e), Object(n.db)(A.$$.fragment, e), Object(n.db)(I.$$.fragment, e), Object(n.db)(P.$$.fragment, e), (ve = !1); }, d(e) { e && Object(n.u)(t), Object(n.s)(m), Object(n.s)(A), Object(n.s)(I), Object(n.s)(P), (je = !1), Object(n.L)(ye); }, } ); } function ct(e) { let t, r, i, o, a, s, c, l, u, d, p, h, f, b, m, g, v, j, y, w, k, O, _, A, x, S, E, z, C, I, T, P, R, L, B, U, D, N, M, $, F, H, W, q, V, Z, Y, G, Q, J, K, X, ee, te, re, ne, ie, oe, ae, se, ce, le, ue, de, pe, he, fe, be, me, ge, ve, je, ye, we, ke, Oe, _e, Ae, xe = e[7]("options.environment") + "", Se = e[7]("options.html") + "", Ee = e[7]("options.zip") + "", ze = e[7]("options.application-win32").replace( "{type}", "Electron" ) + "", Ce = e[7]("options.application-mac").replace("{type}", "WKWebView") + "", Ie = e[7]("options.application-linux64").replace( "{type}", "Electron" ) + "", Te = e[7]("options.otherEnvironments") + "", Pe = e[7]("options.otherEnvironmentsHelp") + "", Re = e[7]("options.zip-one-asset") + "", Le = e[7]("options.application-win64").replace( "{type}", "Electron" ) + "", Be = e[7]("options.application-mac").replace("{type}", "Electron") + "", Ue = e[7]("options.application-win32").replace("{type}", "NW.js") + "", De = e[7]("options.application-win64").replace("{type}", "NW.js") + "", Ne = e[7]("options.application-mac").replace("{type}", "NW.js") + "", Me = e[7]("options.application-linux64").replace("{type}", "NW.js") + ""; return ( (Oe = Object(n.D)(e[39][1])), { c() { (t = Object(n.v)("div")), (r = Object(n.v)("h2")), (i = Object(n.Y)(xe)), (o = Object(n.U)()), (a = Object(n.v)("div")), (s = Object(n.v)("label")), (c = Object(n.v)("input")), (l = Object(n.U)()), (u = Object(n.Y)(Se)), (d = Object(n.U)()), (p = Object(n.v)("label")), (h = Object(n.v)("input")), (f = Object(n.U)()), (b = Object(n.Y)(Ee)), (m = Object(n.U)()), (g = Object(n.v)("div")), (v = Object(n.v)("label")), (j = Object(n.v)("input")), (y = Object(n.U)()), (w = Object(n.Y)(ze)), (k = Object(n.U)()), (O = Object(n.v)("label")), (_ = Object(n.v)("input")), (A = Object(n.U)()), (x = Object(n.Y)(Ce)), (S = Object(n.U)()), (E = Object(n.v)("label")), (z = Object(n.v)("input")), (C = Object(n.U)()), (I = Object(n.Y)(Ie)), (T = Object(n.U)()), (P = Object(n.v)("details")), (R = Object(n.v)("summary")), (L = Object(n.Y)(Te)), (B = Object(n.U)()), (U = Object(n.v)("p")), (D = Object(n.Y)(Pe)), (N = Object(n.U)()), (M = Object(n.v)("div")), ($ = Object(n.v)("label")), (F = Object(n.v)("input")), (H = Object(n.U)()), (W = Object(n.Y)(Re)), (q = Object(n.U)()), (V = Object(n.v)("div")), (Z = Object(n.v)("label")), (Y = Object(n.v)("input")), (G = Object(n.U)()), (Q = Object(n.Y)(Le)), (J = Object(n.U)()), (K = Object(n.v)("label")), (X = Object(n.v)("input")), (ee = Object(n.U)()), (te = Object(n.Y)(Be)), (re = Object(n.U)()), (ne = Object(n.v)("div")), (ie = Object(n.v)("label")), (oe = Object(n.v)("input")), (ae = Object(n.U)()), (se = Object(n.Y)(Ue)), (ce = Object(n.U)()), (le = Object(n.v)("label")), (ue = Object(n.v)("input")), (de = Object(n.U)()), (pe = Object(n.Y)(De)), (he = Object(n.U)()), (fe = Object(n.v)("label")), (be = Object(n.v)("input")), (me = Object(n.U)()), (ge = Object(n.Y)(Ne)), (ve = Object(n.U)()), (je = Object(n.v)("label")), (ye = Object(n.v)("input")), (we = Object(n.U)()), (ke = Object(n.Y)(Me)), Object(n.g)(c, "type", "radio"), Object(n.g)(c, "name", "environment"), (c.__value = "html"), (c.value = c.__value), Object(n.g)(c, "class", "svelte-1iqxbmk"), Object(n.g)(s, "class", "option svelte-1iqxbmk"), Object(n.g)(h, "type", "radio"), Object(n.g)(h, "name", "environment"), (h.__value = "zip"), (h.value = h.__value), Object(n.g)(h, "class", "svelte-1iqxbmk"), Object(n.g)(p, "class", "option svelte-1iqxbmk"), Object(n.g)(a, "class", "group svelte-1iqxbmk"), Object(n.g)(j, "type", "radio"), Object(n.g)(j, "name", "environment"), (j.__value = "electron-win32"), (j.value = j.__value), Object(n.g)(j, "class", "svelte-1iqxbmk"), Object(n.g)(v, "class", "option svelte-1iqxbmk"), Object(n.g)(_, "type", "radio"), Object(n.g)(_, "name", "environment"), (_.__value = "webview-mac"), (_.value = _.__value), Object(n.g)(_, "class", "svelte-1iqxbmk"), Object(n.g)(O, "class", "option svelte-1iqxbmk"), Object(n.g)(z, "type", "radio"), Object(n.g)(z, "name", "environment"), (z.__value = "electron-linux64"), (z.value = z.__value), Object(n.g)(z, "class", "svelte-1iqxbmk"), Object(n.g)(E, "class", "option svelte-1iqxbmk"), Object(n.g)(g, "class", "group svelte-1iqxbmk"), Object(n.g)(U, "class", "svelte-1iqxbmk"), Object(n.g)(F, "type", "radio"), Object(n.g)(F, "name", "environment"), (F.__value = "zip-one-asset"), (F.value = F.__value), Object(n.g)(F, "class", "svelte-1iqxbmk"), Object(n.g)($, "class", "option svelte-1iqxbmk"), Object(n.g)(M, "class", "group svelte-1iqxbmk"), Object(n.g)(Y, "type", "radio"), Object(n.g)(Y, "name", "environment"), (Y.__value = "electron-win64"), (Y.value = Y.__value), Object(n.g)(Y, "class", "svelte-1iqxbmk"), Object(n.g)(Z, "class", "option svelte-1iqxbmk"), Object(n.g)(X, "type", "radio"), Object(n.g)(X, "name", "environment"), (X.__value = "electron-mac"), (X.value = X.__value), Object(n.g)(X, "class", "svelte-1iqxbmk"), Object(n.g)(K, "class", "option svelte-1iqxbmk"), Object(n.g)(V, "class", "group svelte-1iqxbmk"), Object(n.g)(oe, "type", "radio"), Object(n.g)(oe, "name", "environment"), (oe.__value = "nwjs-win32"), (oe.value = oe.__value), Object(n.g)(oe, "class", "svelte-1iqxbmk"), Object(n.g)(ie, "class", "option svelte-1iqxbmk"), Object(n.g)(ue, "type", "radio"), Object(n.g)(ue, "name", "environment"), (ue.__value = "nwjs-win64"), (ue.value = ue.__value), Object(n.g)(ue, "class", "svelte-1iqxbmk"), Object(n.g)(le, "class", "option svelte-1iqxbmk"), Object(n.g)(be, "type", "radio"), Object(n.g)(be, "name", "environment"), (be.__value = "nwjs-mac"), (be.value = be.__value), Object(n.g)(be, "class", "svelte-1iqxbmk"), Object(n.g)(fe, "class", "option svelte-1iqxbmk"), Object(n.g)(ye, "type", "radio"), Object(n.g)(ye, "name", "environment"), (ye.__value = "nwjs-linux-x64"), (ye.value = ye.__value), Object(n.g)(ye, "class", "svelte-1iqxbmk"), Object(n.g)(je, "class", "option svelte-1iqxbmk"), Object(n.g)(ne, "class", "group svelte-1iqxbmk"), (P.open = e[14]), Oe.p(c, h, j, _, z, F, Y, X, oe, ue, be, ye); }, m(Oe, xe) { Object(n.E)(Oe, t, xe), Object(n.d)(t, r), Object(n.d)(r, i), Object(n.d)(t, o), Object(n.d)(t, a), Object(n.d)(a, s), Object(n.d)(s, c), (c.checked = c.__value === e[0].target), Object(n.d)(s, l), Object(n.d)(s, u), Object(n.d)(a, d), Object(n.d)(a, p), Object(n.d)(p, h), (h.checked = h.__value === e[0].target), Object(n.d)(p, f), Object(n.d)(p, b), Object(n.d)(t, m), Object(n.d)(t, g), Object(n.d)(g, v), Object(n.d)(v, j), (j.checked = j.__value === e[0].target), Object(n.d)(v, y), Object(n.d)(v, w), Object(n.d)(g, k), Object(n.d)(g, O), Object(n.d)(O, _), (_.checked = _.__value === e[0].target), Object(n.d)(O, A), Object(n.d)(O, x), Object(n.d)(g, S), Object(n.d)(g, E), Object(n.d)(E, z), (z.checked = z.__value === e[0].target), Object(n.d)(E, C), Object(n.d)(E, I), Object(n.d)(t, T), Object(n.d)(t, P), Object(n.d)(P, R), Object(n.d)(R, L), Object(n.d)(P, B), Object(n.d)(P, U), Object(n.d)(U, D), Object(n.d)(P, N), Object(n.d)(P, M), Object(n.d)(M, $), Object(n.d)($, F), (F.checked = F.__value === e[0].target), Object(n.d)($, H), Object(n.d)($, W), Object(n.d)(P, q), Object(n.d)(P, V), Object(n.d)(V, Z), Object(n.d)(Z, Y), (Y.checked = Y.__value === e[0].target), Object(n.d)(Z, G), Object(n.d)(Z, Q), Object(n.d)(V, J), Object(n.d)(V, K), Object(n.d)(K, X), (X.checked = X.__value === e[0].target), Object(n.d)(K, ee), Object(n.d)(K, te), Object(n.d)(P, re), Object(n.d)(P, ne), Object(n.d)(ne, ie), Object(n.d)(ie, oe), (oe.checked = oe.__value === e[0].target), Object(n.d)(ie, ae), Object(n.d)(ie, se), Object(n.d)(ne, ce), Object(n.d)(ne, le), Object(n.d)(le, ue), (ue.checked = ue.__value === e[0].target), Object(n.d)(le, de), Object(n.d)(le, pe), Object(n.d)(ne, he), Object(n.d)(ne, fe), Object(n.d)(fe, be), (be.checked = be.__value === e[0].target), Object(n.d)(fe, me), Object(n.d)(fe, ge), Object(n.d)(ne, ve), Object(n.d)(ne, je), Object(n.d)(je, ye), (ye.checked = ye.__value === e[0].target), Object(n.d)(je, we), Object(n.d)(je, ke), _e || ((Ae = [ Object(n.G)(c, "change", e[87]), Object(n.G)(h, "change", e[88]), Object(n.G)(j, "change", e[89]), Object(n.G)(_, "change", e[90]), Object(n.G)(z, "change", e[91]), Object(n.G)(F, "change", e[92]), Object(n.G)(Y, "change", e[93]), Object(n.G)(X, "change", e[94]), Object(n.G)(oe, "change", e[95]), Object(n.G)(ue, "change", e[96]), Object(n.G)(be, "change", e[97]), Object(n.G)(ye, "change", e[98]), ]), (_e = !0)); }, p(e, t) { 128 & t[0] && xe !== (xe = e[7]("options.environment") + "") && Object(n.Q)(i, xe), 1 & t[0] && (c.checked = c.__value === e[0].target), 128 & t[0] && Se !== (Se = e[7]("options.html") + "") && Object(n.Q)(u, Se), 1 & t[0] && (h.checked = h.__value === e[0].target), 128 & t[0] && Ee !== (Ee = e[7]("options.zip") + "") && Object(n.Q)(b, Ee), 1 & t[0] && (j.checked = j.__value === e[0].target), 128 & t[0] && ze !== (ze = e[7]("options.application-win32").replace( "{type}", "Electron" ) + "") && Object(n.Q)(w, ze), 1 & t[0] && (_.checked = _.__value === e[0].target), 128 & t[0] && Ce !== (Ce = e[7]("options.application-mac").replace( "{type}", "WKWebView" ) + "") && Object(n.Q)(x, Ce), 1 & t[0] && (z.checked = z.__value === e[0].target), 128 & t[0] && Ie !== (Ie = e[7]("options.application-linux64").replace( "{type}", "Electron" ) + "") && Object(n.Q)(I, Ie), 128 & t[0] && Te !== (Te = e[7]("options.otherEnvironments") + "") && Object(n.Q)(L, Te), 128 & t[0] && Pe !== (Pe = e[7]("options.otherEnvironmentsHelp") + "") && Object(n.Q)(D, Pe), 1 & t[0] && (F.checked = F.__value === e[0].target), 128 & t[0] && Re !== (Re = e[7]("options.zip-one-asset") + "") && Object(n.Q)(W, Re), 1 & t[0] && (Y.checked = Y.__value === e[0].target), 128 & t[0] && Le !== (Le = e[7]("options.application-win64").replace( "{type}", "Electron" ) + "") && Object(n.Q)(Q, Le), 1 & t[0] && (X.checked = X.__value === e[0].target), 128 & t[0] && Be !== (Be = e[7]("options.application-mac").replace( "{type}", "Electron" ) + "") && Object(n.Q)(te, Be), 1 & t[0] && (oe.checked = oe.__value === e[0].target), 128 & t[0] && Ue !== (Ue = e[7]("options.application-win32").replace( "{type}", "NW.js" ) + "") && Object(n.Q)(se, Ue), 1 & t[0] && (ue.checked = ue.__value === e[0].target), 128 & t[0] && De !== (De = e[7]("options.application-win64").replace( "{type}", "NW.js" ) + "") && Object(n.Q)(pe, De), 1 & t[0] && (be.checked = be.__value === e[0].target), 128 & t[0] && Ne !== (Ne = e[7]("options.application-mac").replace( "{type}", "NW.js" ) + "") && Object(n.Q)(ge, Ne), 1 & t[0] && (ye.checked = ye.__value === e[0].target), 128 & t[0] && Me !== (Me = e[7]("options.application-linux64").replace( "{type}", "NW.js" ) + "") && Object(n.Q)(ke, Me); }, d(e) { e && Object(n.u)(t), Oe.r(), (_e = !1), Object(n.L)(Ae); }, } ); } function lt(e) { let t, r, i, o; return ( (r = new s.a({ props: { accent: "#FF661A", reset: e[0].target.startsWith("zip") ? null : e[105], $$slots: { default: [Ot] }, $$scope: { ctx: e }, }, })), { c() { (t = Object(n.v)("div")), Object(n.o)(r.$$.fragment); }, m(e, i) { Object(n.E)(e, t, i), Object(n.H)(r, t, null), (o = !0); }, p(e, t) { const n = {}; 1 & t[0] && (n.reset = e[0].target.startsWith("zip") ? null : e[105]), (129 & t[0]) | (4194304 & t[3]) && (n.$$scope = { dirty: t, ctx: e }), r.$set(n); }, i(e) { o || (Object(n.cb)(r.$$.fragment, e), e && (i || Object(n.c)(() => { (i = Object(n.p)(t, a.a, {})), i.start(); })), (o = !0)); }, o(e) { Object(n.db)(r.$$.fragment, e), (o = !1); }, d(e) { e && Object(n.u)(t), Object(n.s)(r); }, } ); } function ut(e) { let t, r, i, o, a, s, c, l, u, d, p, h, f, b, m, g, v, j, y, w, k, O, _, A, x, S, E, z, C, I, T, P, R = e[7]("options.applicationSettings") + "", L = e[7]("options.packageName") + "", B = e[7]("options.packageNameHelp") + "", U = e[7]("options.version") + "", D = e[7]("options.versionHelp") + "", N = e[0].target.includes("electron"), M = N && pt(e); function $(e, t) { return ( 1 & t[0] && (_ = null), 1 & t[0] && (A = null), 1 & t[0] && (x = null), null == _ && (_ = !!e[0].target.includes("win")), _ ? bt : (null == A && (A = !!e[0].target.includes("mac")), A ? ft : (null == x && (x = !!e[0].target.includes("linux")), x ? ht : void 0)) ); } let F = $(e, [-1, -1, -1, -1]), H = F && F(e); function W(e, t) { return ( 1 & t[0] && (E = null), 1 & t[0] && (z = null), 1 & t[0] && (C = null), null == E && (E = !!e[0].target.includes("electron")), E ? vt : (null == z && (z = !!e[0].target.includes("nwjs")), z ? gt : (null == C && (C = !!e[0].target.includes("webview-mac")), C ? mt : void 0)) ); } let q = W(e, [-1, -1, -1, -1]), V = q && q(e); return { c() { (t = Object(n.v)("h2")), (r = Object(n.Y)(R)), (i = Object(n.U)()), (o = Object(n.v)("label")), (a = Object(n.Y)(L)), (s = Object(n.U)()), (c = Object(n.v)("input")), (l = Object(n.U)()), (u = Object(n.v)("p")), (d = Object(n.Y)(B)), (p = Object(n.U)()), (h = Object(n.v)("label")), (f = Object(n.Y)(U)), (b = Object(n.U)()), (m = Object(n.v)("input")), (g = Object(n.U)()), (v = Object(n.v)("p")), (j = Object(n.Y)(D)), (y = Object(n.U)()), M && M.c(), (w = Object(n.U)()), (k = Object(n.v)("div")), (k.innerHTML = "
Creating native applications for specific platforms is discouraged. In most cases, Plain HTML or Zip will have numerous advantages:
\n \n
If you don't truly need to make a self-contained application for each platform (we understand there are some cases where this is necessary), we recommend you don't.
"), (O = Object(n.U)()), H && H.c(), (S = Object(n.U)()), V && V.c(), (I = Object(n.w)()), Object(n.g)(c, "type", "text"), Object(n.g)(c, "pattern", "[a-zA-Z -]+"), Object(n.g)(c, "minlength", "1"), Object(n.g)(c, "class", "svelte-1iqxbmk"), Object(n.g)(o, "class", "option svelte-1iqxbmk"), Object(n.g)(u, "class", "svelte-1iqxbmk"), Object(n.g)(m, "type", "text"), Object(n.g)(m, "pattern", "\\d+\\.\\d+\\.\\d+"), Object(n.g)(m, "minlength", "1"), Object(n.g)(m, "class", "svelte-1iqxbmk"), Object(n.g)(h, "class", "option svelte-1iqxbmk"), Object(n.g)(v, "class", "svelte-1iqxbmk"), Object(n.g)(k, "class", "warning svelte-1iqxbmk"); }, m(_, A) { Object(n.E)(_, t, A), Object(n.d)(t, r), Object(n.E)(_, i, A), Object(n.E)(_, o, A), Object(n.d)(o, a), Object(n.d)(o, s), Object(n.d)(o, c), Object(n.R)(c, e[0].app.packageName), Object(n.E)(_, l, A), Object(n.E)(_, u, A), Object(n.d)(u, d), Object(n.E)(_, p, A), Object(n.E)(_, h, A), Object(n.d)(h, f), Object(n.d)(h, b), Object(n.d)(h, m), Object(n.R)(m, e[0].app.version), Object(n.E)(_, g, A), Object(n.E)(_, v, A), Object(n.d)(v, j), Object(n.E)(_, y, A), M && M.m(_, A), Object(n.E)(_, w, A), Object(n.E)(_, k, A), Object(n.E)(_, O, A), H && H.m(_, A), Object(n.E)(_, S, A), V && V.m(_, A), Object(n.E)(_, I, A), T || ((P = [ Object(n.G)(c, "input", e[100]), Object(n.G)(m, "input", e[101]), ]), (T = !0)); }, p(e, t) { 128 & t[0] && R !== (R = e[7]("options.applicationSettings") + "") && Object(n.Q)(r, R), 128 & t[0] && L !== (L = e[7]("options.packageName") + "") && Object(n.Q)(a, L), 1 & t[0] && c.value !== e[0].app.packageName && Object(n.R)(c, e[0].app.packageName), 128 & t[0] && B !== (B = e[7]("options.packageNameHelp") + "") && Object(n.Q)(d, B), 128 & t[0] && U !== (U = e[7]("options.version") + "") && Object(n.Q)(f, U), 1 & t[0] && m.value !== e[0].app.version && Object(n.R)(m, e[0].app.version), 128 & t[0] && D !== (D = e[7]("options.versionHelp") + "") && Object(n.Q)(j, D), 1 & t[0] && (N = e[0].target.includes("electron")), N ? M ? M.p(e, t) : ((M = pt(e)), M.c(), M.m(w.parentNode, w)) : M && (M.d(1), (M = null)), F !== (F = $(e, t)) && (H && H.d(1), (H = F && F(e)), H && (H.c(), H.m(S.parentNode, S))), q === (q = W(e, t)) && V ? V.p(e, t) : (V && V.d(1), (V = q && q(e)), V && (V.c(), V.m(I.parentNode, I))); }, d(e) { e && Object(n.u)(t), e && Object(n.u)(i), e && Object(n.u)(o), e && Object(n.u)(l), e && Object(n.u)(u), e && Object(n.u)(p), e && Object(n.u)(h), e && Object(n.u)(g), e && Object(n.u)(v), e && Object(n.u)(y), M && M.d(e), e && Object(n.u)(w), e && Object(n.u)(k), e && Object(n.u)(O), H && H.d(e), e && Object(n.u)(S), V && V.d(e), e && Object(n.u)(I), (T = !1), Object(n.L)(P); }, }; } function dt(e) { let t, r, i; return { c() { (t = Object(n.v)("h2")), (t.textContent = "Zip"), (r = Object(n.U)()), (i = Object(n.v)("p")), (i.textContent = 'The zip environment is intended to be used for publishing to a website. Other uses such as sending your project to a friend over a chat app or email should use "Plain HTML" instead as zip will not work.'), Object(n.g)(i, "class", "svelte-1iqxbmk"); }, m(e, o) { Object(n.E)(e, t, o), Object(n.E)(e, r, o), Object(n.E)(e, i, o); }, p: n.I, d(e) { e && Object(n.u)(t), e && Object(n.u)(r), e && Object(n.u)(i); }, }; } function pt(e) { let t, r, i, o, a, s, c, l, u, d, p, h, f, b, m, g, v, j, y = e[7]("options.startWindow") + "", w = e[7]("options.startMaximized") + "", k = e[7]("options.startFullscreen") + ""; return ( (g = Object(n.D)(e[39][0])), { c() { (t = Object(n.v)("div")), (r = Object(n.v)("label")), (i = Object(n.v)("input")), (o = Object(n.U)()), (a = Object(n.Y)(y)), (s = Object(n.U)()), (c = Object(n.v)("label")), (l = Object(n.v)("input")), (u = Object(n.U)()), (d = Object(n.Y)(w)), (p = Object(n.U)()), (h = Object(n.v)("label")), (f = Object(n.v)("input")), (b = Object(n.U)()), (m = Object(n.Y)(k)), Object(n.g)(i, "type", "radio"), Object(n.g)(i, "name", "app-window-mode"), (i.__value = "window"), (i.value = i.__value), Object(n.g)(i, "class", "svelte-1iqxbmk"), Object(n.g)(r, "class", "option svelte-1iqxbmk"), Object(n.g)(l, "type", "radio"), Object(n.g)(l, "name", "app-window-mode"), (l.__value = "maximize"), (l.value = l.__value), Object(n.g)(l, "class", "svelte-1iqxbmk"), Object(n.g)(c, "class", "option svelte-1iqxbmk"), Object(n.g)(f, "type", "radio"), Object(n.g)(f, "name", "app-window-mode"), (f.__value = "fullscreen"), (f.value = f.__value), Object(n.g)(f, "class", "svelte-1iqxbmk"), Object(n.g)(h, "class", "option svelte-1iqxbmk"), Object(n.g)(t, "class", "group svelte-1iqxbmk"), g.p(i, l, f); }, m(g, y) { Object(n.E)(g, t, y), Object(n.d)(t, r), Object(n.d)(r, i), (i.checked = i.__value === e[0].app.windowMode), Object(n.d)(r, o), Object(n.d)(r, a), Object(n.d)(t, s), Object(n.d)(t, c), Object(n.d)(c, l), (l.checked = l.__value === e[0].app.windowMode), Object(n.d)(c, u), Object(n.d)(c, d), Object(n.d)(t, p), Object(n.d)(t, h), Object(n.d)(h, f), (f.checked = f.__value === e[0].app.windowMode), Object(n.d)(h, b), Object(n.d)(h, m), v || ((j = [ Object(n.G)(i, "change", e[102]), Object(n.G)(l, "change", e[103]), Object(n.G)(f, "change", e[104]), ]), (v = !0)); }, p(e, t) { 1 & t[0] && (i.checked = i.__value === e[0].app.windowMode), 128 & t[0] && y !== (y = e[7]("options.startWindow") + "") && Object(n.Q)(a, y), 1 & t[0] && (l.checked = l.__value === e[0].app.windowMode), 128 & t[0] && w !== (w = e[7]("options.startMaximized") + "") && Object(n.Q)(d, w), 1 & t[0] && (f.checked = f.__value === e[0].app.windowMode), 128 & t[0] && k !== (k = e[7]("options.startFullscreen") + "") && Object(n.Q)(m, k); }, d(e) { e && Object(n.u)(t), g.r(), (v = !1), Object(n.L)(j); }, } ); } function ht(e) { let t; return { c() { (t = Object(n.v)("div")), (t.innerHTML = '

Linux

\n

Linux support is still experimental.

\n

Linux support in the packager is limited to 64-bit x86 apps (which will run on most desktops and laptops). 32-bit systems and ARM devices such as Raspberry Pis unfortunately are not supported yet.

'); }, m(e, r) { Object(n.E)(e, t, r); }, d(e) { e && Object(n.u)(t); }, }; } function ft(e) { let t; return { c() { (t = Object(n.v)("div")), (t.innerHTML = '

macOS

\n

Due to Apple policy, packaging for their platforms is troublesome. You either have to:

\n '); }, m(e, r) { Object(n.E)(e, t, r); }, d(e) { e && Object(n.u)(t); }, }; } function bt(e) { let t; return { c() { (t = Object(n.v)("div")), (t.innerHTML = '

Windows

\n

All Windows applications generated by this site are unsigned, so users will see SmartScreen warnings when they try to run it for the first time. They can bypass these warnings by pressing "More info" then "Run anyways".

\n

To change the icon of the executable file or create an installer program, download and run TurboWarp Packager Extras and select the output of this website.

'); }, m(e, r) { Object(n.E)(e, t, r); }, d(e) { e && Object(n.u)(t); }, }; } function mt(e) { let t; return { c() { (t = Object(n.v)("div")), (t.innerHTML = '

WKWebView

\n

WKWebView is the preferred way to package for macOS. It will be hundreds of MB smaller than the other macOS-specific environments and typically run the fastest.

\n

The app will run natively on both Intel and Apple silicon Macs running macOS 10.13 or later.

\n

Note that:

\n \n

Use the "Electron macOS Application" (inside Other environments) or "Plain HTML" environments instead if you encounter these issues.

'); }, m(e, r) { Object(n.E)(e, t, r); }, p: n.I, d(e) { e && Object(n.u)(t); }, }; } function gt(e) { let t, r, i, o, a, s, c, l, u, d = e[0].target.includes("mac"), p = d && jt(e); return { c() { (t = Object(n.v)("div")), (r = Object(n.v)("h2")), (r.textContent = "NW.js"), (i = Object(n.U)()), (o = Object(n.v)("p")), (o.textContent = "NW.js support is deprecated and may be removed in the future. Use the Electron environments instead. They're better in every way."), (a = Object(n.U)()), (s = Object(n.v)("p")), (s.textContent = "The NW.js environment works by embedding a copy of Chromium (the open source part of Google Chrome) along with your project, which means the app will be very large."), (c = Object(n.U)()), (l = Object(n.v)("p")), (l.innerHTML = 'For further help and steps, see NW.js Documentation.'), (u = Object(n.U)()), p && p.c(), Object(n.g)(o, "class", "warning svelte-1iqxbmk"), Object(n.g)(s, "class", "svelte-1iqxbmk"), Object(n.g)(l, "class", "svelte-1iqxbmk"); }, m(e, d) { Object(n.E)(e, t, d), Object(n.d)(t, r), Object(n.d)(t, i), Object(n.d)(t, o), Object(n.d)(t, a), Object(n.d)(t, s), Object(n.d)(t, c), Object(n.d)(t, l), Object(n.d)(t, u), p && p.m(t, null); }, p(e, r) { 1 & r[0] && (d = e[0].target.includes("mac")), d ? p || ((p = jt(e)), p.c(), p.m(t, null)) : p && (p.d(1), (p = null)); }, d(e) { e && Object(n.u)(t), p && p.d(); }, }; } function vt(e) { let t, r, i, o, a, s, c, l, u = e[0].target.includes("32"); function d(e, t) { return ( 1 & t[0] && (s = null), 1 & t[0] && (c = null), null == s && (s = !!e[0].target.includes("mac")), s ? wt : (null == c && (c = !!e[0].target.includes("linux")), c ? yt : void 0) ); } let p = d(e, [-1, -1, -1, -1]), h = p && p(e), f = u && kt(e); return { c() { (t = Object(n.v)("div")), (r = Object(n.v)("h2")), (r.textContent = "Electron"), (i = Object(n.U)()), (o = Object(n.v)("p")), (o.textContent = "The Electron environment works by embedding a copy of Chromium (the open source part of Google Chrome) along with your project, which means the app will be very large."), (a = Object(n.U)()), h && h.c(), (l = Object(n.U)()), f && f.c(), Object(n.g)(o, "class", "svelte-1iqxbmk"); }, m(e, s) { Object(n.E)(e, t, s), Object(n.d)(t, r), Object(n.d)(t, i), Object(n.d)(t, o), Object(n.d)(t, a), h && h.m(t, null), Object(n.d)(t, l), f && f.m(t, null); }, p(e, r) { p !== (p = d(e, r)) && (h && h.d(1), (h = p && p(e)), h && (h.c(), h.m(t, l))), 1 & r[0] && (u = e[0].target.includes("32")), u ? f || ((f = kt(e)), f.c(), f.m(t, null)) : f && (f.d(1), (f = null)); }, d(e) { e && Object(n.u)(t), h && h.d(), f && f.d(); }, }; } function jt(e) { let t; return { c() { (t = Object(n.v)("p")), (t.textContent = "On macOS, the app will run using Rosetta on Apple Silicon Macs."), Object(n.g)(t, "class", "svelte-1iqxbmk"); }, m(e, r) { Object(n.E)(e, t, r); }, d(e) { e && Object(n.u)(t); }, }; } function yt(e) { let t; return { c() { (t = Object(n.v)("p")), (t.innerHTML = "On Linux, the application can be started by running start.sh"), Object(n.g)(t, "class", "svelte-1iqxbmk"); }, m(e, r) { Object(n.E)(e, t, r); }, d(e) { e && Object(n.u)(t); }, }; } function wt(e) { let t; return { c() { (t = Object(n.v)("p")), (t.textContent = "On macOS, the app will run natively on both Intel Silicon and Apple Silicon Macs."), Object(n.g)(t, "class", "svelte-1iqxbmk"); }, m(e, r) { Object(n.E)(e, t, r); }, d(e) { e && Object(n.u)(t); }, }; } function kt(e) { let t; return { c() { (t = Object(n.v)("p")), (t.textContent = 'Note: You have selected the 32-bit or 64-bit mode. This maximizes device compatibility but limits the amount of memory the app can use. If you encounter crashes, try going into "Other environments" and using the 64-bit only mode instead.'), Object(n.g)(t, "class", "svelte-1iqxbmk"); }, m(e, r) { Object(n.E)(e, t, r); }, d(e) { e && Object(n.u)(t); }, }; } function Ot(e) { let t, r; function i(e, t) { return ( 1 & t[0] && (r = null), null == r && (r = !!e[0].target.startsWith("zip")), r ? dt : ut ); } let o = i(e, [-1, -1, -1, -1]), a = o(e); return { c() { (t = Object(n.v)("div")), a.c(); }, m(e, r) { Object(n.E)(e, t, r), a.m(t, null); }, p(e, r) { o === (o = i(e, r)) && a ? a.p(e, r) : (a.d(1), (a = o(e)), a && (a.c(), a.m(t, null))); }, d(e) { e && Object(n.u)(t), a.d(); }, }; } function _t(e) { let t, r, i, o, a, s, l, u, d, p; return ( (i = new c.a({ props: { secondary: !0, text: e[7]("options.export") }, })), i.$on("click", e[21]), (s = new c.a({ props: { secondary: !0, text: e[7]("options.import") }, })), s.$on("click", e[22]), (d = new c.a({ props: { dangerous: !0, text: e[7]("options.resetAll") }, })), d.$on("click", e[20]), { c() { (t = Object(n.v)("div")), (r = Object(n.v)("div")), Object(n.o)(i.$$.fragment), (o = Object(n.U)()), (a = Object(n.v)("div")), Object(n.o)(s.$$.fragment), (l = Object(n.U)()), (u = Object(n.v)("div")), Object(n.o)(d.$$.fragment), Object(n.g)(r, "class", "button svelte-1iqxbmk"), Object(n.g)(a, "class", "button svelte-1iqxbmk"), Object(n.g)(u, "class", "side-buttons svelte-1iqxbmk"), Object(n.g)(t, "class", "buttons svelte-1iqxbmk"); }, m(e, c) { Object(n.E)(e, t, c), Object(n.d)(t, r), Object(n.H)(i, r, null), Object(n.d)(t, o), Object(n.d)(t, a), Object(n.H)(s, a, null), Object(n.d)(t, l), Object(n.d)(t, u), Object(n.H)(d, u, null), (p = !0); }, p(e, t) { const r = {}; 128 & t[0] && (r.text = e[7]("options.export")), i.$set(r); const n = {}; 128 & t[0] && (n.text = e[7]("options.import")), s.$set(n); const o = {}; 128 & t[0] && (o.text = e[7]("options.resetAll")), d.$set(o); }, i(e) { p || (Object(n.cb)(i.$$.fragment, e), Object(n.cb)(s.$$.fragment, e), Object(n.cb)(d.$$.fragment, e), (p = !0)); }, o(e) { Object(n.db)(i.$$.fragment, e), Object(n.db)(s.$$.fragment, e), Object(n.db)(d.$$.fragment, e), (p = !1); }, d(e) { e && Object(n.u)(t), Object(n.s)(i), Object(n.s)(s), Object(n.s)(d); }, } ); } function At(e) { let t, r; return ( (t = new l.a({ props: { $$slots: { default: [_t] }, $$scope: { ctx: e } }, })), t.$on("drop", e[106]), { c() { Object(n.o)(t.$$.fragment); }, m(e, i) { Object(n.H)(t, e, i), (r = !0); }, p(e, r) { const n = {}; (128 & r[0]) | (4194304 & r[3]) && (n.$$scope = { dirty: r, ctx: e }), t.$set(n); }, i(e) { r || (Object(n.cb)(t.$$.fragment, e), (r = !0)); }, o(e) { Object(n.db)(t.$$.fragment, e), (r = !1); }, d(e) { Object(n.s)(t, e); }, } ); } function xt(e) { let t, r, i, o, a, s, l; return ( (i = new c.a({ props: { text: e[7]("options.package") } })), i.$on("click", e[17]), (s = new c.a({ props: { secondary: !0, text: e[7]("options.preview") }, })), s.$on("click", e[18]), { c() { (t = Object(n.v)("div")), (r = Object(n.v)("div")), Object(n.o)(i.$$.fragment), (o = Object(n.U)()), (a = Object(n.v)("div")), Object(n.o)(s.$$.fragment), Object(n.g)(r, "class", "button svelte-1iqxbmk"), Object(n.g)(a, "clas", "button"), Object(n.g)(t, "class", "buttons svelte-1iqxbmk"); }, m(e, c) { Object(n.E)(e, t, c), Object(n.d)(t, r), Object(n.H)(i, r, null), Object(n.d)(t, o), Object(n.d)(t, a), Object(n.H)(s, a, null), (l = !0); }, p(e, t) { const r = {}; 128 & t[0] && (r.text = e[7]("options.package")), i.$set(r); const n = {}; 128 & t[0] && (n.text = e[7]("options.preview")), s.$set(n); }, i(e) { l || (Object(n.cb)(i.$$.fragment, e), Object(n.cb)(s.$$.fragment, e), (l = !0)); }, o(e) { Object(n.db)(i.$$.fragment, e), Object(n.db)(s.$$.fragment, e), (l = !1); }, d(e) { e && Object(n.u)(t), Object(n.s)(i), Object(n.s)(s); }, } ); } function St(e) { let t, r; return ( (t = new s.a({ props: { caption: !0, $$slots: { default: [zt] }, $$scope: { ctx: e }, }, })), { c() { Object(n.o)(t.$$.fragment); }, m(e, i) { Object(n.H)(t, e, i), (r = !0); }, p(e, r) { const n = {}; (128 & r[0]) | (4194304 & r[3]) && (n.$$scope = { dirty: r, ctx: e }), t.$set(n); }, i(e) { r || (Object(n.cb)(t.$$.fragment, e), (r = !0)); }, o(e) { Object(n.db)(t.$$.fragment, e), (r = !1); }, d(e) { Object(n.s)(t, e); }, } ); } function Et(e) { let t, r; return ( (t = new me({ props: { name: e[6] ? e[6].filename : null, url: e[6] ? e[6].url : null, blob: e[6] ? e[6].blob : null, }, })), { c() { Object(n.o)(t.$$.fragment); }, m(e, i) { Object(n.H)(t, e, i), (r = !0); }, p(e, r) { const n = {}; 64 & r[0] && (n.name = e[6] ? e[6].filename : null), 64 & r[0] && (n.url = e[6] ? e[6].url : null), 64 & r[0] && (n.blob = e[6] ? e[6].blob : null), t.$set(n); }, i(e) { r || (Object(n.cb)(t.$$.fragment, e), (r = !0)); }, o(e) { Object(n.db)(t.$$.fragment, e), (r = !1); }, d(e) { Object(n.s)(t, e); }, } ); } function zt(e) { let t, r, i = e[7]("options.downloadsWillAppearHere") + ""; return { c() { (t = Object(n.v)("p")), (r = Object(n.Y)(i)), Object(n.g)(t, "class", "svelte-1iqxbmk"); }, m(e, i) { Object(n.E)(e, t, i), Object(n.d)(t, r); }, p(e, t) { 128 & t[0] && i !== (i = e[7]("options.downloadsWillAppearHere") + "") && Object(n.Q)(r, i); }, d(e) { e && Object(n.u)(t); }, }; } function Ct(e) { let t, r, i, o, a, c, l, u, d, p, h, f, b, m, g, v, j, y, w, k, O; (t = new s.a({ props: { accent: "#FFAB19", reset: e[42], $$slots: { default: [Ye] }, $$scope: { ctx: e }, }, })), (i = new s.a({ props: { accent: "#9966FF", reset: e[61], $$slots: { default: [Je] }, $$scope: { ctx: e }, }, })), (a = new s.a({ props: { accent: "#4CBFE6", reset: e[70], $$slots: { default: [Xe] }, $$scope: { ctx: e }, }, })), (l = new s.a({ props: { accent: "#FF8C1A", reset: 0 === e[8].length ? null : e[76], $$slots: { default: [at] }, $$scope: { ctx: e }, }, })), (d = new s.a({ props: { accent: "#FF6680", reset: e[86], $$slots: { default: [st] }, $$scope: { ctx: e }, }, })), (h = new s.a({ props: { accent: "#0FBD8C", reset: e[99], $$slots: { default: [ct] }, $$scope: { ctx: e }, }, })); let _ = "html" !== e[0].target && lt(e); (m = new s.a({ props: { $$slots: { default: [At] }, $$scope: { ctx: e } }, })), (v = new s.a({ props: { $$slots: { default: [xt] }, $$scope: { ctx: e } }, })); const A = [Et, St], x = []; function S(e, t) { return e[6] ? 0 : e[4].visible ? -1 : 1; } return ( ~(y = S(e)) && (w = x[y] = A[y](e)), { c() { Object(n.o)(t.$$.fragment), (r = Object(n.U)()), Object(n.o)(i.$$.fragment), (o = Object(n.U)()), Object(n.o)(a.$$.fragment), (c = Object(n.U)()), Object(n.o)(l.$$.fragment), (u = Object(n.U)()), Object(n.o)(d.$$.fragment), (p = Object(n.U)()), Object(n.o)(h.$$.fragment), (f = Object(n.U)()), _ && _.c(), (b = Object(n.U)()), Object(n.o)(m.$$.fragment), (g = Object(n.U)()), Object(n.o)(v.$$.fragment), (j = Object(n.U)()), w && w.c(), (k = Object(n.w)()); }, m(e, s) { Object(n.H)(t, e, s), Object(n.E)(e, r, s), Object(n.H)(i, e, s), Object(n.E)(e, o, s), Object(n.H)(a, e, s), Object(n.E)(e, c, s), Object(n.H)(l, e, s), Object(n.E)(e, u, s), Object(n.H)(d, e, s), Object(n.E)(e, p, s), Object(n.H)(h, e, s), Object(n.E)(e, f, s), _ && _.m(e, s), Object(n.E)(e, b, s), Object(n.H)(m, e, s), Object(n.E)(e, g, s), Object(n.H)(v, e, s), Object(n.E)(e, j, s), ~y && x[y].m(e, s), Object(n.E)(e, k, s), (O = !0); }, p(e, r) { const o = {}; (161 & r[0]) | (4194304 & r[3]) && (o.$$scope = { dirty: r, ctx: e }), t.$set(o); const s = {}; 10 & r[0] && (s.reset = e[61]), (139 & r[0]) | (4194304 & r[3]) && (s.$$scope = { dirty: r, ctx: e }), i.$set(s); const c = {}; 4 & r[0] && (c.reset = e[70]), (133 & r[0]) | (4194304 & r[3]) && (c.$$scope = { dirty: r, ctx: e }), a.$set(c); const u = {}; (129 & r[0]) | (4194304 & r[3]) && (u.$$scope = { dirty: r, ctx: e }), l.$set(u); const p = {}; (161 & r[0]) | (4194304 & r[3]) && (p.$$scope = { dirty: r, ctx: e }), d.$set(p); const f = {}; (129 & r[0]) | (4194304 & r[3]) && (f.$$scope = { dirty: r, ctx: e }), h.$set(f), "html" !== e[0].target ? _ ? (_.p(e, r), 1 & r[0] && Object(n.cb)(_, 1)) : ((_ = lt(e)), _.c(), Object(n.cb)(_, 1), _.m(b.parentNode, b)) : _ && (Object(n.z)(), Object(n.db)(_, 1, 1, () => { _ = null; }), Object(n.k)()); const g = {}; (128 & r[0]) | (4194304 & r[3]) && (g.$$scope = { dirty: r, ctx: e }), m.$set(g); const j = {}; (128 & r[0]) | (4194304 & r[3]) && (j.$$scope = { dirty: r, ctx: e }), v.$set(j); let O = y; (y = S(e)), y === O ? ~y && x[y].p(e, r) : (w && (Object(n.z)(), Object(n.db)(x[O], 1, 1, () => { x[O] = null; }), Object(n.k)()), ~y ? ((w = x[y]), w ? w.p(e, r) : ((w = x[y] = A[y](e)), w.c()), Object(n.cb)(w, 1), w.m(k.parentNode, k)) : (w = null)); }, i(e) { O || (Object(n.cb)(t.$$.fragment, e), Object(n.cb)(i.$$.fragment, e), Object(n.cb)(a.$$.fragment, e), Object(n.cb)(l.$$.fragment, e), Object(n.cb)(d.$$.fragment, e), Object(n.cb)(h.$$.fragment, e), Object(n.cb)(_), Object(n.cb)(m.$$.fragment, e), Object(n.cb)(v.$$.fragment, e), Object(n.cb)(w), (O = !0)); }, o(e) { Object(n.db)(t.$$.fragment, e), Object(n.db)(i.$$.fragment, e), Object(n.db)(a.$$.fragment, e), Object(n.db)(l.$$.fragment, e), Object(n.db)(d.$$.fragment, e), Object(n.db)(h.$$.fragment, e), Object(n.db)(_), Object(n.db)(m.$$.fragment, e), Object(n.db)(v.$$.fragment, e), Object(n.db)(w), (O = !1); }, d(e) { Object(n.s)(t, e), e && Object(n.u)(r), Object(n.s)(i, e), e && Object(n.u)(o), Object(n.s)(a, e), e && Object(n.u)(c), Object(n.s)(l, e), e && Object(n.u)(u), Object(n.s)(d, e), e && Object(n.u)(p), Object(n.s)(h, e), e && Object(n.u)(f), _ && _.d(e), e && Object(n.u)(b), Object(n.s)(m, e), e && Object(n.u)(g), Object(n.s)(v, e), e && Object(n.u)(j), ~y && x[y].d(e), e && Object(n.u)(k); }, } ); } const It = 9999999999; function Tt(e, t, r) { let a, s, c, l, u, d, p; Object(n.l)(e, xe.b, (e) => r(107, (a = e))), Object(n.l)(e, o.a, (e) => r(7, (s = e))), Object(n.l)(e, xe.c, (e) => r(4, (p = e))); let { projectData: h } = t, { title: f } = t; const b = h.project.analysis.stageVariables .filter((e) => e.isCloud) .map((e) => e.name), m = Ue.DEFAULT_OPTIONS(); m.projectId = h.projectId || "p4-" + h.uniqueId; for (const e of b) m.cloudVariables.custom[e] = "ws"; (m.app.packageName = Ue.getDefaultPackageNameFromFileName(h.title)), (m.app.windowTitle = Ue.getWindowTitleFromFileName(h.title)), (m.extensions = h.project.analysis.extensions); const g = Object(ge.a)("PackagerOptions." + h.uniqueId, m); Object(n.l)(e, g, (e) => r(0, (c = e))), Object(n.S)( g, (c.extensions = c.extensions.map((e) => "object" == typeof e && e ? e.url || "" : e )), c ); const v = ((j = " // _twconfig_"), h.project.analysis.stageComments.find((e) => e.split("\n").find((e) => e.endsWith(j)) )); var j; let y = null, w = null; const k = () => { r(26, (w = null)), y && URL.revokeObjectURL(y.url), r(6, (y = null)); }, O = Ae("PackagerOptions.icon." + h.uniqueId); Object(n.l)(e, O, (e) => r(3, (d = e))); const _ = Ae("PackagerOptions.customCursorIcon." + h.uniqueId); Object(n.l)(e, _, (e) => r(2, (u = e))); const A = Ae("PackagerOptions.loadingScreenImage." + h.uniqueId); Object(n.l)(e, A, (e) => r(1, (l = e))); const x = ![ "html", "zip", "electron-win32", "webview-mac", "electron-linux64", ].includes(c.target), S = c.compiler.enabled !== m.compiler.enabled || c.compiler.warpTimer !== m.compiler.warpTimer || 0 !== c.extensions.length || c.bakeExtensions !== m.bakeExtensions || "" !== c.custom.css || "" !== c.custom.js || c.projectId !== m.projectId || c.packagedRuntime !== m.packagedRuntime || c.maxTextureDimension !== m.maxTextureDimension, E = async (e, t) => { const r = new Ue(); (r.options = t), (r.project = h.project), e.addEventListener("abort", () => { r.abort(); }), e.setProgressText(s("progress.loadingScripts")), r.addEventListener("fetch-extensions", ({ detail: t }) => { e.setProgressText(s("progress.downloadingExtensions")), e.setProgress(t.progress); }), r.addEventListener("large-asset-fetch", ({ detail: t }) => { let r; t.asset.startsWith("nwjs-") ? (r = "NW.js") : t.asset.startsWith("electron-") ? (r = "Electron") : "webview-mac" === t.asset && (r = "WKWebView"), r && e.setProgressText( s("progress.loadingLargeAsset").replace("{thing}", r) ), e.setProgress(t.progress); }), r.addEventListener("zip-progress", ({ detail: t }) => { e.setProgressText(s("progress.compressingProject")), e.setProgress(t.progress); }); const n = await r.package(); return ( (n.blob = new Blob([n.data], { type: n.type })), (n.url = URL.createObjectURL(n.blob)), n ); }, z = (e) => { for (const t of e) { let e = c, r = m; const n = t.split("."), i = n.pop(); for (const t of n) (e = e[t]), (r = r[t]); e[i] = Ie(r[i]); } g.set(c); }, C = async (e) => { const t = e.files[0]; var r; if (t) try { const e = await Object($.b)(t), i = JSON.parse(e), o = He(i), a = Ie(m), p = Object(We.a)(o, a); (Ue.usesUnsafeOptions(p) && !confirm(s("options.confirmImportUnsafe"))) || ((r = p), Object(n.S)(g, (c = r), c), Object(n.S)(O, (d = c.app.icon), d), Object(n.S)(_, (u = c.cursor.custom), u), Object(n.S)(A, (l = c.loadingScreen.image), l)); } catch (e) { Object(n.S)(xe.b, (a = e), a); } }; Object(i.b)(() => { y && URL.revokeObjectURL(y.url); }); return ( (e.$$set = (e) => { "projectData" in e && r(25, (h = e.projectData)), "title" in e && r(24, (f = e.title)); }), (e.$$.update = () => { 67108880 & e.$$.dirty[0] && w && w.setProgress(p.progress, p.text), 8 & e.$$.dirty[0] && Object(n.S)(g, (c.app.icon = d), c), 4 & e.$$.dirty[0] && Object(n.S)(g, (c.cursor.custom = u), c), 2 & e.$$.dirty[0] && Object(n.S)(g, (c.loadingScreen.image = l), c), 1 & e.$$.dirty[0] && (k(), xe.a.abort()), 1 & e.$$.dirty[0] && r(24, (f = c.app.windowTitle)); }), [ c, l, u, d, p, m, y, s, b, g, v, O, _, A, x, S, () => { const e = u, t = URL.createObjectURL(e), r = new Image(), i = () => { (r.onerror = null), (r.onload = null), URL.revokeObjectURL(t); }; (r.onload = () => { Object(n.S)( g, (c.cursor.center.x = Math.round(r.width / 2)), c ), Object(n.S)( g, (c.cursor.center.y = Math.round(r.height / 2)), c ), i(); }), (r.onerror = () => { throw ( (i(), Object(n.S)( xe.b, (a = new Error("Image could not be loaded")), a ), a) ); }), (r.src = t); }, async () => { k(); const e = new De.a(); r(6, (y = await e.do(E(e, Ie(c))))), e.done(), ce(y.filename, y.url); }, async () => { k(), r(26, (w = new ze())); const e = new De.a(), t = Ie(c); t.target = "html"; try { r(6, (y = await e.do(E(e, t)))), e.done(), w.setContent(y.blob); } catch (e) { w.close(); } }, z, () => { confirm(s("reset.confirmAll")) && (z(Object.keys(c)), Object(n.S)(O, (d = null), d), Object(n.S)(_, (u = null), u), Object(n.S)(A, (l = null), l)); }, async () => { const e = await Fe(c), t = new Blob([JSON.stringify(e)], { type: "application/json", }), r = URL.createObjectURL(t), n = Y.APP_NAME.replace(/[^a-z0-9 ]/gi, "") .replace(/ /g, "-") .toLowerCase(); ce(n + "-settings.json", r), URL.revokeObjectURL(r); }, async () => { const e = document.createElement("input"); (e.type = "file"), (e.accept = ".json"), e.addEventListener("change", (e) => { C(e.target); }), document.body.appendChild(e), e.click(), e.remove(); }, C, f, h, w, function () { (c.turbo = this.checked), g.set(c); }, function () { (c.framerate = Object(n.ab)(this.value)), g.set(c); }, function () { (c.interpolation = this.checked), g.set(c); }, function () { (c.highQualityPen = this.checked), g.set(c); }, (e) => { Object(n.S)( g, (c.maxClones = e.target.checked ? It : 300), c ); }, (e) => { Object(n.S)(g, (c.fencing = !e.target.checked), c); }, (e) => { Object(n.S)(g, (c.miscLimits = !e.target.checked), c); }, function () { (c.username = this.value), g.set(c); }, function () { (c.closeWhenStopped = this.checked), g.set(c); }, function () { (c.stageWidth = Object(n.ab)(this.value)), g.set(c); }, function () { (c.stageHeight = Object(n.ab)(this.value)), g.set(c); }, function () { (c.resizeMode = this.__value), g.set(c); }, [[], [], [], [], []], function () { (c.resizeMode = this.__value), g.set(c); }, function () { (c.resizeMode = this.__value), g.set(c); }, () => { z([ "turbo", "framerate", "interpolation", "highQualityPen", "maxClones", "fencing", "miscLimits", "stageWidth", "stageHeight", "resizeMode", "username", ]); }, function () { (c.app.windowTitle = this.value), g.set(c); }, function (e) { (d = e), O.set(d); }, function () { (c.loadingScreen.progressBar = this.checked), g.set(c); }, function () { (c.loadingScreen.text = this.value), g.set(c); }, function (e) { (l = e), A.set(l); }, function () { (c.loadingScreen.imageMode = this.__value), g.set(c); }, function () { (c.loadingScreen.imageMode = this.__value), g.set(c); }, function () { (c.autoplay = this.checked), g.set(c); }, function () { (c.controls.greenFlag.enabled = this.checked), g.set(c); }, function () { (c.controls.stopAll.enabled = this.checked), g.set(c); }, function () { (c.controls.pause.enabled = this.checked), g.set(c); }, function () { (c.controls.fullscreen.enabled = this.checked), g.set(c); }, function (t) { e.$$.not_equal(c.appearance.background, t) && ((c.appearance.background = t), g.set(c)); }, function (t) { e.$$.not_equal(c.appearance.foreground, t) && ((c.appearance.foreground = t), g.set(c)); }, function (t) { e.$$.not_equal(c.appearance.accent, t) && ((c.appearance.accent = t), g.set(c)); }, function () { (c.monitors.editableLists = this.checked), g.set(c); }, function (t) { e.$$.not_equal(c.monitors.variableColor, t) && ((c.monitors.variableColor = t), g.set(c)); }, function (t) { e.$$.not_equal(c.monitors.listColor, t) && ((c.monitors.listColor = t), g.set(c)); }, () => { Object(n.S)(O, (d = null), d), Object(n.S)(A, (l = null), l), z([ "app.windowTitle", "loadingScreen", "autoplay", "controls", "appearance", "monitors", ]); }, function () { (c.cursor.type = this.__value), g.set(c); }, function () { (c.cursor.type = this.__value), g.set(c); }, function () { (c.cursor.type = this.__value), g.set(c); }, function (e) { (u = e), _.set(u); }, function () { (c.cursor.center.x = Object(n.ab)(this.value)), g.set(c); }, function () { (c.cursor.center.y = Object(n.ab)(this.value)), g.set(c); }, function () { (c.chunks.pointerlock = this.checked), g.set(c); }, function () { (c.chunks.gamepad = this.checked), g.set(c); }, () => { Object(n.S)(_, (u = null), u), z(["cursor", "chunks"]); }, function () { (c.cloudVariables.mode = Object(n.O)(this)), g.set(c); }, function (e) { (c.cloudVariables.custom[e] = Object(n.O)(this)), g.set(c); }, function () { (c.cloudVariables.cloudHost = this.value), g.set(c); }, function () { (c.cloudVariables.specialCloudBehaviors = this.checked), g.set(c); }, function () { (c.cloudVariables.unsafeCloudBehaviors = this.checked), g.set(c); }, () => { z(["cloudVariables"]); }, function () { (c.compiler.enabled = this.checked), g.set(c); }, function () { (c.compiler.warpTimer = this.checked), g.set(c); }, function (t) { e.$$.not_equal(c.extensions, t) && ((c.extensions = t), g.set(c)); }, function () { (c.bakeExtensions = this.checked), g.set(c); }, function () { (c.custom.css = this.value), g.set(c); }, function () { (c.custom.js = this.value), g.set(c); }, function () { (c.projectId = this.value), g.set(c); }, function () { (c.packagedRuntime = this.checked), g.set(c); }, (e) => { Object(n.S)( g, (c.maxTextureDimension = m.maxTextureDimension * (e.target.checked ? 2 : 1)), c ); }, () => { z([ "compiler", "extensions", "bakeExtensions", "custom", "projectId", "maxTextureDimension", ]); }, function () { (c.target = this.__value), g.set(c); }, function () { (c.target = this.__value), g.set(c); }, function () { (c.target = this.__value), g.set(c); }, function () { (c.target = this.__value), g.set(c); }, function () { (c.target = this.__value), g.set(c); }, function () { (c.target = this.__value), g.set(c); }, function () { (c.target = this.__value), g.set(c); }, function () { (c.target = this.__value), g.set(c); }, function () { (c.target = this.__value), g.set(c); }, function () { (c.target = this.__value), g.set(c); }, function () { (c.target = this.__value), g.set(c); }, function () { (c.target = this.__value), g.set(c); }, () => { z(["target"]); }, function () { (c.app.packageName = this.value), g.set(c); }, function () { (c.app.version = this.value), g.set(c); }, function () { (c.app.windowMode = this.__value), g.set(c); }, function () { (c.app.windowMode = this.__value), g.set(c); }, function () { (c.app.windowMode = this.__value), g.set(c); }, () => { z(["app.packageName", "app.windowMode"]); }, (e) => C(e.detail), ] ); } class Pt extends n.a { constructor(e) { super(), Object(n.C)( this, e, Tt, Ct, n.M, { projectData: 25, title: 24 }, qe, [-1, -1, -1, -1] ); } } t.default = Pt; }, function (e, t, r) { "use strict"; r.r(t); var n = r(0), i = r(4), o = r(13), a = r(8); function s(e) { let t; return { c() { t = Object(n.v)("span"); }, m(r, i) { Object(n.E)(r, t, i), e[3](t); }, p: n.I, i: n.I, o: n.I, d(r) { r && Object(n.u)(t), e[3](null); }, }; } function c(e, t, r) { let o, { message: s } = t, { values: c } = t; const l = () => { for (; o.firstChild; ) o.removeChild(o.firstChild); const e = s.split(/{(\w+)}/g); for (let t = 0; t < e.length; t++) { const r = e[t]; if (t % 2 == 0) o.appendChild(document.createTextNode(r)); else { const e = c && c[r]; if (e) { const t = document.createElement("a"); (t.href = e.href), (t.textContent = e.text), e.newTab && ((t.target = "_blank"), (t.rel = "noopener noreferrer")), o.appendChild(t); } else console.warn("Missing placeholder", r), o.appendChild(document.createTextNode(`???{${r}}`)); } } }, u = i.a.subscribe(() => { o && Object(a.d)().then(l); }); return ( Object(a.c)(l), Object(a.b)(u), (e.$$set = (e) => { "message" in e && r(1, (s = e.message)), "values" in e && r(2, (c = e.values)); }), [ o, s, c, function (e) { n.i[e ? "unshift" : "push"](() => { (o = e), r(0, o); }); }, ] ); } class l extends n.a { constructor(e) { super(), Object(n.C)(this, e, c, s, n.M, { message: 1, values: 2 }); } } var u = l, d = r(5), p = r(10), h = r(22); function f(e) { Object(n.e)( e, "svelte-4m5nmg", '.outer.svelte-4m5nmg{position:fixed;top:0;left:0;width:100%;height:100%;z-index:20;background:rgba(255, 255, 255, 0.8);color:black;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;user-select:none}[theme="dark"] .outer.svelte-4m5nmg{background:rgba(0, 0, 0, 0.8);color:white}.inner.svelte-4m5nmg{max-width:480px}' ); } function b(e) { let t, r, i, a, s, c, l, u, d, p, h, f, b, m, g = e[0]("import.header") + "", v = e[0]("import.description") + "", j = e[0]("import.cancel") + ""; return { c() { (t = Object(n.v)("div")), (r = Object(n.v)("div")), (i = Object(n.v)("h2")), (a = Object(n.Y)(g)), (s = Object(n.U)()), (c = Object(n.v)("p")), (l = Object(n.Y)(v)), (u = Object(n.U)()), (d = Object(n.v)("button")), (p = Object(n.Y)(j)), Object(n.g)(r, "class", "inner svelte-4m5nmg"), Object(n.g)(t, "class", "outer svelte-4m5nmg"); }, m(o, h) { Object(n.E)(o, t, h), Object(n.d)(t, r), Object(n.d)(r, i), Object(n.d)(i, a), Object(n.d)(r, s), Object(n.d)(r, c), Object(n.d)(c, l), Object(n.d)(r, u), Object(n.d)(r, d), Object(n.d)(d, p), (f = !0), b || ((m = Object(n.G)(d, "click", e[1])), (b = !0)); }, p(e, [t]) { (!f || 1 & t) && g !== (g = e[0]("import.header") + "") && Object(n.Q)(a, g), (!f || 1 & t) && v !== (v = e[0]("import.description") + "") && Object(n.Q)(l, v), (!f || 1 & t) && j !== (j = e[0]("import.cancel") + "") && Object(n.Q)(p, j); }, i(e) { f || (h && h.end(1), (f = !0)); }, o(e) { (h = Object(n.q)(t, o.a, { duration: 200 })), (f = !1); }, d(e) { e && Object(n.u)(t), e && h && h.end(), (b = !1), m(); }, }; } function m(e, t, r) { let o; Object(n.l)(e, i.a, (e) => r(0, (o = e))); const s = Object(a.a)(); return [ o, () => { s("cancel"); }, ]; } class g extends n.a { constructor(e) { super(), Object(n.C)(this, e, m, b, n.M, {}, f); } } var v = g, j = r(17), y = r(2), w = r(6), k = r(14); var O = async (e) => { try { const t = await Object(k.a)({ url: [ "https://trampoline.turbowarp.org/api/projects/" + e, "https://trampoline.turbowarp.xyz/api/projects/" + e, ], type: "json", }); return { title: t.title, token: t.project_token }; } catch (t) { if (t && 404 === t.status) throw new w.b("Cannot access project " + e); throw t; } }; /** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: Apache-2.0 */ const _ = Symbol("Comlink.proxy"), A = Symbol("Comlink.endpoint"), x = Symbol("Comlink.releaseProxy"), S = Symbol("Comlink.finalizer"), E = Symbol("Comlink.thrown"), z = (e) => ("object" == typeof e && null !== e) || "function" == typeof e, C = new Map([ [ "proxy", { canHandle: (e) => z(e) && e[_], serialize(e) { const { port1: t, port2: r } = new MessageChannel(); return ( (function e(t, r = globalThis, n = ["*"]) { r.addEventListener("message", function i(o) { if (!o || !o.data) return; if ( !(function (e, t) { for (const r of e) { if (t === r || "*" === r) return !0; if (r instanceof RegExp && r.test(t)) return !0; } return !1; })(n, o.origin) ) return void console.warn( `Invalid origin '${o.origin}' for comlink proxy` ); const { id: a, type: s, path: c, } = Object.assign({ path: [] }, o.data), l = (o.data.argumentList || []).map(F); let u; try { const r = c.slice(0, -1).reduce((e, t) => e[t], t), n = c.reduce((e, t) => e[t], t); switch (s) { case "GET": u = n; break; case "SET": (r[c.slice(-1)[0]] = F(o.data.value)), (u = !0); break; case "APPLY": u = n.apply(r, l); break; case "CONSTRUCT": u = M(new n(...l)); break; case "ENDPOINT": { const { port1: r, port2: n } = new MessageChannel(); e(t, n), (u = N(r, [r])); } break; case "RELEASE": u = void 0; break; default: return; } } catch (e) { u = { value: e, [E]: 0 }; } Promise.resolve(u) .catch((e) => ({ value: e, [E]: 0 })) .then((e) => { const [n, o] = $(e); r.postMessage( Object.assign(Object.assign({}, n), { id: a }), o ), "RELEASE" === s && (r.removeEventListener("message", i), I(r), S in t && "function" == typeof t[S] && t[S]()); }) .catch((e) => { const [t, n] = $({ value: new TypeError( "Unserializable return value" ), [E]: 0, }); r.postMessage( Object.assign(Object.assign({}, t), { id: a }), n ); }); }), r.start && r.start(); })(e, t), [r, [r]] ); }, deserialize: (e) => (e.start(), T(e)), }, ], [ "throw", { canHandle: (e) => z(e) && E in e, serialize({ value: e }) { let t; return ( (t = e instanceof Error ? { isError: !0, value: { message: e.message, name: e.name, stack: e.stack, }, } : { isError: !1, value: e }), [t, []] ); }, deserialize(e) { if (e.isError) throw Object.assign(new Error(e.value.message), e.value); throw e.value; }, }, ], ]); function I(e) { (function (e) { return "MessagePort" === e.constructor.name; })(e) && e.close(); } function T(e, t) { return (function e(t, r = [], n = function () {}) { let i = !1; const o = new Proxy(n, { get(n, a) { if ((P(i), a === x)) return () => { !(function (e) { B && B.unregister(e); })(o), R(t), (i = !0); }; if ("then" === a) { if (0 === r.length) return { then: () => o }; const e = H(t, { type: "GET", path: r.map((e) => e.toString()), }).then(F); return e.then.bind(e); } return e(t, [...r, a]); }, set(e, n, o) { P(i); const [a, s] = $(o); return H( t, { type: "SET", path: [...r, n].map((e) => e.toString()), value: a, }, s ).then(F); }, apply(n, o, a) { P(i); const s = r[r.length - 1]; if (s === A) return H(t, { type: "ENDPOINT" }).then(F); if ("bind" === s) return e(t, r.slice(0, -1)); const [c, l] = U(a); return H( t, { type: "APPLY", path: r.map((e) => e.toString()), argumentList: c, }, l ).then(F); }, construct(e, n) { P(i); const [o, a] = U(n); return H( t, { type: "CONSTRUCT", path: r.map((e) => e.toString()), argumentList: o, }, a ).then(F); }, }); return ( (function (e, t) { const r = (L.get(t) || 0) + 1; L.set(t, r), B && B.register(e, t, e); })(o, t), o ); })(e, [], t); } function P(e) { if (e) throw new Error("Proxy has been released and is not useable"); } function R(e) { return H(e, { type: "RELEASE" }).then(() => { I(e); }); } const L = new WeakMap(), B = "FinalizationRegistry" in globalThis && new FinalizationRegistry((e) => { const t = (L.get(e) || 0) - 1; L.set(e, t), 0 === t && R(e); }); function U(e) { const t = e.map($); return [ t.map((e) => e[0]), ((r = t.map((e) => e[1])), Array.prototype.concat.apply([], r)), ]; var r; } const D = new WeakMap(); function N(e, t) { return D.set(e, t), e; } function M(e) { return Object.assign(e, { [_]: !0 }); } function $(e) { for (const [t, r] of C) if (r.canHandle(e)) { const [n, i] = r.serialize(e); return [{ type: "HANDLER", name: t, value: n }, i]; } return [{ type: "RAW", value: e }, D.get(e) || []]; } function F(e) { switch (e.type) { case "HANDLER": return C.get(e.name).deserialize(e.value); case "RAW": return e.value; } } function H(e, t, r) { return new Promise((n) => { const i = new Array(4) .fill(0) .map(() => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER).toString( 16 ) ) .join("-"); e.addEventListener("message", function t(r) { r.data && r.data.id && r.data.id === i && (e.removeEventListener("message", t), n(r.data)); }), e.start && e.start(), e.postMessage(Object.assign({ id: i }, t), r); }); } var W = () => { const e = new Blob([ '!function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=12)}([function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e){var r,n,i=t.exports={};function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function o(t){if(r===setTimeout)return setTimeout(t,0);if((r===s||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:s}catch(t){r=s}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();var u,f=[],h=!1,c=-1;function l(){h&&u&&(h=!1,u.length?f=u.concat(f):c=-1,f.length&&d())}function d(){if(!h){var t=o(l);h=!0;for(var e=f.length;e;){for(u=f,f=[];++c1)for(var r=1;rt.replace(/\\?token=[^&#]+/,"?token=x"))(t)}`),this.name="HTTPError",this.url=t,this.status=e}}class l extends Error{constructor(t){super(t),this.name="CanNotAccessProjectError"}}class d extends Error{constructor(t){super(t||"The operation was aborted."),this.name="AbortError"}}let p=0;const m=[],g=()=>{p--,y()},y=()=>{if(p<100){const t=(()=>{for(;;){if(0===m.length)return null;const t=m.shift(),e=t[2];if(!(e&&e.signal&&e.signal.aborted))return t}})();t&&(p++,(([t,e,r])=>{let n,i=0;const s=()=>f.default(e,r).then(t=>{if(t.ok)return t.arrayBuffer();throw new c(e,t.status)}).then(t=>(g(),t)).catch(t=>{if(t&&"AbortError"===t.name)throw g(),t;if(console.warn(`Attempt to fetch ${e} failed`,t),n||(n=t),i<3)return i++,new Promise(t=>setTimeout(t,5e3*(i+Math.random()-1))).then(s);throw g(),new Error(`Failed to fetch ${e}: ${n}`)});t(s())})(t))}},_=(t,e)=>new Promise(r=>{m.push([r,t,e]),y()}),b=t=>Object.assign({assetHost:"https://assets.scratch.mit.edu/internalapi/asset/$id/get/"},t||{}),w=t=>{if(t.signal&&t.signal.aborted)throw new d},v=async(t,e,r)=>{if(r.processJSON){const n=await r.processJSON(t,e);n&&(e=n),w(r)}return h.stringify(e)},k=t=>{const e=[];for(const r of t)if(Array.isArray(r))for(const t of r)e.push(t);else e.push(r);return e},E=async(t,e,r)=>{const n=["svg","png","jpg","gif","bmp"],i=["wav","mp3"],s=new u.default;let a=0,o=0;const f=t=>t.split(".")[1]||"",h=[t,...t.children.filter(t=>!t.listName&&!t.target)],c=k(h.map(t=>t.costumes||[])),l=k(h.map(t=>t.sounds||[])),d=await(t=>{const s=new Map,u=t=>(s.has(t)||s.set(t,(t=>{const e=f(t);return n.includes(e)?o++:i.includes(e)?a++:(console.warn("unknown extension: "+e),o++)})(t)),s.get(t));for(const e of t)e.md5&&(e.soundID=u(e.md5)),e.baseLayerMD5&&(e.baseLayerID=u(e.baseLayerMD5)),e.textLayerMD5&&(e.textLayerID=u(e.textLayerMD5));return Promise.all(Array.from(s.entries()).map(([t,n])=>(async(t,n)=>{r.fetching(t);const i=await _(e.assetHost.replace("$id",t)),s=`${n}.${f(t)}`;return r.fetched(t),{path:s,data:i}})(t,n)))})([...c,...l]);s.file("project.json",await v("sb2",t,e));for(const{path:t,data:e}of d)s.file(t,e);return s},x=t=>Object.prototype.hasOwnProperty.call(t,"targets")?"sb3":Object.prototype.hasOwnProperty.call(t,"objName")?"sb2":null,A=(t,e)=>{const r=e.date||new Date("Fri, 31 Dec 2021 00:00:00 GMT");for(const e of Object.values(t.files))e.date=r;return t.generateAsync({type:"arraybuffer",compression:!1!==e.compress?"DEFLATE":"STORE"},t=>{e.onProgress&&e.onProgress("compress",t.percent/100,1)})},S=async(t,e)=>{e=b(e),"string"==typeof t&&(t=h.parse(t));let r=!1,n=null,i=0,s=0;const a=()=>{n||(n=setTimeout(()=>{w(e),n=null,!r&&e.onProgress&&e.onProgress("assets",i,s)}))},o={fetching:()=>{w(e),s++,a()},fetched:()=>{w(e),i++,a()}},f=x(t);let c;if("sb3"===f)c=await(async(t,e,r)=>{const n=new u.default,i=t.targets,s=(t=>{const e=[],r=new Set;for(const n of t){n.md5ext||(n.md5ext=`${n.assetId}.${n.dataFormat}`);const t=n.md5ext;r.has(t)||(r.add(t),e.push(n))}return e})([...k(i.map(t=>t.costumes||[])),...k(i.map(t=>t.sounds||[]))]),a=await Promise.all(s.map(async t=>{const n=t.md5ext;r.fetching(n);const i=await _(e.assetHost.replace("$id",n),{signal:e.signal});return r.fetched(n),{path:n,data:i}}));n.file("project.json",await v("sb3",t,e));for(const{path:t,data:e}of a)n.file(t,e);return n})(t,e,o);else{if("sb2"!==f)throw new Error("Unknown project type: "+f);c=await E(t,e,o)}w(e),e.onProgress&&e.onProgress("assets",s,s),r=!0;const l=await A(c,e);return w(e),{title:"",type:f,arrayBuffer:l}},T=async(t,e)=>{e=b(e),w(e),ArrayBuffer.isView(t)&&(t=t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength));const r=new Uint8Array(t);if((t=>t[0]==="{".charCodeAt(0))(r)){const r=(new TextDecoder).decode(t);return S(r,e)}if((t=>{for(let e=0;e<"ScratchV".length;e++)if(t[e]!=="ScratchV".charCodeAt(e))return!1;return!0})(r))return{title:"",type:"sb",arrayBuffer:t};let n;try{n=await u.default.loadAsync(t)}catch(t){throw new Error("Cannot parse project: not a zip or sb")}w(e);const i=n.file(/^([^/]*\\/)?project\\.json$/)[0];if(!i)throw new Error("project.json is missing");const s=await i.async("text"),a=h.parse(s),o=x(a);w(e);let f=!!e.date;if(e.processJSON){const t=await e.processJSON(o,a);t&&(f=!0,n.file(i.name,h.stringify(t)))}return f&&(t=await A(n,e),w(e)),{title:"",type:o,arrayBuffer:t}},C=async(t,e)=>{e=b(e);const r=["https://trampoline.turbowarp.org/api/projects/"+t,"https://trampoline.turbowarp.xyz/api/projects/"+t];let n=null;for(const s of r)try{const r=await f.default(s,{signal:e.signal});if(404===r.status)throw new l(t+" is unshared or does not exist");if(!r.ok)throw new c(s,r.status);return await r.json()}catch(t){if(t instanceof l||(i=t)&&"AbortError"===i.name)throw t;n=t}var i;throw n},O=async(t,e)=>{let r;e=b(e);try{r=await(async(t,e,r)=>{if(e(0),"function"==typeof XMLHttpRequest)return new Promise((n,i)=>{const s=new XMLHttpRequest;s.onload=()=>{200===s.status?(e(1),n(s.response)):i(new c(t,s.status))},s.onerror=()=>{i(new Error(`Failed to fetch ${t}: xhr error`))},s.onabort=()=>{i(new d(`Failed to fetch ${t}: aborted`))},s.onprogress=t=>{t.lengthComputable&&e(t.loaded/t.total)},r&&r.addEventListener("abort",()=>{s.abort()}),s.responseType="arraybuffer",s.open("GET",t),s.send()});const n=await f.default(t);if(200!==n.status)throw new c(t,n.status);const i=+n.headers.get("content-length");if(i){let t=0;n.body.on("data",r=>{"number"==typeof n.body.bytesWritten?e(n.body.bytesWritten/i):(t+=r.length,e(t/i))})}const s=await n.arrayBuffer();return e(1),s})(t,t=>{e.onProgress&&e.onProgress("project",t,1)},e.signal)}catch(t){if(t instanceof c&&404===t.status)throw new l(t.message);throw t}const n=await T(r,e);return n.title=(t=>{const e=t.match(/\\/([^\\/]+)\\.sb[2|3]?$/);return e?e[1]:""})(t),n},I=async(t,e,r)=>{(r=b(r)).onProgress&&r.onProgress("metadata",0,1);const n=await C(t,r);r.onProgress&&r.onProgress("metadata",1,1),w(r);const i=n.project_token,s=n.title,a=e+(i?"?token="+i:""),o=await O(a,r);return s&&(o.title=s),o};e.downloadLegacyProjectFromID=(t,e)=>I(t,`https://projects.scratch.mit.edu/internalapi/project/${t}/get`,e),e.downloadProjectFromBuffer=T,e.downloadProjectFromID=(t,e)=>I(t,"https://projects.scratch.mit.edu/"+t,e),e.downloadProjectFromJSON=S,e.downloadProjectFromURL=O,e.getProjectMetadata=C},function(t,e,r){(function(e,r,n,i){t.exports=function t(e,r,n){function i(a,o){if(!r[a]){if(!e[a]){if(s)return s(a,!0);var u=new Error("Cannot find module \'"+a+"\'");throw u.code="MODULE_NOT_FOUND",u}var f=r[a]={exports:{}};e[a][0].call(f.exports,(function(t){return i(e[a][1][t]||t)}),f,f.exports,t,e,r,n)}return r[a].exports}for(var s=!1,a=0;a>2,o=(3&e)<<4|r>>4,u=1>6:64,f=2>4,r=(15&a)<<4|(o=s.indexOf(t.charAt(f++)))>>2,n=(3&o)<<6|(u=s.indexOf(t.charAt(f++))),l[h++]=e,64!==o&&(l[h++]=r),64!==u&&(l[h++]=n);return l}},{"./support":30,"./utils":32}],2:[function(t,e,r){"use strict";var n=t("./external"),i=t("./stream/DataWorker"),s=t("./stream/Crc32Probe"),a=t("./stream/DataLengthProbe");function o(t,e,r,n,i){this.compressedSize=t,this.uncompressedSize=e,this.crc32=r,this.compression=n,this.compressedContent=i}o.prototype={getContentWorker:function(){var t=new i(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),e=this;return t.on("end",(function(){if(this.streamInfo.data_length!==e.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),t},getCompressedWorker:function(){return new i(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},o.createWorkerFrom=function(t,e,r){return t.pipe(new s).pipe(new a("uncompressedSize")).pipe(e.compressWorker(r)).pipe(new a("compressedSize")).withStreamInfo("compression",e)},e.exports=o},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,e,r){"use strict";var n=t("./stream/GenericWorker");r.STORE={magic:"\\0\\0",compressWorker:function(){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},r.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,e,r){"use strict";var n=t("./utils"),i=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();e.exports=function(t,e){return void 0!==t&&t.length?"string"!==n.getTypeOf(t)?function(t,e,r,n){var s=i,a=0+r;t^=-1;for(var o=0;o>>8^s[255&(t^e[o])];return-1^t}(0|e,t,t.length):function(t,e,r,n){var s=i,a=0+r;t^=-1;for(var o=0;o>>8^s[255&(t^e.charCodeAt(o))];return-1^t}(0|e,t,t.length):0}},{"./utils":32}],5:[function(t,e,r){"use strict";r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(t,e,r){"use strict";var n;n="undefined"!=typeof Promise?Promise:t("lie"),e.exports={Promise:n}},{lie:37}],7:[function(t,e,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=t("pako"),s=t("./utils"),a=t("./stream/GenericWorker"),o=n?"uint8array":"array";function u(t,e){a.call(this,"FlateWorker/"+t),this._pako=null,this._pakoAction=t,this._pakoOptions=e,this.meta={}}r.magic="\\b\\0",s.inherits(u,a),u.prototype.processChunk=function(t){this.meta=t.meta,null===this._pako&&this._createPako(),this._pako.push(s.transformTo(o,t.data),!1)},u.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},u.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},u.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(e){t.push({data:e,meta:t.meta})}},r.compressWorker=function(t){return new u("Deflate",t)},r.uncompressWorker=function(){return new u("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,e,r){"use strict";function n(t,e){var r,n="";for(r=0;r>>=8;return n}function i(t,e,r,i,a,h){var c,l,d=t.file,p=t.compression,m=h!==o.utf8encode,g=s.transformTo("string",h(d.name)),y=s.transformTo("string",o.utf8encode(d.name)),_=d.comment,b=s.transformTo("string",h(_)),w=s.transformTo("string",o.utf8encode(_)),v=y.length!==d.name.length,k=w.length!==_.length,E="",x="",A="",S=d.dir,T=d.date,C={crc32:0,compressedSize:0,uncompressedSize:0};e&&!r||(C.crc32=t.crc32,C.compressedSize=t.compressedSize,C.uncompressedSize=t.uncompressedSize);var O=0;e&&(O|=8),m||!v&&!k||(O|=2048);var I=0,R=0;S&&(I|=16),"UNIX"===a?(R=798,I|=function(t,e){var r=t;return t||(r=e?16893:33204),(65535&r)<<16}(d.unixPermissions,S)):(R=20,I|=function(t){return 63&(t||0)}(d.dosPermissions)),c=T.getUTCHours(),c<<=6,c|=T.getUTCMinutes(),c<<=5,c|=T.getUTCSeconds()/2,l=T.getUTCFullYear()-1980,l<<=4,l|=T.getUTCMonth()+1,l<<=5,l|=T.getUTCDate(),v&&(x=n(1,1)+n(u(g),4)+y,E+="up"+n(x.length,2)+x),k&&(A=n(1,1)+n(u(b),4)+w,E+="uc"+n(A.length,2)+A);var z="";return z+="\\n\\0",z+=n(O,2),z+=p.magic,z+=n(c,2),z+=n(l,2),z+=n(C.crc32,4),z+=n(C.compressedSize,4),z+=n(C.uncompressedSize,4),z+=n(g.length,2),z+=n(E.length,2),{fileRecord:f.LOCAL_FILE_HEADER+z+g+E,dirRecord:f.CENTRAL_FILE_HEADER+n(R,2)+z+n(b.length,2)+"\\0\\0\\0\\0"+n(I,4)+n(i,4)+g+E+b}}var s=t("../utils"),a=t("../stream/GenericWorker"),o=t("../utf8"),u=t("../crc32"),f=t("../signature");function h(t,e,r,n){a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}s.inherits(h,a),h.prototype.push=function(t){var e=t.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,a.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:r?(e+100*(r-n-1))/r:100}}))},h.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var e=this.streamFiles&&!t.file.dir;if(e){var r=i(t,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},h.prototype.closedSource=function(t){this.accumulate=!1;var e=this.streamFiles&&!t.file.dir,r=i(t,e,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),e)this.push({data:function(t){return f.DATA_DESCRIPTOR+n(t.crc32,4)+n(t.compressedSize,4)+n(t.uncompressedSize,4)}(t),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},h.prototype.flush=function(){for(var t=this.bytesWritten,e=0;e=this.index;e--)r=(r<<8)+this.byteAt(e);return this.index+=t,r},readString:function(t){return n.transformTo("string",this.readData(t))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},e.exports=i},{"../utils":32}],19:[function(t,e,r){"use strict";var n=t("./Uint8ArrayReader");function i(t){n.call(this,t)}t("../utils").inherits(i,n),i.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,e,r){"use strict";var n=t("./DataReader");function i(t){n.call(this,t)}t("../utils").inherits(i,n),i.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},i.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},i.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},i.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":32,"./DataReader":18}],21:[function(t,e,r){"use strict";var n=t("./ArrayReader");function i(t){n.call(this,t)}t("../utils").inherits(i,n),i.prototype.readData=function(t){if(this.checkOffset(t),0===t)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(t,e,r){"use strict";var n=t("../utils"),i=t("../support"),s=t("./ArrayReader"),a=t("./StringReader"),o=t("./NodeBufferReader"),u=t("./Uint8ArrayReader");e.exports=function(t){var e=n.getTypeOf(t);return n.checkSupport(e),"string"!==e||i.uint8array?"nodebuffer"===e?new o(t):i.uint8array?new u(n.transformTo("uint8array",t)):new s(n.transformTo("array",t)):new a(t)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,e,r){"use strict";r.LOCAL_FILE_HEADER="PK",r.CENTRAL_FILE_HEADER="PK",r.CENTRAL_DIRECTORY_END="PK",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",r.ZIP64_CENTRAL_DIRECTORY_END="PK",r.DATA_DESCRIPTOR="PK\\b"},{}],24:[function(t,e,r){"use strict";var n=t("./GenericWorker"),i=t("../utils");function s(t){n.call(this,"ConvertWorker to "+t),this.destType=t}i.inherits(s,n),s.prototype.processChunk=function(t){this.push({data:i.transformTo(this.destType,t.data),meta:t.meta})},e.exports=s},{"../utils":32,"./GenericWorker":28}],25:[function(t,e,r){"use strict";var n=t("./GenericWorker"),i=t("../crc32");function s(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(s,n),s.prototype.processChunk=function(t){this.streamInfo.crc32=i(t.data,this.streamInfo.crc32||0),this.push(t)},e.exports=s},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,e,r){"use strict";var n=t("../utils"),i=t("./GenericWorker");function s(t){i.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}n.inherits(s,i),s.prototype.processChunk=function(t){if(t){var e=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=e+t.data.length}i.prototype.processChunk.call(this,t)},e.exports=s},{"../utils":32,"./GenericWorker":28}],27:[function(t,e,r){"use strict";var n=t("../utils"),i=t("./GenericWorker");function s(t){i.call(this,"DataWorker");var e=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,t.then((function(t){e.dataIsReady=!0,e.data=t,e.max=t&&t.length||0,e.type=n.getTypeOf(t),e.isPaused||e._tickAndRepeat()}),(function(t){e.error(t)}))}n.inherits(s,i),s.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},s.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},s.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},s.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var t=null,e=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,e);break;case"uint8array":t=this.data.subarray(this.index,e);break;case"array":case"nodebuffer":t=this.data.slice(this.index,e)}return this.index=e,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=s},{"../utils":32,"./GenericWorker":28}],28:[function(t,e,r){"use strict";function n(t){this.name=t||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(t){this.emit("data",t)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(t){this.emit("error",t)}return!0},error:function(t){return!this.isFinished&&(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},on:function(t,e){return this._listeners[t].push(e),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(t,e){if(this._listeners[t])for(var r=0;r "+t:t}},e.exports=n},{}],29:[function(t,r,n){"use strict";var i=t("../utils"),s=t("./ConvertWorker"),a=t("./GenericWorker"),o=t("../base64"),u=t("../support"),f=t("../external"),h=null;if(u.nodestream)try{h=t("../nodejs/NodejsStreamOutputAdapter")}catch(t){}function c(t,e,r){var n=e;switch(e){case"blob":case"arraybuffer":n="uint8array";break;case"base64":n="string"}try{this._internalType=n,this._outputType=e,this._mimeType=r,i.checkSupport(n),this._worker=t.pipe(new s(n)),t.lock()}catch(t){this._worker=new a("error"),this._worker.error(t)}}c.prototype={accumulate:function(t){return function(t,r){return new f.Promise((function(n,s){var a=[],u=t._internalType,f=t._outputType,h=t._mimeType;t.on("data",(function(t,e){a.push(t),r&&r(e)})).on("error",(function(t){a=[],s(t)})).on("end",(function(){try{var t=function(t,e,r){switch(t){case"blob":return i.newBlob(i.transformTo("arraybuffer",e),r);case"base64":return o.encode(e);default:return i.transformTo(t,e)}}(f,function(t,r){var n,i=0,s=null,a=0;for(n=0;n>>6:(r<65536?e[a++]=224|r>>>12:(e[a++]=240|r>>>18,e[a++]=128|r>>>12&63),e[a++]=128|r>>>6&63),e[a++]=128|63&r);return e}(t)},r.utf8decode=function(t){return i.nodebuffer?n.transformTo("nodebuffer",t).toString("utf-8"):function(t){var e,r,i,s,a=t.length,u=new Array(2*a);for(e=r=0;e>10&1023,u[r++]=56320|1023&i)}return u.length!==r&&(u.subarray?u=u.subarray(0,r):u.length=r),n.applyFromCharCode(u)}(t=n.transformTo(i.uint8array?"uint8array":"array",t))},n.inherits(f,a),f.prototype.processChunk=function(t){var e=n.transformTo(i.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var s=e;(e=new Uint8Array(s.length+this.leftOver.length)).set(this.leftOver,0),e.set(s,this.leftOver.length)}else e=this.leftOver.concat(e);this.leftOver=null}var a=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;0<=r&&128==(192&t[r]);)r--;return r<0||0===r?e:r+o[t[r]]>e?r:e}(e),u=e;a!==e.length&&(i.uint8array?(u=e.subarray(0,a),this.leftOver=e.subarray(a,e.length)):(u=e.slice(0,a),this.leftOver=e.slice(a,e.length))),this.push({data:r.utf8decode(u),meta:t.meta})},f.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=f,n.inherits(h,a),h.prototype.processChunk=function(t){this.push({data:r.utf8encode(t.data),meta:t.meta})},r.Utf8EncodeWorker=h},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,e,n){"use strict";var i=t("./support"),s=t("./base64"),a=t("./nodejsUtils"),o=t("./external");function u(t){return t}function f(t,e){for(var r=0;r>8;this.dir=!!(16&this.externalFileAttributes),0==t&&(this.dosPermissions=63&this.externalFileAttributes),3==t&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var t=n(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=t.readInt(4))}},readExtraFields:function(t){var e,r,n,i=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index+4>>6:(r<65536?e[a++]=224|r>>>12:(e[a++]=240|r>>>18,e[a++]=128|r>>>12&63),e[a++]=128|r>>>6&63),e[a++]=128|63&r);return e},r.buf2binstring=function(t){return u(t,t.length)},r.binstring2buf=function(t){for(var e=new n.Buf8(t.length),r=0,i=e.length;r>10&1023,f[n++]=56320|1023&i)}return u(f,n)},r.utf8border=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;0<=r&&128==(192&t[r]);)r--;return r<0||0===r?e:r+a[t[r]]>e?r:e}},{"./common":41}],43:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){for(var i=65535&t|0,s=t>>>16&65535|0,a=0;0!==r;){for(r-=a=2e3>>1:t>>>1;e[r]=t}return e}();e.exports=function(t,e,r,i){var s=n,a=i+r;t^=-1;for(var o=i;o>>8^s[255&(t^e[o])];return-1^t}},{}],46:[function(t,e,r){"use strict";var n,i=t("../utils/common"),s=t("./trees"),a=t("./adler32"),o=t("./crc32"),u=t("./messages"),f=-2,h=258,c=262,l=113;function d(t,e){return t.msg=u[e],e}function p(t){return(t<<1)-(4t.avail_out&&(r=t.avail_out),0!==r&&(i.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function y(t,e){s._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,g(t.strm)}function _(t,e){t.pending_buf[t.pending++]=e}function b(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function w(t,e){var r,n,i=t.max_chain_length,s=t.strstart,a=t.prev_length,o=t.nice_match,u=t.strstart>t.w_size-c?t.strstart-(t.w_size-c):0,f=t.window,l=t.w_mask,d=t.prev,p=t.strstart+h,m=f[s+a-1],g=f[s+a];t.prev_length>=t.good_match&&(i>>=2),o>t.lookahead&&(o=t.lookahead);do{if(f[(r=e)+a]===g&&f[r+a-1]===m&&f[r]===f[s]&&f[++r]===f[s+1]){s+=2,r++;do{}while(f[++s]===f[++r]&&f[++s]===f[++r]&&f[++s]===f[++r]&&f[++s]===f[++r]&&f[++s]===f[++r]&&f[++s]===f[++r]&&f[++s]===f[++r]&&f[++s]===f[++r]&&su&&0!=--i);return a<=t.lookahead?a:t.lookahead}function v(t){var e,r,n,s,u,f,h,l,d,p,m=t.w_size;do{if(s=t.window_size-t.lookahead-t.strstart,t.strstart>=m+(m-c)){for(i.arraySet(t.window,t.window,m,m,0),t.match_start-=m,t.strstart-=m,t.block_start-=m,e=r=t.hash_size;n=t.head[--e],t.head[e]=m<=n?n-m:0,--r;);for(e=r=m;n=t.prev[--e],t.prev[e]=m<=n?n-m:0,--r;);s+=m}if(0===t.strm.avail_in)break;if(f=t.strm,h=t.window,l=t.strstart+t.lookahead,p=void 0,(d=s)<(p=f.avail_in)&&(p=d),r=0===p?0:(f.avail_in-=p,i.arraySet(h,f.input,f.next_in,p,l),1===f.state.wrap?f.adler=a(f.adler,h,p,l):2===f.state.wrap&&(f.adler=o(f.adler,h,p,l)),f.next_in+=p,f.total_in+=p,p),t.lookahead+=r,t.lookahead+t.insert>=3)for(u=t.strstart-t.insert,t.ins_h=t.window[u],t.ins_h=(t.ins_h<=3&&(t.ins_h=(t.ins_h<=3)if(n=s._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<=3&&(t.ins_h=(t.ins_h<=3&&t.match_length<=t.prev_length){for(i=t.strstart+t.lookahead-3,n=s._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=i&&(t.ins_h=(t.ins_h<t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(v(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,y(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-c&&(y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(y(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(y(t,!1),t.strm.avail_out),1)})),new x(4,4,8,4,k),new x(4,5,16,8,k),new x(4,6,32,32,k),new x(4,4,16,16,E),new x(8,16,32,32,E),new x(8,16,128,128,E),new x(8,32,128,256,E),new x(32,128,258,1024,E),new x(32,258,258,4096,E)],r.deflateInit=function(t,e){return C(t,e,8,15,8,0)},r.deflateInit2=C,r.deflateReset=T,r.deflateResetKeep=S,r.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?f:(t.state.gzhead=e,0):f},r.deflate=function(t,e){var r,i,a,u;if(!t||!t.state||5>8&255),_(i,i.gzhead.time>>16&255),_(i,i.gzhead.time>>24&255),_(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),_(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(_(i,255&i.gzhead.extra.length),_(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=o(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(_(i,0),_(i,0),_(i,0),_(i,0),_(i,0),_(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),_(i,3),i.status=l);else{var c=8+(i.w_bits-8<<4)<<8;c|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(c|=32),c+=31-c%31,i.status=l,b(i,c),0!==i.strstart&&(b(i,t.adler>>>16),b(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(a=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>a&&(t.adler=o(t.adler,i.pending_buf,i.pending-a,a)),g(t),a=i.pending,i.pending!==i.pending_buf_size));)_(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>a&&(t.adler=o(t.adler,i.pending_buf,i.pending-a,a)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(t.adler=o(t.adler,i.pending_buf,i.pending-a,a)),g(t),a=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindexa&&(t.adler=o(t.adler,i.pending_buf,i.pending-a,a)),0===u&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(t.adler=o(t.adler,i.pending_buf,i.pending-a,a)),g(t),a=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindexa&&(t.adler=o(t.adler,i.pending_buf,i.pending-a,a)),0===u&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&g(t),i.pending+2<=i.pending_buf_size&&(_(i,255&t.adler),_(i,t.adler>>8&255),t.adler=0,i.status=l)):i.status=l),0!==i.pending){if(g(t),0===t.avail_out)return i.last_flush=-1,0}else if(0===t.avail_in&&p(e)<=p(r)&&4!==e)return d(t,-5);if(666===i.status&&0!==t.avail_in)return d(t,-5);if(0!==t.avail_in||0!==i.lookahead||0!==e&&666!==i.status){var w=2===i.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(v(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,r=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(y(t,!1),0===t.strm.avail_out)?1:2}(i,e):3===i.strategy?function(t,e){for(var r,n,i,a,o=t.window;;){if(t.lookahead<=h){if(v(t),t.lookahead<=h&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&0t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=s._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=s._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(y(t,!1),0===t.strm.avail_out)?1:2}(i,e):n[i.level].func(i,e);if(3!==w&&4!==w||(i.status=666),1===w||3===w)return 0===t.avail_out&&(i.last_flush=-1),0;if(2===w&&(1===e?s._tr_align(i):5!==e&&(s._tr_stored_block(i,0,0,!1),3===e&&(m(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),g(t),0===t.avail_out))return i.last_flush=-1,0}return 4!==e?0:i.wrap<=0?1:(2===i.wrap?(_(i,255&t.adler),_(i,t.adler>>8&255),_(i,t.adler>>16&255),_(i,t.adler>>24&255),_(i,255&t.total_in),_(i,t.total_in>>8&255),_(i,t.total_in>>16&255),_(i,t.total_in>>24&255)):(b(i,t.adler>>>16),b(i,65535&t.adler)),g(t),0=r.w_size&&(0===o&&(m(r.head),r.strstart=0,r.block_start=0,r.insert=0),l=new i.Buf8(r.w_size),i.arraySet(l,e,d-r.w_size,r.w_size,0),e=l,d=r.w_size),u=t.avail_in,h=t.next_in,c=t.input,t.avail_in=d,t.next_in=0,t.input=e,v(r);r.lookahead>=3;){for(n=r.strstart,s=r.lookahead-2;r.ins_h=(r.ins_h<>>=w=b>>>24,p-=w,0==(w=b>>>16&255))S[s++]=65535&b;else{if(!(16&w)){if(0==(64&w)){b=m[(65535&b)+(d&(1<>>=w,p-=w),p<15&&(d+=A[n++]<>>=w=b>>>24,p-=w,!(16&(w=b>>>16&255))){if(0==(64&w)){b=g[(65535&b)+(d&(1<>>=w,p-=w,(w=s-a)>3,d&=(1<<(p-=v<<3))-1,t.next_in=n,t.next_out=s,t.avail_in=n>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function h(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function c(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new n.Buf32(852),e.distcode=e.distdyn=new n.Buf32(592),e.sane=1,e.back=-1,0):u}function l(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,c(t)):u}function d(t,e){var r,n;return t&&t.state?(n=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||15=a.wsize?(n.arraySet(a.window,e,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(i<(s=a.wsize-a.wnext)&&(s=i),n.arraySet(a.window,e,r-i,s,a.wnext),(i-=s)?(n.arraySet(a.window,e,r-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=s,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,r.check=s(r.check,U,2,0),y=g=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&g)<<8)+(g>>8))%31){t.msg="incorrect header check",r.mode=30;break}if(8!=(15&g)){t.msg="unknown compression method",r.mode=30;break}if(y-=4,R=8+(15&(g>>>=4)),0===r.wbits)r.wbits=R;else if(R>r.wbits){t.msg="invalid window size",r.mode=30;break}r.dmax=1<>8&1),512&r.flags&&(U[0]=255&g,U[1]=g>>>8&255,r.check=s(r.check,U,2,0)),y=g=0,r.mode=3;case 3:for(;y<32;){if(0===p)break t;p--,g+=h[l++]<>>8&255,U[2]=g>>>16&255,U[3]=g>>>24&255,r.check=s(r.check,U,4,0)),y=g=0,r.mode=4;case 4:for(;y<16;){if(0===p)break t;p--,g+=h[l++]<>8),512&r.flags&&(U[0]=255&g,U[1]=g>>>8&255,r.check=s(r.check,U,2,0)),y=g=0,r.mode=5;case 5:if(1024&r.flags){for(;y<16;){if(0===p)break t;p--,g+=h[l++]<>>8&255,r.check=s(r.check,U,2,0)),y=g=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(p<(k=r.length)&&(k=p),k&&(r.head&&(R=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,h,l,k,R)),512&r.flags&&(r.check=s(r.check,h,k,l)),p-=k,l+=k,r.length-=k),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===p)break t;for(k=0;R=h[l+k++],r.head&&R&&r.length<65536&&(r.head.name+=String.fromCharCode(R)),R&&k>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=12;break;case 10:for(;y<32;){if(0===p)break t;p--,g+=h[l++]<>>=7&y,y-=7&y,r.mode=27;break}for(;y<3;){if(0===p)break t;p--,g+=h[l++]<>>=1)){case 0:r.mode=14;break;case 1:if(_(r),r.mode=20,6!==e)break;g>>>=2,y-=2;break t;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=30}g>>>=2,y-=2;break;case 14:for(g>>>=7&y,y-=7&y;y<32;){if(0===p)break t;p--,g+=h[l++]<>>16^65535)){t.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&g,y=g=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(k=r.length){if(p>>=5,y-=5,r.ndist=1+(31&g),g>>>=5,y-=5,r.ncode=4+(15&g),g>>>=4,y-=4,286>>=3,y-=3}for(;r.have<19;)r.lens[j[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,B={bits:r.lenbits},z=o(0,r.lens,0,19,r.lencode,0,r.work,B),r.lenbits=B.bits,z){t.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,T=65535&D,!((A=D>>>24)<=y);){if(0===p)break t;p--,g+=h[l++]<>>=A,y-=A,r.lens[r.have++]=T;else{if(16===T){for(P=A+2;y>>=A,y-=A,0===r.have){t.msg="invalid bit length repeat",r.mode=30;break}R=r.lens[r.have-1],k=3+(3&g),g>>>=2,y-=2}else if(17===T){for(P=A+3;y>>=A)),g>>>=3,y-=3}else{for(P=A+7;y>>=A)),g>>>=7,y-=7}if(r.have+k>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=30;break}for(;k--;)r.lens[r.have++]=R}}if(30===r.mode)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,B={bits:r.lenbits},z=o(1,r.lens,0,r.nlen,r.lencode,0,r.work,B),r.lenbits=B.bits,z){t.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,B={bits:r.distbits},z=o(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,B),r.distbits=B.bits,z){t.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(6<=p&&258<=m){t.next_out=d,t.avail_out=m,t.next_in=l,t.avail_in=p,r.hold=g,r.bits=y,a(t,v),d=t.next_out,c=t.output,m=t.avail_out,l=t.next_in,h=t.input,p=t.avail_in,g=r.hold,y=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;S=(D=r.lencode[g&(1<>>16&255,T=65535&D,!((A=D>>>24)<=y);){if(0===p)break t;p--,g+=h[l++]<>C)])>>>16&255,T=65535&D,!(C+(A=D>>>24)<=y);){if(0===p)break t;p--,g+=h[l++]<>>=C,y-=C,r.back+=C}if(g>>>=A,y-=A,r.back+=A,r.length=T,0===S){r.mode=26;break}if(32&S){r.back=-1,r.mode=12;break}if(64&S){t.msg="invalid literal/length code",r.mode=30;break}r.extra=15&S,r.mode=22;case 22:if(r.extra){for(P=r.extra;y>>=r.extra,y-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;S=(D=r.distcode[g&(1<>>16&255,T=65535&D,!((A=D>>>24)<=y);){if(0===p)break t;p--,g+=h[l++]<>C)])>>>16&255,T=65535&D,!(C+(A=D>>>24)<=y);){if(0===p)break t;p--,g+=h[l++]<>>=C,y-=C,r.back+=C}if(g>>>=A,y-=A,r.back+=A,64&S){t.msg="invalid distance code",r.mode=30;break}r.offset=T,r.extra=15&S,r.mode=24;case 24:if(r.extra){for(P=r.extra;y>>=r.extra,y-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===m)break t;if(k=v-m,r.offset>k){if((k=r.offset-k)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=30;break}E=k>r.wnext?(k-=r.wnext,r.wsize-k):r.wnext-k,k>r.length&&(k=r.length),x=r.window}else x=c,E=d-r.offset,k=r.length;for(m_?(w=j[L+c[x]],B[P+c[x]]):(w=96,0),d=1<>O)+(p-=d)]=b<<24|w<<16|v|0,0!==p;);for(d=1<>=1;if(0!==d?(z&=d-1,z+=d):z=0,x++,0==--D[E]){if(E===S)break;E=e[r+c[x]]}if(T>>7)]}function A(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function S(t,e,r){t.bi_valid>16-r?(t.bi_buf|=e<>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<>>=1,r<<=1,0<--e;);return r>>>1}function O(t,e,r){var n,i,s=new Array(16),a=0;for(n=1;n<=u;n++)s[n]=a=a+r[n-1]<<1;for(i=0;i<=e;i++){var o=t[2*i+1];0!==o&&(t[2*i]=C(s[o]++,o))}}function I(t){var e;for(e=0;e>1;1<=r;r--)B(t,s,r);for(i=f;r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],B(t,s,1),n=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=n,s[2*i]=s[2*r]+s[2*n],t.depth[i]=(t.depth[r]>=t.depth[n]?t.depth[r]:t.depth[n])+1,s[2*r+1]=s[2*n+1]=i,t.heap[1]=i++,B(t,s,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,n,i,s,a,o,f=e.dyn_tree,h=e.max_code,c=e.stat_desc.static_tree,l=e.stat_desc.has_stree,d=e.stat_desc.extra_bits,p=e.stat_desc.extra_base,m=e.stat_desc.max_length,g=0;for(s=0;s<=u;s++)t.bl_count[s]=0;for(f[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<573;r++)m<(s=f[2*f[2*(n=t.heap[r])+1]+1]+1)&&(s=m,g++),f[2*n+1]=s,h>=7;n>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e>>3,(a=t.static_len+3+7>>>3)<=i&&(i=a)):i=a=r+5,r+4<=i&&-1!==e?N(t,e,r,n):4===t.strategy||a===i?(S(t,2+(n?1:0),3),P(t,d,p)):(S(t,4+(n?1:0),3),function(t,e,r,n){var i;for(S(t,e-257,5),S(t,r-1,5),S(t,n-4,4),i=0;i>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(g[r]+s+1)]++,t.dyn_dtree[2*x(e)]++),t.last_lit===t.lit_bufsize-1},r._tr_align=function(t){S(t,2,3),T(t,256,d),function(t){16===t.bi_valid?(A(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):8<=t.bi_valid&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},{"../utils/common":41}],53:[function(t,e,r){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,e,r){(function(t){!function(t,e){"use strict";if(!t.setImmediate){var r,n,s,a,o=1,u={},f=!1,h=t.document,c=Object.getPrototypeOf&&Object.getPrototypeOf(t);c=c&&c.setTimeout?c:t,r="[object process]"==={}.toString.call(t.process)?function(t){i.nextTick((function(){d(t)}))}:function(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=r,e}}()?(a="setImmediate$"+Math.random()+"$",t.addEventListener?t.addEventListener("message",p,!1):t.attachEvent("onmessage",p),function(e){t.postMessage(a+e,"*")}):t.MessageChannel?((s=new MessageChannel).port1.onmessage=function(t){d(t.data)},function(t){s.port2.postMessage(t)}):h&&"onreadystatechange"in h.createElement("script")?(n=h.documentElement,function(t){var e=h.createElement("script");e.onreadystatechange=function(){d(t),e.onreadystatechange=null,n.removeChild(e),e=null},n.appendChild(e)}):function(t){setTimeout(d,0,t)},c.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n\n * @license MIT\n */\nvar n=r(5),i=r(6),s=r(7);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function o(t,e){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function p(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return M(t).length;default:if(n)return F(t).length;e=(""+e).toLowerCase(),n=!0}}function m(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return O(this,e,r);case"utf8":case"utf-8":return S(this,e,r);case"ascii":return T(this,e,r);case"latin1":case"binary":return C(this,e,r);case"base64":return A(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function g(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function y(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:_(t,e,r,n,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):_(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function _(t,e,r,n,i){var s,a=1,o=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,o/=2,u/=2,r/=2}function f(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var h=-1;for(s=r;so&&(r=o-u),s=r;s>=0;s--){for(var c=!0,l=0;li&&(n=i):n=i;var s=e.length;if(s%2!=0)throw new TypeError("Invalid hex string");n>s/2&&(n=s/2);for(var a=0;a>8,i=r%256,s.push(i),s.push(n);return s}(e,t.length-r),t,r,n)}function A(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function S(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i239?4:f>223?3:f>191?2:1;if(i+c<=r)switch(c){case 1:f<128&&(h=f);break;case 2:128==(192&(s=t[i+1]))&&(u=(31&f)<<6|63&s)>127&&(h=u);break;case 3:s=t[i+1],a=t[i+2],128==(192&s)&&128==(192&a)&&(u=(15&f)<<12|(63&s)<<6|63&a)>2047&&(u<55296||u>57343)&&(h=u);break;case 4:s=t[i+1],a=t[i+2],o=t[i+3],128==(192&s)&&128==(192&a)&&128==(192&o)&&(u=(15&f)<<18|(63&s)<<12|(63&a)<<6|63&o)>65535&&u<1114112&&(h=u)}null===h?(h=65533,c=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),i+=c}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},u.prototype.compare=function(t,e,r,n,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var s=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),o=Math.min(s,a),f=this.slice(n,i),h=t.slice(e,r),c=0;ci)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return b(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":return v(this,t,e,r);case"latin1":case"binary":return k(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,r);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function T(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;in)&&(r=n);for(var i="",s=e;sr)throw new RangeError("Trying to access beyond buffer length")}function z(t,e,r,n,i,s){if(!u.isBuffer(t))throw new TypeError(\'"buffer" argument must be a Buffer instance\');if(e>i||et.length)throw new RangeError("Index out of range")}function B(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,s=Math.min(t.length-r,2);i>>8*(n?i:1-i)}function P(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,s=Math.min(t.length-r,4);i>>8*(n?i:3-i)&255}function D(t,e,r,n,i,s){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(t,e,r,n,s){return s||D(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function j(t,e,r,n,s){return s||D(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUInt8=function(t,e){return e||R(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||R(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||R(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||R(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||R(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||R(t,e,this.length);for(var n=this[t],i=1,s=0;++s=(i*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||R(t,e,this.length);for(var n=e,i=1,s=this[t+--n];n>0&&(i*=256);)s+=this[t+--n]*i;return s>=(i*=128)&&(s-=Math.pow(2,8*e)),s},u.prototype.readInt8=function(t,e){return e||R(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||R(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||R(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||R(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||R(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||R(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||R(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||R(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||R(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||z(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,s=0;for(this[e]=255&t;++s=0&&(s*=256);)this[e+i]=t/s&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||z(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||z(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):B(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||z(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):B(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||z(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):P(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||z(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):P(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);z(this,t,e,r,i-1,-i)}var s=0,a=1,o=0;for(this[e]=255&t;++s>0)-o&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);z(this,t,e,r,i-1,-i)}var s=r-1,a=1,o=0;for(this[e+s]=255&t;--s>=0&&(a*=256);)t<0&&0===o&&0!==this[e+s+1]&&(o=1),this[e+s]=(t/a>>0)-o&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||z(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||z(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):B(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||z(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):B(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||z(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):P(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||z(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):P(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return U(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return U(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return j(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return j(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--i)t[i+e]=this[i+r];else if(s<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(s=e;s55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&s.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&s.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;s.push(r)}else if(r<2048){if((e-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return s}function M(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\\s+|\\s+$/g,"")}(t).replace(L,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function W(t,e,r,n){for(var i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(this,r(0))},function(t,e,r){"use strict";e.byteLength=function(t){var e=f(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,n=f(t),a=n[0],o=n[1],u=new s(function(t,e,r){return 3*(e+r)/4-r}(0,a,o)),h=0,c=o>0?a-4:a;for(r=0;r>16&255,u[h++]=e>>8&255,u[h++]=255&e;2===o&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,u[h++]=255&e);1===o&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,u[h++]=e>>8&255,u[h++]=255&e);return u},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,s=[],a=0,o=r-i;ao?o:a+16383));1===i?(e=t[r-1],s.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],s.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"="));return s.join("")};for(var n=[],i=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,u=a.length;o0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function h(t,e,r){for(var i,s,a=[],o=e;o>18&63]+n[s>>12&63]+n[s>>6&63]+n[63&s]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){\n/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\ne.read=function(t,e,r,n,i){var s,a,o=8*i-n-1,u=(1<>1,h=-7,c=r?i-1:0,l=r?-1:1,d=t[e+c];for(c+=l,s=d&(1<<-h)-1,d>>=-h,h+=o;h>0;s=256*s+t[e+c],c+=l,h-=8);for(a=s&(1<<-h)-1,s>>=-h,h+=n;h>0;a=256*a+t[e+c],c+=l,h-=8);if(0===s)s=1-f;else{if(s===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),s-=f}return(d?-1:1)*a*Math.pow(2,s-n)},e.write=function(t,e,r,n,i,s){var a,o,u,f=8*s-i-1,h=(1<>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:s-1,p=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(o=isNaN(e)?1:0,a=h):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+c>=1?l/u:l*Math.pow(2,1-c))*u>=2&&(a++,u/=2),a+c>=h?(o=0,a=h):a+c>=1?(o=(e*u-1)*Math.pow(2,i),a+=c):(o=e*Math.pow(2,c-1)*Math.pow(2,i),a=0));i>=8;t[r+d]=255&o,d+=p,o/=256,i-=8);for(a=a<0;t[r+d]=255&a,d+=p,a/=256,f-=8);t[r+d-p]|=128*m}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){(function(t){var n=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function s(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new s(i.call(setTimeout,n,arguments),clearTimeout)},e.setInterval=function(){return new s(i.call(setInterval,n,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},s.prototype.unref=s.prototype.ref=function(){},s.prototype.close=function(){this._clearFn.call(n,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},r(9),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,r(0))},function(t,e,r){(function(t,e){!function(t,r){"use strict";if(!t.setImmediate){var n,i,s,a,o,u=1,f={},h=!1,c=t.document,l=Object.getPrototypeOf&&Object.getPrototypeOf(t);l=l&&l.setTimeout?l:t,"[object process]"==={}.toString.call(t.process)?n=function(t){e.nextTick((function(){p(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=r,e}}()?t.MessageChannel?((s=new MessageChannel).port1.onmessage=function(t){p(t.data)},n=function(t){s.port2.postMessage(t)}):c&&"onreadystatechange"in c.createElement("script")?(i=c.documentElement,n=function(t){var e=c.createElement("script");e.onreadystatechange=function(){p(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):n=function(t){setTimeout(p,0,t)}:(a="setImmediate$"+Math.random()+"$",o=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(a)&&p(+e.data.slice(a.length))},t.addEventListener?t.addEventListener("message",o,!1):t.attachEvent("onmessage",o),n=function(e){t.postMessage(a+e,"*")}),l.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),r=0;r-1};function f(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\\-#$%&\'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function h(t){return"string"!=typeof t&&(t=String(t)),t}function c(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return n&&(e[Symbol.iterator]=function(){return e}),e}function l(t){this.map={},t instanceof l?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function d(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function p(t){return new Promise((function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}}))}function m(t){var e=new FileReader,r=p(e);return e.readAsArrayBuffer(t),r}function g(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:i&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:s&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:r&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():a&&i&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=g(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(t)||u(t))?this._bodyArrayBuffer=g(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):r&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var t=d(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?d(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(m)}),this.text=function(){var t,e,r,n=d(this);if(n)return n;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,r=p(e),e.readAsText(t),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n-1?n:r),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function w(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var r=t.split("="),n=r.shift().replace(/\\+/g," "),i=r.join("=").replace(/\\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(i))}})),e}function v(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new l(e.headers),this.url=e.url||"",this._initBody(t)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},y.call(b.prototype),y.call(v.prototype),v.prototype.clone=function(){return new v(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new l(this.headers),url:this.url})},v.error=function(){var t=new v(null,{status:0,statusText:""});return t.type="error",t};var k=[301,302,303,307,308];v.redirect=function(t,e){if(-1===k.indexOf(e))throw new RangeError("Invalid status code");return new v(null,{status:e,headers:{location:t}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function E(t,r){return new Promise((function(n,s){var a=new b(t,r);if(a.signal&&a.signal.aborted)return s(new e.DOMException("Aborted","AbortError"));var o=new XMLHttpRequest;function u(){o.abort()}o.onload=function(){var t,e,r={status:o.status,statusText:o.statusText,headers:(t=o.getAllResponseHeaders()||"",e=new l,t.replace(/\\r?\\n[\\t ]+/g," ").split(/\\r?\\n/).forEach((function(t){var r=t.split(":"),n=r.shift().trim();if(n){var i=r.join(":").trim();e.append(n,i)}})),e)};r.url="responseURL"in o?o.responseURL:r.headers.get("X-Request-URL");var i="response"in o?o.response:o.responseText;n(new v(i,r))},o.onerror=function(){s(new TypeError("Network request failed"))},o.ontimeout=function(){s(new TypeError("Network request failed"))},o.onabort=function(){s(new e.DOMException("Aborted","AbortError"))},o.open(a.method,a.url,!0),"include"===a.credentials?o.withCredentials=!0:"omit"===a.credentials&&(o.withCredentials=!1),"responseType"in o&&i&&(o.responseType="blob"),a.headers.forEach((function(t,e){o.setRequestHeader(e,t)})),a.signal&&(a.signal.addEventListener("abort",u),o.onreadystatechange=function(){4===o.readyState&&a.signal.removeEventListener("abort",u)}),o.send(void 0===a._bodyInit?null:a._bodyInit)}))}E.polyfill=!0,t.fetch||(t.fetch=E,t.Headers=l,t.Request=b,t.Response=v),e.Headers=l,e.Request=b,e.Response=v,e.fetch=E,Object.defineProperty(e,"__esModule",{value:!0})}({})}(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=n;(e=i.fetch).default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,t.exports=e},function(t,e,r){"use strict";r.r(e),r.d(e,"_parse",(function(){return n})),r.d(e,"parse",(function(){return i})),r.d(e,"stringify",(function(){return s}));const n=t=>{let e=0;const r=r=>{const{line:n,column:i}=(()=>{let r=0,n=0;for(let i=0;i(e>=t.length&&r("Unexpected end of input"),t[e]),i=()=>n(e),s=()=>{e++},a=t=>{i()!==t&&r(`Expected \'${t}\' but found \'${i()}\'`),s()},o=(r=1,i=1)=>{if(e+i+r>t.length)return"";if(1===r)return n(e+i);let s="";for(let t=0;t{for(;;)if(/\\s/.test(i()))s();else{const t=o(2,0);if("//"===t)for(s(),s();"\\n"!==i();)s();else{if("/*"!==t)break;for(s(),s();"*/"!==o(2,0);)s();s(),s()}}},f=()=>{u();switch(i()){case\'"\':return l();case"{":return p();case"[":return d();case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":case"-":return c();default:return h()}},h=()=>{if("null"===o(4,0)){for(let t=0;t<4;t++)s();return null}if("true"===o(4,0)){for(let t=0;t<4;t++)s();return!0}if("false"===o(5,0)){for(let t=0;t<5;t++)s();return!1}if("Infinity"===o(8,0)){for(let t=0;t<8;t++)s();return 1/0}if("NaN"===o(3,0)){for(let t=0;t<3;t++)s();return NaN}r(`Unexpected character \'${i()}\'`)},c=()=>{if("-Infinity"===o(9,0)){for(let t=0;t<9;t++)s();return-1/0}let t="";for(;t+=i(),/[\\d.e+-]/i.test(o());)s();s();const e=+t;return Number.isNaN(e)&&r("Not a number: "+t),e},l=()=>{a(\'"\');let t="";for(;;){const e=i();if(\'"\'===e)break;if("\\\\"===e)switch(s(),i()){case\'"\':t+=\'"\';break;case"/":t+="/";break;case"\\\\":t+="\\\\";break;case"b":t+="\\b";break;case"f":t+="\\f";break;case"n":t+="\\n";break;case"r":t+="\\r";break;case"t":t+="\\t";break;case"u":{let e="";for(let t=0;t<4;t++){s();const t=i();/[0-9a-f]/i.test(t)||r("Invalid hex code: "+t),e+=t}const n=Number.parseInt(e,16);t+=String.fromCharCode(n);break}default:r("Invalid escape code: \\\\"+i())}else t+=e;s()}return a(\'"\'),t},d=()=>{a("["),u();const t=[];for(;u(),"]"!==i();){const e=f();if(t.push(e),u(),","!==i())break;s()}return a("]"),t},p=()=>{a("{"),u();const t={};for(;u(),"}"!==i();){const e=l();u(),a(":");const r=f();if(t[e]=r,u(),","!==i())break;s()}return a("}"),t};return f()},i=t=>{try{return JSON.parse(t)}catch(e){try{return n(t)}catch(t){throw e}}},s=t=>{if("string"==typeof t)return JSON.stringify(t);if("number"==typeof t||"boolean"==typeof t)return t.toString();if(null==t||"symbol"==typeof t)return"null";if(Array.isArray(t))return`[${t.map(t=>s(t)).join(",")}]`;if("object"==typeof t){let e="{",r=!0;const n=Object.keys(t);for(let i=0;i"object"==typeof t&&null!==t||"function"==typeof t,h=new Map([["proxy",{canHandle:t=>f(t)&&t[i],serialize(t){const{port1:e,port2:r}=new MessageChannel;return c(t,e),[r,[r]]},deserialize(t){return t.start(),function t(e,r=[],n=function(){}){let i=!1;const o=new Proxy(n,{get(n,s){if(d(i),s===a)return()=>{!function(t){g&&g.unregister(t)}(o),p(e),i=!0};if("then"===s){if(0===r.length)return{then:()=>o};const t=v(e,{type:"GET",path:r.map(t=>t.toString())}).then(w);return t.then.bind(t)}return t(e,[...r,s])},set(t,n,s){d(i);const[a,o]=b(s);return v(e,{type:"SET",path:[...r,n].map(t=>t.toString()),value:a},o).then(w)},apply(n,a,o){d(i);const u=r[r.length-1];if(u===s)return v(e,{type:"ENDPOINT"}).then(w);if("bind"===u)return t(e,r.slice(0,-1));const[f,h]=y(o);return v(e,{type:"APPLY",path:r.map(t=>t.toString()),argumentList:f},h).then(w)},construct(t,n){d(i);const[s,a]=y(n);return v(e,{type:"CONSTRUCT",path:r.map(t=>t.toString()),argumentList:s},a).then(w)}});return function(t,e){const r=(m.get(e)||0)+1;m.set(e,r),g&&g.register(t,e,t)}(o,e),o}(t,[],e);var e}}],["throw",{canHandle:t=>f(t)&&u in t,serialize({value:t}){let e;return e=t instanceof Error?{isError:!0,value:{message:t.message,name:t.name,stack:t.stack}}:{isError:!1,value:t},[e,[]]},deserialize(t){if(t.isError)throw Object.assign(new Error(t.value.message),t.value);throw t.value}}]]);function c(t,e=globalThis,r=["*"]){e.addEventListener("message",(function n(s){if(!s||!s.data)return;if(!function(t,e){for(const r of t){if(e===r||"*"===r)return!0;if(r instanceof RegExp&&r.test(e))return!0}return!1}(r,s.origin))return void console.warn(`Invalid origin \'${s.origin}\' for comlink proxy`);const{id:a,type:f,path:h}=Object.assign({path:[]},s.data),d=(s.data.argumentList||[]).map(w);let p;try{const e=h.slice(0,-1).reduce((t,e)=>t[e],t),r=h.reduce((t,e)=>t[e],t);switch(f){case"GET":p=r;break;case"SET":e[h.slice(-1)[0]]=w(s.data.value),p=!0;break;case"APPLY":p=r.apply(e,d);break;case"CONSTRUCT":p=function(t){return Object.assign(t,{[i]:!0})}(new r(...d));break;case"ENDPOINT":{const{port1:e,port2:r}=new MessageChannel;c(t,r),p=function(t,e){return _.set(t,e),t}(e,[e])}break;case"RELEASE":p=void 0;break;default:return}}catch(t){p={value:t,[u]:0}}Promise.resolve(p).catch(t=>({value:t,[u]:0})).then(r=>{const[i,s]=b(r);e.postMessage(Object.assign(Object.assign({},i),{id:a}),s),"RELEASE"===f&&(e.removeEventListener("message",n),l(e),o in t&&"function"==typeof t[o]&&t[o]())}).catch(t=>{const[r,n]=b({value:new TypeError("Unserializable return value"),[u]:0});e.postMessage(Object.assign(Object.assign({},r),{id:a}),n)})})),e.start&&e.start()}function l(t){(function(t){return"MessagePort"===t.constructor.name})(t)&&t.close()}function d(t){if(t)throw new Error("Proxy has been released and is not useable")}function p(t){return v(t,{type:"RELEASE"}).then(()=>{l(t)})}const m=new WeakMap,g="FinalizationRegistry"in globalThis&&new FinalizationRegistry(t=>{const e=(m.get(t)||0)-1;m.set(t,e),0===e&&p(t)});function y(t){const e=t.map(b);return[e.map(t=>t[0]),(r=e.map(t=>t[1]),Array.prototype.concat.apply([],r))];var r}const _=new WeakMap;function b(t){for(const[e,r]of h)if(r.canHandle(t)){const[n,i]=r.serialize(t);return[{type:"HANDLER",name:e,value:n},i]}return[{type:"RAW",value:t},_.get(t)||[]]}function w(t){switch(t.type){case"HANDLER":return h.get(t.name).deserialize(t.value);case"RAW":return t.value}}function v(t,e,r){return new Promise(n=>{const i=new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-");t.addEventListener("message",(function e(r){r.data&&r.data.id&&r.data.id===i&&(t.removeEventListener("message",e),n(r.data))})),t.start&&t.start(),t.postMessage(Object.assign({id:i},e),r)})}const k="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!#%()*+,-./:;=?@[]^_`{|}~",E=t=>{let e="";for(;t>=0;)e=k[t%k.length]+e,t=Math.floor(t/k.length)-1;return e};class x{constructor(){this.generatedIds=new Map,this.references=new Map,this.skippedIds=new Set,this.skippedIds.add("of")}skip(t){this.skippedIds.add(t)}addReference(t){const e=this.references.get(t)||0;this.references.set(t,e+1)}generateNewIds(){const t=Array.from(this.references.entries());t.sort((t,e)=>e[1]-t[1]);let e=0;for(const r of t){const t=r[0];let n=E(e);for(;this.skippedIds.has(n);)e++,n=E(e);this.generatedIds.set(t,n),e++}}getNewId(t){return this.generatedIds.has(t)?this.generatedIds.get(t):t}}var A=t=>{const e=new x;for(const r of t.targets)for(const[t,n]of Object.entries(r.blocks))if(e.addReference(t),!Array.isArray(n)){n.parent&&e.addReference(n.parent),n.next&&e.addReference(n.next);for(const t of Object.values(n.inputs))for(let r=1;r{}))=>{let r={stageVariables:[],stageComments:[],usesMusic:!0,extensions:[]};const n={onProgress(t,r,n){e(t,r,n)},processJSON(t,e){if("sb3"===t)return(t=>{(t=>{const e=t.targets.find(t=>t.isStage);if(e)for(const t of Object.values(e.variables)){t[0].startsWith("☁")&&(t[2]=!0)}})(t),A(t)})(e),r=(t=>{const e=t.targets[0];if(!e||!e.isStage)throw new Error("Project does not have stage");return{stageVariables:[],stageComments:[],usesMusic:!0,extensions:[],stageVariables:Object.values(e.variables).map(([t,e,r])=>({name:t,isCloud:!!r})),stageComments:Object.values(e.comments).map(t=>t.text),usesMusic:t.extensions.includes("music"),extensions:t.extensionURLs?Object.values(t.extensionURLs):[]}})(e),e;"sb2"===t&&(r=(t=>{const e=(t.variables||[]).map(({name:t,isPersistent:e})=>({name:t,isCloud:e})),r=JSON.stringify(t);return{stageVariables:[],stageComments:[],usesMusic:!0,extensions:[],stageVariables:e,usesMusic:r.includes("drum:duration:elapsed:from:")||r.includes("playDrum")||r.includes("noteOn:duration:elapsed:from:")}})(e))}},i=await Object(S.downloadProjectFromBuffer)(t,n);return"sb3"!==i.type&&(i.type="blob"),i.analysis=r,i};postMessage("ready"),c(n)}]);', ]), t = URL.createObjectURL(e), r = new Worker(t); return ( URL.revokeObjectURL(t), new Promise((e, t) => { const n = () => { r.terminate(); }, i = (t) => { "ready" === t.data && (a(), e({ worker: T(r), terminate: n })); }, o = () => { a(), t( new Error( "Worker js/download-project.b2fbf3b205f351ccd306.worker.js failed to load. Usually this will be fixed after refreshing." ) ); }, a = () => { r.removeEventListener("message", i), r.removeEventListener("error", o); }; r.addEventListener("message", i), r.addEventListener("error", o); }) ); }, q = r(9); const V = async (e, t) => { const { worker: r, terminate: n } = await W(); let i; return { promise: new Promise((o, a) => { r .downloadProject(N(e, [e]), M(t)) .then((e) => { n(), o(e); }) .catch((e) => { n(), a(e); }), (i = () => { n(), a(new w.a()); }); }), terminate: i, }; }, Z = async (e, t) => { const r = await Object(k.a)({ url: e, type: "arraybuffer", progressCallback: (e) => { t("fetch", e); }, }); return V(r, t); }; var Y = (e, t, r) => Z( `https://projects.scratch.mit.edu/${e}${ t ? "?token=" + t : "" }`, r ), G = Z, Q = async (e, t) => { const r = await Object(q.a)(e); return V(r, t); }; const J = (e) => { const t = e.match(/\d+/); return t ? t[0] : ""; }; var K = r(26); const X = (e, t) => { t || (t = "Untitled"); const r = new File([e], t), n = new DataTransfer(); return n.items.add(r), n.files; }; var ee = ({ onStartImporting: e, onFinishImporting: t, onCancelImporting: r, }) => { if ("function" == typeof GlobalPackagerImporter) return void (async ({ onStartImporting: e, onFinishImporting: t, onCancelImporting: r, }) => { try { e(); const { data: r, name: n } = await GlobalPackagerImporter(); t(X(r, n)); } catch (e) { r(); } })({ onStartImporting: e, onFinishImporting: t, onCancelImporting: r, }); const n = new URLSearchParams(location.search); n.has("import_from") && (({ origin: e, onStartImporting: t, onFinishImporting: r, onCancelImporting: n, }) => { if (!e.startsWith("http:") && !e.startsWith("https:")) return void console.warn("Import ignored: invalid origin"); const i = window.opener || window.parent; if (!i || i === window) return void console.warn( "Import ignored: cannot find parent window or opener" ); let o = !1, a = !1; const s = (i) => { if (i.origin !== e) return; const s = i.data && i.data.p4; s && (o ? a || ("finish-import" === s.type ? (c(), r(X(s.data, s.name))) : "cancel-import" === s.type && (c(), n())) : "start-import" === s.type && ((o = !0), t())); }; window.addEventListener("message", s); const c = () => { (a = !0), window.removeEventListener("message", s); }; ((t) => { try { i.postMessage({ p4: t }, e); } catch (e) { console.warn("Cannot post message", e); } })({ type: "ready-for-import" }); })({ origin: n.get("import_from"), onStartImporting: e, onFinishImporting: t, onCancelImporting: r, }); }; function te(e) { Object(n.e)( e, "svelte-3d81jx", 'input[type="text"].svelte-3d81jx{max-width:300px;flex-grow:1}.options.svelte-3d81jx{margin:12px 0}.option.svelte-3d81jx{min-height:25px;display:flex;align-items:center;flex-wrap:wrap}input[type="text"].svelte-3d81jx,input[type="file"].svelte-3d81jx{margin-left:4px}' ); } function re(e) { let t, r; return ( (t = new v({})), t.$on("cancel", e[18]), { c() { Object(n.o)(t.$$.fragment); }, m(e, i) { Object(n.H)(t, e, i), (r = !0); }, p: n.I, i(e) { r || (Object(n.cb)(t.$$.fragment, e), (r = !0)); }, o(e) { Object(n.db)(t.$$.fragment, e), (r = !1); }, d(e) { Object(n.s)(t, e); }, } ); } function ne(e) { let t, r, i, o; return { c() { (t = Object(n.v)("input")), Object(n.g)(t, "type", "text"), (t.value = r = e[10]()), Object(n.g)(t, "spellcheck", "false"), Object(n.g)(t, "class", "svelte-3d81jx"); }, m(r, a) { Object(n.E)(r, t, a), i || ((o = [ Object(n.G)(t, "keypress", e[11]), Object(n.G)(t, "input", e[12]), Object(n.G)(t, "focus", e[13]), ]), (i = !0)); }, p: n.I, d(e) { e && Object(n.u)(t), (i = !1), Object(n.L)(o); }, }; } function ie(e) { let t, r, i; return { c() { (t = Object(n.v)("input")), Object(n.g)(t, "type", "text"), Object(n.g)(t, "spellcheck", "false"), Object(n.g)(t, "placeholder", "https://..."), Object(n.g)(t, "class", "svelte-3d81jx"); }, m(o, a) { Object(n.E)(o, t, a), Object(n.R)(t, e[5]), r || ((i = [ Object(n.G)(t, "input", e[24]), Object(n.G)(t, "keypress", e[11]), ]), (r = !0)); }, p(e, r) { 32 & r[0] && t.value !== e[5] && Object(n.R)(t, e[5]); }, d(e) { e && Object(n.u)(t), (r = !1), Object(n.L)(i); }, }; } function oe(e) { let t, r, i, o, a, s, c, l, d, p = e[4]("select.unsharedProjects") + "", h = e[4]("select.unsharedProjectsWorkaround") + ""; return ( (l = new u({ props: { message: e[4]("select.unsharedProjectsMore"), values: { link: { text: "https://docs.turbowarp.org/unshared-projects", href: "https://docs.turbowarp.org/unshared-projects", newTab: !0, }, }, }, })), { c() { (t = Object(n.v)("p")), (r = Object(n.Y)(p)), (i = Object(n.U)()), (o = Object(n.v)("p")), (a = Object(n.Y)(h)), (s = Object(n.U)()), (c = Object(n.v)("p")), Object(n.o)(l.$$.fragment); }, m(e, u) { Object(n.E)(e, t, u), Object(n.d)(t, r), Object(n.E)(e, i, u), Object(n.E)(e, o, u), Object(n.d)(o, a), Object(n.E)(e, s, u), Object(n.E)(e, c, u), Object(n.H)(l, c, null), (d = !0); }, p(e, t) { (!d || 16 & t[0]) && p !== (p = e[4]("select.unsharedProjects") + "") && Object(n.Q)(r, p), (!d || 16 & t[0]) && h !== (h = e[4]("select.unsharedProjectsWorkaround") + "") && Object(n.Q)(a, h); const i = {}; 16 & t[0] && (i.message = e[4]("select.unsharedProjectsMore")), l.$set(i); }, i(e) { d || (Object(n.cb)(l.$$.fragment, e), (d = !0)); }, o(e) { Object(n.db)(l.$$.fragment, e), (d = !1); }, d(e) { e && Object(n.u)(t), e && Object(n.u)(i), e && Object(n.u)(o), e && Object(n.u)(s), e && Object(n.u)(c), Object(n.s)(l); }, } ); } function ae(e) { let t, r, i, o, a, s, c, l, u, d, h, f, b, m, g, v, j, y, w, k, O, _, A, x, S, E, z, C, I, T, P, R, L, B, U, D, N = e[4]("select.select") + "", M = e[4]("select.selectHelp") + "", $ = e[4]("select.id") + "", F = e[4]("select.file") + "", H = e[4]("select.url") + "", W = "id" === e[1] && ne(e), q = "url" === e[1] && ie(e), V = "id" === e[1] && oe(e); return ( (R = new p.a({ props: { text: e[4]("select.loadProject") } })), R.$on("click", e[16]), (B = Object(n.D)(e[20][0])), { c() { (t = Object(n.v)("h2")), (r = Object(n.Y)(N)), (i = Object(n.U)()), (o = Object(n.v)("p")), (a = Object(n.Y)(M)), (s = Object(n.U)()), (c = Object(n.v)("div")), (l = Object(n.v)("div")), (u = Object(n.v)("label")), (d = Object(n.v)("input")), (h = Object(n.U)()), (f = Object(n.Y)($)), (b = Object(n.U)()), W && W.c(), (m = Object(n.U)()), (g = Object(n.v)("div")), (v = Object(n.v)("label")), (j = Object(n.v)("input")), (y = Object(n.U)()), (w = Object(n.Y)(F)), (k = Object(n.U)()), (O = Object(n.v)("input")), (A = Object(n.U)()), (x = Object(n.v)("div")), (S = Object(n.v)("label")), (E = Object(n.v)("input")), (z = Object(n.U)()), (C = Object(n.Y)(H)), (I = Object(n.U)()), q && q.c(), (T = Object(n.U)()), V && V.c(), (P = Object(n.U)()), Object(n.o)(R.$$.fragment), Object(n.g)(d, "type", "radio"), Object(n.g)(d, "name", "project-type"), (d.__value = "id"), (d.value = d.__value), Object(n.g)(l, "class", "option svelte-3d81jx"), Object(n.g)(j, "type", "radio"), Object(n.g)(j, "name", "project-type"), (j.__value = "file"), (j.value = j.__value), (O.hidden = _ = "file" !== e[1]), Object(n.g)(O, "type", "file"), Object(n.g)(O, "accept", ".sb,.sb2,.sb3"), Object(n.g)(O, "class", "svelte-3d81jx"), Object(n.g)( g, "class", "option file-input-option svelte-3d81jx" ), Object(n.g)(E, "type", "radio"), Object(n.g)(E, "name", "project-type"), (E.__value = "url"), (E.value = E.__value), Object(n.g)(x, "class", "option svelte-3d81jx"), Object(n.g)(c, "class", "options svelte-3d81jx"), B.p(d, j, E); }, m(p, _) { Object(n.E)(p, t, _), Object(n.d)(t, r), Object(n.E)(p, i, _), Object(n.E)(p, o, _), Object(n.d)(o, a), Object(n.E)(p, s, _), Object(n.E)(p, c, _), Object(n.d)(c, l), Object(n.d)(l, u), Object(n.d)(u, d), (d.checked = d.__value === e[1]), Object(n.d)(u, h), Object(n.d)(u, f), Object(n.d)(l, b), W && W.m(l, null), Object(n.d)(c, m), Object(n.d)(c, g), Object(n.d)(g, v), Object(n.d)(v, j), (j.checked = j.__value === e[1]), Object(n.d)(v, y), Object(n.d)(v, w), Object(n.d)(g, k), Object(n.d)(g, O), e[22](O), Object(n.d)(c, A), Object(n.d)(c, x), Object(n.d)(x, S), Object(n.d)(S, E), (E.checked = E.__value === e[1]), Object(n.d)(S, z), Object(n.d)(S, C), Object(n.d)(x, I), q && q.m(x, null), Object(n.E)(p, T, _), V && V.m(p, _), Object(n.E)(p, P, _), Object(n.H)(R, p, _), (L = !0), U || ((D = [ Object(n.G)(d, "change", e[19]), Object(n.G)(j, "change", e[21]), Object(n.G)(O, "change", e[15]), Object(n.G)(E, "change", e[23]), ]), (U = !0)); }, p(e, t) { (!L || 16 & t[0]) && N !== (N = e[4]("select.select") + "") && Object(n.Q)(r, N), (!L || 16 & t[0]) && M !== (M = e[4]("select.selectHelp") + "") && Object(n.Q)(a, M), 2 & t[0] && (d.checked = d.__value === e[1]), (!L || 16 & t[0]) && $ !== ($ = e[4]("select.id") + "") && Object(n.Q)(f, $), "id" === e[1] ? W ? W.p(e, t) : ((W = ne(e)), W.c(), W.m(l, null)) : W && (W.d(1), (W = null)), 2 & t[0] && (j.checked = j.__value === e[1]), (!L || 16 & t[0]) && F !== (F = e[4]("select.file") + "") && Object(n.Q)(w, F), (!L || (2 & t[0] && _ !== (_ = "file" !== e[1]))) && (O.hidden = _), 2 & t[0] && (E.checked = E.__value === e[1]), (!L || 16 & t[0]) && H !== (H = e[4]("select.url") + "") && Object(n.Q)(C, H), "url" === e[1] ? q ? q.p(e, t) : ((q = ie(e)), q.c(), q.m(x, null)) : q && (q.d(1), (q = null)), "id" === e[1] ? V ? (V.p(e, t), 2 & t[0] && Object(n.cb)(V, 1)) : ((V = oe(e)), V.c(), Object(n.cb)(V, 1), V.m(P.parentNode, P)) : V && (Object(n.z)(), Object(n.db)(V, 1, 1, () => { V = null; }), Object(n.k)()); const i = {}; 16 & t[0] && (i.text = e[4]("select.loadProject")), R.$set(i); }, i(e) { L || (Object(n.cb)(V), Object(n.cb)(R.$$.fragment, e), (L = !0)); }, o(e) { Object(n.db)(V), Object(n.db)(R.$$.fragment, e), (L = !1); }, d(r) { r && Object(n.u)(t), r && Object(n.u)(i), r && Object(n.u)(o), r && Object(n.u)(s), r && Object(n.u)(c), W && W.d(), e[22](null), q && q.d(), r && Object(n.u)(T), V && V.d(r), r && Object(n.u)(P), Object(n.s)(R, r), B.r(), (U = !1), Object(n.L)(D); }, } ); } function se(e) { let t, r; return ( (t = new d.a({ props: { accent: "#4C97FF", $$slots: { default: [ae] }, $$scope: { ctx: e }, }, })), { c() { Object(n.o)(t.$$.fragment); }, m(e, i) { Object(n.H)(t, e, i), (r = !0); }, p(e, r) { const n = {}; (58 & r[0]) | (1 & r[1]) && (n.$$scope = { dirty: r, ctx: e }), t.$set(n); }, i(e) { r || (Object(n.cb)(t.$$.fragment, e), (r = !0)); }, o(e) { Object(n.db)(t.$$.fragment, e), (r = !1); }, d(e) { Object(n.s)(t, e); }, } ); } function ce(e) { let t, r; return ( (t = new d.a({ props: { caption: !0, $$slots: { default: [le] }, $$scope: { ctx: e }, }, })), { c() { Object(n.o)(t.$$.fragment); }, m(e, i) { Object(n.H)(t, e, i), (r = !0); }, p(e, r) { const n = {}; (16 & r[0]) | (1 & r[1]) && (n.$$scope = { dirty: r, ctx: e }), t.$set(n); }, i(e) { r || (Object(n.cb)(t.$$.fragment, e), (r = !0)); }, o(e) { Object(n.db)(t.$$.fragment, e), (r = !1); }, d(e) { Object(n.s)(t, e); }, } ); } function le(e) { let t, r, i = e[4]("select.loadToContinue") + ""; return { c() { (t = Object(n.v)("p")), (r = Object(n.Y)(i)); }, m(e, i) { Object(n.E)(e, t, i), Object(n.d)(t, r); }, p(e, t) { 16 & t[0] && i !== (i = e[4]("select.loadToContinue") + "") && Object(n.Q)(r, i); }, d(e) { e && Object(n.u)(t); }, }; } function ue(e) { let t, r, i, o, a, s = e[2] && re(e); (r = new h.a({ props: { $$slots: { default: [se] }, $$scope: { ctx: e } }, })), r.$on("drop", e[14]); let c = !e[6].visible && !e[0] && ce(e); return { c() { s && s.c(), (t = Object(n.U)()), Object(n.o)(r.$$.fragment), (i = Object(n.U)()), c && c.c(), (o = Object(n.w)()); }, m(e, l) { s && s.m(e, l), Object(n.E)(e, t, l), Object(n.H)(r, e, l), Object(n.E)(e, i, l), c && c.m(e, l), Object(n.E)(e, o, l), (a = !0); }, p(e, i) { e[2] ? s ? (s.p(e, i), 4 & i[0] && Object(n.cb)(s, 1)) : ((s = re(e)), s.c(), Object(n.cb)(s, 1), s.m(t.parentNode, t)) : s && (Object(n.z)(), Object(n.db)(s, 1, 1, () => { s = null; }), Object(n.k)()); const a = {}; (58 & i[0]) | (1 & i[1]) && (a.$$scope = { dirty: i, ctx: e }), r.$set(a), e[6].visible || e[0] ? c && (Object(n.z)(), Object(n.db)(c, 1, 1, () => { c = null; }), Object(n.k)()) : c ? (c.p(e, i), 65 & i[0] && Object(n.cb)(c, 1)) : ((c = ce(e)), c.c(), Object(n.cb)(c, 1), c.m(o.parentNode, o)); }, i(e) { a || (Object(n.cb)(s), Object(n.cb)(r.$$.fragment, e), Object(n.cb)(c), (a = !0)); }, o(e) { Object(n.db)(s), Object(n.db)(r.$$.fragment, e), Object(n.db)(c), (a = !1); }, d(e) { s && s.d(e), e && Object(n.u)(t), Object(n.s)(r, e), e && Object(n.u)(i), c && c.d(e), e && Object(n.u)(o); }, }; } function de(e, t, r) { let o, s, c, l, u; Object(n.l)(e, i.a, (e) => r(4, (o = e))), Object(n.l)(e, y.c, (e) => r(6, (u = e))); const d = Object(j.a)("SelectProject.type", "id"); Object(n.l)(e, d, (e) => r(1, (c = e))); const p = Object(j.a)("SelectProject.id", "60917032"); Object(n.l)(e, p, (e) => r(17, (l = e))); const h = Object(j.a)("SelectProject.url", ""); Object(n.l)(e, h, (e) => r(5, (s = e))); const f = /^#\d+$/.test(location.hash) ? location.hash.substring(1) : null; f && (Object(n.S)(d, (c = "id"), c), Object(n.S)(p, (l = f), l)); let b = !1; ee({ onStartImporting: () => { r(2, (b = !0)); }, onCancelImporting: () => { r(2, (b = !1)); }, onFinishImporting: (e) => { b && (Object(n.S)(d, (c = "file"), c), r(2, (b = !1)), r(3, (k.files = e), k), x(e)); }, }); let { projectData: m = null } = t; const g = () => { r(0, (m = null)), y.a.abort(); }; Object(n.S)(p, (l = J(l)), l); const v = () => "https://scratch.mit.edu/projects/" + l; let k; const _ = (e) => { const t = new DataTransfer(); for (const r of e) t.items.add(r); return t.files; }, A = document.querySelector(".input-for-remembering-project-file"); A && Object(a.c)(() => { const e = A.files; e.length && r(3, (k.files = _(e)), k); }); const x = (e) => { g(), k.files !== e && r(3, (k.files = e), k), A && (A.files = _(e)), e.length && "file" === c && Object(a.d)().then(E); }, S = async (e) => { let t, r = "", n = null, i = ""; const a = (t, r, n) => { "fetch" === t ? e.setProgress(r) : "assets" === t ? (e.setProgressText( o("progress.loadingAssets") .replace("{complete}", r) .replace("{total}", n) ), e.setProgress(r / n)) : "compress" === t && (e.setProgressText(o("progress.compressingProject")), e.setProgress(r)); }; if ("id" === c) { if (((n = l), !n)) throw new w.f(o("select.invalidId")); (r = "#" + n), e.setProgressText(o("progress.loadingProjectMetadata")); const s = await O(n), c = s.token; (i = s.title), e.setProgressText(o("progress.loadingProjectData")); const { promise: u, terminate: d } = await Y(n, c, a); e.whenAbort(d), (t = await u); } else if ("file" === c) { const n = k.files, s = n && n[0]; if (!s) throw new w.f(o("select.noFileSelected")); (r = "@" + s.name), (i = s.name), e.setProgressText(o("progress.compressingProject")), (t = await (await Q(s, a)).promise); } else { if ("url" !== c) throw new Error("Unknown type"); { const n = s; if ( !((e) => { try { const t = new URL(e); return ( "http:" === t.protocol || "https:" === t.protocol ); } catch (e) { return !1; } })(n) ) throw new w.f(o("select.invalidUrl")); (r = "$" + n), (i = ((e) => { const t = e.match(/\/([^\/]+)\.sb[2|3]?$/); return t ? t[1] : ""; })(n)), e.setProgressText(o("progress.loadingProjectData")), (t = await (await G(n, a)).promise); } } return { projectId: n, uniqueId: r, title: i, project: t }; }, E = async () => { g(); const e = new K.a(); r(0, (m = await e.do(S(e)))), e.done(); }; return ( (e.$$set = (e) => { "projectData" in e && r(0, (m = e.projectData)); }), (e.$$.update = () => { 131074 & e.$$.dirty[0] && g(); }), [ m, c, b, k, o, s, u, d, p, h, v, (e) => { "Enter" === e.key && E(); }, (e) => { Object(n.S)(p, (l = J(e.target.value)), l), (e.target.value = v()); }, (e) => { e.target.select(); }, ({ detail: e }) => { const t = e.files[0].name; (t.endsWith(".sb") || t.endsWith(".sb2") || t.endsWith(".sb3")) && (Object(n.S)(d, (c = "file"), c), x(e.files)); }, (e) => { x(e.target.files); }, E, l, () => { r(2, (b = !1)); }, function () { (c = this.__value), d.set(c); }, [[]], function () { (c = this.__value), d.set(c); }, function (e) { n.i[e ? "unshift" : "push"](() => { (k = e), r(3, k); }); }, function () { (c = this.__value), d.set(c); }, function () { (s = this.value), h.set(s); }, ] ); } class pe extends n.a { constructor(e) { super(), Object(n.C)( this, e, de, ue, n.M, { projectData: 0 }, te, [-1, -1] ); } } var he = pe; function fe(e, t, r) { const n = e.slice(); return (n[2] = t[r][0]), (n[3] = t[r][1]), n; } function be(e) { let t, r, i, o = (e[3] || e[2]) + ""; return { c() { (t = Object(n.v)("option")), (r = Object(n.Y)(o)), (t.__value = i = e[2]), (t.value = t.__value); }, m(e, i) { Object(n.E)(e, t, i), Object(n.d)(t, r); }, p: n.I, d(e) { e && Object(n.u)(t); }, }; } function me(e) { let t, r, o, a = Object.entries(i.c), s = []; for (let t = 0; t < a.length; t += 1) s[t] = be(fe(e, a, t)); return { c() { t = Object(n.v)("select"); for (let e = 0; e < s.length; e += 1) s[e].c(); void 0 === e[0] && Object(n.c)(() => e[1].call(t)); }, m(i, a) { Object(n.E)(i, t, a); for (let e = 0; e < s.length; e += 1) s[e] && s[e].m(t, null); Object(n.N)(t, e[0], !0), r || ((o = Object(n.G)(t, "change", e[1])), (r = !0)); }, p(e, [r]) { if (0 & r) { let n; for (a = Object.entries(i.c), n = 0; n < a.length; n += 1) { const i = fe(e, a, n); s[n] ? s[n].p(i, r) : ((s[n] = be(i)), s[n].c(), s[n].m(t, null)); } for (; n < s.length; n += 1) s[n].d(1); s.length = a.length; } 1 & r && Object(n.N)(t, e[0]); }, i: n.I, o: n.I, d(e) { e && Object(n.u)(t), Object(n.t)(s, e), (r = !1), o(); }, }; } function ge(e, t, r) { let o; return ( Object(n.l)(e, i.b, (e) => r(0, (o = e))), [ o, function () { (o = Object(n.O)(this)), i.b.set(o); }, ] ); } class ve extends n.a { constructor(e) { super(), Object(n.C)(this, e, ge, me, n.M, {}); } } var je = ve; function ye(e) { let t, r, i, o, a, s, c, l, u, d = e[1]("theme.system") + "", p = e[1]("theme.light") + "", h = e[1]("theme.dark") + ""; return { c() { (t = Object(n.v)("select")), (r = Object(n.v)("option")), (i = Object(n.Y)(d)), (o = Object(n.v)("option")), (a = Object(n.Y)(p)), (s = Object(n.v)("option")), (c = Object(n.Y)(h)), (r.__value = "system"), (r.value = r.__value), (o.__value = "light"), (o.value = o.__value), (s.__value = "dark"), (s.value = s.__value), void 0 === e[0] && Object(n.c)(() => e[2].call(t)); }, m(d, p) { Object(n.E)(d, t, p), Object(n.d)(t, r), Object(n.d)(r, i), Object(n.d)(t, o), Object(n.d)(o, a), Object(n.d)(t, s), Object(n.d)(s, c), Object(n.N)(t, e[0], !0), l || ((u = Object(n.G)(t, "change", e[2])), (l = !0)); }, p(e, [r]) { 2 & r && d !== (d = e[1]("theme.system") + "") && Object(n.Q)(i, d), 2 & r && p !== (p = e[1]("theme.light") + "") && Object(n.Q)(a, p), 2 & r && h !== (h = e[1]("theme.dark") + "") && Object(n.Q)(c, h), 1 & r && Object(n.N)(t, e[0]); }, i: n.I, o: n.I, d(e) { e && Object(n.u)(t), (l = !1), u(); }, }; } function we(e, t, r) { let o, a; return ( Object(n.l)(e, y.d, (e) => r(0, (o = e))), Object(n.l)(e, i.a, (e) => r(1, (a = e))), [ o, a, function () { (o = Object(n.O)(this)), y.d.set(o); }, ] ); } class ke extends n.a { constructor(e) { super(), Object(n.C)(this, e, we, ye, n.M, {}); } } var Oe = ke; function _e(e) { Object(n.e)( e, "svelte-19rq0vp", '.progress.svelte-19rq0vp{display:flex;align-items:center;flex-direction:column}.bar-outer.svelte-19rq0vp{width:200px;height:10px;border:1px solid currentColor;margin-bottom:4px;background:black}[theme="dark"] .bar-outer.svelte-19rq0vp{background:transparent}.bar-inner.svelte-19rq0vp{height:100%;width:0;background:white}.text.svelte-19rq0vp{font-style:italic}' ); } function Ae(e) { let t, r, i, o, a, s; return { c() { (t = Object(n.v)("div")), (r = Object(n.v)("div")), (i = Object(n.v)("div")), (o = Object(n.U)()), (a = Object(n.v)("div")), (s = Object(n.Y)(e[1])), Object(n.g)(i, "class", "bar-inner svelte-19rq0vp"), Object(n.T)(i, "width", 100 * e[0] + "%"), Object(n.g)(r, "class", "bar-outer svelte-19rq0vp"), Object(n.g)(a, "class", "text svelte-19rq0vp"), Object(n.g)(t, "class", "progress svelte-19rq0vp"); }, m(e, c) { Object(n.E)(e, t, c), Object(n.d)(t, r), Object(n.d)(r, i), Object(n.d)(t, o), Object(n.d)(t, a), Object(n.d)(a, s); }, p(e, [t]) { 1 & t && Object(n.T)(i, "width", 100 * e[0] + "%"), 2 & t && Object(n.Q)(s, e[1]); }, i: n.I, o: n.I, d(e) { e && Object(n.u)(t); }, }; } function xe(e, t, r) { let { progress: n = 0 } = t, { text: i = "" } = t; return ( (e.$$set = (e) => { "progress" in e && r(0, (n = e.progress)), "text" in e && r(1, (i = e.text)); }), [n, i] ); } class Se extends n.a { constructor(e) { super(), Object(n.C)(this, e, xe, Ae, n.M, { progress: 0, text: 1 }, _e); } } var Ee = Se, ze = r(1); function Ce(e) { Object(n.e)( e, "svelte-15nxjx", "[p4-modal-visible]{overflow:hidden}.modal.svelte-15nxjx{position:fixed;top:0;left:0;width:100%;height:100%;z-index:20;display:flex;align-items:center;justify-content:center;background-color:rgba(0, 0, 0, 0.75);word-break:break-word}.technical.svelte-15nxjx{font-style:italic}" ); } function Ie(e) { let t, r, i, o, a; return ( (r = new d.a({ props: { modal: !0, $$slots: { default: [Ue] }, $$scope: { ctx: e }, }, })), { c() { (t = Object(n.v)("div")), Object(n.o)(r.$$.fragment), Object(n.g)(t, "class", "modal svelte-15nxjx"); }, m(s, c) { Object(n.E)(s, t, c), Object(n.H)(r, t, null), e[8](t), (i = !0), o || ((a = Object(n.G)(t, "click", Object(n.P)(e[4]))), (o = !0)); }, p(e, t) { const n = {}; 1036 & t && (n.$$scope = { dirty: t, ctx: e }), r.$set(n); }, i(e) { i || (Object(n.cb)(r.$$.fragment, e), (i = !0)); }, o(e) { Object(n.db)(r.$$.fragment, e), (i = !1); }, d(i) { i && Object(n.u)(t), Object(n.s)(r), e[8](null), (o = !1), a(); }, } ); } function Te(e) { let t, r, i, o, a, s, c, l, u, d, h = e[3]("p4.errorMessage").replace("{error}", e[2]) + "", f = e[3]("p4.reportBug") + ""; return ( (a = new p.a({ props: { text: e[3]("p4.close") } })), a.$on("click", e[4]), { c() { (t = Object(n.v)("p")), (r = Object(n.Y)(h)), (i = Object(n.U)()), (o = Object(n.v)("p")), Object(n.o)(a.$$.fragment), (s = Object(n.U)()), (c = Object(n.v)("a")), (l = Object(n.Y)(f)), Object(n.g)(c, "href", (u = ze.FEEDBACK_PRIMARY.link)); }, m(e, u) { Object(n.E)(e, t, u), Object(n.d)(t, r), Object(n.E)(e, i, u), Object(n.E)(e, o, u), Object(n.H)(a, o, null), Object(n.d)(o, s), Object(n.d)(o, c), Object(n.d)(c, l), (d = !0); }, p(e, t) { (!d || 12 & t) && h !== (h = e[3]("p4.errorMessage").replace("{error}", e[2]) + "") && Object(n.Q)(r, h); const i = {}; 8 & t && (i.text = e[3]("p4.close")), a.$set(i), (!d || 8 & t) && f !== (f = e[3]("p4.reportBug") + "") && Object(n.Q)(l, f); }, i(e) { d || (Object(n.cb)(a.$$.fragment, e), (d = !0)); }, o(e) { Object(n.db)(a.$$.fragment, e), (d = !1); }, d(e) { e && Object(n.u)(t), e && Object(n.u)(i), e && Object(n.u)(o), Object(n.s)(a); }, } ); } function Pe(e) { let t, r, i, o, a, s, c, l, d, h, f, b, m, g, v, j = e[3]("p4.cannotAccessProject") + "", y = e[3]("select.unsharedProjects") + "", w = e[3]("p4.cannotAccessProjectCaching") + ""; return ( (l = new u({ props: { message: e[3]("select.unsharedProjectsMore"), values: { link: { text: "https://docs.turbowarp.org/unshared-projects", href: "https://docs.turbowarp.org/unshared-projects", newTab: !0, }, }, }, })), (g = new p.a({ props: { text: e[3]("p4.close") } })), g.$on("click", e[4]), { c() { (t = Object(n.v)("p")), (r = Object(n.Y)(j)), (i = Object(n.U)()), (o = Object(n.v)("p")), (a = Object(n.Y)(y)), (s = Object(n.U)()), (c = Object(n.v)("p")), Object(n.o)(l.$$.fragment), (d = Object(n.U)()), (h = Object(n.v)("p")), (f = Object(n.Y)(w)), (b = Object(n.U)()), (m = Object(n.v)("p")), Object(n.o)(g.$$.fragment); }, m(e, u) { Object(n.E)(e, t, u), Object(n.d)(t, r), Object(n.E)(e, i, u), Object(n.E)(e, o, u), Object(n.d)(o, a), Object(n.E)(e, s, u), Object(n.E)(e, c, u), Object(n.H)(l, c, null), Object(n.E)(e, d, u), Object(n.E)(e, h, u), Object(n.d)(h, f), Object(n.E)(e, b, u), Object(n.E)(e, m, u), Object(n.H)(g, m, null), (v = !0); }, p(e, t) { (!v || 8 & t) && j !== (j = e[3]("p4.cannotAccessProject") + "") && Object(n.Q)(r, j), (!v || 8 & t) && y !== (y = e[3]("select.unsharedProjects") + "") && Object(n.Q)(a, y); const i = {}; 8 & t && (i.message = e[3]("select.unsharedProjectsMore")), l.$set(i), (!v || 8 & t) && w !== (w = e[3]("p4.cannotAccessProjectCaching") + "") && Object(n.Q)(f, w); const o = {}; 8 & t && (o.text = e[3]("p4.close")), g.$set(o); }, i(e) { v || (Object(n.cb)(l.$$.fragment, e), Object(n.cb)(g.$$.fragment, e), (v = !0)); }, o(e) { Object(n.db)(l.$$.fragment, e), Object(n.db)(g.$$.fragment, e), (v = !1); }, d(e) { e && Object(n.u)(t), e && Object(n.u)(i), e && Object(n.u)(o), e && Object(n.u)(s), e && Object(n.u)(c), Object(n.s)(l), e && Object(n.u)(d), e && Object(n.u)(h), e && Object(n.u)(b), e && Object(n.u)(m), Object(n.s)(g); }, } ); } function Re(e) { let t, r, i, o, a, s, c, l, u, d, h, f = e[3]("p4.outdated") + ""; return ( (l = new p.a({ props: { text: e[3]("p4.refresh") } })), l.$on("click", e[6]), (d = new p.a({ props: { secondary: !0, text: e[3]("p4.close") }, })), d.$on("click", e[4]), { c() { (t = Object(n.v)("p")), (r = Object(n.Y)(f)), (i = Object(n.U)()), (o = Object(n.v)("p")), (a = Object(n.Y)(e[2])), (s = Object(n.U)()), (c = Object(n.v)("p")), Object(n.o)(l.$$.fragment), (u = Object(n.U)()), Object(n.o)(d.$$.fragment), Object(n.g)(o, "class", "technical svelte-15nxjx"); }, m(e, p) { Object(n.E)(e, t, p), Object(n.d)(t, r), Object(n.E)(e, i, p), Object(n.E)(e, o, p), Object(n.d)(o, a), Object(n.E)(e, s, p), Object(n.E)(e, c, p), Object(n.H)(l, c, null), Object(n.d)(c, u), Object(n.H)(d, c, null), (h = !0); }, p(e, t) { (!h || 8 & t) && f !== (f = e[3]("p4.outdated") + "") && Object(n.Q)(r, f), (!h || 4 & t) && Object(n.Q)(a, e[2]); const i = {}; 8 & t && (i.text = e[3]("p4.refresh")), l.$set(i); const o = {}; 8 & t && (o.text = e[3]("p4.close")), d.$set(o); }, i(e) { h || (Object(n.cb)(l.$$.fragment, e), Object(n.cb)(d.$$.fragment, e), (h = !0)); }, o(e) { Object(n.db)(l.$$.fragment, e), Object(n.db)(d.$$.fragment, e), (h = !1); }, d(e) { e && Object(n.u)(t), e && Object(n.u)(i), e && Object(n.u)(o), e && Object(n.u)(s), e && Object(n.u)(c), Object(n.s)(l), Object(n.s)(d); }, } ); } function Le(e) { let t, r, i, o, a, s; return ( (r = new u({ props: { message: e[3]("p4.networkError"), values: { url: { text: e[2].url, href: e[2].url, newTab: !0 }, }, }, })), (a = new p.a({ props: { text: e[3]("p4.close") } })), a.$on("click", e[4]), { c() { (t = Object(n.v)("p")), Object(n.o)(r.$$.fragment), (i = Object(n.U)()), (o = Object(n.v)("p")), Object(n.o)(a.$$.fragment); }, m(e, c) { Object(n.E)(e, t, c), Object(n.H)(r, t, null), Object(n.E)(e, i, c), Object(n.E)(e, o, c), Object(n.H)(a, o, null), (s = !0); }, p(e, t) { const n = {}; 8 & t && (n.message = e[3]("p4.networkError")), 4 & t && (n.values = { url: { text: e[2].url, href: e[2].url, newTab: !0 }, }), r.$set(n); const i = {}; 8 & t && (i.text = e[3]("p4.close")), a.$set(i); }, i(e) { s || (Object(n.cb)(r.$$.fragment, e), Object(n.cb)(a.$$.fragment, e), (s = !0)); }, o(e) { Object(n.db)(r.$$.fragment, e), Object(n.db)(a.$$.fragment, e), (s = !1); }, d(e) { e && Object(n.u)(t), Object(n.s)(r), e && Object(n.u)(i), e && Object(n.u)(o), Object(n.s)(a); }, } ); } function Be(e) { let t, r, i, o, a, s, c = e[2].message + ""; return ( (a = new p.a({ props: { text: e[3]("p4.close") } })), a.$on("click", e[4]), { c() { (t = Object(n.v)("p")), (r = Object(n.Y)(c)), (i = Object(n.U)()), (o = Object(n.v)("p")), Object(n.o)(a.$$.fragment); }, m(e, c) { Object(n.E)(e, t, c), Object(n.d)(t, r), Object(n.E)(e, i, c), Object(n.E)(e, o, c), Object(n.H)(a, o, null), (s = !0); }, p(e, t) { (!s || 4 & t) && c !== (c = e[2].message + "") && Object(n.Q)(r, c); const i = {}; 8 & t && (i.text = e[3]("p4.close")), a.$set(i); }, i(e) { s || (Object(n.cb)(a.$$.fragment, e), (s = !0)); }, o(e) { Object(n.db)(a.$$.fragment, e), (s = !1); }, d(e) { e && Object(n.u)(t), e && Object(n.u)(i), e && Object(n.u)(o), Object(n.s)(a); }, } ); } function Ue(e) { let t, r, i, o, a, s, c, l = e[3]("p4.error") + ""; const u = [Be, Le, Re, Pe, Te], d = []; function p(e, t) { return e[2] instanceof w.f ? 0 : e[2] instanceof w.e ? 1 : e[2] instanceof w.d ? 2 : e[2] instanceof w.b ? 3 : 4; } return ( (o = p(e)), (a = d[o] = u[o](e)), { c() { (t = Object(n.v)("h2")), (r = Object(n.Y)(l)), (i = Object(n.U)()), a.c(), (s = Object(n.w)()); }, m(e, a) { Object(n.E)(e, t, a), Object(n.d)(t, r), Object(n.E)(e, i, a), d[o].m(e, a), Object(n.E)(e, s, a), (c = !0); }, p(e, t) { (!c || 8 & t) && l !== (l = e[3]("p4.error") + "") && Object(n.Q)(r, l); let i = o; (o = p(e)), o === i ? d[o].p(e, t) : (Object(n.z)(), Object(n.db)(d[i], 1, 1, () => { d[i] = null; }), Object(n.k)(), (a = d[o]), a ? a.p(e, t) : ((a = d[o] = u[o](e)), a.c()), Object(n.cb)(a, 1), a.m(s.parentNode, s)); }, i(e) { c || (Object(n.cb)(a), (c = !0)); }, o(e) { Object(n.db)(a), (c = !1); }, d(e) { e && Object(n.u)(t), e && Object(n.u)(i), d[o].d(e), e && Object(n.u)(s); }, } ); } function De(e) { let t, r, i, o, a = e[0] && Ie(e); return { c() { a && a.c(), (t = Object(n.w)()); }, m(s, c) { a && a.m(s, c), Object(n.E)(s, t, c), (r = !0), i || ((o = Object(n.G)(window, "keydown", e[5])), (i = !0)); }, p(e, [r]) { e[0] ? a ? (a.p(e, r), 1 & r && Object(n.cb)(a, 1)) : ((a = Ie(e)), a.c(), Object(n.cb)(a, 1), a.m(t.parentNode, t)) : a && (Object(n.z)(), Object(n.db)(a, 1, 1, () => { a = null; }), Object(n.k)()); }, i(e) { r || (Object(n.cb)(a), (r = !0)); }, o(e) { Object(n.db)(a), (r = !1); }, d(e) { a && a.d(e), e && Object(n.u)(t), (i = !1), o(); }, }; } function Ne(e, t, r) { let o, a; Object(n.l)(e, y.b, (e) => r(2, (o = e))), Object(n.l)(e, i.a, (e) => r(3, (a = e))); let s, c, { modalVisible: l } = t; const u = () => Array.from( document.querySelectorAll("a, button, input, select") ).filter((e) => !s || !s.contains(e)), d = () => { Object(n.S)(y.b, (o = null), o); }; return ( (e.$$set = (e) => { "modalVisible" in e && r(0, (l = e.modalVisible)); }), (e.$$.update = () => { if ( (132 & e.$$.dirty && (r(0, (l = !!o)), o ? (console.error(o), document.body.setAttribute("p4-modal-visible", ""), r(7, (c = document.activeElement)), u().forEach((e) => { e.setAttribute("p4-old-tabIndex", e.tabIndex), (e.tabIndex = -1); })) : (document.body.removeAttribute("p4-modal-visible"), u().forEach((e) => { e.hasAttribute("p4-old-tabIndex") && ((e.tabIndex = e.getAttribute("p4-old-tabIndex")), e.removeAttribute("p4-old-tabIndex")); }), c && c.focus())), 2 & e.$$.dirty && s) ) { const e = s.querySelector("button"); e && e.focus(); } }), [ l, s, o, a, d, (e) => { "Escape" === e.key && d(); }, () => location.reload(), c, function (e) { n.i[e ? "unshift" : "push"](() => { (s = e), r(1, s); }); }, ] ); } class Me extends n.a { constructor(e) { super(), Object(n.C)(this, e, Ne, De, n.M, { modalVisible: 0 }, Ce); } } var $e = Me; class Fe extends n.a { constructor(e) { super(), Object(n.C)(this, e, null, null, n.M, {}); } } var He = Fe, We = r(7); function qe(e) { Object(n.e)( e, "svelte-1mh4ji2", ':root{font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;background:white;color:black}[theme="dark"]{background:#111;color:#eee;color-scheme:dark}a{color:blue}[theme="dark"] a{color:#56b2ff}a:active{color:red}input[type="text"],input[type="number"],textarea{padding:2px}input[type="text"],input[type="number"],textarea,.is-not-safari select{background-color:white;color:black;border:1px solid rgb(160, 160, 160);border-radius:2px}.is-not-safari select:hover{border-color:rgb(30, 30, 30)}[theme="dark"] input[type="text"],[theme="dark"] input[type="number"],[theme="dark"] textarea,[theme="dark"] .is-not-safari select{background-color:#333;color:white;border-color:#888}[theme="dark"] .is-not-safari select:hover{border-color:#bbb}p,h1,h2,h3{margin:12px 0}summary{cursor:pointer}input{font-size:0.8em}main.svelte-1mh4ji2.svelte-1mh4ji2{padding-bottom:10px}footer.svelte-1mh4ji2.svelte-1mh4ji2{text-align:center}footer.svelte-1mh4ji2>div.svelte-1mh4ji2{margin-top:12px}.disclaimer.svelte-1mh4ji2.svelte-1mh4ji2{font-style:italic}.version.svelte-1mh4ji2.svelte-1mh4ji2{font-size:small;opacity:0.8}.version.svelte-1mh4ji2 a.svelte-1mh4ji2{color:inherit}' ); } function Ve(e) { e[14] = e[15].default; } function Ze(e) { let t, r, i, o = We.c && (function (e) { let t, r, i; return { c() { (t = Object(n.Y)("- ")), (r = Object(n.v)("a")), (i = Object(n.Y)(ze.WEBSITE)), Object(n.g)(r, "href", ze.WEBSITE), Object(n.g)(r, "class", "svelte-1mh4ji2"); }, m(e, o) { Object(n.E)(e, t, o), Object(n.E)(e, r, o), Object(n.d)(r, i); }, p: n.I, d(e) { e && Object(n.u)(t), e && Object(n.u)(r); }, }; })(); return { c() { (t = Object(n.v)("p")), (r = Object(n.Y)(We.e)), (i = Object(n.U)()), o && o.c(), Object(n.g)(t, "class", "version svelte-1mh4ji2"); }, m(e, a) { Object(n.E)(e, t, a), Object(n.d)(t, r), Object(n.d)(t, i), o && o.m(t, null); }, p(e, t) { We.c && o.p(e, t); }, d(e) { e && Object(n.u)(t), o && o.d(); }, }; } function Ye(e) { let t, r, i, o, a, s, c, l, d, p, h, f, b, m, g, v, j = e[3]("p4.description1") + "", y = e[3]("p4.disclaimer") + "", w = We.e && Ze(); return ( (d = new u({ props: { message: e[3]("p4.description2"), values: { embedding: { text: e[3]("p4.description2-embedding"), href: "https://docs.turbowarp.org/embedding", }, }, }, })), (f = new u({ props: { message: e[3]("p4.description3"), values: { onScratch: { text: e[3]("p4.description3-on").replace( "{brand}", ze.FEEDBACK_PRIMARY.name ), href: ze.FEEDBACK_PRIMARY.link, }, onGitHub: { text: e[3]("p4.description3-on").replace( "{brand}", ze.FEEDBACK_SECONDARY.name ), href: ze.FEEDBACK_SECONDARY.link, }, }, }, })), { c() { (t = Object(n.v)("div")), (r = Object(n.v)("h1")), (r.textContent = "" + ze.APP_NAME), (i = Object(n.U)()), w && w.c(), (o = Object(n.U)()), (a = Object(n.v)("p")), (s = Object(n.Y)(j)), (c = Object(n.U)()), (l = Object(n.v)("p")), Object(n.o)(d.$$.fragment), (p = Object(n.U)()), (h = Object(n.v)("p")), Object(n.o)(f.$$.fragment), (b = Object(n.U)()), (m = Object(n.v)("p")), (g = Object(n.Y)(y)), Object(n.g)(m, "class", "disclaimer svelte-1mh4ji2"); }, m(e, u) { Object(n.E)(e, t, u), Object(n.d)(t, r), Object(n.d)(t, i), w && w.m(t, null), Object(n.d)(t, o), Object(n.d)(t, a), Object(n.d)(a, s), Object(n.d)(t, c), Object(n.d)(t, l), Object(n.H)(d, l, null), Object(n.d)(t, p), Object(n.d)(t, h), Object(n.H)(f, h, null), Object(n.d)(t, b), Object(n.d)(t, m), Object(n.d)(m, g), (v = !0); }, p(e, t) { We.e && w.p(e, t), (!v || 8 & t) && j !== (j = e[3]("p4.description1") + "") && Object(n.Q)(s, j); const r = {}; 8 & t && (r.message = e[3]("p4.description2")), 8 & t && (r.values = { embedding: { text: e[3]("p4.description2-embedding"), href: "https://docs.turbowarp.org/embedding", }, }), d.$set(r); const i = {}; 8 & t && (i.message = e[3]("p4.description3")), 8 & t && (i.values = { onScratch: { text: e[3]("p4.description3-on").replace( "{brand}", ze.FEEDBACK_PRIMARY.name ), href: ze.FEEDBACK_PRIMARY.link, }, onGitHub: { text: e[3]("p4.description3-on").replace( "{brand}", ze.FEEDBACK_SECONDARY.name ), href: ze.FEEDBACK_SECONDARY.link, }, }), f.$set(i), (!v || 8 & t) && y !== (y = e[3]("p4.disclaimer") + "") && Object(n.Q)(g, y); }, i(e) { v || (Object(n.cb)(d.$$.fragment, e), Object(n.cb)(f.$$.fragment, e), (v = !0)); }, o(e) { Object(n.db)(d.$$.fragment, e), Object(n.db)(f.$$.fragment, e), (v = !1); }, d(e) { e && Object(n.u)(t), w && w.d(), Object(n.s)(d), Object(n.s)(f); }, } ); } function Ge(e) { let t, r; return ( (t = new d.a({ props: { accent: "#4C97FF", $$slots: { default: [Je] }, $$scope: { ctx: e }, }, })), { c() { Object(n.o)(t.$$.fragment); }, m(e, i) { Object(n.H)(t, e, i), (r = !0); }, p(e, r) { const n = {}; 65544 & r && (n.$$scope = { dirty: r, ctx: e }), t.$set(n); }, i(e) { r || (Object(n.cb)(t.$$.fragment, e), (r = !0)); }, o(e) { Object(n.db)(t.$$.fragment, e), (r = !1); }, d(e) { Object(n.s)(t, e); }, } ); } function Qe(e) { let t, r, i; function o(t) { e[9](t); } let a = {}; return ( void 0 !== e[0] && (a.projectData = e[0]), (t = new he({ props: a })), n.i.push(() => Object(n.h)(t, "projectData", o)), { c() { Object(n.o)(t.$$.fragment); }, m(e, r) { Object(n.H)(t, e, r), (i = !0); }, p(e, i) { const o = {}; !r && 1 & i && ((r = !0), (o.projectData = e[0]), Object(n.b)(() => (r = !1))), t.$set(o); }, i(e) { i || (Object(n.cb)(t.$$.fragment, e), (i = !0)); }, o(e) { Object(n.db)(t.$$.fragment, e), (i = !1); }, d(e) { Object(n.s)(t, e); }, } ); } function Je(e) { let t, r, i, o, a, s = e[3]("p4.browserNotSupported") + "", c = e[3]("p4.browserNotSupportedDescription") + ""; return { c() { (t = Object(n.v)("h2")), (r = Object(n.Y)(s)), (i = Object(n.U)()), (o = Object(n.v)("p")), (a = Object(n.Y)(c)); }, m(e, s) { Object(n.E)(e, t, s), Object(n.d)(t, r), Object(n.E)(e, i, s), Object(n.E)(e, o, s), Object(n.d)(o, a); }, p(e, t) { 8 & t && s !== (s = e[3]("p4.browserNotSupported") + "") && Object(n.Q)(r, s), 8 & t && c !== (c = e[3]("p4.browserNotSupportedDescription") + "") && Object(n.Q)(a, c); }, d(e) { e && Object(n.u)(t), e && Object(n.u)(i), e && Object(n.u)(o); }, }; } function Ke(e) { let t, r, i, o = { ctx: e, current: null, token: null, hasCatch: !0, pending: rt, then: tt, catch: Xe, value: 15, blocks: [, , ,], }; return ( Object(n.A)((r = e[5]()), o), { c() { (t = Object(n.w)()), o.block.c(); }, m(e, r) { Object(n.E)(e, t, r), o.block.m(e, (o.anchor = r)), (o.mount = () => t.parentNode), (o.anchor = t), (i = !0); }, p(t, r) { (e = t), Object(n.eb)(o, e, r); }, i(e) { i || (Object(n.cb)(o.block), (i = !0)); }, o(e) { for (let e = 0; e < 3; e += 1) { const t = o.blocks[e]; Object(n.db)(t); } i = !1; }, d(e) { e && Object(n.u)(t), o.block.d(e), (o.token = null), (o = null); }, } ); } function Xe(e) { let t, r; return ( (t = new d.a({ props: { center: !0, $$slots: { default: [et] }, $$scope: { ctx: e }, }, })), { c() { Object(n.o)(t.$$.fragment); }, m(e, i) { Object(n.H)(t, e, i), (r = !0); }, p(e, r) { const n = {}; 65544 & r && (n.$$scope = { dirty: r, ctx: e }), t.$set(n); }, i(e) { r || (Object(n.cb)(t.$$.fragment, e), (r = !0)); }, o(e) { Object(n.db)(t.$$.fragment, e), (r = !1); }, d(e) { Object(n.s)(t, e); }, } ); } function et(e) { let t, r, i = e[3]("p4.unknownImportError") + ""; return { c() { (t = Object(n.v)("p")), (r = Object(n.Y)(i)); }, m(e, i) { Object(n.E)(e, t, i), Object(n.d)(t, r); }, p(e, t) { 8 & t && i !== (i = e[3]("p4.unknownImportError") + "") && Object(n.Q)(r, i); }, d(e) { e && Object(n.u)(t); }, }; } function tt(e) { let t, r, i, a, s; function c(t) { e[10](t); } Ve(e); let l = { projectData: e[0] }; return ( void 0 !== e[1] && (l.title = e[1]), (r = new e[14]({ props: l })), n.i.push(() => Object(n.h)(r, "title", c)), { c() { (t = Object(n.v)("div")), Object(n.o)(r.$$.fragment); }, m(e, i) { Object(n.E)(e, t, i), Object(n.H)(r, t, null), (s = !0); }, p(e, t) { Ve(e); const o = {}; 1 & t && (o.projectData = e[0]), !i && 2 & t && ((i = !0), (o.title = e[1]), Object(n.b)(() => (i = !1))), r.$set(o); }, i(e) { s || (Object(n.cb)(r.$$.fragment, e), a || Object(n.c)(() => { (a = Object(n.p)(t, o.a, {})), a.start(); }), (s = !0)); }, o(e) { Object(n.db)(r.$$.fragment, e), (s = !1); }, d(e) { e && Object(n.u)(t), Object(n.s)(r); }, } ); } function rt(e) { let t, r; return ( (t = new d.a({ props: { center: !0, $$slots: { default: [nt] }, $$scope: { ctx: e }, }, })), { c() { Object(n.o)(t.$$.fragment); }, m(e, i) { Object(n.H)(t, e, i), (r = !0); }, p(e, r) { const n = {}; 65544 & r && (n.$$scope = { dirty: r, ctx: e }), t.$set(n); }, i(e) { r || (Object(n.cb)(t.$$.fragment, e), (r = !0)); }, o(e) { Object(n.db)(t.$$.fragment, e), (r = !1); }, d(e) { Object(n.s)(t, e); }, } ); } function nt(e) { let t, r; return ( (t = new Ee({ props: { text: e[3]("p4.importingInterface") } })), { c() { Object(n.o)(t.$$.fragment); }, m(e, i) { Object(n.H)(t, e, i), (r = !0); }, p(e, r) { const n = {}; 8 & r && (n.text = e[3]("p4.importingInterface")), t.$set(n); }, i(e) { r || (Object(n.cb)(t.$$.fragment, e), (r = !0)); }, o(e) { Object(n.db)(t.$$.fragment, e), (r = !1); }, d(e) { Object(n.s)(t, e); }, } ); } function it(e) { let t, r; return ( (t = new d.a({ props: { center: !0, $$slots: { default: [ot] }, $$scope: { ctx: e }, }, })), { c() { Object(n.o)(t.$$.fragment); }, m(e, i) { Object(n.H)(t, e, i), (r = !0); }, p(e, r) { const n = {}; 65552 & r && (n.$$scope = { dirty: r, ctx: e }), t.$set(n); }, i(e) { r || (Object(n.cb)(t.$$.fragment, e), (r = !0)); }, o(e) { Object(n.db)(t.$$.fragment, e), (r = !1); }, d(e) { Object(n.s)(t, e); }, } ); } function ot(e) { let t, r; return ( (t = new Ee({ props: { progress: e[4].progress, text: e[4].text }, })), { c() { Object(n.o)(t.$$.fragment); }, m(e, i) { Object(n.H)(t, e, i), (r = !0); }, p(e, r) { const n = {}; 16 & r && (n.progress = e[4].progress), 16 & r && (n.text = e[4].text), t.$set(n); }, i(e) { r || (Object(n.cb)(t.$$.fragment, e), (r = !0)); }, o(e) { Object(n.db)(t.$$.fragment, e), (r = !1); }, d(e) { Object(n.s)(t, e); }, } ); } function at(e) { let t, r, i, o, a, s, c, l, u, p, h, f, b, m, g, v, j, y, w, k, O, _, A, x, S, E, z, C, I, T, P, R = e[3]("p4.feedback") + "", L = e[3]("p4.documentation") + ""; function B(t) { e[8](t); } let U = {}; void 0 !== e[2] && (U.modalVisible = e[2]), (t = new $e({ props: U })), n.i.push(() => Object(n.h)(t, "modalVisible", B)), (a = new d.a({ props: { accent: ze.ACCENT_COLOR, $$slots: { default: [Ye] }, $$scope: { ctx: e }, }, })); let D = !We.c && (function (e) { let t, r; return ( (t = new He({})), { c() { Object(n.o)(t.$$.fragment); }, m(e, i) { Object(n.H)(t, e, i), (r = !0); }, i(e) { r || (Object(n.cb)(t.$$.fragment, e), (r = !0)); }, o(e) { Object(n.db)(t.$$.fragment, e), (r = !1); }, d(e) { Object(n.s)(t, e); }, } ); })(); const N = [Qe, Ge], M = []; (l = We.d ? 0 : 1), (u = M[l] = N[l](e)); let $ = e[0] && Ke(e), F = e[4].visible && it(e), H = ze.PRIVACY_POLICY && !We.c && (function (e) { let t, r, i, o, a = e[3]("p4.privacy") + ""; return { c() { (t = Object(n.v)("a")), (r = Object(n.Y)(a)), (i = Object(n.U)()), (o = Object(n.v)("span")), (o.textContent = "-"), Object(n.g)(t, "href", ze.PRIVACY_POLICY); }, m(e, a) { Object(n.E)(e, t, a), Object(n.d)(t, r), Object(n.E)(e, i, a), Object(n.E)(e, o, a); }, p(e, t) { 8 & t && a !== (a = e[3]("p4.privacy") + "") && Object(n.Q)(r, a); }, d(e) { e && Object(n.u)(t), e && Object(n.u)(i), e && Object(n.u)(o); }, }; })(e), W = ze.SOURCE_CODE && (function (e) { let t, r, i, o, a = e[3]("p4.sourceCode") + ""; return { c() { (t = Object(n.v)("span")), (t.textContent = "-"), (r = Object(n.U)()), (i = Object(n.v)("a")), (o = Object(n.Y)(a)), Object(n.g)(i, "href", ze.SOURCE_CODE); }, m(e, a) { Object(n.E)(e, t, a), Object(n.E)(e, r, a), Object(n.E)(e, i, a), Object(n.d)(i, o); }, p(e, t) { 8 & t && a !== (a = e[3]("p4.sourceCode") + "") && Object(n.Q)(o, a); }, d(e) { e && Object(n.u)(t), e && Object(n.u)(r), e && Object(n.u)(i); }, }; })(e), q = ze.DONATE && (function (e) { let t, r, i, o, a = e[3]("p4.donate") + ""; return { c() { (t = Object(n.v)("span")), (t.textContent = "-"), (r = Object(n.U)()), (i = Object(n.v)("a")), (o = Object(n.Y)(a)), Object(n.g)(i, "href", ze.DONATE); }, m(e, a) { Object(n.E)(e, t, a), Object(n.E)(e, r, a), Object(n.E)(e, i, a), Object(n.d)(i, o); }, p(e, t) { 8 & t && a !== (a = e[3]("p4.donate") + "") && Object(n.Q)(o, a); }, d(e) { e && Object(n.u)(t), e && Object(n.u)(r), e && Object(n.u)(i); }, }; })(e); return ( (z = new Oe({})), (T = new je({})), { c() { Object(n.o)(t.$$.fragment), (i = Object(n.U)()), (o = Object(n.v)("main")), Object(n.o)(a.$$.fragment), (s = Object(n.U)()), D && D.c(), (c = Object(n.U)()), u.c(), (p = Object(n.U)()), $ && $.c(), (h = Object(n.U)()), F && F.c(), (f = Object(n.U)()), (b = Object(n.v)("footer")), (m = Object(n.v)("div")), H && H.c(), (g = Object(n.U)()), (v = Object(n.v)("a")), (j = Object(n.Y)(R)), (w = Object(n.U)()), W && W.c(), (k = Object(n.U)()), q && q.c(), (O = Object(n.U)()), (_ = Object(n.v)("div")), (A = Object(n.v)("a")), (x = Object(n.Y)(L)), (S = Object(n.U)()), (E = Object(n.v)("div")), Object(n.o)(z.$$.fragment), (C = Object(n.U)()), (I = Object(n.v)("div")), Object(n.o)(T.$$.fragment), Object(n.g)(v, "href", (y = ze.FEEDBACK_PRIMARY.link)), Object(n.g)(m, "class", "svelte-1mh4ji2"), Object(n.g)( A, "href", "https://docs.turbowarp.org/packager" ), Object(n.g)(_, "class", "svelte-1mh4ji2"), Object(n.g)(E, "class", "svelte-1mh4ji2"), Object(n.g)(I, "class", "svelte-1mh4ji2"), Object(n.g)(b, "class", "svelte-1mh4ji2"), Object(n.g)(o, "aria-hidden", e[2]), Object(n.g)(o, "class", "svelte-1mh4ji2"), Object(n.bb)(o, "is-not-safari", !We.b); }, m(e, r) { Object(n.H)(t, e, r), Object(n.E)(e, i, r), Object(n.E)(e, o, r), Object(n.H)(a, o, null), Object(n.d)(o, s), D && D.m(o, null), Object(n.d)(o, c), M[l].m(o, null), Object(n.d)(o, p), $ && $.m(o, null), Object(n.d)(o, h), F && F.m(o, null), Object(n.d)(o, f), Object(n.d)(o, b), Object(n.d)(b, m), H && H.m(m, null), Object(n.d)(m, g), Object(n.d)(m, v), Object(n.d)(v, j), Object(n.d)(m, w), W && W.m(m, null), Object(n.d)(m, k), q && q.m(m, null), Object(n.d)(b, O), Object(n.d)(b, _), Object(n.d)(_, A), Object(n.d)(A, x), Object(n.d)(b, S), Object(n.d)(b, E), Object(n.H)(z, E, null), Object(n.d)(b, C), Object(n.d)(b, I), Object(n.H)(T, I, null), (P = !0); }, p(e, [i]) { const s = {}; !r && 4 & i && ((r = !0), (s.modalVisible = e[2]), Object(n.b)(() => (r = !1))), t.$set(s); const c = {}; 65544 & i && (c.$$scope = { dirty: i, ctx: e }), a.$set(c), u.p(e, i), e[0] ? $ ? ($.p(e, i), 1 & i && Object(n.cb)($, 1)) : (($ = Ke(e)), $.c(), Object(n.cb)($, 1), $.m(o, h)) : $ && (Object(n.z)(), Object(n.db)($, 1, 1, () => { $ = null; }), Object(n.k)()), e[4].visible ? F ? (F.p(e, i), 16 & i && Object(n.cb)(F, 1)) : ((F = it(e)), F.c(), Object(n.cb)(F, 1), F.m(o, f)) : F && (Object(n.z)(), Object(n.db)(F, 1, 1, () => { F = null; }), Object(n.k)()), ze.PRIVACY_POLICY && !We.c && H.p(e, i), (!P || 8 & i) && R !== (R = e[3]("p4.feedback") + "") && Object(n.Q)(j, R), ze.SOURCE_CODE && W.p(e, i), ze.DONATE && q.p(e, i), (!P || 8 & i) && L !== (L = e[3]("p4.documentation") + "") && Object(n.Q)(x, L), (!P || 4 & i) && Object(n.g)(o, "aria-hidden", e[2]); }, i(e) { P || (Object(n.cb)(t.$$.fragment, e), Object(n.cb)(a.$$.fragment, e), Object(n.cb)(D), Object(n.cb)(u), Object(n.cb)($), Object(n.cb)(F), Object(n.cb)(z.$$.fragment, e), Object(n.cb)(T.$$.fragment, e), (P = !0)); }, o(e) { Object(n.db)(t.$$.fragment, e), Object(n.db)(a.$$.fragment, e), Object(n.db)(D), Object(n.db)(u), Object(n.db)($), Object(n.db)(F), Object(n.db)(z.$$.fragment, e), Object(n.db)(T.$$.fragment, e), (P = !1); }, d(e) { Object(n.s)(t, e), e && Object(n.u)(i), e && Object(n.u)(o), Object(n.s)(a), D && D.d(), M[l].d(), $ && $.d(), F && F.d(), H && H.d(), W && W.d(), q && q.d(), Object(n.s)(z), Object(n.s)(T); }, } ); } function st(e, t, o) { let a, s, c, l, u; Object(n.l)(e, y.b, (e) => o(11, (a = e))), Object(n.l)(e, y.d, (e) => o(7, (s = e))), Object(n.l)(e, i.a, (e) => o(3, (c = e))), Object(n.l)(e, y.c, (e) => o(4, (l = e))); const d = window.matchMedia("(prefers-color-scheme: dark)"); let p = d.matches ? "dark" : "light"; d.addEventListener && d.addEventListener("change", () => { o(6, (p = d.matches ? "dark" : "light")); }); let h = !1; const f = document.title; let b = ""; const m = () => Promise.resolve() .then(r.bind(null, 124)) .catch((e) => { Object(n.S)(y.b, (a = e), a); }); return ( m(), (e.$$.update = () => { 192 & e.$$.dirty && document.documentElement.setAttribute( "theme", "system" === s ? p : s ), 3 & e.$$.dirty && (document.title = u && b ? `${b} - ${ze.APP_NAME}` : f); }), [ u, b, h, c, l, m, p, s, function (e) { (h = e), o(2, h); }, function (e) { (u = e), o(0, u); }, function (e) { (b = e), o(1, b); }, ] ); } class ct extends n.a { constructor(e) { super(), Object(n.C)(this, e, st, at, n.M, {}, qe); } } var lt = ct; r.p; new lt({ target: document.getElementById("app") }); document.body.setAttribute("p4-loaded", ""); }, ]);