@graview/guest 0.1.35 → 0.1.36

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 (43) hide show
  1. package/README.md +8 -0
  2. package/dist/headless/draw.d.ts +1 -0
  3. package/dist/headless/draw.d.ts.map +1 -1
  4. package/dist/headless/draw.js +1 -0
  5. package/dist/headless/draw.js.map +1 -1
  6. package/dist/headless/index.d.ts +12 -0
  7. package/dist/headless/index.d.ts.map +1 -1
  8. package/dist/headless/index.js +11 -3
  9. package/dist/headless/index.js.map +1 -1
  10. package/dist/headless/judge.d.ts +3 -2
  11. package/dist/headless/judge.d.ts.map +1 -1
  12. package/dist/headless/judge.js +6 -5
  13. package/dist/headless/judge.js.map +1 -1
  14. package/dist/headless/protocol.d.ts +4 -0
  15. package/dist/headless/protocol.d.ts.map +1 -1
  16. package/dist/headless/runtime.generated.d.ts.map +1 -1
  17. package/dist/headless/runtime.generated.js +1 -1
  18. package/dist/headless/runtime.generated.js.map +1 -1
  19. package/dist/host/frame.d.ts +2 -0
  20. package/dist/host/frame.d.ts.map +1 -1
  21. package/dist/host/frame.js +1 -1
  22. package/dist/host/frame.js.map +1 -1
  23. package/dist/host/open-judge.d.ts +22 -4
  24. package/dist/host/open-judge.d.ts.map +1 -1
  25. package/dist/host/open-judge.js +58 -14
  26. package/dist/host/open-judge.js.map +1 -1
  27. package/dist/host/pictures.d.ts +8 -0
  28. package/dist/host/pictures.d.ts.map +1 -1
  29. package/dist/host/pictures.js +23 -5
  30. package/dist/host/pictures.js.map +1 -1
  31. package/dist/host/react.d.ts +2 -0
  32. package/dist/host/react.d.ts.map +1 -1
  33. package/dist/host/react.js +7 -1
  34. package/dist/host/react.js.map +1 -1
  35. package/dist/host/view.d.ts +9 -0
  36. package/dist/host/view.d.ts.map +1 -1
  37. package/dist/host/view.js +2 -1
  38. package/dist/host/view.js.map +1 -1
  39. package/dist/host/worker-react.d.ts +2 -0
  40. package/dist/host/worker-react.d.ts.map +1 -1
  41. package/dist/host/worker-react.js +7 -3
  42. package/dist/host/worker-react.js.map +1 -1
  43. 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,Ge=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 Gr(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 $r=/^(?:[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,As=/[\\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){$r.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===\"\"||As.test(i))||(n===\"element\"?!$r.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,ks=typeof performance>\"u\"?Date.now:performance.now.bind(performance),G=class{static NONE=_t;static CAPTURING_PHASE=It;static AT_TARGET=Br;static BUBBLING_PHASE=jn;timeStamp=ks();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 Gn(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(Cs,0,c)}if(t[Le])break}}function Cs(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 $(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=[],$n=!1;function Oe(t){for(let e of t)Lt.push(e),e[1]&&ut.push(e[1]);if(!$n){$n=!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,$n=!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 Ps.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(Gn(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(Gn(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 Ps(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,Gt=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 _s(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 $t(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:Gt):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]=_s(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 Is(t,e){let n=gt(e);return n[0]?.matchers.length?mt(t,n):!1}function Ds(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 Gt: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 Ds(t,s||\"\");case\"not\":return!Is(t,s||\"\");default:W(`:${o}(${s})`)}}return!1}function Ms(t){return t.nodeType===Ue}function yt(t){return Z in t}function Kn(t){return t.nodeType===je}function Ls(t){return t.nodeType===Ge}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(Ls(t))return e.createComment(t.data);if(Ms(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:$t(t,[{type:jt,name:n}])}function qt(t,e){let n=[...new Set(Ct(String(e)))];return zt(t,n.map(r=>({type:Gt,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 Hs(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 Hs(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 $(()=>{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,$e=!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=Vs(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 Vs(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),$e=ro>0,nr=oo>0,Tt=so>0}var ie=class extends Ne{childNodes=new Q;children=new Q;appendChild(e){return $(()=>this[te](e,null))}insertBefore(e,n){return $(()=>this[te](e,n||null))}append(...e){return $(()=>{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 $(()=>{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 $(()=>{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 $(()=>(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 $(()=>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 $t(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 $(()=>this.removeNamedItemImmediately(o=>o.name===r))}removeNamedItemNS(e,n){let r=ce(e),o=String(n);return $(()=>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,$e&&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 $(()=>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&&$e&&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}$(()=>{let o=this[ge];this[ge]=n,$e&&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 Us={amp:\"&\",AMP:\"&\",apos:\"'\",gt:\">\",GT:\">\",lt:\"<\",LT:\"<\",quot:'\"',QUOT:'\"'},js=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,$s=\"|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|\",zs=/^(?: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 Us[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&&js.has(t.localName)}function co(t){let e=t.localName;return t[k]===J&&(e===\"foreignObject\"||e===\"desc\"||e===\"title\")}function Fs(t,e){if($s.includes(`|${t}|`))return!0;if(t!==\"font\")return!1;for(let n of e.matchAll(uo))if(zs.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(Fs(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 Ge:{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?Gr(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=Ge;[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 G(\"\")}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 $(()=>{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 G{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 G{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 G{constructor(e,n){super(e,n),this.promise=n.promise,this.reason=n.reason}};var mn=class extends G{constructor(e,n){super(e,n),this.oldState=n.oldState,this.newState=n.newState}};var pn=class extends G{constructor(e,n={}){super(e,n),this.relatedTarget=n.relatedTarget??null}};var hn=class extends G{constructor(e,n={}){super(e,n),this.clipboardData=n.clipboardData??null}};var gn=class extends V{};var Bs=/^[a-z][^A-Z\\u0000\\t\\n\\f\\r />]*-[^A-Z\\u0000\\t\\n\\f\\r />]*$/u,Ys=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 Bs.test(t)&&!Ys.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 qs=[\"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 qs)e[n]={configurable:!0,enumerable:!0,get:or(()=>t[n]),set:or(r=>{t[n]=r})};return e}function Ws(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=Xs(t,n);(r==null||Ks(r))&&Object.defineProperty(t,n,e[n])}}function Xs(t,e){let n=t;for(;n;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function Ks(t){return[t.value,t.get,t.set].some(e=>typeof e==\"function\"&&e[bo]===!0)}var ke=class extends Ee{[M]={};[kt]=[];[Se]=Js(this);name=\"\";window=this;parent=this;self=this;top=this;document=new xt(this);customElements=new yn;location=globalThis.location;navigator=globalThis.navigator;Event=G;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)Zs(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,Ws(e))}};function Zs(t,e){t[kt].push(e(t)??{})}function Js(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,ei=0;function re(t){let e=cr.get(t);return e==null&&(e=String(ei++),En(t,e)),e}function En(t,e){cr.set(t,e)}var ar=new WeakMap;function ti(t){return ar.get(t)}var lr=new WeakMap;function ni(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 ri=new WeakMap;function oi(t){return ri.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(ti(t)),attributes:ir(ni(t)),eventListeners:ir(oi(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\"],uu=Object.freeze([...So,...vo,...Oo,...Ro]),du=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},si={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\"]}}}},ii=[\"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\"],ai={id:\"text\",class:\"text\",style:\"style\",lang:\"text\",role:\"text\",tabindex:{oneOf:[\"-1\",\"0\"]},transform:\"geometry\",...Object.fromEntries(ii.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 li(t){return/^aria-[a-z]+$/.test(t)}function ci(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\",ui=new Map(Object.keys(xn).map(t=>[t.toLowerCase(),t]));function vn(t){return ui.get(t.toLowerCase())}function On(t,e,n){let r=n.toLowerCase(),o=t===\"html\"?[Qe[e]?.attributes,si]:[xn[e]?.attributes,ai],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(li(r)||ci(r))return{name:r,kind:\"text\"}}function Go(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 $o=\"~\",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([[$o,{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!==$o;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\",di=t=>t.replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g,\"&quot;\").replace(/'/g,\"&#39;\"),fi=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:di(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=Go(a);f&&t.send(f)},html(a,...f){return fi(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,mi=t=>t>=0&&t<=8||t===11||t>=14&&t<=31||t===127,oe=-1;function pi(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 hi(t){let e=pi(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||mi(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(hi(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 gi(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 yi(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 bi(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}${gi(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&&yi(Jo(n),Jo(r))&&(e+=\"/**/\"),e+=bi(r),n=r);return e}var Ei=new Set(Po),ss=new Set(_o),Qo=new Set(Io),Ni=new Set(Do),Ti=new Set(Lo),es=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,me=t=>t.replace(/[A-Z]/g,e=>e.toLowerCase()),wi=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:wi(t.name);if(!n&&!Ei.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(Ti.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 xi(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(!Ni.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=xi(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 Si=/^[+-]?(\\d+\\.?\\d*|\\.\\d+)([eE][+-]?\\d+)?$/,vi=/^[0-9A-Za-z\\s.,+\\-%()]*$/,Oi=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,Ri=/^data:image\\/(png|gif|jpeg|webp|avif|bmp|svg\\+xml)(;[A-Za-z0-9=._+-]+)*,/i,Ai=/^\\/graview\\/assets\\/[0-9a-f]{64}\\.(png|gif|jpe?g|webp|avif|svg|ico)$/;function ds(t,e=[]){let n=t.length>120?`${t.slice(0,119)}\\u2026`:t,r=/^https:\\/\\//i.test(t),o=fs(e),s=r?o.length>0?` Its origin is not one the host lists for images (${o.join(\", \")}).`:\" The host lists no origin a view's images may come from.\":\"\";return`The image \"${n}\" was not drawn.${s} A view shows a data: image, the app's own image (/graview/assets/\\u2026), a picture on a record (pictures in its manifest), or an https: image on an origin the host lists (images.origins).`}function fs(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 ki(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:fs(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=Ci(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 Ci(t,e,n,r){let o=(s,i)=>({refused:{reason:s,name:t,...i?{css:i}:{}}});if(e===\"geometry\")return n.length>Ho||!vi.test(n)||/url/i.test(n)?o(\"value\"):{value:n};if(e===\"image\"){if(n.length>Vo)return o(\"url\");if(Ri.test(n))return{value:n};if(n.startsWith(`blob:${r.origin}/`)&&/^blob:[^\\s\"'<>]+$/.test(n))return{value:n};if(Ai.test(n)&&r.asset){let i=r.asset(n);if(i)return{value:i}}let s=ki(n,r.imageOrigins);return s?{value:s}: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 Si.test(n.trim())&&Number.isFinite(Number(n))?{value:n.trim()}:o(\"value\");case\"boolean\":return{value:\"\"};case\"fragment\":return Oi.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 Pi=\"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,Pi,e)}createTextNode(e){return new Ce(this,e)}createComment(e){return new kr(this)}};function ms(){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},ps=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\"]),hs=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)||hs.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 gs(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)||hs.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)||ps.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(ps.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 _i=0,Ii=1,Di=2,Mi=3,ys=1,Li=2,bs=3,Hi=1,Vi=3,Ui=8,Es=\"~\",In=t=>typeof t==\"object\"&&t!==null&&!Array.isArray(t),Ns=new Set([\"input\",\"select\",\"textarea\",\"option\"]),ji=new Set([\"value\",\"checked\",\"selected\"]);function Ts(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:Es};s.set(Es,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&&Ns.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\"&&ji.has(f.name)&&Ns.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===Ui)return E();if(l.type===Vi){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!==Hi)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 _i:{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 Ii:{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 Di:{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 Mi:{if(a===c||a.text)return p({reason:\"record\"});let f=String(l[2]),T=l[4]??ys;return T===Li?b(a,f,l[3]):p(T===ys||T===bs?{reason:\"attribute\",element:a.name,name:T===bs?`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 ws(t,e,n){let{root:r}=ms(),o=!1,s=Ts(r,{origin:n.origin??\"null\",...n.imageOrigins?{imageOrigins:n.imageOrigins}:{},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 Gi(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: ${ds(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 xs(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=ws(t.renders,t.css,{maxNodes:n.maxNodes,...e.imageOrigins?{imageOrigins:e.imageOrigins}:{}});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=gs(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=>Gi(u,e.imageOrigins)),...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 Os=globalThis,$i=Promise.prototype.then,zi=Promise.resolve(),Mr=t=>void $i.call(zi,t),Dn=Os.performance,At=Dn&&typeof Dn.now==\"function\"?Dn.now.bind(Dn):Date.now,Ie=JSON.stringify,Rs=JSON.parse,Fi=Object.defineProperty,Lr=t=>(t instanceof Error?`${t.name}: ${t.message}`:String(t)).slice(0,500),Mn=t=>{try{return Rs(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}),Ss=!1,Dr=!1;function Bi(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 Yi(t){if(Ss)return Ie({ok:!1,reason:\"refused\",detail:\"A headless script runs one view, once: something called its entry before the host did.\"});Ss=!0;let e;try{e=Rs(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=xs(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 qi=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(\" \"))}),Wi=0,vs=()=>Wi+=1,Xi=[[\"console\",qi],[\"setTimeout\",vs],[\"setInterval\",vs],[\"clearTimeout\",()=>{}],[\"clearInterval\",()=>{}],[\"queueMicrotask\",Mr],[\"graview\",Hr.view],[Ir,Bi],[_r,t=>Yi(t)]];for(let[t,e]of Xi)Fi(Os,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\"),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";
8
8
  //# sourceMappingURL=runtime.generated.js.map