1const xe = (e, t) => e === t, v = Symbol("solid-proxy"), re = Symbol("solid-track"), K = { 2 equals: xe 3}; 4let he = Ce; 5const C = 1, L = 2, de = { 6 owned: null, 7 cleanups: null, 8 context: null, 9 owner: null 10}; 11var h = null; 12let z = null, a = null, d = null, y = null, q = 0; 13function Ie(e, t) { 14 const n = a, s = h, i = e.length === 0, o = i ? de : { 15 owned: null, 16 cleanups: null, 17 context: null, 18 owner: t === void 0 ? s : t 19 }, r = i ? e : () => e(() => _(() => B(o))); 20 h = o, a = null; 21 try { 22 return k(r, !0); 23 } finally { 24 a = n, h = s; 25 } 26} 27function ge(e, t) { 28 t = t ? Object.assign({}, K, t) : K; 29 const n = { 30 value: e, 31 observers: null, 32 observerSlots: null, 33 comparator: t.equals || void 0 34 }, s = (i) => (typeof i == "function" && (i = i(n.value)), be(n, i)); 35 return [ye.bind(n), s]; 36} 37function M(e, t, n) { 38 const s = ee(e, t, !1, C); 39 I(s); 40} 41function $(e, t, n) { 42 he = Me; 43 const s = ee(e, t, !1, C), i = le && me(h, le.id); 44 i && (s.suspense = i), (!n || !n.render) && (s.user = !0), y ? y.push(s) : I(s); 45} 46function W(e, t, n) { 47 n = n ? Object.assign({}, K, n) : K; 48 const s = ee(e, t, !0, 0); 49 return s.observers = null, s.observerSlots = null, s.comparator = n.equals || void 0, I(s), ye.bind(s); 50} 51function Ne(e) { 52 return k(e, !1); 53} 54function _(e) { 55 if (a === null) 56 return e(); 57 const t = a; 58 a = null; 59 try { 60 return e(); 61 } finally { 62 a = t; 63 } 64} 65function Ge(e) { 66 return h === null || (h.cleanups === null ? h.cleanups = [e] : h.cleanups.push(e)), e; 67} 68function pe() { 69 return a; 70} 71let le; 72function ye() { 73 if (this.sources && this.state) 74 if (this.state === C) 75 I(this); 76 else { 77 const e = d; 78 d = null, k(() => T(this), !1), d = e; 79 } 80 if (a) { 81 const e = this.observers ? this.observers.length : 0; 82 a.sources ? (a.sources.push(this), a.sourceSlots.push(e)) : (a.sources = [this], a.sourceSlots = [e]), this.observers ? (this.observers.push(a), this.observerSlots.push(a.sources.length - 1)) : (this.observers = [a], this.observerSlots = [a.sources.length - 1]); 83 } 84 return this.value; 85} 86function be(e, t, n) { 87 let s = e.value; 88 return (!e.comparator || !e.comparator(s, t)) && (e.value = t, e.observers && e.observers.length && k(() => { 89 for (let i = 0; i < e.observers.length; i += 1) { 90 const o = e.observers[i], r = z && z.running; 91 r && z.disposed.has(o), (r ? !o.tState : !o.state) && (o.pure ? d.push(o) : y.push(o), o.observers && we(o)), r || (o.state = C); 92 } 93 if (d.length > 1e6) 94 throw d = [], new Error(); 95 }, !1)), t; 96} 97function I(e) { 98 if (!e.fn) 99 return; 100 B(e); 101 const t = h, n = a, s = q; 102 a = h = e, Ke(e, e.value, s), a = n, h = t; 103} 104function Ke(e, t, n) { 105 let s; 106 try { 107 s = e.fn(t); 108 } catch (i) { 109 return e.pure && (e.state = C, e.owned && e.owned.forEach(B), e.owned = null), e.updatedAt = n + 1, ve(i); 110 } 111 (!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? be(e, s) : e.value = s, e.updatedAt = n); 112} 113function ee(e, t, n, s = C, i) { 114 const o = { 115 fn: e, 116 state: s, 117 updatedAt: null, 118 owned: null, 119 sources: null, 120 sourceSlots: null, 121 cleanups: null, 122 value: t, 123 owner: h, 124 context: null, 125 pure: n 126 }; 127 return h === null || h !== de && (h.owned ? h.owned.push(o) : h.owned = [o]), o; 128} 129function R(e) { 130 if (e.state === 0) 131 return; 132 if (e.state === L) 133 return T(e); 134 if (e.suspense && _(e.suspense.inFallback)) 135 return e.suspense.effects.push(e); 136 const t = [e]; 137 for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < q); ) 138 e.state && t.push(e); 139 for (let n = t.length - 1; n >= 0; n--) 140 if (e = t[n], e.state === C) 141 I(e); 142 else if (e.state === L) { 143 const s = d; 144 d = null, k(() => T(e, t[0]), !1), d = s; 145 } 146} 147function k(e, t) { 148 if (d) 149 return e(); 150 let n = !1; 151 t || (d = []), y ? n = !0 : y = [], q++; 152 try { 153 const s = e(); 154 return Le(n), s; 155 } catch (s) { 156 n || (y = null), d = null, ve(s); 157 } 158} 159function Le(e) { 160 if (d && (Ce(d), d = null), e) 161 return; 162 const t = y; 163 y = null, t.length && k(() => he(t), !1); 164} 165function Ce(e) { 166 for (let t = 0; t < e.length; t++) 167 R(e[t]); 168} 169function Me(e) { 170 let t, n = 0; 171 for (t = 0; t < e.length; t++) { 172 const s = e[t]; 173 s.user ? e[n++] = s : R(s); 174 } 175 for (t = 0; t < n; t++) 176 R(e[t]); 177} 178function T(e, t) { 179 e.state = 0; 180 for (let n = 0; n < e.sources.length; n += 1) { 181 const s = e.sources[n]; 182 if (s.sources) { 183 const i = s.state; 184 i === C ? s !== t && (!s.updatedAt || s.updatedAt < q) && R(s) : i === L && T(s, t); 185 } 186 } 187} 188function we(e) { 189 for (let t = 0; t < e.observers.length; t += 1) { 190 const n = e.observers[t]; 191 n.state || (n.state = L, n.pure ? d.push(n) : y.push(n), n.observers && we(n)); 192 } 193} 194function B(e) { 195 let t; 196 if (e.sources) 197 for (; e.sources.length; ) { 198 const n = e.sources.pop(), s = e.sourceSlots.pop(), i = n.observers; 199 if (i && i.length) { 200 const o = i.pop(), r = n.observerSlots.pop(); 201 s < i.length && (o.sourceSlots[r] = s, i[s] = o, n.observerSlots[s] = r); 202 } 203 } 204 if (e.owned) { 205 for (t = e.owned.length - 1; t >= 0; t--) 206 B(e.owned[t]); 207 e.owned = null; 208 } 209 if (e.cleanups) { 210 for (t = e.cleanups.length - 1; t >= 0; t--) 211 e.cleanups[t](); 212 e.cleanups = null; 213 } 214 e.state = 0, e.context = null; 215} 216function ve(e) { 217 throw e; 218} 219function me(e, t) { 220 return e ? e.context && e.context[t] !== void 0 ? e.context[t] : me(e.owner, t) : void 0; 221} 222function Y(e, t) { 223 return _(() => e(t || {})); 224} 225const Re = (e) => `Stale read from <${e}>.`; 226function Ae(e) { 227 const t = e.keyed, n = W(() => e.when, void 0, { 228 equals: (s, i) => t ? s === i : !s == !i 229 }); 230 return W(() => { 231 const s = n(); 232 if (s) { 233 const i = e.children; 234 return typeof i == "function" && i.length > 0 ? _(() => i(t ? s : () => { 235 if (!_(n)) 236 throw Re("Show"); 237 return e.when; 238 })) : i; 239 } 240 return e.fallback; 241 }, void 0, void 0); 242} 243function Te(e, t, n) { 244 let s = n.length, i = t.length, o = s, r = 0, l = 0, c = t[i - 1].nextSibling, f = null; 245 for (; r < i || l < o; ) { 246 if (t[r] === n[l]) { 247 r++, l++; 248 continue; 249 } 250 for (; t[i - 1] === n[o - 1]; ) 251 i--, o--; 252 if (i === r) { 253 const u = o < s ? l ? n[l - 1].nextSibling : n[o - l] : c; 254 for (; l < o; ) 255 e.insertBefore(n[l++], u); 256 } else if (o === l) 257 for (; r < i; ) 258 (!f || !f.has(t[r])) && t[r].remove(), r++; 259 else if (t[r] === n[o - 1] && n[l] === t[i - 1]) { 260 const u = t[--i].nextSibling; 261 e.insertBefore(n[l++], t[r++].nextSibling), e.insertBefore(n[--o], u), t[i] = n[o]; 262 } else { 263 if (!f) { 264 f = /* @__PURE__ */ new Map(); 265 let g = l; 266 for (; g < o; ) 267 f.set(n[g], g++); 268 } 269 const u = f.get(t[r]); 270 if (u != null) 271 if (l < u && u < o) { 272 let g = r, E = 1, N; 273 for (; ++g < i && g < o && !((N = f.get(t[g])) == null || N !== u + E); ) 274 E++; 275 if (E > u - l) { 276 const je = t[r]; 277 for (; l < u; ) 278 e.insertBefore(n[l++], je); 279 } else 280 e.replaceChild(n[l++], t[r++]); 281 } else 282 r++; 283 else 284 t[r++].remove(); 285 } 286 } 287} 288function De(e, t, n) { 289 let s; 290 const i = () => { 291 const r = document.createElement("template"); 292 return r.innerHTML = e, n ? r.content.firstChild.firstChild : r.content.firstChild; 293 }, o = t ? () => (s || (s = i())).cloneNode(!0) : () => _(() => document.importNode(s || (s = i()), !0)); 294 return o.cloneNode = o, o; 295} 296function G(e, t, n) { 297 n == null ? e.removeAttribute(t) : e.setAttribute(t, n); 298} 299function Fe(e, t) { 300 t == null ? e.removeAttribute("class") : e.className = t; 301} 302function Ue(e, t, n) { 303 if (!t) 304 return n ? G(e, "style") : t; 305 const s = e.style; 306 if (typeof t == "string") 307 return s.cssText = t; 308 typeof n == "string" && (s.cssText = n = void 0), n || (n = {}), t || (t = {}); 309 let i, o; 310 for (o in n) 311 t[o] == null && s.removeProperty(o), delete n[o]; 312 for (o in t) 313 i = t[o], i !== n[o] && (s.setProperty(o, i), n[o] = i); 314 return n; 315} 316function qe(e, t, n, s) { 317 if (n !== void 0 && !s && (s = []), typeof t != "function") 318 return D(e, t, s, n); 319 M((i) => D(e, t(), i, n), s); 320} 321function D(e, t, n, s, i) { 322 for (; typeof n == "function"; ) 323 n = n(); 324 if (t === n) 325 return n; 326 const o = typeof t, r = s !== void 0; 327 if (e = r && n[0] && n[0].parentNode || e, o === "string" || o === "number") 328 if (o === "number" && (t = t.toString()), r) { 329 let l = n[0]; 330 l && l.nodeType === 3 ? l.data = t : l = document.createTextNode(t), n = A(e, n, s, l); 331 } else 332 n !== "" && typeof n == "string" ? n = e.firstChild.data = t : n = e.textContent = t; 333 else if (t == null || o === "boolean") 334 n = A(e, n, s); 335 else { 336 if (o === "function") 337 return M(() => { 338 let l = t(); 339 for (; typeof l == "function"; ) 340 l = l(); 341 n = D(e, l, n, s); 342 }), () => n; 343 if (Array.isArray(t)) { 344 const l = [], c = n && Array.isArray(n); 345 if (H(l, t, n, i)) 346 return M(() => n = D(e, l, n, s, !0)), () => n; 347 if (l.length === 0) { 348 if (n = A(e, n, s), r) 349 return n; 350 } else 351 c ? n.length === 0 ? ce(e, l, s) : Te(e, n, l) : (n && A(e), ce(e, l)); 352 n = l; 353 } else if (t.nodeType) { 354 if (Array.isArray(n)) { 355 if (r) 356 return n = A(e, n, s, t); 357 A(e, n, null, t); 358 } else 359 n == null || n === "" || !e.firstChild ? e.appendChild(t) : e.replaceChild(t, e.firstChild); 360 n = t; 361 } else 362 console.warn("Unrecognized value. Skipped inserting", t); 363 } 364 return n; 365} 366function H(e, t, n, s) { 367 let i = !1; 368 for (let o = 0, r = t.length; o < r; o++) { 369 let l = t[o], c = n && n[o], f; 370 if (!(l == null || l === !0 || l === !1)) 371 if ((f = typeof l) == "object" && l.nodeType) 372 e.push(l); 373 else if (Array.isArray(l)) 374 i = H(e, l, c) || i; 375 else if (f === "function") 376 if (s) { 377 for (; typeof l == "function"; ) 378 l = l(); 379 i = H(e, Array.isArray(l) ? l : [l], Array.isArray(c) ? c : [c]) || i; 380 } else 381 e.push(l), i = !0; 382 else { 383 const u = String(l); 384 c && c.nodeType === 3 && c.data === u ? e.push(c) : e.push(document.createTextNode(u)); 385 } 386 } 387 return i; 388} 389function ce(e, t, n = null) { 390 for (let s = 0, i = t.length; s < i; s++) 391 e.insertBefore(t[s], n); 392} 393function A(e, t, n, s) { 394 if (n === void 0) 395 return e.textContent = ""; 396 const i = s || document.createTextNode(""); 397 if (t.length) { 398 let o = !1; 399 for (let r = t.length - 1; r >= 0; r--) { 400 const l = t[r]; 401 if (i !== l) { 402 const c = l.parentNode === e; 403 !o && !r ? c ? e.replaceChild(i, l) : e.insertBefore(i, n) : c && l.remove(); 404 } else 405 o = !0; 406 } 407 } else 408 e.insertBefore(i, n); 409 return [i]; 410} 411function Be(e) { 412 return Object.keys(e).reduce((n, s) => { 413 const i = e[s]; 414 return n[s] = Object.assign({}, i), _e(i.value) && !Je(i.value) && !Array.isArray(i.value) && (n[s].value = Object.assign({}, i.value)), Array.isArray(i.value) && (n[s].value = i.value.slice(0)), n; 415 }, {}); 416} 417function Ye(e) { 418 return e ? Object.keys(e).reduce((n, s) => { 419 const i = e[s]; 420 return n[s] = _e(i) && "value" in i ? i : { 421 value: i 422 }, n[s].attribute || (n[s].attribute = He(s)), n[s].parse = "parse" in n[s] ? n[s].parse : typeof n[s].value != "string", n; 423 }, {}) : {}; 424} 425function ze(e) { 426 return Object.keys(e).reduce((n, s) => (n[s] = e[s].value, n), {}); 427} 428function We(e, t) { 429 const n = Be(t); 430 return Object.keys(t).forEach((i) => { 431 const o = n[i], r = e.getAttribute(o.attribute), l = e[i]; 432 r && (o.value = o.parse ? Se(r) : r), l != null && (o.value = Array.isArray(l) ? l.slice(0) : l), o.reflect && ue(e, o.attribute, o.value), Object.defineProperty(e, i, { 433 get() { 434 return o.value; 435 }, 436 set(c) { 437 const f = o.value; 438 o.value = c, o.reflect && ue(this, o.attribute, o.value); 439 for (let u = 0, g = this.__propertyChangedCallbacks.length; u < g; u++) 440 this.__propertyChangedCallbacks[u](i, c, f); 441 }, 442 enumerable: !0,
443 configurable: !0 444 }); 445 }), n; 446} 447function Se(e) { 448 if (e) 449 try { 450 return JSON.parse(e); 451 } catch { 452 return e; 453 } 454} 455function ue(e, t, n) { 456 if (n == null || n === !1) 457 return e.removeAttribute(t); 458 let s = JSON.stringify(n); 459 e.__updating[t] = !0, s === "true" && (s = ""), e.setAttribute(t, s), Promise.resolve().then(() => delete e.__updating[t]); 460} 461function He(e) { 462 return e.replace(/\.?([A-Z]+)/g, (t, n) => "-" + n.toLowerCase()).replace("_", "-").replace(/^-/, ""); 463} 464function _e(e) { 465 return e != null && (typeof e == "object" || typeof e == "function"); 466} 467function Je(e) { 468 return Object.prototype.toString.call(e) === "[object Function]"; 469} 470function Ze(e) { 471 return typeof e == "function" && e.toString().indexOf("class") === 0; 472} 473let P; 474function te() { 475 Object.defineProperty(P, "renderRoot", { 476 value: P 477 }); 478} 479function Ve(e, t) { 480 const n = Object.keys(t); 481 return class extends e { 482 static get observedAttributes() { 483 return n.map((i) => t[i].attribute); 484 } 485 constructor() { 486 super(), this.__initialized = !1, this.__released = !1, this.__releaseCallbacks = [], this.__propertyChangedCallbacks = [], this.__updating = {}, this.props = {}; 487 } 488 connectedCallback() { 489 if (this.__initialized) 490 return; 491 this.__releaseCallbacks = [], this.__propertyChangedCallbacks = [], this.__updating = {}, this.props = We(this, t); 492 const i = ze(this.props), o = this.Component, r = P; 493 try { 494 P = this, this.__initialized = !0, Ze(o) ? new o(i, { 495 element: this 496 }) : o(i, { 497 element: this 498 }); 499 } finally { 500 P = r; 501 } 502 } 503 async disconnectedCallback() { 504 if (await Promise.resolve(), this.isConnected) 505 return; 506 this.__propertyChangedCallbacks.length = 0; 507 let i = null; 508 for (; i = this.__releaseCallbacks.pop(); ) 509 i(this); 510 delete this.__initialized, this.__released = !0; 511 } 512 attributeChangedCallback(i, o, r) { 513 if (this.__initialized && !this.__updating[i] && (i = this.lookupProp(i), i in t)) { 514 if (r == null && !this[i]) 515 return; 516 this[i] = t[i].parse ? Se(r) : r; 517 } 518 } 519 lookupProp(i) { 520 if (t) 521 return n.find((o) => i === o || i === t[o].attribute); 522 } 523 get renderRoot() { 524 return this.shadowRoot || this.attachShadow({ 525 mode: "open" 526 }); 527 } 528 addReleaseCallback(i) { 529 this.__releaseCallbacks.push(i); 530 } 531 addPropertyChangedCallback(i) { 532 this.__propertyChangedCallbacks.push(i); 533 } 534 }; 535} 536function Qe(e, t = {}, n = {}) { 537 const { 538 BaseElement: s = HTMLElement, 539 extension: i 540 } = n; 541 return (o) => { 542 if (!e) 543 throw new Error("tag is required to register a Component"); 544 let r = customElements.get(e); 545 return r ? (r.prototype.Component = o, r) : (r = Ve(s, Ye(t)), r.prototype.Component = o, r.prototype.registeredTag = e, customElements.define(e, r, i), r); 546 }; 547} 548function Xe(e) { 549 const t = Object.keys(e), n = {}; 550 for (let s = 0; s < t.length; s++) { 551 const [i, o] = ge(e[t[s]]); 552 Object.defineProperty(n, t[s], { 553 get: i, 554 set(r) { 555 o(() => r); 556 } 557 }); 558 } 559 return n; 560} 561function et(e) { 562 if (e.assignedSlot && e.assignedSlot._$owner) 563 return e.assignedSlot._$owner; 564 let t = e.parentNode; 565 for (; t && !t._$owner && !(t.assignedSlot && t.assignedSlot._$owner); ) 566 t = t.parentNode; 567 return t && t.assignedSlot ? t.assignedSlot._$owner : e._$owner; 568} 569function tt(e) { 570 return (t, n) => { 571 const { element: s } = n; 572 return Ie((i) => { 573 const o = Xe(t); 574 s.addPropertyChangedCallback((l, c) => o[l] = c), s.addReleaseCallback(() => { 575 s.renderRoot.textContent = "", i(); 576 }); 577 const r = e(o, n); 578 return qe(s.renderRoot, r); 579 }, et(s)); 580 }; 581} 582function ne(e, t, n) { 583 return arguments.length === 2 && (n = t, t = {}), Qe(e, t)(tt(n)); 584} 585const J = Symbol("store-raw"), j = Symbol("store-node"); 586function ke(e) { 587 let t = e[v]; 588 if (!t && (Object.defineProperty(e, v, { 589 value: t = new Proxy(e, it) 590 }), !Array.isArray(e))) { 591 const n = Object.keys(e), s = Object.getOwnPropertyDescriptors(e); 592 for (let i = 0, o = n.length; i < o; i++) { 593 const r = n[i]; 594 s[r].get && Object.defineProperty(e, r, { 595 enumerable: s[r].enumerable, 596 get: s[r].get.bind(t) 597 }); 598 } 599 } 600 return t; 601} 602function F(e) { 603 let t; 604 return e != null && typeof e == "object" && (e[v] || !(t = Object.getPrototypeOf(e)) || t === Object.prototype || Array.isArray(e)); 605} 606function x(e, t = /* @__PURE__ */ new Set()) { 607 let n, s, i, o; 608 if (n = e != null && e[J]) 609 return n; 610 if (!F(e) || t.has(e)) 611 return e; 612 if (Array.isArray(e)) { 613 Object.isFrozen(e) ? e = e.slice(0) : t.add(e); 614 for (let r = 0, l = e.length; r < l; r++) 615 i = e[r], (s = x(i, t)) !== i && (e[r] = s); 616 } else { 617 Object.isFrozen(e) ? e = Object.assign({}, e) : t.add(e); 618 const r = Object.keys(e), l = Object.getOwnPropertyDescriptors(e); 619 for (let c = 0, f = r.length; c < f; c++) 620 o = r[c], !l[o].get && (i = e[o], (s = x(i, t)) !== i && (e[o] = s)); 621 } 622 return e; 623} 624function se(e) { 625 let t = e[j]; 626 return t || Object.defineProperty(e, j, { 627 value: t = /* @__PURE__ */ Object.create(null) 628 }), t; 629} 630function Z(e, t, n) { 631 return e[t] || (e[t] = Oe(n)); 632} 633function nt(e, t) { 634 const n = Reflect.getOwnPropertyDescriptor(e, t); 635 return !n || n.get || !n.configurable || t === v || t === j || (delete n.value, delete n.writable, n.get = () => e[v][t]), n; 636} 637function Ee(e) { 638 if (pe()) { 639 const t = se(e); 640 (t._ || (t._ = Oe()))(); 641 } 642} 643function st(e) { 644 return Ee(e), Reflect.ownKeys(e); 645} 646function Oe(e) { 647 const [t, n] = ge(e, { 648 equals: !1, 649 internal: !0 650 }); 651 return t.$ = n, t; 652} 653const it = { 654 get(e, t, n) { 655 if (t === J) 656 return e; 657 if (t === v) 658 return n; 659 if (t === re) 660 return Ee(e), n; 661 const s = se(e), i = s[t]; 662 let o = i ? i() : e[t]; 663 if (t === j || t === "__proto__") 664 return o; 665 if (!i) { 666 const r = Object.getOwnPropertyDescriptor(e, t); 667 pe() && (typeof o != "function" || e.hasOwnProperty(t)) && !(r && r.get) && (o = Z(s, t, o)()); 668 } 669 return F(o) ? ke(o) : o; 670 }, 671 has(e, t) { 672 return t === J || t === v || t === re || t === j || t === "__proto__" ? !0 : (this.get(e, t, e), t in e); 673 }, 674 set() { 675 return !0; 676 }, 677 deleteProperty() { 678 return !0; 679 }, 680 ownKeys: st, 681 getOwnPropertyDescriptor: nt 682}; 683function U(e, t, n, s = !1) { 684 if (!s && e[t] === n) 685 return; 686 const i = e[t], o = e.length; 687 n === void 0 ? delete e[t] : e[t] = n; 688 let r = se(e), l; 689 if ((l = Z(r, t, i)) && l.$(() => n), Array.isArray(e) && e.length !== o) { 690 for (let c = e.length; c < o; c++) 691 (l = r[c]) && l.$(); 692 (l = Z(r, "length", o)) && l.$(e.length); 693 } 694 (l = r._) && l.$(); 695} 696function Pe(e, t) { 697 const n = Object.keys(t); 698 for (let s = 0; s < n.length; s += 1) { 699 const i = n[s]; 700 U(e, i, t[i]); 701 } 702} 703function ot(e, t) { 704 if (typeof t == "function" && (t = t(e)), t = x(t), Array.isArray(t)) { 705 if (e === t) 706 return; 707 let n = 0, s = t.length; 708 for (; n < s; n++) { 709 const i = t[n]; 710 e[n] !== i && U(e, n, i); 711 } 712 U(e, "length", s); 713 } else 714 Pe(e, t); 715} 716function O(e, t, n = []) { 717 let s, i = e; 718 if (t.length > 1) { 719 s = t.shift(); 720 const r = typeof s, l = Array.isArray(e); 721 if (Array.isArray(s)) { 722 for (let c = 0; c < s.length; c++) 723 O(e, [s[c]].concat(t), n); 724 return; 725 } else if (l && r === "function") { 726 for (let c = 0; c < e.length; c++) 727 s(e[c], c) && O(e, [c].concat(t), n); 728 return; 729 } else if (l && r === "object") { 730 const { 731 from: c = 0, 732 to: f = e.length - 1, 733 by: u = 1 734 } = s; 735 for (let g = c; g <= f; g += u) 736 O(e, [g].concat(t), n); 737 return; 738 } else if (t.length > 1) { 739 O(e[s], t, [s].concat(n)); 740 return; 741 } 742 i = e[s], n = [s].concat(n); 743 } 744 let o = t[0]; 745 typeof o == "function" && (o = o(i, n), o === i) || s === void 0 && o == null || (o = x(o), s === void 0 || F(i) && F(o) && !Array.isArray(o) ? Pe(i, o) : U(e, s, o)); 746} 747function rt(...[e, t]) { 748 const n = x(e || {}), s = Array.isArray(n), i = ke(n); 749 function o(...r) { 750 Ne(() => { 751 s && r.length === 1 ? ot(n, r[0]) : O(n, r); 752 }); 753 } 754 return [i, o]; 755} 756const lt = (e) => (te(), Y(Ae, { 757 get when() { 758 return !e.state.mapsConsent.consentGiven; 759 }, 760 get children() { 761 return e.children; 762 } 763})), ct = /* @__PURE__ */ De('<iframe data-cookieconsent="ignore" allow="autoplay; encrypted-media" allowfullscreen>'), ut = (e) => { 764 te(); 765 const t = W(() =>
765 e.state.youtubeConsent.consentGiven ? `https://www.youtube.com/embed/${e.videoId}` : ""); 766 return [(() => { 767 const n = ct(); 768 return M((s) => { 769 const i = e.width, o = e.class, r = e.height, l = t(), c = `${e.state.youtubeConsent.consentGiven ? "" : "display: none;"}`; 770 return i !== s._v$ && G(n, "width", s._v$ = i), o !== s._v$2 && Fe(n, s._v$2 = o), r !== s._v$3 && G(n, "height", s._v$3 = r), l !== s._v$4 && G(n, "src", s._v$4 = l), s._v$5 = Ue(n, c, s._v$5), s; 771 }, { 772 _v$: void 0, 773 _v$2: void 0, 774 _v$3: void 0, 775 _v$4: void 0, 776 _v$5: void 0 777 }), n; 778 })(), Y(Ae, { 779 get when() { 780 return !e.state.youtubeConsent.consentGiven; 781 }, 782 get children() { 783 return e.children; 784 } 785 })]; 786}; 787var at = function e(t, n) { 788 if (t === n) 789 return !0; 790 if (t && n && typeof t == "object" && typeof n == "object") { 791 if (t.constructor !== n.constructor) 792 return !1; 793 var s, i, o; 794 if (Array.isArray(t)) { 795 if (s = t.length, s != n.length) 796 return !1; 797 for (i = s; i-- !== 0; ) 798 if (!e(t[i], n[i])) 799 return !1; 800 return !0; 801 } 802 if (t.constructor === RegExp) 803 return t.source === n.source && t.flags === n.flags; 804 if (t.valueOf !== Object.prototype.valueOf) 805 return t.valueOf() === n.valueOf(); 806 if (t.toString !== Object.prototype.toString) 807 return t.toString() === n.toString(); 808 if (o = Object.keys(t), s = o.length, s !== Object.keys(n).length) 809 return !1; 810 for (i = s; i-- !== 0; ) 811 if (!Object.prototype.hasOwnProperty.call(n, o[i])) 812 return !1; 813 for (i = s; i-- !== 0; ) { 814 var r = o[i]; 815 if (!e(t[r], n[r])) 816 return !1; 817 } 818 return !0; 819 } 820 return t !== t && n !== n; 821}; 822const ae = "__googleMapsScriptId"; 823var S; 824(function(e) { 825 e[e.INITIALIZED = 0] = "INITIALIZED", e[e.LOADING = 1] = "LOADING", e[e.SUCCESS = 2] = "SUCCESS", e[e.FAILURE = 3] = "FAILURE"; 826})(S || (S = {})); 827class w { 828 /** 829 * Creates an instance of Loader using [[LoaderOptions]]. No defaults are set 830 * using this library, instead the defaults are set by the Google Maps 831 * JavaScript API server. 832 * 833 * ``` 834 * const loader = Loader({apiKey, version: 'weekly', libraries: ['places']}); 835 * ``` 836 */ 837 constructor({ apiKey: t, authReferrerPolicy: n, channel: s, client: i, id: o = ae, language: r, libraries: l = [], mapIds: c, nonce: f, region: u, retries: g = 3, url: E = "https://maps.googleapis.com/maps/api/js", version: N }) { 838 if (this.CALLBACK = "__googleMapsCallback", this.callbacks = [], this.done = !1, this.loading = !1, this.errors = [], this.apiKey = t, this.authReferrerPolicy = n, this.channel = s, this.client = i, this.id = o || ae, this.language = r, this.libraries = l, this.mapIds = c, this.nonce = f, this.region = u, this.retries = g, this.url = E, this.version = N, w.instance) { 839 if (!at(this.options, w.instance.options)) 840 throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(w.instance.options)}`); 841 return w.instance; 842 } 843 w.instance = this; 844 } 845 get options() { 846 return { 847 version: this.version, 848 apiKey: this.apiKey, 849 channel: this.channel, 850 client: this.client, 851 id: this.id, 852 libraries: this.libraries, 853 language: this.language, 854 region: this.region, 855 mapIds: this.mapIds, 856 nonce: this.nonce, 857 url: this.url, 858 authReferrerPolicy: this.authReferrerPolicy 859 }; 860 } 861 get status() { 862 return this.errors.length ? S.FAILURE : this.done ? S.SUCCESS : this.loading ? S.LOADING : S.INITIALIZED; 863 } 864 get failed() { 865 return this.done && !this.loading && this.errors.length >= this.retries + 1; 866 } 867 /** 868 * CreateUrl returns the Google Maps JavaScript API script url given the [[LoaderOptions]]. 869 * 870 * @ignore 871 */ 872 createUrl() { 873 let t = this.url; 874 return t += `?callback=${this.CALLBACK}`, this.apiKey && (t += `&key=${this.apiKey}`), this.channel && (t += `&channel=${this.channel}`), this.client && (t += `&client=${this.client}`), this.libraries.length > 0 && (t += `&libraries=${this.libraries.join(",")}`), this.language && (t += `&language=${this.language}`), this.region && (t += `®ion=${this.region}`), this.version && (t += `&v=${this.version}`), this.mapIds && (t += `&map_ids=${this.mapIds.join(",")}`), this.authReferrerPolicy && (t += `&auth_referrer_policy=${this.authReferrerPolicy}`), t; 875 } 876 deleteScript() { 877 const t = document.getElementById(this.id); 878 t && t.remove(); 879 } 880 /** 881 * Load the Google Maps JavaScript API script and return a Promise. 882 */ 883 load() { 884 return this.loadPromise(); 885 } 886 /** 887 * Load the Google Maps JavaScript API script and return a Promise. 888 * 889 * @ignore 890 */ 891 loadPromise() { 892 return new Promise((t, n) => { 893 this.loadCallback((s) => { 894 s ? n(s.error) : t(window.google); 895 }); 896 }); 897 } 898 /** 899 * Load the Google Maps JavaScript API script with a callback. 900 */ 901 loadCallback(t) { 902 this.callbacks.push(t), this.execute(); 903 } 904 /** 905 * Set the script on document. 906 */ 907 setScript() { 908 if (document.getElementById(this.id)) { 909 this.callback(); 910 return; 911 } 912 const t = this.createUrl(), n = document.createElement("script"); 913 n.id = this.id, n.type = "text/javascript", n.src = t, n.onerror = this.loadErrorCallback.bind(this), n.defer = !0, n.async = !0, this.nonce && (n.nonce = this.nonce), document.head.appendChild(n); 914 } 915 /** 916 * Reset the loader state. 917 */ 918 reset() { 919 this.deleteScript(), this.done = !1, this.loading = !1, this.errors = [], this.onerrorEvent = null; 920 } 921 resetIfRetryingFailed() { 922 this.failed && this.reset(); 923 } 924 loadErrorCallback(t) { 925 if (this.errors.push(t), this.errors.length <= this.retries) { 926 const n = this.errors.length * Math.pow(2, this.errors.length); 927 console.log(`Failed to load Google Maps script, retrying in ${n} ms.`), setTimeout(() => { 928 this.deleteScript(), this.setScript(); 929 }, n); 930 } else 931 this.onerrorEvent = t, this.callback(); 932 } 933 setCallback() { 934 window.__googleMapsCallback = this.callback.bind(this); 935 } 936 callback() { 937 this.done = !0, this.loading = !1, this.callbacks.forEach((t) => { 938 t(this.onerrorEvent); 939 }), this.callbacks = []; 940 } 941 execute() { 942 if (this.resetIfRetryingFailed(), this.done) 943 this.callback(); 944 else { 945 if (window.google && window.google.maps && window.google.maps.version) { 946 console.warn("Google Maps already loaded outside @googlemaps/js-api-loader.This may result in undesirable behavior as options and script parameters may not match."), this.callback(); 947 return; 948 } 949 this.loading || (this.loading = !0, this.setCallback(), this.setScript()); 950 } 951 } 952} 953function V(e, t) { 954 if (e.mapsConsent.instances === 0 || e.mapsConsent.consentGiven) 955 return; 956 if (e.mapsApiKey === "") 957 throw new Error("Google Maps API Key is missing!"); 958 new w({ 959 apiKey: e.mapsApiKey, 960 version: "weekly", 961 libraries: e.mapsLibraries 962 }).load().then(() => { 963 t.setMapsConsentGiven(); 964 }); 965} 966function ft(e, t) { 967 ht(e, t), document.readyState !== "loading" ? (console.debug("document is already ready, initializing now"), fe(e, t)) : (console.debug("document was not ready, waiting for DOMContentLoaded event"), document.addEventListener("DOMContentLoaded", function() { 968 fe(e, t); 969 })); 970} 971function fe(e, t) { 972 $(() => { 973 if (e.youtubeConsent.instances > 0 || e.mapsConsent.instances > 0) { 974 Q(e, t); 975 return; 976 } 977 }), typeof Cookiebot > "u" && window.addEventListener("CookiebotOnConsentReady", () => { 978 Q(e, t); 979 }); 980} 981function ht(e, t) { 982 window.addEventListener( 983 "CookiebotOnAccept", 984 (n) => { 985 Q(e, t); 986 }, 987 !1 988 ), window.addEventListener( 989 "CookiebotOnDecline", 990 () => { 991 (e.mapsConsent.consentGiven && e.mapsConsent.instances > 0 || e.youtubeConsent.consentGiven && e.youtubeConsent.instances > 0) && location.reload(); 992 }, 993 !1 994 ); 995} 996function Q(e, t) { 997 if (document.cookie.includes(`${e.youtubeConsent.coupledConsentCategory}:true`) && t.setYoutubeConsentGiven(), !(typeof Cookiebot > "u")) { 998 if (!(Cookiebot.regulations.gdprApplies || Cookiebot.regulations.ccpaApplies || Cookiebot.regulations.lgpdApplies)) { 999 V(e, t), t.setYoutubeConsentGiven(); 1000 return; 1001 } 1002 Cookiebot.consent[e.mapsConsent.coupledConsentCategory] && V(e, t), Cookiebot.consent[e.youtubeConsent.coupledConsentCategory] && (t.setYoutubeConsentGiven(), Cookiebot.changed && e.youtubeConsent.instances > 0 && location.reload()); 1003 } 1004} 1005var p = /* @__PURE__ */ ((e) => (e.Marketing = "marketing", e.Preferences = "preferences", e.Statistics = "statistics", e.Necessary = "necessary", e))(p || {}); 1006function ie(e) { 1007 if (!Object.values(p).includes(e)) 1008 throw new Error(`Consent category must be one of ${Object.values(p).join(", ")}`); 1009 return e; 1010} 1011const dt = window; 1012let $e; 1013function gt(e) { 1014 $e = new Promise((t) => { 1015 $(() => { 1016 if (e.mapsConsent.consentGiven) { 1017 t(!0); 1018 return; 1019 } 1020 }); 1021 }), dt.waitForConsent = pt, addEventListener("DOMContentLoaded", (t) => { 1022 $(() => { 1023 e.mapsConsent.consentGiven ? (document.querySelectorAll('[data-explicit-consent-hide="maps"]').forEach((n) => n.style.visibility = "visible"), document.querySelectorAll('[data-explicit-consent-disable="maps"]').forEach((n) => n.attributes.removeNamedItem("disabled")), document.querySelectorAll('[data-explicit-consent-visible="maps"]').forEach((n) => n.style.visibility = "hidden")) : (document.querySelectorAll('[data-explicit-consent-hide="maps"]').forEach((n) => n.style.visibility = "hidden"), document.querySelectorAll('[data-explicit-consent-visible="maps"]').forEach((n) => n.style.visibility = "visible"), document.querySelectorAll('[data-explicit-consent-disable="maps"]').forEach((n) => n.setAttribute("disabled", ""))); 1024 }); 1025 }); 1026} 1027function pt() { 1028 return $e; 1029} 1030function oe(e) { 1031 const t = [];
1032 return e.childNodes.forEach((s) => t.push(s)), t; 1033} 1034const [m, b] = rt({ 1035 mapsApiKey: "", 1036 mapsLibraries: [], 1037 youtubeConsent: { 1038 consentGiven: !1, 1039 instances: 0, 1040 coupledConsentCategory: p.Marketing 1041 }, 1042 mapsConsent: { 1043 consentGiven: !1, 1044 instances: 0, 1045 coupledConsentCategory: p.Preferences 1046 } 1047}), yt = (e) => b("mapsApiKey", e), bt = (e) => b("mapsLibraries", e), Ct = () => b("mapsConsent", "instances", m.mapsConsent.instances + 1), wt = () => b("youtubeConsent", "instances", m.youtubeConsent.instances + 1), X = { 1048 setMapsConsentGiven: () => b("mapsConsent", "consentGiven", !0), 1049 setYoutubeConsentGiven: () => b("youtubeConsent", "consentGiven", !0) 1050}; 1051ne("explicit-maps-consent", { 1052 "api-key": "", 1053 libraries: "", 1054 class: "", 1055 "consent-category": p.Preferences 1056}, (e, { 1057 element: t 1058}) => { 1059 const n = oe(t), s = ie(e["consent-category"]); 1060 return b("mapsConsent", "coupledConsentCategory", s), Ct(), $(() => { 1061 yt(e["api-key"]); 1062 }), $(() => { 1063 e.libraries !== "" && bt(e.libraries.split(",")); 1064 }), Y(lt, { 1065 state: m, 1066 children: n 1067 }); 1068}); 1069ne("consent-link", { 1070 class: "", 1071 action: "open-settings", 1072 "consent-category": p.Preferences 1073}, (e, { 1074 element: t 1075}) => { 1076 te(); 1077 const n = t, s = oe(n), i = (o) => { 1078 switch (console.log("click", e.action), e.action) { 1079 case "implicit-consent": 1080 const r = ie(e["consent-category"]); 1081 Cookiebot.submitCustomConsent(r === p.Preferences ? !0 : Cookiebot.consent.preferences, r === p.Statistics ? !0 : Cookiebot.consent.statistics, r === p.Marketing ? !0 : Cookiebot.consent.marketing); 1082 break; 1083 case "ignore-cookiebot": 1084 console.debug("[Explicit consent] Ignoring cookiebot, activating all guards, this wont save the consent in cookiebot"), X.setYoutubeConsentGiven(), V(m, X); 1085 break; 1086 default: 1087 Cookiebot.renew(); 1088 break; 1089 } 1090 }; 1091 return n.addEventListener("click", i), Ge(() => { 1092 n.removeEventListener("click", i); 1093 }), { 1094 children: s 1095 }; 1096}); 1097ne("explicit-youtube-consent", { 1098 "video-id": "", 1099 width: 500, 1100 height: 500, 1101 class: "", 1102 "class-iframe": "", 1103 "consent-category": p.Marketing 1104}, (e, { 1105 element: t 1106}) => { 1107 const n = oe(t), s = ie(e["consent-category"]); 1108 return b("youtubeConsent", "coupledConsentCategory", s), wt(), Y(ut, { 1109 state: m, 1110 get width() { 1111 return e.width; 1112 }, 1113 get height() { 1114 return e.height; 1115 }, 1116 get videoId() { 1117 return e["video-id"]; 1118 }, 1119 get class() { 1120 return e["class-iframe"]; 1121 }, 1122 children: n 1123 }); 1124}); 1125gt(m); 1126ft(m, X); 1127export { 1128 pt as waitForConsent 1129};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.