@graview/guest 0.1.60 → 0.1.62

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 (90) hide show
  1. package/README.md +69 -4
  2. package/dist/audit/page.generated.js +1 -1
  3. package/dist/cli.d.ts.map +1 -1
  4. package/dist/cli.js +5 -4
  5. package/dist/cli.js.map +1 -1
  6. package/dist/headless/describe.d.ts +16 -1
  7. package/dist/headless/describe.d.ts.map +1 -1
  8. package/dist/headless/describe.js +33 -4
  9. package/dist/headless/describe.js.map +1 -1
  10. package/dist/headless/draw.d.ts +6 -3
  11. package/dist/headless/draw.d.ts.map +1 -1
  12. package/dist/headless/draw.js +4 -2
  13. package/dist/headless/draw.js.map +1 -1
  14. package/dist/headless/index.d.ts +13 -1
  15. package/dist/headless/index.d.ts.map +1 -1
  16. package/dist/headless/index.js +9 -5
  17. package/dist/headless/index.js.map +1 -1
  18. package/dist/headless/judge.d.ts +7 -2
  19. package/dist/headless/judge.d.ts.map +1 -1
  20. package/dist/headless/judge.js +3 -3
  21. package/dist/headless/judge.js.map +1 -1
  22. package/dist/headless/press.d.ts +4 -2
  23. package/dist/headless/press.d.ts.map +1 -1
  24. package/dist/headless/press.js.map +1 -1
  25. package/dist/headless/runtime.generated.d.ts.map +1 -1
  26. package/dist/headless/runtime.generated.js +1 -1
  27. package/dist/headless/runtime.generated.js.map +1 -1
  28. package/dist/host/css.d.ts +2 -124
  29. package/dist/host/css.d.ts.map +1 -1
  30. package/dist/host/css.js +8 -987
  31. package/dist/host/css.js.map +1 -1
  32. package/dist/host/device-pace.d.ts +21 -0
  33. package/dist/host/device-pace.d.ts.map +1 -0
  34. package/dist/host/device-pace.js +52 -0
  35. package/dist/host/device-pace.js.map +1 -0
  36. package/dist/host/draw-budget.d.ts +2 -1
  37. package/dist/host/draw-budget.d.ts.map +1 -1
  38. package/dist/host/draw-budget.js +4 -2
  39. package/dist/host/draw-budget.js.map +1 -1
  40. package/dist/host/links-words.d.ts +9 -1
  41. package/dist/host/links-words.d.ts.map +1 -1
  42. package/dist/host/links-words.js.map +1 -1
  43. package/dist/host/links.d.ts +20 -5
  44. package/dist/host/links.d.ts.map +1 -1
  45. package/dist/host/links.js +55 -11
  46. package/dist/host/links.js.map +1 -1
  47. package/dist/host/media.d.ts +7 -0
  48. package/dist/host/media.d.ts.map +1 -1
  49. package/dist/host/media.js +61 -7
  50. package/dist/host/media.js.map +1 -1
  51. package/dist/host/open-draw.d.ts +21 -1
  52. package/dist/host/open-draw.d.ts.map +1 -1
  53. package/dist/host/open-draw.js +57 -3
  54. package/dist/host/open-draw.js.map +1 -1
  55. package/dist/host/pictures.d.ts.map +1 -1
  56. package/dist/host/pictures.js +2 -1
  57. package/dist/host/pictures.js.map +1 -1
  58. package/dist/host/session.d.ts.map +1 -1
  59. package/dist/host/session.js +3 -2
  60. package/dist/host/session.js.map +1 -1
  61. package/dist/host/theme.d.ts +7 -1
  62. package/dist/host/theme.d.ts.map +1 -1
  63. package/dist/host/theme.js.map +1 -1
  64. package/dist/host/view-runtime.generated.d.ts.map +1 -1
  65. package/dist/host/view-runtime.generated.js +1 -1
  66. package/dist/host/view-runtime.generated.js.map +1 -1
  67. package/dist/host/view.d.ts +30 -7
  68. package/dist/host/view.d.ts.map +1 -1
  69. package/dist/host/view.js +55 -9
  70. package/dist/host/view.js.map +1 -1
  71. package/dist/host/where.d.ts.map +1 -1
  72. package/dist/host/where.js +3 -0
  73. package/dist/host/where.js.map +1 -1
  74. package/dist/host/worker-react.d.ts.map +1 -1
  75. package/dist/host/worker-react.js +6 -5
  76. package/dist/host/worker-react.js.map +1 -1
  77. package/dist/host/worker-start.d.ts +7 -2
  78. package/dist/host/worker-start.d.ts.map +1 -1
  79. package/dist/host/worker-start.js +3 -1
  80. package/dist/host/worker-start.js.map +1 -1
  81. package/dist/host/worker.js +1 -1
  82. package/dist/host/worker.js.map +1 -1
  83. package/dist/open-kit.d.ts +1 -48
  84. package/dist/open-kit.d.ts.map +1 -1
  85. package/dist/open-kit.js +7 -120
  86. package/dist/open-kit.js.map +1 -1
  87. package/dist/protocol.d.ts +2 -0
  88. package/dist/protocol.d.ts.map +1 -1
  89. package/dist/protocol.js.map +1 -1
  90. 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 D=Symbol(\"name\"),_e=Symbol(\"prefix\"),Ie=Symbol(\"value\"),M=Symbol(\"ns\"),se=Symbol(\"owner\"),F=Symbol(\"owner_document\"),Ee=Symbol(\"attributes\"),B=Symbol(\"prev\"),k=Symbol(\"next\"),L=Symbol(\"child\"),ie=Symbol(\"parent\"),De=Symbol(\"host\"),ue=Symbol(\"data\"),je=Symbol(\"listeners\"),ir=Symbol(\"isTrusted\"),Je=Symbol(\"path\"),Qe=Symbol(\"stop_immediate_propagation\"),et=Symbol(\"dispatching\"),ve=Symbol(\"content\"),Y=Symbol(\"hooks\"),Xt=Symbol(\"extensions\"),Ve=Symbol(\"hooks_dispatch\"),Z=Symbol(\"is_connected\"),tt=Symbol(\"create_element\"),to=0,le=1,nt=2,rt=3,ot=8,ze=9,no=10,Me=11,U=\"http://www.w3.org/1999/xhtml\",fe=\"http://www.w3.org/2000/svg\",ro=\"http://www.w3.org/XML/1998/namespace\",St=\"http://www.w3.org/2000/xmlns/\";function Kt(t){return t.split(/[\\t\\n\\f\\r ]+/).filter(Boolean)}function X(t){return t.replace(/[A-Z]/g,e=>String.fromCharCode(e.charCodeAt(0)+32))}function oo(t){return t.replace(/[a-z]/g,e=>String.fromCharCode(e.charCodeAt(0)-32))}function j(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 so=/^(?:[A-Za-z][^\\0\\t\\n\\f\\r\\u0020/>]*|[:_\\u0080-\\u{10FFFF}][A-Za-z0-9-.:_\\u0080-\\u{10FFFF}]*)$/u,io=/[\\0\\t\\n\\f\\r />=]/u,ii=/[\\0\\t\\n\\f\\r />]/u;function Se(t){if(t==null)return null;let e=String(t);return e===\"\"?null:e}function ao(t){so.test(t)||lr(t)}function ar(t){(t===\"\"||io.test(t))&&lr(t)}function Zt(t,e,n){let r=Se(t),o=String(e),s=o.indexOf(\":\"),i=s<0?null:o.slice(0,s),a=s<0?o:o.slice(s+1);if((i!=null&&(i===\"\"||ii.test(i))||(n===\"element\"?!so.test(a):a===\"\"||io.test(a)))&&lr(o),i!=null&&r==null)throw j(`A namespace is required for the prefix in \"${o}\"`,\"NamespaceError\");if(i===\"xml\"&&r!==ro)throw j(\"The xml prefix requires the XML namespace\",\"NamespaceError\");if((o===\"xmlns\"||i===\"xmlns\")&&r!==St)throw j(\"The xmlns name requires the XMLNS namespace\",\"NamespaceError\");if(r===St&&o!==\"xmlns\"&&i!==\"xmlns\")throw j(\"The XMLNS namespace requires the xmlns name or prefix\",\"NamespaceError\");return{namespace:r,qualifiedName:o,prefix:i,localName:a}}function lr(t){throw j(`Invalid name: \"${t}\"`,\"InvalidCharacterError\")}var Jt=0,Qt=1,lo=2,cr=3,ai=typeof performance>\"u\"?Date.now:performance.now.bind(performance),J=class{static NONE=Jt;static CAPTURING_PHASE=Qt;static AT_TARGET=lo;static BUBBLING_PHASE=cr;timeStamp=ai();target=null;currentTarget=null;srcElement=null;bubbles=!1;cancelable=!1;composed=!1;defaultPrevented=!1;cancelBubble=!1;eventPhase=Jt;[Je]=[];[Qe]=!1;[et]=!1;constructor(e,n){this.type=e,Object.defineProperty(this,ir,{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[ir]}composedPath(){return[...this[Je]]}stopPropagation(){this.cancelBubble=!0}stopImmediatePropagation(){this[Qe]=!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 dr(t,e,n){if(t.cancelBubble)return;let o=e[je]?.get(t.type)?.[n===Qt?\"capture\":\"bubble\"];if(o)for(let s of[...o]){if(!o.has(s)||s.signal?.aborted)continue;t.eventPhase=t.target===e?lo:n,t.currentTarget=e;let i=s.normalizedListener;try{typeof i==\"object\"?i.handleEvent(t):i.call(e,t)}catch(a){setTimeout(li,0,a)}if(t[Qe])break}}function li(t){throw t}var kt=[],en=new WeakMap;function tn(t,e){let n=en.get(t);n?n.push(e):en.set(t,[e]),kt[kt.length-1].push(t)}function Q(t){let e=[];kt.push(e);let n;try{n=t()}catch(r){kt.pop();try{co(e)}catch{}throw r}return kt.pop(),co(e),n}function co(t){let e,n=!1;for(let r of t){let o=en.get(r);if(o){for(;o.length>0;){let s=o.shift();try{s()}catch(i){n||(e=i,n=!0)}}en.delete(r)}}if(n)throw e}var nn=[],Ot=[],ur=!1;function Fe(t){for(let e of t)nn.push(e),e[1]&&Ot.push(e[1]);if(!ur){ur=!0;try{let e,n=!1;for(let r=0;r<nn.length;r++){let[o,s]=nn[r];s&&Ot.splice(Ot.indexOf(s),1);try{o()}catch(i){n||(e=i,n=!0)}}if(n)throw e}finally{nn.length=0,Ot.length=0,ur=!1}}}function At(t){let e=t;for(;e;){if(Ot.includes(e))return!0;e=e[ie]??e[De]}return!1}var Rt=Symbol(\"listenerRegistrations\"),Le=class{[je]=void 0;[Rt]=void 0;[F]=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 a=fr(o),l=this[Rt];l||(l=new Map,this[Rt]=l);let c=l.get(e);c||(c={},l.set(e,c));let u=c[a];if(u||(u=new Map,c[a]=u),u.has(n))return;let w=this,d={type:e,listener:n,capture:o,once:s,normalizedListener:n,signal:i};(s||i)&&(d.normalizedListener=function(...f){if(d.signal?.aborted){rn(w,d);return}return d.once&&rn(w,d),typeof d.listener==\"object\"?d.listener.handleEvent(...f):d.listener.call(this,...f)});let p=this[je];p||(p=new Map,this[je]=p);let N=p.get(e);N||(N={},p.set(e,N));let v=N[a];if(v||(v=new Set,N[a]=v),u.set(n,d),v.add(d),i){let m=()=>{rn(w,d)};d.abortListener=m,i.addEventListener(\"abort\",m,{once:!0})}this[F]?.defaultView[Ve].addEventListener?.(this,e,n,r)}removeEventListener(e,n,r){return ci.call(this,e,n,r)}dispatchEvent(e){if(e[et])throw j(\"Failed to execute 'dispatchEvent' on 'EventTarget': The event is already being dispatched.\",\"InvalidStateError\");e[et]=!0;try{let n=[],r=this;for(;r!=null;)n.push(r),r=r.parentNode;e.target=this,e.srcElement=this,e[Je]=n;for(let s=n.length;s--;)if(dr(e,n[s],Qt),e.cancelBubble)return!e.defaultPrevented;let o=e.bubbles?n:n.slice(0,1);for(let s=0;s<o.length;s++)if(dr(e,o[s],cr),e.cancelBubble)return!e.defaultPrevented;return!e.defaultPrevented}finally{e[et]=!1,e.cancelBubble=!1,e[Qe]=!1,e.eventPhase=Jt,e.currentTarget=null,e[Je]=[]}}};function ci(t,e,n){if(e==null)return;let r=n===!0||n&&n.capture===!0,o=fr(!!r),s=this[Rt]?.get(t)?.[o]?.get(e);s&&rn(this,s)}function fr(t){return t?\"capture\":\"bubble\"}function rn(t,e){let n=fr(e.capture),r=t[Rt],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[je],a=i?.get(e.type);if(!a)return;let l=a[n];l?.delete(e)&&(l.size===0&&delete a[n],!a.bubble&&!a.capture&&i?.delete(e.type),t[F]?.defaultView[Ve].removeEventListener?.(t,e.type,e.listener,e.capture))}var me=class extends Array{item(e){return this[e]??null}};var Pt=0,uo=1,hr=2,gr=3,_t=4,fo=0,mo=1,an=2,ln=3,po=4,pr=5,ho=6,go=7,on=/^(?:--|-?[A-Za-z_\\u0080-\\u{10FFFF}])[A-Za-z0-9_\\u0080-\\u{10FFFF}-]*$/u;function di(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 ae(t){throw j(`Invalid or unsupported selector: \"${t}\"`,\"SyntaxError\")}function cn(t,e){let n=typeof e==\"string\"?It(e):[{combinator:_t,matchers:e}],r=null,o=t[L];return o&&n[0].matchers.length&&yr(o,n,s=>(r=s,!1)),r}function dn(t,e){let n=typeof e==\"string\"?It(e):[{combinator:_t,matchers:e}],r=new me,o=t[L];return o&&n[0].matchers.length&&yr(o,n,s=>{r.push(s)}),r}function It(t,e=!1,n=!1){let r={combinator:_t,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===\"\"&&ae(t);let a=0,l;for(;l=s.exec(i);){l.index!==a&&ae(t),l[1]&&(r.matchers.length===0&&!(n&&o.length===1)&&ae(t),l[1]===\">\"?r.combinator=uo:l[1]===\"+\"?r.combinator=gr:l[1]===\"~\"?r.combinator=hr:r.combinator=Pt,r={combinator:_t,matchers:[]},o.push(r));let c=l[8]?X(l[8]):l[2]||l[7];l[7]!=null&&!l[6]&&r.matchers.length>0&&ae(t);let w,d=l[4]??l[5]??l[7];if(l[2]){on.test(c)||ae(t);let p=l[5],N=p?.[0];if(l[3]==null&&(N==='\"'||N===\"'\")){let v=l[0].lastIndexOf(p);d=i.slice(l.index+v+1),s.lastIndex=i.length}else p!=null&&!on.test(p)&&ae(t);w=po}else l[6]?(on.test(c)||ae(t),w=l[6]===\"#\"?an:ln):l[8]?w=l[9]==null?pr:ho:l[7]===\"*\"?w=fo:l[7]&&on.test(l[7])?w=mo:ae(t);l[9]?([d,s.lastIndex]=di(i,s.lastIndex),c!==\"has\"&&c!==\"not\"&&ae(t),c===\"has\"&&e&&ae(t),It(d,e||c===\"has\",c===\"has\")):w===pr&&ae(t),r.matchers.push({type:w,name:c,value:d}),a=s.lastIndex}return(a!==i.length||r.matchers.length===0)&&ae(t),o}function ui(t,e){let n=It(e);return n[0]?.matchers.length?Ct(t,n):!1}function fi(t,e){let n=It(e,!0,!0),r=n[0];if(n.length===1&&r.matchers.length===0)return!1;let o=Pt,s={type:go,name:\":scope\"};if(r.matchers.length===0?(o=r.combinator,r.matchers.push(s)):n.unshift({combinator:Pt,matchers:[s]}),n.some(({matchers:l})=>l.length===0))return!1;let i=o===gr||o===hr?t[k]:t[L];if(!i)return!1;let a=!1;return yr(i,n,()=>(a=!0,!1),t),a}function yr(t,e,n,r){let o=[],s=t;for(;s;){if(oe(s)){if(Ct(s,e,r)&&n(s)===!1)return!1;let i=s[L];if(i){let a=s[k];a&&o.push(a),s=i;continue}}s=s[k]??o.pop()??null}return!0}function Ct(t,e,n){let{combinator:r,matchers:o}=e[e.length-1];if(r===_t){if(!sn(t,o,n))return!1;let a=e.slice(0,-1);return a.length===0||Ct(t,a,n)}let s=r===uo||r===Pt?ie:B,i=t[s];if(!i)return!1;if(r===Pt||r===hr){for(;i;){if(oe(i)&&sn(i,o,n)){let a=e.slice(0,-1);if(a.length===0||Ct(i,a,n))return!0}i=i[s]}return!1}else{if(r===gr&&!oe(i)){for(;i&&!oe(i);)i=i[s];if(!i)return!1}if(!oe(i)||!sn(i,o,n))return!1;let a=e.slice(0,-1);return a.length===0||Ct(i,a,n)}}function mr(t,e){return t.getAttributeNS(null,t.namespaceURI===U?X(e):e)}function sn(t,e,n){if(!t)return!1;if(Array.isArray(e)){for(let i of e)if(sn(t,i,n)===!1)return!1;return!0}let{type:r,name:o,value:s}=e;switch(r){case fo:return o===\"*\";case mo:return t.namespaceURI===U?t.localName===X(o):t.localName===o;case an:return mr(t,\"id\")===o;case ln:let i=mr(t,\"class\");return i?Kt(i).includes(o):!1;case po:let a=mr(t,o);return s==null?a!=null:a===s;case go:return t===n;case pr:ae(`:${o}`);case ho:switch(o){case\"has\":return fi(t,s||\"\");case\"not\":return!ui(t,s||\"\");default:ae(`:${o}(${s})`)}}return!1}function mi(t){return t.nodeType===nt}function Dt(t){return ue in t}function Er(t){return t.nodeType===rt}function pi(t){return t.nodeType===ot}function oe(t){return t.nodeType===le}function br(t){return t.nodeType===Me}function wo(t){return\"appendChild\"in t}function un(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 a=[];for(let l of Lt(i)){if(o.has(l)||(o.add(l),e.push(l),a.push(l),!oe(l)))continue;let c=l[Ee];if(c)for(let w of c)o.has(w)||(o.add(w),e.push(w));let u=l[ve];u&&!o.has(u)&&!r.has(u)&&(r.add(u),n.push(u))}s??=a}return{nodes:e,treeNodes:s}}function Mt(t,e){for(let n of t)n[F]=e}function yo(t,e){let n=t.constructor,r=new n(t.name,t.value,t.namespaceURI);return r[F]=e,r}function bo(t,e){if(Er(t))return e.createTextNode(t.data);if(pi(t))return e.createComment(t.data);if(mi(t))return yo(t,e);if(oe(t)){let n=e[tt](t[D],t.namespaceURI,t[_e],t.localName);if(t[Ee])for(let r=0;r<t[Ee].length;r++){let o=t[Ee].item(r);n.attributes.setNamedItem(yo(o,e))}return n}else{if(br(t))return e.createDocumentFragment();{let n=new t.constructor;return n[F]=e,n}}}function fn(t,e,n=t.ownerDocument){if(t.nodeType===ze)throw j(\"Cannot clone a document node\",\"NotSupportedError\");let r=bo(t,n);if(!e||!oe(t)&&!br(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],a,l;if(i.cloningContent)if(i.contentSource&&i.contentDestination)a=i.contentSource.childNodes[i.childIndex++],l=i.contentDestination;else{s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}else if(a=i.source.childNodes[i.childIndex++],l=i.destination,!a){if(i.cloningContent=!0,i.childIndex=0,oe(i.source)&&i.source.namespaceURI===U&&i.source.localName===\"template\"){let u=i.source[ve];u&&(o.has(u)&&Eo(),o.add(u),i.contentSource=u,i.contentDestination=i.destination.content)}continue}if(!a){s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}o.has(a)&&Eo(),o.add(a);let c=bo(a,n);oe(a)||br(a)?s.push({source:a,destination:c,appendTo:l,childIndex:0,cloningContent:!1}):l.appendChild(c)}return r}function Eo(){throw new Error(\"Cannot clone a cyclic or repeated node graph\")}function mn(t,e){let n=String(e);return n===\"\"?null:cn(t,[{type:an,name:n}])}function pn(t,e){let n=[...new Set(Kt(String(e)))];return dn(t,n.map(r=>({type:ln,name:r})))}function hn(t,e){let n=String(e),r=X(n),o=[];for(let s of gn(t))oe(s)&&(n===\"*\"||(s.namespaceURI===U?s[D]===r:s[D]===n))&&o.push(s);return o}function gn(t){let e=[],n=[],r=t[L];for(;r;){e.push(r);let o=r[L],s=r[k];o?(s&&n.push(s),r=o):r=s??n.pop()??null}return e}function Lt(t){let e=gn(t);return e.unshift(t),e}var pe=class extends Le{nodeType=to;[D]=\"\";[ie]=null;[De]=null;[L]=null;[B]=null;[k]=null;[Z]=!1;get[Y](){return this[F].defaultView[Ve]}get localName(){return this[D]}get nodeName(){return this[D]}get ownerDocument(){return this[F]}get isConnected(){return this[Z]}isDefaultNamespace(e){let n=Se(e);return hi(this)===n}get parentNode(){return this[ie]}set parentNode(e){}get parentElement(){let e=this[ie];return!e||e.nodeType!==1?null:e}set parentElement(e){}get previousSibling(){return this[B]}set previousSibling(e){}get nextSibling(){return this[k]}set nextSibling(e){}get previousElementSibling(){let e=this[B];for(;e&&e.nodeType!==1;)e=e[B];return e}set previousElementSibling(e){}get nextElementSibling(){let e=this[k];for(;e&&e.nodeType!==1;)e=e[k];return e}set nextElementSibling(e){}get firstChild(){return this[L]}set firstChild(e){}get lastChild(){let e=this[L];for(;e;){let n=e[k];if(n==null)break;e=n}return e}set lastChild(e){}get nodeValue(){return Dt(this)?this.data:null}set nodeValue(e){Dt(this)&&(this.data=e)}get textContent(){if(Dt(this))return this.data;let e=\"\";for(let n of gn(this))Er(n)&&(e+=n.data);return e}set textContent(e){if(Dt(this))this.data=e;else if(wo(this)){let n=e==null?\"\":String(e);n===\"\"?this.replaceChildren():this.replaceChildren(n)}}cloneNode(e){return fn(this,e)}contains(e){let n=e;for(;n!=null;){if(n===this)return!0;n=n.parentNode}return!1}};function hi(t){let e=t;for(;e;)switch(e.nodeType){case le:{let n=e;if(n.prefix==null&&n.namespaceURI!=null)return n.namespaceURI;let r=n.attributes.getNamedItemNS(St,\"xmlns\");if(r!=null&&r.prefix==null)return Se(r.value);e=n.parentElement;break}case ze:e=e.documentElement;break;case no:case Me:return null;case nt:e=e.ownerElement;break;default:e=e.parentElement}return null}var he=Symbol(\"insertNode\"),xr=Symbol(\"preflightInsertions\"),yn=Symbol(\"replaceNode\"),He=class extends pe{remove(){let e=this.parentNode;e&&e.removeChild(this)}replaceWith(...e){let n=Be(e),r=this.parentNode;if(r)return wr(o=>{ke(r,n);let s=this[k];for(;s&&n.includes(s);)s=s[k];let i=Nr(r,n,o);this.parentNode===r?r[yn](i,this,o):r[he](i,s,o)})}before(...e){let n=Be(e),r=this.parentNode;if(r)return wr(o=>{ke(r,n);let s=this[B];for(;s&&n.includes(s);)s=s[B];let i=Nr(r,n,o);r[he](i,s?s[k]:r.firstChild,o)})}after(...e){let n=Be(e),r=this.parentNode;if(r)return wr(o=>{ke(r,n);let s=this[k];for(;s&&n.includes(s);)s=s[k];let i=Nr(r,n,o);r[he](i,s,o)})}};function wr(t){return Q(()=>{let e=[];try{t(e)}catch(n){try{Fe(e)}catch{}throw n}Fe(e)})}function Be(t){return t.map(e=>e instanceof pe?e:String(e))}function Ht(t,e){return e instanceof pe?e:t.ownerDocument.createTextNode(String(e))}function ke(t,e){for(let n of e){if(!(n instanceof pe))continue;let r=t;for(;r;){if(r===n)throw j(\"Cannot insert a node into itself or one of its descendants\",\"HierarchyRequestError\");r=r[ie]??r[De]}}}function Nr(t,e,n){let r=[];for(let s of e)r.push(Ht(t,s));if(r.length===1)return r[0];let o=t.ownerDocument.createDocumentFragment();o[xr](r);for(let s of r)o[he](s,null,n);return o}var bn,Tr=0,No=0,xo=0,To=0,st=!1,Sr=!1,$t=!1,En=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=gi(n),o=bn??=new WeakMap,s=o.get(e);s==null&&(s=new Map,o.set(e,s));let i=s.get(this);i==null?Tr++:vr(i,-1),s.set(this,r),vr(r,1),this.#e.add(e)}disconnect(){let e=bn;if(e!=null){for(let n of this.#e){let r=e.get(n),o=r?.get(this);o!=null&&(r.delete(this),Tr--,vr(o,-1)),r?.size===0&&e.delete(n)}this.#e.clear(),this.#n.length=0,Tr===0&&(bn=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 ge(t){let e=bn;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 a=!1;if(t.type===\"attributes\"){if(!i.attributes||i.attributeFilter&&!i.attributeFilter.has(t.attributeName??\"\"))continue;a=i.attributeOldValue}else if(t.type===\"characterData\"){if(!i.characterData)continue;a=i.characterDataOldValue}else if(!i.childList)continue;n.set(s,n.get(s)===!0||a)}r=r.parentNode}for(let[o,s]of n)o.enqueue({addedNodes:t.addedNodes??new me,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 me,target:t.target,type:t.type})}function wn(...t){let e=new me;return e.push(...t),e}function gi(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 vr(t,e){t.attributes&&(No+=e),t.characterData&&(xo+=e),t.childList&&(To+=e),st=No>0,Sr=xo>0,$t=To>0}var we=class extends He{childNodes=new me;children=new me;appendChild(e){return Q(()=>this[he](e,null))}insertBefore(e,n){return Q(()=>this[he](e,n||null))}append(...e){return Q(()=>{let n=Be(e.filter(r=>r!=null));n.length>1&&ke(this,n);for(let r of n)this[he](Ht(this,r),null)})}prepend(...e){return Q(()=>{let n=Be(e.filter(o=>o!=null));n.length>1&&ke(this,n);let r=this.firstChild;for(let o of n)this[he](Ht(this,o),r)})}replaceChildren(...e){return Q(()=>{let n=Be(e.filter(o=>o!=null));ke(this,n);let r;for(;r=this.firstChild;)this.removeChildImmediately(r);for(let o of n)this[he](Ht(this,o),null)})}removeChild(e){return Q(()=>(this.removeChildImmediately(e),e))}removeChildImmediately(e){if(e.parentNode!==this)throw j(\"The node is not a child of this node\",\"NotFoundError\");let n=this[Z]?Lt(e):void 0,r=e[B],o=e[k],s=Nn(this,e);if(n)for(let i of n)i[Z]=!1;this.queueRemovalMutationRecord(this,e,r,o),n&&this.enqueueTreeReactions(n,\"disconnectedCallback\"),Fe(this.collectRemovalHookEffects(e,s))}replaceChild(e,n){return Q(()=>this[yn](e,n))}[yn](e,n,r){if(ke(this,[e]),n.parentNode!==this)throw j(\"The reference node is not a child of this parent\",\"NotFoundError\");let o=n[B],s=n[k],i=this.prepareInsertion(e),a=this[Z]?Lt(n):void 0,l=new Set(i.map(({node:d})=>d)),c=s;for(;c&&l.has(c);)c=c[k];let u=Nn(this,n);if(a){for(let p of a)p[Z]=!1;let d=new Set(a);for(let p of i)d.has(p.node)&&(p.shouldDisconnect=!1)}this.commitInsertion(i,c);let w=this[Z];return this.queueRemovalMutationRecord(this,n,o,s),this.queueInsertionMutationRecords(i),a&&this.enqueueTreeReactions(a,\"disconnectedCallback\"),this.enqueueInsertionReactions(i,w),this.performOrCollectHookEffects([...this.collectRemovalHookEffects(n,u),...this.collectInsertionHookEffects(i)],r),n}querySelectorAll(e){return dn(this,e)}querySelector(e){return cn(this,e)}[he](e,n,r){return this.validateInsertion(e,n),this.insertIntoValidated(e,n,r),e}[xr](e){for(let n of e)this.validateInsertion(n,null),this.prepareInsertion(n)}validateInsertion(e,n){if(ke(this,[e]),n&&n.parentNode!==this)throw j(\"The reference node is not a child of this parent\",\"NotFoundError\")}insertIntoValidated(e,n,r){e===n&&(n=e[k]);let o=this.prepareInsertion(e);this.commitInsertion(o,n);let s=this[Z];this.queueInsertionMutationRecords(o),this.enqueueInsertionReactions(o,s),this.performOrCollectHookEffects(this.collectInsertionHookEffects(o),r)}performOrCollectHookEffects(e,n){n?n.push(...e):Fe(e)}prepareInsertion(e){let n=[];if(e.nodeType===Me){let i=e[L];for(;i;)n.push(i),i=i[k]}else n.push(e);let r=this[Z],o=this[F],s=[];for(let i of n){let a=i[Z],l=a||r,c,u;if(i[F]===o)l&&(c=Lt(i));else{let w=un(i);u=w.nodes,l&&(c=w.treeNodes)}s.push({node:i,nodes:c,adoption:u,shouldDisconnect:a})}return s}commitInsertion(e,n){for(let s of e){let i=s.node[ie];if(i){let a=s.node[B],l=s.node[k];s.source={parent:i,index:Nn(i,s.node),previousSibling:a,nextSibling:l}}}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[F];for(let{adoption:s}of e)s&&Mt(s,r);let o=this[Z];for(let{nodes:s}of e)if(s)for(let i of s)i[Z]=o}attachChild(e,n){if(n){let s=n[B];e[k]=n,e[B]=s,s?s[k]=e:this[L]=e,n[B]=e}else{e[k]=null;let s=this[L];if(s){let i;for(;i=s[k];)s=i;s[k]=e,e[B]=s}else this[L]=e,e[B]=null}let r=oe(e);e[ie]=this;let o;if(n){if(o=this.childNodes.indexOf(n),this.childNodes.splice(o,0,e),r){let s=n;for(;s&&!oe(s);)s=s[k];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[B],nextSibling:e[k]}}queueRemovalMutationRecord(e,n,r,o){$t&&ge({type:\"childList\",target:e,removedNodes:wn(n),previousSibling:r,nextSibling:o})}queueInsertionMutationRecords(e){if($t)for(let n of e){let{node:r,source:o}=n;o&&this.queueRemovalMutationRecord(o.parent,r,o.previousSibling,o.nextSibling),ge({type:\"childList\",target:this,addedNodes:wn(r),previousSibling:n.previousSibling,nextSibling:n.nextSibling})}}collectRemovalHookEffects(e,n){return this.nodeType!==le||At(this)?[]:[[()=>this[Y].removeChild?.(this,e,n)]]}collectInsertionHookEffects(e){let n=[];for(let r of e){let{node:o,source:s}=r;s?.parent.nodeType===le&&!At(s.parent)&&n.push([()=>s.parent[Y].removeChild?.(s.parent,o,s.index)]),this.nodeType===le&&!At(this)&&n.push([()=>this[Y].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){So(e,n)}};function vo(t,e,n,r){if(e.parentNode!==t)throw Error(\"not a child of this node\");let o=t[Z]?n.treeNodes:void 0,s=e[B],i=e[k],a=Nn(t,e);if(o)for(let c of o)c[Z]=!1;Mt(n.nodes,r),$t&&ge({type:\"childList\",target:t,removedNodes:wn(e),previousSibling:s,nextSibling:i}),o&&So(o,\"disconnectedCallback\");let l=[];t.nodeType===le&&!At(t)&&l.push([()=>t[Y].removeChild?.(t,e,a)]),Fe(l)}function Nn(t,e){let n=e[B],r=e[k];n?n[k]=r:t[L]=r,r&&(r[B]=n);let o=t.childNodes.indexOf(e);return t.childNodes.splice(o,1),oe(e)&&t.children.splice(t.children.indexOf(e),1),e[ie]=null,e[k]=null,e[B]=null,o}function So(t,e){for(let n of t){let r=n[e];typeof r==\"function\"&&tn(n,()=>r.call(n))}}function Ut(t,e,n,r,o){let{observedAttributes:s}=t.constructor,{attributeChangedCallback:i}=t;i==null||s==null||!s.includes(e)||tn(t,()=>i.call(t,e,n,r,o))}var xn=class{[L]=null;constructor(e){this[se]=e}getNamedItem(e){let n=String(e),r=this[se][M]===U?X(n):n,o=this[L];for(;o;){if(o.name===r)return o;o=o[k]}return null}getNamedItemNS(e,n){let r=Se(e),o=String(n),s=this[L];for(;s;){if(s.localName===o&&s[M]===r)return s;s=s[k]}return null}item(e){let n=this[L],r=0;for(;n;){if(r++===e)return n;n=n[k]}return null}get length(){let e=0,n=this[L];for(;n;)e++,n=n[k];return e}removeNamedItem(e){let n=String(e),r=this[se][M]===U?X(n):n;return Q(()=>this.removeNamedItemImmediately(o=>o.name===r))}removeNamedItemNS(e,n){let r=Se(e),o=String(n);return Q(()=>this.removeNamedItemImmediately(s=>s.localName===o&&s[M]===r))}removeNamedItemImmediately(e){let n=this[se],r=this[L],o=null;for(;r!=null;){if(e(r)){o&&(o[k]=r[k]),this[L]===r&&(this[L]=r[k]);let s=r.value;return r[k]=null,r[se]=null,st&&ge({type:\"attributes\",target:n,attributeName:r.name,attributeNamespace:r[M],oldValue:s}),n[Y].removeAttribute?.(n,r.name,r[M]),Ut(n,r.localName,s,null,r[M]),r}o=r,r=r[k]}return null}setNamedItem(e){return Q(()=>this.setNamedItemImmediately(e))}setNamedItemImmediately(e){let n=this[se],r=e[se];if(r!=null&&r!==n)throw j(\"The attribute is already in use by another element.\",\"InUseAttributeError\");let o=null,s=this[L],i=null;for(;s;){if(s.localName===e.localName&&s[M]===e[M]){if(s===e)return s;i?i[k]=e:this[L]=e,e[k]=s[k],s[k]=null,o=s;break}i=s,s=s[k]}o==null&&(i?i[k]=e:this[L]=e),e[se]=n,e[F]=n[F],o&&(o[se]=null);let a=o==null||o.value!==e.value,l=o!=null&&o.name!==e.name;return a&&st&&ge({type:\"attributes\",target:n,attributeName:e.name,attributeNamespace:e[M],oldValue:o?.value??null}),l&&n[Y].removeAttribute?.(n,o.name,o[M]),(a||l)&&n[Y].setAttribute?.(n,e.name,e.value,e[M]),a&&Ut(n,e.localName,o?.value??null,e.value,e[M]),o}setNamedItemNS(e){return this.setNamedItem(e)}*[Symbol.iterator](){let e=this[L];for(;e;)yield e,e=e[k]}};var Ye=class extends pe{nodeType=nt;[M]=null;[k]=null;[se]=null;constructor(e,n,r){super(),this[D]=e,this[Ie]=n,r&&(this[M]=r)}get nodeName(){return this[D]}set nodeName(e){}get name(){return this[D]}set name(e){}get localName(){if(this[M]==null)return this[D];let e=this[D].indexOf(\":\");return e<0?this[D]:this[D].slice(e+1)}get prefix(){if(this[M]==null)return null;let e=this[D].indexOf(\":\");return e<0?null:this[D].slice(0,e)}get value(){return this[Ie]}set value(e){let n=String(e),r=this[se];if(!r){this[Ie]=n;return}Q(()=>{let o=this[Ie];this[Ie]=n,st&&o!==n&&ge({type:\"attributes\",target:r,attributeName:this[D],attributeNamespace:this[M],oldValue:o}),this[Y].setAttribute?.(r,this[D],n,this[M]),Ut(r,this.localName,o,n,this[M])})}get nodeValue(){return this.value}set nodeValue(e){this.value=e}get ownerElement(){return this[se]}get namespaceURI(){return this[M]}get specified(){return!0}};var yi={amp:\"&\",AMP:\"&\",apos:\"'\",gt:\">\",GT:\">\",lt:\"<\",LT:\"<\",quot:'\"',QUOT:'\"'},bi=new Set([\"area\",\"base\",\"br\",\"col\",\"embed\",\"hr\",\"img\",\"input\",\"link\",\"meta\",\"param\",\"source\",\"track\",\"wbr\"]),Ei=/(?:<([a-z][a-z0-9-:]*)((?:[\\s]+[^<>'\"=/\\s]+(?:=(['\"])[^]*?\\3|=[^>'\"\\s]*|))*)[\\s]*(\\/?)\\s*>|<\\/([a-z][a-z0-9-:]*)>|<!--(.*?)-->|([^<>]+))/gi,Ao=/\\s([^<>'\"=/\\n\\s]+)(?:=([\"'])([\\s\\S]*?)\\2|=([^>'\"\\n\\s]*)|)/g,wi=\"|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|\",Ni=/^(?:color|face|size)$/i;function ko(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 yi[n];let s=Number.parseInt(r??o,r?10:16);try{return String.fromCodePoint(s)}catch{return e}})}function Ro(t){return t.namespaceURI===U&&bi.has(t.localName)}function Oo(t){let e=t.localName;return t[M]===fe&&(e===\"foreignObject\"||e===\"desc\"||e===\"title\")}function xi(t,e){if(wi.includes(`|${t}|`))return!0;if(t!==\"font\")return!1;for(let n of e.matchAll(Ao))if(Ni.test(n[1]))return!0;return!1}function Tn(t,e){let n=e.ownerDocument,r=n.createDocumentFragment(),o=[],s=r;for(let i of t.matchAll(Ei)){let a=i[1];if(a){let l=i[2],c=X(a),u=o[o.length-1]?.element??e,w=u[M]===fe?fe:U;if(c===\"svg\")w=fe;else if(w===fe){if(Oo(u))w=U;else if(xi(c,l)){for(;o.length>0;){let N=o[o.length-1];if(N.element[M]!==fe||Oo(N.element))break;o.pop(),s=N.target}w=U}}let d=w===U?c:a,p=n[tt](d,w,null,d);for(let N of l.matchAll(Ao))p.setAttribute(N[1],ko(N[3]||N[4]||\"\"));if(s.append(p),Ro(p)||w!==U&&i[4])continue;o.push({element:p,target:s}),s=w===U&&c===\"template\"?p.content:p}else if(i[5]){let l=X(i[5]);for(let c=o.length-1;c>=0;c--){let u=o[c],w=X(u.element[D]);if(w===l){s=u.target,o.length=c;break}if(u.element[M]===U&&w===\"template\")break}}else i[6]?s.append(n.createComment(i[6])):s.append(ko(i[7]))}return r}function vn(t){return Po([{type:\"content\",child:t[L]}])}function Co(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 le:{let o=r;e.push(`<${o[D]}`);let s=o[Ee]?.[L];for(;s;){e.push(` ${s[D]}`);let a=s[Ie];a!==\"\"&&(a=String(a).replace(/&/g,\"&amp;\").replace(/\"/g,\"&quot;\"),e.push(`=\"${a}\"`)),s=s[k]}if(e.push(\">\"),Ro(o))break;let i=o.namespaceURI===U&&o.localName===\"template\"?o[ve]:o;t.push({type:\"closing\",name:o[D]}),t.push({type:\"content\",child:i?.[L]??null});break}case rt:{let o=r;e.push(o[ue].replace(/&/g,\"&amp;\").replace(/\"/g,\"&quot;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\"));break}case ot:{let o=r;e.push(`<!--${o[ue]}-->`);break}}break}case\"content\":{let r=n.child;r&&(t.push({type:\"content\",child:r[k]}),t.push({type:\"opening\",node:r}));break}case\"closing\":e.push(`</${n.name}>`);break}return e.join(\"\")}var K=class extends we{nodeType=le;[M]=U;[_e]=null;get namespaceURI(){return this[M]}get prefix(){return this[_e]}get localName(){let e=this[_e];return e==null?this[D]:this[D].slice(e.length+1)}get nodeName(){return this[M]===U?oo(this[D]):this[D]}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 Ye(\"slot\",n))}get attributes(){let e=this[Ee];return e||(e=new xn(this),this[Ee]=e),e}getAttributeNames(){return[...this.attributes].map(e=>e.name)}getElementsByTagName(e){return hn(this,e)}get firstElementChild(){return this.children[0]??null}getElementsByClassName(e){return pn(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);ar(r);let s=this[M]===U?X(r):r,i=this.attributes.getNamedItemNS(null,s);i?i.value=o:this.attributes.setNamedItem(new Ye(s,o))}setAttributeNS(e,n,r){let o=Se(e),s=String(n),i=String(r),a=Zt(o,s,\"attribute\"),l=this.attributes.getNamedItemNS(a.namespace,a.localName);l?l.value=i:this.attributes.setNamedItemNS(new Ye(a.qualifiedName,i,a.namespace))}toggleAttribute(e,n){let r=String(e);ar(r);let o=this[M]===U?X(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 Ye(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[M]===U?X(n):n;this.attributes.removeNamedItemNS(null,r)}removeAttributeNS(e,n){this.attributes.removeNamedItemNS(e,n)}get outerHTML(){return Co(this)}get innerHTML(){return vn(this)}set innerHTML(e){if(e==null||e===\"\")this.replaceChildren();else{let n=Tn(String(e),this);this.replaceChildren(n)}}};var it=class t extends K{[M]=fe;get ownerSVGElement(){let e=null,n=this.parentNode;for(;n instanceof t;)e=n,n=n.parentNode;return e}};var $e=class extends He{[ue]=\"\";constructor(e){super(),this[ue]=e==null?\"\":String(e)}setData(e){let n=Sr,r=n?this[ue]:null,o=\"\";e!=null&&(o=typeof e==\"string\"?e:String(e)),this[ue]=o,n&&r!==o&&ge({type:\"characterData\",target:this,oldValue:r}),this[Y].setText?.(this,o)}get data(){return this[ue]}set data(e){this.setData(e)}};var at=class extends $e{nodeType=rt;[D]=\"#text\"};var lt=class extends $e{nodeType=ot;[D]=\"#comment\"};var ct=class extends we{nodeType=Me;[D]=\"#document-fragment\";[F]=typeof window<\"u\"?window.document:null;getElementById(e){return mn(this,e)}};var dt=class extends K{get content(){let e=this[ve];return e||(e=this.ownerDocument.createDocumentFragment(),e[De]=this,this[ve]=e),e}set content(e){}set innerHTML(e){this.content.replaceChildren(Tn(String(e),this))}get innerHTML(){let e=this[ve];return e?vn(e):\"\"}};var Sn=class extends K{};var kn=class extends K{};var On=class extends K{};var Gt=class extends we{nodeType=ze;[D]=\"#document\";[Z]=!0;constructor(e){super(),this.defaultView=e,this[F]=this,this.documentElement=Rn(new On,this,\"html\"),this.body=Rn(new Sn,this,\"body\"),this.head=Rn(new kn,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 pn(this,e)}createElement(e){let n=String(e);return ao(n),kr(this,X(n))}createElementNS(e,n){let r=Zt(e,n,\"element\");return kr(this,r.qualifiedName,r.namespace,r.prefix,r.localName)}[tt](e,n,r,o){return kr(this,e,n,r,o)}createTextNode(e){let n=An(new at(e),this);return this[Y].createText?.(n,n.data),n}createComment(e){return An(new lt(e),this)}createDocumentFragment(){return An(new ct,this)}createEvent(){return new J(\"\")}getElementById(e){return mn(this,e)}getElementsByTagName(e){return hn(this,e)}importNode(e,n){if(e.nodeType===ze)throw j(\"Cannot import a document node\",\"NotSupportedError\");return fn(e,n,this)}adoptNode(e){if(e[F]===this)return e;let n=un(e);return Q(()=>{let r=e.parentNode;return r?vo(r,e,n,this):Mt(n.nodes,this),e})}};function An(t,e){return Object.defineProperty(t,F,{value:e,writable:!0,enumerable:!1}),t}function kr(t,e,n=U,r=null,o=e){let s;if(n===fe)s=new it;else if(n===U&&o===\"template\")s=new dt;else if(n===U){let i=t.defaultView.customElements.get(o);s=i?new i:new K}else s=new K;return Rn(s,t,e,n,r)}function Rn(t,e,n,r=U,o=null){return An(t,e),Object.defineProperties(t,{[D]:{value:n},[M]:{value:r},[_e]:{value:o}}),e[Y].createElement?.(t,r),t}var Cn=class extends J{constructor(e,n){super(e,n),this.detail=n?.detail??null}initCustomEvent(e,n,r,o){super.initEvent(e,n,r),this.detail=o??null}};var Pn=class extends J{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 _n=class extends J{constructor(e,n){super(e,n),this.promise=n.promise,this.reason=n.reason}};var In=class extends J{constructor(e,n){super(e,n),this.oldState=n.oldState,this.newState=n.newState}};var Dn=class extends J{constructor(e,n={}){super(e,n),this.relatedTarget=n.relatedTarget??null}};var Mn=class extends J{constructor(e,n={}){super(e,n),this.clipboardData=n.clipboardData??null}};var Ln=class extends K{};var Ti=/^[a-z][^A-Z\\u0000\\t\\n\\f\\r />]*-[^A-Z\\u0000\\t\\n\\f\\r />]*$/u,vi=new Set([\"annotation-xml\",\"color-profile\",\"font-face\",\"font-face-src\",\"font-face-uri\",\"font-face-format\",\"font-face-name\",\"missing-glyph\"]);function _o(t){return Ti.test(t)&&!vi.has(t)}function Io(t){return j(`Invalid custom element name: \"${t}\"`,\"SyntaxError\")}var Hn=class{registry=new Map;listenersByName=new Map;define(e,n,r){if(!_o(e))throw Io(e);if(this.registry.has(e))throw j(`A custom element named \"${e}\" has already been defined`,\"NotSupportedError\");if(this.getName(n)!=null)throw j(\"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(!_o(e))return Promise.reject(Io(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 Si=[\"onerror\",\"onunhandledrejection\"],Mo=Symbol.for(\"@remote-dom/polyfill/global-property\");function Lo(t){return Object.getOwnPropertyDescriptors(t)}function Ho(t){let e={};for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors(Le.prototype)))n!==\"constructor\"&&typeof r.value==\"function\"&&(r.value=Or(r.value.bind(t)),e[n]=r);return e}function $o(t){let e={};for(let n of Si)e[n]={configurable:!0,enumerable:!0,get:Or(()=>t[n]),set:Or(r=>{t[n]=r})};return e}function ki(t){return Object.assign(Lo(t),Ho(t),$o(t))}function Or(t){return Object.defineProperty(t,Mo,{value:!0}),t}function Do(t,e){for(let n of Reflect.ownKeys(e)){let r=Oi(t,n);(r==null||Ai(r))&&Object.defineProperty(t,n,e[n])}}function Oi(t,e){let n=t;for(;n;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function Ai(t){return[t.value,t.get,t.set].some(e=>typeof e==\"function\"&&e[Mo]===!0)}var We=class extends Le{[Y]={};[Xt]=[];[Ve]=Ci(this);name=\"\";window=this;parent=this;self=this;top=this;document=new Gt(this);customElements=new Hn;location=globalThis.location;navigator=globalThis.navigator;Event=J;ErrorEvent=Pn;PromiseRejectionEvent=_n;ToggleEvent=In;FocusEvent=Dn;ClipboardEvent=Mn;EventTarget=Le;CustomEvent=Cn;Node=pe;ParentNode=we;ChildNode=He;DocumentFragment=ct;Document=Gt;CharacterData=$e;Comment=lt;Text=at;Element=K;HTMLElement=Ln;SVGElement=it;HTMLTemplateElement=dt;MutationObserver=En;#t=null;#n=null;#e=null;static with(...e){let n=this;return class extends n{constructor(){super();for(let o of e)Ri(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=Lo(e),s=Object.assign(Ho(e),$o(e));delete o.self,Object.defineProperties(globalThis,o),Do(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),Do(n,s))}static setGlobalThis(e){for(let n in e)e[n]===e&&(e[n]=globalThis);Object.defineProperties(globalThis,ki(e))}};function Ri(t,e){t[Xt].push(e(t)??{})}function Ci(t){return{createElement:Oe.bind(null,t,\"createElement\"),setAttribute:Oe.bind(null,t,\"setAttribute\"),removeAttribute:Oe.bind(null,t,\"removeAttribute\"),createText:Oe.bind(null,t,\"createText\"),setText:Oe.bind(null,t,\"setText\"),insertChild:Oe.bind(null,t,\"insertChild\"),removeChild:Oe.bind(null,t,\"removeChild\"),addEventListener:Oe.bind(null,t,\"addEventListener\"),removeEventListener:Oe.bind(null,t,\"removeEventListener\")}}function Oe(t,e,...n){for(let s of t[Xt])s[e]?.apply(s,n);let r=t[Y];r[e]?.apply(r,n)}var $n=new We;var Ar=\"~\";var Ue=new WeakMap;function ut(t){return Ue.get(t)}var _r=new WeakMap,_i=0;function ce(t){let e=_r.get(t);return e==null&&(e=String(_i++),Un(t,e)),e}function Un(t,e){_r.set(t,e)}var Cr=new WeakMap;function Ii(t){return Cr.get(t)}var Pr=new WeakMap;function Di(t){let e=Pr.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 Mi=new WeakMap;function Li(t){return Mi.get(t)}function Ir(t,e,n){let r=Cr.get(t);if(r==null&&(r={},Cr.set(t,r)),r[e]===n)return;r[e]=n;let o=Ue.get(t);o?.mutate([[3,ce(t),e,n,1]])}function Ge(t,e,n){let r=Pr.get(t);if(r==null&&(r={},Pr.set(t,r)),r[e]===n)return;n==null?delete r[e]:r[e]=String(n);let o=Ue.get(t);o?.mutate([[3,ce(t),e,n,2]])}function ft(t,e){if(Ue.get(t)!==e&&(Ue.set(t,e),t.childNodes))for(let r=0;r<t.childNodes.length;r++)ft(t.childNodes[r],e)}function Gn(t){if(Ue.get(t)!=null&&(Ue.delete(t),t.childNodes))for(let n=0;n<t.childNodes.length;n++)Gn(t.childNodes[n])}function mt(t){let{nodeType:e}=t;switch(e){case 1:return{id:ce(t),type:e,element:t.localName,properties:Rr(Ii(t)),attributes:Rr(Di(t)),eventListeners:Rr(Li(t)),children:Array.from(t.childNodes).map(mt)};case 3:case 8:return{id:ce(t),type:e,data:t.data};default:throw new Error(`Cannot serialize node of type ${t.nodeType} (${typeof t.nodeType})`)}}function Rr(t){return t?{...t}:void 0}function Dr(t,e,...n){let r=_r.get(t),o=Ue.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 pt=$n[Y];pt.insertChild=(t,e,n)=>{let r=ut(t);r!=null&&(ft(e,r),r.mutate([[0,ce(t),mt(e),n]]))};pt.removeChild=(t,e,n)=>{let r=ut(t);r!=null&&(Gn(e),r.mutate([[1,ce(t),n]]))};pt.setText=(t,e)=>{let n=ut(t);n?.mutate([[2,ce(t),e]])};pt.setAttribute=(t,e,n)=>{t.tagName.includes(\"-\")||Ge(t,e,n)};pt.removeAttribute=(t,e)=>{t.tagName.includes(\"-\")||Ge(t,e)};We.setGlobal($n);var jo=[\"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\"],zo=[\"self\",\"postMessage\",\"setTimeout\",\"clearTimeout\",\"setInterval\",\"clearInterval\",\"queueMicrotask\",\"structuredClone\",\"crypto\",\"console\",\"DOMException\"],Fo=[\"TEMPORARY\",\"PERSISTENT\"],nu=Object.freeze([...jo,...Vo,...zo,...Fo]),ru=Object.freeze([\"constructor\",\"__defineGetter__\",\"__defineSetter__\",\"hasOwnProperty\",\"__lookupGetter__\",\"__lookupSetter__\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toString\",\"valueOf\",\"__proto__\",\"toLocaleString\"]),Go=t=>typeof t==\"symbol\"?`[${t.description??\"symbol\"}]`:t;function Bo(t=globalThis,e=[],n={}){let r=[],o=[],s=new Set([...jo,...Vo,...zo,...e,\"constructor\",Symbol.toStringTag]),i=(y,E)=>{let H=Reflect.getOwnPropertyDescriptor(y,E);return H===void 0||!(\"value\"in H)||H.writable||H.configurable?!1:n.primitivesStay&&typeof E==\"symbol\"&&(typeof H.value!=\"object\"||H.value===null)&&typeof H.value!=\"function\"?!0:Fo.includes(E)&&typeof H.value==\"number\"},a=t,l=a.setTimeout,c=a.setInterval,u=a.crypto,w=(y,E)=>function(H,h,...I){if(typeof H!=\"function\")throw new TypeError(`${E} takes a function: a guest view cannot run code from text`);return y.call(t,H,h,...I)},d=u?Object.freeze({getRandomValues:y=>u.getRandomValues(y)}):void 0,p=a.document?.defaultView;if(p&&p!==a)for(let y of Reflect.ownKeys(p))typeof y==\"symbol\"||s.has(y)||Reflect.deleteProperty(p,y)||o.push(`window.${y}`);let N=[];for(let y=t;y&&y!==Object.prototype;y=Object.getPrototypeOf(y))N.push(y);for(let y of N)for(let E of Reflect.ownKeys(y))s.has(E)||(Reflect.deleteProperty(y,E)?r.push(Go(E)):i(y,E)||o.push(Go(E)));let v=()=>function(){throw new EvalError(\"A guest view cannot make code from text.\")},m=[Function.prototype,Object.getPrototypeOf(async function(){}),Object.getPrototypeOf(function*(){}),Object.getPrototypeOf(async function*(){})];for(let y of m){let E=v();Object.defineProperty(E,\"prototype\",{value:y,writable:!1,enumerable:!1,configurable:!1}),Reflect.defineProperty(y,\"constructor\",{value:E,writable:!1,enumerable:!1,configurable:!1})||o.push(\"Function.prototype.constructor\"),y===Function.prototype&&Reflect.defineProperty(t,\"Function\",{value:E,writable:!0,enumerable:!1,configurable:!0})}let f=(y,E)=>{Reflect.defineProperty(t,y,{value:E,writable:!0,enumerable:!0,configurable:!0})||o.push(y)};f(\"setTimeout\",w(l,\"setTimeout\")),f(\"setInterval\",w(c,\"setInterval\")),d&&f(\"crypto\",d);for(let y of N.slice(1))Object.freeze(y);for(let y of Reflect.ownKeys(t)){let E=Reflect.getOwnPropertyDescriptor(t,y);Reflect.defineProperty(t,y,\"value\"in E?{...E,writable:!1,configurable:!1}:{...E,configurable:!1})}let b;try{b=Reflect.preventExtensions(t)}catch{b=!1}return{removed:r,stuck:o,sealed:b}}var jt=class extends HTMLElement{constructor(){super(),Un(this,Ar)}connect(e){if(ut(this)===e||(ft(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,Ar,mt(o),r])}e.mutate(n)}updateRemoteProperty(e,n){Ir(this,e,n)}callRemoteMethod(e,...n){return Dr(this,e,...n)}};var x={},jn={empty:!0},Hi={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\"},ht={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:jn,br:jn,wbr:jn,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:{attributes:{href:\"link\"}},ul:x,menu:x,dl:x,dt:x,dd:x,ol:{attributes:{start:\"number\",reversed:\"boolean\",type:{oneOf:[\"1\",\"a\",\"A\",\"i\",\"I\"]}}},li:{attributes:{value:\"number\"}},table:x,caption:x,thead:x,tbody:x,tfoot:x,tr:x,colgroup:{attributes:{span:\"number\"}},col:{attributes:{span:\"number\"},empty:!0},th:{attributes:{colspan:\"number\",rowspan:\"number\",headers:\"text\",scope:{oneOf:[\"row\",\"col\",\"rowgroup\",\"colgroup\"]},abbr:\"text\"}},td:{attributes:{colspan:\"number\",rowspan:\"number\",headers:\"text\"}},details:{attributes:{open:\"boolean\",name:\"text\"}},summary:x,button:{attributes:{type:{oneOf:[\"button\"]},disabled:\"boolean\",name:\"text\",value:\"text\"}},input:{empty:!0,attributes:{type:{oneOf:[\"text\",\"search\",\"number\",\"range\",\"checkbox\",\"radio\",\"date\",\"time\",\"datetime-local\",\"month\",\"week\",\"color\",\"email\",\"tel\",\"url\"]},name:\"text\",value:\"text\",placeholder:\"text\",min:\"text\",max:\"text\",step:\"text\",checked:\"boolean\",disabled:\"boolean\",readonly:\"boolean\",required:\"boolean\",maxlength:\"number\",minlength:\"number\",size:\"number\",pattern:\"text\",multiple:\"boolean\",inputmode:\"text\",enterkeyhint:\"text\"}},select:{attributes:{name:\"text\",disabled:\"boolean\",multiple:\"boolean\",required:\"boolean\",size:\"number\"}},option:{attributes:{value:\"text\",selected:\"boolean\",disabled:\"boolean\",label:\"text\"}},optgroup:{attributes:{label:\"text\",disabled:\"boolean\"}},textarea:{attributes:{name:\"text\",placeholder:\"text\",rows:\"number\",cols:\"number\",disabled:\"boolean\",readonly:\"boolean\",required:\"boolean\",maxlength:\"number\",minlength:\"number\",wrap:{oneOf:[\"soft\",\"hard\",\"off\"]}}},label:{attributes:{for:\"text\"}},fieldset:{attributes:{disabled:\"boolean\",name:\"text\"}},legend:x,output:x,meter:{attributes:{value:\"number\",min:\"number\",max:\"number\",low:\"number\",high:\"number\",optimum:\"number\"}},progress:{attributes:{value:\"number\",max:\"number\"}},img:{empty:!0,attributes:{src:\"image\",alt:\"text\",width:\"number\",height:\"number\",decoding:{oneOf:[\"async\",\"sync\",\"auto\"]}}},\"graview-video\":jn},$i=[\"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\",\"filter\",\"flood-color\",\"flood-opacity\",\"lighting-color\",\"color-interpolation-filters\"],Ui={id:\"text\",class:\"text\",style:\"style\",lang:\"text\",role:\"text\",tabindex:{oneOf:[\"-1\",\"0\"]},transform:\"geometry\",...Object.fromEntries($i.map(t=>[t,\"css\"]))},Ae={x:\"geometry\",y:\"geometry\",width:\"geometry\",height:\"geometry\"},Vn={viewBox:\"geometry\",preserveAspectRatio:\"geometry\"},Yo={oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},Wo={oneOf:[\"R\",\"G\",\"B\",\"A\"]},ye={...Ae,in:\"text\",result:\"text\"},qo={gradientUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},gradientTransform:\"geometry\",spreadMethod:{oneOf:[\"pad\",\"reflect\",\"repeat\"]},href:\"fragment\"},zn={svg:{attributes:{...Ae,...Vn}},g:x,defs:x,symbol:{attributes:{...Ae,...Vn,refX:\"geometry\",refY:\"geometry\"}},use:{attributes:{...Ae,href:\"fragment\"}},title:x,desc:x,path:{attributes:{d:\"geometry\",pathLength:\"number\"}},rect:{attributes:{...Ae,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\",...qo}},radialGradient:{attributes:{cx:\"geometry\",cy:\"geometry\",r:\"geometry\",fx:\"geometry\",fy:\"geometry\",fr:\"geometry\",...qo}},stop:{attributes:{offset:\"geometry\"}},clipPath:{attributes:{clipPathUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},mask:{attributes:{...Ae,maskUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},maskContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},pattern:{attributes:{...Ae,...Vn,patternUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternTransform:\"geometry\",href:\"fragment\"}},marker:{attributes:{...Vn,markerWidth:\"geometry\",markerHeight:\"geometry\",refX:\"geometry\",refY:\"geometry\",orient:\"geometry\",markerUnits:{oneOf:[\"strokeWidth\",\"userSpaceOnUse\"]}}},a:x,filter:{attributes:{...Ae,filterUnits:Yo,primitiveUnits:Yo}},feBlend:{attributes:{...ye,in2:\"text\",mode:\"text\"}},feColorMatrix:{attributes:{...ye,type:{oneOf:[\"matrix\",\"saturate\",\"hueRotate\",\"luminanceToAlpha\"]},values:\"geometry\"}},feComponentTransfer:{attributes:ye},...Object.fromEntries([\"feFuncR\",\"feFuncG\",\"feFuncB\",\"feFuncA\"].map(t=>[t,{attributes:{type:{oneOf:[\"identity\",\"table\",\"discrete\",\"linear\",\"gamma\"]},tableValues:\"geometry\",slope:\"number\",intercept:\"number\",amplitude:\"number\",exponent:\"number\",offset:\"number\"}}])),feComposite:{attributes:{...ye,in2:\"text\",operator:{oneOf:[\"over\",\"in\",\"out\",\"atop\",\"xor\",\"lighter\",\"arithmetic\"]},k1:\"number\",k2:\"number\",k3:\"number\",k4:\"number\"}},feDisplacementMap:{attributes:{...ye,in2:\"text\",scale:\"number\",xChannelSelector:Wo,yChannelSelector:Wo}},feDropShadow:{attributes:{...ye,dx:\"number\",dy:\"number\",stdDeviation:\"geometry\"}},feFlood:{attributes:ye},feGaussianBlur:{attributes:{...ye,stdDeviation:\"geometry\",edgeMode:{oneOf:[\"duplicate\",\"wrap\",\"none\"]}}},feMerge:{attributes:ye},feMergeNode:{attributes:{in:\"text\"}},feMorphology:{attributes:{...ye,operator:{oneOf:[\"erode\",\"dilate\"]},radius:\"geometry\"}},feOffset:{attributes:{...ye,dx:\"number\",dy:\"number\"}},feTurbulence:{attributes:{...Ae,result:\"text\",type:{oneOf:[\"fractalNoise\",\"turbulence\"]},baseFrequency:\"geometry\",numOctaves:\"number\",seed:\"number\",stitchTiles:{oneOf:[\"stitch\",\"noStitch\"]}}}};var Xo=[\"alert\",\"alertdialog\",\"dialog\",\"banner\",\"main\",\"navigation\",\"contentinfo\",\"complementary\",\"search\",\"form\",\"application\",\"status\",\"log\",\"marquee\",\"timer\"],Ko=[\"region\"],Vt={nav:\"div\",header:\"div\",footer:\"div\",aside:\"div\",search:\"div\",output:\"span\"},Fn={section:[\"aria-label\",\"title\"]},Zo=[\"aria-labelledby\",\"aria-describedby\"];function Gi(t){return/^aria-[a-z]+$/.test(t)}function ji(t){return/^data-[a-z0-9][a-z0-9_.-]*$/.test(t)}var Jo=[\"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\",\"mask-image\",\"mask-size\",\"mask-position\",\"mask-repeat\",\"mask-origin\",\"mask-clip\",\"mask-composite\",\"mask-mode\",\"mask-type\",\"-webkit-mask\",\"-webkit-mask-image\",\"-webkit-mask-size\",\"-webkit-mask-position\",\"-webkit-mask-repeat\",\"-webkit-mask-origin\",\"-webkit-mask-clip\",\"-webkit-mask-composite\",\"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\",\"-webkit-text-stroke\",\"-webkit-text-stroke-width\",\"-webkit-text-stroke-color\",\"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\",\"animation-timeline\",\"animation-range\",\"animation-range-start\",\"animation-range-end\",\"scroll-timeline\",\"scroll-timeline-name\",\"scroll-timeline-axis\",\"view-timeline\",\"view-timeline-name\",\"view-timeline-axis\",\"view-timeline-inset\",\"timeline-scope\",\"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\",\"flood-color\",\"flood-opacity\",\"lighting-color\",\"color-interpolation-filters\"],Qo=[\"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\",\"scroll\",\"view\"],es=[\"fill\",\"stroke\",\"clip-path\",\"mask\",\"marker\",\"marker-start\",\"marker-mid\",\"marker-end\",\"filter\"],ts=[\"media\",\"supports\",\"container\",\"keyframes\"],ns={position:[\"static\",\"relative\",\"absolute\",\"sticky\"],all:[],appearance:[\"auto\",\"none\",\"menulist-button\",\"textfield\"],\"-webkit-appearance\":[\"auto\",\"none\",\"menulist-button\",\"textfield\"]},rs=[\"host\",\"host-context\",\"slotted\",\"part\",\"backdrop\",\"picker\",\"view-transition\",\"view-transition-group\",\"view-transition-image-pair\",\"view-transition-old\",\"view-transition-new\"],os=[\"-webkit-details-marker\"],Bn=64e3,Mr=4e3,ss=1e5,zt=512e3,Lr=1e4,is=\"http://www.w3.org/1999/xhtml\",as=\"http://www.w3.org/2000/svg\",Vi=new Map(Object.keys(zn).map(t=>[t.toLowerCase(),t]));function Yn(t){return Vi.get(t.toLowerCase())}function Wn(t,e,n){let r=n.toLowerCase(),o=t===\"html\"?[ht[e]?.attributes,Hi]:[zn[e]?.attributes,Ui],s=t===\"svg\"&&r===\"xlink:href\"?\"href\":r;for(let i of o)if(i){for(let[a,l]of Object.entries(i))if(a.toLowerCase()===s)return{name:a,kind:l}}if(Gi(r)||ji(r))return{name:r,kind:\"text\"}}function ls(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 cs=[\"wheel\",\"drag\",\"pinch\"];var ds=\"~\",qn=t=>typeof t==\"object\"&&t!==null&&!Array.isArray(t),Ne=(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=>Ne(n,e+1)):Object.fromEntries(Object.entries(t).map(([n,r])=>[n,Ne(r,e+1)]))};function us(){let t=new Map,e=new Map,n=new Map([[ds,{children:[],listeners:new Map}]]),r=0,o=c=>{let u=e.get(c);return u===void 0&&(u=r+=1,e.set(c,u),t.set(u,{listener:c,count:0})),t.get(u).count+=1,u},s=c=>{let u=t.get(c);u&&(u.count-=1,!(u.count>0)&&(t.delete(c),e.delete(u.listener)))},i=c=>{let u=n.get(c);if(u){n.delete(c);for(let w of u.listeners.values())s(w);for(let w of u.children)i(w)}},a=(c,u,w=0)=>{if(!qn(c)||w>64)return Ne(c);let d=typeof c.id==\"string\"?c.id:void 0,p=u&&d!==void 0&&d!==ds;p&&i(d);let N={children:[],listeners:new Map};p&&n.set(d,N);let v={};for(let[m,f]of Object.entries(c))m===\"children\"&&Array.isArray(f)?v[m]=f.map(b=>{let y=a(b,p,w+1);return p&&qn(b)&&typeof b.id==\"string\"&&N.children.push(b.id),y}):m===\"eventListeners\"&&qn(f)?v[m]=Object.fromEntries(Object.entries(f).map(([b,y])=>{if(typeof y!=\"function\"||!p)return[b,void 0];let E=o(y);return N.listeners.set(b,E),[b,{listener:E}]})):v[m]=Ne(f,w+1);return v},l=c=>{if(!Array.isArray(c))return Ne(c);let[u,w]=c,d=typeof w==\"string\"?n.get(w):void 0;if(u===0){let p=a(c[2],d!==void 0),N=qn(c[2])?c[2].id:void 0;if(d&&typeof N==\"string\"&&n.has(N)){let v=Number(c[3]);d.children.splice(Number.isInteger(v)&&v>=0&&v<=d.children.length?v:d.children.length,0,N)}return[u,Ne(w),p,Ne(c[3])]}if(u===1){let p=Number(c[2]);return d&&Number.isInteger(p)&&p>=0&&p<d.children.length&&i(d.children.splice(p,1)[0]),Ne(c)}if(u===3&&c[4]===3){let p=String(c[2]),N=c[3],v=d&&typeof N==\"function\"?o(N):void 0,m=d?.listeners.get(p);return m!==void 0&&s(m),v===void 0?d?.listeners.delete(p):d.listeners.set(p,v),[u,Ne(w),p,v===void 0?void 0:{listener:v},3]}return Ne(c)};return{encode:c=>c.map(l),listener:c=>t.get(c)?.listener,get listening(){return t.size},get nodes(){return n.size-1}}}var Hr=\"graview-view-root\",zi=[\"value\",\"checked\",\"key\",\"pressed\",\"files\",\"refused\",\"x\",\"y\",\"width\",\"height\",\"deltaX\",\"deltaY\",\"deltaMode\",\"ctrlKey\",\"metaKey\",\"phase\",\"pointerId\",\"button\",\"pressure\",\"dx\",\"dy\",\"scale\",\"rotation\"],Fi=t=>t.replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g,\"&quot;\").replace(/'/g,\"&#39;\"),Bi=t=>Object.freeze({html:t,toString:()=>t}),fs=t=>typeof t==\"object\"&&t!==null&&typeof t.html==\"string\"&&Object.isFrozen(t),ms=t=>t==null||t===!1?\"\":Array.isArray(t)?t.map(ms).join(\"\"):fs(t)?t.html:Fi(String(t));function ps(t){customElements.get(Hr)||customElements.define(Hr,jt);let e=Event,n=us(),r=new Set,o=new Set,s,i=[],a=new Set;for(let g of[\"closest\",\"matches\",\"dataset\"]){let S=()=>{throw new TypeError(`A view's element has no ${g}: graview.on hands event.element, the element its selector matched; read event.element.getAttribute(\"data-\\u2026\").`)};g in Element.prototype||Object.defineProperty(Element.prototype,g,g===\"dataset\"?{get:S}:{value:S})}let l=document.createElement(Hr),c=g=>{let S=A=>{for(let _ of Array.from(A.childNodes)){if(_.nodeType!==1)continue;if(ce(_)===g)return _;let P=S(_);if(P)return P}};return S(l)},u=g=>{let S=c(g.target);if(!S)return;let A=new e(g.event,{bubbles:!0}),_={};for(let P of zi)g[P]!==void 0&&(_[P]=g[P]);for(let P of Object.keys(_))Object.defineProperty(A,P,{value:_[P],enumerable:!0});S.dispatchEvent(A);for(let P of o){if(P.type!==g.event)continue;let G;try{G=new Set(Array.from(l.querySelectorAll(P.selector)))}catch{continue}for(let re=S;re&&re!==l;re=re.parentNode)if(G.has(re)){P.listener(Object.freeze({type:g.event,target:S,element:re,..._}));break}}},w=g=>{if(g.type===\"dom-event\"&&typeof g.target==\"string\")return u(g);if(g.type===\"notice\")return t.warn(g.text);if(g.type!==\"props\")return;s=g.props;let S=t.now();for(let P of r)try{P(g.props)}catch(G){t.threw(G)}let A=t.now()-S,_=g.push;typeof _==\"number\"&&t.microtask(()=>t.microtask(()=>t.send({type:\"pushed\",push:_,ms:A})))},d;l.connect({mutate(g){d||(d=[],t.microtask(()=>{let S=d??[];d=void 0,t.send({type:\"render\",records:n.encode(S)})})),d.push(...g)},call:()=>{}});let p=g=>g.nodeType===1?g.getAttribute(\"data-key\")??g.getAttribute(\"id\"):null,N=(g,S)=>g.nodeType===S.nodeType&&(g.nodeType!==1||g.localName===S.localName&&g.namespaceURI===S.namespaceURI&&p(g)===p(S));function v(g,S){let A=Array.from(S.childNodes),_=0;for(let P of A){let G=g.childNodes[_]??null;if(G&&N(G,P)){m(G,P),_+=1;continue}if(p(P)!==null){let Pe=Array.from(g.childNodes).slice(_+1).find(vt=>N(vt,P));if(Pe){g.insertBefore(Pe,G),m(Pe,P),_+=1;continue}}g.insertBefore(P,G),_+=1}for(;g.childNodes.length>_;)g.removeChild(g.lastChild)}function m(g,S){if(g.nodeType!==1){g.data!==S.data&&(g.data=S.data);return}let A=g,_=S,P=f(A);for(let G of A.getAttributeNames())_.hasAttribute(G)||(A.removeAttribute(G),P&&Ge(A,G,void 0));for(let G of _.getAttributeNames()){let re=_.getAttribute(G);A.getAttribute(G)!==re&&A.setAttribute(G,re),P&&Ge(A,G,re)}v(A,_)}let f=g=>g.localName.includes(\"-\");function b(g){for(let S of Array.from(g.childNodes)){if(S.nodeType!==1)continue;let A=S;if(f(A))for(let _ of A.getAttributeNames())Ge(A,_,A.getAttribute(_)??void 0);b(A)}}function y(g,S,A){for(let _ of Array.from(g.childNodes)){if(_.nodeType!==1)continue;let P=_,G=P.localName,re=S||G.toLowerCase()===\"svg\",Pe=re?Yn(G):Object.prototype.hasOwnProperty.call(ht,G.toLowerCase())?G.toLowerCase():void 0;if(!Pe){A.add(`<${G}>`);continue}for(let vt of P.getAttributeNames())(!Wn(re?\"svg\":\"html\",Pe,vt)||!re&&Fn[Pe]?.includes(vt.toLowerCase()))&&A.add(`${Pe} ${vt}`);y(P,re,A)}}function E(g){let S=document.createElement(\"div\"),A=Array.isArray(g)?g:[g];for(let P of A)if(P!=null)if(typeof P==\"string\"||fs(P)){let G=document.createElement(\"div\");G.innerHTML=typeof P==\"string\"?P:P.html,S.append(...Array.from(G.childNodes))}else S.append(P);let _=new Set;y(S,!1,_),i=[..._],i.length>0&&t.warn(`The host will not draw: ${i.join(\", \")}`),b(S),v(l,S)}let H=[],h=new Set(cs),I=\"[]\",R=!1,C=()=>{R||(R=!0,t.microtask(()=>{R=!1;let g=[...new Map([...o].filter(A=>h.has(A.type)).map(A=>[`${A.type} ${A.selector}`,{event:A.type,selector:A.selector}])).entries()].sort(([A],[_])=>A<_?-1:A>_?1:0).map(([,A])=>A),S=JSON.stringify(g);S!==I&&(I=S,t.send({type:\"gestures\",bound:g}))}))},O=\"[]\",T=!1,V=()=>{T||(T=!0,t.microtask(()=>{T=!1;let g=[...new Set([...o].filter(A=>A.type===\"click\"&&typeof A.selector==\"string\").map(A=>A.selector))].sort().slice(0,200),S=JSON.stringify(g);S!==O&&(O=S,t.send({type:\"clicks\",selectors:g}))}))};return{view:Object.freeze({get props(){return s},onProps(g){return r.add(g),s&&g(s),()=>void r.delete(g)},render:E,style(g){typeof g!=\"string\"||H.includes(g)||(H.push(g),t.send({type:\"style\",sheets:[...H]}))},on(g,S,A){let _={type:g,selector:S,listener:A};return o.add(_),typeof g==\"string\"&&!a.has(g)&&(a.add(g),t.send({type:\"hears\",events:[g]})),h.has(g)&&C(),g===\"click\"&&V(),()=>{o.delete(_),h.has(g)&&C(),g===\"click\"&&V()}},act:(g,S={})=>t.act(g,S),navigate(g){if(typeof g==\"string\")return t.navigate(g);let S=ls(g);S&&t.send(S)},html(g,...S){return Bi(g.reduce((A,_,P)=>A+_+(P<S.length?ms(S[P]):\"\"),\"\"))},get refused(){return i},get hardening(){return t.hardening()}}),hear:w,find:g=>{try{let S=l.querySelectorAll(g)[0];return S?ce(S):void 0}catch{return}},listened:g=>{let S=new Set;for(let A of o)if(A.type===g)try{for(let _ of Array.from(l.querySelectorAll(A.selector))){let P=ce(_);P&&S.add(P)}}catch{}return[...S]}}}var hs=t=>t.toLowerCase().replace(/[^a-z0-9]+/g,\"-\").replace(/^-|-$/g,\"\");function Ft(t,e){let n=t.find(s=>s.as===e);if(n)return n;let r=e.trim().toLowerCase(),o=hs(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&&hs(s.title)===o):void 0)}var xe=t=>` Its places: ${t.map(e=>typeof e==\"string\"?`\"${e}\"`:e.title&&e.title!==e.as?`\"${e.as}\" (${e.title})`:`\"${e.as}\"`).join(\", \")||\"none\"}.`,gt=\" This run was not handed the views the host keeps, so a titled view's place is not among these: if it names one, the link goes there.\",Bt=t=>`\"${t.length>80?`${t.slice(0,79)}\\u2026`:t}\"`;var gs=[\"https:\",\"mailto:\",\"tel:\"];function ys(t){if(!(typeof t!=\"string\"||t.length>2e3||/[\\s<>\"]/.test(t.trim())||t.trim()!==t))try{let e=new URL(t);return!gs.includes(e.protocol)||e.protocol===\"https:\"&&(e.hostname===\"\"||e.username!==\"\"||e.password!==\"\")?void 0:e.href}catch{return}}function bs(t){let e=new Set,n=r=>{if(typeof r!=\"string\"||!/^(https|mailto|tel):/i.test(r))return;let o=ys(r);o&&e.add(o)};for(let r of[...t?.node?[t.node]:[],...t?.nodes??[]])for(let[o,s]of Object.entries(r))o===\"id\"||o===\"kind\"||(Array.isArray(s)?s.forEach(n):n(s));return e}function Es(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 ws(t,e){let n=ys(t);if(n&&(e.handed.has(n)||n.startsWith(\"https:\")&&Es(e.origins).includes(new URL(n).origin)))return n}function Ns(t,e){let n=t.length>120?`${t.slice(0,119)}\\u2026`:t,r=\"\";try{r=new URL(t).protocol}catch{r=\"\"}if(!gs.includes(r))return`The link \"${n}\" was not drawn: a view links only to an https:, mailto: or tel: address.`;let o=Es(e);return`The link \"${n}\" was not drawn: it is no address this view was handed. A view links out only to an address a record it was shown holds (a url field), as the record holds it${o.length>0?`, or an https: address on ${o.join(\", \")}`:\"\"}; a record or a place of this app is <a data-record> or <a data-place>.`}var ee=t=>t>=48&&t<=57,xs=t=>ee(t)||t>=65&&t<=70||t>=97&&t<=102,zr=t=>t>=65&&t<=90||t>=97&&t<=122,Fr=t=>t>=128,Xn=t=>zr(t)||Fr(t)||t===95,Ts=t=>Xn(t)||ee(t)||t===45,vs=t=>t===10,Re=t=>t===10||t===9||t===32,Yi=t=>t>=0&&t<=8||t===11||t>=14&&t<=31||t===127,be=-1;function Wi(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 qi(t){let e=Wi(t),n=0,r=(m=0)=>n+m<e.length?e[n+m]:be,o=[],s=(m,f)=>m===92&&f!==10&&f!==be,i=(m,f,b)=>m===45?Xn(f)||f===45||s(f,b):Xn(m)?!0:s(m,f),a=(m,f,b)=>m===43||m===45?ee(f)||f===46&&ee(b):ee(m===46?f:m),l=()=>{let m=r();if(n+=1,m===be)return 65533;if(xs(m)){let f=String.fromCodePoint(m);for(;f.length<6&&xs(r());)f+=String.fromCodePoint(r()),n+=1;Re(r())&&(n+=1);let b=parseInt(f,16);return b===0||b>=55296&&b<=57343||b>1114111?65533:b}return m},c=()=>{let m=\"\";for(;;){let f=r();if(Ts(f))m+=String.fromCodePoint(f),n+=1;else if(s(f,r(1)))n+=1,m+=String.fromCodePoint(l());else return m}},u=()=>{let m=\"\";for((r()===43||r()===45)&&(m+=String.fromCodePoint(e[n++]));ee(r());)m+=String.fromCodePoint(e[n++]);if(r()===46&&ee(r(1)))for(m+=String.fromCodePoint(e[n++],e[n++]);ee(r());)m+=String.fromCodePoint(e[n++]);if((r()===69||r()===101)&&(ee(r(1))||(r(1)===43||r(1)===45)&&ee(r(2))))for(m+=String.fromCodePoint(e[n++]),ee(r())||(m+=String.fromCodePoint(e[n++]));ee(r());)m+=String.fromCodePoint(e[n++]);return m},w=()=>{let m=u();return i(r(),r(1),r(2))?{type:\"dimension\",repr:m,unit:c()}:r()===37?(n+=1,{type:\"percentage\",repr:m}):{type:\"number\",repr:m}},d=()=>{for(;;){let m=r();if(n+=1,m===41||m===be)return;s(m,r())&&l()}},p=()=>{let m=\"\";for(;Re(r());)n+=1;for(;;){let f=r();if(n+=1,f===41)return{type:\"url\",value:m};if(f===be)return{type:\"url\",value:m};if(Re(f)){for(;Re(r());)n+=1;return r()===41||r()===be?(r()===41&&(n+=1),{type:\"url\",value:m}):(d(),{type:\"bad-url\"})}if(f===34||f===39||f===40||Yi(f))return d(),{type:\"bad-url\"};if(f===92){if(s(f,r()))m+=String.fromCodePoint(l());else return d(),{type:\"bad-url\"};continue}m+=String.fromCodePoint(f)}},N=()=>{let m=c();if(m.toLowerCase()===\"url\"&&r()===40){for(n+=1;Re(r())&&Re(r(1));)n+=1;let f=Re(r())?r(1):r();return f===34||f===39?{type:\"function\",value:m}:p()}return r()===40?(n+=1,{type:\"function\",value:m}):{type:\"ident\",value:m}},v=m=>{let f=\"\";for(;;){let b=r();if(n+=1,b===m||b===be)return{type:\"string\",value:f};if(vs(b))return n-=1,{type:\"bad-string\"};if(b===92){if(r()===be)continue;if(vs(r())){n+=1;continue}f+=String.fromCodePoint(l());continue}f+=String.fromCodePoint(b)}};for(;;){for(;r()===47&&r(1)===42;){for(n+=2;r()!==be&&!(r()===42&&r(1)===47);)n+=1;r()!==be&&(n+=2)}let m=r();if(m===be)return o;if(Re(m)){for(;Re(r());)n+=1;o.push({type:\"whitespace\"});continue}switch(n+=1,m){case 34:case 39:o.push(v(m));continue;case 35:if(Ts(r())||s(r(),r(1))){let f=i(r(),r(1),r(2));o.push({type:\"hash\",value:c(),id:f})}else o.push({type:\"delim\",value:\"#\"});continue;case 40:o.push({type:\"(\"});continue;case 41:o.push({type:\")\"});continue;case 43:case 46:a(m,r(),r(1))?(n-=1,o.push(w())):o.push({type:\"delim\",value:String.fromCodePoint(m)});continue;case 44:o.push({type:\",\"});continue;case 45:a(m,r(),r(1))?(n-=1,o.push(w())):r()===45&&r(1)===62?(n+=2,o.push({type:\"CDC\"})):i(m,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:c()}):o.push({type:\"delim\",value:\"@\"});continue;case 91:o.push({type:\"[\"});continue;case 92:s(m,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:ee(m)?(n-=1,o.push(w())):Xn(m)?(n-=1,o.push(N())):o.push({type:\"delim\",value:String.fromCodePoint(m)})}}}var Rs={\"{\":\"}\",\"[\":\"]\",\"(\":\")\"},Cs=32,Ur=class{constructor(e){this.tokens=e}i=0;peek(){return this.tokens[this.i]}next(){return this.tokens[this.i++]}};function Ps(t,e){let n=t.next();return n.type===\"{\"||n.type===\"[\"||n.type===\"(\"?{type:\"block\",open:n.type,value:Ss(t,Rs[n.type],e+1)}:n.type===\"function\"?{type:\"func\",name:n.value,value:Ss(t,\")\",e+1)}:n}function Ss(t,e,n){let r=[];for(;;){let o=t.peek();if(!o)return r;if(o.type===e)return t.next(),r;if(n>Cs){t.next(),r.push({type:\"bad-string\"});continue}r.push(Ps(t,n))}}function yt(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 a=[];r+=1;let l;for(;r<t.length;){let c=t[r];if(r+=1,c.type===\";\")break;if(c.type===\"block\"&&c.open===\"{\"){l=c.value;break}a.push(c)}n.push({type:\"at-rule\",name:o.value,prelude:a,...l?{block:l}:{}});continue}let s=[],i;for(;r<t.length;){let a=t[r];if(r+=1,a.type===\"block\"&&a.open===\"{\"){i=a.value;break}s.push(a)}i&&n.push({type:\"qualified\",prelude:s,block:i})}return n}function Br(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 a=t[i];if(a.type===\";\"||a.type===\"block\"&&a.open===\"{\")return i+1}return t.length})();e.push(...yt(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 a=_s(r.value,t.slice(s+1,i));if(a.value.some(l=>l.type===\"block\"&&l.open===\"{\")){let l=t.findIndex((c,u)=>u>n&&c.type===\"block\"&&c.open===\"{\");e.push(...yt(t.slice(n,l+1),!1)),n=l+1;continue}e.push(a),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(...yt(t.slice(n,o+1),!1)),n=o+1}return e}function _s(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 Yr(t){let e=new Ur(qi(t)),n=[];for(;e.peek();)n.push(Ps(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&&ee(r)||o===1&&ee(r)&&n[0]===45?e+=`\\\\${r.toString(16)} `:o===0&&r===45&&n.length===1?e+=\"\\\\-\":Fr(r)||r===45||r===95||ee(r)||zr(r)?e+=String.fromCodePoint(r):e+=`\\\\${String.fromCodePoint(r)}`}),e}function Zn(t){let e=\"\";for(let n of t){let r=n.codePointAt(0);Fr(r)||r===45||r===95||ee(r)||zr(r)?e+=n:r>=1&&r<=31||r===127?e+=`\\\\${r.toString(16)} `:e+=`\\\\${n}`}return e}function Gr(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 Xi(t){let e=Zn(t);return/^[eE]([0-9]|[+-][0-9])/.test(t)?`\\\\${t.codePointAt(0).toString(16)} ${Zn(t.slice(1))}`:e}var ks=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 Ki(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 Zi(t){switch(t.type){case\"whitespace\":return\" \";case\"ident\":return Kn(t.value);case\"at-keyword\":return`@${Kn(t.value)}`;case\"hash\":return`#${Zn(t.value)}`;case\"string\":return Gr(t.value);case\"url\":return`url(${Gr(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}${Xi(t.unit)}`;case\"func\":return`${Kn(t.name)}(${bt(t.value)})`;case\"block\":return`${t.open}${bt(t.value)}${Rs[t.open]}`;case\":\":case\";\":case\",\":case\"[\":case\"]\":case\"(\":case\")\":case\"{\":case\"}\":return t.type;default:return\"\"}}function bt(t){let e=\"\",n;for(let r of t)r.type===\"whitespace\"&&n?.type===\"whitespace\"||(n&&Ki(ks(n),ks(r))&&(e+=\"/**/\"),e+=Zi(r),n=r);return e}var Ji=new Set(Jo),Is=new Set(Qo),Os=new Set(es),Qi=new Set(ts),ea=new Set(rs),ta=new Set(os),As=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,Ce=t=>t.replace(/[A-Z]/g,e=>e.toLowerCase()),na=t=>Ce(t);function jr(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&&Os.has(t)&&As.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=Ce(o.name);if(s===\"url\"||s===\"src\"){let a=o.value.filter(c=>c.type!==\"whitespace\"),l=a[0];if(s===\"url\"&&a.length===1&&l?.type===\"string\"&&t&&Os.has(t)&&As.test(l.value)){r.push({type:\"func\",name:\"url\",value:[{type:\"string\",value:l.value}]});continue}n({reason:\"url\",...t?{name:t}:{}});return}if(!Is.has(s)){n({reason:\"function\",name:s});return}let i=jr(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=jr(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}var ra=/^(animation|transition|scroll-behavior)/;function Qn(t,e,n=!1){let r=t.name.startsWith(\"--\"),o=r?t.name:na(t.name);if(!r&&!Ji.has(o)){e({reason:\"property\",name:o});return}let s=ns[o];if(s){let l=t.value.filter(w=>w.type!==\"whitespace\"),c=l[0],u=l.length===1&&c?.type===\"ident\"?Ce(c.value):void 0;if(!u||![...s,\"inherit\",\"initial\",\"unset\",\"revert\"].includes(u)){e({reason:\"value\",name:o});return}return`${o}: ${u}${t.important?\" !important\":\"\"}`}let i=jr(r?void 0:o,t.value,e);if(!i)return;let a=bt(i).trim();return`${r?`--${Zn(t.name.slice(2))}`:o}: ${a}${t.important&&!(n&&ra.test(o))?\" !important\":\"\"}`}function Ds(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 a=Ce(s.type===\"ident\"?s.value:s.name);if(ea.has(a)||(a.startsWith(\"-webkit-\")||a.startsWith(\"-moz-\"))&&!ta.has(a))return e({reason:\"selector\",name:a}),!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 $r(t,e,n){let r=[];for(let o of Br(t))if(o.type===\"declaration\"){let s=Qn(o,e);s&&r.push(`${s};`)}else{let s=Jn(o,e,n+1,\"style\");s&&r.push(s)}return r.join(\" \")}function oa(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=Ce(s.name);return e===\"supports\"&&i===\"selector\"?Ds(s.value,n):Is.has(i)?r(s.value):(n({reason:\"function\",name:i}),!1)}if(s.type===\"block\"){if(e===\"supports\"){let i=Br(s.value);if(i.length===1&&i[0].type===\"declaration\")return Qn(i[0],n)!==void 0}return r(s.value)}return!0});return r(t)?bt(t).trim():void 0}function Vr(t){return t.map((e,n)=>{let r=t[n-1],o=r?.type===\":\"||r?.type===\"delim\"&&(r.value===\".\"||r.value===\"|\");return e.type===\"ident\"&&!o&&Object.prototype.hasOwnProperty.call(Vt,Ce(e.value))?{type:\"block\",open:\"[\",value:[{type:\"ident\",value:\"data-graview-as\"},{type:\"delim\",value:\"=\"},{type:\"string\",value:Ce(e.value)}]}:e.type===\"func\"?{type:\"func\",name:e.name,value:Vr(e.value)}:e.type===\"block\"&&e.open===\"(\"?{type:\"block\",open:\"(\",value:Vr(e.value)}:e})}function Jn(t,e,n,r){if(n>Cs){e({reason:\"unreadable\",name:\"nesting\"});return}if(t.type===\"qualified\"){if(r===\"keyframes\"){if(!t.prelude.every(u=>u.type===\"whitespace\"||u.type===\",\"||u.type===\"percentage\"||u.type===\"ident\"&&[\"from\",\"to\"].includes(Ce(u.value)))){e({reason:\"unreadable\",name:\"keyframe\"});return}return`${bt(t.prelude).trim()} { ${$r(t.block,e,n)} }`}if(!Ds(t.prelude,e))return;let l=bt(Vr(t.prelude)).trim();if(l===\"\"){e({reason:\"unreadable\",name:\"selector\"});return}return`${l} { ${$r(t.block,e,n)} }`}let o=Ce(t.name),s=o===\"-webkit-keyframes\"?\"keyframes\":o;if(!Qi.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 l=t.prelude.filter(d=>d.type!==\"whitespace\"),c=l[0];if(l.length!==1||!c||c.type!==\"ident\"&&c.type!==\"string\"){e({reason:\"unreadable\",name:\"@keyframes\"});return}let u=yt(t.block,!1).map(d=>Jn(d,e,n+1,\"keyframes\")).filter(d=>d!==void 0);return`@keyframes ${c.type===\"ident\"?Kn(c.value):Gr(c.value)} { ${u.join(\" \")} }`}let i=oa(t.prelude,s,e);if(i===void 0)return;let a=r===\"style\"?$r(t.block,e,n):yt(t.block,!1).map(l=>Jn(l,e,n+1,\"sheet\")).filter(l=>l!==void 0).join(\" \");return`@${s} ${i} { ${a} }`}function sa(t,e=Bn){let n=[];if(t.length>e)return{css:\"\",refused:[{reason:\"size\"}]};let r=s=>void n.push(s);return{css:yt(Yr(t),!0).map(s=>Jn(s,r,0,\"sheet\")).filter(s=>s!==void 0).join(`\n`),refused:n}}function Ms(t,e=Bn){let n=[],r=[],o=0;for(let s of t){if(o+s.length>e){r.push({reason:\"size\"});continue}o+=s.length;let i=sa(s,e);i.css&&n.push(i.css),r.push(...i.refused)}return{css:n.join(`\n`),refused:r}}function Ls(t,e=Bn){let n=[];if(t.length>e)return{css:\"\",refused:[{reason:\"size\"}]};let r=s=>void n.push(s),o=[];for(let s of Br(Yr(t))){if(s.type!==\"declaration\"){r({reason:\"unreadable\",name:\"a rule in a style attribute\"});continue}let i=Qn(s,r,!0);i&&o.push(i)}return{css:o.join(\"; \"),refused:n}}function Hs(t,e){let n,r=Qn(_s(t,Yr(e)),o=>n??=o);return r===void 0||n?{refused:n??{reason:\"unreadable\",name:t}}:{value:r.slice(r.indexOf(\":\")+1).trim()}}function $s(t,e){if(e===\"svg\"){let r=Yn(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(ht,n)?Object.prototype.hasOwnProperty.call(Vt,n)?{namespace:\"html\",name:Vt[n],as:n}:{namespace:\"html\",name:n}:{refused:{reason:\"element\",element:t}}}function er(t,e){return(t===\"html\"?ht[e]:zn[e])?.empty===!0}var ia=/^[+-]?(\\d+\\.?\\d*|\\.\\d+)([eE][+-]?\\d+)?$/,aa=/^[0-9A-Za-z\\s.,+\\-%()]*$/,la=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,ca=/^data:image\\/(png|gif|jpeg|webp|avif|bmp|svg\\+xml)(;[A-Za-z0-9=._+-]+)*,/i,da=/^\\/graview\\/assets\\/[0-9a-f]{64}\\.(png|gif|jpe?g|webp|avif|svg|ico)$/,Us=/\\/graview\\/assets\\/[0-9a-f]{64}\\.(png|gif|jpe?g|webp|avif|svg|ico)$/,ua=/^\\/(?!\\/)(?!(?:.*\\/)?\\.\\.?(?:\\/|$))(?!.*%(?:2e|2f|5c))[^\\\\\\s?#\"'<>]*$/i;function fa(t,e){if(da.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(ua.test(n))return Us.exec(n)?.[0]}function Gs(t,e={},n){let r=t.length>120?`${t.slice(0,119)}\\u2026`:t,o=js(e.origins),s=Us.exec(t.split(/[?#]/)[0])?.[0],i=n!==void 0&&n>zt?` It is a data: image of ${n.toLocaleString(\"en-US\")} characters, more than the ${zt.toLocaleString(\"en-US\")} a view's own data: image may be. A picture on a record is drawn at any size by the src the host hands the view (pictures in its manifest), used as it was handed.`:s?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, ${s}.`:\" 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)?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 (images.origins, on the view's definition).\":\"\",a=[\"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)\",...o.length>0?[`an https: image from ${o.join(\", \")}`]:[]];return`The image \"${r}\" was not drawn.${i} A view here shows ${a.slice(0,-1).join(\", \")} or ${a[a.length-1]}.`}function js(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 ma(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:js(e).includes(n.origin)?n.href:void 0}catch{return}}function Wr(t,e,n,r,o){let s=Wn(t,e,n);if(!s)return{refused:{reason:\"attribute\",element:e,name:n}};if(t===\"html\"&&Fn[e]?.includes(s.name))return{refused:{reason:\"attribute\",element:e,name:n}};if(r===null)return{name:s.name,value:null};let i=pa(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),...r.length>zt?{length:r.length}:{}}:{},...s.kind===\"link\"?{address:r.slice(0,200)}:{}}}:s.name===\"role\"&&i.value.split(/\\s+/).some(a=>Xo.includes(a.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(a=>({reason:a.reason===\"url\"?\"url\":\"css\",element:e,name:s.name,css:a}))}:{}}}function pa(t,e,n,r){let o=(s,i)=>({refused:{reason:s,name:t,...i?{css:i}:{}}});if(e===\"geometry\")return n.length>ss||!aa.test(n)||/url/i.test(n)?o(\"value\"):{value:n};if(e===\"image\"){let s=r.picture?.(n);if(s!==void 0)return{value:s};if(n.length>zt)return o(\"url\");if(ca.test(n))return{value:n};if(n.startsWith(`blob:${r.origin}/`)&&/^blob:[^\\s\"'<>]+$/.test(n))return{value:n};let i=r.asset?fa(n,r.origin):void 0;if(i!==void 0){let l=r.asset(i);if(l)return{value:l}}let a=ma(n,r.imageOrigins);return a?{value:a}:o(\"url\")}if(e===\"link\"){let s=r.link?.(n);return s===void 0?o(\"url\"):{value:s}}if(n.length>Mr)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 ia.test(n.trim())&&Number.isFinite(Number(n))?{value:n.trim()}:o(\"value\");case\"boolean\":return{value:\"\"};case\"fragment\":return la.test(n)?{value:n}:o(\"url\");case\"style\":{let s=Ls(n,Mr);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=Hs(t,n);return\"refused\"in s?o(s.refused.reason===\"url\"?\"url\":\"css\",s.refused):{value:s.value}}}}var ha=\"http://www.w3.org/1999/xhtml\",ga=new Set([\"button\",\"submit\",\"reset\",\"checkbox\",\"radio\",\"image\"]);var tr=(t,...e)=>t.namespaceURI===ha&&e.includes(t.localName),ya=t=>(t.getAttribute(\"type\")??\"text\").toLowerCase(),ba=t=>tr(t,\"textarea\",\"select\")||tr(t,\"input\")&&!ga.has(ya(t));function Vs(t){if(tr(t,\"option\",\"optgroup\",\"datalist\"))return'An option is never pressed by itself: put data-act on its select, with data-save=\"change\", or on a button.';if(tr(t,\"label\"))return\"A press on a label presses its field too, and would ask for the act twice: put data-act on a button, or on the field.\";if(ba(t)&&!t.hasAttribute(\"data-save\"))return'A click into a field to type or to pick is not a press: give it data-save (\"input\" or \"change\") to save it as it is typed, or put data-act on a button beside it.'}var Ea=\"http://www.w3.org/1999/xhtml\",Et=class{constructor(e){this.ownerDocument=e}parentNode=null;childNodes=[];get firstChild(){return this.childNodes[0]??null}get parentElement(){return this.parentNode instanceof Xe?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}},qe=class extends Et{constructor(n,r){super(n);this.data=r}nodeType=3;get textContent(){return this.data}},qr=class extends Et{nodeType=8;get textContent(){return\"\"}},Xe=class extends Et{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}},Xr=class extends Et{nodeType=9;constructor(){super(null)}createElementNS(e,n){return new Xe(this,e,n)}createElement(e){return new Xe(this,Ea,e)}createTextNode(e){return new qe(this,e)}createComment(e){return new qr(this)}};function zs(){let t=new Xr,e=t.createElement(\"div\");return e.setAttribute(\"data-graview-view-root\",\"\"),t.appendChild(e),{document:t,root:e}}var Kr={h1:1,h2:2,h3:3,h4:4,h5:5,h6:6},Fs=new Set([\"a\",\"abbr\",\"b\",\"bdi\",\"bdo\",\"br\",\"cite\",\"code\",\"data\",\"del\",\"dfn\",\"em\",\"i\",\"ins\",\"kbd\",\"q\",\"s\",\"samp\",\"small\",\"span\",\"strong\",\"sub\",\"sup\",\"time\",\"u\",\"var\",\"wbr\",\"label\"]),Bs=new Set([\"style\",\"template\",\"datalist\",\"option\"]),q=t=>t.replace(/\\s+/g,\" \").trim();function wa(t){let e=t.duration===void 0?0:Math.round(t.duration);if(e<1)return\"a video\";if(e<60)return`a ${e}-second video`;let n=Math.round(e/60);return n<60?`a ${n}-minute video`:`a ${Math.floor(n/60)}-hour${n%60>0?` ${n%60}-minute`:\"\"} video`}var de=t=>t instanceof Xe,Yt=t=>t.hasAttribute(\"hidden\")||t.getAttribute(\"aria-hidden\")===\"true\";function te(t){return t instanceof qe?t.data:!de(t)||Yt(t)||Bs.has(t.localName)?\"\":t.localName===\"br\"?\" \":t.localName===\"img\"?t.getAttribute(\"alt\")??\"\":t.childNodes.map(te).join(t.localName===\"td\"||t.localName===\"th\"?\" \":\"\")}function*Ke(t){for(let e of t.childNodes)de(e)&&(yield e,yield*Ke(e))}function Na(t){let e=t.getAttribute(\"data-save\"),n=t.getAttribute(\"data-debounce\");if(e===null&&n===null)return[];let r=`drawing <${t.localName}${e!==null?` data-save=\"${e}\"`:` data-debounce=\"${n}\"`}>`,o=[];if(e===null)return[{at:r,says:'data-debounce is read only on a field that saves as it is typed (data-save=\"input\").'}];if(![\"input\",\"textarea\",\"select\"].includes(t.localName))o.push({at:r,says:\"Only a field saves as it is typed: an input, a textarea or a select. A button is pressed (data-act alone).\"});else if(e!==\"input\"&&e!==\"change\")o.push({at:r,says:`data-save is \"input\" (saved as the person types, once they pause, and when they leave it) or \"change\" (saved when they leave it or pick), not \"${e}\".`});else if(t.getAttribute(\"data-act\")===null)o.push({at:r,says:'It saves through no act: a field saved as it is typed names its act itself, data-act=\"\\u2026\", one in the manifest.'});else if(!t.getAttribute(\"name\"))o.push({at:r,says:\"It has no name: the host sends a field as the act's argument its name says.\"});else{let s=!1,i=!1;for(let a=t;a;a=a.parentElement)a.getAttribute(\"data-record\")!==null&&(i=!0),a!==t&&(a.localName===\"fieldset\"||a.getAttribute(\"role\")===\"group\")&&(s=!0);(!s||!i)&&o.push({at:r,says:'It is in no fieldset bound to a record: the host saves a field inside <fieldset data-record=\"\\u2026\">, with the fields beside it, to the record the fieldset names.'})}return n!==null&&e!==\"input\"?o.push({at:r,says:'data-debounce is read only with data-save=\"input\": a \"change\" saves at once.'}):n!==null&&!(n.trim()!==\"\"&&Number.isFinite(Number(n))&&Number(n)>=250&&Number(n)<=1e4)&&o.push({at:r,says:`data-debounce is how long the host waits for the person to pause, in milliseconds from 250 to 10 000, not \"${n}\"; left out, it waits 1 000.`}),o}function xa(t,e,n){let r=t.getAttribute(\"data-drop\");if(r===null)return[];let o=`drawing <${t.localName} data-drop=\"${r}\">`,s=[],i=(e.accepts??[]).filter(c=>c.kind===r),a=t.getAttribute(\"data-drop-field\");i.length===0?s.push({at:o,says:`The view's accepts names no field of \"${r}\", so the host offers no drop target here: say the field files go in, accepts: [{ \"kind\": \"${r}\", \"field\": \"<its image, video or file field>\" }].`}):a!==null&&!i.some(c=>c.field===a)&&s.push({at:o,says:`data-drop-field names \"${a}\", which the view's accepts does not name for \"${r}\" (${i.map(c=>`\"${c.field}\"`).join(\", \")}): the host offers no drop target here.`});let l=t.getAttribute(\"data-drop-connect\");if(l!==null){let c=l.indexOf(\":\"),u=c>0?l.slice(c+1):\"\";c<=0||u===\"\"||n.has(l)?s.push({at:o,says:`data-drop-connect is \"<relation>:<record id>\" \\u2014 \"takenOn:day:saturday\" \\u2014 not \"${l}\"${n.has(l)?\", which names a record and no relation\":\"\"}.`}):n.has(u)||s.push({at:o,says:`data-drop-connect names \"${u}\", which this seat was not shown: the host offers no drop target here.`})}return s}function Ys(t,e){let n=[],r=new Set,o=new Set,s=new Map;for(let d of[...e.props.node?[e.props.node]:[],...e.props.nodes??[]])s.set(d.id,d);let i=d=>Ft(e.places,d)!==void 0;for(let d of Ke(t)){let p=d.getAttribute(\"data-act\");p!==null&&r.add(p);let N=p!==null&&d.getAttribute(\"data-debounce\")===null?Vs(d):void 0;N&&n.push({at:`drawing <${d.localName} data-act=\"${p}\">`,says:N});let v=d.getAttribute(\"data-record\");v!==null&&(o.add(v),!s.has(v)&&!i(v)&&n.push({at:`drawing <${d.localName} data-record=\"${v}\">`,says:e.placesUnsure?`It names \"${v}\", which this seat was not shown and is none of the places this run was told of. A view goes to a record by its id, or to a place by its slug.${xe(e.places)}${gt}`:`It names \"${v}\", 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.${xe(e.places)}`}));let m=d.getAttribute(\"data-place\");m!==null&&!i(m)&&n.push({at:`drawing <${d.localName} data-place=\"${m}\">`,says:e.placesUnsure?`It names the place \"${m}\", which is none of the places this run was told of.${xe(e.places)}${gt}`:`It names the place \"${m}\", which this app does not have.${xe(e.places)}`}),n.push(...Na(d)),n.push(...xa(d,e,s))}let a=d=>{if(d.localName===\"graview-video\")return;let p=d.getAttribute(\"data-record\");if(p!==null)return p;let N=d.getAttribute(\"data-key\")??d.getAttribute(\"id\");if(N!==null&&s.has(N))return N;let v=new Set;for(let m of Ke(d)){let f=m.getAttribute(\"data-record\");f!==null&&m.localName!==\"graview-video\"&&v.add(f)}return v.size===1?[...v][0]:void 0},l=(d,p)=>{let N=s.get(p),v=N?.kind??(p.includes(\":\")?p.slice(0,p.indexOf(\":\")):\"\"),m=[...Ke(d)],f=m.find(E=>E.localName in Kr)??m.find(E=>E.localName===\"a\"&&E.getAttribute(\"data-record\")===p)??m.find(E=>E.localName===\"strong\"||E.localName===\"b\"),b=q(f?te(f):\"\")||N?.label||p,y=u(d,f);return!f&&y[0]?.t===\"text\"&&q(y[0].text)===b&&y.shift(),{id:p,kind:v,title:b,parts:y}},c=d=>{let p=[...Ke(d)].filter(f=>f.localName===\"tr\"&&!Yt(f)),N=p.find(f=>f.parentElement?.localName===\"thead\"||f.childNodes.every(b=>!de(b)||b.localName===\"th\")),v=N?N.childNodes.filter(de).map(f=>q(te(f))):[];return{t:\"list\",as:\"row\",columns:1,groups:[{items:p.filter(f=>f!==N).map(f=>{let b=f.childNodes.filter(de),y=a(f),E=y?s.get(y):void 0;return{id:y??\"\",kind:E?.kind??\"\",title:q(te(b[0]??f)),parts:b.slice(1).map((H,h)=>({t:\"field\",label:v[h+1]??\"\",text:q(te(H))}))}})}]}};function u(d,p){let N=[],v=\"\",m=()=>{let b=q(v);v=\"\",b&&N.push({t:\"text\",text:b})},f=d.childNodes;for(let b=0;b<f.length;b+=1){let y=f[b];if(y===p)continue;if(y instanceof qe){v+=y.data;continue}if(!de(y)||Yt(y)||Bs.has(y.localName))continue;if(p&&[...Ke(y)].includes(p)){m(),N.push(...u(y,p));continue}let E=[];for(let H=b;H<f.length;H+=1){let h=f[H];if(h instanceof qe&&q(h.data)===\"\")continue;if(!de(h)||Yt(h)||Fs.has(h.localName)||h.localName in Kr)break;let I=a(h);if(!I)break;E.push({element:h,id:I}),b=H}if(E.length>0){m();let H=E.every(h=>h.element.localName===\"li\"||h.element.localName===\"tr\");N.push({t:\"list\",as:H?\"row\":\"card\",columns:1,groups:[{items:E.map(h=>l(h.element,h.id))}]});continue}N.push(...w(y,H=>v+=H,m))}return m(),N}function w(d,p,N){let v=d.localName;if(Fs.has(v)&&v!==\"label\")return p(te(d)),[];if(v===\"mark\"){N();let f=q(te(d));return f?[{t:\"badge\",text:f}]:[]}N();let m=Kr[v]??(d.getAttribute(\"role\")===\"heading\"?Number(d.getAttribute(\"aria-level\")??2):void 0);if(m!==void 0){let f=q(te(d));return f?[{t:\"heading\",level:m,text:f}]:[]}switch(v){case\"ul\":case\"ol\":case\"menu\":return[{t:\"list\",as:\"row\",columns:1,groups:[{items:d.childNodes.filter(b=>de(b)&&b.localName===\"li\"&&!Yt(b)).map(b=>{let y=a(b);if(y)return l(b,y);let E=u(b),H=E[0],h=H&&(H.t===\"text\"||H.t===\"heading\")?H.text:\"\";return{id:\"\",kind:\"\",title:h,parts:h?E.slice(1):E}})}]}];case\"table\":return[c(d)];case\"dl\":{let f=[],b=\"\";for(let y of d.childNodes.filter(de))if(y.localName===\"dt\")b=q(te(y));else if(y.localName===\"dd\")f.push({t:\"field\",label:b,text:q(te(y))});else if(y.localName===\"div\")for(let E of y.childNodes.filter(de))E.localName===\"dt\"?b=q(te(E)):E.localName===\"dd\"&&f.push({t:\"field\",label:b,text:q(te(E))});return f}case\"figure\":{let f=d.childNodes.find(E=>de(E)&&E.localName===\"figcaption\"),b=q(d.childNodes.filter(E=>E!==f).map(te).join(\" \")),y=f?q(te(f)):\"\";return b?[{t:\"figure\",text:b,...y?{label:y}:{}}]:y?[{t:\"text\",text:y}]:[]}case\"meter\":case\"progress\":{let f=Number(d.getAttribute(\"value\")??0),b=Number(d.getAttribute(\"max\")??1)||1;return[{t:\"progress\",label:d.getAttribute(\"aria-label\")??d.getAttribute(\"title\")??\"\",text:`${Math.round(f/b*100)}%`}]}case\"svg\":{let f=d.childNodes.find(E=>de(E)&&E.localName===\"title\"),b=q(d.getAttribute(\"aria-label\")??(f?te(f):\"\"));if(b)return[{t:\"text\",text:b,tone:\"picture\"}];let y=[...Ke(d)].filter(E=>E.localName===\"text\").map(E=>q(te(E))).filter(Boolean);return y.length>0?[{t:\"text\",text:y.join(\" \\xB7 \"),tone:\"picture\"}]:[]}case\"img\":{let f=q(d.getAttribute(\"alt\")??\"\");return f?[{t:\"text\",text:f,tone:\"picture\"}]:[]}case\"graview-video\":{let f=d.getAttribute(\"data-field\")??\"\",b=s.get(d.getAttribute(\"data-record\")??\"\"),y=b&&f&&Object.hasOwn(b,f)?b[f]:void 0,E=(Array.isArray(y)?y:[y])[Number(d.getAttribute(\"data-index\")??\"0\")];return!E||typeof E.name!=\"string\"||typeof E.type!=\"string\"||!E.type.startsWith(\"video/\")?(n.push({at:`drawing <graview-video data-field=\"${f}\">`,says:\"It names no video on a record this seat was shown: the host draws no player there. A <graview-video> names a record the view was shown (data-record) and its video field (data-field).\"}),[]):[{t:\"text\",text:`${typeof E.caption==\"string\"&&E.caption.trim()?E.caption.trim():E.name}, ${wa(typeof E.duration==\"number\"?{duration:E.duration}:{})}`,tone:\"picture\"}]}case\"button\":{let f=q(te(d));return f?[{t:\"text\",text:f,tone:\"button\"}]:[]}case\"input\":case\"textarea\":case\"select\":{let f=q(d.getAttribute(\"aria-label\")??d.getAttribute(\"placeholder\")??d.getAttribute(\"name\")??\"\"),b=v===\"select\"?q(te(d.childNodes.find(y=>de(y)&&y.localName===\"option\"&&y.selected)??d)):d.value;return[{t:\"field\",label:f,text:b}]}case\"label\":return u(d);default:return u(d)}}return{parts:u(t),problems:n,acts:[...r],records:[...o]}}var Ta=0,va=1,Sa=2,ka=3,Ws=1,Oa=2,qs=3,Aa=1,Ra=3,Ca=8,Xs=\"~\",Wt=t=>typeof t==\"object\"&&t!==null&&!Array.isArray(t),Ks=new Set([\"input\",\"select\",\"textarea\",\"option\"]),Pa=new Set([\"value\",\"checked\",\"selected\"]),Zs=[\"aria-label\",\"aria-labelledby\",\"title\"],_a=t=>Zs.some(e=>(t.getAttribute(e)??\"\").trim()!==\"\");function Js(t,e){let n=t.ownerDocument??t,r=e.maxNodes??5e3,o=[],s=new Map,i=new WeakMap,a={dom:t,name:\"div\",namespace:\"html\",children:[],id:Xs};s.set(Xs,a);let l=0,c=!1,u=new WeakMap,w=new Map,d=new Map,p=h=>{o.push(h),o.length>200&&o.shift(),e.onRefused?.(h)},N=()=>({dom:n.createComment(\"\"),children:[],refused:!0}),v=(h,I)=>{if(h.namespace===\"html\"&&h.name&&Ks.has(h.name))return h.dom;if(I?.namespace===\"html\"&&I.name===\"textarea\")return I.dom},m=(h,I)=>{let R=h.dom,C=u.get(R)??R.getAttribute(\"role\");if(C===null||!C.split(/\\s+/).some(O=>Ko.includes(O.toLowerCase())))return void u.delete(R);if(_a(R)){u.delete(R),R.getAttribute(\"role\")!==C&&R.setAttribute(\"role\",C);return}u.set(R,C),R.removeAttribute(\"role\"),I&&p({reason:\"value\",element:h.name,name:\"role\"})},f=()=>{if(d.size===0)return;let h=new Set,I=R=>{for(let C of R.children){if(C.refused||C.text)continue;let O=C.dom.getAttribute(\"id\");O&&h.add(O),I(C)}};I(a);for(let[R,C]of d){if(R.id===void 0||s.get(R.id)!==R){d.delete(R);continue}let O=R.dom;for(let[T,V]of C){let $=V.value.split(/\\s+/).filter(ne=>ne!==\"\"),W=$.filter(ne=>!h.has(ne));if($.length>0&&W.length===0){if(V.drawn)continue;V.drawn=!0,O.setAttribute(T,V.value),m(R,!1)}else V.drawn&&(V.drawn=!1,O.removeAttribute(T),p({reason:\"reference\",element:R.name,name:T,ids:W.length>0?W:$}),m(R,!0))}}},b=(h,I,R,C=!0)=>{let O=h.dom;if(R!=null&&typeof R!=\"string\")return p({reason:\"value\",element:h.name,name:I});let T=Wr(h.namespace,h.name,I,R??null,e);if(\"refused\"in T){let ne=Wr(h.namespace,h.name,I,null,e);return\"refused\"in ne||O.removeAttribute(ne.name),!(\"refused\"in ne)&&ne.name===\"role\"&&u.delete(O),p(T.refused)}for(let ne of T.dropped??[])p(ne);let V=h.namespace===\"html\"&&Pa.has(T.name)&&Ks.has(h.name),$=O,W=V?T.name===\"value\"?$.value:T.name===\"checked\"?$.checked:$.selected:void 0;if(T.name===\"role\"&&u.delete(O),Zo.includes(T.name)){let ne=d.get(h)??new Map;T.value===null?ne.delete(T.name):ne.set(T.name,{value:T.value,drawn:!0}),ne.size>0?d.set(h,ne):d.delete(h)}T.value===null?O.removeAttribute(T.name):O.setAttribute(T.name,T.value),C&&(T.name===\"role\"||Zs.includes(T.name))&&m(h,T.name===\"role\"),e.onAttribute?.(O,T.name),V&&(T.name===\"value\"&&\"value\"in $?($.value=T.value??\"\",W!==$.value&&e.onFieldSet?.(O)):T.name===\"checked\"&&\"checked\"in $?($.checked=T.value!==null,W!==$.checked&&e.onFieldSet?.(O)):T.name===\"selected\"&&\"selected\"in $&&($.selected=T.value!==null,W!==$.selected&&e.onFieldSet?.(O.parentElement?.closest(\"select\")??O)))},y=h=>{if(!h.refused){l-=1,h.id!==void 0&&s.delete(h.id);for(let I of h.children)y(I)}},E=(h,I)=>{if(!Wt(h)||typeof h.id!=\"string\"||s.has(h.id))return p({reason:\"record\"}),N();if(l>=r)return p({reason:\"budget\"}),c||(c=!0,e.onOverBudget?.()),N();let R=h.id;if(h.type===Ca)return N();if(h.type===Ra){if(er(I.namespace,I.name))return p({reason:\"child\",element:I.name}),N();let $=n.createTextNode(String(h.data??\"\").slice(0,Lr)),W={dom:$,children:[],text:!0,id:R,parent:I};return s.set(R,W),i.set($,R),l+=1,W}if(h.type!==Aa)return p({reason:\"record\"}),N();let C=String(h.element);if(er(I.namespace,I.name))return p({reason:\"child\",element:C}),N();let O=$s(C,I.namespace);if(\"refused\"in O)return p(O.refused),N();let T=n.createElementNS(O.namespace===\"svg\"?as:is,O.name);O.as&&T.setAttribute(\"data-graview-as\",O.as),O.namespace===\"html\"&&O.name===\"img\"&&T.setAttribute(\"referrerpolicy\",\"no-referrer\"),O.namespace===\"html\"&&O.name===\"a\"&&(T.setAttribute(\"target\",\"_blank\"),T.setAttribute(\"rel\",\"noopener noreferrer\"),T.setAttribute(\"referrerpolicy\",\"no-referrer\"));let V={dom:T,name:O.name,namespace:O.namespace,children:[],id:R,parent:I};if(s.set(R,V),i.set(T,R),l+=1,Wt(h.attributes)){for(let[$,W]of Object.entries(h.attributes))b(V,$,W,!1);m(V,!0)}if(e.decorate?.(T,O.name,O.namespace),Wt(h.properties))for(let $ of Object.keys(h.properties))p({reason:\"attribute\",element:O.name,name:$});if(Wt(h.eventListeners))for(let $ of Object.keys(h.eventListeners))h.eventListeners[$]!=null&&p({reason:\"attribute\",element:O.name,name:`on${$}`});if(Array.isArray(h.children))for(let $ of h.children){let W=E($,V);V.children.push(W),T.appendChild(W.dom)}return V},H=h=>{if(!Array.isArray(h))return p({reason:\"record\"});let[I,R]=h,C=typeof R==\"string\"?s.get(R):void 0;if(!C)return p({reason:\"record\"});switch(I){case Ta:{if(C.text)return p({reason:\"record\"});let O=Number(h[3]),T=Number.isInteger(O)&&O>=0&&O<=C.children.length?O:C.children.length,V=h[2],$=Wt(V)&&typeof V.id==\"string\"?w.get(V.id):void 0,W;$&&$.parent?.namespace===C.namespace&&!er(C.namespace,C.name)?(w.delete(V.id),$.parent=C,W=$):W=E(V,C),C.dom.insertBefore(W.dom,C.children[T]?.dom??null),C.children.splice(T,0,W),C.namespace===\"html\"&&C.name===\"textarea\"&&e.onFieldSet?.(C.dom);return}case va:{let O=Number(h[2]),T=C.children[O];if(!T)return p({reason:\"record\"});C.children.splice(O,1),T.dom.parentNode?.removeChild(T.dom),T.id!==void 0&&!T.refused?w.set(T.id,T):y(T);return}case Sa:{if(!C.text)return p({reason:\"record\"});C.dom.data=String(h[2]??\"\").slice(0,Lr);let O=v(C,C.parent);O&&e.onFieldSet?.(O);return}case ka:{if(C===a||C.text)return p({reason:\"record\"});let O=String(h[2]),T=h[4]??Ws;return T===Oa?b(C,O,h[3]):p(T===Ws||T===qs?{reason:\"attribute\",element:C.name,name:T===qs?`on${O}`:O}:{reason:\"record\"})}default:return p({reason:\"record\"})}};return{apply(h,I){if(!Array.isArray(h))return p({reason:\"record\"}),!0;try{for(let R=0;R<h.length;R+=1){if(I&&R%32===0&&I())return!1;H(h[R])}return!0}finally{for(let R of w.values())y(R);w.clear(),f()}},get refused(){return o},get size(){return l},idOf:h=>i.get(h),elementOf(h){let I=s.get(h);return I&&!I.text&&I!==a?I.dom:void 0},dispose(){for(let h of a.children)y(h);for(a.children.length=0;t.firstChild;)t.removeChild(t.firstChild)}}}function Qs(t,e,n){let{root:r}=zs(),o=!1,s=Js(r,{origin:n.origin??\"null\",...n.imageOrigins?{imageOrigins:n.imageOrigins}:{},...n.asset?{asset:n.asset}:{},...n.link?{link:n.link}:{},maxNodes:n.maxNodes,onOverBudget:()=>o=!0});for(let l of t)s.apply(l);let i=[...s.refused],a=\"\";if(e){let l=Ms(e);a=l.css;for(let c of l.refused)i.push({reason:\"css\",name:\"stylesheet\",css:c})}return{root:r,refused:i,size:s.size,over:o,css:a,elementOf:l=>s.elementOf(l)}}var nr=\" SMIL can set an attribute after the host judged it, and runs past a person's reduced-motion setting: animate with CSS @keyframes, which is held to it.\",ei={animate:nr,animateTransform:nr,animateMotion:nr,set:nr,feImage:\" It loads an image: a filter here is made of the view's own pixels.\",\"@property\":\" It registers a property for the whole page, the app's own --graview-* among them: animate a transform, an opacity or a color in @keyframes.\",\"a href\":\" An <a> in SVG goes to a record or a place (data-record, data-place); a link out is an HTML <a href>.\",role:` A role of the app's chrome or notices is the app's; role=\"region\" is drawn while it has a name (aria-label).`};function Ia(t,e={}){let n=\"element\"in t&&t.element?`<${t.element}>`:\"\",r=t.name?` ${t.name}`:\"\",o=s=>s&&Object.prototype.hasOwnProperty.call(ei,s)?ei[s]:\"\";switch(t.reason){case\"element\":return{at:`drawing ${n}`,says:`Not drawn: ${n} is not in the open kit.${o(\"element\"in t?t.element:void 0)}`};case\"attribute\":return{at:`drawing ${n}${r}`,says:`Not drawn: ${n||\"an element\"} does not take${r}.${o(`${\"element\"in t?t.element:\"\"}${r}`)}`};case\"value\":return{at:`drawing ${n}${r}`,says:`Not drawn: the value of${r} is not one the open kit takes.${o(t.name)}`};case\"url\":return\"element\"in t&&t.element===\"a\"&&t.address!==void 0?{at:`drawing ${n}${r}`,says:`Not drawn: ${Ns(t.address,e.linkOrigins)}`}:{at:`drawing ${n}${r}`,says:t.address!==void 0&&\"element\"in t&&t.element===\"img\"?`Not drawn: ${Gs(t.address,e,\"length\"in t?t.length:void 0)}`:\"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\"reference\":{let s=\"ids\"in t&&t.ids?t.ids:[],i=s.length>0?s.map(a=>`\"${a}\"`).join(\", \"):\"no id\";return{at:`drawing ${n}${r}`,says:`Not drawn: ${n||\"an element\"}${r} names ${i}, ${s.length===1?\"which is\":\"which are\"} no element of this view. It names elements the view draws itself, by their id (<h2 id=\"\\u2026\">), drawn once each is there.`}}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}`:\"\"})`:\"\"}.${o(t.css?.name)}`}}}function ti(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=bs(e.props),s=Qs(t.renders,t.sheets,{maxNodes:n.maxNodes,...e.origin?{origin:e.origin}:{},...e.imageOrigins?{imageOrigins:e.imageOrigins}:{},...e.assets?{asset:u=>u}:{},link:u=>ws(u,{handed:o,...e.linkOrigins?{origins:e.linkOrigins}:{}})});if(s.over)return{ok:!1,reason:\"nodes\",detail:`It drew more than the ${n.maxNodes.toLocaleString(\"en-US\")} things a view may draw.`};let i=[...e.places,...(e.lists??[]).filter(u=>!e.places.some(w=>w.as===u)).map(u=>({as:u}))],a=e.placesUnsure===!0,l=Ys(s.root,{props:e.props,places:i,...a?{placesUnsure:!0}:{},...e.accepts?{accepts:e.accepts}:{}});for(let u of l.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=[...s.refused.map(u=>Ia(u,{...e.imageOrigins?{origins:e.imageOrigins}:{},assets:e.assets===!0,...e.linkOrigins?{linkOrigins:e.linkOrigins}:{}})),...l.problems];for(let u of t.went)\"record\"in u&&!(e.props.node?.id===u.record||(e.props.nodes??[]).some(w=>w.id===u.record)||Ft(i,u.record))&&c.push({at:\"navigate\",says:a?`It goes to ${Bt(u.record)}, which this seat was not shown and is none of the places this run was told of. A view goes to a record by its id, or to a place by its slug.${xe(i)}${gt}`:`It goes to ${Bt(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.${xe(i)}`}),\"place\"in u&&!Ft(i,u.place)&&c.push({at:\"navigate\",says:a?`It goes to the place ${Bt(u.place)}, which is none of the places this run was told of.${xe(i)}${gt}`:`It goes to the place ${Bt(u.place)}, which this app does not have.${xe(i)}`});return{ok:!0,parts:l.parts,problems:c,drawn:s}}var Zr=\"graviewHeadless\",Jr=\"graviewHeadlessView\";var oi=globalThis,Da=Promise.prototype.then,Ma=Promise.resolve(),or=t=>void Da.call(Ma,t),rr=oi.performance,qt=rr&&typeof rr.now==\"function\"?rr.now.bind(rr):Date.now,Ze=JSON.stringify,si=JSON.parse,La=Object.defineProperty,eo=t=>(t instanceof Error?`${t.name}: ${t.message}`:String(t)).slice(0,500),wt=t=>{try{return si(Ze(t??null))}catch{return null}},z={renders:[],asked:[],went:[],ms:0,logs:[],messages:0},Te,sr=(t,e)=>{Te??={reason:t,detail:e}},Nt=t=>{z.logs.length<50&&z.logs.push(t.slice(0,500))},Tt={removed:[],stuck:[],sealed:!1},xt=ps({send(t){z.messages+=1,t.type===\"render\"?z.renders.push(wt(t.records)):t.type===\"style\"?z.sheets=(wt(t.sheets)??[]).map(String):t.type===\"gestures\"?z.gestures=wt(t.bound):t.type===\"navigate\"&&\"place\"in t?z.went.push({place:String(t.place),...t.where!==void 0?{where:wt(t.where)}:{},...t.section!==void 0?{section:String(t.section)}:{}}):t.type===\"navigate\"&&\"to\"in t&&z.went.push({record:String(t.to),...t.where!==void 0?{where:wt(t.where)}:{},...t.section!==void 0?{section:String(t.section)}:{}})},act(t,e){return z.messages+=1,z.asked.push({name:String(t),args:wt(e)}),Promise.resolve({type:\"answer\",id:z.asked.length,ok:!1,reason:\"refused\",message:\"Nothing is applied in a headless run.\"})},navigate(t){z.messages+=1,z.went.push({record:String(t)})},microtask:or,now:qt,threw:t=>sr(\"error\",`It threw: ${eo(t)}`),warn:Nt,hardening:()=>Tt}),ni=!1,Qr=!1;function Ha(t){if(Qr||typeof t!=\"function\"||(Qr=!0,Te))return;let e=qt();try{t.call(void 0,xt.view)}catch(n){sr(\"error\",`It threw: ${eo(n)}`)}z.ms+=qt()-e}async function $a(t){if(ni)return Ze({ok:!1,reason:\"refused\",detail:\"A headless script runs one view, once: something called its entry before the host did.\"});ni=!0;let e;try{e=si(String(t))}catch{return Ze({ok:!1,reason:\"isolate\",detail:\"The run was not handed its input as JSON.\"})}if(!Qr&&!Te)return Ze({ok:!1,reason:\"isolate\",detail:\"The script held no view.\"});let n=qt();Te||xt.hear({type:\"props\",props:e.props,push:1}),z.ms+=qt()-n,z.ms>=e.limits.pushMs&&sr(\"slow\",`It took longer than ${e.limits.pushMs.toLocaleString(\"en-US\")} ms to draw what it was shown.`);for(let o=0;o<64&&!Te;o+=1)await new Promise(s=>or(s));if(Te||(z.clicks=xt.listened(\"click\").slice(0,2e3)),e.press&&typeof e.press.selector==\"string\"&&!Te){let o=xt.find(e.press.selector);if(z.pressed={selector:e.press.selector.slice(0,200),...o!==void 0?{target:o}:{},asked:z.asked.length,went:z.went.length,renders:z.renders.length},o!==void 0){xt.hear({type:\"dom-event\",target:o,event:\"click\"});for(let s=0;s<64&&!Te;s+=1)await new Promise(i=>or(i))}}if(Te)return Ze({ok:!1,...Te,transcript:z});let r=ti(z,e);return r.ok?Ze({ok:!0,transcript:z,drawn:{parts:r.parts,problems:r.problems},hardening:{removed:Tt.removed.length,sealed:Tt.sealed}}):Ze({ok:!1,reason:r.reason,detail:r.detail,transcript:z})}var Ua=Object.freeze({log:(...t)=>Nt(t.map(String).join(\" \")),info:(...t)=>Nt(t.map(String).join(\" \")),debug:(...t)=>Nt(t.map(String).join(\" \")),warn:(...t)=>Nt(t.map(String).join(\" \")),error:(...t)=>Nt(t.map(eo).join(\" \"))}),Ga=0,ri=()=>Ga+=1,ja=[[\"console\",Ua],[\"setTimeout\",ri],[\"setInterval\",ri],[\"clearTimeout\",()=>{}],[\"clearInterval\",()=>{}],[\"queueMicrotask\",or],[\"graview\",xt.view],[Jr,Ha],[Zr,t=>$a(t)]];for(let[t,e]of ja)La(oi,t,{value:e,writable:!0,enumerable:!1,configurable:!0});Tt=Bo(globalThis,[\"graview\",Jr,Zr],{primitivesStay:!0});Tt.stuck.length>0&&sr(\"refused\",`This isolate could not be hardened: ${Tt.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 M=Symbol(\"name\"),Ce=Symbol(\"prefix\"),Ie=Symbol(\"value\"),L=Symbol(\"ns\"),se=Symbol(\"owner\"),F=Symbol(\"owner_document\"),Ee=Symbol(\"attributes\"),B=Symbol(\"prev\"),k=Symbol(\"next\"),$=Symbol(\"child\"),ie=Symbol(\"parent\"),De=Symbol(\"host\"),ue=Symbol(\"data\"),ze=Symbol(\"listeners\"),cr=Symbol(\"isTrusted\"),Qe=Symbol(\"path\"),et=Symbol(\"stop_immediate_propagation\"),tt=Symbol(\"dispatching\"),Se=Symbol(\"content\"),Y=Symbol(\"hooks\"),Zt=Symbol(\"extensions\"),Ve=Symbol(\"hooks_dispatch\"),J=Symbol(\"is_connected\"),nt=Symbol(\"create_element\"),ao=0,le=1,rt=2,ot=3,st=8,Fe=9,lo=10,Me=11,U=\"http://www.w3.org/1999/xhtml\",fe=\"http://www.w3.org/2000/svg\",co=\"http://www.w3.org/XML/1998/namespace\",Ot=\"http://www.w3.org/2000/xmlns/\";function Qt(t){return t.split(/[\\t\\n\\f\\r ]+/).filter(Boolean)}function X(t){return t.replace(/[A-Z]/g,e=>String.fromCharCode(e.charCodeAt(0)+32))}function uo(t){return t.replace(/[a-z]/g,e=>String.fromCharCode(e.charCodeAt(0)-32))}function j(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 fo=/^(?:[A-Za-z][^\\0\\t\\n\\f\\r\\u0020/>]*|[:_\\u0080-\\u{10FFFF}][A-Za-z0-9-.:_\\u0080-\\u{10FFFF}]*)$/u,mo=/[\\0\\t\\n\\f\\r />=]/u,ci=/[\\0\\t\\n\\f\\r />]/u;function ve(t){if(t==null)return null;let e=String(t);return e===\"\"?null:e}function po(t){fo.test(t)||ur(t)}function dr(t){(t===\"\"||mo.test(t))&&ur(t)}function en(t,e,n){let r=ve(t),o=String(e),s=o.indexOf(\":\"),i=s<0?null:o.slice(0,s),a=s<0?o:o.slice(s+1);if((i!=null&&(i===\"\"||ci.test(i))||(n===\"element\"?!fo.test(a):a===\"\"||mo.test(a)))&&ur(o),i!=null&&r==null)throw j(`A namespace is required for the prefix in \"${o}\"`,\"NamespaceError\");if(i===\"xml\"&&r!==co)throw j(\"The xml prefix requires the XML namespace\",\"NamespaceError\");if((o===\"xmlns\"||i===\"xmlns\")&&r!==Ot)throw j(\"The xmlns name requires the XMLNS namespace\",\"NamespaceError\");if(r===Ot&&o!==\"xmlns\"&&i!==\"xmlns\")throw j(\"The XMLNS namespace requires the xmlns name or prefix\",\"NamespaceError\");return{namespace:r,qualifiedName:o,prefix:i,localName:a}}function ur(t){throw j(`Invalid name: \"${t}\"`,\"InvalidCharacterError\")}var tn=0,nn=1,ho=2,fr=3,di=typeof performance>\"u\"?Date.now:performance.now.bind(performance),Z=class{static NONE=tn;static CAPTURING_PHASE=nn;static AT_TARGET=ho;static BUBBLING_PHASE=fr;timeStamp=di();target=null;currentTarget=null;srcElement=null;bubbles=!1;cancelable=!1;composed=!1;defaultPrevented=!1;cancelBubble=!1;eventPhase=tn;[Qe]=[];[et]=!1;[tt]=!1;constructor(e,n){this.type=e,Object.defineProperty(this,cr,{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[cr]}composedPath(){return[...this[Qe]]}stopPropagation(){this.cancelBubble=!0}stopImmediatePropagation(){this[et]=!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 mr(t,e,n){if(t.cancelBubble)return;let o=e[ze]?.get(t.type)?.[n===nn?\"capture\":\"bubble\"];if(o)for(let s of[...o]){if(!o.has(s)||s.signal?.aborted)continue;t.eventPhase=t.target===e?ho:n,t.currentTarget=e;let i=s.normalizedListener;try{typeof i==\"object\"?i.handleEvent(t):i.call(e,t)}catch(a){setTimeout(ui,0,a)}if(t[et])break}}function ui(t){throw t}var kt=[],rn=new WeakMap;function on(t,e){let n=rn.get(t);n?n.push(e):rn.set(t,[e]),kt[kt.length-1].push(t)}function Q(t){let e=[];kt.push(e);let n;try{n=t()}catch(r){kt.pop();try{go(e)}catch{}throw r}return kt.pop(),go(e),n}function go(t){let e,n=!1;for(let r of t){let o=rn.get(r);if(o){for(;o.length>0;){let s=o.shift();try{s()}catch(i){n||(e=i,n=!0)}}rn.delete(r)}}if(n)throw e}var sn=[],At=[],pr=!1;function Be(t){for(let e of t)sn.push(e),e[1]&&At.push(e[1]);if(!pr){pr=!0;try{let e,n=!1;for(let r=0;r<sn.length;r++){let[o,s]=sn[r];s&&At.splice(At.indexOf(s),1);try{o()}catch(i){n||(e=i,n=!0)}}if(n)throw e}finally{sn.length=0,At.length=0,pr=!1}}}function Rt(t){let e=t;for(;e;){if(At.includes(e))return!0;e=e[ie]??e[De]}return!1}var Pt=Symbol(\"listenerRegistrations\"),Le=class{[ze]=void 0;[Pt]=void 0;[F]=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 a=hr(o),l=this[Pt];l||(l=new Map,this[Pt]=l);let c=l.get(e);c||(c={},l.set(e,c));let h=c[a];if(h||(h=new Map,c[a]=h),h.has(n))return;let p=this,E={type:e,listener:n,capture:o,once:s,normalizedListener:n,signal:i};(s||i)&&(E.normalizedListener=function(...y){if(E.signal?.aborted){an(p,E);return}return E.once&&an(p,E),typeof E.listener==\"object\"?E.listener.handleEvent(...y):E.listener.call(this,...y)});let b=this[ze];b||(b=new Map,this[ze]=b);let f=b.get(e);f||(f={},b.set(e,f));let A=f[a];if(A||(A=new Set,f[a]=A),h.set(n,E),A.add(E),i){let u=()=>{an(p,E)};E.abortListener=u,i.addEventListener(\"abort\",u,{once:!0})}this[F]?.defaultView[Ve].addEventListener?.(this,e,n,r)}removeEventListener(e,n,r){return fi.call(this,e,n,r)}dispatchEvent(e){if(e[tt])throw j(\"Failed to execute 'dispatchEvent' on 'EventTarget': The event is already being dispatched.\",\"InvalidStateError\");e[tt]=!0;try{let n=[],r=this;for(;r!=null;)n.push(r),r=r.parentNode;e.target=this,e.srcElement=this,e[Qe]=n;for(let s=n.length;s--;)if(mr(e,n[s],nn),e.cancelBubble)return!e.defaultPrevented;let o=e.bubbles?n:n.slice(0,1);for(let s=0;s<o.length;s++)if(mr(e,o[s],fr),e.cancelBubble)return!e.defaultPrevented;return!e.defaultPrevented}finally{e[tt]=!1,e.cancelBubble=!1,e[et]=!1,e.eventPhase=tn,e.currentTarget=null,e[Qe]=[]}}};function fi(t,e,n){if(e==null)return;let r=n===!0||n&&n.capture===!0,o=hr(!!r),s=this[Pt]?.get(t)?.[o]?.get(e);s&&an(this,s)}function hr(t){return t?\"capture\":\"bubble\"}function an(t,e){let n=hr(e.capture),r=t[Pt],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[ze],a=i?.get(e.type);if(!a)return;let l=a[n];l?.delete(e)&&(l.size===0&&delete a[n],!a.bubble&&!a.capture&&i?.delete(e.type),t[F]?.defaultView[Ve].removeEventListener?.(t,e.type,e.listener,e.capture))}var me=class extends Array{item(e){return this[e]??null}};var Ct=0,yo=1,br=2,Er=3,It=4,bo=0,Eo=1,dn=2,un=3,wo=4,yr=5,No=6,xo=7,ln=/^(?:--|-?[A-Za-z_\\u0080-\\u{10FFFF}])[A-Za-z0-9_\\u0080-\\u{10FFFF}-]*$/u;function mi(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 ae(t){throw j(`Invalid or unsupported selector: \"${t}\"`,\"SyntaxError\")}function fn(t,e){let n=typeof e==\"string\"?Dt(e):[{combinator:It,matchers:e}],r=null,o=t[$];return o&&n[0].matchers.length&&wr(o,n,s=>(r=s,!1)),r}function mn(t,e){let n=typeof e==\"string\"?Dt(e):[{combinator:It,matchers:e}],r=new me,o=t[$];return o&&n[0].matchers.length&&wr(o,n,s=>{r.push(s)}),r}function Dt(t,e=!1,n=!1){let r={combinator:It,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===\"\"&&ae(t);let a=0,l;for(;l=s.exec(i);){l.index!==a&&ae(t),l[1]&&(r.matchers.length===0&&!(n&&o.length===1)&&ae(t),l[1]===\">\"?r.combinator=yo:l[1]===\"+\"?r.combinator=Er:l[1]===\"~\"?r.combinator=br:r.combinator=Ct,r={combinator:It,matchers:[]},o.push(r));let c=l[8]?X(l[8]):l[2]||l[7];l[7]!=null&&!l[6]&&r.matchers.length>0&&ae(t);let p,E=l[4]??l[5]??l[7];if(l[2]){ln.test(c)||ae(t);let b=l[5],f=b?.[0];if(l[3]==null&&(f==='\"'||f===\"'\")){let A=l[0].lastIndexOf(b);E=i.slice(l.index+A+1),s.lastIndex=i.length}else b!=null&&!ln.test(b)&&ae(t);p=wo}else l[6]?(ln.test(c)||ae(t),p=l[6]===\"#\"?dn:un):l[8]?p=l[9]==null?yr:No:l[7]===\"*\"?p=bo:l[7]&&ln.test(l[7])?p=Eo:ae(t);l[9]?([E,s.lastIndex]=mi(i,s.lastIndex),c!==\"has\"&&c!==\"not\"&&ae(t),c===\"has\"&&e&&ae(t),Dt(E,e||c===\"has\",c===\"has\")):p===yr&&ae(t),r.matchers.push({type:p,name:c,value:E}),a=s.lastIndex}return(a!==i.length||r.matchers.length===0)&&ae(t),o}function pi(t,e){let n=Dt(e);return n[0]?.matchers.length?_t(t,n):!1}function hi(t,e){let n=Dt(e,!0,!0),r=n[0];if(n.length===1&&r.matchers.length===0)return!1;let o=Ct,s={type:xo,name:\":scope\"};if(r.matchers.length===0?(o=r.combinator,r.matchers.push(s)):n.unshift({combinator:Ct,matchers:[s]}),n.some(({matchers:l})=>l.length===0))return!1;let i=o===Er||o===br?t[k]:t[$];if(!i)return!1;let a=!1;return wr(i,n,()=>(a=!0,!1),t),a}function wr(t,e,n,r){let o=[],s=t;for(;s;){if(oe(s)){if(_t(s,e,r)&&n(s)===!1)return!1;let i=s[$];if(i){let a=s[k];a&&o.push(a),s=i;continue}}s=s[k]??o.pop()??null}return!0}function _t(t,e,n){let{combinator:r,matchers:o}=e[e.length-1];if(r===It){if(!cn(t,o,n))return!1;let a=e.slice(0,-1);return a.length===0||_t(t,a,n)}let s=r===yo||r===Ct?ie:B,i=t[s];if(!i)return!1;if(r===Ct||r===br){for(;i;){if(oe(i)&&cn(i,o,n)){let a=e.slice(0,-1);if(a.length===0||_t(i,a,n))return!0}i=i[s]}return!1}else{if(r===Er&&!oe(i)){for(;i&&!oe(i);)i=i[s];if(!i)return!1}if(!oe(i)||!cn(i,o,n))return!1;let a=e.slice(0,-1);return a.length===0||_t(i,a,n)}}function gr(t,e){return t.getAttributeNS(null,t.namespaceURI===U?X(e):e)}function cn(t,e,n){if(!t)return!1;if(Array.isArray(e)){for(let i of e)if(cn(t,i,n)===!1)return!1;return!0}let{type:r,name:o,value:s}=e;switch(r){case bo:return o===\"*\";case Eo:return t.namespaceURI===U?t.localName===X(o):t.localName===o;case dn:return gr(t,\"id\")===o;case un:let i=gr(t,\"class\");return i?Qt(i).includes(o):!1;case wo:let a=gr(t,o);return s==null?a!=null:a===s;case xo:return t===n;case yr:ae(`:${o}`);case No:switch(o){case\"has\":return hi(t,s||\"\");case\"not\":return!pi(t,s||\"\");default:ae(`:${o}(${s})`)}}return!1}function gi(t){return t.nodeType===rt}function Mt(t){return ue in t}function xr(t){return t.nodeType===ot}function yi(t){return t.nodeType===st}function oe(t){return t.nodeType===le}function Nr(t){return t.nodeType===Me}function Oo(t){return\"appendChild\"in t}function pn(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 a=[];for(let l of $t(i)){if(o.has(l)||(o.add(l),e.push(l),a.push(l),!oe(l)))continue;let c=l[Ee];if(c)for(let p of c)o.has(p)||(o.add(p),e.push(p));let h=l[Se];h&&!o.has(h)&&!r.has(h)&&(r.add(h),n.push(h))}s??=a}return{nodes:e,treeNodes:s}}function Lt(t,e){for(let n of t)n[F]=e}function To(t,e){let n=t.constructor,r=new n(t.name,t.value,t.namespaceURI);return r[F]=e,r}function So(t,e){if(xr(t))return e.createTextNode(t.data);if(yi(t))return e.createComment(t.data);if(gi(t))return To(t,e);if(oe(t)){let n=e[nt](t[M],t.namespaceURI,t[Ce],t.localName);if(t[Ee])for(let r=0;r<t[Ee].length;r++){let o=t[Ee].item(r);n.attributes.setNamedItem(To(o,e))}return n}else{if(Nr(t))return e.createDocumentFragment();{let n=new t.constructor;return n[F]=e,n}}}function hn(t,e,n=t.ownerDocument){if(t.nodeType===Fe)throw j(\"Cannot clone a document node\",\"NotSupportedError\");let r=So(t,n);if(!e||!oe(t)&&!Nr(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],a,l;if(i.cloningContent)if(i.contentSource&&i.contentDestination)a=i.contentSource.childNodes[i.childIndex++],l=i.contentDestination;else{s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}else if(a=i.source.childNodes[i.childIndex++],l=i.destination,!a){if(i.cloningContent=!0,i.childIndex=0,oe(i.source)&&i.source.namespaceURI===U&&i.source.localName===\"template\"){let h=i.source[Se];h&&(o.has(h)&&vo(),o.add(h),i.contentSource=h,i.contentDestination=i.destination.content)}continue}if(!a){s.pop(),i.appendTo&&i.appendTo.appendChild(i.destination);continue}o.has(a)&&vo(),o.add(a);let c=So(a,n);oe(a)||Nr(a)?s.push({source:a,destination:c,appendTo:l,childIndex:0,cloningContent:!1}):l.appendChild(c)}return r}function vo(){throw new Error(\"Cannot clone a cyclic or repeated node graph\")}function gn(t,e){let n=String(e);return n===\"\"?null:fn(t,[{type:dn,name:n}])}function yn(t,e){let n=[...new Set(Qt(String(e)))];return mn(t,n.map(r=>({type:un,name:r})))}function bn(t,e){let n=String(e),r=X(n),o=[];for(let s of En(t))oe(s)&&(n===\"*\"||(s.namespaceURI===U?s[M]===r:s[M]===n))&&o.push(s);return o}function En(t){let e=[],n=[],r=t[$];for(;r;){e.push(r);let o=r[$],s=r[k];o?(s&&n.push(s),r=o):r=s??n.pop()??null}return e}function $t(t){let e=En(t);return e.unshift(t),e}var pe=class extends Le{nodeType=ao;[M]=\"\";[ie]=null;[De]=null;[$]=null;[B]=null;[k]=null;[J]=!1;get[Y](){return this[F].defaultView[Ve]}get localName(){return this[M]}get nodeName(){return this[M]}get ownerDocument(){return this[F]}get isConnected(){return this[J]}isDefaultNamespace(e){let n=ve(e);return bi(this)===n}get parentNode(){return this[ie]}set parentNode(e){}get parentElement(){let e=this[ie];return!e||e.nodeType!==1?null:e}set parentElement(e){}get previousSibling(){return this[B]}set previousSibling(e){}get nextSibling(){return this[k]}set nextSibling(e){}get previousElementSibling(){let e=this[B];for(;e&&e.nodeType!==1;)e=e[B];return e}set previousElementSibling(e){}get nextElementSibling(){let e=this[k];for(;e&&e.nodeType!==1;)e=e[k];return e}set nextElementSibling(e){}get firstChild(){return this[$]}set firstChild(e){}get lastChild(){let e=this[$];for(;e;){let n=e[k];if(n==null)break;e=n}return e}set lastChild(e){}get nodeValue(){return Mt(this)?this.data:null}set nodeValue(e){Mt(this)&&(this.data=e)}get textContent(){if(Mt(this))return this.data;let e=\"\";for(let n of En(this))xr(n)&&(e+=n.data);return e}set textContent(e){if(Mt(this))this.data=e;else if(Oo(this)){let n=e==null?\"\":String(e);n===\"\"?this.replaceChildren():this.replaceChildren(n)}}cloneNode(e){return hn(this,e)}contains(e){let n=e;for(;n!=null;){if(n===this)return!0;n=n.parentNode}return!1}};function bi(t){let e=t;for(;e;)switch(e.nodeType){case le:{let n=e;if(n.prefix==null&&n.namespaceURI!=null)return n.namespaceURI;let r=n.attributes.getNamedItemNS(Ot,\"xmlns\");if(r!=null&&r.prefix==null)return ve(r.value);e=n.parentElement;break}case Fe:e=e.documentElement;break;case lo:case Me:return null;case rt:e=e.ownerElement;break;default:e=e.parentElement}return null}var he=Symbol(\"insertNode\"),vr=Symbol(\"preflightInsertions\"),wn=Symbol(\"replaceNode\"),$e=class extends pe{remove(){let e=this.parentNode;e&&e.removeChild(this)}replaceWith(...e){let n=Ye(e),r=this.parentNode;if(r)return Tr(o=>{Oe(r,n);let s=this[k];for(;s&&n.includes(s);)s=s[k];let i=Sr(r,n,o);this.parentNode===r?r[wn](i,this,o):r[he](i,s,o)})}before(...e){let n=Ye(e),r=this.parentNode;if(r)return Tr(o=>{Oe(r,n);let s=this[B];for(;s&&n.includes(s);)s=s[B];let i=Sr(r,n,o);r[he](i,s?s[k]:r.firstChild,o)})}after(...e){let n=Ye(e),r=this.parentNode;if(r)return Tr(o=>{Oe(r,n);let s=this[k];for(;s&&n.includes(s);)s=s[k];let i=Sr(r,n,o);r[he](i,s,o)})}};function Tr(t){return Q(()=>{let e=[];try{t(e)}catch(n){try{Be(e)}catch{}throw n}Be(e)})}function Ye(t){return t.map(e=>e instanceof pe?e:String(e))}function Ht(t,e){return e instanceof pe?e:t.ownerDocument.createTextNode(String(e))}function Oe(t,e){for(let n of e){if(!(n instanceof pe))continue;let r=t;for(;r;){if(r===n)throw j(\"Cannot insert a node into itself or one of its descendants\",\"HierarchyRequestError\");r=r[ie]??r[De]}}}function Sr(t,e,n){let r=[];for(let s of e)r.push(Ht(t,s));if(r.length===1)return r[0];let o=t.ownerDocument.createDocumentFragment();o[vr](r);for(let s of r)o[he](s,null,n);return o}var Nn,Or=0,ko=0,Ao=0,Ro=0,it=!1,Ar=!1,Ut=!1,xn=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=Ei(n),o=Nn??=new WeakMap,s=o.get(e);s==null&&(s=new Map,o.set(e,s));let i=s.get(this);i==null?Or++:kr(i,-1),s.set(this,r),kr(r,1),this.#e.add(e)}disconnect(){let e=Nn;if(e!=null){for(let n of this.#e){let r=e.get(n),o=r?.get(this);o!=null&&(r.delete(this),Or--,kr(o,-1)),r?.size===0&&e.delete(n)}this.#e.clear(),this.#n.length=0,Or===0&&(Nn=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 ge(t){let e=Nn;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 a=!1;if(t.type===\"attributes\"){if(!i.attributes||i.attributeFilter&&!i.attributeFilter.has(t.attributeName??\"\"))continue;a=i.attributeOldValue}else if(t.type===\"characterData\"){if(!i.characterData)continue;a=i.characterDataOldValue}else if(!i.childList)continue;n.set(s,n.get(s)===!0||a)}r=r.parentNode}for(let[o,s]of n)o.enqueue({addedNodes:t.addedNodes??new me,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 me,target:t.target,type:t.type})}function Tn(...t){let e=new me;return e.push(...t),e}function Ei(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 kr(t,e){t.attributes&&(ko+=e),t.characterData&&(Ao+=e),t.childList&&(Ro+=e),it=ko>0,Ar=Ao>0,Ut=Ro>0}var we=class extends $e{childNodes=new me;children=new me;appendChild(e){return Q(()=>this[he](e,null))}insertBefore(e,n){return Q(()=>this[he](e,n||null))}append(...e){return Q(()=>{let n=Ye(e.filter(r=>r!=null));n.length>1&&Oe(this,n);for(let r of n)this[he](Ht(this,r),null)})}prepend(...e){return Q(()=>{let n=Ye(e.filter(o=>o!=null));n.length>1&&Oe(this,n);let r=this.firstChild;for(let o of n)this[he](Ht(this,o),r)})}replaceChildren(...e){return Q(()=>{let n=Ye(e.filter(o=>o!=null));Oe(this,n);let r;for(;r=this.firstChild;)this.removeChildImmediately(r);for(let o of n)this[he](Ht(this,o),null)})}removeChild(e){return Q(()=>(this.removeChildImmediately(e),e))}removeChildImmediately(e){if(e.parentNode!==this)throw j(\"The node is not a child of this node\",\"NotFoundError\");let n=this[J]?$t(e):void 0,r=e[B],o=e[k],s=Sn(this,e);if(n)for(let i of n)i[J]=!1;this.queueRemovalMutationRecord(this,e,r,o),n&&this.enqueueTreeReactions(n,\"disconnectedCallback\"),Be(this.collectRemovalHookEffects(e,s))}replaceChild(e,n){return Q(()=>this[wn](e,n))}[wn](e,n,r){if(Oe(this,[e]),n.parentNode!==this)throw j(\"The reference node is not a child of this parent\",\"NotFoundError\");let o=n[B],s=n[k],i=this.prepareInsertion(e),a=this[J]?$t(n):void 0,l=new Set(i.map(({node:E})=>E)),c=s;for(;c&&l.has(c);)c=c[k];let h=Sn(this,n);if(a){for(let b of a)b[J]=!1;let E=new Set(a);for(let b of i)E.has(b.node)&&(b.shouldDisconnect=!1)}this.commitInsertion(i,c);let p=this[J];return this.queueRemovalMutationRecord(this,n,o,s),this.queueInsertionMutationRecords(i),a&&this.enqueueTreeReactions(a,\"disconnectedCallback\"),this.enqueueInsertionReactions(i,p),this.performOrCollectHookEffects([...this.collectRemovalHookEffects(n,h),...this.collectInsertionHookEffects(i)],r),n}querySelectorAll(e){return mn(this,e)}querySelector(e){return fn(this,e)}[he](e,n,r){return this.validateInsertion(e,n),this.insertIntoValidated(e,n,r),e}[vr](e){for(let n of e)this.validateInsertion(n,null),this.prepareInsertion(n)}validateInsertion(e,n){if(Oe(this,[e]),n&&n.parentNode!==this)throw j(\"The reference node is not a child of this parent\",\"NotFoundError\")}insertIntoValidated(e,n,r){e===n&&(n=e[k]);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):Be(e)}prepareInsertion(e){let n=[];if(e.nodeType===Me){let i=e[$];for(;i;)n.push(i),i=i[k]}else n.push(e);let r=this[J],o=this[F],s=[];for(let i of n){let a=i[J],l=a||r,c,h;if(i[F]===o)l&&(c=$t(i));else{let p=pn(i);h=p.nodes,l&&(c=p.treeNodes)}s.push({node:i,nodes:c,adoption:h,shouldDisconnect:a})}return s}commitInsertion(e,n){for(let s of e){let i=s.node[ie];if(i){let a=s.node[B],l=s.node[k];s.source={parent:i,index:Sn(i,s.node),previousSibling:a,nextSibling:l}}}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[F];for(let{adoption:s}of e)s&&Lt(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[B];e[k]=n,e[B]=s,s?s[k]=e:this[$]=e,n[B]=e}else{e[k]=null;let s=this[$];if(s){let i;for(;i=s[k];)s=i;s[k]=e,e[B]=s}else this[$]=e,e[B]=null}let r=oe(e);e[ie]=this;let o;if(n){if(o=this.childNodes.indexOf(n),this.childNodes.splice(o,0,e),r){let s=n;for(;s&&!oe(s);)s=s[k];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[B],nextSibling:e[k]}}queueRemovalMutationRecord(e,n,r,o){Ut&&ge({type:\"childList\",target:e,removedNodes:Tn(n),previousSibling:r,nextSibling:o})}queueInsertionMutationRecords(e){if(Ut)for(let n of e){let{node:r,source:o}=n;o&&this.queueRemovalMutationRecord(o.parent,r,o.previousSibling,o.nextSibling),ge({type:\"childList\",target:this,addedNodes:Tn(r),previousSibling:n.previousSibling,nextSibling:n.nextSibling})}}collectRemovalHookEffects(e,n){return this.nodeType!==le||Rt(this)?[]:[[()=>this[Y].removeChild?.(this,e,n)]]}collectInsertionHookEffects(e){let n=[];for(let r of e){let{node:o,source:s}=r;s?.parent.nodeType===le&&!Rt(s.parent)&&n.push([()=>s.parent[Y].removeChild?.(s.parent,o,s.index)]),this.nodeType===le&&!Rt(this)&&n.push([()=>this[Y].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){_o(e,n)}};function Po(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[B],i=e[k],a=Sn(t,e);if(o)for(let c of o)c[J]=!1;Lt(n.nodes,r),Ut&&ge({type:\"childList\",target:t,removedNodes:Tn(e),previousSibling:s,nextSibling:i}),o&&_o(o,\"disconnectedCallback\");let l=[];t.nodeType===le&&!Rt(t)&&l.push([()=>t[Y].removeChild?.(t,e,a)]),Be(l)}function Sn(t,e){let n=e[B],r=e[k];n?n[k]=r:t[$]=r,r&&(r[B]=n);let o=t.childNodes.indexOf(e);return t.childNodes.splice(o,1),oe(e)&&t.children.splice(t.children.indexOf(e),1),e[ie]=null,e[k]=null,e[B]=null,o}function _o(t,e){for(let n of t){let r=n[e];typeof r==\"function\"&&on(n,()=>r.call(n))}}function Gt(t,e,n,r,o){let{observedAttributes:s}=t.constructor,{attributeChangedCallback:i}=t;i==null||s==null||!s.includes(e)||on(t,()=>i.call(t,e,n,r,o))}var vn=class{[$]=null;constructor(e){this[se]=e}getNamedItem(e){let n=String(e),r=this[se][L]===U?X(n):n,o=this[$];for(;o;){if(o.name===r)return o;o=o[k]}return null}getNamedItemNS(e,n){let r=ve(e),o=String(n),s=this[$];for(;s;){if(s.localName===o&&s[L]===r)return s;s=s[k]}return null}item(e){let n=this[$],r=0;for(;n;){if(r++===e)return n;n=n[k]}return null}get length(){let e=0,n=this[$];for(;n;)e++,n=n[k];return e}removeNamedItem(e){let n=String(e),r=this[se][L]===U?X(n):n;return Q(()=>this.removeNamedItemImmediately(o=>o.name===r))}removeNamedItemNS(e,n){let r=ve(e),o=String(n);return Q(()=>this.removeNamedItemImmediately(s=>s.localName===o&&s[L]===r))}removeNamedItemImmediately(e){let n=this[se],r=this[$],o=null;for(;r!=null;){if(e(r)){o&&(o[k]=r[k]),this[$]===r&&(this[$]=r[k]);let s=r.value;return r[k]=null,r[se]=null,it&&ge({type:\"attributes\",target:n,attributeName:r.name,attributeNamespace:r[L],oldValue:s}),n[Y].removeAttribute?.(n,r.name,r[L]),Gt(n,r.localName,s,null,r[L]),r}o=r,r=r[k]}return null}setNamedItem(e){return Q(()=>this.setNamedItemImmediately(e))}setNamedItemImmediately(e){let n=this[se],r=e[se];if(r!=null&&r!==n)throw j(\"The attribute is already in use by another element.\",\"InUseAttributeError\");let o=null,s=this[$],i=null;for(;s;){if(s.localName===e.localName&&s[L]===e[L]){if(s===e)return s;i?i[k]=e:this[$]=e,e[k]=s[k],s[k]=null,o=s;break}i=s,s=s[k]}o==null&&(i?i[k]=e:this[$]=e),e[se]=n,e[F]=n[F],o&&(o[se]=null);let a=o==null||o.value!==e.value,l=o!=null&&o.name!==e.name;return a&&it&&ge({type:\"attributes\",target:n,attributeName:e.name,attributeNamespace:e[L],oldValue:o?.value??null}),l&&n[Y].removeAttribute?.(n,o.name,o[L]),(a||l)&&n[Y].setAttribute?.(n,e.name,e.value,e[L]),a&&Gt(n,e.localName,o?.value??null,e.value,e[L]),o}setNamedItemNS(e){return this.setNamedItem(e)}*[Symbol.iterator](){let e=this[$];for(;e;)yield e,e=e[k]}};var We=class extends pe{nodeType=rt;[L]=null;[k]=null;[se]=null;constructor(e,n,r){super(),this[M]=e,this[Ie]=n,r&&(this[L]=r)}get nodeName(){return this[M]}set nodeName(e){}get name(){return this[M]}set name(e){}get localName(){if(this[L]==null)return this[M];let e=this[M].indexOf(\":\");return e<0?this[M]:this[M].slice(e+1)}get prefix(){if(this[L]==null)return null;let e=this[M].indexOf(\":\");return e<0?null:this[M].slice(0,e)}get value(){return this[Ie]}set value(e){let n=String(e),r=this[se];if(!r){this[Ie]=n;return}Q(()=>{let o=this[Ie];this[Ie]=n,it&&o!==n&&ge({type:\"attributes\",target:r,attributeName:this[M],attributeNamespace:this[L],oldValue:o}),this[Y].setAttribute?.(r,this[M],n,this[L]),Gt(r,this.localName,o,n,this[L])})}get nodeValue(){return this.value}set nodeValue(e){this.value=e}get ownerElement(){return this[se]}get namespaceURI(){return this[L]}get specified(){return!0}};var wi={amp:\"&\",AMP:\"&\",apos:\"'\",gt:\">\",GT:\">\",lt:\"<\",LT:\"<\",quot:'\"',QUOT:'\"'},Ni=new Set([\"area\",\"base\",\"br\",\"col\",\"embed\",\"hr\",\"img\",\"input\",\"link\",\"meta\",\"param\",\"source\",\"track\",\"wbr\"]),xi=/(?:<([a-z][a-z0-9-:]*)((?:[\\s]+[^<>'\"=/\\s]+(?:=(['\"])[^]*?\\3|=[^>'\"\\s]*|))*)[\\s]*(\\/?)\\s*>|<\\/([a-z][a-z0-9-:]*)>|<!--(.*?)-->|([^<>]+))/gi,Do=/\\s([^<>'\"=/\\n\\s]+)(?:=([\"'])([\\s\\S]*?)\\2|=([^>'\"\\n\\s]*)|)/g,Ti=\"|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|\",Si=/^(?:color|face|size)$/i;function Co(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 wi[n];let s=Number.parseInt(r??o,r?10:16);try{return String.fromCodePoint(s)}catch{return e}})}function Mo(t){return t.namespaceURI===U&&Ni.has(t.localName)}function Io(t){let e=t.localName;return t[L]===fe&&(e===\"foreignObject\"||e===\"desc\"||e===\"title\")}function vi(t,e){if(Ti.includes(`|${t}|`))return!0;if(t!==\"font\")return!1;for(let n of e.matchAll(Do))if(Si.test(n[1]))return!0;return!1}function On(t,e){let n=e.ownerDocument,r=n.createDocumentFragment(),o=[],s=r;for(let i of t.matchAll(xi)){let a=i[1];if(a){let l=i[2],c=X(a),h=o[o.length-1]?.element??e,p=h[L]===fe?fe:U;if(c===\"svg\")p=fe;else if(p===fe){if(Io(h))p=U;else if(vi(c,l)){for(;o.length>0;){let f=o[o.length-1];if(f.element[L]!==fe||Io(f.element))break;o.pop(),s=f.target}p=U}}let E=p===U?c:a,b=n[nt](E,p,null,E);for(let f of l.matchAll(Do))b.setAttribute(f[1],Co(f[3]||f[4]||\"\"));if(s.append(b),Mo(b)||p!==U&&i[4])continue;o.push({element:b,target:s}),s=p===U&&c===\"template\"?b.content:b}else if(i[5]){let l=X(i[5]);for(let c=o.length-1;c>=0;c--){let h=o[c],p=X(h.element[M]);if(p===l){s=h.target,o.length=c;break}if(h.element[L]===U&&p===\"template\")break}}else i[6]?s.append(n.createComment(i[6])):s.append(Co(i[7]))}return r}function kn(t){return $o([{type:\"content\",child:t[$]}])}function Lo(t){return $o([{type:\"opening\",node:t}])}function $o(t){let e=[],n;for(;n=t.pop();)switch(n.type){case\"opening\":{let r=n.node;switch(r.nodeType){case le:{let o=r;e.push(`<${o[M]}`);let s=o[Ee]?.[$];for(;s;){e.push(` ${s[M]}`);let a=s[Ie];a!==\"\"&&(a=String(a).replace(/&/g,\"&amp;\").replace(/\"/g,\"&quot;\"),e.push(`=\"${a}\"`)),s=s[k]}if(e.push(\">\"),Mo(o))break;let i=o.namespaceURI===U&&o.localName===\"template\"?o[Se]:o;t.push({type:\"closing\",name:o[M]}),t.push({type:\"content\",child:i?.[$]??null});break}case ot:{let o=r;e.push(o[ue].replace(/&/g,\"&amp;\").replace(/\"/g,\"&quot;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\"));break}case st:{let o=r;e.push(`<!--${o[ue]}-->`);break}}break}case\"content\":{let r=n.child;r&&(t.push({type:\"content\",child:r[k]}),t.push({type:\"opening\",node:r}));break}case\"closing\":e.push(`</${n.name}>`);break}return e.join(\"\")}var K=class extends we{nodeType=le;[L]=U;[Ce]=null;get namespaceURI(){return this[L]}get prefix(){return this[Ce]}get localName(){let e=this[Ce];return e==null?this[M]:this[M].slice(e.length+1)}get nodeName(){return this[L]===U?uo(this[M]):this[M]}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 We(\"slot\",n))}get attributes(){let e=this[Ee];return e||(e=new vn(this),this[Ee]=e),e}getAttributeNames(){return[...this.attributes].map(e=>e.name)}getElementsByTagName(e){return bn(this,e)}get firstElementChild(){return this.children[0]??null}getElementsByClassName(e){return yn(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);dr(r);let s=this[L]===U?X(r):r,i=this.attributes.getNamedItemNS(null,s);i?i.value=o:this.attributes.setNamedItem(new We(s,o))}setAttributeNS(e,n,r){let o=ve(e),s=String(n),i=String(r),a=en(o,s,\"attribute\"),l=this.attributes.getNamedItemNS(a.namespace,a.localName);l?l.value=i:this.attributes.setNamedItemNS(new We(a.qualifiedName,i,a.namespace))}toggleAttribute(e,n){let r=String(e);dr(r);let o=this[L]===U?X(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 We(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[L]===U?X(n):n;this.attributes.removeNamedItemNS(null,r)}removeAttributeNS(e,n){this.attributes.removeNamedItemNS(e,n)}get outerHTML(){return Lo(this)}get innerHTML(){return kn(this)}set innerHTML(e){if(e==null||e===\"\")this.replaceChildren();else{let n=On(String(e),this);this.replaceChildren(n)}}};var at=class t extends K{[L]=fe;get ownerSVGElement(){let e=null,n=this.parentNode;for(;n instanceof t;)e=n,n=n.parentNode;return e}};var He=class extends $e{[ue]=\"\";constructor(e){super(),this[ue]=e==null?\"\":String(e)}setData(e){let n=Ar,r=n?this[ue]:null,o=\"\";e!=null&&(o=typeof e==\"string\"?e:String(e)),this[ue]=o,n&&r!==o&&ge({type:\"characterData\",target:this,oldValue:r}),this[Y].setText?.(this,o)}get data(){return this[ue]}set data(e){this.setData(e)}};var lt=class extends He{nodeType=ot;[M]=\"#text\"};var ct=class extends He{nodeType=st;[M]=\"#comment\"};var dt=class extends we{nodeType=Me;[M]=\"#document-fragment\";[F]=typeof window<\"u\"?window.document:null;getElementById(e){return gn(this,e)}};var ut=class extends K{get content(){let e=this[Se];return e||(e=this.ownerDocument.createDocumentFragment(),e[De]=this,this[Se]=e),e}set content(e){}set innerHTML(e){this.content.replaceChildren(On(String(e),this))}get innerHTML(){let e=this[Se];return e?kn(e):\"\"}};var An=class extends K{};var Rn=class extends K{};var Pn=class extends K{};var jt=class extends we{nodeType=Fe;[M]=\"#document\";[J]=!0;constructor(e){super(),this.defaultView=e,this[F]=this,this.documentElement=Cn(new Pn,this,\"html\"),this.body=Cn(new An,this,\"body\"),this.head=Cn(new Rn,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 yn(this,e)}createElement(e){let n=String(e);return po(n),Rr(this,X(n))}createElementNS(e,n){let r=en(e,n,\"element\");return Rr(this,r.qualifiedName,r.namespace,r.prefix,r.localName)}[nt](e,n,r,o){return Rr(this,e,n,r,o)}createTextNode(e){let n=_n(new lt(e),this);return this[Y].createText?.(n,n.data),n}createComment(e){return _n(new ct(e),this)}createDocumentFragment(){return _n(new dt,this)}createEvent(){return new Z(\"\")}getElementById(e){return gn(this,e)}getElementsByTagName(e){return bn(this,e)}importNode(e,n){if(e.nodeType===Fe)throw j(\"Cannot import a document node\",\"NotSupportedError\");return hn(e,n,this)}adoptNode(e){if(e[F]===this)return e;let n=pn(e);return Q(()=>{let r=e.parentNode;return r?Po(r,e,n,this):Lt(n.nodes,this),e})}};function _n(t,e){return Object.defineProperty(t,F,{value:e,writable:!0,enumerable:!1}),t}function Rr(t,e,n=U,r=null,o=e){let s;if(n===fe)s=new at;else if(n===U&&o===\"template\")s=new ut;else if(n===U){let i=t.defaultView.customElements.get(o);s=i?new i:new K}else s=new K;return Cn(s,t,e,n,r)}function Cn(t,e,n,r=U,o=null){return _n(t,e),Object.defineProperties(t,{[M]:{value:n},[L]:{value:r},[Ce]:{value:o}}),e[Y].createElement?.(t,r),t}var In=class extends Z{constructor(e,n){super(e,n),this.detail=n?.detail??null}initCustomEvent(e,n,r,o){super.initEvent(e,n,r),this.detail=o??null}};var Dn=class extends Z{constructor(e,n){super(e,n),this.message=n.message,this.filename=n.filename,this.lineno=n.lineno,this.colno=n.colno,this.error=n.error}};var Mn=class extends Z{constructor(e,n){super(e,n),this.promise=n.promise,this.reason=n.reason}};var Ln=class extends Z{constructor(e,n){super(e,n),this.oldState=n.oldState,this.newState=n.newState}};var $n=class extends Z{constructor(e,n={}){super(e,n),this.relatedTarget=n.relatedTarget??null}};var Hn=class extends Z{constructor(e,n={}){super(e,n),this.clipboardData=n.clipboardData??null}};var Un=class extends K{};var Oi=/^[a-z][^A-Z\\u0000\\t\\n\\f\\r />]*-[^A-Z\\u0000\\t\\n\\f\\r />]*$/u,ki=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 Oi.test(t)&&!ki.has(t)}function Uo(t){return j(`Invalid custom element name: \"${t}\"`,\"SyntaxError\")}var Gn=class{registry=new Map;listenersByName=new Map;define(e,n,r){if(!Ho(e))throw Uo(e);if(this.registry.has(e))throw j(`A custom element named \"${e}\" has already been defined`,\"NotSupportedError\");if(this.getName(n)!=null)throw j(\"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(Uo(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 Ai=[\"onerror\",\"onunhandledrejection\"],jo=Symbol.for(\"@remote-dom/polyfill/global-property\");function zo(t){return Object.getOwnPropertyDescriptors(t)}function Vo(t){let e={};for(let[n,r]of Object.entries(Object.getOwnPropertyDescriptors(Le.prototype)))n!==\"constructor\"&&typeof r.value==\"function\"&&(r.value=Pr(r.value.bind(t)),e[n]=r);return e}function Fo(t){let e={};for(let n of Ai)e[n]={configurable:!0,enumerable:!0,get:Pr(()=>t[n]),set:Pr(r=>{t[n]=r})};return e}function Ri(t){return Object.assign(zo(t),Vo(t),Fo(t))}function Pr(t){return Object.defineProperty(t,jo,{value:!0}),t}function Go(t,e){for(let n of Reflect.ownKeys(e)){let r=Pi(t,n);(r==null||_i(r))&&Object.defineProperty(t,n,e[n])}}function Pi(t,e){let n=t;for(;n;){let r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function _i(t){return[t.value,t.get,t.set].some(e=>typeof e==\"function\"&&e[jo]===!0)}var qe=class extends Le{[Y]={};[Zt]=[];[Ve]=Ii(this);name=\"\";window=this;parent=this;self=this;top=this;document=new jt(this);customElements=new Gn;location=globalThis.location;navigator=globalThis.navigator;Event=Z;ErrorEvent=Dn;PromiseRejectionEvent=Mn;ToggleEvent=Ln;FocusEvent=$n;ClipboardEvent=Hn;EventTarget=Le;CustomEvent=In;Node=pe;ParentNode=we;ChildNode=$e;DocumentFragment=dt;Document=jt;CharacterData=He;Comment=ct;Text=lt;Element=K;HTMLElement=Un;SVGElement=at;HTMLTemplateElement=ut;MutationObserver=xn;#t=null;#n=null;#e=null;static with(...e){let n=this;return class extends n{constructor(){super();for(let o of e)Ci(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=zo(e),s=Object.assign(Vo(e),Fo(e));delete o.self,Object.defineProperties(globalThis,o),Go(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),Go(n,s))}static setGlobalThis(e){for(let n in e)e[n]===e&&(e[n]=globalThis);Object.defineProperties(globalThis,Ri(e))}};function Ci(t,e){t[Zt].push(e(t)??{})}function Ii(t){return{createElement:ke.bind(null,t,\"createElement\"),setAttribute:ke.bind(null,t,\"setAttribute\"),removeAttribute:ke.bind(null,t,\"removeAttribute\"),createText:ke.bind(null,t,\"createText\"),setText:ke.bind(null,t,\"setText\"),insertChild:ke.bind(null,t,\"insertChild\"),removeChild:ke.bind(null,t,\"removeChild\"),addEventListener:ke.bind(null,t,\"addEventListener\"),removeEventListener:ke.bind(null,t,\"removeEventListener\")}}function ke(t,e,...n){for(let s of t[Zt])s[e]?.apply(s,n);let r=t[Y];r[e]?.apply(r,n)}var jn=new qe;var _r=\"~\";var Ue=new WeakMap;function ft(t){return Ue.get(t)}var Mr=new WeakMap,Mi=0;function ce(t){let e=Mr.get(t);return e==null&&(e=String(Mi++),zn(t,e)),e}function zn(t,e){Mr.set(t,e)}var Ir=new WeakMap;function Li(t){return Ir.get(t)}var Dr=new WeakMap;function $i(t){let e=Dr.get(t);if(e!=null)return e;if(!(!(t instanceof Element)||t.tagName.includes(\"-\"))){e={};for(let{name:n,value:r}of t.attributes)e[n]=r;return e}}var Hi=new WeakMap;function Ui(t){return Hi.get(t)}function Lr(t,e,n){let r=Ir.get(t);if(r==null&&(r={},Ir.set(t,r)),r[e]===n)return;r[e]=n;let o=Ue.get(t);o?.mutate([[3,ce(t),e,n,1]])}function Ge(t,e,n){let r=Dr.get(t);if(r==null&&(r={},Dr.set(t,r)),r[e]===n)return;n==null?delete r[e]:r[e]=String(n);let o=Ue.get(t);o?.mutate([[3,ce(t),e,n,2]])}function mt(t,e){if(Ue.get(t)!==e&&(Ue.set(t,e),t.childNodes))for(let r=0;r<t.childNodes.length;r++)mt(t.childNodes[r],e)}function Vn(t){if(Ue.get(t)!=null&&(Ue.delete(t),t.childNodes))for(let n=0;n<t.childNodes.length;n++)Vn(t.childNodes[n])}function pt(t){let{nodeType:e}=t;switch(e){case 1:return{id:ce(t),type:e,element:t.localName,properties:Cr(Li(t)),attributes:Cr($i(t)),eventListeners:Cr(Ui(t)),children:Array.from(t.childNodes).map(pt)};case 3:case 8:return{id:ce(t),type:e,data:t.data};default:throw new Error(`Cannot serialize node of type ${t.nodeType} (${typeof t.nodeType})`)}}function Cr(t){return t?{...t}:void 0}function $r(t,e,...n){let r=Mr.get(t),o=Ue.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 ht=jn[Y];ht.insertChild=(t,e,n)=>{let r=ft(t);r!=null&&(mt(e,r),r.mutate([[0,ce(t),pt(e),n]]))};ht.removeChild=(t,e,n)=>{let r=ft(t);r!=null&&(Vn(e),r.mutate([[1,ce(t),n]]))};ht.setText=(t,e)=>{let n=ft(t);n?.mutate([[2,ce(t),e]])};ht.setAttribute=(t,e,n)=>{t.tagName.includes(\"-\")||Ge(t,e,n)};ht.removeAttribute=(t,e)=>{t.tagName.includes(\"-\")||Ge(t,e)};qe.setGlobal(jn);var Wo=[\"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\"],qo=[\"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\"],Xo=[\"self\",\"postMessage\",\"setTimeout\",\"clearTimeout\",\"setInterval\",\"clearInterval\",\"queueMicrotask\",\"structuredClone\",\"crypto\",\"console\",\"DOMException\"],Ko=[\"TEMPORARY\",\"PERSISTENT\"],su=Object.freeze([...Wo,...qo,...Xo,...Ko]),iu=Object.freeze([\"constructor\",\"__defineGetter__\",\"__defineSetter__\",\"hasOwnProperty\",\"__lookupGetter__\",\"__lookupSetter__\",\"isPrototypeOf\",\"propertyIsEnumerable\",\"toString\",\"valueOf\",\"__proto__\",\"toLocaleString\"]),Yo=t=>typeof t==\"symbol\"?`[${t.description??\"symbol\"}]`:t;function Jo(t=globalThis,e=[],n={}){let r=[],o=[],s=new Set([...Wo,...qo,...Xo,...e,\"constructor\",Symbol.toStringTag]),i=(m,w)=>{let T=Reflect.getOwnPropertyDescriptor(m,w);return T===void 0||!(\"value\"in T)||T.writable||T.configurable?!1:n.primitivesStay&&typeof w==\"symbol\"&&(typeof T.value!=\"object\"||T.value===null)&&typeof T.value!=\"function\"?!0:Ko.includes(w)&&typeof T.value==\"number\"},a=t,l=a.setTimeout,c=a.setInterval,h=a.crypto,p=(m,w)=>function(T,d,...v){if(typeof T!=\"function\")throw new TypeError(`${w} takes a function: a guest view cannot run code from text`);return m.call(t,T,d,...v)},E=h?Object.freeze({getRandomValues:m=>h.getRandomValues(m)}):void 0,b=a.document?.defaultView;if(b&&b!==a)for(let m of Reflect.ownKeys(b))typeof m==\"symbol\"||s.has(m)||Reflect.deleteProperty(b,m)||o.push(`window.${m}`);let f=[];for(let m=t;m&&m!==Object.prototype;m=Object.getPrototypeOf(m))f.push(m);for(let m of f)for(let w of Reflect.ownKeys(m))s.has(w)||(Reflect.deleteProperty(m,w)?r.push(Yo(w)):i(m,w)||o.push(Yo(w)));let A=()=>function(){throw new EvalError(\"A guest view cannot make code from text.\")},u=[Function.prototype,Object.getPrototypeOf(async function(){}),Object.getPrototypeOf(function*(){}),Object.getPrototypeOf(async function*(){})];for(let m of u){let w=A();Object.defineProperty(w,\"prototype\",{value:m,writable:!1,enumerable:!1,configurable:!1}),Reflect.defineProperty(m,\"constructor\",{value:w,writable:!1,enumerable:!1,configurable:!1})||o.push(\"Function.prototype.constructor\"),m===Function.prototype&&Reflect.defineProperty(t,\"Function\",{value:w,writable:!0,enumerable:!1,configurable:!0})}let y=(m,w)=>{Reflect.defineProperty(t,m,{value:w,writable:!0,enumerable:!0,configurable:!0})||o.push(m)};y(\"setTimeout\",p(l,\"setTimeout\")),y(\"setInterval\",p(c,\"setInterval\")),E&&y(\"crypto\",E);for(let m of f.slice(1))Object.freeze(m);for(let m of Reflect.ownKeys(t)){let w=Reflect.getOwnPropertyDescriptor(t,m);Reflect.defineProperty(t,m,\"value\"in w?{...w,writable:!1,configurable:!1}:{...w,configurable:!1})}let R;try{R=Reflect.preventExtensions(t)}catch{R=!1}return{removed:r,stuck:o,sealed:R}}var zt=class extends HTMLElement{constructor(){super(),zn(this,_r)}connect(e){if(ft(this)===e||(mt(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,_r,pt(o),r])}e.mutate(n)}updateRemoteProperty(e,n){Lr(this,e,n)}callRemoteMethod(e,...n){return $r(this,e,...n)}};var x={},Hr={empty:!0},Gi={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\"},gt={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:Hr,br:Hr,wbr:Hr,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:{attributes:{href:\"link\"}},ul:x,menu:x,dl:x,dt:x,dd:x,ol:{attributes:{start:\"number\",reversed:\"boolean\",type:{oneOf:[\"1\",\"a\",\"A\",\"i\",\"I\"]}}},li:{attributes:{value:\"number\"}},table:x,caption:x,thead:x,tbody:x,tfoot:x,tr:x,colgroup:{attributes:{span:\"number\"}},col:{attributes:{span:\"number\"},empty:!0},th:{attributes:{colspan:\"number\",rowspan:\"number\",headers:\"text\",scope:{oneOf:[\"row\",\"col\",\"rowgroup\",\"colgroup\"]},abbr:\"text\"}},td:{attributes:{colspan:\"number\",rowspan:\"number\",headers:\"text\"}},details:{attributes:{open:\"boolean\",name:\"text\"}},summary:x,button:{attributes:{type:{oneOf:[\"button\"]},disabled:\"boolean\",name:\"text\",value:\"text\"}},input:{empty:!0,attributes:{type:{oneOf:[\"text\",\"search\",\"number\",\"range\",\"checkbox\",\"radio\",\"date\",\"time\",\"datetime-local\",\"month\",\"week\",\"color\",\"email\",\"tel\",\"url\"]},name:\"text\",value:\"text\",placeholder:\"text\",min:\"text\",max:\"text\",step:\"text\",checked:\"boolean\",disabled:\"boolean\",readonly:\"boolean\",required:\"boolean\",maxlength:\"number\",minlength:\"number\",size:\"number\",pattern:\"text\",multiple:\"boolean\",inputmode:\"text\",enterkeyhint:\"text\"}},select:{attributes:{name:\"text\",disabled:\"boolean\",multiple:\"boolean\",required:\"boolean\",size:\"number\"}},option:{attributes:{value:\"text\",selected:\"boolean\",disabled:\"boolean\",label:\"text\"}},optgroup:{attributes:{label:\"text\",disabled:\"boolean\"}},textarea:{attributes:{name:\"text\",placeholder:\"text\",rows:\"number\",cols:\"number\",disabled:\"boolean\",readonly:\"boolean\",required:\"boolean\",maxlength:\"number\",minlength:\"number\",wrap:{oneOf:[\"soft\",\"hard\",\"off\"]}}},label:{attributes:{for:\"text\"}},fieldset:{attributes:{disabled:\"boolean\",name:\"text\"}},legend:x,output:x,meter:{attributes:{value:\"number\",min:\"number\",max:\"number\",low:\"number\",high:\"number\",optimum:\"number\"}},progress:{attributes:{value:\"number\",max:\"number\"}},img:{empty:!0,attributes:{src:\"image\",alt:\"text\",width:\"number\",height:\"number\",decoding:{oneOf:[\"async\",\"sync\",\"auto\"]}}},\"graview-video\":{empty:!0,attributes:{autoplay:\"boolean\",cover:\"boolean\"}}},ji=[\"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\",\"filter\",\"flood-color\",\"flood-opacity\",\"lighting-color\",\"color-interpolation-filters\"],zi={id:\"text\",class:\"text\",style:\"style\",lang:\"text\",role:\"text\",tabindex:{oneOf:[\"-1\",\"0\"]},transform:\"geometry\",...Object.fromEntries(ji.map(t=>[t,\"css\"]))},Ae={x:\"geometry\",y:\"geometry\",width:\"geometry\",height:\"geometry\"},Fn={viewBox:\"geometry\",preserveAspectRatio:\"geometry\"},Zo={oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},Qo={oneOf:[\"R\",\"G\",\"B\",\"A\"]},ye={...Ae,in:\"text\",result:\"text\"},es={gradientUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},gradientTransform:\"geometry\",spreadMethod:{oneOf:[\"pad\",\"reflect\",\"repeat\"]},href:\"fragment\"},Bn={svg:{attributes:{...Ae,...Fn}},g:x,defs:x,symbol:{attributes:{...Ae,...Fn,refX:\"geometry\",refY:\"geometry\"}},use:{attributes:{...Ae,href:\"fragment\"}},title:x,desc:x,path:{attributes:{d:\"geometry\",pathLength:\"number\"}},rect:{attributes:{...Ae,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\",...es}},radialGradient:{attributes:{cx:\"geometry\",cy:\"geometry\",r:\"geometry\",fx:\"geometry\",fy:\"geometry\",fr:\"geometry\",...es}},stop:{attributes:{offset:\"geometry\"}},clipPath:{attributes:{clipPathUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},mask:{attributes:{...Ae,maskUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},maskContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]}}},pattern:{attributes:{...Ae,...Fn,patternUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternContentUnits:{oneOf:[\"userSpaceOnUse\",\"objectBoundingBox\"]},patternTransform:\"geometry\",href:\"fragment\"}},marker:{attributes:{...Fn,markerWidth:\"geometry\",markerHeight:\"geometry\",refX:\"geometry\",refY:\"geometry\",orient:\"geometry\",markerUnits:{oneOf:[\"strokeWidth\",\"userSpaceOnUse\"]}}},a:x,filter:{attributes:{...Ae,filterUnits:Zo,primitiveUnits:Zo}},feBlend:{attributes:{...ye,in2:\"text\",mode:\"text\"}},feColorMatrix:{attributes:{...ye,type:{oneOf:[\"matrix\",\"saturate\",\"hueRotate\",\"luminanceToAlpha\"]},values:\"geometry\"}},feComponentTransfer:{attributes:ye},...Object.fromEntries([\"feFuncR\",\"feFuncG\",\"feFuncB\",\"feFuncA\"].map(t=>[t,{attributes:{type:{oneOf:[\"identity\",\"table\",\"discrete\",\"linear\",\"gamma\"]},tableValues:\"geometry\",slope:\"number\",intercept:\"number\",amplitude:\"number\",exponent:\"number\",offset:\"number\"}}])),feComposite:{attributes:{...ye,in2:\"text\",operator:{oneOf:[\"over\",\"in\",\"out\",\"atop\",\"xor\",\"lighter\",\"arithmetic\"]},k1:\"number\",k2:\"number\",k3:\"number\",k4:\"number\"}},feDisplacementMap:{attributes:{...ye,in2:\"text\",scale:\"number\",xChannelSelector:Qo,yChannelSelector:Qo}},feDropShadow:{attributes:{...ye,dx:\"number\",dy:\"number\",stdDeviation:\"geometry\"}},feFlood:{attributes:ye},feGaussianBlur:{attributes:{...ye,stdDeviation:\"geometry\",edgeMode:{oneOf:[\"duplicate\",\"wrap\",\"none\"]}}},feMerge:{attributes:ye},feMergeNode:{attributes:{in:\"text\"}},feMorphology:{attributes:{...ye,operator:{oneOf:[\"erode\",\"dilate\"]},radius:\"geometry\"}},feOffset:{attributes:{...ye,dx:\"number\",dy:\"number\"}},feTurbulence:{attributes:{...Ae,result:\"text\",type:{oneOf:[\"fractalNoise\",\"turbulence\"]},baseFrequency:\"geometry\",numOctaves:\"number\",seed:\"number\",stitchTiles:{oneOf:[\"stitch\",\"noStitch\"]}}}};var ts=[\"alert\",\"alertdialog\",\"dialog\",\"banner\",\"main\",\"navigation\",\"contentinfo\",\"complementary\",\"search\",\"form\",\"application\",\"status\",\"log\",\"marquee\",\"timer\"],ns=[\"region\"],Ur={nav:\"div\",header:\"div\",footer:\"div\",aside:\"div\",search:\"div\",output:\"span\"},Yn={section:[\"aria-label\",\"title\"]},rs=[\"aria-labelledby\",\"aria-describedby\"];function Vi(t){return/^aria-[a-z]+$/.test(t)}function Fi(t){return/^data-[a-z0-9][a-z0-9_.-]*$/.test(t)}var Gr=4e3,os=1e5,Vt=512e3,jr=1e4,ss=\"http://www.w3.org/1999/xhtml\",is=\"http://www.w3.org/2000/svg\",Bi=new Map(Object.keys(Bn).map(t=>[t.toLowerCase(),t]));function Wn(t){return Bi.get(t.toLowerCase())}function qn(t,e,n){let r=n.toLowerCase(),o=t===\"html\"?[gt[e]?.attributes,Gi]:[Bn[e]?.attributes,zi],s=t===\"svg\"&&r===\"xlink:href\"?\"href\":r;for(let i of o)if(i){for(let[a,l]of Object.entries(i))if(a.toLowerCase()===s)return{name:a,kind:l}}if(Vi(r)||Fi(r))return{name:r,kind:\"text\"}}function as(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 ls=[\"wheel\",\"drag\",\"pinch\"];var cs=\"~\",Xn=t=>typeof t==\"object\"&&t!==null&&!Array.isArray(t),Ne=(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=>Ne(n,e+1)):Object.fromEntries(Object.entries(t).map(([n,r])=>[n,Ne(r,e+1)]))};function ds(){let t=new Map,e=new Map,n=new Map([[cs,{children:[],listeners:new Map}]]),r=0,o=c=>{let h=e.get(c);return h===void 0&&(h=r+=1,e.set(c,h),t.set(h,{listener:c,count:0})),t.get(h).count+=1,h},s=c=>{let h=t.get(c);h&&(h.count-=1,!(h.count>0)&&(t.delete(c),e.delete(h.listener)))},i=c=>{let h=n.get(c);if(h){n.delete(c);for(let p of h.listeners.values())s(p);for(let p of h.children)i(p)}},a=(c,h,p=0)=>{if(!Xn(c)||p>64)return Ne(c);let E=typeof c.id==\"string\"?c.id:void 0,b=h&&E!==void 0&&E!==cs;b&&i(E);let f={children:[],listeners:new Map};b&&n.set(E,f);let A={};for(let[u,y]of Object.entries(c))u===\"children\"&&Array.isArray(y)?A[u]=y.map(R=>{let m=a(R,b,p+1);return b&&Xn(R)&&typeof R.id==\"string\"&&f.children.push(R.id),m}):u===\"eventListeners\"&&Xn(y)?A[u]=Object.fromEntries(Object.entries(y).map(([R,m])=>{if(typeof m!=\"function\"||!b)return[R,void 0];let w=o(m);return f.listeners.set(R,w),[R,{listener:w}]})):A[u]=Ne(y,p+1);return A},l=c=>{if(!Array.isArray(c))return Ne(c);let[h,p]=c,E=typeof p==\"string\"?n.get(p):void 0;if(h===0){let b=a(c[2],E!==void 0),f=Xn(c[2])?c[2].id:void 0;if(E&&typeof f==\"string\"&&n.has(f)){let A=Number(c[3]);E.children.splice(Number.isInteger(A)&&A>=0&&A<=E.children.length?A:E.children.length,0,f)}return[h,Ne(p),b,Ne(c[3])]}if(h===1){let b=Number(c[2]);return E&&Number.isInteger(b)&&b>=0&&b<E.children.length&&i(E.children.splice(b,1)[0]),Ne(c)}if(h===3&&c[4]===3){let b=String(c[2]),f=c[3],A=E&&typeof f==\"function\"?o(f):void 0,u=E?.listeners.get(b);return u!==void 0&&s(u),A===void 0?E?.listeners.delete(b):E.listeners.set(b,A),[h,Ne(p),b,A===void 0?void 0:{listener:A},3]}return Ne(c)};return{encode:c=>c.map(l),listener:c=>t.get(c)?.listener,get listening(){return t.size},get nodes(){return n.size-1}}}var zr=\"graview-view-root\",Yi=[\"value\",\"checked\",\"key\",\"pressed\",\"files\",\"refused\",\"x\",\"y\",\"width\",\"height\",\"deltaX\",\"deltaY\",\"deltaMode\",\"ctrlKey\",\"metaKey\",\"phase\",\"pointerId\",\"button\",\"pressure\",\"dx\",\"dy\",\"scale\",\"rotation\"],Wi=t=>t.replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\"/g,\"&quot;\").replace(/'/g,\"&#39;\"),qi=t=>Object.freeze({html:t,toString:()=>t}),us=t=>typeof t==\"object\"&&t!==null&&typeof t.html==\"string\"&&Object.isFrozen(t),fs=t=>t==null||t===!1?\"\":Array.isArray(t)?t.map(fs).join(\"\"):us(t)?t.html:Wi(String(t));function ms(t){customElements.get(zr)||customElements.define(zr,zt);let e=Event,n=ds(),r=new Set,o=new Set,s,i=[],a=new Set;for(let g of[\"closest\",\"matches\",\"dataset\"]){let O=()=>{throw new TypeError(`A view's element has no ${g}: graview.on hands event.element, the element its selector matched; read event.element.getAttribute(\"data-\\u2026\").`)};g in Element.prototype||Object.defineProperty(Element.prototype,g,g===\"dataset\"?{get:O}:{value:O})}let l=document.createElement(zr),c=g=>{let O=_=>{for(let D of Array.from(_.childNodes)){if(D.nodeType!==1)continue;if(ce(D)===g)return D;let I=O(D);if(I)return I}};return O(l)},h=g=>{let O=c(g.target);if(!O)return;let _=new e(g.event,{bubbles:!0}),D={};for(let I of Yi)g[I]!==void 0&&(D[I]=g[I]);for(let I of Object.keys(D))Object.defineProperty(_,I,{value:D[I],enumerable:!0});O.dispatchEvent(_);for(let I of o){if(I.type!==g.event)continue;let G;try{G=new Set(Array.from(l.querySelectorAll(I.selector)))}catch{continue}for(let re=O;re&&re!==l;re=re.parentNode)if(G.has(re)){I.listener(Object.freeze({type:g.event,target:O,element:re,...D}));break}}},p=g=>{if(g.type===\"dom-event\"&&typeof g.target==\"string\")return h(g);if(g.type===\"notice\")return t.warn(g.text);if(g.type!==\"props\")return;s=g.props;let O=t.now();for(let I of r)try{I(g.props)}catch(G){t.threw(G)}let _=t.now()-O,D=g.push;typeof D==\"number\"&&t.microtask(()=>t.microtask(()=>t.send({type:\"pushed\",push:D,ms:_})))},E;l.connect({mutate(g){E||(E=[],t.microtask(()=>{let O=E??[];E=void 0,t.send({type:\"render\",records:n.encode(O)})})),E.push(...g)},call:()=>{}});let b=g=>g.nodeType===1?g.getAttribute(\"data-key\")??g.getAttribute(\"id\"):null,f=(g,O)=>g.nodeType===O.nodeType&&(g.nodeType!==1||g.localName===O.localName&&g.namespaceURI===O.namespaceURI&&b(g)===b(O));function A(g,O){let _=Array.from(O.childNodes),D=0;for(let I of _){let G=g.childNodes[D]??null;if(G&&f(G,I)){u(G,I),D+=1;continue}if(b(I)!==null){let _e=Array.from(g.childNodes).slice(D+1).find(vt=>f(vt,I));if(_e){g.insertBefore(_e,G),u(_e,I),D+=1;continue}}g.insertBefore(I,G),D+=1}for(;g.childNodes.length>D;)g.removeChild(g.lastChild)}function u(g,O){if(g.nodeType!==1){g.data!==O.data&&(g.data=O.data);return}let _=g,D=O,I=y(_);for(let G of _.getAttributeNames())D.hasAttribute(G)||(_.removeAttribute(G),I&&Ge(_,G,void 0));for(let G of D.getAttributeNames()){let re=D.getAttribute(G);_.getAttribute(G)!==re&&_.setAttribute(G,re),I&&Ge(_,G,re)}A(_,D)}let y=g=>g.localName.includes(\"-\");function R(g){for(let O of Array.from(g.childNodes)){if(O.nodeType!==1)continue;let _=O;if(y(_))for(let D of _.getAttributeNames())Ge(_,D,_.getAttribute(D)??void 0);R(_)}}function m(g,O,_){for(let D of Array.from(g.childNodes)){if(D.nodeType!==1)continue;let I=D,G=I.localName,re=O||G.toLowerCase()===\"svg\",_e=re?Wn(G):Object.prototype.hasOwnProperty.call(gt,G.toLowerCase())?G.toLowerCase():void 0;if(!_e){_.add(`<${G}>`);continue}for(let vt of I.getAttributeNames())(!qn(re?\"svg\":\"html\",_e,vt)||!re&&Yn[_e]?.includes(vt.toLowerCase()))&&_.add(`${_e} ${vt}`);m(I,re,_)}}function w(g){let O=document.createElement(\"div\"),_=Array.isArray(g)?g:[g];for(let I of _)if(I!=null)if(typeof I==\"string\"||us(I)){let G=document.createElement(\"div\");G.innerHTML=typeof I==\"string\"?I:I.html,O.append(...Array.from(G.childNodes))}else O.append(I);let D=new Set;m(O,!1,D),i=[...D],i.length>0&&t.warn(`The host will not draw: ${i.join(\", \")}`),R(O),A(l,O)}let T=[],d=new Set(ls),v=\"[]\",N=!1,C=()=>{N||(N=!0,t.microtask(()=>{N=!1;let g=[...new Map([...o].filter(_=>d.has(_.type)).map(_=>[`${_.type} ${_.selector}`,{event:_.type,selector:_.selector}])).entries()].sort(([_],[D])=>_<D?-1:_>D?1:0).map(([,_])=>_),O=JSON.stringify(g);O!==v&&(v=O,t.send({type:\"gestures\",bound:g}))}))},P=\"[]\",S=!1,z=()=>{S||(S=!0,t.microtask(()=>{S=!1;let g=[...new Set([...o].filter(_=>_.type===\"click\"&&typeof _.selector==\"string\").map(_=>_.selector))].sort().slice(0,200),O=JSON.stringify(g);O!==P&&(P=O,t.send({type:\"clicks\",selectors:g}))}))};return{view:Object.freeze({get props(){return s},onProps(g){return r.add(g),s&&g(s),()=>void r.delete(g)},render:w,style(g){typeof g!=\"string\"||T.includes(g)||(T.push(g),t.send({type:\"style\",sheets:[...T]}))},on(g,O,_){let D={type:g,selector:O,listener:_};return o.add(D),typeof g==\"string\"&&!a.has(g)&&(a.add(g),t.send({type:\"hears\",events:[g]})),d.has(g)&&C(),g===\"click\"&&z(),()=>{o.delete(D),d.has(g)&&C(),g===\"click\"&&z()}},act:(g,O={})=>t.act(g,O),navigate(g){if(typeof g==\"string\")return t.navigate(g);let O=as(g);O&&t.send(O)},html(g,...O){return qi(g.reduce((_,D,I)=>_+D+(I<O.length?fs(O[I]):\"\"),\"\"))},get refused(){return i},get hardening(){return t.hardening()}}),hear:p,find:g=>{try{let O=l.querySelectorAll(g)[0];return O?ce(O):void 0}catch{return}},listened:g=>{let O=new Set;for(let _ of o)if(_.type===g)try{for(let D of Array.from(l.querySelectorAll(_.selector))){let I=ce(D);I&&O.add(I)}}catch{}return[...O]}}}var ps=t=>t.toLowerCase().replace(/[^a-z0-9]+/g,\"-\").replace(/^-|-$/g,\"\");function Ft(t,e){let n=t.find(s=>s.as===e);if(n)return n;let r=e.trim().toLowerCase(),o=ps(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&&ps(s.title)===o):void 0)}var xe=t=>` Its places: ${t.map(e=>typeof e==\"string\"?`\"${e}\"`:e.title&&e.title!==e.as?`\"${e.as}\" (${e.title})`:`\"${e.as}\"`).join(\", \")||\"none\"}.`,yt=\" This run was not handed the views the host keeps, so a titled view's place is not among these: if it names one, the link goes there.\",Bt=t=>`\"${t.length>80?`${t.slice(0,79)}\\u2026`:t}\"`;var hs=[\"https:\",\"mailto:\",\"tel:\"];function gs(t){if(!(typeof t!=\"string\"||t.length>2e3||/[\\s<>\"]/.test(t.trim())||t.trim()!==t))try{let e=new URL(t);return!hs.includes(e.protocol)||e.protocol===\"https:\"&&(e.hostname===\"\"||e.username!==\"\"||e.password!==\"\")?void 0:e.href}catch{return}}function ys(t){let e=new Set,n=r=>{if(typeof r!=\"string\"||!/^(https|mailto|tel):/i.test(r))return;let o=gs(r);o&&e.add(o)};for(let r of[...t?.node?[t.node]:[],...t?.nodes??[]])for(let[o,s]of Object.entries(r))o===\"id\"||o===\"kind\"||(Array.isArray(s)?s.forEach(n):n(s));return e}function bs(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 Es(t,e){let n=gs(t);if(n&&(e.handed.has(n)||n.startsWith(\"https:\")&&bs(e.origins).includes(new URL(n).origin)))return n}function ws(t,e){let n=t.length>120?`${t.slice(0,119)}\\u2026`:t,r=\"\";try{r=new URL(t).protocol}catch{r=\"\"}if(!hs.includes(r))return`The link \"${n}\" was not drawn: a view links only to an https:, mailto: or tel: address.`;let o=bs(e);return`The link \"${n}\" was not drawn: it is no address this view was handed. A view links out only to an address a record it was shown holds (a url field), as the record holds it${o.length>0?`, or an https: address on ${o.join(\", \")}`:\"\"}; a record or a place of this app is <a data-record> or <a data-place>.`}var Vr={nav:\"div\",header:\"div\",footer:\"div\",aside:\"div\",search:\"div\",output:\"span\"},Ns=[\"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\",\"mask-image\",\"mask-size\",\"mask-position\",\"mask-repeat\",\"mask-origin\",\"mask-clip\",\"mask-composite\",\"mask-mode\",\"mask-type\",\"-webkit-mask\",\"-webkit-mask-image\",\"-webkit-mask-size\",\"-webkit-mask-position\",\"-webkit-mask-repeat\",\"-webkit-mask-origin\",\"-webkit-mask-clip\",\"-webkit-mask-composite\",\"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\",\"-webkit-text-stroke\",\"-webkit-text-stroke-width\",\"-webkit-text-stroke-color\",\"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\",\"animation-timeline\",\"animation-range\",\"animation-range-start\",\"animation-range-end\",\"scroll-timeline\",\"scroll-timeline-name\",\"scroll-timeline-axis\",\"view-timeline\",\"view-timeline-name\",\"view-timeline-axis\",\"view-timeline-inset\",\"timeline-scope\",\"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\",\"flood-color\",\"flood-opacity\",\"lighting-color\",\"color-interpolation-filters\"],xs=[\"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\",\"scroll\",\"view\"],Ts=[\"fill\",\"stroke\",\"clip-path\",\"mask\",\"marker\",\"marker-start\",\"marker-mid\",\"marker-end\",\"filter\"],Ss=[\"media\",\"supports\",\"container\",\"keyframes\"],vs={position:[\"static\",\"relative\",\"absolute\",\"sticky\"],all:[],appearance:[\"auto\",\"none\",\"menulist-button\",\"textfield\"],\"-webkit-appearance\":[\"auto\",\"none\",\"menulist-button\",\"textfield\"]},Os=[\"host\",\"host-context\",\"slotted\",\"part\",\"backdrop\",\"picker\",\"view-transition\",\"view-transition-group\",\"view-transition-image-pair\",\"view-transition-old\",\"view-transition-new\"],ks=[\"-webkit-details-marker\"],Yt=64e3;var ee=t=>t>=48&&t<=57,As=t=>ee(t)||t>=65&&t<=70||t>=97&&t<=102,qr=t=>t>=65&&t<=90||t>=97&&t<=122,Xr=t=>t>=128,Kn=t=>qr(t)||Xr(t)||t===95,Rs=t=>Kn(t)||ee(t)||t===45,Ps=t=>t===10,Re=t=>t===10||t===9||t===32,Xi=t=>t>=0&&t<=8||t===11||t>=14&&t<=31||t===127,be=-1;function Ki(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 Kr(t){let e=Ki(t),n=0,r=(u=0)=>n+u<e.length?e[n+u]:be,o=[],s=(u,y)=>u===92&&y!==10&&y!==be,i=(u,y,R)=>u===45?Kn(y)||y===45||s(y,R):Kn(u)?!0:s(u,y),a=(u,y,R)=>u===43||u===45?ee(y)||y===46&&ee(R):ee(u===46?y:u),l=()=>{let u=r();if(n+=1,u===be)return 65533;if(As(u)){let y=String.fromCodePoint(u);for(;y.length<6&&As(r());)y+=String.fromCodePoint(r()),n+=1;Re(r())&&(n+=1);let R=parseInt(y,16);return R===0||R>=55296&&R<=57343||R>1114111?65533:R}return u},c=()=>{let u=\"\";for(;;){let y=r();if(Rs(y))u+=String.fromCodePoint(y),n+=1;else if(s(y,r(1)))n+=1,u+=String.fromCodePoint(l());else return u}},h=()=>{let u=\"\";for((r()===43||r()===45)&&(u+=String.fromCodePoint(e[n++]));ee(r());)u+=String.fromCodePoint(e[n++]);if(r()===46&&ee(r(1)))for(u+=String.fromCodePoint(e[n++],e[n++]);ee(r());)u+=String.fromCodePoint(e[n++]);if((r()===69||r()===101)&&(ee(r(1))||(r(1)===43||r(1)===45)&&ee(r(2))))for(u+=String.fromCodePoint(e[n++]),ee(r())||(u+=String.fromCodePoint(e[n++]));ee(r());)u+=String.fromCodePoint(e[n++]);return u},p=()=>{let u=h();return i(r(),r(1),r(2))?{type:\"dimension\",repr:u,unit:c()}:r()===37?(n+=1,{type:\"percentage\",repr:u}):{type:\"number\",repr:u}},E=()=>{for(;;){let u=r();if(n+=1,u===41||u===be)return;s(u,r())&&l()}},b=()=>{let u=\"\";for(;Re(r());)n+=1;for(;;){let y=r();if(n+=1,y===41)return{type:\"url\",value:u};if(y===be)return{type:\"url\",value:u};if(Re(y)){for(;Re(r());)n+=1;return r()===41||r()===be?(r()===41&&(n+=1),{type:\"url\",value:u}):(E(),{type:\"bad-url\"})}if(y===34||y===39||y===40||Xi(y))return E(),{type:\"bad-url\"};if(y===92){if(s(y,r()))u+=String.fromCodePoint(l());else return E(),{type:\"bad-url\"};continue}u+=String.fromCodePoint(y)}},f=()=>{let u=c();if(u.toLowerCase()===\"url\"&&r()===40){for(n+=1;Re(r())&&Re(r(1));)n+=1;let y=Re(r())?r(1):r();return y===34||y===39?{type:\"function\",value:u}:b()}return r()===40?(n+=1,{type:\"function\",value:u}):{type:\"ident\",value:u}},A=u=>{let y=\"\";for(;;){let R=r();if(n+=1,R===u||R===be)return{type:\"string\",value:y};if(Ps(R))return n-=1,{type:\"bad-string\"};if(R===92){if(r()===be)continue;if(Ps(r())){n+=1;continue}y+=String.fromCodePoint(l());continue}y+=String.fromCodePoint(R)}};for(;;){for(;r()===47&&r(1)===42;){for(n+=2;r()!==be&&!(r()===42&&r(1)===47);)n+=1;r()!==be&&(n+=2)}let u=r();if(u===be)return o;if(Re(u)){for(;Re(r());)n+=1;o.push({type:\"whitespace\"});continue}switch(n+=1,u){case 34:case 39:o.push(A(u));continue;case 35:if(Rs(r())||s(r(),r(1))){let y=i(r(),r(1),r(2));o.push({type:\"hash\",value:c(),id:y})}else o.push({type:\"delim\",value:\"#\"});continue;case 40:o.push({type:\"(\"});continue;case 41:o.push({type:\")\"});continue;case 43:case 46:a(u,r(),r(1))?(n-=1,o.push(p())):o.push({type:\"delim\",value:String.fromCodePoint(u)});continue;case 44:o.push({type:\",\"});continue;case 45:a(u,r(),r(1))?(n-=1,o.push(p())):r()===45&&r(1)===62?(n+=2,o.push({type:\"CDC\"})):i(u,r(),r(1))?(n-=1,o.push(f())):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:c()}):o.push({type:\"delim\",value:\"@\"});continue;case 91:o.push({type:\"[\"});continue;case 92:s(u,r())?(n-=1,o.push(f())):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:ee(u)?(n-=1,o.push(p())):Kn(u)?(n-=1,o.push(f())):o.push({type:\"delim\",value:String.fromCodePoint(u)})}}}var Ms={\"{\":\"}\",\"[\":\"]\",\"(\":\")\"},Ls=32,Br=class{tokens;i=0;constructor(e){this.tokens=e}peek(){return this.tokens[this.i]}next(){return this.tokens[this.i++]}};function $s(t,e){let n=t.next();return n.type===\"{\"||n.type===\"[\"||n.type===\"(\"?{type:\"block\",open:n.type,value:_s(t,Ms[n.type],e+1)}:n.type===\"function\"?{type:\"func\",name:n.value,value:_s(t,\")\",e+1)}:n}function _s(t,e,n){let r=[];for(;;){let o=t.peek();if(!o)return r;if(o.type===e)return t.next(),r;if(n>Ls){t.next(),r.push({type:\"bad-string\"});continue}r.push($s(t,n))}}function bt(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 a=[];r+=1;let l;for(;r<t.length;){let c=t[r];if(r+=1,c.type===\";\")break;if(c.type===\"block\"&&c.open===\"{\"){l=c.value;break}a.push(c)}n.push({type:\"at-rule\",name:o.value,prelude:a,...l?{block:l}:{}});continue}let s=[],i;for(;r<t.length;){let a=t[r];if(r+=1,a.type===\"block\"&&a.open===\"{\"){i=a.value;break}s.push(a)}i&&n.push({type:\"qualified\",prelude:s,block:i})}return n}function Jr(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 a=t[i];if(a.type===\";\"||a.type===\"block\"&&a.open===\"{\")return i+1}return t.length})();e.push(...bt(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 a=Hs(r.value,t.slice(s+1,i));if(a.value.some(l=>l.type===\"block\"&&l.open===\"{\")){let l=t.findIndex((c,h)=>h>n&&c.type===\"block\"&&c.open===\"{\");e.push(...bt(t.slice(n,l+1),!1)),n=l+1;continue}e.push(a),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(...bt(t.slice(n,o+1),!1)),n=o+1}return e}function Hs(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 Zr(t){let e=new Br(Kr(t)),n=[];for(;e.peek();)n.push($s(e,0));return n}function Et(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&&ee(r)||o===1&&ee(r)&&n[0]===45?e+=`\\\\${r.toString(16)} `:o===0&&r===45&&n.length===1?e+=\"\\\\-\":Xr(r)||r===45||r===95||ee(r)||qr(r)?e+=String.fromCodePoint(r):e+=`\\\\${String.fromCodePoint(r)}`}),e}function Jn(t){let e=\"\";for(let n of t){let r=n.codePointAt(0);Xr(r)||r===45||r===95||ee(r)||qr(r)?e+=n:r>=1&&r<=31||r===127?e+=`\\\\${r.toString(16)} `:e+=`\\\\${n}`}return e}function Wt(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 Ji(t){let e=Jn(t);return/^[eE]([0-9]|[+-][0-9])/.test(t)?`\\\\${t.codePointAt(0).toString(16)} ${Jn(t.slice(1))}`:e}var Cs=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 Zi(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 Qi(t){switch(t.type){case\"whitespace\":return\" \";case\"ident\":return Et(t.value);case\"at-keyword\":return`@${Et(t.value)}`;case\"hash\":return`#${Jn(t.value)}`;case\"string\":return Wt(t.value);case\"url\":return`url(${Wt(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}${Ji(t.unit)}`;case\"func\":return`${Et(t.name)}(${je(t.value)})`;case\"block\":return`${t.open}${je(t.value)}${Ms[t.open]}`;case\":\":case\";\":case\",\":case\"[\":case\"]\":case\"(\":case\")\":case\"{\":case\"}\":return t.type;default:return\"\"}}function je(t){let e=\"\",n;for(let r of t)r.type===\"whitespace\"&&n?.type===\"whitespace\"||(n&&Zi(Cs(n),Cs(r))&&(e+=\"/**/\"),e+=Qi(r),n=r);return e}var ea=new Set(Ns),Us=new Set(xs),Is=new Set(Ts),ta=new Set(Ss),na=new Set(Os),ra=new Set(ks),Ds=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,Pe=t=>t.replace(/[A-Z]/g,e=>e.toLowerCase()),oa=t=>Pe(t);function Yr(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&&Is.has(t)&&Ds.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=Pe(o.name);if(s===\"url\"||s===\"src\"){let a=o.value.filter(c=>c.type!==\"whitespace\"),l=a[0];if(s===\"url\"&&a.length===1&&l?.type===\"string\"&&t&&Is.has(t)&&Ds.test(l.value)){r.push({type:\"func\",name:\"url\",value:[{type:\"string\",value:l.value}]});continue}n({reason:\"url\",...t?{name:t}:{}});return}if(!Us.has(s)){n({reason:\"function\",name:s});return}let i=Yr(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=Yr(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}var sa=/^(animation|transition|scroll-behavior)/;function Qn(t,e,n=!1){let r=t.name.startsWith(\"--\"),o=r?t.name:oa(t.name);if(!r&&!ea.has(o)){e({reason:\"property\",name:o});return}let s=vs[o];if(s){let l=t.value.filter(p=>p.type!==\"whitespace\"),c=l[0],h=l.length===1&&c?.type===\"ident\"?Pe(c.value):void 0;if(!h||![...s,\"inherit\",\"initial\",\"unset\",\"revert\"].includes(h)){e({reason:\"value\",name:o});return}return`${o}: ${h}${t.important?\" !important\":\"\"}`}let i=Yr(r?void 0:o,t.value,e);if(!i)return;let a=je(i).trim();return`${r?`--${Jn(t.name.slice(2))}`:o}: ${a}${t.important&&!(n&&sa.test(o))?\" !important\":\"\"}`}function Gs(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 a=Pe(s.type===\"ident\"?s.value:s.name);if(na.has(a)||(a.startsWith(\"-webkit-\")||a.startsWith(\"-moz-\"))&&!ra.has(a))return e({reason:\"selector\",name:a}),!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 Fr(t,e,n){let r=[];for(let o of Jr(t))if(o.type===\"declaration\"){let s=Qn(o,e);s&&r.push(`${s};`)}else{let s=Zn(o,e,n+1,\"style\");s&&r.push(s)}return r.join(\" \")}function ia(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=Pe(s.name);return e===\"supports\"&&i===\"selector\"?Gs(s.value,n):Us.has(i)?r(s.value):(n({reason:\"function\",name:i}),!1)}if(s.type===\"block\"){if(e===\"supports\"){let i=Jr(s.value);if(i.length===1&&i[0].type===\"declaration\")return Qn(i[0],n)!==void 0}return r(s.value)}return!0});return r(t)?je(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(Vr,Pe(e.value))?{type:\"block\",open:\"[\",value:[{type:\"ident\",value:\"data-graview-as\"},{type:\"delim\",value:\"=\"},{type:\"string\",value:Pe(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 Zn(t,e,n,r){if(n>Ls){e({reason:\"unreadable\",name:\"nesting\"});return}if(t.type===\"qualified\"){if(r===\"keyframes\"){if(!t.prelude.every(h=>h.type===\"whitespace\"||h.type===\",\"||h.type===\"percentage\"||h.type===\"ident\"&&[\"from\",\"to\"].includes(Pe(h.value)))){e({reason:\"unreadable\",name:\"keyframe\"});return}return`${je(t.prelude).trim()} { ${Fr(t.block,e,n)} }`}if(!Gs(t.prelude,e))return;let l=je(Wr(t.prelude)).trim();if(l===\"\"){e({reason:\"unreadable\",name:\"selector\"});return}return`${l} { ${Fr(t.block,e,n)} }`}let o=Pe(t.name),s=o===\"-webkit-keyframes\"?\"keyframes\":o;if(!ta.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 l=t.prelude.filter(E=>E.type!==\"whitespace\"),c=l[0];if(l.length!==1||!c||c.type!==\"ident\"&&c.type!==\"string\"){e({reason:\"unreadable\",name:\"@keyframes\"});return}let h=bt(t.block,!1).map(E=>Zn(E,e,n+1,\"keyframes\")).filter(E=>E!==void 0);return`@keyframes ${c.type===\"ident\"?Et(c.value):Wt(c.value)} { ${h.join(\" \")} }`}let i=ia(t.prelude,s,e);if(i===void 0)return;let a=r===\"style\"?Fr(t.block,e,n):bt(t.block,!1).map(l=>Zn(l,e,n+1,\"sheet\")).filter(l=>l!==void 0).join(\" \");return`@${s} ${i} { ${a} }`}function qt(t,e=Yt){let n=[];if(t.length>e)return{css:\"\",refused:[{reason:\"size\"}]};let r=s=>void n.push(s);return{css:bt(Zr(t),!0).map(s=>Zn(s,r,0,\"sheet\")).filter(s=>s!==void 0).join(`\n`),refused:n}}function er(t,e=Yt){let n=[],r=[],o=0;for(let s of t){if(o+s.length>e){r.push({reason:\"size\"});continue}o+=s.length;let i=qt(s,e);i.css&&n.push(i.css),r.push(...i.refused)}return{css:n.join(`\n`),refused:r}}function tr(t,e=Yt){let n=[];if(t.length>e)return{css:\"\",refused:[{reason:\"size\"}]};let r=s=>void n.push(s),o=[];for(let s of Jr(Zr(t))){if(s.type!==\"declaration\"){r({reason:\"unreadable\",name:\"a rule in a style attribute\"});continue}let i=Qn(s,r,!0);i&&o.push(i)}return{css:o.join(\"; \"),refused:n}}function nr(t,e){let n,r=Qn(Hs(t,Zr(e)),o=>n??=o);return r===void 0||n?{refused:n??{reason:\"unreadable\",name:t}}:{value:r.slice(r.indexOf(\":\")+1).trim()}}function js(t,e){if(e===\"svg\"){let r=Wn(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(gt,n)?Object.prototype.hasOwnProperty.call(Ur,n)?{namespace:\"html\",name:Ur[n],as:n}:{namespace:\"html\",name:n}:{refused:{reason:\"element\",element:t}}}function rr(t,e){return(t===\"html\"?gt[e]:Bn[e])?.empty===!0}var aa=/^[+-]?(\\d+\\.?\\d*|\\.\\d+)([eE][+-]?\\d+)?$/,la=/^[0-9A-Za-z\\s.,+\\-%()]*$/,ca=/^#[A-Za-z_][A-Za-z0-9_.:-]*$/,da=/^data:image\\/(png|gif|jpeg|webp|avif|bmp|svg\\+xml)(;[A-Za-z0-9=._+-]+)*,/i,ua=/^\\/graview\\/assets\\/[0-9a-f]{64}\\.(png|gif|jpe?g|webp|avif|svg|ico)$/,zs=/\\/graview\\/assets\\/[0-9a-f]{64}\\.(png|gif|jpe?g|webp|avif|svg|ico)$/,fa=/^\\/(?!\\/)(?!(?:.*\\/)?\\.\\.?(?:\\/|$))(?!.*%(?:2e|2f|5c))[^\\\\\\s?#\"'<>]*$/i;function ma(t,e){if(ua.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(fa.test(n))return zs.exec(n)?.[0]}function Vs(t,e={},n){let r=t.length>120?`${t.slice(0,119)}\\u2026`:t,o=Fs(e.origins),s=zs.exec(t.split(/[?#]/)[0])?.[0],i=n!==void 0&&n>Vt?` It is a data: image of ${n.toLocaleString(\"en-US\")} characters, more than the ${Vt.toLocaleString(\"en-US\")} a view's own data: image may be. A picture on a record is drawn at any size by the src the host hands the view (pictures in its manifest), used as it was handed.`:s?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, ${s}.`:\" 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)?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 (images.origins, on the view's definition).\":\"\",a=[\"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)\",...o.length>0?[`an https: image from ${o.join(\", \")}`]:[]];return`The image \"${r}\" was not drawn.${i} A view here shows ${a.slice(0,-1).join(\", \")} or ${a[a.length-1]}.`}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 pa(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 Qr(t,e,n,r,o){let s=qn(t,e,n);if(!s)return{refused:{reason:\"attribute\",element:e,name:n}};if(t===\"html\"&&Yn[e]?.includes(s.name))return{refused:{reason:\"attribute\",element:e,name:n}};if(r===null)return{name:s.name,value:null};let i=ha(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),...r.length>Vt?{length:r.length}:{}}:{},...s.kind===\"link\"?{address:r.slice(0,200)}:{}}}:s.name===\"role\"&&i.value.split(/\\s+/).some(a=>ts.includes(a.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(a=>({reason:a.reason===\"url\"?\"url\":\"css\",element:e,name:s.name,css:a}))}:{}}}function ha(t,e,n,r){let o=(s,i)=>({refused:{reason:s,name:t,...i?{css:i}:{}}});if(e===\"geometry\")return n.length>os||!la.test(n)||/url/i.test(n)?o(\"value\"):{value:n};if(e===\"image\"){let s=r.picture?.(n);if(s!==void 0)return{value:s};if(n.length>Vt)return o(\"url\");if(da.test(n))return{value:n};if(n.startsWith(`blob:${r.origin}/`)&&/^blob:[^\\s\"'<>]+$/.test(n))return{value:n};let i=r.asset?ma(n,r.origin):void 0;if(i!==void 0){let l=r.asset(i);if(l)return{value:l}}let a=pa(n,r.imageOrigins);return a?{value:a}:o(\"url\")}if(e===\"link\"){let s=r.link?.(n);return s===void 0?o(\"url\"):{value:s}}if(n.length>Gr)return o(\"value\");if(typeof e==\"object\"){let s=e.oneOf.find(i=>i.toLowerCase()===n.toLowerCase());return s===void 0?o(\"value\"):{value:s}}switch(e){case\"text\":return{value:n};case\"number\":return aa.test(n.trim())&&Number.isFinite(Number(n))?{value:n.trim()}:o(\"value\");case\"boolean\":return{value:\"\"};case\"fragment\":return ca.test(n)?{value:n}:o(\"url\");case\"style\":{let s=tr(n,Gr);return s.refused.length>0&&s.css===\"\"?o(s.refused[0].reason===\"url\"?\"url\":\"css\",s.refused[0]):{value:s.css,...s.refused.length>0?{dropped:s.refused}:{}}}case\"css\":{let s=nr(t,n);return\"refused\"in s?o(s.refused.reason===\"url\"?\"url\":\"css\",s.refused):{value:s.value}}}}var ga=\"http://www.w3.org/1999/xhtml\",ya=new Set([\"button\",\"submit\",\"reset\",\"checkbox\",\"radio\",\"image\"]);var or=(t,...e)=>t.namespaceURI===ga&&e.includes(t.localName),ba=t=>(t.getAttribute(\"type\")??\"text\").toLowerCase(),Ea=t=>or(t,\"textarea\",\"select\")||or(t,\"input\")&&!ya.has(ba(t));function Bs(t){if(or(t,\"option\",\"optgroup\",\"datalist\"))return'An option is never pressed by itself: put data-act on its select, with data-save=\"change\", or on a button.';if(or(t,\"label\"))return\"A press on a label presses its field too, and would ask for the act twice: put data-act on a button, or on the field.\";if(Ea(t)&&!t.hasAttribute(\"data-save\"))return'A click into a field to type or to pick is not a press: give it data-save (\"input\" or \"change\") to save it as it is typed, or put data-act on a button beside it.'}var wa=\"http://www.w3.org/1999/xhtml\",wt=class{constructor(e){this.ownerDocument=e}parentNode=null;childNodes=[];get firstChild(){return this.childNodes[0]??null}get parentElement(){return this.parentNode instanceof Ke?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}},Xe=class extends wt{constructor(n,r){super(n);this.data=r}nodeType=3;get textContent(){return this.data}},eo=class extends wt{nodeType=8;get textContent(){return\"\"}},Ke=class extends wt{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}},to=class extends wt{nodeType=9;constructor(){super(null)}createElementNS(e,n){return new Ke(this,e,n)}createElement(e){return new Ke(this,wa,e)}createTextNode(e){return new Xe(this,e)}createComment(e){return new eo(this)}};function Ys(){let t=new to,e=t.createElement(\"div\");return e.setAttribute(\"data-graview-view-root\",\"\"),t.appendChild(e),{document:t,root:e}}var Na=new Set([\"video/mp4\",\"video/webm\",\"video/ogg\"]);function xa(t,e){let n=t.poster===!0||typeof t.poster==\"string\"&&t.poster.length>0,r=Na.has(t.type.toLowerCase()),o=!r&&!n?`its source is ${t.type}, which not every browser plays, and it has no poster`:r?n?void 0:\"it has no poster, so nothing stands before it plays or where a person asked for less motion\":`its source is ${t.type}, which not every browser plays`;return{record:e.record,field:e.field,text:typeof t.caption==\"string\"&&t.caption.trim()?t.caption.trim():t.name,name:t.name,source:t.type,...typeof t.duration==\"number\"?{duration:t.duration}:{},poster:n,autoplay:e.autoplay,cover:e.cover,playable:r&&n,...o?{why:o}:{}}}var no={h1:1,h2:2,h3:3,h4:4,h5:5,h6:6},Ws=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\"]),qs=new Set([\"style\",\"template\",\"datalist\",\"option\"]),q=t=>t.replace(/\\s+/g,\" \").trim();function Ta(t){let e=t.duration===void 0?0:Math.round(t.duration);if(e<1)return\"a video\";if(e<60)return`a ${e}-second video`;let n=Math.round(e/60);return n<60?`a ${n}-minute video`:`a ${Math.floor(n/60)}-hour${n%60>0?` ${n%60}-minute`:\"\"} video`}var de=t=>t instanceof Ke,Xt=t=>t.hasAttribute(\"hidden\")||t.getAttribute(\"aria-hidden\")===\"true\";function te(t){return t instanceof Xe?t.data:!de(t)||Xt(t)||qs.has(t.localName)?\"\":t.localName===\"br\"?\" \":t.localName===\"img\"?t.getAttribute(\"alt\")??\"\":t.childNodes.map(te).join(t.localName===\"td\"||t.localName===\"th\"?\" \":\"\")}function*Je(t){for(let e of t.childNodes)de(e)&&(yield e,yield*Je(e))}function Sa(t){let e=t.getAttribute(\"data-save\"),n=t.getAttribute(\"data-debounce\");if(e===null&&n===null)return[];let r=`drawing <${t.localName}${e!==null?` data-save=\"${e}\"`:` data-debounce=\"${n}\"`}>`,o=[];if(e===null)return[{at:r,says:'data-debounce is read only on a field that saves as it is typed (data-save=\"input\").'}];if(![\"input\",\"textarea\",\"select\"].includes(t.localName))o.push({at:r,says:\"Only a field saves as it is typed: an input, a textarea or a select. A button is pressed (data-act alone).\"});else if(e!==\"input\"&&e!==\"change\")o.push({at:r,says:`data-save is \"input\" (saved as the person types, once they pause, and when they leave it) or \"change\" (saved when they leave it or pick), not \"${e}\".`});else if(t.getAttribute(\"data-act\")===null)o.push({at:r,says:'It saves through no act: a field saved as it is typed names its act itself, data-act=\"\\u2026\", one in the manifest.'});else if(!t.getAttribute(\"name\"))o.push({at:r,says:\"It has no name: the host sends a field as the act's argument its name says.\"});else{let s=!1,i=!1;for(let a=t;a;a=a.parentElement)a.getAttribute(\"data-record\")!==null&&(i=!0),a!==t&&(a.localName===\"fieldset\"||a.getAttribute(\"role\")===\"group\")&&(s=!0);(!s||!i)&&o.push({at:r,says:'It is in no fieldset bound to a record: the host saves a field inside <fieldset data-record=\"\\u2026\">, with the fields beside it, to the record the fieldset names.'})}return n!==null&&e!==\"input\"?o.push({at:r,says:'data-debounce is read only with data-save=\"input\": a \"change\" saves at once.'}):n!==null&&!(n.trim()!==\"\"&&Number.isFinite(Number(n))&&Number(n)>=250&&Number(n)<=1e4)&&o.push({at:r,says:`data-debounce is how long the host waits for the person to pause, in milliseconds from 250 to 10 000, not \"${n}\"; left out, it waits 1 000.`}),o}function va(t,e,n){let r=t.getAttribute(\"data-drop\");if(r===null)return[];let o=`drawing <${t.localName} data-drop=\"${r}\">`,s=[],i=(e.accepts??[]).filter(c=>c.kind===r),a=t.getAttribute(\"data-drop-field\");i.length===0?s.push({at:o,says:`The view's accepts names no field of \"${r}\", so the host offers no drop target here: say the field files go in, accepts: [{ \"kind\": \"${r}\", \"field\": \"<its image, video or file field>\" }].`}):a!==null&&!i.some(c=>c.field===a)&&s.push({at:o,says:`data-drop-field names \"${a}\", which the view's accepts does not name for \"${r}\" (${i.map(c=>`\"${c.field}\"`).join(\", \")}): the host offers no drop target here.`});let l=t.getAttribute(\"data-drop-connect\");if(l!==null){let c=l.indexOf(\":\"),h=c>0?l.slice(c+1):\"\";c<=0||h===\"\"||n.has(l)?s.push({at:o,says:`data-drop-connect is \"<relation>:<record id>\" \\u2014 \"takenOn:day:saturday\" \\u2014 not \"${l}\"${n.has(l)?\", which names a record and no relation\":\"\"}.`}):n.has(h)||s.push({at:o,says:`data-drop-connect names \"${h}\", which this seat was not shown: the host offers no drop target here.`})}return s}function Xs(t,e){let n=[],r=new Set,o=new Set,s=[],i=new Map;for(let f of[...e.props.node?[e.props.node]:[],...e.props.nodes??[]])i.set(f.id,f);let a=f=>Ft(e.places,f)!==void 0;for(let f of Je(t)){let A=f.getAttribute(\"data-act\");A!==null&&r.add(A);let u=A!==null&&f.getAttribute(\"data-debounce\")===null?Bs(f):void 0;u&&n.push({at:`drawing <${f.localName} data-act=\"${A}\">`,says:u});let y=f.getAttribute(\"data-record\");y!==null&&(o.add(y),!i.has(y)&&!a(y)&&n.push({at:`drawing <${f.localName} data-record=\"${y}\">`,says:e.placesUnsure?`It names \"${y}\", which this seat was not shown and is none of the places this run was told of. A view goes to a record by its id, or to a place by its slug.${xe(e.places)}${yt}`:`It names \"${y}\", 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.${xe(e.places)}`}));let R=f.getAttribute(\"data-place\");R!==null&&!a(R)&&n.push({at:`drawing <${f.localName} data-place=\"${R}\">`,says:e.placesUnsure?`It names the place \"${R}\", which is none of the places this run was told of.${xe(e.places)}${yt}`:`It names the place \"${R}\", which this app does not have.${xe(e.places)}`}),n.push(...Sa(f)),n.push(...va(f,e,i))}let l=f=>{if(f.localName===\"graview-video\")return;let A=f.getAttribute(\"data-record\");if(A!==null)return A;let u=f.getAttribute(\"data-key\")??f.getAttribute(\"id\");if(u!==null&&i.has(u))return u;let y=new Set;for(let R of Je(f)){let m=R.getAttribute(\"data-record\");m!==null&&R.localName!==\"graview-video\"&&y.add(m)}return y.size===1?[...y][0]:void 0},c=(f,A)=>{let u=i.get(A),y=u?.kind??(A.includes(\":\")?A.slice(0,A.indexOf(\":\")):\"\"),R=[...Je(f)],m=R.find(d=>d.localName in no)??R.find(d=>d.localName===\"a\"&&d.getAttribute(\"data-record\")===A)??R.find(d=>d.localName===\"strong\"||d.localName===\"b\"),w=q(m?te(m):\"\")||u?.label||A,T=p(f,m);return!m&&T[0]?.t===\"text\"&&q(T[0].text)===w&&T.shift(),{id:A,kind:y,title:w,parts:T}},h=f=>{let A=[...Je(f)].filter(m=>m.localName===\"tr\"&&!Xt(m)),u=A.find(m=>m.parentElement?.localName===\"thead\"||m.childNodes.every(w=>!de(w)||w.localName===\"th\")),y=u?u.childNodes.filter(de).map(m=>q(te(m))):[];return{t:\"list\",as:\"row\",columns:1,groups:[{items:A.filter(m=>m!==u).map(m=>{let w=m.childNodes.filter(de),T=l(m),d=T?i.get(T):void 0;return{id:T??\"\",kind:d?.kind??\"\",title:q(te(w[0]??m)),parts:w.slice(1).map((v,N)=>({t:\"field\",label:y[N+1]??\"\",text:q(te(v))}))}})}]}};function p(f,A){let u=[],y=\"\",R=()=>{let w=q(y);y=\"\",w&&u.push({t:\"text\",text:w})},m=f.childNodes;for(let w=0;w<m.length;w+=1){let T=m[w];if(T===A)continue;if(T instanceof Xe){y+=T.data;continue}if(!de(T)||Xt(T)||qs.has(T.localName))continue;if(A&&[...Je(T)].includes(A)){R(),u.push(...p(T,A));continue}let d=[];for(let v=w;v<m.length;v+=1){let N=m[v];if(N instanceof Xe&&q(N.data)===\"\")continue;if(!de(N)||Xt(N)||Ws.has(N.localName)||N.localName in no)break;let C=l(N);if(!C)break;d.push({element:N,id:C}),w=v}if(d.length>0){R();let v=d.every(N=>N.element.localName===\"li\"||N.element.localName===\"tr\");u.push({t:\"list\",as:v?\"row\":\"card\",columns:1,groups:[{items:d.map(N=>c(N.element,N.id))}]});continue}u.push(...E(T,v=>y+=v,R))}return R(),u}function E(f,A,u){let y=f.localName;if(Ws.has(y)&&y!==\"label\")return A(te(f)),[];if(y===\"mark\"){u();let m=q(te(f));return m?[{t:\"badge\",text:m}]:[]}u();let R=no[y]??(f.getAttribute(\"role\")===\"heading\"?Number(f.getAttribute(\"aria-level\")??2):void 0);if(R!==void 0){let m=q(te(f));return m?[{t:\"heading\",level:R,text:m}]:[]}switch(y){case\"ul\":case\"ol\":case\"menu\":return[{t:\"list\",as:\"row\",columns:1,groups:[{items:f.childNodes.filter(w=>de(w)&&w.localName===\"li\"&&!Xt(w)).map(w=>{let T=l(w);if(T)return c(w,T);let d=p(w),v=d[0],N=v&&(v.t===\"text\"||v.t===\"heading\")?v.text:\"\";return{id:\"\",kind:\"\",title:N,parts:N?d.slice(1):d}})}]}];case\"table\":return[h(f)];case\"dl\":{let m=[],w=\"\";for(let T of f.childNodes.filter(de))if(T.localName===\"dt\")w=q(te(T));else if(T.localName===\"dd\")m.push({t:\"field\",label:w,text:q(te(T))});else if(T.localName===\"div\")for(let d of T.childNodes.filter(de))d.localName===\"dt\"?w=q(te(d)):d.localName===\"dd\"&&m.push({t:\"field\",label:w,text:q(te(d))});return m}case\"figure\":{let m=f.childNodes.find(d=>de(d)&&d.localName===\"figcaption\"),w=q(f.childNodes.filter(d=>d!==m).map(te).join(\" \")),T=m?q(te(m)):\"\";return w?[{t:\"figure\",text:w,...T?{label:T}:{}}]:T?[{t:\"text\",text:T}]:[]}case\"meter\":case\"progress\":{let m=Number(f.getAttribute(\"value\")??0),w=Number(f.getAttribute(\"max\")??1)||1;return[{t:\"progress\",label:f.getAttribute(\"aria-label\")??f.getAttribute(\"title\")??\"\",text:`${Math.round(m/w*100)}%`}]}case\"svg\":{let m=f.childNodes.find(d=>de(d)&&d.localName===\"title\"),w=q(f.getAttribute(\"aria-label\")??(m?te(m):\"\"));if(w)return[{t:\"text\",text:w,tone:\"picture\"}];let T=[...Je(f)].filter(d=>d.localName===\"text\").map(d=>q(te(d))).filter(Boolean);return T.length>0?[{t:\"text\",text:T.join(\" \\xB7 \"),tone:\"picture\"}]:[]}case\"img\":{let m=q(f.getAttribute(\"alt\")??\"\");return m?[{t:\"text\",text:m,tone:\"picture\"}]:[]}case\"graview-video\":{let m=f.getAttribute(\"data-field\")??\"\",w=f.getAttribute(\"data-record\")??\"\",T=i.get(w),d=T&&m&&Object.hasOwn(T,m)?T[m]:void 0,v=(Array.isArray(d)?d:[d])[Number(f.getAttribute(\"data-index\")??\"0\")];if(!v||typeof v.name!=\"string\"||typeof v.type!=\"string\"||!v.type.startsWith(\"video/\"))return n.push({at:`drawing <graview-video data-field=\"${m}\">`,says:\"It names no video on a record this seat was shown: the host draws no player there. A <graview-video> names a record the view was shown (data-record) and its video field (data-field).\"}),[];let N=xa(v,{record:w,field:m,autoplay:f.getAttribute(\"autoplay\")!==null,cover:f.getAttribute(\"cover\")!==null});s.push(N);let C=N.autoplay?`, playing as a background, muted and looping${N.cover?\", filling its box\":\"\"}`:\"\";return[{t:\"text\",text:`${N.text}, ${Ta(N.duration!==void 0?{duration:N.duration}:{})}${C}`,tone:\"picture\"}]}case\"button\":{let m=q(te(f));return m?[{t:\"text\",text:m,tone:\"button\"}]:[]}case\"input\":case\"textarea\":case\"select\":{let m=q(f.getAttribute(\"aria-label\")??f.getAttribute(\"placeholder\")??f.getAttribute(\"name\")??\"\"),w=y===\"select\"?q(te(f.childNodes.find(T=>de(T)&&T.localName===\"option\"&&T.selected)??f)):f.value;return[{t:\"field\",label:m,text:w}]}case\"label\":return p(f);default:return p(f)}}return{parts:p(t),problems:n,acts:[...r],records:[...o],videos:s}}var Oa=0,ka=1,Aa=2,Ra=3,Ks=1,Pa=2,Js=3,_a=1,Ca=3,Ia=8,Zs=\"~\",Kt=t=>typeof t==\"object\"&&t!==null&&!Array.isArray(t),Qs=new Set([\"input\",\"select\",\"textarea\",\"option\"]),Da=new Set([\"value\",\"checked\",\"selected\"]),ei=[\"aria-label\",\"aria-labelledby\",\"title\"],Ma=t=>ei.some(e=>(t.getAttribute(e)??\"\").trim()!==\"\");function ti(t,e){let n=t.ownerDocument??t,r=e.maxNodes??5e3,o=[],s=new Map,i=new WeakMap,a={dom:t,name:\"div\",namespace:\"html\",children:[],id:Zs};s.set(Zs,a);let l=0,c=!1,h=new WeakMap,p=new Map,E=new Map,b=d=>{o.push(d),o.length>200&&o.shift(),e.onRefused?.(d)},f=()=>({dom:n.createComment(\"\"),children:[],refused:!0}),A=(d,v)=>{if(d.namespace===\"html\"&&d.name&&Qs.has(d.name))return d.dom;if(v?.namespace===\"html\"&&v.name===\"textarea\")return v.dom},u=(d,v)=>{let N=d.dom,C=h.get(N)??N.getAttribute(\"role\");if(C===null||!C.split(/\\s+/).some(P=>ns.includes(P.toLowerCase())))return void h.delete(N);if(Ma(N)){h.delete(N),N.getAttribute(\"role\")!==C&&N.setAttribute(\"role\",C);return}h.set(N,C),N.removeAttribute(\"role\"),v&&b({reason:\"value\",element:d.name,name:\"role\"})},y=()=>{if(E.size===0)return;let d=new Set,v=N=>{for(let C of N.children){if(C.refused||C.text)continue;let P=C.dom.getAttribute(\"id\");P&&d.add(P),v(C)}};v(a);for(let[N,C]of E){if(N.id===void 0||s.get(N.id)!==N){E.delete(N);continue}let P=N.dom;for(let[S,z]of C){let H=z.value.split(/\\s+/).filter(ne=>ne!==\"\"),W=H.filter(ne=>!d.has(ne));if(H.length>0&&W.length===0){if(z.drawn)continue;z.drawn=!0,P.setAttribute(S,z.value),u(N,!1)}else z.drawn&&(z.drawn=!1,P.removeAttribute(S),b({reason:\"reference\",element:N.name,name:S,ids:W.length>0?W:H}),u(N,!0))}}},R=(d,v,N,C=!0)=>{let P=d.dom;if(N!=null&&typeof N!=\"string\")return b({reason:\"value\",element:d.name,name:v});let S=Qr(d.namespace,d.name,v,N??null,e);if(\"refused\"in S){let ne=Qr(d.namespace,d.name,v,null,e);return\"refused\"in ne||P.removeAttribute(ne.name),!(\"refused\"in ne)&&ne.name===\"role\"&&h.delete(P),b(S.refused)}for(let ne of S.dropped??[])b(ne);let z=d.namespace===\"html\"&&Da.has(S.name)&&Qs.has(d.name),H=P,W=z?S.name===\"value\"?H.value:S.name===\"checked\"?H.checked:H.selected:void 0;if(S.name===\"role\"&&h.delete(P),rs.includes(S.name)){let ne=E.get(d)??new Map;S.value===null?ne.delete(S.name):ne.set(S.name,{value:S.value,drawn:!0}),ne.size>0?E.set(d,ne):E.delete(d)}S.value===null?P.removeAttribute(S.name):P.setAttribute(S.name,S.value),C&&(S.name===\"role\"||ei.includes(S.name))&&u(d,S.name===\"role\"),e.onAttribute?.(P,S.name),z&&(S.name===\"value\"&&\"value\"in H?(H.value=S.value??\"\",W!==H.value&&e.onFieldSet?.(P)):S.name===\"checked\"&&\"checked\"in H?(H.checked=S.value!==null,W!==H.checked&&e.onFieldSet?.(P)):S.name===\"selected\"&&\"selected\"in H&&(H.selected=S.value!==null,W!==H.selected&&e.onFieldSet?.(P.parentElement?.closest(\"select\")??P)))},m=d=>{if(!d.refused){l-=1,d.id!==void 0&&s.delete(d.id);for(let v of d.children)m(v)}},w=(d,v)=>{if(!Kt(d)||typeof d.id!=\"string\"||s.has(d.id))return b({reason:\"record\"}),f();if(l>=r)return b({reason:\"budget\"}),c||(c=!0,e.onOverBudget?.()),f();let N=d.id;if(d.type===Ia)return f();if(d.type===Ca){if(rr(v.namespace,v.name))return b({reason:\"child\",element:v.name}),f();let H=n.createTextNode(String(d.data??\"\").slice(0,jr)),W={dom:H,children:[],text:!0,id:N,parent:v};return s.set(N,W),i.set(H,N),l+=1,W}if(d.type!==_a)return b({reason:\"record\"}),f();let C=String(d.element);if(rr(v.namespace,v.name))return b({reason:\"child\",element:C}),f();let P=js(C,v.namespace);if(\"refused\"in P)return b(P.refused),f();let S=n.createElementNS(P.namespace===\"svg\"?is:ss,P.name);P.as&&S.setAttribute(\"data-graview-as\",P.as),P.namespace===\"html\"&&P.name===\"img\"&&S.setAttribute(\"referrerpolicy\",\"no-referrer\"),P.namespace===\"html\"&&P.name===\"a\"&&(S.setAttribute(\"target\",\"_blank\"),S.setAttribute(\"rel\",\"noopener noreferrer\"),S.setAttribute(\"referrerpolicy\",\"no-referrer\"));let z={dom:S,name:P.name,namespace:P.namespace,children:[],id:N,parent:v};if(s.set(N,z),i.set(S,N),l+=1,Kt(d.attributes)){for(let[H,W]of Object.entries(d.attributes))R(z,H,W,!1);u(z,!0)}if(e.decorate?.(S,P.name,P.namespace),Kt(d.properties))for(let H of Object.keys(d.properties))b({reason:\"attribute\",element:P.name,name:H});if(Kt(d.eventListeners))for(let H of Object.keys(d.eventListeners))d.eventListeners[H]!=null&&b({reason:\"attribute\",element:P.name,name:`on${H}`});if(Array.isArray(d.children))for(let H of d.children){let W=w(H,z);z.children.push(W),S.appendChild(W.dom)}return z},T=d=>{if(!Array.isArray(d))return b({reason:\"record\"});let[v,N]=d,C=typeof N==\"string\"?s.get(N):void 0;if(!C)return b({reason:\"record\"});switch(v){case Oa:{if(C.text)return b({reason:\"record\"});let P=Number(d[3]),S=Number.isInteger(P)&&P>=0&&P<=C.children.length?P:C.children.length,z=d[2],H=Kt(z)&&typeof z.id==\"string\"?p.get(z.id):void 0,W;H&&H.parent?.namespace===C.namespace&&!rr(C.namespace,C.name)?(p.delete(z.id),H.parent=C,W=H):W=w(z,C),C.dom.insertBefore(W.dom,C.children[S]?.dom??null),C.children.splice(S,0,W),C.namespace===\"html\"&&C.name===\"textarea\"&&e.onFieldSet?.(C.dom);return}case ka:{let P=Number(d[2]),S=C.children[P];if(!S)return b({reason:\"record\"});C.children.splice(P,1),S.dom.parentNode?.removeChild(S.dom),S.id!==void 0&&!S.refused?p.set(S.id,S):m(S);return}case Aa:{if(!C.text)return b({reason:\"record\"});C.dom.data=String(d[2]??\"\").slice(0,jr);let P=A(C,C.parent);P&&e.onFieldSet?.(P);return}case Ra:{if(C===a||C.text)return b({reason:\"record\"});let P=String(d[2]),S=d[4]??Ks;return S===Pa?R(C,P,d[3]):b(S===Ks||S===Js?{reason:\"attribute\",element:C.name,name:S===Js?`on${P}`:P}:{reason:\"record\"})}default:return b({reason:\"record\"})}};return{apply(d,v){if(!Array.isArray(d))return b({reason:\"record\"}),!0;try{for(let N=0;N<d.length;N+=1){if(v&&N%32===0&&v())return!1;T(d[N])}return!0}finally{for(let N of p.values())m(N);p.clear(),y()}},get refused(){return o},get size(){return l},idOf:d=>i.get(d),elementOf(d){let v=s.get(d);return v&&!v.text&&v!==a?v.dom:void 0},dispose(){for(let d of a.children)m(d);for(a.children.length=0;t.firstChild;)t.removeChild(t.firstChild)}}}function ni(t,e,n){let{root:r}=Ys(),o=!1,s=ti(r,{origin:n.origin??\"null\",...n.imageOrigins?{imageOrigins:n.imageOrigins}:{},...n.asset?{asset:n.asset}:{},...n.link?{link:n.link}:{},maxNodes:n.maxNodes,onOverBudget:()=>o=!0});for(let h of t)s.apply(h);let i=[...s.refused],a=\"\";if(e){let h=er(e);a=h.css;for(let p of h.refused)i.push({reason:\"css\",name:\"stylesheet\",css:p})}let l=n.theme?qt(n.theme).css:\"\",c=l&&a?`${l}\n${a}`:l||a;return{root:r,refused:i,size:s.size,over:o,css:c,elementOf:h=>s.elementOf(h)}}var sr=\" SMIL can set an attribute after the host judged it, and runs past a person's reduced-motion setting: animate with CSS @keyframes, which is held to it.\",ri={animate:sr,animateTransform:sr,animateMotion:sr,set:sr,feImage:\" It loads an image: a filter here is made of the view's own pixels.\",\"@property\":\" It registers a property for the whole page, the app's own --graview-* among them: animate a transform, an opacity or a color in @keyframes.\",\"a href\":\" An <a> in SVG goes to a record or a place (data-record, data-place); a link out is an HTML <a href>.\",role:` A role of the app's chrome or notices is the app's; role=\"region\" is drawn while it has a name (aria-label).`};function La(t,e={}){let n=\"element\"in t&&t.element?`<${t.element}>`:\"\",r=t.name?` ${t.name}`:\"\",o=s=>s&&Object.prototype.hasOwnProperty.call(ri,s)?ri[s]:\"\";switch(t.reason){case\"element\":return{at:`drawing ${n}`,says:`Not drawn: ${n} is not in the open kit.${o(\"element\"in t?t.element:void 0)}`};case\"attribute\":return{at:`drawing ${n}${r}`,says:`Not drawn: ${n||\"an element\"} does not take${r}.${o(`${\"element\"in t?t.element:\"\"}${r}`)}`};case\"value\":return{at:`drawing ${n}${r}`,says:`Not drawn: the value of${r} is not one the open kit takes.${o(t.name)}`};case\"url\":return\"element\"in t&&t.element===\"a\"&&t.address!==void 0?{at:`drawing ${n}${r}`,says:`Not drawn: ${ws(t.address,e.linkOrigins)}`}:{at:`drawing ${n}${r}`,says:t.address!==void 0&&\"element\"in t&&t.element===\"img\"?`Not drawn: ${Vs(t.address,e,\"length\"in t?t.length:void 0)}`:\"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\"reference\":{let s=\"ids\"in t&&t.ids?t.ids:[],i=s.length>0?s.map(a=>`\"${a}\"`).join(\", \"):\"no id\";return{at:`drawing ${n}${r}`,says:`Not drawn: ${n||\"an element\"}${r} names ${i}, ${s.length===1?\"which is\":\"which are\"} no element of this view. It names elements the view draws itself, by their id (<h2 id=\"\\u2026\">), drawn once each is there.`}}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}`:\"\"})`:\"\"}.${o(t.css?.name)}`}}}function oi(t,e,n={}){let{limits:r}=e;if(t.messages>r.messages)return{ok:!1,reason:\"flood\",detail:`It sent ${t.messages} messages, more than the ${r.messages} a view may send in a second.`};let o=new Set(e.acts);for(let p of t.asked)if(!o.has(p.name))return{ok:!1,reason:\"act\",detail:`It asks for the act \"${p.name}\", which its manifest does not name.`};let s=ys(e.props),i=ni(t.renders,t.sheets,{maxNodes:r.maxNodes,...e.origin?{origin:e.origin}:{},...e.imageOrigins?{imageOrigins:e.imageOrigins}:{},...e.assets?{asset:p=>p}:{},...n.theme?{theme:n.theme}:{},link:p=>Es(p,{handed:s,...e.linkOrigins?{origins:e.linkOrigins}:{}})});if(i.over)return{ok:!1,reason:\"nodes\",detail:`It drew more than the ${r.maxNodes.toLocaleString(\"en-US\")} things a view may draw.`};let a=[...e.places,...(e.lists??[]).filter(p=>!e.places.some(E=>E.as===p)).map(p=>({as:p}))],l=e.placesUnsure===!0,c=Xs(i.root,{props:e.props,places:a,...l?{placesUnsure:!0}:{},...e.accepts?{accepts:e.accepts}:{}});for(let p of c.acts)if(!o.has(p))return{ok:!1,reason:\"act\",detail:`It binds a press to the act \"${p}\" (data-act), which its manifest does not name.`};let h=[...i.refused.map(p=>La(p,{...e.imageOrigins?{origins:e.imageOrigins}:{},assets:e.assets===!0,...e.linkOrigins?{linkOrigins:e.linkOrigins}:{}})),...c.problems];for(let p of t.went)\"record\"in p&&!(e.props.node?.id===p.record||(e.props.nodes??[]).some(E=>E.id===p.record)||Ft(a,p.record))&&h.push({at:\"navigate\",says:l?`It goes to ${Bt(p.record)}, which this seat was not shown and is none of the places this run was told of. A view goes to a record by its id, or to a place by its slug.${xe(a)}${yt}`:`It goes to ${Bt(p.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.${xe(a)}`}),\"place\"in p&&!Ft(a,p.place)&&h.push({at:\"navigate\",says:l?`It goes to the place ${Bt(p.place)}, which is none of the places this run was told of.${xe(a)}${yt}`:`It goes to the place ${Bt(p.place)}, which this app does not have.${xe(a)}`});return{ok:!0,parts:c.parts,problems:h,drawn:i,videos:c.videos}}var ro=\"graviewHeadless\",oo=\"graviewHeadlessView\";var ai=globalThis,$a=Promise.prototype.then,Ha=Promise.resolve(),ar=t=>void $a.call(Ha,t),ir=ai.performance,Jt=ir&&typeof ir.now==\"function\"?ir.now.bind(ir):Date.now,Ze=JSON.stringify,li=JSON.parse,Ua=Object.defineProperty,io=t=>(t instanceof Error?`${t.name}: ${t.message}`:String(t)).slice(0,500),Nt=t=>{try{return li(Ze(t??null))}catch{return null}},V={renders:[],asked:[],went:[],ms:0,logs:[],messages:0},Te,lr=(t,e)=>{Te??={reason:t,detail:e}},xt=t=>{V.logs.length<50&&V.logs.push(t.slice(0,500))},St={removed:[],stuck:[],sealed:!1},Tt=ms({send(t){V.messages+=1,t.type===\"render\"?V.renders.push(Nt(t.records)):t.type===\"style\"?V.sheets=(Nt(t.sheets)??[]).map(String):t.type===\"gestures\"?V.gestures=Nt(t.bound):t.type===\"navigate\"&&\"place\"in t?V.went.push({place:String(t.place),...t.where!==void 0?{where:Nt(t.where)}:{},...t.section!==void 0?{section:String(t.section)}:{}}):t.type===\"navigate\"&&\"to\"in t&&V.went.push({record:String(t.to),...t.where!==void 0?{where:Nt(t.where)}:{},...t.section!==void 0?{section:String(t.section)}:{}})},act(t,e){return V.messages+=1,V.asked.push({name:String(t),args:Nt(e)}),Promise.resolve({type:\"answer\",id:V.asked.length,ok:!1,reason:\"refused\",message:\"Nothing is applied in a headless run.\"})},navigate(t){V.messages+=1,V.went.push({record:String(t)})},microtask:ar,now:Jt,threw:t=>lr(\"error\",`It threw: ${io(t)}`),warn:xt,hardening:()=>St}),si=!1,so=!1;function Ga(t){if(so||typeof t!=\"function\"||(so=!0,Te))return;let e=Jt();try{t.call(void 0,Tt.view)}catch(n){lr(\"error\",`It threw: ${io(n)}`)}V.ms+=Jt()-e}async function ja(t){if(si)return Ze({ok:!1,reason:\"refused\",detail:\"A headless script runs one view, once: something called its entry before the host did.\"});si=!0;let e;try{e=li(String(t))}catch{return Ze({ok:!1,reason:\"isolate\",detail:\"The run was not handed its input as JSON.\"})}if(!so&&!Te)return Ze({ok:!1,reason:\"isolate\",detail:\"The script held no view.\"});let n=Jt();Te||Tt.hear({type:\"props\",props:e.props,push:1}),V.ms+=Jt()-n,V.ms>=e.limits.pushMs&&lr(\"slow\",`It took longer than ${e.limits.pushMs.toLocaleString(\"en-US\")} ms to draw what it was shown.`);for(let o=0;o<64&&!Te;o+=1)await new Promise(s=>ar(s));if(Te||(V.clicks=Tt.listened(\"click\").slice(0,2e3)),e.press&&typeof e.press.selector==\"string\"&&!Te){let o=Tt.find(e.press.selector);if(V.pressed={selector:e.press.selector.slice(0,200),...o!==void 0?{target:o}:{},asked:V.asked.length,went:V.went.length,renders:V.renders.length},o!==void 0){Tt.hear({type:\"dom-event\",target:o,event:\"click\"});for(let s=0;s<64&&!Te;s+=1)await new Promise(i=>ar(i))}}if(Te)return Ze({ok:!1,...Te,transcript:V});let r=oi(V,e);return r.ok?Ze({ok:!0,transcript:V,drawn:{parts:r.parts,problems:r.problems},hardening:{removed:St.removed.length,sealed:St.sealed}}):Ze({ok:!1,reason:r.reason,detail:r.detail,transcript:V})}var za=Object.freeze({log:(...t)=>xt(t.map(String).join(\" \")),info:(...t)=>xt(t.map(String).join(\" \")),debug:(...t)=>xt(t.map(String).join(\" \")),warn:(...t)=>xt(t.map(String).join(\" \")),error:(...t)=>xt(t.map(io).join(\" \"))}),Va=0,ii=()=>Va+=1,Fa=[[\"console\",za],[\"setTimeout\",ii],[\"setInterval\",ii],[\"clearTimeout\",()=>{}],[\"clearInterval\",()=>{}],[\"queueMicrotask\",ar],[\"graview\",Tt.view],[oo,Ga],[ro,t=>ja(t)]];for(let[t,e]of Fa)Ua(ai,t,{value:e,writable:!0,enumerable:!1,configurable:!0});St=Jo(globalThis,[\"graview\",oo,ro],{primitivesStay:!0});St.stuck.length>0&&lr(\"refused\",`This isolate could not be hardened: ${St.stuck.join(\", \")} would not go.`);})();\n";
8
8
  //# sourceMappingURL=runtime.generated.js.map