@graview/guest 0.1.36 → 0.1.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/README.md +31 -0
  2. package/dist/headless/describe.d.ts +9 -0
  3. package/dist/headless/describe.d.ts.map +1 -1
  4. package/dist/headless/describe.js +35 -1
  5. package/dist/headless/describe.js.map +1 -1
  6. package/dist/headless/runtime.generated.d.ts.map +1 -1
  7. package/dist/headless/runtime.generated.js +1 -1
  8. package/dist/headless/runtime.generated.js.map +1 -1
  9. package/dist/host/manifest.d.ts +1 -1
  10. package/dist/host/manifest.d.ts.map +1 -1
  11. package/dist/host/manifest.js +4 -0
  12. package/dist/host/manifest.js.map +1 -1
  13. package/dist/host/media.d.ts +31 -0
  14. package/dist/host/media.d.ts.map +1 -0
  15. package/dist/host/media.js +196 -0
  16. package/dist/host/media.js.map +1 -0
  17. package/dist/host/pictures.d.ts.map +1 -1
  18. package/dist/host/pictures.js +10 -0
  19. package/dist/host/pictures.js.map +1 -1
  20. package/dist/host/session.d.ts.map +1 -1
  21. package/dist/host/session.js +4 -1
  22. package/dist/host/session.js.map +1 -1
  23. package/dist/host/view-runtime.generated.d.ts.map +1 -1
  24. package/dist/host/view-runtime.generated.js +1 -1
  25. package/dist/host/view-runtime.generated.js.map +1 -1
  26. package/dist/host/view.d.ts.map +1 -1
  27. package/dist/host/view.js +55 -1
  28. package/dist/host/view.js.map +1 -1
  29. package/dist/host/worker-react.js +1 -1
  30. package/dist/host/worker-react.js.map +1 -1
  31. package/dist/open-kit.d.ts.map +1 -1
  32. package/dist/open-kit.js +9 -0
  33. package/dist/open-kit.js.map +1 -1
  34. package/dist/protocol.d.ts +19 -1
  35. package/dist/protocol.d.ts.map +1 -1
  36. package/dist/protocol.js.map +1 -1
  37. package/dist/worker/view-global.d.ts.map +1 -1
  38. package/dist/worker/view-global.js +30 -4
  39. package/dist/worker/view-global.js.map +1 -1
  40. package/package.json +3 -3
@@ -4,5 +4,5 @@
4
4
  * it in front of a view's own source, for an isolate the host picked.
5
5
  * Carries Remote DOM (MIT, Shopify Inc.).
6
6
  */
7
- export const HEADLESS_RUNTIME = "\"use strict\";\n/*! @remote-dom/core and @remote-dom/polyfill — Copyright 2020-present, Shopify Inc. — MIT License.\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * @graview/guest's worker runtime — Elastic License 2.0. */\n\"use strict\";(()=>{var A=Symbol(\"name\"),he=Symbol(\"prefix\"),ge=Symbol(\"value\"),k=Symbol(\"ns\"),Y=Symbol(\"owner\"),I=Symbol(\"owner_document\"),se=Symbol(\"attributes\"),D=Symbol(\"prev\"),S=Symbol(\"next\"),C=Symbol(\"child\"),q=Symbol(\"parent\"),ye=Symbol(\"host\"),Z=Symbol(\"data\"),xe=Symbol(\"listeners\"),Hn=Symbol(\"isTrusted\"),Me=Symbol(\"path\"),Le=Symbol(\"stop_immediate_propagation\"),He=Symbol(\"dispatching\"),le=Symbol(\"content\"),M=Symbol(\"hooks\"),kt=Symbol(\"extensions\"),Se=Symbol(\"hooks_dispatch\"),j=Symbol(\"is_connected\"),Ve=Symbol(\"create_element\"),Vr=0,X=1,Ue=2,je=3,$e=8,ve=9,Ur=10,be=11,P=\"http://www.w3.org/1999/xhtml\",J=\"http://www.w3.org/2000/svg\",jr=\"http://www.w3.org/XML/1998/namespace\",lt=\"http://www.w3.org/2000/xmlns/\";function Ct(t){return t.split(/[\\t\\n\\f\\r ]+/).filter(Boolean)}function H(t){return t.replace(/[A-Z]/g,e=>String.fromCharCode(e.charCodeAt(0)+32))}function $r(t){return t.replace(/[a-z]/g,e=>String.fromCharCode(e.charCodeAt(0)-32))}function _(t,e){let n=globalThis.DOMException;if(typeof n==\"function\")return new n(t,e);let r=new Error(t);return r.name=e,r}var Gr=/^(?:[A-Za-z][^\\0\\t\\n\\f\\r\\u0020/>]*|[:_\\u0080-\\u{10FFFF}][A-Za-z0-9-.:_\\u0080-\\u{10FFFF}]*)$/u,zr=/[\\0\\t\\n\\f\\r />=]/u,ks=/[\\0\\t\\n\\f\\r />]/u;function ce(t){if(t==null)return null;let e=String(t);return e===\"\"?null:e}function Fr(t){Gr.test(t)||Un(t)}function Vn(t){(t===\"\"||zr.test(t))&&Un(t)}function Pt(t,e,n){let r=ce(t),o=String(e),s=o.indexOf(\":\"),i=s<0?null:o.slice(0,s),c=s<0?o:o.slice(s+1);if((i!=null&&(i===\"\"||ks.test(i))||(n===\"element\"?!Gr.test(c):c===\"\"||zr.test(c)))&&Un(o),i!=null&&r==null)throw _(`A namespace is required for the prefix in \"${o}\"`,\"NamespaceError\");if(i===\"xml\"&&r!==jr)throw _(\"The xml prefix requires the XML namespace\",\"NamespaceError\");if((o===\"xmlns\"||i===\"xmlns\")&&r!==lt)throw _(\"The xmlns name requires the XMLNS namespace\",\"NamespaceError\");if(r===lt&&o!==\"xmlns\"&&i!==\"xmlns\")throw _(\"The XMLNS namespace requires the xmlns name or prefix\",\"NamespaceError\");return{namespace:r,qualifiedName:o,prefix:i,localName:c}}function Un(t){throw _(`Invalid name: \"${t}\"`,\"InvalidCharacterError\")}var _t=0,It=1,Br=2,jn=3,Cs=typeof performance>\"u\"?Date.now:performance.now.bind(performance),$=class{static NONE=_t;static CAPTURING_PHASE=It;static AT_TARGET=Br;static BUBBLING_PHASE=jn;timeStamp=Cs();target=null;currentTarget=null;srcElement=null;bubbles=!1;cancelable=!1;composed=!1;defaultPrevented=!1;cancelBubble=!1;eventPhase=_t;[Me]=[];[Le]=!1;[He]=!1;constructor(e,n){this.type=e,Object.defineProperty(this,Hn,{writable:!0,value:!1}),n&&(n.bubbles&&(this.bubbles=n.bubbles),n.cancelable&&(this.cancelable=n.cancelable),n.composed&&(this.composed=n.composed))}get isTrusted(){return this[Hn]}composedPath(){return[...this[Me]]}stopPropagation(){this.cancelBubble=!0}stopImmediatePropagation(){this[Le]=!0,this.cancelBubble=!0}preventDefault(){this.cancelable&&(this.defaultPrevented=!0)}set returnValue(e){e||this.preventDefault()}get returnValue(){return!this.defaultPrevented}initEvent(e,n,r){this.type=e,this.bubbles=!!n,this.cancelable=!!r}};function $n(t,e,n){if(t.cancelBubble)return;let o=e[xe]?.get(t.type)?.[n===It?\"capture\":\"bubble\"];if(o)for(let s of[...o]){if(!o.has(s)||s.signal?.aborted)continue;t.eventPhase=t.target===e?Br:n,t.currentTarget=e;let i=s.normalizedListener;try{typeof i==\"object\"?i.handleEvent(t):i.call(e,t)}catch(c){setTimeout(Ps,0,c)}if(t[Le])break}}function Ps(t){throw t}var ct=[],Dt=new WeakMap;function Mt(t,e){let n=Dt.get(t);n?n.push(e):Dt.set(t,[e]),ct[ct.length-1].push(t)}function G(t){let e=[];ct.push(e);let n;try{n=t()}catch(r){ct.pop();try{Yr(e)}catch{}throw r}return ct.pop(),Yr(e),n}function Yr(t){let e,n=!1;for(let r of t){let o=Dt.get(r);if(o){for(;o.length>0;){let s=o.shift();try{s()}catch(i){n||(e=i,n=!0)}}Dt.delete(r)}}if(n)throw e}var Lt=[],ut=[],Gn=!1;function Oe(t){for(let e of t)Lt.push(e),e[1]&&ut.push(e[1]);if(!Gn){Gn=!0;try{let e,n=!1;for(let r=0;r<Lt.length;r++){let[o,s]=Lt[r];s&&ut.splice(ut.indexOf(s),1);try{o()}catch(i){n||(e=i,n=!0)}}if(n)throw e}finally{Lt.length=0,ut.length=0,Gn=!1}}}function dt(t){let e=t;for(;e;){if(ut.includes(e))return!0;e=e[q]??e[ye]}return!1}var ft=Symbol(\"listenerRegistrations\"),Ee=class{[xe]=void 0;[ft]=void 0;[I]=void 0;addEventListener(e,n,r){if(n==null)return;let o=r===!0||typeof r==\"object\"&&r.capture===!0,s=typeof r==\"object\"&&r.once===!0,i=typeof r==\"object\"?r.signal:void 0;if(i?.aborted)return;let c=zn(o),u=this[ft];u||(u=new Map,this[ft]=u);let d=u.get(e);d||(d={},u.set(e,d));let p=d[c];if(p||(p=new Map,d[c]=p),p.has(n))return;let E=this,m={type:e,listener:n,capture:o,once:s,normalizedListener:n,signal:i};(s||i)&&(m.normalizedListener=function(...l){if(m.signal?.aborted){Ht(E,m);return}return m.once&&Ht(E,m),typeof m.listener==\"object\"?m.listener.handleEvent(...l):m.listener.call(this,...l)});let b=this[xe];b||(b=new Map,this[xe]=b);let N=b.get(e);N||(N={},b.set(e,N));let v=N[c];if(v||(v=new Set,N[c]=v),p.set(n,m),v.add(m),i){let y=()=>{Ht(E,m)};m.abortListener=y,i.addEventListener(\"abort\",y,{once:!0})}this[I]?.defaultView[Se].addEventListener?.(this,e,n,r)}removeEventListener(e,n,r){return _s.call(this,e,n,r)}dispatchEvent(e){if(e[He])throw _(\"Failed to execute 'dispatchEvent' on 'EventTarget': The event is already being dispatched.\",\"InvalidStateError\");e[He]=!0;try{let n=[],r=this;for(;r!=null;)n.push(r),r=r.parentNode;e.target=this,e.srcElement=this,e[Me]=n;for(let s=n.length;s--;)if($n(e,n[s],It),e.cancelBubble)return!e.defaultPrevented;let o=e.bubbles?n:n.slice(0,1);for(let s=0;s<o.length;s++)if($n(e,o[s],jn),e.cancelBubble)return!e.defaultPrevented;return!e.defaultPrevented}finally{e[He]=!1,e.cancelBubble=!1,e[Le]=!1,e.eventPhase=_t,e.currentTarget=null,e[Me]=[]}}};function _s(t,e,n){if(e==null)return;let r=n===!0||n&&n.capture===!0,o=zn(!!r),s=this[ft]?.get(t)?.[o]?.get(e);s&&Ht(this,s)}function zn(t){return t?\"capture\":\"bubble\"}function Ht(t,e){let n=zn(e.capture),r=t[ft],o=r?.get(e.type);if(!o)return;let s=o[n];if(!s||s.get(e.listener)!==e)return;s.delete(e.listener),s.size===0&&delete o[n],!o.bubble&&!o.capture&&r?.delete(e.type),e.signal&&e.abortListener&&e.signal.removeEventListener(\"abort\",e.abortListener);let i=t[xe],c=i?.get(e.type);if(!c)return;let u=c[n];u?.delete(e)&&(u.size===0&&delete c[n],!c.bubble&&!c.capture&&i?.delete(e.type),t[I]?.defaultView[Se].removeEventListener?.(t,e.type,e.listener,e.capture))}var Q=class extends Array{item(e){return this[e]??null}};var pt=0,qr=1,Yn=2,qn=3,ht=4,Wr=0,Xr=1,jt=2,$t=3,Kr=4,Bn=5,Zr=6,Jr=7,Vt=/^(?:--|-?[A-Za-z_\\u0080-\\u{10FFFF}])[A-Za-z0-9_\\u0080-\\u{10FFFF}-]*$/u;function Is(t,e){let n=1,r=null;for(let o=e;o<t.length;o++){let s=t[o];if(r){s===\"\\\\\"?o++:s===r&&(r=null);continue}if(s==='\"'||s===\"'\")r=s;else if(s===\"(\")n++;else if(s===\")\"&&--n===0)return[t.slice(e,o),o+1]}return[t.slice(e),t.length]}function W(t){throw _(`Invalid or unsupported selector: \"${t}\"`,\"SyntaxError\")}function Gt(t,e){let n=typeof e==\"string\"?gt(e):[{combinator:ht,matchers:e}],r=null,o=t[C];return o&&n[0].matchers.length&&Wn(o,n,s=>(r=s,!1)),r}function zt(t,e){let n=typeof e==\"string\"?gt(e):[{combinator:ht,matchers:e}],r=new Q,o=t[C];return o&&n[0].matchers.length&&Wn(o,n,s=>{r.push(s)}),r}function gt(t,e=!1,n=!1){let r={combinator:ht,matchers:[]},o=[r],s=/[\\t\\n\\f\\r ]*?([>\\t\\n\\f\\r +~]?)[\\t\\n\\f\\r ]*?(?:(?:\\[[\\t\\n\\f\\r ]*([^\\]=\\t\\n\\f\\r ]+)[\\t\\n\\f\\r ]*(?:=[\\t\\n\\f\\r ]*(?:(['\"])(.*?)\\3|([^\\]\\t\\n\\f\\r ]+)))?[\\t\\n\\f\\r ]*(?:\\]|$))|([#.]?)([^\\t\\n\\f\\r #.[>:+~()]+)|:(\\w+)(\\()?)/gi,i=t.replace(/^[\\t\\n\\f\\r ]+|[\\t\\n\\f\\r ]+$/g,\"\");i===\"\"&&W(t);let c=0,u;for(;u=s.exec(i);){u.index!==c&&W(t),u[1]&&(r.matchers.length===0&&!(n&&o.length===1)&&W(t),u[1]===\">\"?r.combinator=qr:u[1]===\"+\"?r.combinator=qn:u[1]===\"~\"?r.combinator=Yn:r.combinator=pt,r={combinator:ht,matchers:[]},o.push(r));let d=u[8]?H(u[8]):u[2]||u[7];u[7]!=null&&!u[6]&&r.matchers.length>0&&W(t);let E,m=u[4]??u[5]??u[7];if(u[2]){Vt.test(d)||W(t);let b=u[5],N=b?.[0];if(u[3]==null&&(N==='\"'||N===\"'\")){let v=u[0].lastIndexOf(b);m=i.slice(u.index+v+1),s.lastIndex=i.length}else b!=null&&!Vt.test(b)&&W(t);E=Kr}else u[6]?(Vt.test(d)||W(t),E=u[6]===\"#\"?jt:$t):u[8]?E=u[9]==null?Bn:Zr:u[7]===\"*\"?E=Wr:u[7]&&Vt.test(u[7])?E=Xr:W(t);u[9]?([m,s.lastIndex]=Is(i,s.lastIndex),d!==\"has\"&&d!==\"not\"&&W(t),d===\"has\"&&e&&W(t),gt(m,e||d===\"has\",d===\"has\")):E===Bn&&W(t),r.matchers.push({type:E,name:d,value:m}),c=s.lastIndex}return(c!==i.length||r.matchers.length===0)&&W(t),o}function Ds(t,e){let n=gt(e);return n[0]?.matchers.length?mt(t,n):!1}function Ms(t,e){let n=gt(e,!0,!0),r=n[0];if(n.length===1&&r.matchers.length===0)return!1;let o=pt,s={type:Jr,name:\":scope\"};if(r.matchers.length===0?(o=r.combinator,r.matchers.push(s)):n.unshift({combinator:pt,matchers:[s]}),n.some(({matchers:u})=>u.length===0))return!1;let i=o===qn||o===Yn?t[S]:t[C];if(!i)return!1;let c=!1;return Wn(i,n,()=>(c=!0,!1),t),c}function Wn(t,e,n,r){let o=[],s=t;for(;s;){if(B(s)){if(mt(s,e,r)&&n(s)===!1)return!1;let i=s[C];if(i){let c=s[S];c&&o.push(c),s=i;continue}}s=s[S]??o.pop()??null}return!0}function mt(t,e,n){let{combinator:r,matchers:o}=e[e.length-1];if(r===ht){if(!Ut(t,o,n))return!1;let c=e.slice(0,-1);return c.length===0||mt(t,c,n)}let s=r===qr||r===pt?q:D,i=t[s];if(!i)return!1;if(r===pt||r===Yn){for(;i;){if(B(i)&&Ut(i,o,n)){let c=e.slice(0,-1);if(c.length===0||mt(i,c,n))return!0}i=i[s]}return!1}else{if(r===qn&&!B(i)){for(;i&&!B(i);)i=i[s];if(!i)return!1}if(!B(i)||!Ut(i,o,n))return!1;let c=e.slice(0,-1);return c.length===0||mt(i,c,n)}}function Fn(t,e){return t.getAttributeNS(null,t.namespaceURI===P?H(e):e)}function Ut(t,e,n){if(!t)return!1;if(Array.isArray(e)){for(let i of e)if(Ut(t,i,n)===!1)return!1;return!0}let{type:r,name:o,value:s}=e;switch(r){case Wr:return o===\"*\";case Xr:return t.namespaceURI===P?t.localName===H(o):t.localName===o;case jt:return Fn(t,\"id\")===o;case $t:let i=Fn(t,\"class\");return i?Ct(i).includes(o):!1;case Kr:let c=Fn(t,o);return s==null?c!=null:c===s;case Jr:return t===n;case Bn:W(`:${o}`);case Zr:switch(o){case\"has\":return Ms(t,s||\"\");case\"not\":return!Ds(t,s||\"\");default:W(`:${o}(${s})`)}}return!1}function Ls(t){return t.nodeType===Ue}function yt(t){return Z in t}function Kn(t){return t.nodeType===je}function Hs(t){return t.nodeType===$e}function B(t){return t.nodeType===X}function Xn(t){return t.nodeType===be}function no(t){return\"appendChild\"in t}function Ft(t){let e=[],n=[t],r=new Set(n),o=new Set,s;for(;n.length>0;){let i=n.pop();if(r.delete(i),o.has(i))continue;let c=[];for(let u of Et(i)){if(o.has(u)||(o.add(u),e.push(u),c.push(u),!B(u)))continue;let d=u[se];if(d)for(let E of d)o.has(E)||(o.add(E),e.push(E));let p=u[le];p&&!o.has(p)&&!r.has(p)&&(r.add(p),n.push(p))}s??=c}return{nodes:e,treeNodes:s}}function bt(t,e){for(let n of t)n[I]=e}function Qr(t,e){let n=t.constructor,r=new n(t.name,t.value,t.namespaceURI);return r[I]=e,r}function eo(t,e){if(Kn(t))return e.createTextNode(t.data);if(Hs(t))return e.createComment(t.data);if(Ls(t))return Qr(t,e);if(B(t)){let n=e[Ve](t[A],t.namespaceURI,t[he],t.localName);if(t[se])for(let r=0;r<t[se].length;r++){let o=t[se].item(r);n.attributes.setNamedItem(Qr(o,e))}return n}else{if(Xn(t))return e.createDocumentFragment();{let n=new t.constructor;return n[I]=e,n}}}function Bt(t,e,n=t.ownerDocument){if(t.nodeType===ve)throw _(\"Cannot clone a document node\",\"NotSupportedError\");let r=eo(t,n);if(!e||!B(t)&&!Xn(t))return r;let o=new Set([t]),s=[{source:t,destination:r,childIndex:0,cloningContent:!1}];for(;s.length>0;){let i=s[s.length-1],c,u;if(i.cloningContent)if(i.contentSource&&i.contentDestination)c=i.contentSource.childNodes[i.childIndex++],u=i.contentDestination;else{s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}else if(c=i.source.childNodes[i.childIndex++],u=i.destination,!c){if(i.cloningContent=!0,i.childIndex=0,B(i.source)&&i.source.namespaceURI===P&&i.source.localName===\"template\"){let p=i.source[le];p&&(o.has(p)&&to(),o.add(p),i.contentSource=p,i.contentDestination=i.destination.content)}continue}if(!c){s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}o.has(c)&&to(),o.add(c);let d=eo(c,n);B(c)||Xn(c)?s.push({source:c,destination:d,appendTo:u,childIndex:0,cloningContent:!1}):u.appendChild(d)}return r}function to(){throw new Error(\"Cannot clone a cyclic or repeated node graph\")}function Yt(t,e){let n=String(e);return n===\"\"?null:Gt(t,[{type:jt,name:n}])}function qt(t,e){let n=[...new Set(Ct(String(e)))];return zt(t,n.map(r=>({type:$t,name:r})))}function Wt(t,e){let n=String(e),r=H(n),o=[];for(let s of Xt(t))B(s)&&(n===\"*\"||(s.namespaceURI===P?s[A]===r:s[A]===n))&&o.push(s);return o}function Xt(t){let e=[],n=[],r=t[C];for(;r;){e.push(r);let o=r[C],s=r[S];o?(s&&n.push(s),r=o):r=s??n.pop()??null}return e}function Et(t){let e=Xt(t);return e.unshift(t),e}var ee=class extends Ee{nodeType=Vr;[A]=\"\";[q]=null;[ye]=null;[C]=null;[D]=null;[S]=null;[j]=!1;get[M](){return this[I].defaultView[Se]}get localName(){return this[A]}get nodeName(){return this[A]}get ownerDocument(){return this[I]}get isConnected(){return this[j]}isDefaultNamespace(e){let n=ce(e);return Vs(this)===n}get parentNode(){return this[q]}set parentNode(e){}get parentElement(){let e=this[q];return!e||e.nodeType!==1?null:e}set parentElement(e){}get previousSibling(){return this[D]}set previousSibling(e){}get nextSibling(){return this[S]}set nextSibling(e){}get previousElementSibling(){let e=this[D];for(;e&&e.nodeType!==1;)e=e[D];return e}set previousElementSibling(e){}get nextElementSibling(){let e=this[S];for(;e&&e.nodeType!==1;)e=e[S];return e}set nextElementSibling(e){}get firstChild(){return this[C]}set firstChild(e){}get lastChild(){let e=this[C];for(;e;){let n=e[S];if(n==null)break;e=n}return e}set lastChild(e){}get nodeValue(){return yt(this)?this.data:null}set nodeValue(e){yt(this)&&(this.data=e)}get textContent(){if(yt(this))return this.data;let e=\"\";for(let n of Xt(this))Kn(n)&&(e+=n.data);return e}set textContent(e){if(yt(this))this.data=e;else if(no(this)){let n=e==null?\"\":String(e);n===\"\"?this.replaceChildren():this.replaceChildren(n)}}cloneNode(e){return Bt(this,e)}contains(e){let n=e;for(;n!=null;){if(n===this)return!0;n=n.parentNode}return!1}};function Vs(t){let e=t;for(;e;)switch(e.nodeType){case X:{let n=e;if(n.prefix==null&&n.namespaceURI!=null)return n.namespaceURI;let r=n.attributes.getNamedItemNS(lt,\"xmlns\");if(r!=null&&r.prefix==null)return ce(r.value);e=n.parentElement;break}case ve:e=e.documentElement;break;case Ur:case be:return null;case Ue:e=e.ownerElement;break;default:e=e.parentElement}return null}var te=Symbol(\"insertNode\"),Qn=Symbol(\"preflightInsertions\"),Kt=Symbol(\"replaceNode\"),Ne=class extends ee{remove(){let e=this.parentNode;e&&e.removeChild(this)}replaceWith(...e){let n=Re(e),r=this.parentNode;if(r)return Zn(o=>{ue(r,n);let s=this[S];for(;s&&n.includes(s);)s=s[S];let i=Jn(r,n,o);this.parentNode===r?r[Kt](i,this,o):r[te](i,s,o)})}before(...e){let n=Re(e),r=this.parentNode;if(r)return Zn(o=>{ue(r,n);let s=this[D];for(;s&&n.includes(s);)s=s[D];let i=Jn(r,n,o);r[te](i,s?s[S]:r.firstChild,o)})}after(...e){let n=Re(e),r=this.parentNode;if(r)return Zn(o=>{ue(r,n);let s=this[S];for(;s&&n.includes(s);)s=s[S];let i=Jn(r,n,o);r[te](i,s,o)})}};function Zn(t){return G(()=>{let e=[];try{t(e)}catch(n){try{Oe(e)}catch{}throw n}Oe(e)})}function Re(t){return t.map(e=>e instanceof ee?e:String(e))}function Nt(t,e){return e instanceof ee?e:t.ownerDocument.createTextNode(String(e))}function ue(t,e){for(let n of e){if(!(n instanceof ee))continue;let r=t;for(;r;){if(r===n)throw _(\"Cannot insert a node into itself or one of its descendants\",\"HierarchyRequestError\");r=r[q]??r[ye]}}}function Jn(t,e,n){let r=[];for(let s of e)r.push(Nt(t,s));if(r.length===1)return r[0];let o=t.ownerDocument.createDocumentFragment();o[Qn](r);for(let s of r)o[te](s,null,n);return o}var Zt,er=0,ro=0,oo=0,so=0,Ge=!1,nr=!1,Tt=!1,Jt=class{#t;#n=[];#e=new Set;#r=!1;constructor(e){if(typeof e!=\"function\")throw new TypeError(\"MutationObserver callback must be a function\");this.#t=e}observe(e,n={}){let r=Us(n),o=Zt??=new WeakMap,s=o.get(e);s==null&&(s=new Map,o.set(e,s));let i=s.get(this);i==null?er++:tr(i,-1),s.set(this,r),tr(r,1),this.#e.add(e)}disconnect(){let e=Zt;if(e!=null){for(let n of this.#e){let r=e.get(n),o=r?.get(this);o!=null&&(r.delete(this),er--,tr(o,-1)),r?.size===0&&e.delete(n)}this.#e.clear(),this.#n.length=0,er===0&&(Zt=void 0)}}takeRecords(){return this.#n.splice(0)}enqueue(e){this.#n.push(e),!this.#r&&(this.#r=!0,queueMicrotask(()=>{this.#r=!1;let n=this.takeRecords();n.length>0&&this.#t.call(this,n,this)}))}};function ne(t){let e=Zt;if(e==null)return;let n=new Map,r=t.target;for(;r;){let o=e.get(r);if(o)for(let[s,i]of o){if(r!==t.target&&!i.subtree)continue;let c=!1;if(t.type===\"attributes\"){if(!i.attributes||i.attributeFilter&&!i.attributeFilter.has(t.attributeName??\"\"))continue;c=i.attributeOldValue}else if(t.type===\"characterData\"){if(!i.characterData)continue;c=i.characterDataOldValue}else if(!i.childList)continue;n.set(s,n.get(s)===!0||c)}r=r.parentNode}for(let[o,s]of n)o.enqueue({addedNodes:t.addedNodes??new Q,attributeName:t.attributeName??null,attributeNamespace:t.attributeNamespace??null,nextSibling:t.nextSibling??null,oldValue:s?t.oldValue??null:null,previousSibling:t.previousSibling??null,removedNodes:t.removedNodes??new Q,target:t.target,type:t.type})}function Qt(...t){let e=new Q;return e.push(...t),e}function Us(t){if(t.attributes===!1&&(t.attributeOldValue||t.attributeFilter!=null))throw new TypeError(\"attributeOldValue and attributeFilter require attributes to be enabled\");if(t.characterData===!1&&t.characterDataOldValue)throw new TypeError(\"characterDataOldValue requires characterData to be enabled\");let e=t.attributes??(t.attributeOldValue===!0||t.attributeFilter!=null),n=t.characterData??t.characterDataOldValue===!0,r=t.childList===!0;if(!e&&!n&&!r)throw new TypeError(\"MutationObserver options must enable childList, attributes, or characterData\");return{attributes:e,attributeFilter:t.attributeFilter==null?void 0:new Set(t.attributeFilter.map(String)),attributeOldValue:t.attributeOldValue===!0,characterData:n,characterDataOldValue:t.characterDataOldValue===!0,childList:r,subtree:t.subtree===!0}}function tr(t,e){t.attributes&&(ro+=e),t.characterData&&(oo+=e),t.childList&&(so+=e),Ge=ro>0,nr=oo>0,Tt=so>0}var ie=class extends Ne{childNodes=new Q;children=new Q;appendChild(e){return G(()=>this[te](e,null))}insertBefore(e,n){return G(()=>this[te](e,n||null))}append(...e){return G(()=>{let n=Re(e.filter(r=>r!=null));n.length>1&&ue(this,n);for(let r of n)this[te](Nt(this,r),null)})}prepend(...e){return G(()=>{let n=Re(e.filter(o=>o!=null));n.length>1&&ue(this,n);let r=this.firstChild;for(let o of n)this[te](Nt(this,o),r)})}replaceChildren(...e){return G(()=>{let n=Re(e.filter(o=>o!=null));ue(this,n);let r;for(;r=this.firstChild;)this.removeChildImmediately(r);for(let o of n)this[te](Nt(this,o),null)})}removeChild(e){return G(()=>(this.removeChildImmediately(e),e))}removeChildImmediately(e){if(e.parentNode!==this)throw _(\"The node is not a child of this node\",\"NotFoundError\");let n=this[j]?Et(e):void 0,r=e[D],o=e[S],s=en(this,e);if(n)for(let i of n)i[j]=!1;this.queueRemovalMutationRecord(this,e,r,o),n&&this.enqueueTreeReactions(n,\"disconnectedCallback\"),Oe(this.collectRemovalHookEffects(e,s))}replaceChild(e,n){return G(()=>this[Kt](e,n))}[Kt](e,n,r){if(ue(this,[e]),n.parentNode!==this)throw _(\"The reference node is not a child of this parent\",\"NotFoundError\");let o=n[D],s=n[S],i=this.prepareInsertion(e),c=this[j]?Et(n):void 0,u=new Set(i.map(({node:m})=>m)),d=s;for(;d&&u.has(d);)d=d[S];let p=en(this,n);if(c){for(let b of c)b[j]=!1;let m=new Set(c);for(let b of i)m.has(b.node)&&(b.shouldDisconnect=!1)}this.commitInsertion(i,d);let E=this[j];return this.queueRemovalMutationRecord(this,n,o,s),this.queueInsertionMutationRecords(i),c&&this.enqueueTreeReactions(c,\"disconnectedCallback\"),this.enqueueInsertionReactions(i,E),this.performOrCollectHookEffects([...this.collectRemovalHookEffects(n,p),...this.collectInsertionHookEffects(i)],r),n}querySelectorAll(e){return zt(this,e)}querySelector(e){return Gt(this,e)}[te](e,n,r){return this.validateInsertion(e,n),this.insertIntoValidated(e,n,r),e}[Qn](e){for(let n of e)this.validateInsertion(n,null),this.prepareInsertion(n)}validateInsertion(e,n){if(ue(this,[e]),n&&n.parentNode!==this)throw _(\"The reference node is not a child of this parent\",\"NotFoundError\")}insertIntoValidated(e,n,r){e===n&&(n=e[S]);let o=this.prepareInsertion(e);this.commitInsertion(o,n);let s=this[j];this.queueInsertionMutationRecords(o),this.enqueueInsertionReactions(o,s),this.performOrCollectHookEffects(this.collectInsertionHookEffects(o),r)}performOrCollectHookEffects(e,n){n?n.push(...e):Oe(e)}prepareInsertion(e){let n=[];if(e.nodeType===be){let i=e[C];for(;i;)n.push(i),i=i[S]}else n.push(e);let r=this[j],o=this[I],s=[];for(let i of n){let c=i[j],u=c||r,d,p;if(i[I]===o)u&&(d=Et(i));else{let E=Ft(i);p=E.nodes,u&&(d=E.treeNodes)}s.push({node:i,nodes:d,adoption:p,shouldDisconnect:c})}return s}commitInsertion(e,n){for(let s of e){let i=s.node[q];if(i){let c=s.node[D],u=s.node[S];s.source={parent:i,index:en(i,s.node),previousSibling:c,nextSibling:u}}}for(let s of e){let i=this.attachChild(s.node,n);s.insertIndex=i.index,s.previousSibling=i.previousSibling,s.nextSibling=i.nextSibling}let r=this[I];for(let{adoption:s}of e)s&&bt(s,r);let o=this[j];for(let{nodes:s}of e)if(s)for(let i of s)i[j]=o}attachChild(e,n){if(n){let s=n[D];e[S]=n,e[D]=s,s?s[S]=e:this[C]=e,n[D]=e}else{e[S]=null;let s=this[C];if(s){let i;for(;i=s[S];)s=i;s[S]=e,e[D]=s}else this[C]=e,e[D]=null}let r=B(e);e[q]=this;let o;if(n){if(o=this.childNodes.indexOf(n),this.childNodes.splice(o,0,e),r){let s=n;for(;s&&!B(s);)s=s[S];s?this.children.splice(this.children.indexOf(s),0,e):this.children.push(e)}}else o=this.childNodes.length,this.childNodes.push(e),r&&this.children.push(e);return{index:o,previousSibling:e[D],nextSibling:e[S]}}queueRemovalMutationRecord(e,n,r,o){Tt&&ne({type:\"childList\",target:e,removedNodes:Qt(n),previousSibling:r,nextSibling:o})}queueInsertionMutationRecords(e){if(Tt)for(let n of e){let{node:r,source:o}=n;o&&this.queueRemovalMutationRecord(o.parent,r,o.previousSibling,o.nextSibling),ne({type:\"childList\",target:this,addedNodes:Qt(r),previousSibling:n.previousSibling,nextSibling:n.nextSibling})}}collectRemovalHookEffects(e,n){return this.nodeType!==X||dt(this)?[]:[[()=>this[M].removeChild?.(this,e,n)]]}collectInsertionHookEffects(e){let n=[];for(let r of e){let{node:o,source:s}=r;s?.parent.nodeType===X&&!dt(s.parent)&&n.push([()=>s.parent[M].removeChild?.(s.parent,o,s.index)]),this.nodeType===X&&!dt(this)&&n.push([()=>this[M].insertChild?.(this,o,r.insertIndex),o])}return n}enqueueInsertionReactions(e,n){for(let r of e){let{nodes:o}=r;o&&(r.shouldDisconnect&&this.enqueueTreeReactions(o,\"disconnectedCallback\"),n&&this.enqueueTreeReactions(o,\"connectedCallback\"))}}enqueueTreeReactions(e,n){ao(e,n)}};function io(t,e,n,r){if(e.parentNode!==t)throw Error(\"not a child of this node\");let o=t[j]?n.treeNodes:void 0,s=e[D],i=e[S],c=en(t,e);if(o)for(let d of o)d[j]=!1;bt(n.nodes,r),Tt&&ne({type:\"childList\",target:t,removedNodes:Qt(e),previousSibling:s,nextSibling:i}),o&&ao(o,\"disconnectedCallback\");let u=[];t.nodeType===X&&!dt(t)&&u.push([()=>t[M].removeChild?.(t,e,c)]),Oe(u)}function en(t,e){let n=e[D],r=e[S];n?n[S]=r:t[C]=r,r&&(r[D]=n);let o=t.childNodes.indexOf(e);return t.childNodes.splice(o,1),B(e)&&t.children.splice(t.children.indexOf(e),1),e[q]=null,e[S]=null,e[D]=null,o}function ao(t,e){for(let n of t){let r=n[e];typeof r==\"function\"&&Mt(n,()=>r.call(n))}}function wt(t,e,n,r,o){let{observedAttributes:s}=t.constructor,{attributeChangedCallback:i}=t;i==null||s==null||!s.includes(e)||Mt(t,()=>i.call(t,e,n,r,o))}var tn=class{[C]=null;constructor(e){this[Y]=e}getNamedItem(e){let n=String(e),r=this[Y][k]===P?H(n):n,o=this[C];for(;o;){if(o.name===r)return o;o=o[S]}return null}getNamedItemNS(e,n){let r=ce(e),o=String(n),s=this[C];for(;s;){if(s.localName===o&&s[k]===r)return s;s=s[S]}return null}item(e){let n=this[C],r=0;for(;n;){if(r++===e)return n;n=n[S]}return null}get length(){let e=0,n=this[C];for(;n;)e++,n=n[S];return e}removeNamedItem(e){let n=String(e),r=this[Y][k]===P?H(n):n;return G(()=>this.removeNamedItemImmediately(o=>o.name===r))}removeNamedItemNS(e,n){let r=ce(e),o=String(n);return G(()=>this.removeNamedItemImmediately(s=>s.localName===o&&s[k]===r))}removeNamedItemImmediately(e){let n=this[Y],r=this[C],o=null;for(;r!=null;){if(e(r)){o&&(o[S]=r[S]),this[C]===r&&(this[C]=r[S]);let s=r.value;return r[S]=null,r[Y]=null,Ge&&ne({type:\"attributes\",target:n,attributeName:r.name,attributeNamespace:r[k],oldValue:s}),n[M].removeAttribute?.(n,r.name,r[k]),wt(n,r.localName,s,null,r[k]),r}o=r,r=r[S]}return null}setNamedItem(e){return G(()=>this.setNamedItemImmediately(e))}setNamedItemImmediately(e){let n=this[Y],r=e[Y];if(r!=null&&r!==n)throw _(\"The attribute is already in use by another element.\",\"InUseAttributeError\");let o=null,s=this[C],i=null;for(;s;){if(s.localName===e.localName&&s[k]===e[k]){if(s===e)return s;i?i[S]=e:this[C]=e,e[S]=s[S],s[S]=null,o=s;break}i=s,s=s[S]}o==null&&(i?i[S]=e:this[C]=e),e[Y]=n,e[I]=n[I],o&&(o[Y]=null);let c=o==null||o.value!==e.value,u=o!=null&&o.name!==e.name;return c&&Ge&&ne({type:\"attributes\",target:n,attributeName:e.name,attributeNamespace:e[k],oldValue:o?.value??null}),u&&n[M].removeAttribute?.(n,o.name,o[k]),(c||u)&&n[M].setAttribute?.(n,e.name,e.value,e[k]),c&&wt(n,e.localName,o?.value??null,e.value,e[k]),o}setNamedItemNS(e){return this.setNamedItem(e)}*[Symbol.iterator](){let e=this[C];for(;e;)yield e,e=e[S]}};var Ae=class extends ee{nodeType=Ue;[k]=null;[S]=null;[Y]=null;constructor(e,n,r){super(),this[A]=e,this[ge]=n,r&&(this[k]=r)}get nodeName(){return this[A]}set nodeName(e){}get name(){return this[A]}set name(e){}get localName(){if(this[k]==null)return this[A];let e=this[A].indexOf(\":\");return e<0?this[A]:this[A].slice(e+1)}get prefix(){if(this[k]==null)return null;let e=this[A].indexOf(\":\");return e<0?null:this[A].slice(0,e)}get value(){return this[ge]}set value(e){let n=String(e),r=this[Y];if(!r){this[ge]=n;return}G(()=>{let o=this[ge];this[ge]=n,Ge&&o!==n&&ne({type:\"attributes\",target:r,attributeName:this[A],attributeNamespace:this[k],oldValue:o}),this[M].setAttribute?.(r,this[A],n,this[k]),wt(r,this.localName,o,n,this[k])})}get nodeValue(){return this.value}set nodeValue(e){this.value=e}get ownerElement(){return this[Y]}get namespaceURI(){return this[k]}get specified(){return!0}};var js={amp:\"&\",AMP:\"&\",apos:\"'\",gt:\">\",GT:\">\",lt:\"<\",LT:\"<\",quot:'\"',QUOT:'\"'},$s=new Set([\"area\",\"base\",\"br\",\"col\",\"embed\",\"hr\",\"img\",\"input\",\"link\",\"meta\",\"param\",\"source\",\"track\",\"wbr\"]),Gs=/(?:<([a-z][a-z0-9-:]*)((?:[\\s]+[^<>'\"=/\\s]+(?:=(['\"])[^]*?\\3|=[^>'\"\\s]*|))*)[\\s]*(\\/?)\\s*>|<\\/([a-z][a-z0-9-:]*)>|<!--(.*?)-->|([^<>]+))/gi,uo=/\\s([^<>'\"=/\\n\\s]+)(?:=([\"'])([\\s\\S]*?)\\2|=([^>'\"\\n\\s]*)|)/g,zs=\"|b|big|blockquote|body|br|center|code|dd|div|dl|dt|em|embed|h1|h2|h3|h4|h5|h6|head|hr|i|img|li|listing|menu|meta|nobr|ol|p|pre|ruby|s|small|span|strong|strike|sub|sup|table|tt|u|ul|var|\",Fs=/^(?:color|face|size)$/i;function lo(t){return t.replace(/&(?:(amp|AMP|apos|gt|GT|lt|LT|quot|QUOT)|#(\\d+)|#[xX]([\\da-fA-F]+));/g,(e,n,r,o)=>{if(n)return js[n];let s=Number.parseInt(r??o,r?10:16);try{return String.fromCodePoint(s)}catch{return e}})}function fo(t){return t.namespaceURI===P&&$s.has(t.localName)}function co(t){let e=t.localName;return t[k]===J&&(e===\"foreignObject\"||e===\"desc\"||e===\"title\")}function Bs(t,e){if(zs.includes(`|${t}|`))return!0;if(t!==\"font\")return!1;for(let n of e.matchAll(uo))if(Fs.test(n[1]))return!0;return!1}function nn(t,e){let n=e.ownerDocument,r=n.createDocumentFragment(),o=[],s=r;for(let i of t.matchAll(Gs)){let c=i[1];if(c){let u=i[2],d=H(c),p=o[o.length-1]?.element??e,E=p[k]===J?J:P;if(d===\"svg\")E=J;else if(E===J){if(co(p))E=P;else if(Bs(d,u)){for(;o.length>0;){let N=o[o.length-1];if(N.element[k]!==J||co(N.element))break;o.pop(),s=N.target}E=P}}let m=E===P?d:c,b=n[Ve](m,E,null,m);for(let N of u.matchAll(uo))b.setAttribute(N[1],lo(N[3]||N[4]||\"\"));if(s.append(b),fo(b)||E!==P&&i[4])continue;o.push({element:b,target:s}),s=E===P&&d===\"template\"?b.content:b}else if(i[5]){let u=H(i[5]);for(let d=o.length-1;d>=0;d--){let p=o[d],E=H(p.element[A]);if(E===u){s=p.target,o.length=d;break}if(p.element[k]===P&&E===\"template\")break}}else i[6]?s.append(n.createComment(i[6])):s.append(lo(i[7]))}return r}function rn(t){return po([{type:\"content\",child:t[C]}])}function mo(t){return po([{type:\"opening\",node:t}])}function po(t){let e=[],n;for(;n=t.pop();)switch(n.type){case\"opening\":{let r=n.node;switch(r.nodeType){case X:{let o=r;e.push(`<${o[A]}`);let s=o[se]?.[C];for(;s;){e.push(` ${s[A]}`);let c=s[ge];c!==\"\"&&(c=String(c).replace(/&/g,\"&amp;\").replace(/\"/g,\"&quot;\"),e.push(`=\"${c}\"`)),s=s[S]}if(e.push(\">\"),fo(o))break;let i=o.namespaceURI===P&&o.localName===\"template\"?o[le]:o;t.push({type:\"closing\",name:o[A]}),t.push({type:\"content\",child:i?.[C]??null});break}case je:{let o=r;e.push(o[Z].replace(/&/g,\"&amp;\").replace(/\"/g,\"&quot;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\"));break}case $e:{let o=r;e.push(`<!--${o[Z]}-->`);break}}break}case\"content\":{let r=n.child;r&&(t.push({type:\"content\",child:r[S]}),t.push({type:\"opening\",node:r}));break}case\"closing\":e.push(`</${n.name}>`);break}return e.join(\"\")}var V=class extends ie{nodeType=X;[k]=P;[he]=null;get namespaceURI(){return this[k]}get prefix(){return this[he]}get localName(){let e=this[he];return e==null?this[A]:this[A].slice(e.length+1)}get nodeName(){return this[k]===P?$r(this[A]):this[A]}get tagName(){return this.nodeName}get id(){return this.getAttributeNS(null,\"id\")??\"\"}set id(e){this.setAttribute(\"id\",String(e))}get slot(){return this.getAttributeNS(null,\"slot\")??\"\"}set slot(e){let n=String(e);this.getAttributeNS(null,\"slot\")!==n&&this.attributes.setNamedItem(new Ae(\"slot\",n))}get attributes(){let e=this[se];return e||(e=new tn(this),this[se]=e),e}getAttributeNames(){return[...this.attributes].map(e=>e.name)}getElementsByTagName(e){return Wt(this,e)}get firstElementChild(){return this.children[0]??null}getElementsByClassName(e){return qt(this,e)}get lastElementChild(){return this.children[this.children.length-1]??null}get nextElementSibling(){let e=this.nextSibling;for(;e&&e.nodeType!==1;)e=e.nextSibling;return e}get previousElementSibling(){let e=this.previousSibling;for(;e&&e.nodeType!==1;)e=e.previousSibling;return e}setAttribute(e,n){let r=String(e),o=String(n);Vn(r);let s=this[k]===P?H(r):r,i=this.attributes.getNamedItemNS(null,s);i?i.value=o:this.attributes.setNamedItem(new Ae(s,o))}setAttributeNS(e,n,r){let o=ce(e),s=String(n),i=String(r),c=Pt(o,s,\"attribute\"),u=this.attributes.getNamedItemNS(c.namespace,c.localName);u?u.value=i:this.attributes.setNamedItemNS(new Ae(c.qualifiedName,i,c.namespace))}toggleAttribute(e,n){let r=String(e);Vn(r);let o=this[k]===P?H(r):r,s=this.attributes.getNamedItemNS(null,o),i=n===void 0?void 0:!!n;return s==null?i===!1?!1:(this.attributes.setNamedItem(new Ae(o,\"\")),!0):i===!0?!0:(this.attributes.removeNamedItemNS(null,o),!1)}getAttribute(e){let n=this.attributes.getNamedItem(e);return n&&n.value}getAttributeNS(e,n){let r=this.attributes.getNamedItemNS(e,n);return r&&r.value}hasAttribute(e){return this.attributes.getNamedItem(e)!=null}hasAttributeNS(e,n){return this.attributes.getNamedItemNS(e,n)!=null}removeAttribute(e){let n=String(e),r=this[k]===P?H(n):n;this.attributes.removeNamedItemNS(null,r)}removeAttributeNS(e,n){this.attributes.removeNamedItemNS(e,n)}get outerHTML(){return mo(this)}get innerHTML(){return rn(this)}set innerHTML(e){if(e==null||e===\"\")this.replaceChildren();else{let n=nn(String(e),this);this.replaceChildren(n)}}};var ze=class t extends V{[k]=J;get ownerSVGElement(){let e=null,n=this.parentNode;for(;n instanceof t;)e=n,n=n.parentNode;return e}};var Te=class extends Ne{[Z]=\"\";constructor(e){super(),this[Z]=e==null?\"\":String(e)}setData(e){let n=nr,r=n?this[Z]:null,o=\"\";e!=null&&(o=typeof e==\"string\"?e:String(e)),this[Z]=o,n&&r!==o&&ne({type:\"characterData\",target:this,oldValue:r}),this[M].setText?.(this,o)}get data(){return this[Z]}set data(e){this.setData(e)}};var Fe=class extends Te{nodeType=je;[A]=\"#text\"};var Be=class extends Te{nodeType=$e;[A]=\"#comment\"};var Ye=class extends ie{nodeType=be;[A]=\"#document-fragment\";[I]=typeof window<\"u\"?window.document:null;getElementById(e){return Yt(this,e)}};var qe=class extends V{get content(){let e=this[le];return e||(e=this.ownerDocument.createDocumentFragment(),e[ye]=this,this[le]=e),e}set content(e){}set innerHTML(e){this.content.replaceChildren(nn(String(e),this))}get innerHTML(){let e=this[le];return e?rn(e):\"\"}};var on=class extends V{};var sn=class extends V{};var an=class extends V{};var xt=class extends ie{nodeType=ve;[A]=\"#document\";[j]=!0;constructor(e){super(),this.defaultView=e,this[I]=this,this.documentElement=cn(new an,this,\"html\"),this.body=cn(new on,this,\"body\"),this.head=cn(new sn,this,\"head\"),this.appendChild(this.documentElement),this.documentElement.appendChild(this.head),this.documentElement.appendChild(this.body)}get textContent(){return null}set textContent(e){}getElementsByClassName(e){return qt(this,e)}createElement(e){let n=String(e);return Fr(n),rr(this,H(n))}createElementNS(e,n){let r=Pt(e,n,\"element\");return rr(this,r.qualifiedName,r.namespace,r.prefix,r.localName)}[Ve](e,n,r,o){return rr(this,e,n,r,o)}createTextNode(e){let n=ln(new Fe(e),this);return this[M].createText?.(n,n.data),n}createComment(e){return ln(new Be(e),this)}createDocumentFragment(){return ln(new Ye,this)}createEvent(){return new $(\"\")}getElementById(e){return Yt(this,e)}getElementsByTagName(e){return Wt(this,e)}importNode(e,n){if(e.nodeType===ve)throw _(\"Cannot import a document node\",\"NotSupportedError\");return Bt(e,n,this)}adoptNode(e){if(e[I]===this)return e;let n=Ft(e);return G(()=>{let r=e.parentNode;return r?io(r,e,n,this):bt(n.nodes,this),e})}};function ln(t,e){return Object.defineProperty(t,I,{value:e,writable:!0,enumerable:!1}),t}function rr(t,e,n=P,r=null,o=e){let s;if(n===J)s=new ze;else if(n===P&&o===\"template\")s=new qe;else if(n===P){let i=t.defaultView.customElements.get(o);s=i?new i:new V}else s=new V;return cn(s,t,e,n,r)}function cn(t,e,n,r=P,o=null){return ln(t,e),Object.defineProperties(t,{[A]:{value:n},[k]:{value:r},[he]:{value:o}}),e[M].createElement?.(t,r),t}var un=class extends ${constructor(e,n){super(e,n),this.detail=n?.detail??null}initCustomEvent(e,n,r,o){super.initEvent(e,n,r),this.detail=o??null}};var dn=class extends ${constructor(e,n){super(e,n),this.message=n.message,this.filename=n.filename,this.lineno=n.lineno,this.colno=n.colno,this.error=n.error}};var fn=class extends ${constructor(e,n){super(e,n),this.promise=n.promise,this.reason=n.reason}};var mn=class extends ${constructor(e,n){super(e,n),this.oldState=n.oldState,this.newState=n.newState}};var pn=class extends ${constructor(e,n={}){super(e,n),this.relatedTarget=n.relatedTarget??null}};var hn=class extends ${constructor(e,n={}){super(e,n),this.clipboardData=n.clipboardData??null}};var gn=class extends V{};var Ys=/^[a-z][^A-Z\\u0000\\t\\n\\f\\r />]*-[^A-Z\\u0000\\t\\n\\f\\r />]*$/u,qs=new Set([\"annotation-xml\",\"color-profile\",\"font-face\",\"font-face-src\",\"font-face-uri\",\"font-face-format\",\"font-face-name\",\"missing-glyph\"]);function ho(t){return Ys.test(t)&&!qs.has(t)}function go(t){return _(`Invalid custom element name: \"${t}\"`,\"SyntaxError\")}var yn=class{registry=new Map;listenersByName=new Map;define(e,n,r){if(!ho(e))throw go(e);if(this.registry.has(e))throw _(`A custom element named \"${e}\" has already been defined`,\"NotSupportedError\");if(this.getName(n)!=null)throw _(\"This constructor has already been registered in this custom element registry\",\"NotSupportedError\");this.registry.set(e,n);let o=this.listenersByName.get(e);if(o!=null){this.listenersByName.delete(e);for(let s of o)s(n)}}get(e){return this.registry.get(e)}getName(e){for(let[n,r]of this.registry)if(r===e)return n;return null}whenDefined(e){if(!ho(e))return Promise.reject(go(e));let n=this.registry.get(e);if(n!=null)return Promise.resolve(n);let r=this.listenersByName.get(e);return r==null&&(r=[],this.listenersByName.set(e,r)),new Promise(o=>{r.push(o)})}upgrade(e){}initialize(e){}};var Ws=[\"onerror\",\"onunhandledrejection\"],bo=Symbol.for(\"@remote-dom/polyfill/global-property\");function Eo(t){return Object.getOwnPropertyDescriptors(t)}function No(t){let e={};for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors(Ee.prototype)))n!==\"constructor\"&&typeof r.value==\"function\"&&(r.value=or(r.value.bind(t)),e[n]=r);return e}function To(t){let e={};for(let n of Ws)e[n]={configurable:!0,enumerable:!0,get:or(()=>t[n]),set:or(r=>{t[n]=r})};return e}function Xs(t){return Object.assign(Eo(t),No(t),To(t))}function or(t){return Object.defineProperty(t,bo,{value:!0}),t}function yo(t,e){for(let n of Reflect.ownKeys(e)){let r=Ks(t,n);(r==null||Zs(r))&&Object.defineProperty(t,n,e[n])}}function Ks(t,e){let n=t;for(;n;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function Zs(t){return[t.value,t.get,t.set].some(e=>typeof e==\"function\"&&e[bo]===!0)}var ke=class extends Ee{[M]={};[kt]=[];[Se]=Qs(this);name=\"\";window=this;parent=this;self=this;top=this;document=new xt(this);customElements=new yn;location=globalThis.location;navigator=globalThis.navigator;Event=$;ErrorEvent=dn;PromiseRejectionEvent=fn;ToggleEvent=mn;FocusEvent=pn;ClipboardEvent=hn;EventTarget=Ee;CustomEvent=un;Node=ee;ParentNode=ie;ChildNode=Ne;DocumentFragment=Ye;Document=xt;CharacterData=Te;Comment=Be;Text=Fe;Element=V;HTMLElement=gn;SVGElement=ze;HTMLTemplateElement=qe;MutationObserver=Jt;#t=null;#n=null;#e=null;static with(...e){let n=this;return class extends n{constructor(){super();for(let o of e)Js(this,o)}}}get onerror(){return this.#n}set onerror(e){this.#t&&this.removeEventListener(\"error\",this.#t),e&&typeof e==\"function\"?(this.#n=e,this.#t=n=>{e(n.message??\"Error\",n.filename,n.lineno,n.colno,n.error)},this.addEventListener(\"error\",this.#t)):(this.#t=null,this.#n=null)}get onunhandledrejection(){return this.#e}set onunhandledrejection(e){this.#e&&this.removeEventListener(\"unhandledrejection\",this.#e),e&&typeof e==\"function\"?(this.#e=e,this.addEventListener(\"unhandledrejection\",this.#e)):this.#e=null}static setGlobal(e){let n=globalThis.self,r=globalThis.window,o=Eo(e),s=Object.assign(No(e),To(e));delete o.self,Object.defineProperties(globalThis,o),yo(globalThis,s),typeof n>\"u\"||n===r&&n!==globalThis?Object.defineProperty(globalThis,\"self\",{value:e,configurable:!0,writable:!0,enumerable:!0}):n!==globalThis&&(Object.defineProperties(n,o),yo(n,s))}static setGlobalThis(e){for(let n in e)e[n]===e&&(e[n]=globalThis);Object.defineProperties(globalThis,Xs(e))}};function Js(t,e){t[kt].push(e(t)??{})}function Qs(t){return{createElement:de.bind(null,t,\"createElement\"),setAttribute:de.bind(null,t,\"setAttribute\"),removeAttribute:de.bind(null,t,\"removeAttribute\"),createText:de.bind(null,t,\"createText\"),setText:de.bind(null,t,\"setText\"),insertChild:de.bind(null,t,\"insertChild\"),removeChild:de.bind(null,t,\"removeChild\"),addEventListener:de.bind(null,t,\"addEventListener\"),removeEventListener:de.bind(null,t,\"removeEventListener\")}}function de(t,e,...n){for(let s of t[kt])s[e]?.apply(s,n);let r=t[M];r[e]?.apply(r,n)}var bn=new ke;var sr=\"~\";var we=new WeakMap;function We(t){return we.get(t)}var cr=new WeakMap,ti=0;function re(t){let e=cr.get(t);return e==null&&(e=String(ti++),En(t,e)),e}function En(t,e){cr.set(t,e)}var ar=new WeakMap;function ni(t){return ar.get(t)}var lr=new WeakMap;function ri(t){let e=lr.get(t);if(e!=null)return e;if(!(!(t instanceof Element)||t.tagName.includes(\"-\"))){e={};for(let{name:n,value:r}of t.attributes)e[n]=r;return e}}var oi=new WeakMap;function si(t){return oi.get(t)}function ur(t,e,n){let r=ar.get(t);if(r==null&&(r={},ar.set(t,r)),r[e]===n)return;r[e]=n;let o=we.get(t);o?.mutate([[3,re(t),e,n,1]])}function Nn(t,e,n){let r=lr.get(t);if(r==null&&(r={},lr.set(t,r)),r[e]===n)return;n==null?delete r[e]:r[e]=String(n);let o=we.get(t);o?.mutate([[3,re(t),e,n,2]])}function Xe(t,e){if(we.get(t)!==e&&(we.set(t,e),t.childNodes))for(let r=0;r<t.childNodes.length;r++)Xe(t.childNodes[r],e)}function Tn(t){if(we.get(t)!=null&&(we.delete(t),t.childNodes))for(let n=0;n<t.childNodes.length;n++)Tn(t.childNodes[n])}function Ke(t){let{nodeType:e}=t;switch(e){case 1:return{id:re(t),type:e,element:t.localName,properties:ir(ni(t)),attributes:ir(ri(t)),eventListeners:ir(si(t)),children:Array.from(t.childNodes).map(Ke)};case 3:case 8:return{id:re(t),type:e,data:t.data};default:throw new Error(`Cannot serialize node of type ${t.nodeType} (${typeof t.nodeType})`)}}function ir(t){return t?{...t}:void 0}function dr(t,e,...n){let r=cr.get(t),o=we.get(t);if(r==null||o==null)throw new Error(`Cannot call method ${e} on an unconnected node`);return o.call(r,e,...n)}var Ze=bn[M];Ze.insertChild=(t,e,n)=>{let r=We(t);r!=null&&(Xe(e,r),r.mutate([[0,re(t),Ke(e),n]]))};Ze.removeChild=(t,e,n)=>{let r=We(t);r!=null&&(Tn(e),r.mutate([[1,re(t),n]]))};Ze.setText=(t,e)=>{let n=We(t);n?.mutate([[2,re(t),e]])};Ze.setAttribute=(t,e,n)=>{t.tagName.includes(\"-\")||Nn(t,e,n)};Ze.removeAttribute=(t,e)=>{t.tagName.includes(\"-\")||Nn(t,e)};ke.setGlobal(bn);var So=[\"globalThis\",\"Infinity\",\"NaN\",\"undefined\",\"isFinite\",\"isNaN\",\"parseFloat\",\"parseInt\",\"decodeURI\",\"decodeURIComponent\",\"encodeURI\",\"encodeURIComponent\",\"escape\",\"unescape\",\"Object\",\"Function\",\"Array\",\"Number\",\"Boolean\",\"String\",\"Symbol\",\"BigInt\",\"Date\",\"Promise\",\"RegExp\",\"Math\",\"JSON\",\"Reflect\",\"Proxy\",\"Intl\",\"Error\",\"AggregateError\",\"EvalError\",\"RangeError\",\"ReferenceError\",\"SyntaxError\",\"TypeError\",\"URIError\",\"SuppressedError\",\"Map\",\"Set\",\"WeakMap\",\"WeakSet\",\"WeakRef\",\"FinalizationRegistry\",\"Iterator\",\"AsyncIterator\",\"DisposableStack\",\"AsyncDisposableStack\",\"ArrayBuffer\",\"SharedArrayBuffer\",\"DataView\",\"Atomics\",\"Int8Array\",\"Uint8Array\",\"Uint8ClampedArray\",\"Int16Array\",\"Uint16Array\",\"Int32Array\",\"Uint32Array\",\"Float16Array\",\"Float32Array\",\"Float64Array\",\"BigInt64Array\",\"BigUint64Array\"],vo=[\"window\",\"parent\",\"top\",\"document\",\"customElements\",\"Event\",\"ErrorEvent\",\"PromiseRejectionEvent\",\"ToggleEvent\",\"FocusEvent\",\"ClipboardEvent\",\"CustomEvent\",\"EventTarget\",\"Node\",\"ParentNode\",\"ChildNode\",\"DocumentFragment\",\"Document\",\"CharacterData\",\"Comment\",\"Text\",\"Element\",\"HTMLElement\",\"SVGElement\",\"HTMLTemplateElement\",\"MutationObserver\"],Oo=[\"self\",\"postMessage\",\"setTimeout\",\"clearTimeout\",\"setInterval\",\"clearInterval\",\"queueMicrotask\",\"structuredClone\",\"crypto\",\"console\",\"DOMException\"],Ro=[\"TEMPORARY\",\"PERSISTENT\"],mu=Object.freeze([...So,...vo,...Oo,...Ro]),pu=Object.freeze([\"constructor\",\"__defineGetter__\",\"__defineSetter__\",\"hasOwnProperty\",\"__lookupGetter__\",\"__lookupSetter__\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toString\",\"valueOf\",\"__proto__\",\"toLocaleString\"]),xo=t=>typeof t==\"symbol\"?`[${t.description??\"symbol\"}]`:t;function Ao(t=globalThis,e=[],n={}){let r=[],o=[],s=new Set([...So,...vo,...Oo,...e,\"constructor\",Symbol.toStringTag]),i=(g,a)=>{let f=Reflect.getOwnPropertyDescriptor(g,a);return f===void 0||!(\"value\"in f)||f.writable||f.configurable?!1:n.primitivesStay&&typeof a==\"symbol\"&&(typeof f.value!=\"object\"||f.value===null)&&typeof f.value!=\"function\"?!0:Ro.includes(a)&&typeof f.value==\"number\"},c=t,u=c.setTimeout,d=c.setInterval,p=c.crypto,E=(g,a)=>function(f,T,...w){if(typeof f!=\"function\")throw new TypeError(`${a} takes a function: a guest view cannot run code from text`);return g.call(t,f,T,...w)},m=p?Object.freeze({getRandomValues:g=>p.getRandomValues(g)}):void 0,b=c.document?.defaultView;if(b&&b!==c)for(let g of Reflect.ownKeys(b))typeof g==\"symbol\"||s.has(g)||Reflect.deleteProperty(b,g)||o.push(`window.${g}`);let N=[];for(let g=t;g&&g!==Object.prototype;g=Object.getPrototypeOf(g))N.push(g);for(let g of N)for(let a of Reflect.ownKeys(g))s.has(a)||(Reflect.deleteProperty(g,a)?r.push(xo(a)):i(g,a)||o.push(xo(a)));let v=()=>function(){throw new EvalError(\"A guest view cannot make code from text.\")},y=[Function.prototype,Object.getPrototypeOf(async function(){}),Object.getPrototypeOf(function*(){}),Object.getPrototypeOf(async function*(){})];for(let g of y){let a=v();Object.defineProperty(a,\"prototype\",{value:g,writable:!1,enumerable:!1,configurable:!1}),Reflect.defineProperty(g,\"constructor\",{value:a,writable:!1,enumerable:!1,configurable:!1})||o.push(\"Function.prototype.constructor\"),g===Function.prototype&&Reflect.defineProperty(t,\"Function\",{value:a,writable:!0,enumerable:!1,configurable:!0})}let l=(g,a)=>{Reflect.defineProperty(t,g,{value:a,writable:!0,enumerable:!0,configurable:!0})||o.push(g)};l(\"setTimeout\",E(u,\"setTimeout\")),l(\"setInterval\",E(d,\"setInterval\")),m&&l(\"crypto\",m);for(let g of N.slice(1))Object.freeze(g);for(let g of Reflect.ownKeys(t)){let a=Reflect.getOwnPropertyDescriptor(t,g);Reflect.defineProperty(t,g,\"value\"in a?{...a,writable:!1,configurable:!1}:{...a,configurable:!1})}let h;try{h=Reflect.preventExtensions(t)}catch{h=!1}return{removed:r,stuck:o,sealed:h}}var St=class extends HTMLElement{constructor(){super(),En(this,sr)}connect(e){if(We(this)===e||(Xe(this,e),this.childNodes.length===0))return;let n=[];for(let r=0;r<this.childNodes.length;r++){let o=this.childNodes[r];n.push([0,sr,Ke(o),r])}e.mutate(n)}updateRemoteProperty(e,n){ur(this,e,n)}callRemoteMethod(e,...n){return dr(this,e,...n)}};var x={},fr={empty:!0},ii={id:\"text\",class:\"text\",title:\"text\",lang:\"text\",dir:{oneOf:[\"ltr\",\"rtl\",\"auto\"]},hidden:\"text\",tabindex:{oneOf:[\"-1\",\"0\"]},role:\"text\",style:\"style\",translate:{oneOf:[\"yes\",\"no\"]},spellcheck:{oneOf:[\"true\",\"false\"]},draggable:{oneOf:[\"true\",\"false\"]},inert:\"boolean\"},Qe={div:x,section:x,article:x,aside:x,header:x,footer:x,nav:x,hgroup:x,search:x,address:x,figure:x,figcaption:x,blockquote:x,p:x,pre:x,hr:fr,br:fr,wbr:fr,h1:x,h2:x,h3:x,h4:x,h5:x,h6:x,span:x,strong:x,em:x,b:x,i:x,u:x,s:x,small:x,mark:x,abbr:x,cite:x,q:x,code:x,kbd:x,samp:x,var:x,sub:x,sup:x,dfn:x,bdi:x,bdo:x,ruby:x,rt:x,rp:x,time:{attributes:{datetime:\"text\"}},data:{attributes:{value:\"text\"}},del:{attributes:{datetime:\"text\"}},ins:{attributes:{datetime:\"text\"}},a:x,ul:x,menu:x,dl:x,dt:x,dd:x,ol:{attributes:{start:\"number\",reversed:\"boolean\",type:{oneOf:[\"1\",\"a\",\"A\",\"i\",\"I\"]}}},li:{attributes:{value:\"number\"}},table:x,caption:x,thead:x,tbody:x,tfoot:x,tr:x,colgroup:{attributes:{span:\"number\"}},col:{attributes:{span:\"number\"},empty:!0},th:{attributes:{colspan:\"number\",rowspan:\"number\",headers:\"text\",scope:{oneOf:[\"row\",\"col\",\"rowgroup\",\"colgroup\"]},abbr:\"text\"}},td:{attributes:{colspan:\"number\",rowspan:\"number\",headers:\"text\"}},details:{attributes:{open:\"boolean\",name:\"text\"}},summary:x,button:{attributes:{type:{oneOf:[\"button\"]},disabled:\"boolean\",name:\"text\",value:\"text\"}},input:{empty:!0,attributes:{type:{oneOf:[\"text\",\"search\",\"number\",\"range\",\"checkbox\",\"radio\",\"date\",\"time\",\"datetime-local\",\"month\",\"week\",\"color\",\"email\",\"tel\",\"url\"]},name:\"text\",value:\"text\",placeholder:\"text\",min:\"text\",max:\"text\",step:\"text\",checked:\"boolean\",disabled:\"boolean\",readonly:\"boolean\",required:\"boolean\",maxlength:\"number\",minlength:\"number\",size:\"number\",pattern:\"text\",multiple:\"boolean\",inputmode:\"text\",enterkeyhint:\"text\"}},select:{attributes:{name:\"text\",disabled:\"boolean\",multiple:\"boolean\",required:\"boolean\",size:\"number\"}},option:{attributes:{value:\"text\",selected:\"boolean\",disabled:\"boolean\",label:\"text\"}},optgroup:{attributes:{label:\"text\",disabled:\"boolean\"}},textarea:{attributes:{name:\"text\",placeholder:\"text\",rows:\"number\",cols:\"number\",disabled:\"boolean\",readonly:\"boolean\",required:\"boolean\",maxlength:\"number\",minlength:\"number\",wrap:{oneOf:[\"soft\",\"hard\",\"off\"]}}},label:{attributes:{for:\"text\"}},fieldset:{attributes:{disabled:\"boolean\",name:\"text\"}},legend:x,output:x,meter:{attributes:{value:\"number\",min:\"number\",max:\"number\",low:\"number\",high:\"number\",optimum:\"number\"}},progress:{attributes:{value:\"number\",max:\"number\"}},img:{empty:!0,attributes:{src:\"image\",alt:\"text\",width:\"number\",height:\"number\",decoding:{oneOf:[\"async\",\"sync\",\"auto\"]}}}},ai=[\"fill\",\"fill-opacity\",\"fill-rule\",\"stroke\",\"stroke-width\",\"stroke-linecap\",\"stroke-linejoin\",\"stroke-dasharray\",\"stroke-dashoffset\",\"stroke-opacity\",\"stroke-miterlimit\",\"opacity\",\"color\",\"display\",\"visibility\",\"transform-origin\",\"clip-path\",\"clip-rule\",\"marker-start\",\"marker-mid\",\"marker-end\",\"font-family\",\"font-size\",\"font-weight\",\"font-style\",\"text-anchor\",\"dominant-baseline\",\"alignment-baseline\",\"letter-spacing\",\"text-decoration\",\"paint-order\",\"vector-effect\",\"shape-rendering\",\"pointer-events\",\"stop-color\",\"stop-opacity\",\"overflow\",\"mask\"],li={id:\"text\",class:\"text\",style:\"style\",lang:\"text\",role:\"text\",tabindex:{oneOf:[\"-1\",\"0\"]},transform:\"geometry\",...Object.fromEntries(ai.map(t=>[t,\"css\"]))},Je={x:\"geometry\",y:\"geometry\",width:\"geometry\",height:\"geometry\"},wn={viewBox:\"geometry\",preserveAspectRatio:\"geometry\"},ko={gradientUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},gradientTransform:\"geometry\",spreadMethod:{oneOf:[\"pad\",\"reflect\",\"repeat\"]},href:\"fragment\"},xn={svg:{attributes:{...Je,...wn}},g:x,defs:x,symbol:{attributes:{...Je,...wn,refX:\"geometry\",refY:\"geometry\"}},use:{attributes:{...Je,href:\"fragment\"}},title:x,desc:x,path:{attributes:{d:\"geometry\",pathLength:\"number\"}},rect:{attributes:{...Je,rx:\"geometry\",ry:\"geometry\",pathLength:\"number\"}},circle:{attributes:{cx:\"geometry\",cy:\"geometry\",r:\"geometry\",pathLength:\"number\"}},ellipse:{attributes:{cx:\"geometry\",cy:\"geometry\",rx:\"geometry\",ry:\"geometry\",pathLength:\"number\"}},line:{attributes:{x1:\"geometry\",y1:\"geometry\",x2:\"geometry\",y2:\"geometry\",pathLength:\"number\"}},polyline:{attributes:{points:\"geometry\",pathLength:\"number\"}},polygon:{attributes:{points:\"geometry\",pathLength:\"number\"}},text:{attributes:{x:\"geometry\",y:\"geometry\",dx:\"geometry\",dy:\"geometry\",rotate:\"geometry\",textLength:\"geometry\",lengthAdjust:{oneOf:[\"spacing\",\"spacingAndGlyphs\"]}}},tspan:{attributes:{x:\"geometry\",y:\"geometry\",dx:\"geometry\",dy:\"geometry\",rotate:\"geometry\",textLength:\"geometry\"}},textPath:{attributes:{href:\"fragment\",startOffset:\"geometry\",method:{oneOf:[\"align\",\"stretch\"]},spacing:{oneOf:[\"auto\",\"exact\"]},side:{oneOf:[\"left\",\"right\"]}}},linearGradient:{attributes:{x1:\"geometry\",y1:\"geometry\",x2:\"geometry\",y2:\"geometry\",...ko}},radialGradient:{attributes:{cx:\"geometry\",cy:\"geometry\",r:\"geometry\",fx:\"geometry\",fy:\"geometry\",fr:\"geometry\",...ko}},stop:{attributes:{offset:\"geometry\"}},clipPath:{attributes:{clipPathUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},mask:{attributes:{...Je,maskUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},maskContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},pattern:{attributes:{...Je,...wn,patternUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternTransform:\"geometry\",href:\"fragment\"}},marker:{attributes:{...wn,markerWidth:\"geometry\",markerHeight:\"geometry\",refX:\"geometry\",refY:\"geometry\",orient:\"geometry\",markerUnits:{oneOf:[\"strokeWidth\",\"userSpaceOnUse\"]}}}};var Co=[\"alert\",\"alertdialog\",\"dialog\",\"banner\",\"main\",\"navigation\",\"contentinfo\",\"complementary\",\"search\",\"form\",\"region\",\"application\",\"status\",\"log\",\"marquee\",\"timer\"],vt={nav:\"div\",header:\"div\",footer:\"div\",aside:\"div\",search:\"div\",output:\"span\"},Sn={section:[\"aria-label\",\"aria-labelledby\",\"title\"]};function ci(t){return/^aria-[a-z]+$/.test(t)}function ui(t){return/^data-[a-z0-9][a-z0-9_.-]*$/.test(t)}var Po=[\"all\",\"display\",\"position\",\"top\",\"right\",\"bottom\",\"left\",\"inset\",\"inset-block\",\"inset-inline\",\"inset-block-start\",\"inset-block-end\",\"inset-inline-start\",\"inset-inline-end\",\"width\",\"height\",\"min-width\",\"min-height\",\"max-width\",\"max-height\",\"inline-size\",\"block-size\",\"min-inline-size\",\"min-block-size\",\"max-inline-size\",\"max-block-size\",\"margin\",\"margin-top\",\"margin-right\",\"margin-bottom\",\"margin-left\",\"margin-block\",\"margin-inline\",\"margin-block-start\",\"margin-block-end\",\"margin-inline-start\",\"margin-inline-end\",\"padding\",\"padding-top\",\"padding-right\",\"padding-bottom\",\"padding-left\",\"padding-block\",\"padding-inline\",\"padding-block-start\",\"padding-block-end\",\"padding-inline-start\",\"padding-inline-end\",\"box-sizing\",\"overflow\",\"overflow-x\",\"overflow-y\",\"overflow-wrap\",\"float\",\"clear\",\"z-index\",\"aspect-ratio\",\"object-fit\",\"object-position\",\"vertical-align\",\"isolation\",\"contain\",\"container\",\"container-type\",\"container-name\",\"content-visibility\",\"flex\",\"flex-direction\",\"flex-wrap\",\"flex-flow\",\"flex-grow\",\"flex-shrink\",\"flex-basis\",\"order\",\"grid\",\"grid-template\",\"grid-template-columns\",\"grid-template-rows\",\"grid-template-areas\",\"grid-auto-columns\",\"grid-auto-rows\",\"grid-auto-flow\",\"grid-area\",\"grid-column\",\"grid-row\",\"grid-column-start\",\"grid-column-end\",\"grid-row-start\",\"grid-row-end\",\"gap\",\"row-gap\",\"column-gap\",\"align-items\",\"align-content\",\"align-self\",\"justify-items\",\"justify-content\",\"justify-self\",\"place-items\",\"place-content\",\"place-self\",\"columns\",\"column-count\",\"column-width\",\"column-rule\",\"column-rule-color\",\"column-rule-style\",\"column-rule-width\",\"column-span\",\"column-fill\",\"color\",\"background\",\"background-color\",\"background-image\",\"background-position\",\"background-position-x\",\"background-position-y\",\"background-size\",\"background-repeat\",\"background-origin\",\"background-clip\",\"background-attachment\",\"background-blend-mode\",\"border\",\"border-top\",\"border-right\",\"border-bottom\",\"border-left\",\"border-block\",\"border-inline\",\"border-block-start\",\"border-block-end\",\"border-inline-start\",\"border-inline-end\",\"border-width\",\"border-style\",\"border-color\",\"border-top-width\",\"border-right-width\",\"border-bottom-width\",\"border-left-width\",\"border-top-style\",\"border-right-style\",\"border-bottom-style\",\"border-left-style\",\"border-top-color\",\"border-right-color\",\"border-bottom-color\",\"border-left-color\",\"border-radius\",\"border-top-left-radius\",\"border-top-right-radius\",\"border-bottom-right-radius\",\"border-bottom-left-radius\",\"border-start-start-radius\",\"border-start-end-radius\",\"border-end-start-radius\",\"border-end-end-radius\",\"border-collapse\",\"border-spacing\",\"outline\",\"outline-width\",\"outline-style\",\"outline-color\",\"outline-offset\",\"box-shadow\",\"opacity\",\"visibility\",\"mix-blend-mode\",\"filter\",\"backdrop-filter\",\"clip-path\",\"accent-color\",\"caret-color\",\"color-scheme\",\"appearance\",\"-webkit-appearance\",\"font\",\"font-family\",\"font-size\",\"font-weight\",\"font-style\",\"font-stretch\",\"font-variant\",\"font-variant-numeric\",\"font-variant-caps\",\"font-variant-ligatures\",\"font-feature-settings\",\"font-variation-settings\",\"font-kerning\",\"font-optical-sizing\",\"font-size-adjust\",\"font-synthesis\",\"line-height\",\"letter-spacing\",\"word-spacing\",\"text-align\",\"text-align-last\",\"text-indent\",\"text-transform\",\"text-decoration\",\"text-decoration-line\",\"text-decoration-color\",\"text-decoration-style\",\"text-decoration-thickness\",\"text-underline-offset\",\"text-underline-position\",\"text-shadow\",\"text-overflow\",\"text-wrap\",\"text-wrap-mode\",\"text-wrap-style\",\"white-space\",\"white-space-collapse\",\"word-break\",\"line-break\",\"hyphens\",\"tab-size\",\"direction\",\"unicode-bidi\",\"writing-mode\",\"text-orientation\",\"text-rendering\",\"-webkit-font-smoothing\",\"-webkit-line-clamp\",\"-webkit-box-orient\",\"line-clamp\",\"-webkit-text-fill-color\",\"-webkit-background-clip\",\"list-style\",\"list-style-type\",\"list-style-position\",\"content\",\"quotes\",\"counter-reset\",\"counter-increment\",\"counter-set\",\"table-layout\",\"caption-side\",\"empty-cells\",\"transform\",\"transform-origin\",\"transform-box\",\"transform-style\",\"translate\",\"rotate\",\"scale\",\"perspective\",\"perspective-origin\",\"backface-visibility\",\"transition\",\"transition-property\",\"transition-duration\",\"transition-timing-function\",\"transition-delay\",\"transition-behavior\",\"animation\",\"animation-name\",\"animation-duration\",\"animation-timing-function\",\"animation-delay\",\"animation-iteration-count\",\"animation-direction\",\"animation-fill-mode\",\"animation-play-state\",\"animation-composition\",\"will-change\",\"cursor\",\"pointer-events\",\"user-select\",\"-webkit-user-select\",\"touch-action\",\"resize\",\"scroll-behavior\",\"overscroll-behavior\",\"overscroll-behavior-x\",\"overscroll-behavior-y\",\"scroll-snap-type\",\"scroll-snap-align\",\"scroll-snap-stop\",\"scroll-margin\",\"scroll-padding\",\"scrollbar-width\",\"scrollbar-color\",\"scrollbar-gutter\",\"fill\",\"fill-opacity\",\"fill-rule\",\"stroke\",\"stroke-width\",\"stroke-linecap\",\"stroke-linejoin\",\"stroke-dasharray\",\"stroke-dashoffset\",\"stroke-opacity\",\"stroke-miterlimit\",\"stop-color\",\"stop-opacity\",\"clip-rule\",\"marker\",\"marker-start\",\"marker-mid\",\"marker-end\",\"paint-order\",\"vector-effect\",\"shape-rendering\",\"text-anchor\",\"dominant-baseline\",\"alignment-baseline\",\"r\",\"cx\",\"cy\",\"rx\",\"ry\",\"x\",\"y\",\"d\",\"mask\"],_o=[\"var\",\"env\",\"calc\",\"min\",\"max\",\"clamp\",\"round\",\"mod\",\"rem\",\"abs\",\"sign\",\"sin\",\"cos\",\"tan\",\"asin\",\"acos\",\"atan\",\"atan2\",\"pow\",\"sqrt\",\"hypot\",\"log\",\"exp\",\"rgb\",\"rgba\",\"hsl\",\"hsla\",\"hwb\",\"lab\",\"lch\",\"oklab\",\"oklch\",\"color\",\"color-mix\",\"light-dark\",\"linear-gradient\",\"radial-gradient\",\"conic-gradient\",\"repeating-linear-gradient\",\"repeating-radial-gradient\",\"repeating-conic-gradient\",\"translate\",\"translatex\",\"translatey\",\"translatez\",\"translate3d\",\"rotate\",\"rotatex\",\"rotatey\",\"rotatez\",\"rotate3d\",\"scale\",\"scalex\",\"scaley\",\"scalez\",\"scale3d\",\"skew\",\"skewx\",\"skewy\",\"matrix\",\"matrix3d\",\"perspective\",\"cubic-bezier\",\"steps\",\"linear\",\"repeat\",\"minmax\",\"fit-content\",\"blur\",\"brightness\",\"contrast\",\"drop-shadow\",\"grayscale\",\"hue-rotate\",\"invert\",\"saturate\",\"sepia\",\"opacity\",\"circle\",\"ellipse\",\"inset\",\"polygon\",\"path\",\"xywh\",\"rect\",\"counter\",\"counters\"],Io=[\"fill\",\"stroke\",\"clip-path\",\"mask\",\"marker\",\"marker-start\",\"marker-mid\",\"marker-end\"],Do=[\"media\",\"supports\",\"container\",\"keyframes\"],Mo={position:[\"static\",\"relative\",\"absolute\",\"sticky\"],all:[],appearance:[\"auto\",\"none\",\"menulist-button\",\"textfield\"],\"-webkit-appearance\":[\"auto\",\"none\",\"menulist-button\",\"textfield\"]},Lo=[\"host\",\"host-context\",\"slotted\",\"part\",\"backdrop\",\"picker\",\"view-transition\",\"view-transition-group\",\"view-transition-image-pair\",\"view-transition-old\",\"view-transition-new\"],mr=64e3,pr=4e3,Ho=1e5,Vo=512e3,hr=1e4,Uo=\"http://www.w3.org/1999/xhtml\",jo=\"http://www.w3.org/2000/svg\",di=new Map(Object.keys(xn).map(t=>[t.toLowerCase(),t]));function vn(t){return di.get(t.toLowerCase())}function On(t,e,n){let r=n.toLowerCase(),o=t===\"html\"?[Qe[e]?.attributes,ii]:[xn[e]?.attributes,li],s=t===\"svg\"&&r===\"xlink:href\"?\"href\":r;for(let i of o)if(i){for(let[c,u]of Object.entries(i))if(c.toLowerCase()===s)return{name:c,kind:u}}if(ci(r)||ui(r))return{name:r,kind:\"text\"}}function $o(t){if(typeof t==\"string\")return{type:\"navigate\",to:t};let{place:e,record:n,where:r,section:o}=t??{},s={...r===void 0?{}:{where:r},...o===void 0?{}:{section:String(o)}};return typeof e==\"string\"?{type:\"navigate\",place:e,...s}:typeof n==\"string\"?{type:\"navigate\",to:n,...s}:void 0}var Go=\"~\",Rn=t=>typeof t==\"object\"&&t!==null&&!Array.isArray(t),ae=(t,e=0)=>{if(t===null||typeof t==\"string\"||typeof t==\"number\"||typeof t==\"boolean\"||t===void 0)return t;if(!(e>64||typeof t!=\"object\"))return Array.isArray(t)?t.map(n=>ae(n,e+1)):Object.fromEntries(Object.entries(t).map(([n,r])=>[n,ae(r,e+1)]))};function zo(){let t=new Map,e=new Map,n=new Map([[Go,{children:[],listeners:new Map}]]),r=0,o=d=>{let p=e.get(d);return p===void 0&&(p=r+=1,e.set(d,p),t.set(p,{listener:d,count:0})),t.get(p).count+=1,p},s=d=>{let p=t.get(d);p&&(p.count-=1,!(p.count>0)&&(t.delete(d),e.delete(p.listener)))},i=d=>{let p=n.get(d);if(p){n.delete(d);for(let E of p.listeners.values())s(E);for(let E of p.children)i(E)}},c=(d,p,E=0)=>{if(!Rn(d)||E>64)return ae(d);let m=typeof d.id==\"string\"?d.id:void 0,b=p&&m!==void 0&&m!==Go;b&&i(m);let N={children:[],listeners:new Map};b&&n.set(m,N);let v={};for(let[y,l]of Object.entries(d))y===\"children\"&&Array.isArray(l)?v[y]=l.map(h=>{let g=c(h,b,E+1);return b&&Rn(h)&&typeof h.id==\"string\"&&N.children.push(h.id),g}):y===\"eventListeners\"&&Rn(l)?v[y]=Object.fromEntries(Object.entries(l).map(([h,g])=>{if(typeof g!=\"function\"||!b)return[h,void 0];let a=o(g);return N.listeners.set(h,a),[h,{listener:a}]})):v[y]=ae(l,E+1);return v},u=d=>{if(!Array.isArray(d))return ae(d);let[p,E]=d,m=typeof E==\"string\"?n.get(E):void 0;if(p===0){let b=c(d[2],m!==void 0),N=Rn(d[2])?d[2].id:void 0;if(m&&typeof N==\"string\"&&n.has(N)){let v=Number(d[3]);m.children.splice(Number.isInteger(v)&&v>=0&&v<=m.children.length?v:m.children.length,0,N)}return[p,ae(E),b,ae(d[3])]}if(p===1){let b=Number(d[2]);return m&&Number.isInteger(b)&&b>=0&&b<m.children.length&&i(m.children.splice(b,1)[0]),ae(d)}if(p===3&&d[4]===3){let b=String(d[2]),N=d[3],v=m&&typeof N==\"function\"?o(N):void 0,y=m?.listeners.get(b);return y!==void 0&&s(y),v===void 0?m?.listeners.delete(b):m.listeners.set(b,v),[p,ae(E),b,v===void 0?void 0:{listener:v},3]}return ae(d)};return{encode:d=>d.map(u),listener:d=>t.get(d)?.listener,get listening(){return t.size},get nodes(){return n.size-1}}}var gr=\"graview-view-root\",fi=t=>t.replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g,\"&quot;\").replace(/'/g,\"&#39;\"),mi=t=>Object.freeze({html:t,toString:()=>t}),Fo=t=>typeof t==\"object\"&&t!==null&&typeof t.html==\"string\"&&Object.isFrozen(t),Bo=t=>t==null||t===!1?\"\":Array.isArray(t)?t.map(Bo).join(\"\"):Fo(t)?t.html:fi(String(t));function Yo(t){customElements.get(gr)||customElements.define(gr,St);let e=Event,n=zo(),r=new Set,o=new Set,s,i=[];for(let a of[\"closest\",\"matches\",\"dataset\"]){let f=()=>{throw new TypeError(`A view's element has no ${a}: graview.on hands event.element, the element its selector matched; read event.element.getAttribute(\"data-\\u2026\").`)};a in Element.prototype||Object.defineProperty(Element.prototype,a,a===\"dataset\"?{get:f}:{value:f})}let c=document.createElement(gr),u=a=>{let f=T=>{for(let w of Array.from(T.childNodes)){if(w.nodeType!==1)continue;if(re(w)===a)return w;let O=f(w);if(O)return O}};return f(c)},d=a=>{let f=u(a.target);if(!f)return;let T=new e(a.event,{bubbles:!0});for(let w of[\"value\",\"checked\",\"key\",\"pressed\"])a[w]!==void 0&&Object.defineProperty(T,w,{value:a[w],enumerable:!0});f.dispatchEvent(T);for(let w of o){if(w.type!==a.event)continue;let O;try{O=new Set(Array.from(c.querySelectorAll(w.selector)))}catch{continue}for(let R=f;R&&R!==c;R=R.parentNode)if(O.has(R)){w.listener(Object.freeze({type:a.event,target:f,element:R,...a.value!==void 0?{value:a.value}:{},...a.checked!==void 0?{checked:a.checked}:{},...a.key!==void 0?{key:a.key}:{},...a.pressed!==void 0?{pressed:a.pressed}:{}}));break}}},p=a=>{if(a.type===\"dom-event\"&&typeof a.target==\"string\")return d(a);if(a.type===\"notice\")return t.warn(a.text);if(a.type!==\"props\")return;s=a.props;let f=t.now();for(let O of r)try{O(a.props)}catch(R){t.threw(R)}let T=t.now()-f,w=a.push;typeof w==\"number\"&&t.microtask(()=>t.microtask(()=>t.send({type:\"pushed\",push:w,ms:T})))},E;c.connect({mutate(a){E||(E=[],t.microtask(()=>{let f=E??[];E=void 0,t.send({type:\"render\",records:n.encode(f)})})),E.push(...a)},call:()=>{}});let m=a=>a.nodeType===1?a.getAttribute(\"data-key\")??a.getAttribute(\"id\"):null,b=(a,f)=>a.nodeType===f.nodeType&&(a.nodeType!==1||a.localName===f.localName&&a.namespaceURI===f.namespaceURI&&m(a)===m(f));function N(a,f){let T=Array.from(f.childNodes),w=0;for(let O of T){let R=a.childNodes[w]??null;if(R&&b(R,O)){v(R,O),w+=1;continue}if(m(O)!==null){let pe=Array.from(a.childNodes).slice(w+1).find(at=>b(at,O));if(pe){a.insertBefore(pe,R),v(pe,O),w+=1;continue}}a.insertBefore(O,R),w+=1}for(;a.childNodes.length>w;)a.removeChild(a.lastChild)}function v(a,f){if(a.nodeType!==1){a.data!==f.data&&(a.data=f.data);return}let T=a,w=f;for(let O of T.getAttributeNames())w.hasAttribute(O)||T.removeAttribute(O);for(let O of w.getAttributeNames()){let R=w.getAttribute(O);T.getAttribute(O)!==R&&T.setAttribute(O,R)}N(T,w)}function y(a,f,T){for(let w of Array.from(a.childNodes)){if(w.nodeType!==1)continue;let O=w,R=O.localName,it=f||R.toLowerCase()===\"svg\",pe=it?vn(R):Object.prototype.hasOwnProperty.call(Qe,R.toLowerCase())?R.toLowerCase():void 0;if(!pe){T.add(`<${R}>`);continue}for(let at of O.getAttributeNames())(!On(it?\"svg\":\"html\",pe,at)||!it&&Sn[pe]?.includes(at.toLowerCase()))&&T.add(`${pe} ${at}`);y(O,it,T)}}function l(a){let f=document.createElement(\"div\"),T=Array.isArray(a)?a:[a];for(let O of T)if(O!=null)if(typeof O==\"string\"||Fo(O)){let R=document.createElement(\"div\");R.innerHTML=typeof O==\"string\"?O:O.html,f.append(...Array.from(R.childNodes))}else f.append(O);let w=new Set;y(f,!1,w),i=[...w],i.length>0&&t.warn(`The host will not draw: ${i.join(\", \")}`),N(c,f)}let h;return{view:Object.freeze({get props(){return s},onProps(a){return r.add(a),s&&a(s),()=>void r.delete(a)},render:l,style(a){typeof a!=\"string\"||a===h||(h=a,t.send({type:\"style\",css:a}))},on(a,f,T){let w={type:a,selector:f,listener:T};return o.add(w),()=>void o.delete(w)},act:(a,f={})=>t.act(a,f),navigate(a){if(typeof a==\"string\")return t.navigate(a);let f=$o(a);f&&t.send(f)},html(a,...f){return mi(a.reduce((T,w,O)=>T+w+(O<f.length?Bo(f[O]):\"\"),\"\"))},get refused(){return i},get hardening(){return t.hardening()}}),hear:p}}var qo=t=>t.toLowerCase().replace(/[^a-z0-9]+/g,\"-\").replace(/^-|-$/g,\"\");function Ot(t,e){let n=t.find(s=>s.as===e);if(n)return n;let r=e.trim().toLowerCase(),o=qo(e);return t.find(s=>s.title!==void 0&&s.title.trim().toLowerCase()===r)??(o?t.find(s=>s.as===o||s.title!==void 0&&qo(s.title)===o):void 0)}var et=t=>` Its places: ${t.map(e=>typeof e==\"string\"?`\"${e}\"`:e.title&&e.title!==e.as?`\"${e.as}\" (${e.title})`:`\"${e.as}\"`).join(\", \")||\"none\"}.`,yr=t=>`\"${t.length>80?`${t.slice(0,79)}\\u2026`:t}\"`;var z=t=>t>=48&&t<=57,Wo=t=>z(t)||t>=65&&t<=70||t>=97&&t<=102,xr=t=>t>=65&&t<=90||t>=97&&t<=122,Sr=t=>t>=128,An=t=>xr(t)||Sr(t)||t===95,Xo=t=>An(t)||z(t)||t===45,Ko=t=>t===10,fe=t=>t===10||t===9||t===32,pi=t=>t>=0&&t<=8||t===11||t>=14&&t<=31||t===127,oe=-1;function hi(t){let e=[];for(let n=0;n<t.length;n+=1){let r=t.codePointAt(n);r>65535&&(n+=1),r===13?(t.charCodeAt(n+1)===10&&(n+=1),r=10):r===12?r=10:(r===0||r>=55296&&r<=57343)&&(r=65533),e.push(r)}return e}function gi(t){let e=hi(t),n=0,r=(y=0)=>n+y<e.length?e[n+y]:oe,o=[],s=(y,l)=>y===92&&l!==10&&l!==oe,i=(y,l,h)=>y===45?An(l)||l===45||s(l,h):An(y)?!0:s(y,l),c=(y,l,h)=>y===43||y===45?z(l)||l===46&&z(h):z(y===46?l:y),u=()=>{let y=r();if(n+=1,y===oe)return 65533;if(Wo(y)){let l=String.fromCodePoint(y);for(;l.length<6&&Wo(r());)l+=String.fromCodePoint(r()),n+=1;fe(r())&&(n+=1);let h=parseInt(l,16);return h===0||h>=55296&&h<=57343||h>1114111?65533:h}return y},d=()=>{let y=\"\";for(;;){let l=r();if(Xo(l))y+=String.fromCodePoint(l),n+=1;else if(s(l,r(1)))n+=1,y+=String.fromCodePoint(u());else return y}},p=()=>{let y=\"\";for((r()===43||r()===45)&&(y+=String.fromCodePoint(e[n++]));z(r());)y+=String.fromCodePoint(e[n++]);if(r()===46&&z(r(1)))for(y+=String.fromCodePoint(e[n++],e[n++]);z(r());)y+=String.fromCodePoint(e[n++]);if((r()===69||r()===101)&&(z(r(1))||(r(1)===43||r(1)===45)&&z(r(2))))for(y+=String.fromCodePoint(e[n++]),z(r())||(y+=String.fromCodePoint(e[n++]));z(r());)y+=String.fromCodePoint(e[n++]);return y},E=()=>{let y=p();return i(r(),r(1),r(2))?{type:\"dimension\",repr:y,unit:d()}:r()===37?(n+=1,{type:\"percentage\",repr:y}):{type:\"number\",repr:y}},m=()=>{for(;;){let y=r();if(n+=1,y===41||y===oe)return;s(y,r())&&u()}},b=()=>{let y=\"\";for(;fe(r());)n+=1;for(;;){let l=r();if(n+=1,l===41)return{type:\"url\",value:y};if(l===oe)return{type:\"url\",value:y};if(fe(l)){for(;fe(r());)n+=1;return r()===41||r()===oe?(r()===41&&(n+=1),{type:\"url\",value:y}):(m(),{type:\"bad-url\"})}if(l===34||l===39||l===40||pi(l))return m(),{type:\"bad-url\"};if(l===92){if(s(l,r()))y+=String.fromCodePoint(u());else return m(),{type:\"bad-url\"};continue}y+=String.fromCodePoint(l)}},N=()=>{let y=d();if(y.toLowerCase()===\"url\"&&r()===40){for(n+=1;fe(r())&&fe(r(1));)n+=1;let l=fe(r())?r(1):r();return l===34||l===39?{type:\"function\",value:y}:b()}return r()===40?(n+=1,{type:\"function\",value:y}):{type:\"ident\",value:y}},v=y=>{let l=\"\";for(;;){let h=r();if(n+=1,h===y||h===oe)return{type:\"string\",value:l};if(Ko(h))return n-=1,{type:\"bad-string\"};if(h===92){if(r()===oe)continue;if(Ko(r())){n+=1;continue}l+=String.fromCodePoint(u());continue}l+=String.fromCodePoint(h)}};for(;;){for(;r()===47&&r(1)===42;){for(n+=2;r()!==oe&&!(r()===42&&r(1)===47);)n+=1;r()!==oe&&(n+=2)}let y=r();if(y===oe)return o;if(fe(y)){for(;fe(r());)n+=1;o.push({type:\"whitespace\"});continue}switch(n+=1,y){case 34:case 39:o.push(v(y));continue;case 35:if(Xo(r())||s(r(),r(1))){let l=i(r(),r(1),r(2));o.push({type:\"hash\",value:d(),id:l})}else o.push({type:\"delim\",value:\"#\"});continue;case 40:o.push({type:\"(\"});continue;case 41:o.push({type:\")\"});continue;case 43:case 46:c(y,r(),r(1))?(n-=1,o.push(E())):o.push({type:\"delim\",value:String.fromCodePoint(y)});continue;case 44:o.push({type:\",\"});continue;case 45:c(y,r(),r(1))?(n-=1,o.push(E())):r()===45&&r(1)===62?(n+=2,o.push({type:\"CDC\"})):i(y,r(),r(1))?(n-=1,o.push(N())):o.push({type:\"delim\",value:\"-\"});continue;case 58:o.push({type:\":\"});continue;case 59:o.push({type:\";\"});continue;case 60:r()===33&&r(1)===45&&r(2)===45?(n+=3,o.push({type:\"CDO\"})):o.push({type:\"delim\",value:\"<\"});continue;case 64:i(r(),r(1),r(2))?o.push({type:\"at-keyword\",value:d()}):o.push({type:\"delim\",value:\"@\"});continue;case 91:o.push({type:\"[\"});continue;case 92:s(y,r())?(n-=1,o.push(N())):o.push({type:\"delim\",value:\"\\\\\"});continue;case 93:o.push({type:\"]\"});continue;case 123:o.push({type:\"{\"});continue;case 125:o.push({type:\"}\"});continue;default:z(y)?(n-=1,o.push(E())):An(y)?(n-=1,o.push(N())):o.push({type:\"delim\",value:String.fromCodePoint(y)})}}}var ts={\"{\":\"}\",\"[\":\"]\",\"(\":\")\"},ns=32,Er=class{constructor(e){this.tokens=e}i=0;peek(){return this.tokens[this.i]}next(){return this.tokens[this.i++]}};function rs(t,e){let n=t.next();return n.type===\"{\"||n.type===\"[\"||n.type===\"(\"?{type:\"block\",open:n.type,value:Zo(t,ts[n.type],e+1)}:n.type===\"function\"?{type:\"func\",name:n.value,value:Zo(t,\")\",e+1)}:n}function Zo(t,e,n){let r=[];for(;;){let o=t.peek();if(!o)return r;if(o.type===e)return t.next(),r;if(n>ns){t.next(),r.push({type:\"bad-string\"});continue}r.push(rs(t,n))}}function tt(t,e){let n=[],r=0;for(;r<t.length;){let o=t[r];if(o.type===\"whitespace\"||e&&(o.type===\"CDO\"||o.type===\"CDC\")){r+=1;continue}if(o.type===\"at-keyword\"){let c=[];r+=1;let u;for(;r<t.length;){let d=t[r];if(r+=1,d.type===\";\")break;if(d.type===\"block\"&&d.open===\"{\"){u=d.value;break}c.push(d)}n.push({type:\"at-rule\",name:o.value,prelude:c,...u?{block:u}:{}});continue}let s=[],i;for(;r<t.length;){let c=t[r];if(r+=1,c.type===\"block\"&&c.open===\"{\"){i=c.value;break}s.push(c)}i&&n.push({type:\"qualified\",prelude:s,block:i})}return n}function vr(t){let e=[],n=0;for(;n<t.length;){let r=t[n];if(r.type===\"whitespace\"||r.type===\";\"){n+=1;continue}if(r.type===\"at-keyword\"){let s=(()=>{for(let i=n+1;i<t.length;i+=1){let c=t[i];if(c.type===\";\"||c.type===\"block\"&&c.open===\"{\")return i+1}return t.length})();e.push(...tt(t.slice(n,s),!1)),n=s;continue}if(r.type===\"ident\"){let s=n+1;for(;t[s]?.type===\"whitespace\";)s+=1;if(t[s]?.type===\":\"){let i=s+1;for(;i<t.length&&t[i].type!==\";\";)i+=1;let c=os(r.value,t.slice(s+1,i));if(c.value.some(u=>u.type===\"block\"&&u.open===\"{\")){let u=t.findIndex((d,p)=>p>n&&d.type===\"block\"&&d.open===\"{\");e.push(...tt(t.slice(n,u+1),!1)),n=u+1;continue}e.push(c),n=i+1;continue}}let o=n;for(;o<t.length&&!(t[o].type===\"block\"&&t[o].open===\"{\")&&t[o].type!==\";\";)o+=1;o<t.length&&t[o].type===\"block\"&&e.push(...tt(t.slice(n,o+1),!1)),n=o+1}return e}function os(t,e){let n=[...e];for(;n[0]?.type===\"whitespace\";)n.shift();for(;n.at(-1)?.type===\"whitespace\";)n.pop();let r=!1,s=n.length-1;if(n[s]?.type===\"ident\"&&n[s].value.toLowerCase()===\"important\"){for(s-=1;n[s]?.type===\"whitespace\";)s-=1;let i=n[s];if(i?.type===\"delim\"&&i.value===\"!\")for(r=!0,n.length=s;n.at(-1)?.type===\"whitespace\";)n.pop()}return{type:\"declaration\",name:t,value:n,important:r}}function Or(t){let e=new Er(gi(t)),n=[];for(;e.peek();)n.push(rs(e,0));return n}function kn(t){let e=\"\",n=[...t].map(r=>r.codePointAt(0));return n.forEach((r,o)=>{r===0?e+=\"\\uFFFD\":r>=1&&r<=31||r===127||o===0&&z(r)||o===1&&z(r)&&n[0]===45?e+=`\\\\${r.toString(16)} `:o===0&&r===45&&n.length===1?e+=\"\\\\-\":Sr(r)||r===45||r===95||z(r)||xr(r)?e+=String.fromCodePoint(r):e+=`\\\\${String.fromCodePoint(r)}`}),e}function Cn(t){let e=\"\";for(let n of t){let r=n.codePointAt(0);Sr(r)||r===45||r===95||z(r)||xr(r)?e+=n:r>=1&&r<=31||r===127?e+=`\\\\${r.toString(16)} `:e+=`\\\\${n}`}return e}function Nr(t){let e='\"';for(let n of t){let r=n.codePointAt(0);r===0?e+=\"\\uFFFD\":r>=1&&r<=31||r===127||r===60||r===62?e+=`\\\\${r.toString(16)} `:r===34||r===92?e+=`\\\\${n}`:e+=n}return`${e}\"`}function yi(t){let e=Cn(t);return/^[eE]([0-9]|[+-][0-9])/.test(t)?`\\\\${t.codePointAt(0).toString(16)} ${Cn(t.slice(1))}`:e}var Jo=t=>{switch(t.type){case\"ident\":case\"url\":case\"bad-url\":case\"number\":case\"percentage\":case\"dimension\":case\"CDC\":case\"hash\":case\"at-keyword\":return t.type;case\"func\":case\"function\":return\"function\";case\"block\":return t.open===\"(\"?\"(\":\"other\";case\"(\":return\"(\";case\"delim\":return`delim${t.value}`;default:return\"other\"}};function bi(t,e){let n=[\"ident\",\"function\",\"url\",\"bad-url\",\"delim-\",\"number\",\"percentage\",\"dimension\",\"CDC\"];return t===\"ident\"?[...n,\"(\"].includes(e):t===\"at-keyword\"||t===\"hash\"||t===\"dimension\"||t===\"delim#\"||t===\"delim-\"?n.includes(e):t===\"number\"?[\"ident\",\"function\",\"url\",\"bad-url\",\"number\",\"percentage\",\"dimension\",\"delim%\"].includes(e):t===\"delim@\"?[\"ident\",\"function\",\"url\",\"bad-url\",\"delim-\",\"CDC\"].includes(e):t===\"delim.\"||t===\"delim+\"?[\"number\",\"percentage\",\"dimension\"].includes(e):t===\"delim/\"?e===\"delim*\":!1}function Ei(t){switch(t.type){case\"whitespace\":return\" \";case\"ident\":return kn(t.value);case\"at-keyword\":return`@${kn(t.value)}`;case\"hash\":return`#${Cn(t.value)}`;case\"string\":return Nr(t.value);case\"url\":return`url(${Nr(t.value)})`;case\"delim\":return t.value===\"\\\\\"?`\\\\\n`:t.value;case\"CDO\":return\"<!--\";case\"CDC\":return\"-->\";case\"number\":return t.repr;case\"percentage\":return`${t.repr}%`;case\"dimension\":return`${t.repr}${yi(t.unit)}`;case\"func\":return`${kn(t.name)}(${nt(t.value)})`;case\"block\":return`${t.open}${nt(t.value)}${ts[t.open]}`;case\":\":case\";\":case\",\":case\"[\":case\"]\":case\"(\":case\")\":case\"{\":case\"}\":return t.type;default:return\"\"}}function nt(t){let e=\"\",n;for(let r of t)r.type===\"whitespace\"&&n?.type===\"whitespace\"||(n&&bi(Jo(n),Jo(r))&&(e+=\"/**/\"),e+=Ei(r),n=r);return e}var Ni=new Set(Po),ss=new Set(_o),Qo=new Set(Io),Ti=new Set(Do),wi=new Set(Lo),es=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,me=t=>t.replace(/[A-Z]/g,e=>e.toLowerCase()),xi=t=>me(t);function Tr(t,e,n){let r=[];for(let o of e){if(o.type===\"bad-url\"||o.type===\"bad-string\"){n({reason:\"unreadable\",...t?{name:t}:{}});return}if(o.type===\"url\"){if(t&&Qo.has(t)&&es.test(o.value)){r.push({type:\"func\",name:\"url\",value:[{type:\"string\",value:o.value}]});continue}n({reason:\"url\",...t?{name:t}:{}});return}if(o.type===\"func\"){let s=me(o.name);if(s===\"url\"||s===\"src\"){let c=o.value.filter(d=>d.type!==\"whitespace\"),u=c[0];if(s===\"url\"&&c.length===1&&u?.type===\"string\"&&t&&Qo.has(t)&&es.test(u.value)){r.push({type:\"func\",name:\"url\",value:[{type:\"string\",value:u.value}]});continue}n({reason:\"url\",...t?{name:t}:{}});return}if(!ss.has(s)){n({reason:\"function\",name:s});return}let i=Tr(t,o.value,n);if(!i)return;s===\"var\"?r.push({type:\"whitespace\"},{type:\"func\",name:s,value:i},{type:\"whitespace\"}):r.push({type:\"func\",name:s,value:i});continue}if(o.type===\"block\"){if(o.open===\"{\"||o.open===\"(\"&&r.at(-1)?.type===\"ident\"){n({reason:\"unreadable\",...t?{name:t}:{}});return}let s=Tr(t,o.value,n);if(!s)return;r.push({type:\"block\",open:o.open,value:s});continue}if(o.type===\"at-keyword\"||o.type===\"CDO\"||o.type===\"CDC\"||o.type===\"{\"||o.type===\"}\"||o.type===\";\"||o.type===\"delim\"&&o.value===\"\\\\\"){n({reason:\"unreadable\",...t?{name:t}:{}});return}r.push(o)}return r}function _n(t,e){let n=t.name.startsWith(\"--\"),r=n?t.name:xi(t.name);if(!n&&!Ni.has(r)){e({reason:\"property\",name:r});return}let o=Mo[r];if(o){let c=t.value.filter(p=>p.type!==\"whitespace\"),u=c[0],d=c.length===1&&u?.type===\"ident\"?me(u.value):void 0;if(!d||![...o,\"inherit\",\"initial\",\"unset\",\"revert\"].includes(d)){e({reason:\"value\",name:r});return}return`${r}: ${d}${t.important?\" !important\":\"\"}`}let s=Tr(n?void 0:r,t.value,e);if(!s)return;let i=nt(s).trim();return`${n?`--${Cn(t.name.slice(2))}`:r}: ${i}${t.important?\" !important\":\"\"}`}function is(t,e){let n=r=>{for(let o=0;o<r.length;o+=1){let s=r[o];if(o>0&&r[o-1].type===\":\"&&(s.type===\"ident\"||s.type===\"func\")){let c=me(s.type===\"ident\"?s.value:s.name);if(wi.has(c)||c.startsWith(\"-webkit-\")||c.startsWith(\"-moz-\"))return e({reason:\"selector\",name:c}),!1}if(s.type===\"url\"||s.type===\"bad-url\"||s.type===\"bad-string\"||s.type===\"at-keyword\"||s.type===\"CDO\"||s.type===\"CDC\"||s.type===\"block\"&&s.open===\"{\")return e({reason:\"unreadable\",name:\"selector\"}),!1;if(s.type===\"func\"&&!n(s.value)||s.type===\"block\"&&!n(s.value))return!1}return!0};return n(t)}function br(t,e,n){let r=[];for(let o of vr(t))if(o.type===\"declaration\"){let s=_n(o,e);s&&r.push(`${s};`)}else{let s=Pn(o,e,n+1,\"style\");s&&r.push(s)}return r.join(\" \")}function Si(t,e,n){let r=o=>o.every(s=>{if(s.type===\"url\"||s.type===\"bad-url\"||s.type===\"bad-string\"||s.type===\"block\"&&s.open===\"{\")return n({reason:s.type===\"url\"?\"url\":\"unreadable\",name:`@${e}`}),!1;if(s.type===\"func\"){let i=me(s.name);return e===\"supports\"&&i===\"selector\"?is(s.value,n):ss.has(i)?r(s.value):(n({reason:\"function\",name:i}),!1)}if(s.type===\"block\"){if(e===\"supports\"){let i=vr(s.value);if(i.length===1&&i[0].type===\"declaration\")return _n(i[0],n)!==void 0}return r(s.value)}return!0});return r(t)?nt(t).trim():void 0}function wr(t){return t.map((e,n)=>{let r=t[n-1],o=r?.type===\":\"||r?.type===\"delim\"&&(r.value===\".\"||r.value===\"|\");return e.type===\"ident\"&&!o&&Object.prototype.hasOwnProperty.call(vt,me(e.value))?{type:\"block\",open:\"[\",value:[{type:\"ident\",value:\"data-graview-as\"},{type:\"delim\",value:\"=\"},{type:\"string\",value:me(e.value)}]}:e.type===\"func\"?{type:\"func\",name:e.name,value:wr(e.value)}:e.type===\"block\"&&e.open===\"(\"?{type:\"block\",open:\"(\",value:wr(e.value)}:e})}function Pn(t,e,n,r){if(n>ns){e({reason:\"unreadable\",name:\"nesting\"});return}if(t.type===\"qualified\"){if(r===\"keyframes\"){if(!t.prelude.every(p=>p.type===\"whitespace\"||p.type===\",\"||p.type===\"percentage\"||p.type===\"ident\"&&[\"from\",\"to\"].includes(me(p.value)))){e({reason:\"unreadable\",name:\"keyframe\"});return}return`${nt(t.prelude).trim()} { ${br(t.block,e,n)} }`}if(!is(t.prelude,e))return;let u=nt(wr(t.prelude)).trim();if(u===\"\"){e({reason:\"unreadable\",name:\"selector\"});return}return`${u} { ${br(t.block,e,n)} }`}let o=me(t.name),s=o===\"-webkit-keyframes\"?\"keyframes\":o;if(!Ti.has(s)||r===\"keyframes\"){e({reason:\"at-rule\",name:`@${o}`});return}if(!t.block){e({reason:\"unreadable\",name:`@${o}`});return}if(s===\"keyframes\"){if(r!==\"sheet\"){e({reason:\"at-rule\",name:\"@keyframes\"});return}let u=t.prelude.filter(m=>m.type!==\"whitespace\"),d=u[0];if(u.length!==1||!d||d.type!==\"ident\"&&d.type!==\"string\"){e({reason:\"unreadable\",name:\"@keyframes\"});return}let p=tt(t.block,!1).map(m=>Pn(m,e,n+1,\"keyframes\")).filter(m=>m!==void 0);return`@keyframes ${d.type===\"ident\"?kn(d.value):Nr(d.value)} { ${p.join(\" \")} }`}let i=Si(t.prelude,s,e);if(i===void 0)return;let c=r===\"style\"?br(t.block,e,n):tt(t.block,!1).map(u=>Pn(u,e,n+1,\"sheet\")).filter(u=>u!==void 0).join(\" \");return`@${s} ${i} { ${c} }`}function as(t,e=mr){let n=[];if(t.length>e)return{css:\"\",refused:[{reason:\"size\"}]};let r=s=>void n.push(s);return{css:tt(Or(t),!0).map(s=>Pn(s,r,0,\"sheet\")).filter(s=>s!==void 0).join(`\n`),refused:n}}function ls(t,e=mr){let n=[];if(t.length>e)return{css:\"\",refused:[{reason:\"size\"}]};let r=s=>void n.push(s),o=[];for(let s of vr(Or(t))){if(s.type!==\"declaration\"){r({reason:\"unreadable\",name:\"a rule in a style attribute\"});continue}let i=_n(s,r);i&&o.push(i)}return{css:o.join(\"; \"),refused:n}}function cs(t,e){let n,r=_n(os(t,Or(e)),o=>n??=o);return r===void 0||n?{refused:n??{reason:\"unreadable\",name:t}}:{value:r.slice(r.indexOf(\":\")+1).trim()}}function us(t,e){if(e===\"svg\"){let r=vn(t);return r?{namespace:\"svg\",name:r}:{refused:{reason:\"element\",element:t}}}let n=t.toLowerCase();return n===\"svg\"?{namespace:\"svg\",name:\"svg\"}:Object.prototype.hasOwnProperty.call(Qe,n)?Object.prototype.hasOwnProperty.call(vt,n)?{namespace:\"html\",name:vt[n],as:n}:{namespace:\"html\",name:n}:{refused:{reason:\"element\",element:t}}}function Rr(t,e){return(t===\"html\"?Qe[e]:xn[e])?.empty===!0}var vi=/^[+-]?(\\d+\\.?\\d*|\\.\\d+)([eE][+-]?\\d+)?$/,Oi=/^[0-9A-Za-z\\s.,+\\-%()]*$/,Ri=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,Ai=/^data:image\\/(png|gif|jpeg|webp|avif|bmp|svg\\+xml)(;[A-Za-z0-9=._+-]+)*,/i,ki=/^\\/graview\\/assets\\/[0-9a-f]{64}\\.(png|gif|jpe?g|webp|avif|svg|ico)$/,ds=/\\/graview\\/assets\\/[0-9a-f]{64}\\.(png|gif|jpe?g|webp|avif|svg|ico)$/,Ci=/^\\/(?!\\/)(?!(?:.*\\/)?\\.\\.?(?:\\/|$))(?!.*%(?:2e|2f|5c))[^\\\\\\s?#\"'<>]*$/i;function Pi(t,e){if(ki.test(t))return t;let n=t;if(/^https?:\\/\\//i.test(t))try{let r=new URL(t);if(e===\"null\"||r.origin!==e||r.username!==\"\"||r.password!==\"\"||r.search!==\"\"||r.hash!==\"\")return;n=t.slice(r.origin.length)}catch{return}if(Ci.test(n))return ds.exec(n)?.[0]}function fs(t,e={}){let n=t.length>120?`${t.slice(0,119)}\\u2026`:t,r=ms(e.origins),o=ds.exec(t.split(/[?#]/)[0])?.[0],s=o?e.assets?` It is the app's own image only by its path, or under the app's base on this page's origin: write it as its path, ${o}.`:\" This host has not said where the app's own images live (asset, on the view's definition), so a view here cannot draw one by its path.\":/^https:\\/\\//i.test(t)?r.length>0?` Its origin is not one the host lists for images (${r.join(\", \")}).`:\" The host lists no origin a view's images may come from (images.origins, on the view's definition).\":\"\",i=[\"a data: image\",...e.assets?[\"the app's own image by the path add_image answered (/graview/assets/<sha256>.<ext>)\"]:[],\"a picture on a record (pictures in its manifest)\",...r.length>0?[`an https: image from ${r.join(\", \")}`]:[]];return`The image \"${n}\" was not drawn.${s} A view here shows ${i.slice(0,-1).join(\", \")} or ${i[i.length-1]}.`}function ms(t){return(t??[]).flatMap(e=>{try{let n=new URL(e);return n.protocol===\"https:\"&&n.hostname!==\"\"&&n.username===\"\"&&n.password===\"\"?[n.origin]:[]}catch{return[]}})}function _i(t,e){if(!(!e||e.length===0||!/^https:\\/\\//i.test(t)))try{let n=new URL(t);return n.protocol!==\"https:\"||n.username!==\"\"||n.password!==\"\"?void 0:ms(e).includes(n.origin)?n.href:void 0}catch{return}}function Ar(t,e,n,r,o){let s=On(t,e,n);if(!s)return{refused:{reason:\"attribute\",element:e,name:n}};if(t===\"html\"&&Sn[e]?.includes(s.name))return{refused:{reason:\"attribute\",element:e,name:n}};if(r===null)return{name:s.name,value:null};let i=Ii(s.name,s.kind,r,o);return\"refused\"in i?{refused:{...i.refused,element:e,...s.kind===\"image\"&&i.refused.reason===\"url\"?{address:r.slice(0,200)}:{}}}:s.name===\"role\"&&i.value.split(/\\s+/).some(c=>Co.includes(c.toLowerCase()))?{refused:{reason:\"value\",element:e,name:n}}:s.name===\"aria-live\"&&![\"polite\",\"off\"].includes(i.value.toLowerCase())?{refused:{reason:\"value\",element:e,name:n}}:{name:s.name,value:i.value,...i.dropped?{dropped:i.dropped.map(c=>({reason:c.reason===\"url\"?\"url\":\"css\",element:e,name:s.name,css:c}))}:{}}}function Ii(t,e,n,r){let o=(s,i)=>({refused:{reason:s,name:t,...i?{css:i}:{}}});if(e===\"geometry\")return n.length>Ho||!Oi.test(n)||/url/i.test(n)?o(\"value\"):{value:n};if(e===\"image\"){if(n.length>Vo)return o(\"url\");if(Ai.test(n))return{value:n};if(n.startsWith(`blob:${r.origin}/`)&&/^blob:[^\\s\"'<>]+$/.test(n))return{value:n};let s=r.asset?Pi(n,r.origin):void 0;if(s!==void 0){let c=r.asset(s);if(c)return{value:c}}let i=_i(n,r.imageOrigins);return i?{value:i}:o(\"url\")}if(n.length>pr)return o(\"value\");if(typeof e==\"object\"){let s=e.oneOf.find(i=>i.toLowerCase()===n.toLowerCase());return s===void 0?o(\"value\"):{value:s}}switch(e){case\"text\":return{value:n};case\"number\":return vi.test(n.trim())&&Number.isFinite(Number(n))?{value:n.trim()}:o(\"value\");case\"boolean\":return{value:\"\"};case\"fragment\":return Ri.test(n)?{value:n}:o(\"url\");case\"style\":{let s=ls(n,pr);return s.refused.length>0&&s.css===\"\"?o(s.refused[0].reason===\"url\"?\"url\":\"css\",s.refused[0]):{value:s.css,...s.refused.length>0?{dropped:s.refused}:{}}}case\"css\":{let s=cs(t,n);return\"refused\"in s?o(s.refused.reason===\"url\"?\"url\":\"css\",s.refused):{value:s.value}}}}var Di=\"http://www.w3.org/1999/xhtml\",rt=class{constructor(e){this.ownerDocument=e}parentNode=null;childNodes=[];get firstChild(){return this.childNodes[0]??null}get parentElement(){return this.parentNode instanceof Pe?this.parentNode:null}get textContent(){return this.childNodes.map(e=>e.textContent).join(\"\")}insertBefore(e,n){e.parentNode&&e.parentNode.removeChild(e);let r=n?this.childNodes.indexOf(n):-1;return r<0?this.childNodes.push(e):this.childNodes.splice(r,0,e),e.parentNode=this,e}appendChild(e){return this.insertBefore(e,null)}removeChild(e){let n=this.childNodes.indexOf(e);return n>=0&&this.childNodes.splice(n,1),e.parentNode=null,e}},Ce=class extends rt{constructor(n,r){super(n);this.data=r}nodeType=3;get textContent(){return this.data}},kr=class extends rt{nodeType=8;get textContent(){return\"\"}},Pe=class extends rt{constructor(n,r,o){super(n);this.namespaceURI=r;this.localName=o}nodeType=1;attributes=new Map;value=\"\";checked=!1;selected=!1;setAttribute(n,r){this.attributes.set(n,String(r))}removeAttribute(n){this.attributes.delete(n)}getAttribute(n){return this.attributes.get(n)??null}hasAttribute(n){return this.attributes.has(n)}closest(n){for(let r=this;r;r=r.parentElement)if(r.localName===n)return r;return null}},Cr=class extends rt{nodeType=9;constructor(){super(null)}createElementNS(e,n){return new Pe(this,e,n)}createElement(e){return new Pe(this,Di,e)}createTextNode(e){return new Ce(this,e)}createComment(e){return new kr(this)}};function ps(){let t=new Cr,e=t.createElement(\"div\");return e.setAttribute(\"data-graview-view-root\",\"\"),t.appendChild(e),{document:t,root:e}}var Pr={h1:1,h2:2,h3:3,h4:4,h5:5,h6:6},hs=new Set([\"a\",\"abbr\",\"b\",\"bdi\",\"bdo\",\"br\",\"cite\",\"code\",\"data\",\"del\",\"dfn\",\"em\",\"i\",\"ins\",\"kbd\",\"q\",\"s\",\"samp\",\"small\",\"span\",\"strong\",\"sub\",\"sup\",\"time\",\"u\",\"var\",\"wbr\",\"label\"]),gs=new Set([\"style\",\"template\",\"datalist\",\"option\"]),L=t=>t.replace(/\\s+/g,\" \").trim(),K=t=>t instanceof Pe,Rt=t=>t.hasAttribute(\"hidden\")||t.getAttribute(\"aria-hidden\")===\"true\";function F(t){return t instanceof Ce?t.data:!K(t)||Rt(t)||gs.has(t.localName)?\"\":t.localName===\"br\"?\" \":t.localName===\"img\"?t.getAttribute(\"alt\")??\"\":t.childNodes.map(F).join(t.localName===\"td\"||t.localName===\"th\"?\" \":\"\")}function*_e(t){for(let e of t.childNodes)K(e)&&(yield e,yield*_e(e))}function ys(t,e){let n=[],r=new Set,o=new Set,s=new Map;for(let m of[...e.props.node?[e.props.node]:[],...e.props.nodes??[]])s.set(m.id,m);let i=m=>Ot(e.places,m)!==void 0;for(let m of _e(t)){let b=m.getAttribute(\"data-act\");b!==null&&r.add(b);let N=m.getAttribute(\"data-record\");N!==null&&(o.add(N),!s.has(N)&&!i(N)&&n.push({at:`drawing <${m.localName} data-record=\"${N}\">`,says:`It names \"${N}\", which this seat was not shown and is no place of this app: the host will not follow it. A view goes to a record by its id, or to a place by its slug.${et(e.places)}`}));let v=m.getAttribute(\"data-place\");v!==null&&!i(v)&&n.push({at:`drawing <${m.localName} data-place=\"${v}\">`,says:`It names the place \"${v}\", which this app does not have.${et(e.places)}`})}let c=m=>{let b=m.getAttribute(\"data-record\");if(b!==null)return b;let N=m.getAttribute(\"data-key\")??m.getAttribute(\"id\");if(N!==null&&s.has(N))return N;let v=new Set;for(let y of _e(m)){let l=y.getAttribute(\"data-record\");l!==null&&v.add(l)}return v.size===1?[...v][0]:void 0},u=(m,b)=>{let N=s.get(b),v=N?.kind??(b.includes(\":\")?b.slice(0,b.indexOf(\":\")):\"\"),y=[..._e(m)],l=y.find(a=>a.localName in Pr)??y.find(a=>a.localName===\"a\"&&a.getAttribute(\"data-record\")===b)??y.find(a=>a.localName===\"strong\"||a.localName===\"b\"),h=L(l?F(l):\"\")||N?.label||b,g=p(m,l);return!l&&g[0]?.t===\"text\"&&L(g[0].text)===h&&g.shift(),{id:b,kind:v,title:h,parts:g}},d=m=>{let b=[..._e(m)].filter(l=>l.localName===\"tr\"&&!Rt(l)),N=b.find(l=>l.parentElement?.localName===\"thead\"||l.childNodes.every(h=>!K(h)||h.localName===\"th\")),v=N?N.childNodes.filter(K).map(l=>L(F(l))):[];return{t:\"list\",as:\"row\",columns:1,groups:[{items:b.filter(l=>l!==N).map(l=>{let h=l.childNodes.filter(K),g=c(l),a=g?s.get(g):void 0;return{id:g??\"\",kind:a?.kind??\"\",title:L(F(h[0]??l)),parts:h.slice(1).map((f,T)=>({t:\"field\",label:v[T+1]??\"\",text:L(F(f))}))}})}]}};function p(m,b){let N=[],v=\"\",y=()=>{let h=L(v);v=\"\",h&&N.push({t:\"text\",text:h})},l=m.childNodes;for(let h=0;h<l.length;h+=1){let g=l[h];if(g===b)continue;if(g instanceof Ce){v+=g.data;continue}if(!K(g)||Rt(g)||gs.has(g.localName))continue;if(b&&[..._e(g)].includes(b)){y(),N.push(...p(g,b));continue}let a=[];for(let f=h;f<l.length;f+=1){let T=l[f];if(T instanceof Ce&&L(T.data)===\"\")continue;if(!K(T)||Rt(T)||hs.has(T.localName)||T.localName in Pr)break;let w=c(T);if(!w)break;a.push({element:T,id:w}),h=f}if(a.length>0){y();let f=a.every(T=>T.element.localName===\"li\"||T.element.localName===\"tr\");N.push({t:\"list\",as:f?\"row\":\"card\",columns:1,groups:[{items:a.map(T=>u(T.element,T.id))}]});continue}N.push(...E(g,f=>v+=f,y))}return y(),N}function E(m,b,N){let v=m.localName;if(hs.has(v)&&v!==\"label\")return b(F(m)),[];if(v===\"mark\"){N();let l=L(F(m));return l?[{t:\"badge\",text:l}]:[]}N();let y=Pr[v]??(m.getAttribute(\"role\")===\"heading\"?Number(m.getAttribute(\"aria-level\")??2):void 0);if(y!==void 0){let l=L(F(m));return l?[{t:\"heading\",level:y,text:l}]:[]}switch(v){case\"ul\":case\"ol\":case\"menu\":return[{t:\"list\",as:\"row\",columns:1,groups:[{items:m.childNodes.filter(h=>K(h)&&h.localName===\"li\"&&!Rt(h)).map(h=>{let g=c(h);if(g)return u(h,g);let a=p(h),f=a[0],T=f&&(f.t===\"text\"||f.t===\"heading\")?f.text:\"\";return{id:\"\",kind:\"\",title:T,parts:T?a.slice(1):a}})}]}];case\"table\":return[d(m)];case\"dl\":{let l=[],h=\"\";for(let g of m.childNodes.filter(K))if(g.localName===\"dt\")h=L(F(g));else if(g.localName===\"dd\")l.push({t:\"field\",label:h,text:L(F(g))});else if(g.localName===\"div\")for(let a of g.childNodes.filter(K))a.localName===\"dt\"?h=L(F(a)):a.localName===\"dd\"&&l.push({t:\"field\",label:h,text:L(F(a))});return l}case\"figure\":{let l=m.childNodes.find(a=>K(a)&&a.localName===\"figcaption\"),h=L(m.childNodes.filter(a=>a!==l).map(F).join(\" \")),g=l?L(F(l)):\"\";return h?[{t:\"figure\",text:h,...g?{label:g}:{}}]:g?[{t:\"text\",text:g}]:[]}case\"meter\":case\"progress\":{let l=Number(m.getAttribute(\"value\")??0),h=Number(m.getAttribute(\"max\")??1)||1;return[{t:\"progress\",label:m.getAttribute(\"aria-label\")??m.getAttribute(\"title\")??\"\",text:`${Math.round(l/h*100)}%`}]}case\"svg\":{let l=m.childNodes.find(a=>K(a)&&a.localName===\"title\"),h=L(m.getAttribute(\"aria-label\")??(l?F(l):\"\"));if(h)return[{t:\"text\",text:h,tone:\"picture\"}];let g=[..._e(m)].filter(a=>a.localName===\"text\").map(a=>L(F(a))).filter(Boolean);return g.length>0?[{t:\"text\",text:g.join(\" \\xB7 \"),tone:\"picture\"}]:[]}case\"img\":{let l=L(m.getAttribute(\"alt\")??\"\");return l?[{t:\"text\",text:l,tone:\"picture\"}]:[]}case\"button\":{let l=L(F(m));return l?[{t:\"text\",text:l,tone:\"button\"}]:[]}case\"input\":case\"textarea\":case\"select\":{let l=L(m.getAttribute(\"aria-label\")??m.getAttribute(\"placeholder\")??m.getAttribute(\"name\")??\"\"),h=v===\"select\"?L(F(m.childNodes.find(g=>K(g)&&g.localName===\"option\"&&g.selected)??m)):m.value;return[{t:\"field\",label:l,text:h}]}case\"label\":return p(m);default:return p(m)}}return{parts:p(t),problems:n,acts:[...r],records:[...o]}}var Mi=0,Li=1,Hi=2,Vi=3,bs=1,Ui=2,Es=3,ji=1,$i=3,Gi=8,Ns=\"~\",In=t=>typeof t==\"object\"&&t!==null&&!Array.isArray(t),Ts=new Set([\"input\",\"select\",\"textarea\",\"option\"]),zi=new Set([\"value\",\"checked\",\"selected\"]);function ws(t,e){let n=t.ownerDocument??t,r=e.maxNodes??5e3,o=[],s=new Map,i=new WeakMap,c={dom:t,name:\"div\",namespace:\"html\",children:[],id:Ns};s.set(Ns,c);let u=0,d=!1,p=l=>{o.push(l),o.length>200&&o.shift(),e.onRefused?.(l)},E=()=>({dom:n.createComment(\"\"),children:[],refused:!0}),m=(l,h)=>{if(l.namespace===\"html\"&&l.name&&Ts.has(l.name))return l.dom;if(h?.namespace===\"html\"&&h.name===\"textarea\")return h.dom},b=(l,h,g)=>{let a=l.dom;if(g!=null&&typeof g!=\"string\")return p({reason:\"value\",element:l.name,name:h});let f=Ar(l.namespace,l.name,h,g??null,e);if(\"refused\"in f){let R=Ar(l.namespace,l.name,h,null,e);return\"refused\"in R||a.removeAttribute(R.name),p(f.refused)}for(let R of f.dropped??[])p(R);let T=l.namespace===\"html\"&&zi.has(f.name)&&Ts.has(l.name),w=a,O=T?f.name===\"value\"?w.value:f.name===\"checked\"?w.checked:w.selected:void 0;f.value===null?a.removeAttribute(f.name):a.setAttribute(f.name,f.value),e.onAttribute?.(a,f.name),T&&(f.name===\"value\"&&\"value\"in w?(w.value=f.value??\"\",O!==w.value&&e.onFieldSet?.(a)):f.name===\"checked\"&&\"checked\"in w?(w.checked=f.value!==null,O!==w.checked&&e.onFieldSet?.(a)):f.name===\"selected\"&&\"selected\"in w&&(w.selected=f.value!==null,O!==w.selected&&e.onFieldSet?.(a.parentElement?.closest(\"select\")??a)))},N=l=>{if(!l.refused){u-=1,l.id!==void 0&&s.delete(l.id);for(let h of l.children)N(h)}},v=(l,h)=>{if(!In(l)||typeof l.id!=\"string\"||s.has(l.id))return p({reason:\"record\"}),E();if(u>=r)return p({reason:\"budget\"}),d||(d=!0,e.onOverBudget?.()),E();let g=l.id;if(l.type===Gi)return E();if(l.type===$i){if(Rr(h.namespace,h.name))return p({reason:\"child\",element:h.name}),E();let O=n.createTextNode(String(l.data??\"\").slice(0,hr)),R={dom:O,children:[],text:!0,id:g,parent:h};return s.set(g,R),i.set(O,g),u+=1,R}if(l.type!==ji)return p({reason:\"record\"}),E();let a=String(l.element);if(Rr(h.namespace,h.name))return p({reason:\"child\",element:a}),E();let f=us(a,h.namespace);if(\"refused\"in f)return p(f.refused),E();let T=n.createElementNS(f.namespace===\"svg\"?jo:Uo,f.name);f.as&&T.setAttribute(\"data-graview-as\",f.as),f.namespace===\"html\"&&f.name===\"img\"&&T.setAttribute(\"referrerpolicy\",\"no-referrer\");let w={dom:T,name:f.name,namespace:f.namespace,children:[],id:g,parent:h};if(s.set(g,w),i.set(T,g),u+=1,In(l.attributes))for(let[O,R]of Object.entries(l.attributes))b(w,O,R);if(e.decorate?.(T,f.name,f.namespace),In(l.properties))for(let O of Object.keys(l.properties))p({reason:\"attribute\",element:f.name,name:O});if(In(l.eventListeners))for(let O of Object.keys(l.eventListeners))l.eventListeners[O]!=null&&p({reason:\"attribute\",element:f.name,name:`on${O}`});if(Array.isArray(l.children))for(let O of l.children){let R=v(O,w);w.children.push(R),T.appendChild(R.dom)}return w},y=l=>{if(!Array.isArray(l))return p({reason:\"record\"});let[h,g]=l,a=typeof g==\"string\"?s.get(g):void 0;if(!a)return p({reason:\"record\"});switch(h){case Mi:{if(a.text)return p({reason:\"record\"});let f=Number(l[3]),T=Number.isInteger(f)&&f>=0&&f<=a.children.length?f:a.children.length,w=v(l[2],a);a.dom.insertBefore(w.dom,a.children[T]?.dom??null),a.children.splice(T,0,w),a.namespace===\"html\"&&a.name===\"textarea\"&&e.onFieldSet?.(a.dom);return}case Li:{let f=Number(l[2]),T=a.children[f];if(!T)return p({reason:\"record\"});a.children.splice(f,1),T.dom.parentNode?.removeChild(T.dom),N(T);return}case Hi:{if(!a.text)return p({reason:\"record\"});a.dom.data=String(l[2]??\"\").slice(0,hr);let f=m(a,a.parent);f&&e.onFieldSet?.(f);return}case Vi:{if(a===c||a.text)return p({reason:\"record\"});let f=String(l[2]),T=l[4]??bs;return T===Ui?b(a,f,l[3]):p(T===bs||T===Es?{reason:\"attribute\",element:a.name,name:T===Es?`on${f}`:f}:{reason:\"record\"})}default:return p({reason:\"record\"})}};return{apply(l,h){if(!Array.isArray(l))return p({reason:\"record\"}),!0;for(let g=0;g<l.length;g+=1){if(h&&g%32===0&&h())return!1;y(l[g])}return!0},get refused(){return o},get size(){return u},idOf:l=>i.get(l),elementOf(l){let h=s.get(l);return h&&!h.text&&h!==c?h.dom:void 0},dispose(){for(let l of c.children)N(l);for(c.children.length=0;t.firstChild;)t.removeChild(t.firstChild)}}}function xs(t,e,n){let{root:r}=ps(),o=!1,s=ws(r,{origin:n.origin??\"null\",...n.imageOrigins?{imageOrigins:n.imageOrigins}:{},...n.asset?{asset:n.asset}:{},maxNodes:n.maxNodes,onOverBudget:()=>o=!0});for(let u of t)s.apply(u);let i=[...s.refused],c=\"\";if(typeof e==\"string\"){let u=as(e);c=u.css;for(let d of u.refused)i.push({reason:\"css\",name:\"stylesheet\",css:d})}return{root:r,refused:i,size:s.size,over:o,css:c}}function Fi(t,e={}){let n=\"element\"in t&&t.element?`<${t.element}>`:\"\",r=t.name?` ${t.name}`:\"\";switch(t.reason){case\"element\":return{at:`drawing ${n}`,says:`Not drawn: ${n} is not in the open kit.`};case\"attribute\":return{at:`drawing ${n}${r}`,says:`Not drawn: ${n||\"an element\"} does not take${r}.`};case\"value\":return{at:`drawing ${n}${r}`,says:`Not drawn: the value of${r} is not one the open kit takes.`};case\"url\":return{at:`drawing ${n}${r}`,says:t.address!==void 0&&\"element\"in t&&t.element===\"img\"?`Not drawn: ${fs(t.address,e)}`:\"Not drawn: an address. A view loads nothing; an image is a data: image.\"};case\"child\":return{at:`drawing ${n}`,says:`Not drawn: ${n} holds nothing.`};case\"record\":return{at:\"drawing\",says:\"Not drawn: a record the drawing's format does not know.\"};case\"budget\":return{at:\"drawing\",says:\"Not drawn: more nodes than a view may draw.\"};case\"css\":return{at:`stylesheet${r===\" stylesheet\"?\"\":r}`,says:`Not drawn: CSS the open kit leaves out${t.css?` (${t.css.reason}${t.css.name?` ${t.css.name}`:\"\"})`:\"\"}.`}}}function Ss(t,e){let{limits:n}=e;if(t.messages>n.messages)return{ok:!1,reason:\"flood\",detail:`It sent ${t.messages} messages, more than the ${n.messages} a view may send in a second.`};let r=new Set(e.acts);for(let u of t.asked)if(!r.has(u.name))return{ok:!1,reason:\"act\",detail:`It asks for the act \"${u.name}\", which its manifest does not name.`};let o=xs(t.renders,t.css,{maxNodes:n.maxNodes,...e.origin?{origin:e.origin}:{},...e.imageOrigins?{imageOrigins:e.imageOrigins}:{},...e.assets?{asset:u=>u}:{}});if(o.over)return{ok:!1,reason:\"nodes\",detail:`It drew more than the ${n.maxNodes.toLocaleString(\"en-US\")} things a view may draw.`};let s=[...e.places,...(e.lists??[]).filter(u=>!e.places.some(d=>d.as===u)).map(u=>({as:u}))],i=ys(o.root,{props:e.props,places:s});for(let u of i.acts)if(!r.has(u))return{ok:!1,reason:\"act\",detail:`It binds a press to the act \"${u}\" (data-act), which its manifest does not name.`};let c=[...o.refused.map(u=>Fi(u,{...e.imageOrigins?{origins:e.imageOrigins}:{},assets:e.assets===!0})),...i.problems];for(let u of t.went)\"record\"in u&&!(e.props.node?.id===u.record||(e.props.nodes??[]).some(d=>d.id===u.record)||Ot(s,u.record))&&c.push({at:\"navigate\",says:`It goes to ${yr(u.record)}, which this seat was not shown and is no place of this app: the host will not follow it. A view goes to a record by its id, or to a place by its slug.${et(s)}`}),\"place\"in u&&!Ot(s,u.place)&&c.push({at:\"navigate\",says:`It goes to the place ${yr(u.place)}, which this app does not have.${et(s)}`});return{ok:!0,parts:i.parts,problems:c}}var _r=\"graviewHeadless\",Ir=\"graviewHeadlessView\";var Rs=globalThis,Bi=Promise.prototype.then,Yi=Promise.resolve(),Mr=t=>void Bi.call(Yi,t),Dn=Rs.performance,At=Dn&&typeof Dn.now==\"function\"?Dn.now.bind(Dn):Date.now,Ie=JSON.stringify,As=JSON.parse,qi=Object.defineProperty,Lr=t=>(t instanceof Error?`${t.name}: ${t.message}`:String(t)).slice(0,500),Mn=t=>{try{return As(Ie(t??null))}catch{return null}},U={renders:[],asked:[],went:[],ms:0,logs:[],messages:0},De,Ln=(t,e)=>{De??={reason:t,detail:e}},ot=t=>{U.logs.length<50&&U.logs.push(t.slice(0,500))},st={removed:[],stuck:[],sealed:!1},Hr=Yo({send(t){U.messages+=1,t.type===\"render\"?U.renders.push(Mn(t.records)):t.type===\"style\"?U.css=String(t.css):t.type===\"navigate\"&&\"place\"in t?U.went.push({place:String(t.place),...t.where!==void 0?{where:Mn(t.where)}:{},...t.section!==void 0?{section:String(t.section)}:{}}):t.type===\"navigate\"&&\"to\"in t&&U.went.push({record:String(t.to),...t.where!==void 0?{where:Mn(t.where)}:{},...t.section!==void 0?{section:String(t.section)}:{}})},act(t,e){return U.messages+=1,U.asked.push({name:String(t),args:Mn(e)}),Promise.resolve({type:\"answer\",id:U.asked.length,ok:!1,reason:\"refused\",message:\"Nothing is applied in a headless run.\"})},navigate(t){U.messages+=1,U.went.push({record:String(t)})},microtask:Mr,now:At,threw:t=>Ln(\"error\",`It threw: ${Lr(t)}`),warn:ot,hardening:()=>st}),vs=!1,Dr=!1;function Wi(t){if(Dr||typeof t!=\"function\"||(Dr=!0,De))return;let e=At();try{t.call(void 0,Hr.view)}catch(n){Ln(\"error\",`It threw: ${Lr(n)}`)}U.ms+=At()-e}async function Xi(t){if(vs)return Ie({ok:!1,reason:\"refused\",detail:\"A headless script runs one view, once: something called its entry before the host did.\"});vs=!0;let e;try{e=As(String(t))}catch{return Ie({ok:!1,reason:\"isolate\",detail:\"The run was not handed its input as JSON.\"})}if(!Dr&&!De)return Ie({ok:!1,reason:\"isolate\",detail:\"The script held no view.\"});let n=At();De||Hr.hear({type:\"props\",props:e.props,push:1}),U.ms+=At()-n,U.ms>=e.limits.pushMs&&Ln(\"slow\",`It took longer than ${e.limits.pushMs.toLocaleString(\"en-US\")} ms to draw what it was shown.`);for(let o=0;o<64&&!De;o+=1)await new Promise(s=>Mr(s));if(De)return Ie({ok:!1,...De,transcript:U});let r=Ss(U,e);return r.ok?Ie({ok:!0,transcript:U,drawn:{parts:r.parts,problems:r.problems},hardening:{removed:st.removed.length,sealed:st.sealed}}):Ie({ok:!1,reason:r.reason,detail:r.detail,transcript:U})}var Ki=Object.freeze({log:(...t)=>ot(t.map(String).join(\" \")),info:(...t)=>ot(t.map(String).join(\" \")),debug:(...t)=>ot(t.map(String).join(\" \")),warn:(...t)=>ot(t.map(String).join(\" \")),error:(...t)=>ot(t.map(Lr).join(\" \"))}),Zi=0,Os=()=>Zi+=1,Ji=[[\"console\",Ki],[\"setTimeout\",Os],[\"setInterval\",Os],[\"clearTimeout\",()=>{}],[\"clearInterval\",()=>{}],[\"queueMicrotask\",Mr],[\"graview\",Hr.view],[Ir,Wi],[_r,t=>Xi(t)]];for(let[t,e]of Ji)qi(Rs,t,{value:e,writable:!0,enumerable:!1,configurable:!0});st=Ao(globalThis,[\"graview\",Ir,_r],{primitivesStay:!0});st.stuck.length>0&&Ln(\"refused\",`This isolate could not be hardened: ${st.stuck.join(\", \")} would not go.`);})();\n";
7
+ export const HEADLESS_RUNTIME = "\"use strict\";\n/*! @remote-dom/core and @remote-dom/polyfill — Copyright 2020-present, Shopify Inc. — MIT License.\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n * @graview/guest's worker runtime — Elastic License 2.0. */\n\"use strict\";(()=>{var A=Symbol(\"name\"),be=Symbol(\"prefix\"),Ee=Symbol(\"value\"),k=Symbol(\"ns\"),W=Symbol(\"owner\"),M=Symbol(\"owner_document\"),ae=Symbol(\"attributes\"),L=Symbol(\"prev\"),v=Symbol(\"next\"),C=Symbol(\"child\"),X=Symbol(\"parent\"),Ne=Symbol(\"host\"),Q=Symbol(\"data\"),Re=Symbol(\"listeners\"),Un=Symbol(\"isTrusted\"),Ve=Symbol(\"path\"),Ue=Symbol(\"stop_immediate_propagation\"),je=Symbol(\"dispatching\"),de=Symbol(\"content\"),H=Symbol(\"hooks\"),_t=Symbol(\"extensions\"),Ae=Symbol(\"hooks_dispatch\"),G=Symbol(\"is_connected\"),Ge=Symbol(\"create_element\"),Ur=0,Z=1,ze=2,Fe=3,Be=8,ke=9,jr=10,we=11,I=\"http://www.w3.org/1999/xhtml\",ee=\"http://www.w3.org/2000/svg\",Gr=\"http://www.w3.org/XML/1998/namespace\",dt=\"http://www.w3.org/2000/xmlns/\";function It(t){return t.split(/[\\t\\n\\f\\r ]+/).filter(Boolean)}function V(t){return t.replace(/[A-Z]/g,e=>String.fromCharCode(e.charCodeAt(0)+32))}function zr(t){return t.replace(/[a-z]/g,e=>String.fromCharCode(e.charCodeAt(0)-32))}function D(t,e){let n=globalThis.DOMException;if(typeof n==\"function\")return new n(t,e);let r=new Error(t);return r.name=e,r}var Fr=/^(?:[A-Za-z][^\\0\\t\\n\\f\\r\\u0020/>]*|[:_\\u0080-\\u{10FFFF}][A-Za-z0-9-.:_\\u0080-\\u{10FFFF}]*)$/u,Br=/[\\0\\t\\n\\f\\r />=]/u,Ps=/[\\0\\t\\n\\f\\r />]/u;function fe(t){if(t==null)return null;let e=String(t);return e===\"\"?null:e}function Yr(t){Fr.test(t)||Gn(t)}function jn(t){(t===\"\"||Br.test(t))&&Gn(t)}function Dt(t,e,n){let r=fe(t),o=String(e),s=o.indexOf(\":\"),i=s<0?null:o.slice(0,s),l=s<0?o:o.slice(s+1);if((i!=null&&(i===\"\"||Ps.test(i))||(n===\"element\"?!Fr.test(l):l===\"\"||Br.test(l)))&&Gn(o),i!=null&&r==null)throw D(`A namespace is required for the prefix in \"${o}\"`,\"NamespaceError\");if(i===\"xml\"&&r!==Gr)throw D(\"The xml prefix requires the XML namespace\",\"NamespaceError\");if((o===\"xmlns\"||i===\"xmlns\")&&r!==dt)throw D(\"The xmlns name requires the XMLNS namespace\",\"NamespaceError\");if(r===dt&&o!==\"xmlns\"&&i!==\"xmlns\")throw D(\"The XMLNS namespace requires the xmlns name or prefix\",\"NamespaceError\");return{namespace:r,qualifiedName:o,prefix:i,localName:l}}function Gn(t){throw D(`Invalid name: \"${t}\"`,\"InvalidCharacterError\")}var Mt=0,Lt=1,qr=2,zn=3,_s=typeof performance>\"u\"?Date.now:performance.now.bind(performance),z=class{static NONE=Mt;static CAPTURING_PHASE=Lt;static AT_TARGET=qr;static BUBBLING_PHASE=zn;timeStamp=_s();target=null;currentTarget=null;srcElement=null;bubbles=!1;cancelable=!1;composed=!1;defaultPrevented=!1;cancelBubble=!1;eventPhase=Mt;[Ve]=[];[Ue]=!1;[je]=!1;constructor(e,n){this.type=e,Object.defineProperty(this,Un,{writable:!0,value:!1}),n&&(n.bubbles&&(this.bubbles=n.bubbles),n.cancelable&&(this.cancelable=n.cancelable),n.composed&&(this.composed=n.composed))}get isTrusted(){return this[Un]}composedPath(){return[...this[Ve]]}stopPropagation(){this.cancelBubble=!0}stopImmediatePropagation(){this[Ue]=!0,this.cancelBubble=!0}preventDefault(){this.cancelable&&(this.defaultPrevented=!0)}set returnValue(e){e||this.preventDefault()}get returnValue(){return!this.defaultPrevented}initEvent(e,n,r){this.type=e,this.bubbles=!!n,this.cancelable=!!r}};function Fn(t,e,n){if(t.cancelBubble)return;let o=e[Re]?.get(t.type)?.[n===Lt?\"capture\":\"bubble\"];if(o)for(let s of[...o]){if(!o.has(s)||s.signal?.aborted)continue;t.eventPhase=t.target===e?qr:n,t.currentTarget=e;let i=s.normalizedListener;try{typeof i==\"object\"?i.handleEvent(t):i.call(e,t)}catch(l){setTimeout(Is,0,l)}if(t[Ue])break}}function Is(t){throw t}var ft=[],Ht=new WeakMap;function $t(t,e){let n=Ht.get(t);n?n.push(e):Ht.set(t,[e]),ft[ft.length-1].push(t)}function F(t){let e=[];ft.push(e);let n;try{n=t()}catch(r){ft.pop();try{Wr(e)}catch{}throw r}return ft.pop(),Wr(e),n}function Wr(t){let e,n=!1;for(let r of t){let o=Ht.get(r);if(o){for(;o.length>0;){let s=o.shift();try{s()}catch(i){n||(e=i,n=!0)}}Ht.delete(r)}}if(n)throw e}var Vt=[],mt=[],Bn=!1;function Ce(t){for(let e of t)Vt.push(e),e[1]&&mt.push(e[1]);if(!Bn){Bn=!0;try{let e,n=!1;for(let r=0;r<Vt.length;r++){let[o,s]=Vt[r];s&&mt.splice(mt.indexOf(s),1);try{o()}catch(i){n||(e=i,n=!0)}}if(n)throw e}finally{Vt.length=0,mt.length=0,Bn=!1}}}function pt(t){let e=t;for(;e;){if(mt.includes(e))return!0;e=e[X]??e[Ne]}return!1}var ht=Symbol(\"listenerRegistrations\"),Te=class{[Re]=void 0;[ht]=void 0;[M]=void 0;addEventListener(e,n,r){if(n==null)return;let o=r===!0||typeof r==\"object\"&&r.capture===!0,s=typeof r==\"object\"&&r.once===!0,i=typeof r==\"object\"?r.signal:void 0;if(i?.aborted)return;let l=Yn(o),c=this[ht];c||(c=new Map,this[ht]=c);let d=c.get(e);d||(d={},c.set(e,d));let g=d[l];if(g||(g=new Map,d[l]=g),g.has(n))return;let w=this,f={type:e,listener:n,capture:o,once:s,normalizedListener:n,signal:i};(s||i)&&(f.normalizedListener=function(...a){if(f.signal?.aborted){Ut(w,f);return}return f.once&&Ut(w,f),typeof f.listener==\"object\"?f.listener.handleEvent(...a):f.listener.call(this,...a)});let b=this[Re];b||(b=new Map,this[Re]=b);let T=b.get(e);T||(T={},b.set(e,T));let S=T[l];if(S||(S=new Set,T[l]=S),g.set(n,f),S.add(f),i){let y=()=>{Ut(w,f)};f.abortListener=y,i.addEventListener(\"abort\",y,{once:!0})}this[M]?.defaultView[Ae].addEventListener?.(this,e,n,r)}removeEventListener(e,n,r){return Ds.call(this,e,n,r)}dispatchEvent(e){if(e[je])throw D(\"Failed to execute 'dispatchEvent' on 'EventTarget': The event is already being dispatched.\",\"InvalidStateError\");e[je]=!0;try{let n=[],r=this;for(;r!=null;)n.push(r),r=r.parentNode;e.target=this,e.srcElement=this,e[Ve]=n;for(let s=n.length;s--;)if(Fn(e,n[s],Lt),e.cancelBubble)return!e.defaultPrevented;let o=e.bubbles?n:n.slice(0,1);for(let s=0;s<o.length;s++)if(Fn(e,o[s],zn),e.cancelBubble)return!e.defaultPrevented;return!e.defaultPrevented}finally{e[je]=!1,e.cancelBubble=!1,e[Ue]=!1,e.eventPhase=Mt,e.currentTarget=null,e[Ve]=[]}}};function Ds(t,e,n){if(e==null)return;let r=n===!0||n&&n.capture===!0,o=Yn(!!r),s=this[ht]?.get(t)?.[o]?.get(e);s&&Ut(this,s)}function Yn(t){return t?\"capture\":\"bubble\"}function Ut(t,e){let n=Yn(e.capture),r=t[ht],o=r?.get(e.type);if(!o)return;let s=o[n];if(!s||s.get(e.listener)!==e)return;s.delete(e.listener),s.size===0&&delete o[n],!o.bubble&&!o.capture&&r?.delete(e.type),e.signal&&e.abortListener&&e.signal.removeEventListener(\"abort\",e.abortListener);let i=t[Re],l=i?.get(e.type);if(!l)return;let c=l[n];c?.delete(e)&&(c.size===0&&delete l[n],!l.bubble&&!l.capture&&i?.delete(e.type),t[M]?.defaultView[Ae].removeEventListener?.(t,e.type,e.listener,e.capture))}var te=class extends Array{item(e){return this[e]??null}};var yt=0,Xr=1,Xn=2,Kn=3,bt=4,Kr=0,Zr=1,zt=2,Ft=3,Jr=4,Wn=5,Qr=6,eo=7,jt=/^(?:--|-?[A-Za-z_\\u0080-\\u{10FFFF}])[A-Za-z0-9_\\u0080-\\u{10FFFF}-]*$/u;function Ms(t,e){let n=1,r=null;for(let o=e;o<t.length;o++){let s=t[o];if(r){s===\"\\\\\"?o++:s===r&&(r=null);continue}if(s==='\"'||s===\"'\")r=s;else if(s===\"(\")n++;else if(s===\")\"&&--n===0)return[t.slice(e,o),o+1]}return[t.slice(e),t.length]}function K(t){throw D(`Invalid or unsupported selector: \"${t}\"`,\"SyntaxError\")}function Bt(t,e){let n=typeof e==\"string\"?Et(e):[{combinator:bt,matchers:e}],r=null,o=t[C];return o&&n[0].matchers.length&&Zn(o,n,s=>(r=s,!1)),r}function Yt(t,e){let n=typeof e==\"string\"?Et(e):[{combinator:bt,matchers:e}],r=new te,o=t[C];return o&&n[0].matchers.length&&Zn(o,n,s=>{r.push(s)}),r}function Et(t,e=!1,n=!1){let r={combinator:bt,matchers:[]},o=[r],s=/[\\t\\n\\f\\r ]*?([>\\t\\n\\f\\r +~]?)[\\t\\n\\f\\r ]*?(?:(?:\\[[\\t\\n\\f\\r ]*([^\\]=\\t\\n\\f\\r ]+)[\\t\\n\\f\\r ]*(?:=[\\t\\n\\f\\r ]*(?:(['\"])(.*?)\\3|([^\\]\\t\\n\\f\\r ]+)))?[\\t\\n\\f\\r ]*(?:\\]|$))|([#.]?)([^\\t\\n\\f\\r #.[>:+~()]+)|:(\\w+)(\\()?)/gi,i=t.replace(/^[\\t\\n\\f\\r ]+|[\\t\\n\\f\\r ]+$/g,\"\");i===\"\"&&K(t);let l=0,c;for(;c=s.exec(i);){c.index!==l&&K(t),c[1]&&(r.matchers.length===0&&!(n&&o.length===1)&&K(t),c[1]===\">\"?r.combinator=Xr:c[1]===\"+\"?r.combinator=Kn:c[1]===\"~\"?r.combinator=Xn:r.combinator=yt,r={combinator:bt,matchers:[]},o.push(r));let d=c[8]?V(c[8]):c[2]||c[7];c[7]!=null&&!c[6]&&r.matchers.length>0&&K(t);let w,f=c[4]??c[5]??c[7];if(c[2]){jt.test(d)||K(t);let b=c[5],T=b?.[0];if(c[3]==null&&(T==='\"'||T===\"'\")){let S=c[0].lastIndexOf(b);f=i.slice(c.index+S+1),s.lastIndex=i.length}else b!=null&&!jt.test(b)&&K(t);w=Jr}else c[6]?(jt.test(d)||K(t),w=c[6]===\"#\"?zt:Ft):c[8]?w=c[9]==null?Wn:Qr:c[7]===\"*\"?w=Kr:c[7]&&jt.test(c[7])?w=Zr:K(t);c[9]?([f,s.lastIndex]=Ms(i,s.lastIndex),d!==\"has\"&&d!==\"not\"&&K(t),d===\"has\"&&e&&K(t),Et(f,e||d===\"has\",d===\"has\")):w===Wn&&K(t),r.matchers.push({type:w,name:d,value:f}),l=s.lastIndex}return(l!==i.length||r.matchers.length===0)&&K(t),o}function Ls(t,e){let n=Et(e);return n[0]?.matchers.length?gt(t,n):!1}function Hs(t,e){let n=Et(e,!0,!0),r=n[0];if(n.length===1&&r.matchers.length===0)return!1;let o=yt,s={type:eo,name:\":scope\"};if(r.matchers.length===0?(o=r.combinator,r.matchers.push(s)):n.unshift({combinator:yt,matchers:[s]}),n.some(({matchers:c})=>c.length===0))return!1;let i=o===Kn||o===Xn?t[v]:t[C];if(!i)return!1;let l=!1;return Zn(i,n,()=>(l=!0,!1),t),l}function Zn(t,e,n,r){let o=[],s=t;for(;s;){if(q(s)){if(gt(s,e,r)&&n(s)===!1)return!1;let i=s[C];if(i){let l=s[v];l&&o.push(l),s=i;continue}}s=s[v]??o.pop()??null}return!0}function gt(t,e,n){let{combinator:r,matchers:o}=e[e.length-1];if(r===bt){if(!Gt(t,o,n))return!1;let l=e.slice(0,-1);return l.length===0||gt(t,l,n)}let s=r===Xr||r===yt?X:L,i=t[s];if(!i)return!1;if(r===yt||r===Xn){for(;i;){if(q(i)&&Gt(i,o,n)){let l=e.slice(0,-1);if(l.length===0||gt(i,l,n))return!0}i=i[s]}return!1}else{if(r===Kn&&!q(i)){for(;i&&!q(i);)i=i[s];if(!i)return!1}if(!q(i)||!Gt(i,o,n))return!1;let l=e.slice(0,-1);return l.length===0||gt(i,l,n)}}function qn(t,e){return t.getAttributeNS(null,t.namespaceURI===I?V(e):e)}function Gt(t,e,n){if(!t)return!1;if(Array.isArray(e)){for(let i of e)if(Gt(t,i,n)===!1)return!1;return!0}let{type:r,name:o,value:s}=e;switch(r){case Kr:return o===\"*\";case Zr:return t.namespaceURI===I?t.localName===V(o):t.localName===o;case zt:return qn(t,\"id\")===o;case Ft:let i=qn(t,\"class\");return i?It(i).includes(o):!1;case Jr:let l=qn(t,o);return s==null?l!=null:l===s;case eo:return t===n;case Wn:K(`:${o}`);case Qr:switch(o){case\"has\":return Hs(t,s||\"\");case\"not\":return!Ls(t,s||\"\");default:K(`:${o}(${s})`)}}return!1}function $s(t){return t.nodeType===ze}function Nt(t){return Q in t}function Qn(t){return t.nodeType===Fe}function Vs(t){return t.nodeType===Be}function q(t){return t.nodeType===Z}function Jn(t){return t.nodeType===we}function oo(t){return\"appendChild\"in t}function qt(t){let e=[],n=[t],r=new Set(n),o=new Set,s;for(;n.length>0;){let i=n.pop();if(r.delete(i),o.has(i))continue;let l=[];for(let c of Tt(i)){if(o.has(c)||(o.add(c),e.push(c),l.push(c),!q(c)))continue;let d=c[ae];if(d)for(let w of d)o.has(w)||(o.add(w),e.push(w));let g=c[de];g&&!o.has(g)&&!r.has(g)&&(r.add(g),n.push(g))}s??=l}return{nodes:e,treeNodes:s}}function wt(t,e){for(let n of t)n[M]=e}function to(t,e){let n=t.constructor,r=new n(t.name,t.value,t.namespaceURI);return r[M]=e,r}function no(t,e){if(Qn(t))return e.createTextNode(t.data);if(Vs(t))return e.createComment(t.data);if($s(t))return to(t,e);if(q(t)){let n=e[Ge](t[A],t.namespaceURI,t[be],t.localName);if(t[ae])for(let r=0;r<t[ae].length;r++){let o=t[ae].item(r);n.attributes.setNamedItem(to(o,e))}return n}else{if(Jn(t))return e.createDocumentFragment();{let n=new t.constructor;return n[M]=e,n}}}function Wt(t,e,n=t.ownerDocument){if(t.nodeType===ke)throw D(\"Cannot clone a document node\",\"NotSupportedError\");let r=no(t,n);if(!e||!q(t)&&!Jn(t))return r;let o=new Set([t]),s=[{source:t,destination:r,childIndex:0,cloningContent:!1}];for(;s.length>0;){let i=s[s.length-1],l,c;if(i.cloningContent)if(i.contentSource&&i.contentDestination)l=i.contentSource.childNodes[i.childIndex++],c=i.contentDestination;else{s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}else if(l=i.source.childNodes[i.childIndex++],c=i.destination,!l){if(i.cloningContent=!0,i.childIndex=0,q(i.source)&&i.source.namespaceURI===I&&i.source.localName===\"template\"){let g=i.source[de];g&&(o.has(g)&&ro(),o.add(g),i.contentSource=g,i.contentDestination=i.destination.content)}continue}if(!l){s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}o.has(l)&&ro(),o.add(l);let d=no(l,n);q(l)||Jn(l)?s.push({source:l,destination:d,appendTo:c,childIndex:0,cloningContent:!1}):c.appendChild(d)}return r}function ro(){throw new Error(\"Cannot clone a cyclic or repeated node graph\")}function Xt(t,e){let n=String(e);return n===\"\"?null:Bt(t,[{type:zt,name:n}])}function Kt(t,e){let n=[...new Set(It(String(e)))];return Yt(t,n.map(r=>({type:Ft,name:r})))}function Zt(t,e){let n=String(e),r=V(n),o=[];for(let s of Jt(t))q(s)&&(n===\"*\"||(s.namespaceURI===I?s[A]===r:s[A]===n))&&o.push(s);return o}function Jt(t){let e=[],n=[],r=t[C];for(;r;){e.push(r);let o=r[C],s=r[v];o?(s&&n.push(s),r=o):r=s??n.pop()??null}return e}function Tt(t){let e=Jt(t);return e.unshift(t),e}var ne=class extends Te{nodeType=Ur;[A]=\"\";[X]=null;[Ne]=null;[C]=null;[L]=null;[v]=null;[G]=!1;get[H](){return this[M].defaultView[Ae]}get localName(){return this[A]}get nodeName(){return this[A]}get ownerDocument(){return this[M]}get isConnected(){return this[G]}isDefaultNamespace(e){let n=fe(e);return Us(this)===n}get parentNode(){return this[X]}set parentNode(e){}get parentElement(){let e=this[X];return!e||e.nodeType!==1?null:e}set parentElement(e){}get previousSibling(){return this[L]}set previousSibling(e){}get nextSibling(){return this[v]}set nextSibling(e){}get previousElementSibling(){let e=this[L];for(;e&&e.nodeType!==1;)e=e[L];return e}set previousElementSibling(e){}get nextElementSibling(){let e=this[v];for(;e&&e.nodeType!==1;)e=e[v];return e}set nextElementSibling(e){}get firstChild(){return this[C]}set firstChild(e){}get lastChild(){let e=this[C];for(;e;){let n=e[v];if(n==null)break;e=n}return e}set lastChild(e){}get nodeValue(){return Nt(this)?this.data:null}set nodeValue(e){Nt(this)&&(this.data=e)}get textContent(){if(Nt(this))return this.data;let e=\"\";for(let n of Jt(this))Qn(n)&&(e+=n.data);return e}set textContent(e){if(Nt(this))this.data=e;else if(oo(this)){let n=e==null?\"\":String(e);n===\"\"?this.replaceChildren():this.replaceChildren(n)}}cloneNode(e){return Wt(this,e)}contains(e){let n=e;for(;n!=null;){if(n===this)return!0;n=n.parentNode}return!1}};function Us(t){let e=t;for(;e;)switch(e.nodeType){case Z:{let n=e;if(n.prefix==null&&n.namespaceURI!=null)return n.namespaceURI;let r=n.attributes.getNamedItemNS(dt,\"xmlns\");if(r!=null&&r.prefix==null)return fe(r.value);e=n.parentElement;break}case ke:e=e.documentElement;break;case jr:case we:return null;case ze:e=e.ownerElement;break;default:e=e.parentElement}return null}var re=Symbol(\"insertNode\"),nr=Symbol(\"preflightInsertions\"),Qt=Symbol(\"replaceNode\"),xe=class extends ne{remove(){let e=this.parentNode;e&&e.removeChild(this)}replaceWith(...e){let n=Pe(e),r=this.parentNode;if(r)return er(o=>{me(r,n);let s=this[v];for(;s&&n.includes(s);)s=s[v];let i=tr(r,n,o);this.parentNode===r?r[Qt](i,this,o):r[re](i,s,o)})}before(...e){let n=Pe(e),r=this.parentNode;if(r)return er(o=>{me(r,n);let s=this[L];for(;s&&n.includes(s);)s=s[L];let i=tr(r,n,o);r[re](i,s?s[v]:r.firstChild,o)})}after(...e){let n=Pe(e),r=this.parentNode;if(r)return er(o=>{me(r,n);let s=this[v];for(;s&&n.includes(s);)s=s[v];let i=tr(r,n,o);r[re](i,s,o)})}};function er(t){return F(()=>{let e=[];try{t(e)}catch(n){try{Ce(e)}catch{}throw n}Ce(e)})}function Pe(t){return t.map(e=>e instanceof ne?e:String(e))}function xt(t,e){return e instanceof ne?e:t.ownerDocument.createTextNode(String(e))}function me(t,e){for(let n of e){if(!(n instanceof ne))continue;let r=t;for(;r;){if(r===n)throw D(\"Cannot insert a node into itself or one of its descendants\",\"HierarchyRequestError\");r=r[X]??r[Ne]}}}function tr(t,e,n){let r=[];for(let s of e)r.push(xt(t,s));if(r.length===1)return r[0];let o=t.ownerDocument.createDocumentFragment();o[nr](r);for(let s of r)o[re](s,null,n);return o}var en,rr=0,so=0,io=0,ao=0,Ye=!1,sr=!1,vt=!1,tn=class{#t;#n=[];#e=new Set;#r=!1;constructor(e){if(typeof e!=\"function\")throw new TypeError(\"MutationObserver callback must be a function\");this.#t=e}observe(e,n={}){let r=js(n),o=en??=new WeakMap,s=o.get(e);s==null&&(s=new Map,o.set(e,s));let i=s.get(this);i==null?rr++:or(i,-1),s.set(this,r),or(r,1),this.#e.add(e)}disconnect(){let e=en;if(e!=null){for(let n of this.#e){let r=e.get(n),o=r?.get(this);o!=null&&(r.delete(this),rr--,or(o,-1)),r?.size===0&&e.delete(n)}this.#e.clear(),this.#n.length=0,rr===0&&(en=void 0)}}takeRecords(){return this.#n.splice(0)}enqueue(e){this.#n.push(e),!this.#r&&(this.#r=!0,queueMicrotask(()=>{this.#r=!1;let n=this.takeRecords();n.length>0&&this.#t.call(this,n,this)}))}};function oe(t){let e=en;if(e==null)return;let n=new Map,r=t.target;for(;r;){let o=e.get(r);if(o)for(let[s,i]of o){if(r!==t.target&&!i.subtree)continue;let l=!1;if(t.type===\"attributes\"){if(!i.attributes||i.attributeFilter&&!i.attributeFilter.has(t.attributeName??\"\"))continue;l=i.attributeOldValue}else if(t.type===\"characterData\"){if(!i.characterData)continue;l=i.characterDataOldValue}else if(!i.childList)continue;n.set(s,n.get(s)===!0||l)}r=r.parentNode}for(let[o,s]of n)o.enqueue({addedNodes:t.addedNodes??new te,attributeName:t.attributeName??null,attributeNamespace:t.attributeNamespace??null,nextSibling:t.nextSibling??null,oldValue:s?t.oldValue??null:null,previousSibling:t.previousSibling??null,removedNodes:t.removedNodes??new te,target:t.target,type:t.type})}function nn(...t){let e=new te;return e.push(...t),e}function js(t){if(t.attributes===!1&&(t.attributeOldValue||t.attributeFilter!=null))throw new TypeError(\"attributeOldValue and attributeFilter require attributes to be enabled\");if(t.characterData===!1&&t.characterDataOldValue)throw new TypeError(\"characterDataOldValue requires characterData to be enabled\");let e=t.attributes??(t.attributeOldValue===!0||t.attributeFilter!=null),n=t.characterData??t.characterDataOldValue===!0,r=t.childList===!0;if(!e&&!n&&!r)throw new TypeError(\"MutationObserver options must enable childList, attributes, or characterData\");return{attributes:e,attributeFilter:t.attributeFilter==null?void 0:new Set(t.attributeFilter.map(String)),attributeOldValue:t.attributeOldValue===!0,characterData:n,characterDataOldValue:t.characterDataOldValue===!0,childList:r,subtree:t.subtree===!0}}function or(t,e){t.attributes&&(so+=e),t.characterData&&(io+=e),t.childList&&(ao+=e),Ye=so>0,sr=io>0,vt=ao>0}var le=class extends xe{childNodes=new te;children=new te;appendChild(e){return F(()=>this[re](e,null))}insertBefore(e,n){return F(()=>this[re](e,n||null))}append(...e){return F(()=>{let n=Pe(e.filter(r=>r!=null));n.length>1&&me(this,n);for(let r of n)this[re](xt(this,r),null)})}prepend(...e){return F(()=>{let n=Pe(e.filter(o=>o!=null));n.length>1&&me(this,n);let r=this.firstChild;for(let o of n)this[re](xt(this,o),r)})}replaceChildren(...e){return F(()=>{let n=Pe(e.filter(o=>o!=null));me(this,n);let r;for(;r=this.firstChild;)this.removeChildImmediately(r);for(let o of n)this[re](xt(this,o),null)})}removeChild(e){return F(()=>(this.removeChildImmediately(e),e))}removeChildImmediately(e){if(e.parentNode!==this)throw D(\"The node is not a child of this node\",\"NotFoundError\");let n=this[G]?Tt(e):void 0,r=e[L],o=e[v],s=rn(this,e);if(n)for(let i of n)i[G]=!1;this.queueRemovalMutationRecord(this,e,r,o),n&&this.enqueueTreeReactions(n,\"disconnectedCallback\"),Ce(this.collectRemovalHookEffects(e,s))}replaceChild(e,n){return F(()=>this[Qt](e,n))}[Qt](e,n,r){if(me(this,[e]),n.parentNode!==this)throw D(\"The reference node is not a child of this parent\",\"NotFoundError\");let o=n[L],s=n[v],i=this.prepareInsertion(e),l=this[G]?Tt(n):void 0,c=new Set(i.map(({node:f})=>f)),d=s;for(;d&&c.has(d);)d=d[v];let g=rn(this,n);if(l){for(let b of l)b[G]=!1;let f=new Set(l);for(let b of i)f.has(b.node)&&(b.shouldDisconnect=!1)}this.commitInsertion(i,d);let w=this[G];return this.queueRemovalMutationRecord(this,n,o,s),this.queueInsertionMutationRecords(i),l&&this.enqueueTreeReactions(l,\"disconnectedCallback\"),this.enqueueInsertionReactions(i,w),this.performOrCollectHookEffects([...this.collectRemovalHookEffects(n,g),...this.collectInsertionHookEffects(i)],r),n}querySelectorAll(e){return Yt(this,e)}querySelector(e){return Bt(this,e)}[re](e,n,r){return this.validateInsertion(e,n),this.insertIntoValidated(e,n,r),e}[nr](e){for(let n of e)this.validateInsertion(n,null),this.prepareInsertion(n)}validateInsertion(e,n){if(me(this,[e]),n&&n.parentNode!==this)throw D(\"The reference node is not a child of this parent\",\"NotFoundError\")}insertIntoValidated(e,n,r){e===n&&(n=e[v]);let o=this.prepareInsertion(e);this.commitInsertion(o,n);let s=this[G];this.queueInsertionMutationRecords(o),this.enqueueInsertionReactions(o,s),this.performOrCollectHookEffects(this.collectInsertionHookEffects(o),r)}performOrCollectHookEffects(e,n){n?n.push(...e):Ce(e)}prepareInsertion(e){let n=[];if(e.nodeType===we){let i=e[C];for(;i;)n.push(i),i=i[v]}else n.push(e);let r=this[G],o=this[M],s=[];for(let i of n){let l=i[G],c=l||r,d,g;if(i[M]===o)c&&(d=Tt(i));else{let w=qt(i);g=w.nodes,c&&(d=w.treeNodes)}s.push({node:i,nodes:d,adoption:g,shouldDisconnect:l})}return s}commitInsertion(e,n){for(let s of e){let i=s.node[X];if(i){let l=s.node[L],c=s.node[v];s.source={parent:i,index:rn(i,s.node),previousSibling:l,nextSibling:c}}}for(let s of e){let i=this.attachChild(s.node,n);s.insertIndex=i.index,s.previousSibling=i.previousSibling,s.nextSibling=i.nextSibling}let r=this[M];for(let{adoption:s}of e)s&&wt(s,r);let o=this[G];for(let{nodes:s}of e)if(s)for(let i of s)i[G]=o}attachChild(e,n){if(n){let s=n[L];e[v]=n,e[L]=s,s?s[v]=e:this[C]=e,n[L]=e}else{e[v]=null;let s=this[C];if(s){let i;for(;i=s[v];)s=i;s[v]=e,e[L]=s}else this[C]=e,e[L]=null}let r=q(e);e[X]=this;let o;if(n){if(o=this.childNodes.indexOf(n),this.childNodes.splice(o,0,e),r){let s=n;for(;s&&!q(s);)s=s[v];s?this.children.splice(this.children.indexOf(s),0,e):this.children.push(e)}}else o=this.childNodes.length,this.childNodes.push(e),r&&this.children.push(e);return{index:o,previousSibling:e[L],nextSibling:e[v]}}queueRemovalMutationRecord(e,n,r,o){vt&&oe({type:\"childList\",target:e,removedNodes:nn(n),previousSibling:r,nextSibling:o})}queueInsertionMutationRecords(e){if(vt)for(let n of e){let{node:r,source:o}=n;o&&this.queueRemovalMutationRecord(o.parent,r,o.previousSibling,o.nextSibling),oe({type:\"childList\",target:this,addedNodes:nn(r),previousSibling:n.previousSibling,nextSibling:n.nextSibling})}}collectRemovalHookEffects(e,n){return this.nodeType!==Z||pt(this)?[]:[[()=>this[H].removeChild?.(this,e,n)]]}collectInsertionHookEffects(e){let n=[];for(let r of e){let{node:o,source:s}=r;s?.parent.nodeType===Z&&!pt(s.parent)&&n.push([()=>s.parent[H].removeChild?.(s.parent,o,s.index)]),this.nodeType===Z&&!pt(this)&&n.push([()=>this[H].insertChild?.(this,o,r.insertIndex),o])}return n}enqueueInsertionReactions(e,n){for(let r of e){let{nodes:o}=r;o&&(r.shouldDisconnect&&this.enqueueTreeReactions(o,\"disconnectedCallback\"),n&&this.enqueueTreeReactions(o,\"connectedCallback\"))}}enqueueTreeReactions(e,n){co(e,n)}};function lo(t,e,n,r){if(e.parentNode!==t)throw Error(\"not a child of this node\");let o=t[G]?n.treeNodes:void 0,s=e[L],i=e[v],l=rn(t,e);if(o)for(let d of o)d[G]=!1;wt(n.nodes,r),vt&&oe({type:\"childList\",target:t,removedNodes:nn(e),previousSibling:s,nextSibling:i}),o&&co(o,\"disconnectedCallback\");let c=[];t.nodeType===Z&&!pt(t)&&c.push([()=>t[H].removeChild?.(t,e,l)]),Ce(c)}function rn(t,e){let n=e[L],r=e[v];n?n[v]=r:t[C]=r,r&&(r[L]=n);let o=t.childNodes.indexOf(e);return t.childNodes.splice(o,1),q(e)&&t.children.splice(t.children.indexOf(e),1),e[X]=null,e[v]=null,e[L]=null,o}function co(t,e){for(let n of t){let r=n[e];typeof r==\"function\"&&$t(n,()=>r.call(n))}}function St(t,e,n,r,o){let{observedAttributes:s}=t.constructor,{attributeChangedCallback:i}=t;i==null||s==null||!s.includes(e)||$t(t,()=>i.call(t,e,n,r,o))}var on=class{[C]=null;constructor(e){this[W]=e}getNamedItem(e){let n=String(e),r=this[W][k]===I?V(n):n,o=this[C];for(;o;){if(o.name===r)return o;o=o[v]}return null}getNamedItemNS(e,n){let r=fe(e),o=String(n),s=this[C];for(;s;){if(s.localName===o&&s[k]===r)return s;s=s[v]}return null}item(e){let n=this[C],r=0;for(;n;){if(r++===e)return n;n=n[v]}return null}get length(){let e=0,n=this[C];for(;n;)e++,n=n[v];return e}removeNamedItem(e){let n=String(e),r=this[W][k]===I?V(n):n;return F(()=>this.removeNamedItemImmediately(o=>o.name===r))}removeNamedItemNS(e,n){let r=fe(e),o=String(n);return F(()=>this.removeNamedItemImmediately(s=>s.localName===o&&s[k]===r))}removeNamedItemImmediately(e){let n=this[W],r=this[C],o=null;for(;r!=null;){if(e(r)){o&&(o[v]=r[v]),this[C]===r&&(this[C]=r[v]);let s=r.value;return r[v]=null,r[W]=null,Ye&&oe({type:\"attributes\",target:n,attributeName:r.name,attributeNamespace:r[k],oldValue:s}),n[H].removeAttribute?.(n,r.name,r[k]),St(n,r.localName,s,null,r[k]),r}o=r,r=r[v]}return null}setNamedItem(e){return F(()=>this.setNamedItemImmediately(e))}setNamedItemImmediately(e){let n=this[W],r=e[W];if(r!=null&&r!==n)throw D(\"The attribute is already in use by another element.\",\"InUseAttributeError\");let o=null,s=this[C],i=null;for(;s;){if(s.localName===e.localName&&s[k]===e[k]){if(s===e)return s;i?i[v]=e:this[C]=e,e[v]=s[v],s[v]=null,o=s;break}i=s,s=s[v]}o==null&&(i?i[v]=e:this[C]=e),e[W]=n,e[M]=n[M],o&&(o[W]=null);let l=o==null||o.value!==e.value,c=o!=null&&o.name!==e.name;return l&&Ye&&oe({type:\"attributes\",target:n,attributeName:e.name,attributeNamespace:e[k],oldValue:o?.value??null}),c&&n[H].removeAttribute?.(n,o.name,o[k]),(l||c)&&n[H].setAttribute?.(n,e.name,e.value,e[k]),l&&St(n,e.localName,o?.value??null,e.value,e[k]),o}setNamedItemNS(e){return this.setNamedItem(e)}*[Symbol.iterator](){let e=this[C];for(;e;)yield e,e=e[v]}};var _e=class extends ne{nodeType=ze;[k]=null;[v]=null;[W]=null;constructor(e,n,r){super(),this[A]=e,this[Ee]=n,r&&(this[k]=r)}get nodeName(){return this[A]}set nodeName(e){}get name(){return this[A]}set name(e){}get localName(){if(this[k]==null)return this[A];let e=this[A].indexOf(\":\");return e<0?this[A]:this[A].slice(e+1)}get prefix(){if(this[k]==null)return null;let e=this[A].indexOf(\":\");return e<0?null:this[A].slice(0,e)}get value(){return this[Ee]}set value(e){let n=String(e),r=this[W];if(!r){this[Ee]=n;return}F(()=>{let o=this[Ee];this[Ee]=n,Ye&&o!==n&&oe({type:\"attributes\",target:r,attributeName:this[A],attributeNamespace:this[k],oldValue:o}),this[H].setAttribute?.(r,this[A],n,this[k]),St(r,this.localName,o,n,this[k])})}get nodeValue(){return this.value}set nodeValue(e){this.value=e}get ownerElement(){return this[W]}get namespaceURI(){return this[k]}get specified(){return!0}};var Gs={amp:\"&\",AMP:\"&\",apos:\"'\",gt:\">\",GT:\">\",lt:\"<\",LT:\"<\",quot:'\"',QUOT:'\"'},zs=new Set([\"area\",\"base\",\"br\",\"col\",\"embed\",\"hr\",\"img\",\"input\",\"link\",\"meta\",\"param\",\"source\",\"track\",\"wbr\"]),Fs=/(?:<([a-z][a-z0-9-:]*)((?:[\\s]+[^<>'\"=/\\s]+(?:=(['\"])[^]*?\\3|=[^>'\"\\s]*|))*)[\\s]*(\\/?)\\s*>|<\\/([a-z][a-z0-9-:]*)>|<!--(.*?)-->|([^<>]+))/gi,mo=/\\s([^<>'\"=/\\n\\s]+)(?:=([\"'])([\\s\\S]*?)\\2|=([^>'\"\\n\\s]*)|)/g,Bs=\"|b|big|blockquote|body|br|center|code|dd|div|dl|dt|em|embed|h1|h2|h3|h4|h5|h6|head|hr|i|img|li|listing|menu|meta|nobr|ol|p|pre|ruby|s|small|span|strong|strike|sub|sup|table|tt|u|ul|var|\",Ys=/^(?:color|face|size)$/i;function uo(t){return t.replace(/&(?:(amp|AMP|apos|gt|GT|lt|LT|quot|QUOT)|#(\\d+)|#[xX]([\\da-fA-F]+));/g,(e,n,r,o)=>{if(n)return Gs[n];let s=Number.parseInt(r??o,r?10:16);try{return String.fromCodePoint(s)}catch{return e}})}function po(t){return t.namespaceURI===I&&zs.has(t.localName)}function fo(t){let e=t.localName;return t[k]===ee&&(e===\"foreignObject\"||e===\"desc\"||e===\"title\")}function qs(t,e){if(Bs.includes(`|${t}|`))return!0;if(t!==\"font\")return!1;for(let n of e.matchAll(mo))if(Ys.test(n[1]))return!0;return!1}function sn(t,e){let n=e.ownerDocument,r=n.createDocumentFragment(),o=[],s=r;for(let i of t.matchAll(Fs)){let l=i[1];if(l){let c=i[2],d=V(l),g=o[o.length-1]?.element??e,w=g[k]===ee?ee:I;if(d===\"svg\")w=ee;else if(w===ee){if(fo(g))w=I;else if(qs(d,c)){for(;o.length>0;){let T=o[o.length-1];if(T.element[k]!==ee||fo(T.element))break;o.pop(),s=T.target}w=I}}let f=w===I?d:l,b=n[Ge](f,w,null,f);for(let T of c.matchAll(mo))b.setAttribute(T[1],uo(T[3]||T[4]||\"\"));if(s.append(b),po(b)||w!==I&&i[4])continue;o.push({element:b,target:s}),s=w===I&&d===\"template\"?b.content:b}else if(i[5]){let c=V(i[5]);for(let d=o.length-1;d>=0;d--){let g=o[d],w=V(g.element[A]);if(w===c){s=g.target,o.length=d;break}if(g.element[k]===I&&w===\"template\")break}}else i[6]?s.append(n.createComment(i[6])):s.append(uo(i[7]))}return r}function an(t){return go([{type:\"content\",child:t[C]}])}function ho(t){return go([{type:\"opening\",node:t}])}function go(t){let e=[],n;for(;n=t.pop();)switch(n.type){case\"opening\":{let r=n.node;switch(r.nodeType){case Z:{let o=r;e.push(`<${o[A]}`);let s=o[ae]?.[C];for(;s;){e.push(` ${s[A]}`);let l=s[Ee];l!==\"\"&&(l=String(l).replace(/&/g,\"&amp;\").replace(/\"/g,\"&quot;\"),e.push(`=\"${l}\"`)),s=s[v]}if(e.push(\">\"),po(o))break;let i=o.namespaceURI===I&&o.localName===\"template\"?o[de]:o;t.push({type:\"closing\",name:o[A]}),t.push({type:\"content\",child:i?.[C]??null});break}case Fe:{let o=r;e.push(o[Q].replace(/&/g,\"&amp;\").replace(/\"/g,\"&quot;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\"));break}case Be:{let o=r;e.push(`<!--${o[Q]}-->`);break}}break}case\"content\":{let r=n.child;r&&(t.push({type:\"content\",child:r[v]}),t.push({type:\"opening\",node:r}));break}case\"closing\":e.push(`</${n.name}>`);break}return e.join(\"\")}var U=class extends le{nodeType=Z;[k]=I;[be]=null;get namespaceURI(){return this[k]}get prefix(){return this[be]}get localName(){let e=this[be];return e==null?this[A]:this[A].slice(e.length+1)}get nodeName(){return this[k]===I?zr(this[A]):this[A]}get tagName(){return this.nodeName}get id(){return this.getAttributeNS(null,\"id\")??\"\"}set id(e){this.setAttribute(\"id\",String(e))}get slot(){return this.getAttributeNS(null,\"slot\")??\"\"}set slot(e){let n=String(e);this.getAttributeNS(null,\"slot\")!==n&&this.attributes.setNamedItem(new _e(\"slot\",n))}get attributes(){let e=this[ae];return e||(e=new on(this),this[ae]=e),e}getAttributeNames(){return[...this.attributes].map(e=>e.name)}getElementsByTagName(e){return Zt(this,e)}get firstElementChild(){return this.children[0]??null}getElementsByClassName(e){return Kt(this,e)}get lastElementChild(){return this.children[this.children.length-1]??null}get nextElementSibling(){let e=this.nextSibling;for(;e&&e.nodeType!==1;)e=e.nextSibling;return e}get previousElementSibling(){let e=this.previousSibling;for(;e&&e.nodeType!==1;)e=e.previousSibling;return e}setAttribute(e,n){let r=String(e),o=String(n);jn(r);let s=this[k]===I?V(r):r,i=this.attributes.getNamedItemNS(null,s);i?i.value=o:this.attributes.setNamedItem(new _e(s,o))}setAttributeNS(e,n,r){let o=fe(e),s=String(n),i=String(r),l=Dt(o,s,\"attribute\"),c=this.attributes.getNamedItemNS(l.namespace,l.localName);c?c.value=i:this.attributes.setNamedItemNS(new _e(l.qualifiedName,i,l.namespace))}toggleAttribute(e,n){let r=String(e);jn(r);let o=this[k]===I?V(r):r,s=this.attributes.getNamedItemNS(null,o),i=n===void 0?void 0:!!n;return s==null?i===!1?!1:(this.attributes.setNamedItem(new _e(o,\"\")),!0):i===!0?!0:(this.attributes.removeNamedItemNS(null,o),!1)}getAttribute(e){let n=this.attributes.getNamedItem(e);return n&&n.value}getAttributeNS(e,n){let r=this.attributes.getNamedItemNS(e,n);return r&&r.value}hasAttribute(e){return this.attributes.getNamedItem(e)!=null}hasAttributeNS(e,n){return this.attributes.getNamedItemNS(e,n)!=null}removeAttribute(e){let n=String(e),r=this[k]===I?V(n):n;this.attributes.removeNamedItemNS(null,r)}removeAttributeNS(e,n){this.attributes.removeNamedItemNS(e,n)}get outerHTML(){return ho(this)}get innerHTML(){return an(this)}set innerHTML(e){if(e==null||e===\"\")this.replaceChildren();else{let n=sn(String(e),this);this.replaceChildren(n)}}};var qe=class t extends U{[k]=ee;get ownerSVGElement(){let e=null,n=this.parentNode;for(;n instanceof t;)e=n,n=n.parentNode;return e}};var ve=class extends xe{[Q]=\"\";constructor(e){super(),this[Q]=e==null?\"\":String(e)}setData(e){let n=sr,r=n?this[Q]:null,o=\"\";e!=null&&(o=typeof e==\"string\"?e:String(e)),this[Q]=o,n&&r!==o&&oe({type:\"characterData\",target:this,oldValue:r}),this[H].setText?.(this,o)}get data(){return this[Q]}set data(e){this.setData(e)}};var We=class extends ve{nodeType=Fe;[A]=\"#text\"};var Xe=class extends ve{nodeType=Be;[A]=\"#comment\"};var Ke=class extends le{nodeType=we;[A]=\"#document-fragment\";[M]=typeof window<\"u\"?window.document:null;getElementById(e){return Xt(this,e)}};var Ze=class extends U{get content(){let e=this[de];return e||(e=this.ownerDocument.createDocumentFragment(),e[Ne]=this,this[de]=e),e}set content(e){}set innerHTML(e){this.content.replaceChildren(sn(String(e),this))}get innerHTML(){let e=this[de];return e?an(e):\"\"}};var ln=class extends U{};var cn=class extends U{};var un=class extends U{};var Ot=class extends le{nodeType=ke;[A]=\"#document\";[G]=!0;constructor(e){super(),this.defaultView=e,this[M]=this,this.documentElement=fn(new un,this,\"html\"),this.body=fn(new ln,this,\"body\"),this.head=fn(new cn,this,\"head\"),this.appendChild(this.documentElement),this.documentElement.appendChild(this.head),this.documentElement.appendChild(this.body)}get textContent(){return null}set textContent(e){}getElementsByClassName(e){return Kt(this,e)}createElement(e){let n=String(e);return Yr(n),ir(this,V(n))}createElementNS(e,n){let r=Dt(e,n,\"element\");return ir(this,r.qualifiedName,r.namespace,r.prefix,r.localName)}[Ge](e,n,r,o){return ir(this,e,n,r,o)}createTextNode(e){let n=dn(new We(e),this);return this[H].createText?.(n,n.data),n}createComment(e){return dn(new Xe(e),this)}createDocumentFragment(){return dn(new Ke,this)}createEvent(){return new z(\"\")}getElementById(e){return Xt(this,e)}getElementsByTagName(e){return Zt(this,e)}importNode(e,n){if(e.nodeType===ke)throw D(\"Cannot import a document node\",\"NotSupportedError\");return Wt(e,n,this)}adoptNode(e){if(e[M]===this)return e;let n=qt(e);return F(()=>{let r=e.parentNode;return r?lo(r,e,n,this):wt(n.nodes,this),e})}};function dn(t,e){return Object.defineProperty(t,M,{value:e,writable:!0,enumerable:!1}),t}function ir(t,e,n=I,r=null,o=e){let s;if(n===ee)s=new qe;else if(n===I&&o===\"template\")s=new Ze;else if(n===I){let i=t.defaultView.customElements.get(o);s=i?new i:new U}else s=new U;return fn(s,t,e,n,r)}function fn(t,e,n,r=I,o=null){return dn(t,e),Object.defineProperties(t,{[A]:{value:n},[k]:{value:r},[be]:{value:o}}),e[H].createElement?.(t,r),t}var mn=class extends z{constructor(e,n){super(e,n),this.detail=n?.detail??null}initCustomEvent(e,n,r,o){super.initEvent(e,n,r),this.detail=o??null}};var pn=class extends z{constructor(e,n){super(e,n),this.message=n.message,this.filename=n.filename,this.lineno=n.lineno,this.colno=n.colno,this.error=n.error}};var hn=class extends z{constructor(e,n){super(e,n),this.promise=n.promise,this.reason=n.reason}};var gn=class extends z{constructor(e,n){super(e,n),this.oldState=n.oldState,this.newState=n.newState}};var yn=class extends z{constructor(e,n={}){super(e,n),this.relatedTarget=n.relatedTarget??null}};var bn=class extends z{constructor(e,n={}){super(e,n),this.clipboardData=n.clipboardData??null}};var En=class extends U{};var Ws=/^[a-z][^A-Z\\u0000\\t\\n\\f\\r />]*-[^A-Z\\u0000\\t\\n\\f\\r />]*$/u,Xs=new Set([\"annotation-xml\",\"color-profile\",\"font-face\",\"font-face-src\",\"font-face-uri\",\"font-face-format\",\"font-face-name\",\"missing-glyph\"]);function yo(t){return Ws.test(t)&&!Xs.has(t)}function bo(t){return D(`Invalid custom element name: \"${t}\"`,\"SyntaxError\")}var Nn=class{registry=new Map;listenersByName=new Map;define(e,n,r){if(!yo(e))throw bo(e);if(this.registry.has(e))throw D(`A custom element named \"${e}\" has already been defined`,\"NotSupportedError\");if(this.getName(n)!=null)throw D(\"This constructor has already been registered in this custom element registry\",\"NotSupportedError\");this.registry.set(e,n);let o=this.listenersByName.get(e);if(o!=null){this.listenersByName.delete(e);for(let s of o)s(n)}}get(e){return this.registry.get(e)}getName(e){for(let[n,r]of this.registry)if(r===e)return n;return null}whenDefined(e){if(!yo(e))return Promise.reject(bo(e));let n=this.registry.get(e);if(n!=null)return Promise.resolve(n);let r=this.listenersByName.get(e);return r==null&&(r=[],this.listenersByName.set(e,r)),new Promise(o=>{r.push(o)})}upgrade(e){}initialize(e){}};var Ks=[\"onerror\",\"onunhandledrejection\"],No=Symbol.for(\"@remote-dom/polyfill/global-property\");function wo(t){return Object.getOwnPropertyDescriptors(t)}function To(t){let e={};for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors(Te.prototype)))n!==\"constructor\"&&typeof r.value==\"function\"&&(r.value=ar(r.value.bind(t)),e[n]=r);return e}function xo(t){let e={};for(let n of Ks)e[n]={configurable:!0,enumerable:!0,get:ar(()=>t[n]),set:ar(r=>{t[n]=r})};return e}function Zs(t){return Object.assign(wo(t),To(t),xo(t))}function ar(t){return Object.defineProperty(t,No,{value:!0}),t}function Eo(t,e){for(let n of Reflect.ownKeys(e)){let r=Js(t,n);(r==null||Qs(r))&&Object.defineProperty(t,n,e[n])}}function Js(t,e){let n=t;for(;n;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function Qs(t){return[t.value,t.get,t.set].some(e=>typeof e==\"function\"&&e[No]===!0)}var Ie=class extends Te{[H]={};[_t]=[];[Ae]=ti(this);name=\"\";window=this;parent=this;self=this;top=this;document=new Ot(this);customElements=new Nn;location=globalThis.location;navigator=globalThis.navigator;Event=z;ErrorEvent=pn;PromiseRejectionEvent=hn;ToggleEvent=gn;FocusEvent=yn;ClipboardEvent=bn;EventTarget=Te;CustomEvent=mn;Node=ne;ParentNode=le;ChildNode=xe;DocumentFragment=Ke;Document=Ot;CharacterData=ve;Comment=Xe;Text=We;Element=U;HTMLElement=En;SVGElement=qe;HTMLTemplateElement=Ze;MutationObserver=tn;#t=null;#n=null;#e=null;static with(...e){let n=this;return class extends n{constructor(){super();for(let o of e)ei(this,o)}}}get onerror(){return this.#n}set onerror(e){this.#t&&this.removeEventListener(\"error\",this.#t),e&&typeof e==\"function\"?(this.#n=e,this.#t=n=>{e(n.message??\"Error\",n.filename,n.lineno,n.colno,n.error)},this.addEventListener(\"error\",this.#t)):(this.#t=null,this.#n=null)}get onunhandledrejection(){return this.#e}set onunhandledrejection(e){this.#e&&this.removeEventListener(\"unhandledrejection\",this.#e),e&&typeof e==\"function\"?(this.#e=e,this.addEventListener(\"unhandledrejection\",this.#e)):this.#e=null}static setGlobal(e){let n=globalThis.self,r=globalThis.window,o=wo(e),s=Object.assign(To(e),xo(e));delete o.self,Object.defineProperties(globalThis,o),Eo(globalThis,s),typeof n>\"u\"||n===r&&n!==globalThis?Object.defineProperty(globalThis,\"self\",{value:e,configurable:!0,writable:!0,enumerable:!0}):n!==globalThis&&(Object.defineProperties(n,o),Eo(n,s))}static setGlobalThis(e){for(let n in e)e[n]===e&&(e[n]=globalThis);Object.defineProperties(globalThis,Zs(e))}};function ei(t,e){t[_t].push(e(t)??{})}function ti(t){return{createElement:pe.bind(null,t,\"createElement\"),setAttribute:pe.bind(null,t,\"setAttribute\"),removeAttribute:pe.bind(null,t,\"removeAttribute\"),createText:pe.bind(null,t,\"createText\"),setText:pe.bind(null,t,\"setText\"),insertChild:pe.bind(null,t,\"insertChild\"),removeChild:pe.bind(null,t,\"removeChild\"),addEventListener:pe.bind(null,t,\"addEventListener\"),removeEventListener:pe.bind(null,t,\"removeEventListener\")}}function pe(t,e,...n){for(let s of t[_t])s[e]?.apply(s,n);let r=t[H];r[e]?.apply(r,n)}var wn=new Ie;var lr=\"~\";var Se=new WeakMap;function Je(t){return Se.get(t)}var fr=new WeakMap,ri=0;function se(t){let e=fr.get(t);return e==null&&(e=String(ri++),Tn(t,e)),e}function Tn(t,e){fr.set(t,e)}var ur=new WeakMap;function oi(t){return ur.get(t)}var dr=new WeakMap;function si(t){let e=dr.get(t);if(e!=null)return e;if(!(!(t instanceof Element)||t.tagName.includes(\"-\"))){e={};for(let{name:n,value:r}of t.attributes)e[n]=r;return e}}var ii=new WeakMap;function ai(t){return ii.get(t)}function mr(t,e,n){let r=ur.get(t);if(r==null&&(r={},ur.set(t,r)),r[e]===n)return;r[e]=n;let o=Se.get(t);o?.mutate([[3,se(t),e,n,1]])}function Oe(t,e,n){let r=dr.get(t);if(r==null&&(r={},dr.set(t,r)),r[e]===n)return;n==null?delete r[e]:r[e]=String(n);let o=Se.get(t);o?.mutate([[3,se(t),e,n,2]])}function Qe(t,e){if(Se.get(t)!==e&&(Se.set(t,e),t.childNodes))for(let r=0;r<t.childNodes.length;r++)Qe(t.childNodes[r],e)}function xn(t){if(Se.get(t)!=null&&(Se.delete(t),t.childNodes))for(let n=0;n<t.childNodes.length;n++)xn(t.childNodes[n])}function et(t){let{nodeType:e}=t;switch(e){case 1:return{id:se(t),type:e,element:t.localName,properties:cr(oi(t)),attributes:cr(si(t)),eventListeners:cr(ai(t)),children:Array.from(t.childNodes).map(et)};case 3:case 8:return{id:se(t),type:e,data:t.data};default:throw new Error(`Cannot serialize node of type ${t.nodeType} (${typeof t.nodeType})`)}}function cr(t){return t?{...t}:void 0}function pr(t,e,...n){let r=fr.get(t),o=Se.get(t);if(r==null||o==null)throw new Error(`Cannot call method ${e} on an unconnected node`);return o.call(r,e,...n)}var tt=wn[H];tt.insertChild=(t,e,n)=>{let r=Je(t);r!=null&&(Qe(e,r),r.mutate([[0,se(t),et(e),n]]))};tt.removeChild=(t,e,n)=>{let r=Je(t);r!=null&&(xn(e),r.mutate([[1,se(t),n]]))};tt.setText=(t,e)=>{let n=Je(t);n?.mutate([[2,se(t),e]])};tt.setAttribute=(t,e,n)=>{t.tagName.includes(\"-\")||Oe(t,e,n)};tt.removeAttribute=(t,e)=>{t.tagName.includes(\"-\")||Oe(t,e)};Ie.setGlobal(wn);var Oo=[\"globalThis\",\"Infinity\",\"NaN\",\"undefined\",\"isFinite\",\"isNaN\",\"parseFloat\",\"parseInt\",\"decodeURI\",\"decodeURIComponent\",\"encodeURI\",\"encodeURIComponent\",\"escape\",\"unescape\",\"Object\",\"Function\",\"Array\",\"Number\",\"Boolean\",\"String\",\"Symbol\",\"BigInt\",\"Date\",\"Promise\",\"RegExp\",\"Math\",\"JSON\",\"Reflect\",\"Proxy\",\"Intl\",\"Error\",\"AggregateError\",\"EvalError\",\"RangeError\",\"ReferenceError\",\"SyntaxError\",\"TypeError\",\"URIError\",\"SuppressedError\",\"Map\",\"Set\",\"WeakMap\",\"WeakSet\",\"WeakRef\",\"FinalizationRegistry\",\"Iterator\",\"AsyncIterator\",\"DisposableStack\",\"AsyncDisposableStack\",\"ArrayBuffer\",\"SharedArrayBuffer\",\"DataView\",\"Atomics\",\"Int8Array\",\"Uint8Array\",\"Uint8ClampedArray\",\"Int16Array\",\"Uint16Array\",\"Int32Array\",\"Uint32Array\",\"Float16Array\",\"Float32Array\",\"Float64Array\",\"BigInt64Array\",\"BigUint64Array\"],Ro=[\"window\",\"parent\",\"top\",\"document\",\"customElements\",\"Event\",\"ErrorEvent\",\"PromiseRejectionEvent\",\"ToggleEvent\",\"FocusEvent\",\"ClipboardEvent\",\"CustomEvent\",\"EventTarget\",\"Node\",\"ParentNode\",\"ChildNode\",\"DocumentFragment\",\"Document\",\"CharacterData\",\"Comment\",\"Text\",\"Element\",\"HTMLElement\",\"SVGElement\",\"HTMLTemplateElement\",\"MutationObserver\"],Ao=[\"self\",\"postMessage\",\"setTimeout\",\"clearTimeout\",\"setInterval\",\"clearInterval\",\"queueMicrotask\",\"structuredClone\",\"crypto\",\"console\",\"DOMException\"],ko=[\"TEMPORARY\",\"PERSISTENT\"],gu=Object.freeze([...Oo,...Ro,...Ao,...ko]),yu=Object.freeze([\"constructor\",\"__defineGetter__\",\"__defineSetter__\",\"hasOwnProperty\",\"__lookupGetter__\",\"__lookupSetter__\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toString\",\"valueOf\",\"__proto__\",\"toLocaleString\"]),So=t=>typeof t==\"symbol\"?`[${t.description??\"symbol\"}]`:t;function Co(t=globalThis,e=[],n={}){let r=[],o=[],s=new Set([...Oo,...Ro,...Ao,...e,\"constructor\",Symbol.toStringTag]),i=(p,m)=>{let E=Reflect.getOwnPropertyDescriptor(p,m);return E===void 0||!(\"value\"in E)||E.writable||E.configurable?!1:n.primitivesStay&&typeof m==\"symbol\"&&(typeof E.value!=\"object\"||E.value===null)&&typeof E.value!=\"function\"?!0:ko.includes(m)&&typeof E.value==\"number\"},l=t,c=l.setTimeout,d=l.setInterval,g=l.crypto,w=(p,m)=>function(E,u,...N){if(typeof E!=\"function\")throw new TypeError(`${m} takes a function: a guest view cannot run code from text`);return p.call(t,E,u,...N)},f=g?Object.freeze({getRandomValues:p=>g.getRandomValues(p)}):void 0,b=l.document?.defaultView;if(b&&b!==l)for(let p of Reflect.ownKeys(b))typeof p==\"symbol\"||s.has(p)||Reflect.deleteProperty(b,p)||o.push(`window.${p}`);let T=[];for(let p=t;p&&p!==Object.prototype;p=Object.getPrototypeOf(p))T.push(p);for(let p of T)for(let m of Reflect.ownKeys(p))s.has(m)||(Reflect.deleteProperty(p,m)?r.push(So(m)):i(p,m)||o.push(So(m)));let S=()=>function(){throw new EvalError(\"A guest view cannot make code from text.\")},y=[Function.prototype,Object.getPrototypeOf(async function(){}),Object.getPrototypeOf(function*(){}),Object.getPrototypeOf(async function*(){})];for(let p of y){let m=S();Object.defineProperty(m,\"prototype\",{value:p,writable:!1,enumerable:!1,configurable:!1}),Reflect.defineProperty(p,\"constructor\",{value:m,writable:!1,enumerable:!1,configurable:!1})||o.push(\"Function.prototype.constructor\"),p===Function.prototype&&Reflect.defineProperty(t,\"Function\",{value:m,writable:!0,enumerable:!1,configurable:!0})}let a=(p,m)=>{Reflect.defineProperty(t,p,{value:m,writable:!0,enumerable:!0,configurable:!0})||o.push(p)};a(\"setTimeout\",w(c,\"setTimeout\")),a(\"setInterval\",w(d,\"setInterval\")),f&&a(\"crypto\",f);for(let p of T.slice(1))Object.freeze(p);for(let p of Reflect.ownKeys(t)){let m=Reflect.getOwnPropertyDescriptor(t,p);Reflect.defineProperty(t,p,\"value\"in m?{...m,writable:!1,configurable:!1}:{...m,configurable:!1})}let h;try{h=Reflect.preventExtensions(t)}catch{h=!1}return{removed:r,stuck:o,sealed:h}}var Rt=class extends HTMLElement{constructor(){super(),Tn(this,lr)}connect(e){if(Je(this)===e||(Qe(this,e),this.childNodes.length===0))return;let n=[];for(let r=0;r<this.childNodes.length;r++){let o=this.childNodes[r];n.push([0,lr,et(o),r])}e.mutate(n)}updateRemoteProperty(e,n){mr(this,e,n)}callRemoteMethod(e,...n){return pr(this,e,...n)}};var x={},vn={empty:!0},li={id:\"text\",class:\"text\",title:\"text\",lang:\"text\",dir:{oneOf:[\"ltr\",\"rtl\",\"auto\"]},hidden:\"text\",tabindex:{oneOf:[\"-1\",\"0\"]},role:\"text\",style:\"style\",translate:{oneOf:[\"yes\",\"no\"]},spellcheck:{oneOf:[\"true\",\"false\"]},draggable:{oneOf:[\"true\",\"false\"]},inert:\"boolean\"},rt={div:x,section:x,article:x,aside:x,header:x,footer:x,nav:x,hgroup:x,search:x,address:x,figure:x,figcaption:x,blockquote:x,p:x,pre:x,hr:vn,br:vn,wbr:vn,h1:x,h2:x,h3:x,h4:x,h5:x,h6:x,span:x,strong:x,em:x,b:x,i:x,u:x,s:x,small:x,mark:x,abbr:x,cite:x,q:x,code:x,kbd:x,samp:x,var:x,sub:x,sup:x,dfn:x,bdi:x,bdo:x,ruby:x,rt:x,rp:x,time:{attributes:{datetime:\"text\"}},data:{attributes:{value:\"text\"}},del:{attributes:{datetime:\"text\"}},ins:{attributes:{datetime:\"text\"}},a:x,ul:x,menu:x,dl:x,dt:x,dd:x,ol:{attributes:{start:\"number\",reversed:\"boolean\",type:{oneOf:[\"1\",\"a\",\"A\",\"i\",\"I\"]}}},li:{attributes:{value:\"number\"}},table:x,caption:x,thead:x,tbody:x,tfoot:x,tr:x,colgroup:{attributes:{span:\"number\"}},col:{attributes:{span:\"number\"},empty:!0},th:{attributes:{colspan:\"number\",rowspan:\"number\",headers:\"text\",scope:{oneOf:[\"row\",\"col\",\"rowgroup\",\"colgroup\"]},abbr:\"text\"}},td:{attributes:{colspan:\"number\",rowspan:\"number\",headers:\"text\"}},details:{attributes:{open:\"boolean\",name:\"text\"}},summary:x,button:{attributes:{type:{oneOf:[\"button\"]},disabled:\"boolean\",name:\"text\",value:\"text\"}},input:{empty:!0,attributes:{type:{oneOf:[\"text\",\"search\",\"number\",\"range\",\"checkbox\",\"radio\",\"date\",\"time\",\"datetime-local\",\"month\",\"week\",\"color\",\"email\",\"tel\",\"url\"]},name:\"text\",value:\"text\",placeholder:\"text\",min:\"text\",max:\"text\",step:\"text\",checked:\"boolean\",disabled:\"boolean\",readonly:\"boolean\",required:\"boolean\",maxlength:\"number\",minlength:\"number\",size:\"number\",pattern:\"text\",multiple:\"boolean\",inputmode:\"text\",enterkeyhint:\"text\"}},select:{attributes:{name:\"text\",disabled:\"boolean\",multiple:\"boolean\",required:\"boolean\",size:\"number\"}},option:{attributes:{value:\"text\",selected:\"boolean\",disabled:\"boolean\",label:\"text\"}},optgroup:{attributes:{label:\"text\",disabled:\"boolean\"}},textarea:{attributes:{name:\"text\",placeholder:\"text\",rows:\"number\",cols:\"number\",disabled:\"boolean\",readonly:\"boolean\",required:\"boolean\",maxlength:\"number\",minlength:\"number\",wrap:{oneOf:[\"soft\",\"hard\",\"off\"]}}},label:{attributes:{for:\"text\"}},fieldset:{attributes:{disabled:\"boolean\",name:\"text\"}},legend:x,output:x,meter:{attributes:{value:\"number\",min:\"number\",max:\"number\",low:\"number\",high:\"number\",optimum:\"number\"}},progress:{attributes:{value:\"number\",max:\"number\"}},img:{empty:!0,attributes:{src:\"image\",alt:\"text\",width:\"number\",height:\"number\",decoding:{oneOf:[\"async\",\"sync\",\"auto\"]}}},\"graview-video\":vn},ci=[\"fill\",\"fill-opacity\",\"fill-rule\",\"stroke\",\"stroke-width\",\"stroke-linecap\",\"stroke-linejoin\",\"stroke-dasharray\",\"stroke-dashoffset\",\"stroke-opacity\",\"stroke-miterlimit\",\"opacity\",\"color\",\"display\",\"visibility\",\"transform-origin\",\"clip-path\",\"clip-rule\",\"marker-start\",\"marker-mid\",\"marker-end\",\"font-family\",\"font-size\",\"font-weight\",\"font-style\",\"text-anchor\",\"dominant-baseline\",\"alignment-baseline\",\"letter-spacing\",\"text-decoration\",\"paint-order\",\"vector-effect\",\"shape-rendering\",\"pointer-events\",\"stop-color\",\"stop-opacity\",\"overflow\",\"mask\"],ui={id:\"text\",class:\"text\",style:\"style\",lang:\"text\",role:\"text\",tabindex:{oneOf:[\"-1\",\"0\"]},transform:\"geometry\",...Object.fromEntries(ci.map(t=>[t,\"css\"]))},nt={x:\"geometry\",y:\"geometry\",width:\"geometry\",height:\"geometry\"},Sn={viewBox:\"geometry\",preserveAspectRatio:\"geometry\"},Po={gradientUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},gradientTransform:\"geometry\",spreadMethod:{oneOf:[\"pad\",\"reflect\",\"repeat\"]},href:\"fragment\"},On={svg:{attributes:{...nt,...Sn}},g:x,defs:x,symbol:{attributes:{...nt,...Sn,refX:\"geometry\",refY:\"geometry\"}},use:{attributes:{...nt,href:\"fragment\"}},title:x,desc:x,path:{attributes:{d:\"geometry\",pathLength:\"number\"}},rect:{attributes:{...nt,rx:\"geometry\",ry:\"geometry\",pathLength:\"number\"}},circle:{attributes:{cx:\"geometry\",cy:\"geometry\",r:\"geometry\",pathLength:\"number\"}},ellipse:{attributes:{cx:\"geometry\",cy:\"geometry\",rx:\"geometry\",ry:\"geometry\",pathLength:\"number\"}},line:{attributes:{x1:\"geometry\",y1:\"geometry\",x2:\"geometry\",y2:\"geometry\",pathLength:\"number\"}},polyline:{attributes:{points:\"geometry\",pathLength:\"number\"}},polygon:{attributes:{points:\"geometry\",pathLength:\"number\"}},text:{attributes:{x:\"geometry\",y:\"geometry\",dx:\"geometry\",dy:\"geometry\",rotate:\"geometry\",textLength:\"geometry\",lengthAdjust:{oneOf:[\"spacing\",\"spacingAndGlyphs\"]}}},tspan:{attributes:{x:\"geometry\",y:\"geometry\",dx:\"geometry\",dy:\"geometry\",rotate:\"geometry\",textLength:\"geometry\"}},textPath:{attributes:{href:\"fragment\",startOffset:\"geometry\",method:{oneOf:[\"align\",\"stretch\"]},spacing:{oneOf:[\"auto\",\"exact\"]},side:{oneOf:[\"left\",\"right\"]}}},linearGradient:{attributes:{x1:\"geometry\",y1:\"geometry\",x2:\"geometry\",y2:\"geometry\",...Po}},radialGradient:{attributes:{cx:\"geometry\",cy:\"geometry\",r:\"geometry\",fx:\"geometry\",fy:\"geometry\",fr:\"geometry\",...Po}},stop:{attributes:{offset:\"geometry\"}},clipPath:{attributes:{clipPathUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},mask:{attributes:{...nt,maskUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},maskContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},pattern:{attributes:{...nt,...Sn,patternUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternTransform:\"geometry\",href:\"fragment\"}},marker:{attributes:{...Sn,markerWidth:\"geometry\",markerHeight:\"geometry\",refX:\"geometry\",refY:\"geometry\",orient:\"geometry\",markerUnits:{oneOf:[\"strokeWidth\",\"userSpaceOnUse\"]}}}};var _o=[\"alert\",\"alertdialog\",\"dialog\",\"banner\",\"main\",\"navigation\",\"contentinfo\",\"complementary\",\"search\",\"form\",\"region\",\"application\",\"status\",\"log\",\"marquee\",\"timer\"],At={nav:\"div\",header:\"div\",footer:\"div\",aside:\"div\",search:\"div\",output:\"span\"},Rn={section:[\"aria-label\",\"aria-labelledby\",\"title\"]};function di(t){return/^aria-[a-z]+$/.test(t)}function fi(t){return/^data-[a-z0-9][a-z0-9_.-]*$/.test(t)}var Io=[\"all\",\"display\",\"position\",\"top\",\"right\",\"bottom\",\"left\",\"inset\",\"inset-block\",\"inset-inline\",\"inset-block-start\",\"inset-block-end\",\"inset-inline-start\",\"inset-inline-end\",\"width\",\"height\",\"min-width\",\"min-height\",\"max-width\",\"max-height\",\"inline-size\",\"block-size\",\"min-inline-size\",\"min-block-size\",\"max-inline-size\",\"max-block-size\",\"margin\",\"margin-top\",\"margin-right\",\"margin-bottom\",\"margin-left\",\"margin-block\",\"margin-inline\",\"margin-block-start\",\"margin-block-end\",\"margin-inline-start\",\"margin-inline-end\",\"padding\",\"padding-top\",\"padding-right\",\"padding-bottom\",\"padding-left\",\"padding-block\",\"padding-inline\",\"padding-block-start\",\"padding-block-end\",\"padding-inline-start\",\"padding-inline-end\",\"box-sizing\",\"overflow\",\"overflow-x\",\"overflow-y\",\"overflow-wrap\",\"float\",\"clear\",\"z-index\",\"aspect-ratio\",\"object-fit\",\"object-position\",\"vertical-align\",\"isolation\",\"contain\",\"container\",\"container-type\",\"container-name\",\"content-visibility\",\"flex\",\"flex-direction\",\"flex-wrap\",\"flex-flow\",\"flex-grow\",\"flex-shrink\",\"flex-basis\",\"order\",\"grid\",\"grid-template\",\"grid-template-columns\",\"grid-template-rows\",\"grid-template-areas\",\"grid-auto-columns\",\"grid-auto-rows\",\"grid-auto-flow\",\"grid-area\",\"grid-column\",\"grid-row\",\"grid-column-start\",\"grid-column-end\",\"grid-row-start\",\"grid-row-end\",\"gap\",\"row-gap\",\"column-gap\",\"align-items\",\"align-content\",\"align-self\",\"justify-items\",\"justify-content\",\"justify-self\",\"place-items\",\"place-content\",\"place-self\",\"columns\",\"column-count\",\"column-width\",\"column-rule\",\"column-rule-color\",\"column-rule-style\",\"column-rule-width\",\"column-span\",\"column-fill\",\"color\",\"background\",\"background-color\",\"background-image\",\"background-position\",\"background-position-x\",\"background-position-y\",\"background-size\",\"background-repeat\",\"background-origin\",\"background-clip\",\"background-attachment\",\"background-blend-mode\",\"border\",\"border-top\",\"border-right\",\"border-bottom\",\"border-left\",\"border-block\",\"border-inline\",\"border-block-start\",\"border-block-end\",\"border-inline-start\",\"border-inline-end\",\"border-width\",\"border-style\",\"border-color\",\"border-top-width\",\"border-right-width\",\"border-bottom-width\",\"border-left-width\",\"border-top-style\",\"border-right-style\",\"border-bottom-style\",\"border-left-style\",\"border-top-color\",\"border-right-color\",\"border-bottom-color\",\"border-left-color\",\"border-radius\",\"border-top-left-radius\",\"border-top-right-radius\",\"border-bottom-right-radius\",\"border-bottom-left-radius\",\"border-start-start-radius\",\"border-start-end-radius\",\"border-end-start-radius\",\"border-end-end-radius\",\"border-collapse\",\"border-spacing\",\"outline\",\"outline-width\",\"outline-style\",\"outline-color\",\"outline-offset\",\"box-shadow\",\"opacity\",\"visibility\",\"mix-blend-mode\",\"filter\",\"backdrop-filter\",\"clip-path\",\"accent-color\",\"caret-color\",\"color-scheme\",\"appearance\",\"-webkit-appearance\",\"font\",\"font-family\",\"font-size\",\"font-weight\",\"font-style\",\"font-stretch\",\"font-variant\",\"font-variant-numeric\",\"font-variant-caps\",\"font-variant-ligatures\",\"font-feature-settings\",\"font-variation-settings\",\"font-kerning\",\"font-optical-sizing\",\"font-size-adjust\",\"font-synthesis\",\"line-height\",\"letter-spacing\",\"word-spacing\",\"text-align\",\"text-align-last\",\"text-indent\",\"text-transform\",\"text-decoration\",\"text-decoration-line\",\"text-decoration-color\",\"text-decoration-style\",\"text-decoration-thickness\",\"text-underline-offset\",\"text-underline-position\",\"text-shadow\",\"text-overflow\",\"text-wrap\",\"text-wrap-mode\",\"text-wrap-style\",\"white-space\",\"white-space-collapse\",\"word-break\",\"line-break\",\"hyphens\",\"tab-size\",\"direction\",\"unicode-bidi\",\"writing-mode\",\"text-orientation\",\"text-rendering\",\"-webkit-font-smoothing\",\"-webkit-line-clamp\",\"-webkit-box-orient\",\"line-clamp\",\"-webkit-text-fill-color\",\"-webkit-background-clip\",\"list-style\",\"list-style-type\",\"list-style-position\",\"content\",\"quotes\",\"counter-reset\",\"counter-increment\",\"counter-set\",\"table-layout\",\"caption-side\",\"empty-cells\",\"transform\",\"transform-origin\",\"transform-box\",\"transform-style\",\"translate\",\"rotate\",\"scale\",\"perspective\",\"perspective-origin\",\"backface-visibility\",\"transition\",\"transition-property\",\"transition-duration\",\"transition-timing-function\",\"transition-delay\",\"transition-behavior\",\"animation\",\"animation-name\",\"animation-duration\",\"animation-timing-function\",\"animation-delay\",\"animation-iteration-count\",\"animation-direction\",\"animation-fill-mode\",\"animation-play-state\",\"animation-composition\",\"will-change\",\"cursor\",\"pointer-events\",\"user-select\",\"-webkit-user-select\",\"touch-action\",\"resize\",\"scroll-behavior\",\"overscroll-behavior\",\"overscroll-behavior-x\",\"overscroll-behavior-y\",\"scroll-snap-type\",\"scroll-snap-align\",\"scroll-snap-stop\",\"scroll-margin\",\"scroll-padding\",\"scrollbar-width\",\"scrollbar-color\",\"scrollbar-gutter\",\"fill\",\"fill-opacity\",\"fill-rule\",\"stroke\",\"stroke-width\",\"stroke-linecap\",\"stroke-linejoin\",\"stroke-dasharray\",\"stroke-dashoffset\",\"stroke-opacity\",\"stroke-miterlimit\",\"stop-color\",\"stop-opacity\",\"clip-rule\",\"marker\",\"marker-start\",\"marker-mid\",\"marker-end\",\"paint-order\",\"vector-effect\",\"shape-rendering\",\"text-anchor\",\"dominant-baseline\",\"alignment-baseline\",\"r\",\"cx\",\"cy\",\"rx\",\"ry\",\"x\",\"y\",\"d\",\"mask\"],Do=[\"var\",\"env\",\"calc\",\"min\",\"max\",\"clamp\",\"round\",\"mod\",\"rem\",\"abs\",\"sign\",\"sin\",\"cos\",\"tan\",\"asin\",\"acos\",\"atan\",\"atan2\",\"pow\",\"sqrt\",\"hypot\",\"log\",\"exp\",\"rgb\",\"rgba\",\"hsl\",\"hsla\",\"hwb\",\"lab\",\"lch\",\"oklab\",\"oklch\",\"color\",\"color-mix\",\"light-dark\",\"linear-gradient\",\"radial-gradient\",\"conic-gradient\",\"repeating-linear-gradient\",\"repeating-radial-gradient\",\"repeating-conic-gradient\",\"translate\",\"translatex\",\"translatey\",\"translatez\",\"translate3d\",\"rotate\",\"rotatex\",\"rotatey\",\"rotatez\",\"rotate3d\",\"scale\",\"scalex\",\"scaley\",\"scalez\",\"scale3d\",\"skew\",\"skewx\",\"skewy\",\"matrix\",\"matrix3d\",\"perspective\",\"cubic-bezier\",\"steps\",\"linear\",\"repeat\",\"minmax\",\"fit-content\",\"blur\",\"brightness\",\"contrast\",\"drop-shadow\",\"grayscale\",\"hue-rotate\",\"invert\",\"saturate\",\"sepia\",\"opacity\",\"circle\",\"ellipse\",\"inset\",\"polygon\",\"path\",\"xywh\",\"rect\",\"counter\",\"counters\"],Mo=[\"fill\",\"stroke\",\"clip-path\",\"mask\",\"marker\",\"marker-start\",\"marker-mid\",\"marker-end\"],Lo=[\"media\",\"supports\",\"container\",\"keyframes\"],Ho={position:[\"static\",\"relative\",\"absolute\",\"sticky\"],all:[],appearance:[\"auto\",\"none\",\"menulist-button\",\"textfield\"],\"-webkit-appearance\":[\"auto\",\"none\",\"menulist-button\",\"textfield\"]},$o=[\"host\",\"host-context\",\"slotted\",\"part\",\"backdrop\",\"picker\",\"view-transition\",\"view-transition-group\",\"view-transition-image-pair\",\"view-transition-old\",\"view-transition-new\"],hr=64e3,gr=4e3,Vo=1e5,Uo=512e3,yr=1e4,jo=\"http://www.w3.org/1999/xhtml\",Go=\"http://www.w3.org/2000/svg\",mi=new Map(Object.keys(On).map(t=>[t.toLowerCase(),t]));function An(t){return mi.get(t.toLowerCase())}function kn(t,e,n){let r=n.toLowerCase(),o=t===\"html\"?[rt[e]?.attributes,li]:[On[e]?.attributes,ui],s=t===\"svg\"&&r===\"xlink:href\"?\"href\":r;for(let i of o)if(i){for(let[l,c]of Object.entries(i))if(l.toLowerCase()===s)return{name:l,kind:c}}if(di(r)||fi(r))return{name:r,kind:\"text\"}}function zo(t){if(typeof t==\"string\")return{type:\"navigate\",to:t};let{place:e,record:n,where:r,section:o}=t??{},s={...r===void 0?{}:{where:r},...o===void 0?{}:{section:String(o)}};return typeof e==\"string\"?{type:\"navigate\",place:e,...s}:typeof n==\"string\"?{type:\"navigate\",to:n,...s}:void 0}var Fo=\"~\",Cn=t=>typeof t==\"object\"&&t!==null&&!Array.isArray(t),ce=(t,e=0)=>{if(t===null||typeof t==\"string\"||typeof t==\"number\"||typeof t==\"boolean\"||t===void 0)return t;if(!(e>64||typeof t!=\"object\"))return Array.isArray(t)?t.map(n=>ce(n,e+1)):Object.fromEntries(Object.entries(t).map(([n,r])=>[n,ce(r,e+1)]))};function Bo(){let t=new Map,e=new Map,n=new Map([[Fo,{children:[],listeners:new Map}]]),r=0,o=d=>{let g=e.get(d);return g===void 0&&(g=r+=1,e.set(d,g),t.set(g,{listener:d,count:0})),t.get(g).count+=1,g},s=d=>{let g=t.get(d);g&&(g.count-=1,!(g.count>0)&&(t.delete(d),e.delete(g.listener)))},i=d=>{let g=n.get(d);if(g){n.delete(d);for(let w of g.listeners.values())s(w);for(let w of g.children)i(w)}},l=(d,g,w=0)=>{if(!Cn(d)||w>64)return ce(d);let f=typeof d.id==\"string\"?d.id:void 0,b=g&&f!==void 0&&f!==Fo;b&&i(f);let T={children:[],listeners:new Map};b&&n.set(f,T);let S={};for(let[y,a]of Object.entries(d))y===\"children\"&&Array.isArray(a)?S[y]=a.map(h=>{let p=l(h,b,w+1);return b&&Cn(h)&&typeof h.id==\"string\"&&T.children.push(h.id),p}):y===\"eventListeners\"&&Cn(a)?S[y]=Object.fromEntries(Object.entries(a).map(([h,p])=>{if(typeof p!=\"function\"||!b)return[h,void 0];let m=o(p);return T.listeners.set(h,m),[h,{listener:m}]})):S[y]=ce(a,w+1);return S},c=d=>{if(!Array.isArray(d))return ce(d);let[g,w]=d,f=typeof w==\"string\"?n.get(w):void 0;if(g===0){let b=l(d[2],f!==void 0),T=Cn(d[2])?d[2].id:void 0;if(f&&typeof T==\"string\"&&n.has(T)){let S=Number(d[3]);f.children.splice(Number.isInteger(S)&&S>=0&&S<=f.children.length?S:f.children.length,0,T)}return[g,ce(w),b,ce(d[3])]}if(g===1){let b=Number(d[2]);return f&&Number.isInteger(b)&&b>=0&&b<f.children.length&&i(f.children.splice(b,1)[0]),ce(d)}if(g===3&&d[4]===3){let b=String(d[2]),T=d[3],S=f&&typeof T==\"function\"?o(T):void 0,y=f?.listeners.get(b);return y!==void 0&&s(y),S===void 0?f?.listeners.delete(b):f.listeners.set(b,S),[g,ce(w),b,S===void 0?void 0:{listener:S},3]}return ce(d)};return{encode:d=>d.map(c),listener:d=>t.get(d)?.listener,get listening(){return t.size},get nodes(){return n.size-1}}}var br=\"graview-view-root\",pi=t=>t.replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g,\"&quot;\").replace(/'/g,\"&#39;\"),hi=t=>Object.freeze({html:t,toString:()=>t}),Yo=t=>typeof t==\"object\"&&t!==null&&typeof t.html==\"string\"&&Object.isFrozen(t),qo=t=>t==null||t===!1?\"\":Array.isArray(t)?t.map(qo).join(\"\"):Yo(t)?t.html:pi(String(t));function Wo(t){customElements.get(br)||customElements.define(br,Rt);let e=Event,n=Bo(),r=new Set,o=new Set,s,i=[];for(let u of[\"closest\",\"matches\",\"dataset\"]){let N=()=>{throw new TypeError(`A view's element has no ${u}: graview.on hands event.element, the element its selector matched; read event.element.getAttribute(\"data-\\u2026\").`)};u in Element.prototype||Object.defineProperty(Element.prototype,u,u===\"dataset\"?{get:N}:{value:N})}let l=document.createElement(br),c=u=>{let N=R=>{for(let O of Array.from(R.childNodes)){if(O.nodeType!==1)continue;if(se(O)===u)return O;let P=N(O);if(P)return P}};return N(l)},d=u=>{let N=c(u.target);if(!N)return;let R=new e(u.event,{bubbles:!0});for(let O of[\"value\",\"checked\",\"key\",\"pressed\"])u[O]!==void 0&&Object.defineProperty(R,O,{value:u[O],enumerable:!0});N.dispatchEvent(R);for(let O of o){if(O.type!==u.event)continue;let P;try{P=new Set(Array.from(l.querySelectorAll(O.selector)))}catch{continue}for(let _=N;_&&_!==l;_=_.parentNode)if(P.has(_)){O.listener(Object.freeze({type:u.event,target:N,element:_,...u.value!==void 0?{value:u.value}:{},...u.checked!==void 0?{checked:u.checked}:{},...u.key!==void 0?{key:u.key}:{},...u.pressed!==void 0?{pressed:u.pressed}:{}}));break}}},g=u=>{if(u.type===\"dom-event\"&&typeof u.target==\"string\")return d(u);if(u.type===\"notice\")return t.warn(u.text);if(u.type!==\"props\")return;s=u.props;let N=t.now();for(let P of r)try{P(u.props)}catch(_){t.threw(_)}let R=t.now()-N,O=u.push;typeof O==\"number\"&&t.microtask(()=>t.microtask(()=>t.send({type:\"pushed\",push:O,ms:R})))},w;l.connect({mutate(u){w||(w=[],t.microtask(()=>{let N=w??[];w=void 0,t.send({type:\"render\",records:n.encode(N)})})),w.push(...u)},call:()=>{}});let f=u=>u.nodeType===1?u.getAttribute(\"data-key\")??u.getAttribute(\"id\"):null,b=(u,N)=>u.nodeType===N.nodeType&&(u.nodeType!==1||u.localName===N.localName&&u.namespaceURI===N.namespaceURI&&f(u)===f(N));function T(u,N){let R=Array.from(N.childNodes),O=0;for(let P of R){let _=u.childNodes[O]??null;if(_&&b(_,P)){S(_,P),O+=1;continue}if(f(P)!==null){let ye=Array.from(u.childNodes).slice(O+1).find(ut=>b(ut,P));if(ye){u.insertBefore(ye,_),S(ye,P),O+=1;continue}}u.insertBefore(P,_),O+=1}for(;u.childNodes.length>O;)u.removeChild(u.lastChild)}function S(u,N){if(u.nodeType!==1){u.data!==N.data&&(u.data=N.data);return}let R=u,O=N,P=y(R);for(let _ of R.getAttributeNames())O.hasAttribute(_)||(R.removeAttribute(_),P&&Oe(R,_,void 0));for(let _ of O.getAttributeNames()){let ue=O.getAttribute(_);R.getAttribute(_)!==ue&&R.setAttribute(_,ue),P&&Oe(R,_,ue)}T(R,O)}let y=u=>u.localName.includes(\"-\");function a(u){for(let N of Array.from(u.childNodes)){if(N.nodeType!==1)continue;let R=N;if(y(R))for(let O of R.getAttributeNames())Oe(R,O,R.getAttribute(O)??void 0);a(R)}}function h(u,N,R){for(let O of Array.from(u.childNodes)){if(O.nodeType!==1)continue;let P=O,_=P.localName,ue=N||_.toLowerCase()===\"svg\",ye=ue?An(_):Object.prototype.hasOwnProperty.call(rt,_.toLowerCase())?_.toLowerCase():void 0;if(!ye){R.add(`<${_}>`);continue}for(let ut of P.getAttributeNames())(!kn(ue?\"svg\":\"html\",ye,ut)||!ue&&Rn[ye]?.includes(ut.toLowerCase()))&&R.add(`${ye} ${ut}`);h(P,ue,R)}}function p(u){let N=document.createElement(\"div\"),R=Array.isArray(u)?u:[u];for(let P of R)if(P!=null)if(typeof P==\"string\"||Yo(P)){let _=document.createElement(\"div\");_.innerHTML=typeof P==\"string\"?P:P.html,N.append(...Array.from(_.childNodes))}else N.append(P);let O=new Set;h(N,!1,O),i=[...O],i.length>0&&t.warn(`The host will not draw: ${i.join(\", \")}`),a(N),T(l,N)}let m;return{view:Object.freeze({get props(){return s},onProps(u){return r.add(u),s&&u(s),()=>void r.delete(u)},render:p,style(u){typeof u!=\"string\"||u===m||(m=u,t.send({type:\"style\",css:u}))},on(u,N,R){let O={type:u,selector:N,listener:R};return o.add(O),()=>void o.delete(O)},act:(u,N={})=>t.act(u,N),navigate(u){if(typeof u==\"string\")return t.navigate(u);let N=zo(u);N&&t.send(N)},html(u,...N){return hi(u.reduce((R,O,P)=>R+O+(P<N.length?qo(N[P]):\"\"),\"\"))},get refused(){return i},get hardening(){return t.hardening()}}),hear:g}}var Xo=t=>t.toLowerCase().replace(/[^a-z0-9]+/g,\"-\").replace(/^-|-$/g,\"\");function kt(t,e){let n=t.find(s=>s.as===e);if(n)return n;let r=e.trim().toLowerCase(),o=Xo(e);return t.find(s=>s.title!==void 0&&s.title.trim().toLowerCase()===r)??(o?t.find(s=>s.as===o||s.title!==void 0&&Xo(s.title)===o):void 0)}var ot=t=>` Its places: ${t.map(e=>typeof e==\"string\"?`\"${e}\"`:e.title&&e.title!==e.as?`\"${e.as}\" (${e.title})`:`\"${e.as}\"`).join(\", \")||\"none\"}.`,Er=t=>`\"${t.length>80?`${t.slice(0,79)}\\u2026`:t}\"`;var B=t=>t>=48&&t<=57,Ko=t=>B(t)||t>=65&&t<=70||t>=97&&t<=102,Sr=t=>t>=65&&t<=90||t>=97&&t<=122,Or=t=>t>=128,Pn=t=>Sr(t)||Or(t)||t===95,Zo=t=>Pn(t)||B(t)||t===45,Jo=t=>t===10,he=t=>t===10||t===9||t===32,gi=t=>t>=0&&t<=8||t===11||t>=14&&t<=31||t===127,ie=-1;function yi(t){let e=[];for(let n=0;n<t.length;n+=1){let r=t.codePointAt(n);r>65535&&(n+=1),r===13?(t.charCodeAt(n+1)===10&&(n+=1),r=10):r===12?r=10:(r===0||r>=55296&&r<=57343)&&(r=65533),e.push(r)}return e}function bi(t){let e=yi(t),n=0,r=(y=0)=>n+y<e.length?e[n+y]:ie,o=[],s=(y,a)=>y===92&&a!==10&&a!==ie,i=(y,a,h)=>y===45?Pn(a)||a===45||s(a,h):Pn(y)?!0:s(y,a),l=(y,a,h)=>y===43||y===45?B(a)||a===46&&B(h):B(y===46?a:y),c=()=>{let y=r();if(n+=1,y===ie)return 65533;if(Ko(y)){let a=String.fromCodePoint(y);for(;a.length<6&&Ko(r());)a+=String.fromCodePoint(r()),n+=1;he(r())&&(n+=1);let h=parseInt(a,16);return h===0||h>=55296&&h<=57343||h>1114111?65533:h}return y},d=()=>{let y=\"\";for(;;){let a=r();if(Zo(a))y+=String.fromCodePoint(a),n+=1;else if(s(a,r(1)))n+=1,y+=String.fromCodePoint(c());else return y}},g=()=>{let y=\"\";for((r()===43||r()===45)&&(y+=String.fromCodePoint(e[n++]));B(r());)y+=String.fromCodePoint(e[n++]);if(r()===46&&B(r(1)))for(y+=String.fromCodePoint(e[n++],e[n++]);B(r());)y+=String.fromCodePoint(e[n++]);if((r()===69||r()===101)&&(B(r(1))||(r(1)===43||r(1)===45)&&B(r(2))))for(y+=String.fromCodePoint(e[n++]),B(r())||(y+=String.fromCodePoint(e[n++]));B(r());)y+=String.fromCodePoint(e[n++]);return y},w=()=>{let y=g();return i(r(),r(1),r(2))?{type:\"dimension\",repr:y,unit:d()}:r()===37?(n+=1,{type:\"percentage\",repr:y}):{type:\"number\",repr:y}},f=()=>{for(;;){let y=r();if(n+=1,y===41||y===ie)return;s(y,r())&&c()}},b=()=>{let y=\"\";for(;he(r());)n+=1;for(;;){let a=r();if(n+=1,a===41)return{type:\"url\",value:y};if(a===ie)return{type:\"url\",value:y};if(he(a)){for(;he(r());)n+=1;return r()===41||r()===ie?(r()===41&&(n+=1),{type:\"url\",value:y}):(f(),{type:\"bad-url\"})}if(a===34||a===39||a===40||gi(a))return f(),{type:\"bad-url\"};if(a===92){if(s(a,r()))y+=String.fromCodePoint(c());else return f(),{type:\"bad-url\"};continue}y+=String.fromCodePoint(a)}},T=()=>{let y=d();if(y.toLowerCase()===\"url\"&&r()===40){for(n+=1;he(r())&&he(r(1));)n+=1;let a=he(r())?r(1):r();return a===34||a===39?{type:\"function\",value:y}:b()}return r()===40?(n+=1,{type:\"function\",value:y}):{type:\"ident\",value:y}},S=y=>{let a=\"\";for(;;){let h=r();if(n+=1,h===y||h===ie)return{type:\"string\",value:a};if(Jo(h))return n-=1,{type:\"bad-string\"};if(h===92){if(r()===ie)continue;if(Jo(r())){n+=1;continue}a+=String.fromCodePoint(c());continue}a+=String.fromCodePoint(h)}};for(;;){for(;r()===47&&r(1)===42;){for(n+=2;r()!==ie&&!(r()===42&&r(1)===47);)n+=1;r()!==ie&&(n+=2)}let y=r();if(y===ie)return o;if(he(y)){for(;he(r());)n+=1;o.push({type:\"whitespace\"});continue}switch(n+=1,y){case 34:case 39:o.push(S(y));continue;case 35:if(Zo(r())||s(r(),r(1))){let a=i(r(),r(1),r(2));o.push({type:\"hash\",value:d(),id:a})}else o.push({type:\"delim\",value:\"#\"});continue;case 40:o.push({type:\"(\"});continue;case 41:o.push({type:\")\"});continue;case 43:case 46:l(y,r(),r(1))?(n-=1,o.push(w())):o.push({type:\"delim\",value:String.fromCodePoint(y)});continue;case 44:o.push({type:\",\"});continue;case 45:l(y,r(),r(1))?(n-=1,o.push(w())):r()===45&&r(1)===62?(n+=2,o.push({type:\"CDC\"})):i(y,r(),r(1))?(n-=1,o.push(T())):o.push({type:\"delim\",value:\"-\"});continue;case 58:o.push({type:\":\"});continue;case 59:o.push({type:\";\"});continue;case 60:r()===33&&r(1)===45&&r(2)===45?(n+=3,o.push({type:\"CDO\"})):o.push({type:\"delim\",value:\"<\"});continue;case 64:i(r(),r(1),r(2))?o.push({type:\"at-keyword\",value:d()}):o.push({type:\"delim\",value:\"@\"});continue;case 91:o.push({type:\"[\"});continue;case 92:s(y,r())?(n-=1,o.push(T())):o.push({type:\"delim\",value:\"\\\\\"});continue;case 93:o.push({type:\"]\"});continue;case 123:o.push({type:\"{\"});continue;case 125:o.push({type:\"}\"});continue;default:B(y)?(n-=1,o.push(w())):Pn(y)?(n-=1,o.push(T())):o.push({type:\"delim\",value:String.fromCodePoint(y)})}}}var rs={\"{\":\"}\",\"[\":\"]\",\"(\":\")\"},os=32,wr=class{constructor(e){this.tokens=e}i=0;peek(){return this.tokens[this.i]}next(){return this.tokens[this.i++]}};function ss(t,e){let n=t.next();return n.type===\"{\"||n.type===\"[\"||n.type===\"(\"?{type:\"block\",open:n.type,value:Qo(t,rs[n.type],e+1)}:n.type===\"function\"?{type:\"func\",name:n.value,value:Qo(t,\")\",e+1)}:n}function Qo(t,e,n){let r=[];for(;;){let o=t.peek();if(!o)return r;if(o.type===e)return t.next(),r;if(n>os){t.next(),r.push({type:\"bad-string\"});continue}r.push(ss(t,n))}}function st(t,e){let n=[],r=0;for(;r<t.length;){let o=t[r];if(o.type===\"whitespace\"||e&&(o.type===\"CDO\"||o.type===\"CDC\")){r+=1;continue}if(o.type===\"at-keyword\"){let l=[];r+=1;let c;for(;r<t.length;){let d=t[r];if(r+=1,d.type===\";\")break;if(d.type===\"block\"&&d.open===\"{\"){c=d.value;break}l.push(d)}n.push({type:\"at-rule\",name:o.value,prelude:l,...c?{block:c}:{}});continue}let s=[],i;for(;r<t.length;){let l=t[r];if(r+=1,l.type===\"block\"&&l.open===\"{\"){i=l.value;break}s.push(l)}i&&n.push({type:\"qualified\",prelude:s,block:i})}return n}function Rr(t){let e=[],n=0;for(;n<t.length;){let r=t[n];if(r.type===\"whitespace\"||r.type===\";\"){n+=1;continue}if(r.type===\"at-keyword\"){let s=(()=>{for(let i=n+1;i<t.length;i+=1){let l=t[i];if(l.type===\";\"||l.type===\"block\"&&l.open===\"{\")return i+1}return t.length})();e.push(...st(t.slice(n,s),!1)),n=s;continue}if(r.type===\"ident\"){let s=n+1;for(;t[s]?.type===\"whitespace\";)s+=1;if(t[s]?.type===\":\"){let i=s+1;for(;i<t.length&&t[i].type!==\";\";)i+=1;let l=is(r.value,t.slice(s+1,i));if(l.value.some(c=>c.type===\"block\"&&c.open===\"{\")){let c=t.findIndex((d,g)=>g>n&&d.type===\"block\"&&d.open===\"{\");e.push(...st(t.slice(n,c+1),!1)),n=c+1;continue}e.push(l),n=i+1;continue}}let o=n;for(;o<t.length&&!(t[o].type===\"block\"&&t[o].open===\"{\")&&t[o].type!==\";\";)o+=1;o<t.length&&t[o].type===\"block\"&&e.push(...st(t.slice(n,o+1),!1)),n=o+1}return e}function is(t,e){let n=[...e];for(;n[0]?.type===\"whitespace\";)n.shift();for(;n.at(-1)?.type===\"whitespace\";)n.pop();let r=!1,s=n.length-1;if(n[s]?.type===\"ident\"&&n[s].value.toLowerCase()===\"important\"){for(s-=1;n[s]?.type===\"whitespace\";)s-=1;let i=n[s];if(i?.type===\"delim\"&&i.value===\"!\")for(r=!0,n.length=s;n.at(-1)?.type===\"whitespace\";)n.pop()}return{type:\"declaration\",name:t,value:n,important:r}}function Ar(t){let e=new wr(bi(t)),n=[];for(;e.peek();)n.push(ss(e,0));return n}function _n(t){let e=\"\",n=[...t].map(r=>r.codePointAt(0));return n.forEach((r,o)=>{r===0?e+=\"\\uFFFD\":r>=1&&r<=31||r===127||o===0&&B(r)||o===1&&B(r)&&n[0]===45?e+=`\\\\${r.toString(16)} `:o===0&&r===45&&n.length===1?e+=\"\\\\-\":Or(r)||r===45||r===95||B(r)||Sr(r)?e+=String.fromCodePoint(r):e+=`\\\\${String.fromCodePoint(r)}`}),e}function In(t){let e=\"\";for(let n of t){let r=n.codePointAt(0);Or(r)||r===45||r===95||B(r)||Sr(r)?e+=n:r>=1&&r<=31||r===127?e+=`\\\\${r.toString(16)} `:e+=`\\\\${n}`}return e}function Tr(t){let e='\"';for(let n of t){let r=n.codePointAt(0);r===0?e+=\"\\uFFFD\":r>=1&&r<=31||r===127||r===60||r===62?e+=`\\\\${r.toString(16)} `:r===34||r===92?e+=`\\\\${n}`:e+=n}return`${e}\"`}function Ei(t){let e=In(t);return/^[eE]([0-9]|[+-][0-9])/.test(t)?`\\\\${t.codePointAt(0).toString(16)} ${In(t.slice(1))}`:e}var es=t=>{switch(t.type){case\"ident\":case\"url\":case\"bad-url\":case\"number\":case\"percentage\":case\"dimension\":case\"CDC\":case\"hash\":case\"at-keyword\":return t.type;case\"func\":case\"function\":return\"function\";case\"block\":return t.open===\"(\"?\"(\":\"other\";case\"(\":return\"(\";case\"delim\":return`delim${t.value}`;default:return\"other\"}};function Ni(t,e){let n=[\"ident\",\"function\",\"url\",\"bad-url\",\"delim-\",\"number\",\"percentage\",\"dimension\",\"CDC\"];return t===\"ident\"?[...n,\"(\"].includes(e):t===\"at-keyword\"||t===\"hash\"||t===\"dimension\"||t===\"delim#\"||t===\"delim-\"?n.includes(e):t===\"number\"?[\"ident\",\"function\",\"url\",\"bad-url\",\"number\",\"percentage\",\"dimension\",\"delim%\"].includes(e):t===\"delim@\"?[\"ident\",\"function\",\"url\",\"bad-url\",\"delim-\",\"CDC\"].includes(e):t===\"delim.\"||t===\"delim+\"?[\"number\",\"percentage\",\"dimension\"].includes(e):t===\"delim/\"?e===\"delim*\":!1}function wi(t){switch(t.type){case\"whitespace\":return\" \";case\"ident\":return _n(t.value);case\"at-keyword\":return`@${_n(t.value)}`;case\"hash\":return`#${In(t.value)}`;case\"string\":return Tr(t.value);case\"url\":return`url(${Tr(t.value)})`;case\"delim\":return t.value===\"\\\\\"?`\\\\\n`:t.value;case\"CDO\":return\"<!--\";case\"CDC\":return\"-->\";case\"number\":return t.repr;case\"percentage\":return`${t.repr}%`;case\"dimension\":return`${t.repr}${Ei(t.unit)}`;case\"func\":return`${_n(t.name)}(${it(t.value)})`;case\"block\":return`${t.open}${it(t.value)}${rs[t.open]}`;case\":\":case\";\":case\",\":case\"[\":case\"]\":case\"(\":case\")\":case\"{\":case\"}\":return t.type;default:return\"\"}}function it(t){let e=\"\",n;for(let r of t)r.type===\"whitespace\"&&n?.type===\"whitespace\"||(n&&Ni(es(n),es(r))&&(e+=\"/**/\"),e+=wi(r),n=r);return e}var Ti=new Set(Io),as=new Set(Do),ts=new Set(Mo),xi=new Set(Lo),vi=new Set($o),ns=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,ge=t=>t.replace(/[A-Z]/g,e=>e.toLowerCase()),Si=t=>ge(t);function xr(t,e,n){let r=[];for(let o of e){if(o.type===\"bad-url\"||o.type===\"bad-string\"){n({reason:\"unreadable\",...t?{name:t}:{}});return}if(o.type===\"url\"){if(t&&ts.has(t)&&ns.test(o.value)){r.push({type:\"func\",name:\"url\",value:[{type:\"string\",value:o.value}]});continue}n({reason:\"url\",...t?{name:t}:{}});return}if(o.type===\"func\"){let s=ge(o.name);if(s===\"url\"||s===\"src\"){let l=o.value.filter(d=>d.type!==\"whitespace\"),c=l[0];if(s===\"url\"&&l.length===1&&c?.type===\"string\"&&t&&ts.has(t)&&ns.test(c.value)){r.push({type:\"func\",name:\"url\",value:[{type:\"string\",value:c.value}]});continue}n({reason:\"url\",...t?{name:t}:{}});return}if(!as.has(s)){n({reason:\"function\",name:s});return}let i=xr(t,o.value,n);if(!i)return;s===\"var\"?r.push({type:\"whitespace\"},{type:\"func\",name:s,value:i},{type:\"whitespace\"}):r.push({type:\"func\",name:s,value:i});continue}if(o.type===\"block\"){if(o.open===\"{\"||o.open===\"(\"&&r.at(-1)?.type===\"ident\"){n({reason:\"unreadable\",...t?{name:t}:{}});return}let s=xr(t,o.value,n);if(!s)return;r.push({type:\"block\",open:o.open,value:s});continue}if(o.type===\"at-keyword\"||o.type===\"CDO\"||o.type===\"CDC\"||o.type===\"{\"||o.type===\"}\"||o.type===\";\"||o.type===\"delim\"&&o.value===\"\\\\\"){n({reason:\"unreadable\",...t?{name:t}:{}});return}r.push(o)}return r}function Mn(t,e){let n=t.name.startsWith(\"--\"),r=n?t.name:Si(t.name);if(!n&&!Ti.has(r)){e({reason:\"property\",name:r});return}let o=Ho[r];if(o){let l=t.value.filter(g=>g.type!==\"whitespace\"),c=l[0],d=l.length===1&&c?.type===\"ident\"?ge(c.value):void 0;if(!d||![...o,\"inherit\",\"initial\",\"unset\",\"revert\"].includes(d)){e({reason:\"value\",name:r});return}return`${r}: ${d}${t.important?\" !important\":\"\"}`}let s=xr(n?void 0:r,t.value,e);if(!s)return;let i=it(s).trim();return`${n?`--${In(t.name.slice(2))}`:r}: ${i}${t.important?\" !important\":\"\"}`}function ls(t,e){let n=r=>{for(let o=0;o<r.length;o+=1){let s=r[o];if(o>0&&r[o-1].type===\":\"&&(s.type===\"ident\"||s.type===\"func\")){let l=ge(s.type===\"ident\"?s.value:s.name);if(vi.has(l)||l.startsWith(\"-webkit-\")||l.startsWith(\"-moz-\"))return e({reason:\"selector\",name:l}),!1}if(s.type===\"url\"||s.type===\"bad-url\"||s.type===\"bad-string\"||s.type===\"at-keyword\"||s.type===\"CDO\"||s.type===\"CDC\"||s.type===\"block\"&&s.open===\"{\")return e({reason:\"unreadable\",name:\"selector\"}),!1;if(s.type===\"func\"&&!n(s.value)||s.type===\"block\"&&!n(s.value))return!1}return!0};return n(t)}function Nr(t,e,n){let r=[];for(let o of Rr(t))if(o.type===\"declaration\"){let s=Mn(o,e);s&&r.push(`${s};`)}else{let s=Dn(o,e,n+1,\"style\");s&&r.push(s)}return r.join(\" \")}function Oi(t,e,n){let r=o=>o.every(s=>{if(s.type===\"url\"||s.type===\"bad-url\"||s.type===\"bad-string\"||s.type===\"block\"&&s.open===\"{\")return n({reason:s.type===\"url\"?\"url\":\"unreadable\",name:`@${e}`}),!1;if(s.type===\"func\"){let i=ge(s.name);return e===\"supports\"&&i===\"selector\"?ls(s.value,n):as.has(i)?r(s.value):(n({reason:\"function\",name:i}),!1)}if(s.type===\"block\"){if(e===\"supports\"){let i=Rr(s.value);if(i.length===1&&i[0].type===\"declaration\")return Mn(i[0],n)!==void 0}return r(s.value)}return!0});return r(t)?it(t).trim():void 0}function vr(t){return t.map((e,n)=>{let r=t[n-1],o=r?.type===\":\"||r?.type===\"delim\"&&(r.value===\".\"||r.value===\"|\");return e.type===\"ident\"&&!o&&Object.prototype.hasOwnProperty.call(At,ge(e.value))?{type:\"block\",open:\"[\",value:[{type:\"ident\",value:\"data-graview-as\"},{type:\"delim\",value:\"=\"},{type:\"string\",value:ge(e.value)}]}:e.type===\"func\"?{type:\"func\",name:e.name,value:vr(e.value)}:e.type===\"block\"&&e.open===\"(\"?{type:\"block\",open:\"(\",value:vr(e.value)}:e})}function Dn(t,e,n,r){if(n>os){e({reason:\"unreadable\",name:\"nesting\"});return}if(t.type===\"qualified\"){if(r===\"keyframes\"){if(!t.prelude.every(g=>g.type===\"whitespace\"||g.type===\",\"||g.type===\"percentage\"||g.type===\"ident\"&&[\"from\",\"to\"].includes(ge(g.value)))){e({reason:\"unreadable\",name:\"keyframe\"});return}return`${it(t.prelude).trim()} { ${Nr(t.block,e,n)} }`}if(!ls(t.prelude,e))return;let c=it(vr(t.prelude)).trim();if(c===\"\"){e({reason:\"unreadable\",name:\"selector\"});return}return`${c} { ${Nr(t.block,e,n)} }`}let o=ge(t.name),s=o===\"-webkit-keyframes\"?\"keyframes\":o;if(!xi.has(s)||r===\"keyframes\"){e({reason:\"at-rule\",name:`@${o}`});return}if(!t.block){e({reason:\"unreadable\",name:`@${o}`});return}if(s===\"keyframes\"){if(r!==\"sheet\"){e({reason:\"at-rule\",name:\"@keyframes\"});return}let c=t.prelude.filter(f=>f.type!==\"whitespace\"),d=c[0];if(c.length!==1||!d||d.type!==\"ident\"&&d.type!==\"string\"){e({reason:\"unreadable\",name:\"@keyframes\"});return}let g=st(t.block,!1).map(f=>Dn(f,e,n+1,\"keyframes\")).filter(f=>f!==void 0);return`@keyframes ${d.type===\"ident\"?_n(d.value):Tr(d.value)} { ${g.join(\" \")} }`}let i=Oi(t.prelude,s,e);if(i===void 0)return;let l=r===\"style\"?Nr(t.block,e,n):st(t.block,!1).map(c=>Dn(c,e,n+1,\"sheet\")).filter(c=>c!==void 0).join(\" \");return`@${s} ${i} { ${l} }`}function cs(t,e=hr){let n=[];if(t.length>e)return{css:\"\",refused:[{reason:\"size\"}]};let r=s=>void n.push(s);return{css:st(Ar(t),!0).map(s=>Dn(s,r,0,\"sheet\")).filter(s=>s!==void 0).join(`\n`),refused:n}}function us(t,e=hr){let n=[];if(t.length>e)return{css:\"\",refused:[{reason:\"size\"}]};let r=s=>void n.push(s),o=[];for(let s of Rr(Ar(t))){if(s.type!==\"declaration\"){r({reason:\"unreadable\",name:\"a rule in a style attribute\"});continue}let i=Mn(s,r);i&&o.push(i)}return{css:o.join(\"; \"),refused:n}}function ds(t,e){let n,r=Mn(is(t,Ar(e)),o=>n??=o);return r===void 0||n?{refused:n??{reason:\"unreadable\",name:t}}:{value:r.slice(r.indexOf(\":\")+1).trim()}}function fs(t,e){if(e===\"svg\"){let r=An(t);return r?{namespace:\"svg\",name:r}:{refused:{reason:\"element\",element:t}}}let n=t.toLowerCase();return n===\"svg\"?{namespace:\"svg\",name:\"svg\"}:Object.prototype.hasOwnProperty.call(rt,n)?Object.prototype.hasOwnProperty.call(At,n)?{namespace:\"html\",name:At[n],as:n}:{namespace:\"html\",name:n}:{refused:{reason:\"element\",element:t}}}function kr(t,e){return(t===\"html\"?rt[e]:On[e])?.empty===!0}var Ri=/^[+-]?(\\d+\\.?\\d*|\\.\\d+)([eE][+-]?\\d+)?$/,Ai=/^[0-9A-Za-z\\s.,+\\-%()]*$/,ki=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,Ci=/^data:image\\/(png|gif|jpeg|webp|avif|bmp|svg\\+xml)(;[A-Za-z0-9=._+-]+)*,/i,Pi=/^\\/graview\\/assets\\/[0-9a-f]{64}\\.(png|gif|jpe?g|webp|avif|svg|ico)$/,ms=/\\/graview\\/assets\\/[0-9a-f]{64}\\.(png|gif|jpe?g|webp|avif|svg|ico)$/,_i=/^\\/(?!\\/)(?!(?:.*\\/)?\\.\\.?(?:\\/|$))(?!.*%(?:2e|2f|5c))[^\\\\\\s?#\"'<>]*$/i;function Ii(t,e){if(Pi.test(t))return t;let n=t;if(/^https?:\\/\\//i.test(t))try{let r=new URL(t);if(e===\"null\"||r.origin!==e||r.username!==\"\"||r.password!==\"\"||r.search!==\"\"||r.hash!==\"\")return;n=t.slice(r.origin.length)}catch{return}if(_i.test(n))return ms.exec(n)?.[0]}function ps(t,e={}){let n=t.length>120?`${t.slice(0,119)}\\u2026`:t,r=hs(e.origins),o=ms.exec(t.split(/[?#]/)[0])?.[0],s=o?e.assets?` It is the app's own image only by its path, or under the app's base on this page's origin: write it as its path, ${o}.`:\" This host has not said where the app's own images live (asset, on the view's definition), so a view here cannot draw one by its path.\":/^https:\\/\\//i.test(t)?r.length>0?` Its origin is not one the host lists for images (${r.join(\", \")}).`:\" The host lists no origin a view's images may come from (images.origins, on the view's definition).\":\"\",i=[\"a data: image\",...e.assets?[\"the app's own image by the path add_image answered (/graview/assets/<sha256>.<ext>)\"]:[],\"a picture on a record (pictures in its manifest)\",...r.length>0?[`an https: image from ${r.join(\", \")}`]:[]];return`The image \"${n}\" was not drawn.${s} A view here shows ${i.slice(0,-1).join(\", \")} or ${i[i.length-1]}.`}function hs(t){return(t??[]).flatMap(e=>{try{let n=new URL(e);return n.protocol===\"https:\"&&n.hostname!==\"\"&&n.username===\"\"&&n.password===\"\"?[n.origin]:[]}catch{return[]}})}function Di(t,e){if(!(!e||e.length===0||!/^https:\\/\\//i.test(t)))try{let n=new URL(t);return n.protocol!==\"https:\"||n.username!==\"\"||n.password!==\"\"?void 0:hs(e).includes(n.origin)?n.href:void 0}catch{return}}function Cr(t,e,n,r,o){let s=kn(t,e,n);if(!s)return{refused:{reason:\"attribute\",element:e,name:n}};if(t===\"html\"&&Rn[e]?.includes(s.name))return{refused:{reason:\"attribute\",element:e,name:n}};if(r===null)return{name:s.name,value:null};let i=Mi(s.name,s.kind,r,o);return\"refused\"in i?{refused:{...i.refused,element:e,...s.kind===\"image\"&&i.refused.reason===\"url\"?{address:r.slice(0,200)}:{}}}:s.name===\"role\"&&i.value.split(/\\s+/).some(l=>_o.includes(l.toLowerCase()))?{refused:{reason:\"value\",element:e,name:n}}:s.name===\"aria-live\"&&![\"polite\",\"off\"].includes(i.value.toLowerCase())?{refused:{reason:\"value\",element:e,name:n}}:{name:s.name,value:i.value,...i.dropped?{dropped:i.dropped.map(l=>({reason:l.reason===\"url\"?\"url\":\"css\",element:e,name:s.name,css:l}))}:{}}}function Mi(t,e,n,r){let o=(s,i)=>({refused:{reason:s,name:t,...i?{css:i}:{}}});if(e===\"geometry\")return n.length>Vo||!Ai.test(n)||/url/i.test(n)?o(\"value\"):{value:n};if(e===\"image\"){if(n.length>Uo)return o(\"url\");if(Ci.test(n))return{value:n};if(n.startsWith(`blob:${r.origin}/`)&&/^blob:[^\\s\"'<>]+$/.test(n))return{value:n};let s=r.asset?Ii(n,r.origin):void 0;if(s!==void 0){let l=r.asset(s);if(l)return{value:l}}let i=Di(n,r.imageOrigins);return i?{value:i}:o(\"url\")}if(n.length>gr)return o(\"value\");if(typeof e==\"object\"){let s=e.oneOf.find(i=>i.toLowerCase()===n.toLowerCase());return s===void 0?o(\"value\"):{value:s}}switch(e){case\"text\":return{value:n};case\"number\":return Ri.test(n.trim())&&Number.isFinite(Number(n))?{value:n.trim()}:o(\"value\");case\"boolean\":return{value:\"\"};case\"fragment\":return ki.test(n)?{value:n}:o(\"url\");case\"style\":{let s=us(n,gr);return s.refused.length>0&&s.css===\"\"?o(s.refused[0].reason===\"url\"?\"url\":\"css\",s.refused[0]):{value:s.css,...s.refused.length>0?{dropped:s.refused}:{}}}case\"css\":{let s=ds(t,n);return\"refused\"in s?o(s.refused.reason===\"url\"?\"url\":\"css\",s.refused):{value:s.value}}}}var Li=\"http://www.w3.org/1999/xhtml\",at=class{constructor(e){this.ownerDocument=e}parentNode=null;childNodes=[];get firstChild(){return this.childNodes[0]??null}get parentElement(){return this.parentNode instanceof Me?this.parentNode:null}get textContent(){return this.childNodes.map(e=>e.textContent).join(\"\")}insertBefore(e,n){e.parentNode&&e.parentNode.removeChild(e);let r=n?this.childNodes.indexOf(n):-1;return r<0?this.childNodes.push(e):this.childNodes.splice(r,0,e),e.parentNode=this,e}appendChild(e){return this.insertBefore(e,null)}removeChild(e){let n=this.childNodes.indexOf(e);return n>=0&&this.childNodes.splice(n,1),e.parentNode=null,e}},De=class extends at{constructor(n,r){super(n);this.data=r}nodeType=3;get textContent(){return this.data}},Pr=class extends at{nodeType=8;get textContent(){return\"\"}},Me=class extends at{constructor(n,r,o){super(n);this.namespaceURI=r;this.localName=o}nodeType=1;attributes=new Map;value=\"\";checked=!1;selected=!1;setAttribute(n,r){this.attributes.set(n,String(r))}removeAttribute(n){this.attributes.delete(n)}getAttribute(n){return this.attributes.get(n)??null}hasAttribute(n){return this.attributes.has(n)}closest(n){for(let r=this;r;r=r.parentElement)if(r.localName===n)return r;return null}},_r=class extends at{nodeType=9;constructor(){super(null)}createElementNS(e,n){return new Me(this,e,n)}createElement(e){return new Me(this,Li,e)}createTextNode(e){return new De(this,e)}createComment(e){return new Pr(this)}};function gs(){let t=new _r,e=t.createElement(\"div\");return e.setAttribute(\"data-graview-view-root\",\"\"),t.appendChild(e),{document:t,root:e}}var Ir={h1:1,h2:2,h3:3,h4:4,h5:5,h6:6},ys=new Set([\"a\",\"abbr\",\"b\",\"bdi\",\"bdo\",\"br\",\"cite\",\"code\",\"data\",\"del\",\"dfn\",\"em\",\"i\",\"ins\",\"kbd\",\"q\",\"s\",\"samp\",\"small\",\"span\",\"strong\",\"sub\",\"sup\",\"time\",\"u\",\"var\",\"wbr\",\"label\"]),bs=new Set([\"style\",\"template\",\"datalist\",\"option\"]),$=t=>t.replace(/\\s+/g,\" \").trim();function Hi(t){let e=t.duration===void 0?0:Math.round(t.duration);if(e<1)return\"a video\";if(e<60)return`a ${e}-second video`;let n=Math.round(e/60);return n<60?`a ${n}-minute video`:`a ${Math.floor(n/60)}-hour${n%60>0?` ${n%60}-minute`:\"\"} video`}var J=t=>t instanceof Me,Ct=t=>t.hasAttribute(\"hidden\")||t.getAttribute(\"aria-hidden\")===\"true\";function Y(t){return t instanceof De?t.data:!J(t)||Ct(t)||bs.has(t.localName)?\"\":t.localName===\"br\"?\" \":t.localName===\"img\"?t.getAttribute(\"alt\")??\"\":t.childNodes.map(Y).join(t.localName===\"td\"||t.localName===\"th\"?\" \":\"\")}function*Le(t){for(let e of t.childNodes)J(e)&&(yield e,yield*Le(e))}function Es(t,e){let n=[],r=new Set,o=new Set,s=new Map;for(let f of[...e.props.node?[e.props.node]:[],...e.props.nodes??[]])s.set(f.id,f);let i=f=>kt(e.places,f)!==void 0;for(let f of Le(t)){let b=f.getAttribute(\"data-act\");b!==null&&r.add(b);let T=f.getAttribute(\"data-record\");T!==null&&(o.add(T),!s.has(T)&&!i(T)&&n.push({at:`drawing <${f.localName} data-record=\"${T}\">`,says:`It names \"${T}\", which this seat was not shown and is no place of this app: the host will not follow it. A view goes to a record by its id, or to a place by its slug.${ot(e.places)}`}));let S=f.getAttribute(\"data-place\");S!==null&&!i(S)&&n.push({at:`drawing <${f.localName} data-place=\"${S}\">`,says:`It names the place \"${S}\", which this app does not have.${ot(e.places)}`})}let l=f=>{if(f.localName===\"graview-video\")return;let b=f.getAttribute(\"data-record\");if(b!==null)return b;let T=f.getAttribute(\"data-key\")??f.getAttribute(\"id\");if(T!==null&&s.has(T))return T;let S=new Set;for(let y of Le(f)){let a=y.getAttribute(\"data-record\");a!==null&&y.localName!==\"graview-video\"&&S.add(a)}return S.size===1?[...S][0]:void 0},c=(f,b)=>{let T=s.get(b),S=T?.kind??(b.includes(\":\")?b.slice(0,b.indexOf(\":\")):\"\"),y=[...Le(f)],a=y.find(m=>m.localName in Ir)??y.find(m=>m.localName===\"a\"&&m.getAttribute(\"data-record\")===b)??y.find(m=>m.localName===\"strong\"||m.localName===\"b\"),h=$(a?Y(a):\"\")||T?.label||b,p=g(f,a);return!a&&p[0]?.t===\"text\"&&$(p[0].text)===h&&p.shift(),{id:b,kind:S,title:h,parts:p}},d=f=>{let b=[...Le(f)].filter(a=>a.localName===\"tr\"&&!Ct(a)),T=b.find(a=>a.parentElement?.localName===\"thead\"||a.childNodes.every(h=>!J(h)||h.localName===\"th\")),S=T?T.childNodes.filter(J).map(a=>$(Y(a))):[];return{t:\"list\",as:\"row\",columns:1,groups:[{items:b.filter(a=>a!==T).map(a=>{let h=a.childNodes.filter(J),p=l(a),m=p?s.get(p):void 0;return{id:p??\"\",kind:m?.kind??\"\",title:$(Y(h[0]??a)),parts:h.slice(1).map((E,u)=>({t:\"field\",label:S[u+1]??\"\",text:$(Y(E))}))}})}]}};function g(f,b){let T=[],S=\"\",y=()=>{let h=$(S);S=\"\",h&&T.push({t:\"text\",text:h})},a=f.childNodes;for(let h=0;h<a.length;h+=1){let p=a[h];if(p===b)continue;if(p instanceof De){S+=p.data;continue}if(!J(p)||Ct(p)||bs.has(p.localName))continue;if(b&&[...Le(p)].includes(b)){y(),T.push(...g(p,b));continue}let m=[];for(let E=h;E<a.length;E+=1){let u=a[E];if(u instanceof De&&$(u.data)===\"\")continue;if(!J(u)||Ct(u)||ys.has(u.localName)||u.localName in Ir)break;let N=l(u);if(!N)break;m.push({element:u,id:N}),h=E}if(m.length>0){y();let E=m.every(u=>u.element.localName===\"li\"||u.element.localName===\"tr\");T.push({t:\"list\",as:E?\"row\":\"card\",columns:1,groups:[{items:m.map(u=>c(u.element,u.id))}]});continue}T.push(...w(p,E=>S+=E,y))}return y(),T}function w(f,b,T){let S=f.localName;if(ys.has(S)&&S!==\"label\")return b(Y(f)),[];if(S===\"mark\"){T();let a=$(Y(f));return a?[{t:\"badge\",text:a}]:[]}T();let y=Ir[S]??(f.getAttribute(\"role\")===\"heading\"?Number(f.getAttribute(\"aria-level\")??2):void 0);if(y!==void 0){let a=$(Y(f));return a?[{t:\"heading\",level:y,text:a}]:[]}switch(S){case\"ul\":case\"ol\":case\"menu\":return[{t:\"list\",as:\"row\",columns:1,groups:[{items:f.childNodes.filter(h=>J(h)&&h.localName===\"li\"&&!Ct(h)).map(h=>{let p=l(h);if(p)return c(h,p);let m=g(h),E=m[0],u=E&&(E.t===\"text\"||E.t===\"heading\")?E.text:\"\";return{id:\"\",kind:\"\",title:u,parts:u?m.slice(1):m}})}]}];case\"table\":return[d(f)];case\"dl\":{let a=[],h=\"\";for(let p of f.childNodes.filter(J))if(p.localName===\"dt\")h=$(Y(p));else if(p.localName===\"dd\")a.push({t:\"field\",label:h,text:$(Y(p))});else if(p.localName===\"div\")for(let m of p.childNodes.filter(J))m.localName===\"dt\"?h=$(Y(m)):m.localName===\"dd\"&&a.push({t:\"field\",label:h,text:$(Y(m))});return a}case\"figure\":{let a=f.childNodes.find(m=>J(m)&&m.localName===\"figcaption\"),h=$(f.childNodes.filter(m=>m!==a).map(Y).join(\" \")),p=a?$(Y(a)):\"\";return h?[{t:\"figure\",text:h,...p?{label:p}:{}}]:p?[{t:\"text\",text:p}]:[]}case\"meter\":case\"progress\":{let a=Number(f.getAttribute(\"value\")??0),h=Number(f.getAttribute(\"max\")??1)||1;return[{t:\"progress\",label:f.getAttribute(\"aria-label\")??f.getAttribute(\"title\")??\"\",text:`${Math.round(a/h*100)}%`}]}case\"svg\":{let a=f.childNodes.find(m=>J(m)&&m.localName===\"title\"),h=$(f.getAttribute(\"aria-label\")??(a?Y(a):\"\"));if(h)return[{t:\"text\",text:h,tone:\"picture\"}];let p=[...Le(f)].filter(m=>m.localName===\"text\").map(m=>$(Y(m))).filter(Boolean);return p.length>0?[{t:\"text\",text:p.join(\" \\xB7 \"),tone:\"picture\"}]:[]}case\"img\":{let a=$(f.getAttribute(\"alt\")??\"\");return a?[{t:\"text\",text:a,tone:\"picture\"}]:[]}case\"graview-video\":{let a=f.getAttribute(\"data-field\")??\"\",h=s.get(f.getAttribute(\"data-record\")??\"\"),p=h&&a&&Object.hasOwn(h,a)?h[a]:void 0,m=(Array.isArray(p)?p:[p])[Number(f.getAttribute(\"data-index\")??\"0\")];return!m||typeof m.name!=\"string\"||typeof m.type!=\"string\"||!m.type.startsWith(\"video/\")?(n.push({at:`drawing <graview-video data-field=\"${a}\">`,says:\"It names no video on a record this seat was shown: the host draws no player there. A <graview-video> names a record the view was shown (data-record) and its video field (data-field).\"}),[]):[{t:\"text\",text:`${typeof m.caption==\"string\"&&m.caption.trim()?m.caption.trim():m.name}, ${Hi(typeof m.duration==\"number\"?{duration:m.duration}:{})}`,tone:\"picture\"}]}case\"button\":{let a=$(Y(f));return a?[{t:\"text\",text:a,tone:\"button\"}]:[]}case\"input\":case\"textarea\":case\"select\":{let a=$(f.getAttribute(\"aria-label\")??f.getAttribute(\"placeholder\")??f.getAttribute(\"name\")??\"\"),h=S===\"select\"?$(Y(f.childNodes.find(p=>J(p)&&p.localName===\"option\"&&p.selected)??f)):f.value;return[{t:\"field\",label:a,text:h}]}case\"label\":return g(f);default:return g(f)}}return{parts:g(t),problems:n,acts:[...r],records:[...o]}}var $i=0,Vi=1,Ui=2,ji=3,Ns=1,Gi=2,ws=3,zi=1,Fi=3,Bi=8,Ts=\"~\",Ln=t=>typeof t==\"object\"&&t!==null&&!Array.isArray(t),xs=new Set([\"input\",\"select\",\"textarea\",\"option\"]),Yi=new Set([\"value\",\"checked\",\"selected\"]);function vs(t,e){let n=t.ownerDocument??t,r=e.maxNodes??5e3,o=[],s=new Map,i=new WeakMap,l={dom:t,name:\"div\",namespace:\"html\",children:[],id:Ts};s.set(Ts,l);let c=0,d=!1,g=a=>{o.push(a),o.length>200&&o.shift(),e.onRefused?.(a)},w=()=>({dom:n.createComment(\"\"),children:[],refused:!0}),f=(a,h)=>{if(a.namespace===\"html\"&&a.name&&xs.has(a.name))return a.dom;if(h?.namespace===\"html\"&&h.name===\"textarea\")return h.dom},b=(a,h,p)=>{let m=a.dom;if(p!=null&&typeof p!=\"string\")return g({reason:\"value\",element:a.name,name:h});let E=Cr(a.namespace,a.name,h,p??null,e);if(\"refused\"in E){let O=Cr(a.namespace,a.name,h,null,e);return\"refused\"in O||m.removeAttribute(O.name),g(E.refused)}for(let O of E.dropped??[])g(O);let u=a.namespace===\"html\"&&Yi.has(E.name)&&xs.has(a.name),N=m,R=u?E.name===\"value\"?N.value:E.name===\"checked\"?N.checked:N.selected:void 0;E.value===null?m.removeAttribute(E.name):m.setAttribute(E.name,E.value),e.onAttribute?.(m,E.name),u&&(E.name===\"value\"&&\"value\"in N?(N.value=E.value??\"\",R!==N.value&&e.onFieldSet?.(m)):E.name===\"checked\"&&\"checked\"in N?(N.checked=E.value!==null,R!==N.checked&&e.onFieldSet?.(m)):E.name===\"selected\"&&\"selected\"in N&&(N.selected=E.value!==null,R!==N.selected&&e.onFieldSet?.(m.parentElement?.closest(\"select\")??m)))},T=a=>{if(!a.refused){c-=1,a.id!==void 0&&s.delete(a.id);for(let h of a.children)T(h)}},S=(a,h)=>{if(!Ln(a)||typeof a.id!=\"string\"||s.has(a.id))return g({reason:\"record\"}),w();if(c>=r)return g({reason:\"budget\"}),d||(d=!0,e.onOverBudget?.()),w();let p=a.id;if(a.type===Bi)return w();if(a.type===Fi){if(kr(h.namespace,h.name))return g({reason:\"child\",element:h.name}),w();let R=n.createTextNode(String(a.data??\"\").slice(0,yr)),O={dom:R,children:[],text:!0,id:p,parent:h};return s.set(p,O),i.set(R,p),c+=1,O}if(a.type!==zi)return g({reason:\"record\"}),w();let m=String(a.element);if(kr(h.namespace,h.name))return g({reason:\"child\",element:m}),w();let E=fs(m,h.namespace);if(\"refused\"in E)return g(E.refused),w();let u=n.createElementNS(E.namespace===\"svg\"?Go:jo,E.name);E.as&&u.setAttribute(\"data-graview-as\",E.as),E.namespace===\"html\"&&E.name===\"img\"&&u.setAttribute(\"referrerpolicy\",\"no-referrer\");let N={dom:u,name:E.name,namespace:E.namespace,children:[],id:p,parent:h};if(s.set(p,N),i.set(u,p),c+=1,Ln(a.attributes))for(let[R,O]of Object.entries(a.attributes))b(N,R,O);if(e.decorate?.(u,E.name,E.namespace),Ln(a.properties))for(let R of Object.keys(a.properties))g({reason:\"attribute\",element:E.name,name:R});if(Ln(a.eventListeners))for(let R of Object.keys(a.eventListeners))a.eventListeners[R]!=null&&g({reason:\"attribute\",element:E.name,name:`on${R}`});if(Array.isArray(a.children))for(let R of a.children){let O=S(R,N);N.children.push(O),u.appendChild(O.dom)}return N},y=a=>{if(!Array.isArray(a))return g({reason:\"record\"});let[h,p]=a,m=typeof p==\"string\"?s.get(p):void 0;if(!m)return g({reason:\"record\"});switch(h){case $i:{if(m.text)return g({reason:\"record\"});let E=Number(a[3]),u=Number.isInteger(E)&&E>=0&&E<=m.children.length?E:m.children.length,N=S(a[2],m);m.dom.insertBefore(N.dom,m.children[u]?.dom??null),m.children.splice(u,0,N),m.namespace===\"html\"&&m.name===\"textarea\"&&e.onFieldSet?.(m.dom);return}case Vi:{let E=Number(a[2]),u=m.children[E];if(!u)return g({reason:\"record\"});m.children.splice(E,1),u.dom.parentNode?.removeChild(u.dom),T(u);return}case Ui:{if(!m.text)return g({reason:\"record\"});m.dom.data=String(a[2]??\"\").slice(0,yr);let E=f(m,m.parent);E&&e.onFieldSet?.(E);return}case ji:{if(m===l||m.text)return g({reason:\"record\"});let E=String(a[2]),u=a[4]??Ns;return u===Gi?b(m,E,a[3]):g(u===Ns||u===ws?{reason:\"attribute\",element:m.name,name:u===ws?`on${E}`:E}:{reason:\"record\"})}default:return g({reason:\"record\"})}};return{apply(a,h){if(!Array.isArray(a))return g({reason:\"record\"}),!0;for(let p=0;p<a.length;p+=1){if(h&&p%32===0&&h())return!1;y(a[p])}return!0},get refused(){return o},get size(){return c},idOf:a=>i.get(a),elementOf(a){let h=s.get(a);return h&&!h.text&&h!==l?h.dom:void 0},dispose(){for(let a of l.children)T(a);for(l.children.length=0;t.firstChild;)t.removeChild(t.firstChild)}}}function Ss(t,e,n){let{root:r}=gs(),o=!1,s=vs(r,{origin:n.origin??\"null\",...n.imageOrigins?{imageOrigins:n.imageOrigins}:{},...n.asset?{asset:n.asset}:{},maxNodes:n.maxNodes,onOverBudget:()=>o=!0});for(let c of t)s.apply(c);let i=[...s.refused],l=\"\";if(typeof e==\"string\"){let c=cs(e);l=c.css;for(let d of c.refused)i.push({reason:\"css\",name:\"stylesheet\",css:d})}return{root:r,refused:i,size:s.size,over:o,css:l}}function qi(t,e={}){let n=\"element\"in t&&t.element?`<${t.element}>`:\"\",r=t.name?` ${t.name}`:\"\";switch(t.reason){case\"element\":return{at:`drawing ${n}`,says:`Not drawn: ${n} is not in the open kit.`};case\"attribute\":return{at:`drawing ${n}${r}`,says:`Not drawn: ${n||\"an element\"} does not take${r}.`};case\"value\":return{at:`drawing ${n}${r}`,says:`Not drawn: the value of${r} is not one the open kit takes.`};case\"url\":return{at:`drawing ${n}${r}`,says:t.address!==void 0&&\"element\"in t&&t.element===\"img\"?`Not drawn: ${ps(t.address,e)}`:\"Not drawn: an address. A view loads nothing; an image is a data: image.\"};case\"child\":return{at:`drawing ${n}`,says:`Not drawn: ${n} holds nothing.`};case\"record\":return{at:\"drawing\",says:\"Not drawn: a record the drawing's format does not know.\"};case\"budget\":return{at:\"drawing\",says:\"Not drawn: more nodes than a view may draw.\"};case\"css\":return{at:`stylesheet${r===\" stylesheet\"?\"\":r}`,says:`Not drawn: CSS the open kit leaves out${t.css?` (${t.css.reason}${t.css.name?` ${t.css.name}`:\"\"})`:\"\"}.`}}}function Os(t,e){let{limits:n}=e;if(t.messages>n.messages)return{ok:!1,reason:\"flood\",detail:`It sent ${t.messages} messages, more than the ${n.messages} a view may send in a second.`};let r=new Set(e.acts);for(let c of t.asked)if(!r.has(c.name))return{ok:!1,reason:\"act\",detail:`It asks for the act \"${c.name}\", which its manifest does not name.`};let o=Ss(t.renders,t.css,{maxNodes:n.maxNodes,...e.origin?{origin:e.origin}:{},...e.imageOrigins?{imageOrigins:e.imageOrigins}:{},...e.assets?{asset:c=>c}:{}});if(o.over)return{ok:!1,reason:\"nodes\",detail:`It drew more than the ${n.maxNodes.toLocaleString(\"en-US\")} things a view may draw.`};let s=[...e.places,...(e.lists??[]).filter(c=>!e.places.some(d=>d.as===c)).map(c=>({as:c}))],i=Es(o.root,{props:e.props,places:s});for(let c of i.acts)if(!r.has(c))return{ok:!1,reason:\"act\",detail:`It binds a press to the act \"${c}\" (data-act), which its manifest does not name.`};let l=[...o.refused.map(c=>qi(c,{...e.imageOrigins?{origins:e.imageOrigins}:{},assets:e.assets===!0})),...i.problems];for(let c of t.went)\"record\"in c&&!(e.props.node?.id===c.record||(e.props.nodes??[]).some(d=>d.id===c.record)||kt(s,c.record))&&l.push({at:\"navigate\",says:`It goes to ${Er(c.record)}, which this seat was not shown and is no place of this app: the host will not follow it. A view goes to a record by its id, or to a place by its slug.${ot(s)}`}),\"place\"in c&&!kt(s,c.place)&&l.push({at:\"navigate\",says:`It goes to the place ${Er(c.place)}, which this app does not have.${ot(s)}`});return{ok:!0,parts:i.parts,problems:l}}var Dr=\"graviewHeadless\",Mr=\"graviewHeadlessView\";var ks=globalThis,Wi=Promise.prototype.then,Xi=Promise.resolve(),Hr=t=>void Wi.call(Xi,t),Hn=ks.performance,Pt=Hn&&typeof Hn.now==\"function\"?Hn.now.bind(Hn):Date.now,He=JSON.stringify,Cs=JSON.parse,Ki=Object.defineProperty,$r=t=>(t instanceof Error?`${t.name}: ${t.message}`:String(t)).slice(0,500),$n=t=>{try{return Cs(He(t??null))}catch{return null}},j={renders:[],asked:[],went:[],ms:0,logs:[],messages:0},$e,Vn=(t,e)=>{$e??={reason:t,detail:e}},lt=t=>{j.logs.length<50&&j.logs.push(t.slice(0,500))},ct={removed:[],stuck:[],sealed:!1},Vr=Wo({send(t){j.messages+=1,t.type===\"render\"?j.renders.push($n(t.records)):t.type===\"style\"?j.css=String(t.css):t.type===\"navigate\"&&\"place\"in t?j.went.push({place:String(t.place),...t.where!==void 0?{where:$n(t.where)}:{},...t.section!==void 0?{section:String(t.section)}:{}}):t.type===\"navigate\"&&\"to\"in t&&j.went.push({record:String(t.to),...t.where!==void 0?{where:$n(t.where)}:{},...t.section!==void 0?{section:String(t.section)}:{}})},act(t,e){return j.messages+=1,j.asked.push({name:String(t),args:$n(e)}),Promise.resolve({type:\"answer\",id:j.asked.length,ok:!1,reason:\"refused\",message:\"Nothing is applied in a headless run.\"})},navigate(t){j.messages+=1,j.went.push({record:String(t)})},microtask:Hr,now:Pt,threw:t=>Vn(\"error\",`It threw: ${$r(t)}`),warn:lt,hardening:()=>ct}),Rs=!1,Lr=!1;function Zi(t){if(Lr||typeof t!=\"function\"||(Lr=!0,$e))return;let e=Pt();try{t.call(void 0,Vr.view)}catch(n){Vn(\"error\",`It threw: ${$r(n)}`)}j.ms+=Pt()-e}async function Ji(t){if(Rs)return He({ok:!1,reason:\"refused\",detail:\"A headless script runs one view, once: something called its entry before the host did.\"});Rs=!0;let e;try{e=Cs(String(t))}catch{return He({ok:!1,reason:\"isolate\",detail:\"The run was not handed its input as JSON.\"})}if(!Lr&&!$e)return He({ok:!1,reason:\"isolate\",detail:\"The script held no view.\"});let n=Pt();$e||Vr.hear({type:\"props\",props:e.props,push:1}),j.ms+=Pt()-n,j.ms>=e.limits.pushMs&&Vn(\"slow\",`It took longer than ${e.limits.pushMs.toLocaleString(\"en-US\")} ms to draw what it was shown.`);for(let o=0;o<64&&!$e;o+=1)await new Promise(s=>Hr(s));if($e)return He({ok:!1,...$e,transcript:j});let r=Os(j,e);return r.ok?He({ok:!0,transcript:j,drawn:{parts:r.parts,problems:r.problems},hardening:{removed:ct.removed.length,sealed:ct.sealed}}):He({ok:!1,reason:r.reason,detail:r.detail,transcript:j})}var Qi=Object.freeze({log:(...t)=>lt(t.map(String).join(\" \")),info:(...t)=>lt(t.map(String).join(\" \")),debug:(...t)=>lt(t.map(String).join(\" \")),warn:(...t)=>lt(t.map(String).join(\" \")),error:(...t)=>lt(t.map($r).join(\" \"))}),ea=0,As=()=>ea+=1,ta=[[\"console\",Qi],[\"setTimeout\",As],[\"setInterval\",As],[\"clearTimeout\",()=>{}],[\"clearInterval\",()=>{}],[\"queueMicrotask\",Hr],[\"graview\",Vr.view],[Mr,Zi],[Dr,t=>Ji(t)]];for(let[t,e]of ta)Ki(ks,t,{value:e,writable:!0,enumerable:!1,configurable:!0});ct=Co(globalThis,[\"graview\",Mr,Dr],{primitivesStay:!0});ct.stuck.length>0&&Vn(\"refused\",`This isolate could not be hardened: ${ct.stuck.join(\", \")} would not go.`);})();\n";
8
8
  //# sourceMappingURL=runtime.generated.js.map