playwright-core 1.56.0-alpha-1756475278000 → 1.56.0-alpha-1756505518000

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.
@@ -1,4 +1,4 @@
1
- import{q as Wu}from"./defaultSettingsView-htM0IBWp.js";var vi={exports:{}},_u=vi.exports,ha;function It(){return ha||(ha=1,function(Et,zt){(function(C,De){Et.exports=De()})(_u,function(){var C=navigator.userAgent,De=navigator.platform,I=/gecko\/\d/i.test(C),K=/MSIE \d/.test(C),$=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(C),V=/Edge\/(\d+)/.exec(C),b=K||$||V,N=b&&(K?document.documentMode||6:+(V||$)[1]),_=!V&&/WebKit\//.test(C),ie=_&&/Qt\/\d+\.\d+/.test(C),O=!V&&/Chrome\/(\d+)/.exec(C),q=O&&+O[1],z=/Opera\//.test(C),X=/Apple Computer/.test(navigator.vendor),ke=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(C),we=/PhantomJS/.test(C),te=X&&(/Mobile\/\w+/.test(C)||navigator.maxTouchPoints>2),re=/Android/.test(C),ne=te||re||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(C),se=te||/Mac/.test(De),Ae=/\bCrOS\b/.test(C),ye=/win/i.test(De),de=z&&C.match(/Version\/(\d*\.\d*)/);de&&(de=Number(de[1])),de&&de>=15&&(z=!1,_=!0);var ze=se&&(ie||z&&(de==null||de<12.11)),fe=I||b&&N>=9;function H(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var Ee=function(e,t){var n=e.className,r=H(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function D(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function J(e,t){return D(e).appendChild(t)}function d(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function S(e,t,n,r){var i=d(e,t,n,r);return i.setAttribute("role","presentation"),i}var w;document.createRange?w=function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:w=function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch{return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};function m(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function y(e){var t=e.ownerDocument||e,n;try{n=e.activeElement}catch{n=t.body||null}for(;n&&n.shadowRoot&&n.shadowRoot.activeElement;)n=n.shadowRoot.activeElement;return n}function P(e,t){var n=e.className;H(t).test(n)||(e.className+=(n?" ":"")+t)}function le(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!H(n[r]).test(t)&&(t+=" "+n[r]);return t}var p=function(e){e.select()};te?p=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:b&&(p=function(e){try{e.select()}catch{}});function c(e){return e.display.wrapper.ownerDocument}function Y(e){return xe(e.display.wrapper)}function xe(e){return e.getRootNode?e.getRootNode():e.ownerDocument}function j(e){return c(e).defaultView}function ue(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function Te(e,t,n){t||(t={});for(var r in e)e.hasOwnProperty(r)&&(n!==!1||!t.hasOwnProperty(r))&&(t[r]=e[r]);return t}function Le(e,t,n,r,i){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var o=r||0,l=i||0;;){var a=e.indexOf(" ",o);if(a<0||a>=t)return l+(t-o);l+=a-o,l+=n-l%n,o=a+1}}var be=function(){this.id=null,this.f=null,this.time=0,this.handler=ue(this.onTimeout,this)};be.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},be.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};function oe(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}var Ne=50,qe={toString:function(){return"CodeMirror.Pass"}},Ve={scroll:!1},ct={origin:"*mouse"},Oe={origin:"+move"};function Re(e,t,n){for(var r=0,i=0;;){var o=e.indexOf(" ",r);o==-1&&(o=e.length);var l=o-r;if(o==e.length||i+l>=t)return r+Math.min(l,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}}var Ue=[""];function et(e){for(;Ue.length<=e;)Ue.push(ge(Ue)+" ");return Ue[e]}function ge(e){return e[e.length-1]}function Pe(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function T(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}function B(){}function F(e,t){var n;return Object.create?n=Object.create(e):(B.prototype=e,n=new B),t&&Te(t,n),n}var Ie=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ae(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||Ie.test(e))}function Se(e,t){return t?t.source.indexOf("\\w")>-1&&ae(e)?!0:t.test(e):ae(e)}function he(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Be=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Me(e){return e.charCodeAt(0)>=768&&Be.test(e)}function Lt(e,t,n){for(;(n<0?t>0:t<e.length)&&Me(e.charAt(t));)t+=n;return t}function Nt(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}function or(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var l=e[o];(l.from<n&&l.to>t||t==n&&l.to==t)&&(r(Math.max(l.from,t),Math.min(l.to,n),l.level==1?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}var br=null;function lr(e,t,n){var r;br=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&n=="before"?r=i:br=i),o.from==t&&(o.from!=o.to&&n!="before"?r=i:br=i)}return r??br}var mi=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(u){return u<=247?e.charAt(u):1424<=u&&u<=1524?"R":1536<=u&&u<=1785?t.charAt(u-1536):1774<=u&&u<=2220?"r":8192<=u&&u<=8203?"w":u==8204?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,l=/[Lb1n]/,a=/[1n]/;function s(u,h,v){this.level=u,this.from=h,this.to=v}return function(u,h){var v=h=="ltr"?"L":"R";if(u.length==0||h=="ltr"&&!r.test(u))return!1;for(var k=u.length,x=[],M=0;M<k;++M)x.push(n(u.charCodeAt(M)));for(var E=0,R=v;E<k;++E){var U=x[E];U=="m"?x[E]=R:R=U}for(var Q=0,G=v;Q<k;++Q){var ee=x[Q];ee=="1"&&G=="r"?x[Q]="n":o.test(ee)&&(G=ee,ee=="r"&&(x[Q]="R"))}for(var me=1,pe=x[0];me<k-1;++me){var Fe=x[me];Fe=="+"&&pe=="1"&&x[me+1]=="1"?x[me]="1":Fe==","&&pe==x[me+1]&&(pe=="1"||pe=="n")&&(x[me]=pe),pe=Fe}for(var Ke=0;Ke<k;++Ke){var st=x[Ke];if(st==",")x[Ke]="N";else if(st=="%"){var Xe=void 0;for(Xe=Ke+1;Xe<k&&x[Xe]=="%";++Xe);for(var Mt=Ke&&x[Ke-1]=="!"||Xe<k&&x[Xe]=="1"?"1":"N",wt=Ke;wt<Xe;++wt)x[wt]=Mt;Ke=Xe-1}}for(var tt=0,St=v;tt<k;++tt){var ft=x[tt];St=="L"&&ft=="1"?x[tt]="L":o.test(ft)&&(St=ft)}for(var nt=0;nt<k;++nt)if(i.test(x[nt])){var rt=void 0;for(rt=nt+1;rt<k&&i.test(x[rt]);++rt);for(var Qe=(nt?x[nt-1]:v)=="L",Tt=(rt<k?x[rt]:v)=="L",nn=Qe==Tt?Qe?"L":"R":v,xr=nt;xr<rt;++xr)x[xr]=nn;nt=rt-1}for(var gt=[],Jt,ut=0;ut<k;)if(l.test(x[ut])){var co=ut;for(++ut;ut<k&&l.test(x[ut]);++ut);gt.push(new s(0,co,ut))}else{var ir=ut,Ar=gt.length,Er=h=="rtl"?1:0;for(++ut;ut<k&&x[ut]!="L";++ut);for(var mt=ir;mt<ut;)if(a.test(x[mt])){ir<mt&&(gt.splice(Ar,0,new s(1,ir,mt)),Ar+=Er);var on=mt;for(++mt;mt<ut&&a.test(x[mt]);++mt);gt.splice(Ar,0,new s(2,on,mt)),Ar+=Er,ir=mt}else++mt;ir<ut&&gt.splice(Ar,0,new s(1,ir,ut))}return h=="ltr"&&(gt[0].level==1&&(Jt=u.match(/^\s+/))&&(gt[0].from=Jt[0].length,gt.unshift(new s(0,0,Jt[0].length))),ge(gt).level==1&&(Jt=u.match(/\s+$/))&&(ge(gt).to-=Jt[0].length,gt.push(new s(0,k-Jt[0].length,k)))),h=="rtl"?gt.reverse():gt}}();function We(e,t){var n=e.order;return n==null&&(n=e.order=mi(e.text,t)),n}var Bn=[],ve=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||Bn).concat(n)}};function Qt(e,t){return e._handlers&&e._handlers[t]||Bn}function dt(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var o=oe(i,n);o>-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function Ye(e,t){var n=Qt(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function Ze(e,t,n){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Ye(e,n||t.type,e,t),yt(t)||t.codemirrorIgnore}function Ot(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)oe(n,t[r])==-1&&n.push(t[r])}function Ct(e,t){return Qt(e,t).length>0}function Bt(e){e.prototype.on=function(t,n){ve(this,t,n)},e.prototype.off=function(t,n){dt(this,t,n)}}function ht(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Nr(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function yt(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function ar(e){ht(e),Nr(e)}function ln(e){return e.target||e.srcElement}function Wt(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),se&&e.ctrlKey&&t==1&&(t=3),t}var yi=function(){if(b&&N<9)return!1;var e=d("div");return"draggable"in e||"dragDrop"in e}(),Or;function Wn(e){if(Or==null){var t=d("span","​");J(e,d("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Or=t.offsetWidth<=1&&t.offsetHeight>2&&!(b&&N<8))}var n=Or?d("span","​"):d("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}var an;function sr(e){if(an!=null)return an;var t=J(e,document.createTextNode("AخA")),n=w(t,0,1).getBoundingClientRect(),r=w(t,1,2).getBoundingClientRect();return D(e),!n||n.left==n.right?!1:an=r.right-n.right<3}var Pt=`
1
+ import{q as Wu}from"./defaultSettingsView-XM8laJv9.js";var vi={exports:{}},_u=vi.exports,ha;function It(){return ha||(ha=1,function(Et,zt){(function(C,De){Et.exports=De()})(_u,function(){var C=navigator.userAgent,De=navigator.platform,I=/gecko\/\d/i.test(C),K=/MSIE \d/.test(C),$=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(C),V=/Edge\/(\d+)/.exec(C),b=K||$||V,N=b&&(K?document.documentMode||6:+(V||$)[1]),_=!V&&/WebKit\//.test(C),ie=_&&/Qt\/\d+\.\d+/.test(C),O=!V&&/Chrome\/(\d+)/.exec(C),q=O&&+O[1],z=/Opera\//.test(C),X=/Apple Computer/.test(navigator.vendor),ke=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(C),we=/PhantomJS/.test(C),te=X&&(/Mobile\/\w+/.test(C)||navigator.maxTouchPoints>2),re=/Android/.test(C),ne=te||re||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(C),se=te||/Mac/.test(De),Ae=/\bCrOS\b/.test(C),ye=/win/i.test(De),de=z&&C.match(/Version\/(\d*\.\d*)/);de&&(de=Number(de[1])),de&&de>=15&&(z=!1,_=!0);var ze=se&&(ie||z&&(de==null||de<12.11)),fe=I||b&&N>=9;function H(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var Ee=function(e,t){var n=e.className,r=H(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function D(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function J(e,t){return D(e).appendChild(t)}function d(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function S(e,t,n,r){var i=d(e,t,n,r);return i.setAttribute("role","presentation"),i}var w;document.createRange?w=function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:w=function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch{return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};function m(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function y(e){var t=e.ownerDocument||e,n;try{n=e.activeElement}catch{n=t.body||null}for(;n&&n.shadowRoot&&n.shadowRoot.activeElement;)n=n.shadowRoot.activeElement;return n}function P(e,t){var n=e.className;H(t).test(n)||(e.className+=(n?" ":"")+t)}function le(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!H(n[r]).test(t)&&(t+=" "+n[r]);return t}var p=function(e){e.select()};te?p=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:b&&(p=function(e){try{e.select()}catch{}});function c(e){return e.display.wrapper.ownerDocument}function Y(e){return xe(e.display.wrapper)}function xe(e){return e.getRootNode?e.getRootNode():e.ownerDocument}function j(e){return c(e).defaultView}function ue(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function Te(e,t,n){t||(t={});for(var r in e)e.hasOwnProperty(r)&&(n!==!1||!t.hasOwnProperty(r))&&(t[r]=e[r]);return t}function Le(e,t,n,r,i){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var o=r||0,l=i||0;;){var a=e.indexOf(" ",o);if(a<0||a>=t)return l+(t-o);l+=a-o,l+=n-l%n,o=a+1}}var be=function(){this.id=null,this.f=null,this.time=0,this.handler=ue(this.onTimeout,this)};be.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},be.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};function oe(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}var Ne=50,qe={toString:function(){return"CodeMirror.Pass"}},Ve={scroll:!1},ct={origin:"*mouse"},Oe={origin:"+move"};function Re(e,t,n){for(var r=0,i=0;;){var o=e.indexOf(" ",r);o==-1&&(o=e.length);var l=o-r;if(o==e.length||i+l>=t)return r+Math.min(l,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}}var Ue=[""];function et(e){for(;Ue.length<=e;)Ue.push(ge(Ue)+" ");return Ue[e]}function ge(e){return e[e.length-1]}function Pe(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function T(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}function B(){}function F(e,t){var n;return Object.create?n=Object.create(e):(B.prototype=e,n=new B),t&&Te(t,n),n}var Ie=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ae(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||Ie.test(e))}function Se(e,t){return t?t.source.indexOf("\\w")>-1&&ae(e)?!0:t.test(e):ae(e)}function he(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Be=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Me(e){return e.charCodeAt(0)>=768&&Be.test(e)}function Lt(e,t,n){for(;(n<0?t>0:t<e.length)&&Me(e.charAt(t));)t+=n;return t}function Nt(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}function or(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var l=e[o];(l.from<n&&l.to>t||t==n&&l.to==t)&&(r(Math.max(l.from,t),Math.min(l.to,n),l.level==1?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}var br=null;function lr(e,t,n){var r;br=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&n=="before"?r=i:br=i),o.from==t&&(o.from!=o.to&&n!="before"?r=i:br=i)}return r??br}var mi=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(u){return u<=247?e.charAt(u):1424<=u&&u<=1524?"R":1536<=u&&u<=1785?t.charAt(u-1536):1774<=u&&u<=2220?"r":8192<=u&&u<=8203?"w":u==8204?"b":"L"}var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,o=/[LRr]/,l=/[Lb1n]/,a=/[1n]/;function s(u,h,v){this.level=u,this.from=h,this.to=v}return function(u,h){var v=h=="ltr"?"L":"R";if(u.length==0||h=="ltr"&&!r.test(u))return!1;for(var k=u.length,x=[],M=0;M<k;++M)x.push(n(u.charCodeAt(M)));for(var E=0,R=v;E<k;++E){var U=x[E];U=="m"?x[E]=R:R=U}for(var Q=0,G=v;Q<k;++Q){var ee=x[Q];ee=="1"&&G=="r"?x[Q]="n":o.test(ee)&&(G=ee,ee=="r"&&(x[Q]="R"))}for(var me=1,pe=x[0];me<k-1;++me){var Fe=x[me];Fe=="+"&&pe=="1"&&x[me+1]=="1"?x[me]="1":Fe==","&&pe==x[me+1]&&(pe=="1"||pe=="n")&&(x[me]=pe),pe=Fe}for(var Ke=0;Ke<k;++Ke){var st=x[Ke];if(st==",")x[Ke]="N";else if(st=="%"){var Xe=void 0;for(Xe=Ke+1;Xe<k&&x[Xe]=="%";++Xe);for(var Mt=Ke&&x[Ke-1]=="!"||Xe<k&&x[Xe]=="1"?"1":"N",wt=Ke;wt<Xe;++wt)x[wt]=Mt;Ke=Xe-1}}for(var tt=0,St=v;tt<k;++tt){var ft=x[tt];St=="L"&&ft=="1"?x[tt]="L":o.test(ft)&&(St=ft)}for(var nt=0;nt<k;++nt)if(i.test(x[nt])){var rt=void 0;for(rt=nt+1;rt<k&&i.test(x[rt]);++rt);for(var Qe=(nt?x[nt-1]:v)=="L",Tt=(rt<k?x[rt]:v)=="L",nn=Qe==Tt?Qe?"L":"R":v,xr=nt;xr<rt;++xr)x[xr]=nn;nt=rt-1}for(var gt=[],Jt,ut=0;ut<k;)if(l.test(x[ut])){var co=ut;for(++ut;ut<k&&l.test(x[ut]);++ut);gt.push(new s(0,co,ut))}else{var ir=ut,Ar=gt.length,Er=h=="rtl"?1:0;for(++ut;ut<k&&x[ut]!="L";++ut);for(var mt=ir;mt<ut;)if(a.test(x[mt])){ir<mt&&(gt.splice(Ar,0,new s(1,ir,mt)),Ar+=Er);var on=mt;for(++mt;mt<ut&&a.test(x[mt]);++mt);gt.splice(Ar,0,new s(2,on,mt)),Ar+=Er,ir=mt}else++mt;ir<ut&&gt.splice(Ar,0,new s(1,ir,ut))}return h=="ltr"&&(gt[0].level==1&&(Jt=u.match(/^\s+/))&&(gt[0].from=Jt[0].length,gt.unshift(new s(0,0,Jt[0].length))),ge(gt).level==1&&(Jt=u.match(/\s+$/))&&(ge(gt).to-=Jt[0].length,gt.push(new s(0,k-Jt[0].length,k)))),h=="rtl"?gt.reverse():gt}}();function We(e,t){var n=e.order;return n==null&&(n=e.order=mi(e.text,t)),n}var Bn=[],ve=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||Bn).concat(n)}};function Qt(e,t){return e._handlers&&e._handlers[t]||Bn}function dt(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var o=oe(i,n);o>-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function Ye(e,t){var n=Qt(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function Ze(e,t,n){return typeof t=="string"&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),Ye(e,n||t.type,e,t),yt(t)||t.codemirrorIgnore}function Ot(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)oe(n,t[r])==-1&&n.push(t[r])}function Ct(e,t){return Qt(e,t).length>0}function Bt(e){e.prototype.on=function(t,n){ve(this,t,n)},e.prototype.off=function(t,n){dt(this,t,n)}}function ht(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Nr(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function yt(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function ar(e){ht(e),Nr(e)}function ln(e){return e.target||e.srcElement}function Wt(e){var t=e.which;return t==null&&(e.button&1?t=1:e.button&2?t=3:e.button&4&&(t=2)),se&&e.ctrlKey&&t==1&&(t=3),t}var yi=function(){if(b&&N<9)return!1;var e=d("div");return"draggable"in e||"dragDrop"in e}(),Or;function Wn(e){if(Or==null){var t=d("span","​");J(e,d("span",[t,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Or=t.offsetWidth<=1&&t.offsetHeight>2&&!(b&&N<8))}var n=Or?d("span","​"):d("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}var an;function sr(e){if(an!=null)return an;var t=J(e,document.createTextNode("AخA")),n=w(t,0,1).getBoundingClientRect(),r=w(t,1,2).getBoundingClientRect();return D(e),!n||n.left==n.right?!1:an=r.right-n.right<3}var Pt=`
2
2
 
3
3
  b`.split(/\n/).length!=3?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf(`
4
4
  `,t);i==-1&&(i=e.length);var o=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),l=o.indexOf("\r");l!=-1?(n.push(o.slice(0,l)),t+=l+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},ur=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch{}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},_n=function(){var e=d("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),_t=null;function xi(e){if(_t!=null)return _t;var t=J(e,d("span","x")),n=t.getBoundingClientRect(),r=w(t,0,1).getBoundingClientRect();return _t=Math.abs(n.left-r.left)>1}var Pr={},Ht={};function Rt(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Pr[e]=t}function kr(e,t){Ht[e]=t}function Ir(e){if(typeof e=="string"&&Ht.hasOwnProperty(e))e=Ht[e];else if(e&&typeof e.name=="string"&&Ht.hasOwnProperty(e.name)){var t=Ht[e.name];typeof t=="string"&&(t={name:t}),e=F(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ir("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ir("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function zr(e,t){t=Ir(t);var n=Pr[t.name];if(!n)return zr(e,"text/plain");var r=n(e,t);if(fr.hasOwnProperty(t.name)){var i=fr[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)r[l]=t.modeProps[l];return r}var fr={};function Br(e,t){var n=fr.hasOwnProperty(e)?fr[e]:fr[e]={};Te(t,n)}function Gt(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function sn(e,t){for(var n;e.innerMode&&(n=e.innerMode(t),!(!n||n.mode==e));)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Wr(e,t,n){return e.startState?e.startState(t,n):!0}var Je=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};Je.prototype.eol=function(){return this.pos>=this.string.length},Je.prototype.sol=function(){return this.pos==this.lineStart},Je.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Je.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Je.prototype.eat=function(e){var t=this.string.charAt(this.pos),n;if(typeof e=="string"?n=t==e:n=t&&(e.test?e.test(t):e(t)),n)return++this.pos,t},Je.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Je.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Je.prototype.skipToEnd=function(){this.pos=this.string.length},Je.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Je.prototype.backUp=function(e){this.pos-=e},Je.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Le(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Le(this.string,this.lineStart,this.tabSize):0)},Je.prototype.indentation=function(){return Le(this.string,null,this.tabSize)-(this.lineStart?Le(this.string,this.lineStart,this.tabSize):0)},Je.prototype.match=function(e,t,n){if(typeof e=="string"){var r=function(l){return n?l.toLowerCase():l},i=this.string.substr(this.pos,e.length);if(r(i)==r(e))return t!==!1&&(this.pos+=e.length),!0}else{var o=this.string.slice(this.pos).match(e);return o&&o.index>0?null:(o&&t!==!1&&(this.pos+=o[0].length),o)}},Je.prototype.current=function(){return this.string.slice(this.start,this.pos)},Je.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Je.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Je.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function ce(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t<o){n=i;break}t-=o}return n.lines[t]}function Vt(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,function(o){var l=o.text;i==n.line&&(l=l.slice(0,n.ch)),i==t.line&&(l=l.slice(t.ch)),r.push(l),++i}),r}function un(e,t,n){var r=[];return e.iter(t,n,function(i){r.push(i.text)}),r}function Ft(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function f(e){if(e.parent==null)return null;for(var t=e.parent,n=oe(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function g(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],o=i.height;if(t<o){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var l=0;l<e.lines.length;++l){var a=e.lines[l],s=a.height;if(t<s)break;t-=s}return n+l}function A(e,t){return t>=e.first&&t<e.first+e.size}function W(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function L(e,t,n){if(n===void 0&&(n=null),!(this instanceof L))return new L(e,t,n);this.line=e,this.ch=t,this.sticky=n}function Z(e,t){return e.line-t.line||e.ch-t.ch}function _e(e,t){return e.sticky==t.sticky&&Z(e,t)==0}function it(e){return L(e.line,e.ch)}function xt(e,t){return Z(e,t)<0?t:e}function _r(e,t){return Z(e,t)<0?e:t}function po(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Ce(e,t){if(t.line<e.first)return L(e.first,0);var n=e.first+e.size-1;return t.line>n?L(n,ce(e,n).text.length):_a(t,ce(e,t.line).text.length)}function _a(e,t){var n=e.ch;return n==null||n>t?L(e.line,t):n<0?L(e.line,0):e}function go(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=Ce(e,t[r]);return n}var Hn=function(e,t){this.state=e,this.lookAhead=t},Xt=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};Xt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return t!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Xt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Xt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Xt.fromSaved=function(e,t,n){return t instanceof Hn?new Xt(e,Gt(e.mode,t.state),n,t.lookAhead):new Xt(e,Gt(e.mode,t),n)},Xt.prototype.save=function(e){var t=e!==!1?Gt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Hn(t,this.maxLookAhead):t};function vo(e,t,n,r){var i=[e.state.modeGen],o={};wo(e,t.text,e.doc.mode,n,function(u,h){return i.push(u,h)},o,r);for(var l=n.state,a=function(u){n.baseTokens=i;var h=e.state.overlays[u],v=1,k=0;n.state=!0,wo(e,t.text,h.mode,n,function(x,M){for(var E=v;k<x;){var R=i[v];R>x&&i.splice(v,1,x,i[v+1],R),v+=2,k=Math.min(x,R)}if(M)if(h.opaque)i.splice(E,v-E,x,"overlay "+M),v=E+2;else for(;E<v;E+=2){var U=i[E+1];i[E+1]=(U?U+" ":"")+"overlay "+M}},o),n.state=l,n.baseTokens=null,n.baseTokenPos=1},s=0;s<e.state.overlays.length;++s)a(s);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function mo(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=fn(e,f(t)),i=t.text.length>e.options.maxHighlightLength&&Gt(e.doc.mode,r.state),o=vo(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function fn(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new Xt(r,!0,t);var o=Ha(e,t,n),l=o>r.first&&ce(r,o-1).stateAfter,a=l?Xt.fromSaved(r,l,o):new Xt(r,Wr(r.mode),o);return r.iter(o,t,function(s){bi(e,s.text,a);var u=a.line;s.stateAfter=u==t-1||u%5==0||u>=i.viewFrom&&u<i.viewTo?a.save():null,a.nextLine()}),n&&(r.modeFrontier=a.line),a}function bi(e,t,n,r){var i=e.doc.mode,o=new Je(t,e.options.tabSize,n);for(o.start=o.pos=r||0,t==""&&yo(i,n.state);!o.eol();)ki(i,o,n.state),o.start=o.pos}function yo(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=sn(e,t);if(n.mode.blankLine)return n.mode.blankLine(n.state)}}function ki(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=sn(e,n).mode);var o=e.token(t,n);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}var xo=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function bo(e,t,n,r){var i=e.doc,o=i.mode,l;t=Ce(i,t);var a=ce(i,t.line),s=fn(e,t.line,n),u=new Je(a.text,e.options.tabSize,s),h;for(r&&(h=[]);(r||u.pos<t.ch)&&!u.eol();)u.start=u.pos,l=ki(o,u,s.state),r&&h.push(new xo(u,l,Gt(i.mode,s.state)));return r?h:new xo(u,l,s.state)}function ko(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";t[r]==null?t[r]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+n[2])}return e}function wo(e,t,n,r,i,o,l){var a=n.flattenSpans;a==null&&(a=e.options.flattenSpans);var s=0,u=null,h=new Je(t,e.options.tabSize,r),v,k=e.options.addModeClass&&[null];for(t==""&&ko(yo(n,r.state),o);!h.eol();){if(h.pos>e.options.maxHighlightLength?(a=!1,l&&bi(e,t,r,h.pos),h.pos=t.length,v=null):v=ko(ki(n,h,r.state,k),o),k){var x=k[0].name;x&&(v="m-"+(v?x+" "+v:x))}if(!a||u!=v){for(;s<h.start;)s=Math.min(h.start,s+5e3),i(s,u);u=v}h.start=h.pos}for(;s<h.pos;){var M=Math.min(h.pos,s+5e3);i(M,u),s=M}}function Ha(e,t,n){for(var r,i,o=e.doc,l=n?-1:t-(e.doc.mode.innerMode?1e3:100),a=t;a>l;--a){if(a<=o.first)return o.first;var s=ce(o,a-1),u=s.stateAfter;if(u&&(!n||a+(u instanceof Hn?u.lookAhead:0)<=o.modeFrontier))return a;var h=Le(s.text,null,e.options.tabSize);(i==null||r>h)&&(i=a-1,r=h)}return i}function Ra(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;r>n;r--){var i=ce(e,r).stateAfter;if(i&&(!(i instanceof Hn)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}var So=!1,$t=!1;function qa(){So=!0}function ja(){$t=!0}function Rn(e,t,n){this.marker=e,this.from=t,this.to=n}function cn(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function Ka(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function Ua(e,t,n){var r=n&&window.WeakSet&&(n.markedSpans||(n.markedSpans=new WeakSet));r&&e.markedSpans&&r.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],r&&r.add(e.markedSpans)),t.marker.attachLine(e)}function Ga(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],l=o.marker,a=o.from==null||(l.inclusiveLeft?o.from<=t:o.from<t);if(a||o.from==t&&l.type=="bookmark"&&(!n||!o.marker.insertLeft)){var s=o.to==null||(l.inclusiveRight?o.to>=t:o.to>t);(r||(r=[])).push(new Rn(l,o.from,s?null:o.to))}}return r}function Xa(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],l=o.marker,a=o.to==null||(l.inclusiveRight?o.to>=t:o.to>t);if(a||o.from==t&&l.type=="bookmark"&&(!n||o.marker.insertLeft)){var s=o.from==null||(l.inclusiveLeft?o.from<=t:o.from<t);(r||(r=[])).push(new Rn(l,s?null:o.from-t,o.to==null?null:o.to-t))}}return r}function wi(e,t){if(t.full)return null;var n=A(e,t.from.line)&&ce(e,t.from.line).markedSpans,r=A(e,t.to.line)&&ce(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,l=Z(t.from,t.to)==0,a=Ga(n,i,l),s=Xa(r,o,l),u=t.text.length==1,h=ge(t.text).length+(u?i:0);if(a)for(var v=0;v<a.length;++v){var k=a[v];if(k.to==null){var x=cn(s,k.marker);x?u&&(k.to=x.to==null?null:x.to+h):k.to=i}}if(s)for(var M=0;M<s.length;++M){var E=s[M];if(E.to!=null&&(E.to+=h),E.from==null){var R=cn(a,E.marker);R||(E.from=h,u&&(a||(a=[])).push(E))}else E.from+=h,u&&(a||(a=[])).push(E)}a&&(a=To(a)),s&&s!=a&&(s=To(s));var U=[a];if(!u){var Q=t.text.length-2,G;if(Q>0&&a)for(var ee=0;ee<a.length;++ee)a[ee].to==null&&(G||(G=[])).push(new Rn(a[ee].marker,null,null));for(var me=0;me<Q;++me)U.push(G);U.push(s)}return U}function To(e){for(var t=0;t<e.length;++t){var n=e[t];n.from!=null&&n.from==n.to&&n.marker.clearWhenEmpty!==!1&&e.splice(t--,1)}return e.length?e:null}function Ya(e,t,n){var r=null;if(e.iter(t.line,n.line+1,function(x){if(x.markedSpans)for(var M=0;M<x.markedSpans.length;++M){var E=x.markedSpans[M].marker;E.readOnly&&(!r||oe(r,E)==-1)&&(r||(r=[])).push(E)}}),!r)return null;for(var i=[{from:t,to:n}],o=0;o<r.length;++o)for(var l=r[o],a=l.find(0),s=0;s<i.length;++s){var u=i[s];if(!(Z(u.to,a.from)<0||Z(u.from,a.to)>0)){var h=[s,1],v=Z(u.from,a.from),k=Z(u.to,a.to);(v<0||!l.inclusiveLeft&&!v)&&h.push({from:u.from,to:a.from}),(k>0||!l.inclusiveRight&&!k)&&h.push({from:a.to,to:u.to}),i.splice.apply(i,h),s+=h.length-3}}return i}function Lo(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Co(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function qn(e){return e.inclusiveLeft?-1:0}function jn(e){return e.inclusiveRight?1:0}function Si(e,t){var n=e.lines.length-t.lines.length;if(n!=0)return n;var r=e.find(),i=t.find(),o=Z(r.from,i.from)||qn(e)-qn(t);if(o)return-o;var l=Z(r.to,i.to)||jn(e)-jn(t);return l||t.id-e.id}function Do(e,t){var n=$t&&e.markedSpans,r;if(n)for(var i=void 0,o=0;o<n.length;++o)i=n[o],i.marker.collapsed&&(t?i.from:i.to)==null&&(!r||Si(r,i.marker)<0)&&(r=i.marker);return r}function Mo(e){return Do(e,!0)}function Kn(e){return Do(e,!1)}function Za(e,t){var n=$t&&e.markedSpans,r;if(n)for(var i=0;i<n.length;++i){var o=n[i];o.marker.collapsed&&(o.from==null||o.from<t)&&(o.to==null||o.to>t)&&(!r||Si(r,o.marker)<0)&&(r=o.marker)}return r}function Fo(e,t,n,r,i){var o=ce(e,t),l=$t&&o.markedSpans;if(l)for(var a=0;a<l.length;++a){var s=l[a];if(s.marker.collapsed){var u=s.marker.find(0),h=Z(u.from,n)||qn(s.marker)-qn(i),v=Z(u.to,r)||jn(s.marker)-jn(i);if(!(h>=0&&v<=0||h<=0&&v>=0)&&(h<=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?Z(u.to,n)>=0:Z(u.to,n)>0)||h>=0&&(s.marker.inclusiveRight&&i.inclusiveLeft?Z(u.from,r)<=0:Z(u.from,r)<0)))return!0}}}function qt(e){for(var t;t=Mo(e);)e=t.find(-1,!0).line;return e}function Ja(e){for(var t;t=Kn(e);)e=t.find(1,!0).line;return e}function Qa(e){for(var t,n;t=Kn(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function Ti(e,t){var n=ce(e,t),r=qt(n);return n==r?t:f(r)}function Ao(e,t){if(t>e.lastLine())return t;var n=ce(e,t),r;if(!cr(e,n))return t;for(;r=Kn(n);)n=r.find(1,!0).line;return f(n)+1}function cr(e,t){var n=$t&&t.markedSpans;if(n){for(var r=void 0,i=0;i<n.length;++i)if(r=n[i],!!r.marker.collapsed){if(r.from==null)return!0;if(!r.marker.widgetNode&&r.from==0&&r.marker.inclusiveLeft&&Li(e,t,r))return!0}}}function Li(e,t,n){if(n.to==null){var r=n.marker.find(1,!0);return Li(e,r.line,cn(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if(i=t.markedSpans[o],i.marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(i.to==null||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&Li(e,t,i))return!0}function er(e){e=qt(e);for(var t=0,n=e.parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var o=n.parent;o;n=o,o=n.parent)for(var l=0;l<o.children.length;++l){var a=o.children[l];if(a==n)break;t+=a.height}return t}function Un(e){if(e.height==0)return 0;for(var t=e.text.length,n,r=e;n=Mo(r);){var i=n.find(0,!0);r=i.from.line,t+=i.from.ch-i.to.ch}for(r=e;n=Kn(r);){var o=n.find(0,!0);t-=r.text.length-o.from.ch,r=o.to.line,t+=r.text.length-o.to.ch}return t}function Ci(e){var t=e.display,n=e.doc;t.maxLine=ce(n,n.first),t.maxLineLength=Un(t.maxLine),t.maxLineChanged=!0,n.iter(function(r){var i=Un(r);i>t.maxLineLength&&(t.maxLineLength=i,t.maxLine=r)})}var Hr=function(e,t,n){this.text=e,Co(this,t),this.height=n?n(this):1};Hr.prototype.lineNo=function(){return f(this)},Bt(Hr);function Va(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Lo(e),Co(e,n);var i=r?r(e):1;i!=e.height&&Ft(e,i)}function $a(e){e.parent=null,Lo(e)}var es={},ts={};function Eo(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?ts:es;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function No(e,t){var n=S("span",null,null,_?"padding-right: .1px":null),r={pre:S("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,l=void 0;r.pos=0,r.addToken=ns,sr(e.display.measure)&&(l=We(o,e.doc.direction))&&(r.addToken=os(r.addToken,l)),r.map=[];var a=t!=e.display.externalMeasured&&f(o);ls(o,r,mo(e,o,a)),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=le(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=le(o.styleClasses.textClass,r.textClass||""))),r.map.length==0&&r.map.push(0,0,r.content.appendChild(Wn(e.display.measure))),i==0?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(_){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return Ye(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=le(r.pre.className,r.textClass||"")),r}function rs(e){var t=d("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function ns(e,t,n,r,i,o,l){if(t){var a=e.splitSpaces?is(t,e.trailingSpace):t,s=e.cm.state.specialChars,u=!1,h;if(!s.test(t))e.col+=t.length,h=document.createTextNode(a),e.map.push(e.pos,e.pos+t.length,h),b&&N<9&&(u=!0),e.pos+=t.length;else{h=document.createDocumentFragment();for(var v=0;;){s.lastIndex=v;var k=s.exec(t),x=k?k.index-v:t.length-v;if(x){var M=document.createTextNode(a.slice(v,v+x));b&&N<9?h.appendChild(d("span",[M])):h.appendChild(M),e.map.push(e.pos,e.pos+x,M),e.col+=x,e.pos+=x}if(!k)break;v+=x+1;var E=void 0;if(k[0]==" "){var R=e.cm.options.tabSize,U=R-e.col%R;E=h.appendChild(d("span",et(U),"cm-tab")),E.setAttribute("role","presentation"),E.setAttribute("cm-text"," "),e.col+=U}else k[0]=="\r"||k[0]==`
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./codeMirrorModule-C2klu5YZ.js","../codeMirrorModule.C3UTv-Ge.css"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./codeMirrorModule-CgiWi6RU.js","../codeMirrorModule.C3UTv-Ge.css"])))=>i.map(i=>d[i]);
2
2
  var g0=Object.defineProperty;var y0=(t,e,n)=>e in t?g0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var be=(t,e,n)=>y0(t,typeof e!="symbol"?e+"":e,n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();function v0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var uu={exports:{}},bi={},fu={exports:{}},he={};/**
3
3
  * @license React
4
4
  * react.production.min.js
@@ -46,7 +46,7 @@ Error generating stack: `+m.message+`
46
46
  rgb(0 0 0 / 15%) 0px 6.1px 6.3px,
47
47
  rgb(0 0 0 / 10%) 0px -2px 4px,
48
48
  rgb(0 0 0 / 15%) 0px -6.1px 12px,
49
- rgb(0 0 0 / 25%) 0px 6px 12px`},RS=({diff:t,noTargetBlank:e,hideDetails:n})=>{const[r,o]=$.useState(t.diff?"diff":"actual"),[l,c]=$.useState(!1),[u,d]=$.useState(null),[h,g]=$.useState("Expected"),[y,v]=$.useState(null),[x,k]=$.useState(null),[S,E]=jr();$.useEffect(()=>{(async()=>{var j,oe,ae,M;d(await mu((j=t.expected)==null?void 0:j.attachment.path)),g(((oe=t.expected)==null?void 0:oe.title)||"Expected"),v(await mu((ae=t.actual)==null?void 0:ae.attachment.path)),k(await mu((M=t.diff)==null?void 0:M.attachment.path))})()},[t]);const C=u&&y&&x,A=C?Math.max(u.naturalWidth,y.naturalWidth,200):500,U=C?Math.max(u.naturalHeight,y.naturalHeight,200):500,R=Math.min(1,(S.width-30)/A),D=Math.min(1,(S.width-50)/A/2),z=A*R,q=U*R,B={flex:"none",margin:"0 10px",cursor:"pointer",userSelect:"none"};return w.jsx("div",{"data-testid":"test-result-image-mismatch",style:{display:"flex",flexDirection:"column",alignItems:"center",flex:"auto"},ref:E,children:C&&w.jsxs(w.Fragment,{children:[w.jsxs("div",{"data-testid":"test-result-image-mismatch-tabs",style:{display:"flex",margin:"10px 0 20px"},children:[t.diff&&w.jsx("div",{style:{...B,fontWeight:r==="diff"?600:"initial"},onClick:()=>o("diff"),children:"Diff"}),w.jsx("div",{style:{...B,fontWeight:r==="actual"?600:"initial"},onClick:()=>o("actual"),children:"Actual"}),w.jsx("div",{style:{...B,fontWeight:r==="expected"?600:"initial"},onClick:()=>o("expected"),children:h}),w.jsx("div",{style:{...B,fontWeight:r==="sxs"?600:"initial"},onClick:()=>o("sxs"),children:"Side by side"}),w.jsx("div",{style:{...B,fontWeight:r==="slider"?600:"initial"},onClick:()=>o("slider"),children:"Slider"})]}),w.jsxs("div",{style:{display:"flex",justifyContent:"center",flex:"auto",minHeight:q+60},children:[t.diff&&r==="diff"&&w.jsx(En,{image:x,alt:"Diff",hideSize:n,canvasWidth:z,canvasHeight:q,scale:R}),t.diff&&r==="actual"&&w.jsx(En,{image:y,alt:"Actual",hideSize:n,canvasWidth:z,canvasHeight:q,scale:R}),t.diff&&r==="expected"&&w.jsx(En,{image:u,alt:h,hideSize:n,canvasWidth:z,canvasHeight:q,scale:R}),t.diff&&r==="slider"&&w.jsx($S,{expectedImage:u,actualImage:y,hideSize:n,canvasWidth:z,canvasHeight:q,scale:R,expectedTitle:h}),t.diff&&r==="sxs"&&w.jsxs("div",{style:{display:"flex"},children:[w.jsx(En,{image:u,title:h,hideSize:n,canvasWidth:D*A,canvasHeight:D*U,scale:D}),w.jsx(En,{image:l?x:y,title:l?"Diff":"Actual",onClick:()=>c(!l),hideSize:n,canvasWidth:D*A,canvasHeight:D*U,scale:D})]}),!t.diff&&r==="actual"&&w.jsx(En,{image:y,title:"Actual",hideSize:n,canvasWidth:z,canvasHeight:q,scale:R}),!t.diff&&r==="expected"&&w.jsx(En,{image:u,title:h,hideSize:n,canvasWidth:z,canvasHeight:q,scale:R}),!t.diff&&r==="sxs"&&w.jsxs("div",{style:{display:"flex"},children:[w.jsx(En,{image:u,title:h,canvasWidth:D*A,canvasHeight:D*U,scale:D}),w.jsx(En,{image:y,title:"Actual",canvasWidth:D*A,canvasHeight:D*U,scale:D})]})]}),!n&&w.jsxs("div",{style:{alignSelf:"start",lineHeight:"18px",marginLeft:"15px"},children:[w.jsx("div",{children:t.diff&&w.jsx("a",{target:"_blank",href:t.diff.attachment.path,rel:"noreferrer",children:t.diff.attachment.name})}),w.jsx("div",{children:w.jsx("a",{target:e?"":"_blank",href:t.actual.attachment.path,rel:"noreferrer",children:t.actual.attachment.name})}),w.jsx("div",{children:w.jsx("a",{target:e?"":"_blank",href:t.expected.attachment.path,rel:"noreferrer",children:t.expected.attachment.name})})]})]})})},$S=({expectedImage:t,actualImage:e,canvasWidth:n,canvasHeight:r,scale:o,expectedTitle:l,hideSize:c})=>{const u={position:"absolute",top:0,left:0},[d,h]=$.useState(n/2),g=t.naturalWidth===e.naturalWidth&&t.naturalHeight===e.naturalHeight;return w.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column",userSelect:"none"},children:[!c&&w.jsxs("div",{style:{margin:5},children:[!g&&w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"Expected "}),w.jsx("span",{children:t.naturalWidth}),w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),w.jsx("span",{children:t.naturalHeight}),!g&&w.jsx("span",{style:{flex:"none",margin:"0 5px 0 15px"},children:"Actual "}),!g&&w.jsx("span",{children:e.naturalWidth}),!g&&w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),!g&&w.jsx("span",{children:e.naturalHeight})]}),w.jsxs("div",{style:{position:"relative",width:n,height:r,margin:15,...Ou},children:[w.jsx(pg,{orientation:"horizontal",offsets:[d],setOffsets:y=>h(y[0]),resizerColor:"#57606a80",resizerWidth:6}),w.jsx("img",{alt:l,style:{width:t.naturalWidth*o,height:t.naturalHeight*o},draggable:"false",src:t.src}),w.jsx("div",{style:{...u,bottom:0,overflow:"hidden",width:d,...Ou},children:w.jsx("img",{alt:"Actual",style:{width:e.naturalWidth*o,height:e.naturalHeight*o},draggable:"false",src:e.src})})]})]})},En=({image:t,title:e,alt:n,hideSize:r,canvasWidth:o,canvasHeight:l,scale:c,onClick:u})=>w.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column"},children:[!r&&w.jsxs("div",{style:{margin:5},children:[e&&w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:e}),w.jsx("span",{children:t.naturalWidth}),w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),w.jsx("span",{children:t.naturalHeight})]}),w.jsx("div",{style:{display:"flex",flex:"none",width:o,height:l,margin:15,...Ou},children:w.jsx("img",{width:t.naturalWidth*c,height:t.naturalHeight*c,alt:e||n,style:{cursor:u?"pointer":"initial"},draggable:"false",src:t.src,onClick:u})})]}),DS="modulepreload",BS=function(t,e){return new URL(t,e).href},Jp={},FS=function(e,n,r){let o=Promise.resolve();if(n&&n.length>0){let c=function(g){return Promise.all(g.map(y=>Promise.resolve(y).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};const u=document.getElementsByTagName("link"),d=document.querySelector("meta[property=csp-nonce]"),h=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));o=c(n.map(g=>{if(g=BS(g,r),g in Jp)return;Jp[g]=!0;const y=g.endsWith(".css"),v=y?'[rel="stylesheet"]':"";if(!!r)for(let S=u.length-1;S>=0;S--){const E=u[S];if(E.href===g&&(!y||E.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${g}"]${v}`))return;const k=document.createElement("link");if(k.rel=y?"stylesheet":DS,y||(k.as="script"),k.crossOrigin="",k.href=g,h&&k.setAttribute("nonce",h),document.head.appendChild(k),y)return new Promise((S,E)=>{k.addEventListener("load",S),k.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${g}`)))})}))}function l(c){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=c,window.dispatchEvent(u),!u.defaultPrevented)throw c}return o.then(c=>{for(const u of c||[])u.status==="rejected"&&l(u.reason);return e().catch(l)})},zS=20,Cs=({text:t,highlighter:e,mimeType:n,linkify:r,readOnly:o,highlight:l,revealLine:c,lineNumbers:u,isFocused:d,focusOnChange:h,wrapLines:g,onChange:y,dataTestId:v,placeholder:x})=>{const[k,S]=jr(),[E]=$.useState(FS(()=>import("./codeMirrorModule-C2klu5YZ.js"),__vite__mapDeps([0,1]),import.meta.url).then(R=>R.default)),C=$.useRef(null),[A,U]=$.useState();return $.useEffect(()=>{(async()=>{var B,j;const R=await E;HS(R);const D=S.current;if(!D)return;const z=VS(e)||qS(n)||(r?"text/linkified":"");if(C.current&&z===C.current.cm.getOption("mode")&&!!o===C.current.cm.getOption("readOnly")&&u===C.current.cm.getOption("lineNumbers")&&g===C.current.cm.getOption("lineWrapping")&&x===C.current.cm.getOption("placeholder"))return;(j=(B=C.current)==null?void 0:B.cm)==null||j.getWrapperElement().remove();const q=R(D,{value:"",mode:z,readOnly:!!o,lineNumbers:u,lineWrapping:g,placeholder:x});return C.current={cm:q},d&&q.focus(),U(q),q})()},[E,A,S,e,n,r,u,g,o,d,x]),$.useEffect(()=>{C.current&&C.current.cm.setSize(k.width,k.height)},[k]),$.useLayoutEffect(()=>{var z;if(!A)return;let R=!1;if(A.getValue()!==t&&(A.setValue(t),R=!0,h&&(A.execCommand("selectAll"),A.focus())),R||JSON.stringify(l)!==JSON.stringify(C.current.highlight)){for(const j of C.current.highlight||[])A.removeLineClass(j.line-1,"wrap");for(const j of l||[])A.addLineClass(j.line-1,"wrap",`source-line-${j.type}`);for(const j of C.current.widgets||[])A.removeLineWidget(j);for(const j of C.current.markers||[])j.clear();const q=[],B=[];for(const j of l||[]){if(j.type!=="subtle-error"&&j.type!=="error")continue;const oe=(z=C.current)==null?void 0:z.cm.getLine(j.line-1);if(oe){const ae={};ae.title=j.message||"",B.push(A.markText({line:j.line-1,ch:0},{line:j.line-1,ch:j.column||oe.length},{className:"source-line-error-underline",attributes:ae}))}if(j.type==="error"){const ae=document.createElement("div");ae.innerHTML=Wi(j.message||""),ae.className="source-line-error-widget",q.push(A.addLineWidget(j.line,ae,{above:!0,coverGutter:!1}))}}C.current.highlight=l,C.current.widgets=q,C.current.markers=B}typeof c=="number"&&C.current.cm.lineCount()>=c&&A.scrollIntoView({line:Math.max(0,c-1),ch:0},50);let D;return y&&(D=()=>y(A.getValue()),A.on("change",D)),()=>{D&&A.off("change",D)}},[A,t,l,c,h,y]),w.jsx("div",{"data-testid":v,className:"cm-wrapper",ref:S,onClick:US})};function US(t){var n;if(!(t.target instanceof HTMLElement))return;let e;t.target.classList.contains("cm-linkified")?e=t.target.textContent:t.target.classList.contains("cm-link")&&((n=t.target.nextElementSibling)!=null&&n.classList.contains("cm-url"))&&(e=t.target.nextElementSibling.textContent.slice(1,-1)),e&&(t.preventDefault(),t.stopPropagation(),window.open(e,"_blank"))}let Xp=!1;function HS(t){Xp||(Xp=!0,t.defineSimpleMode("text/linkified",{start:[{regex:$m,token:"linkified"}]}))}function qS(t){if(t){if(t.includes("javascript")||t.includes("json"))return"javascript";if(t.includes("python"))return"python";if(t.includes("csharp"))return"text/x-csharp";if(t.includes("java"))return"text/x-java";if(t.includes("markdown"))return"markdown";if(t.includes("html")||t.includes("svg"))return"htmlmixed";if(t.includes("css"))return"css"}}function VS(t){if(t)return{javascript:"javascript",jsonl:"javascript",python:"python",csharp:"text/x-csharp",java:"text/x-java",markdown:"markdown",html:"htmlmixed",css:"css",yaml:"yaml"}[t]}function WS(t){return!!t.match(/^(text\/.*?|application\/(json|(x-)?javascript|xml.*?|ecmascript|graphql|x-www-form-urlencoded)|image\/svg(\+xml)?|application\/.*?(\+json|\+xml))(;\s*charset=.*)?$/)}const KS=({title:t,children:e,setExpanded:n,expanded:r,expandOnTitleClick:o})=>{const l=$.useId();return w.jsxs("div",{className:ze("expandable",r&&"expanded"),children:[w.jsxs("div",{role:"button","aria-expanded":r,"aria-controls":l,className:"expandable-title",onClick:()=>o&&n(!r),children:[w.jsx("div",{className:ze("codicon",r?"codicon-chevron-down":"codicon-chevron-right"),style:{cursor:"pointer",color:"var(--vscode-foreground)",marginLeft:"5px"},onClick:()=>!o&&n(!r)}),t]}),r&&w.jsx("div",{id:l,role:"region",style:{marginLeft:25},children:e})]})};function mg(t){const e=[];let n=0,r;for(;(r=$m.exec(t))!==null;){const l=t.substring(n,r.index);l&&e.push(l);const c=r[0];e.push(GS(c)),n=r.index+c.length}const o=t.substring(n);return o&&e.push(o),e}function GS(t){let e=t;return e.startsWith("www.")&&(e="https://"+e),w.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:t})}const QS=({attachment:t,reveal:e})=>{const[n,r]=$.useState(!1),[o,l]=$.useState(null),[c,u]=$.useState(null),[d,h]=k0(),g=$.useRef(null),y=WS(t.contentType),v=!!t.sha1||!!t.path;$.useEffect(()=>{var S;if(e)return(S=g.current)==null||S.scrollIntoView({behavior:"smooth"}),h()},[e,h]),$.useEffect(()=>{n&&o===null&&c===null&&(u("Loading ..."),fetch(ia(t)).then(S=>S.text()).then(S=>{l(S),u(null)}).catch(S=>{u("Failed to load: "+S.message)}))},[n,o,c,t]);const x=$.useMemo(()=>{const S=o?o.split(`
49
+ rgb(0 0 0 / 25%) 0px 6px 12px`},RS=({diff:t,noTargetBlank:e,hideDetails:n})=>{const[r,o]=$.useState(t.diff?"diff":"actual"),[l,c]=$.useState(!1),[u,d]=$.useState(null),[h,g]=$.useState("Expected"),[y,v]=$.useState(null),[x,k]=$.useState(null),[S,E]=jr();$.useEffect(()=>{(async()=>{var j,oe,ae,M;d(await mu((j=t.expected)==null?void 0:j.attachment.path)),g(((oe=t.expected)==null?void 0:oe.title)||"Expected"),v(await mu((ae=t.actual)==null?void 0:ae.attachment.path)),k(await mu((M=t.diff)==null?void 0:M.attachment.path))})()},[t]);const C=u&&y&&x,A=C?Math.max(u.naturalWidth,y.naturalWidth,200):500,U=C?Math.max(u.naturalHeight,y.naturalHeight,200):500,R=Math.min(1,(S.width-30)/A),D=Math.min(1,(S.width-50)/A/2),z=A*R,q=U*R,B={flex:"none",margin:"0 10px",cursor:"pointer",userSelect:"none"};return w.jsx("div",{"data-testid":"test-result-image-mismatch",style:{display:"flex",flexDirection:"column",alignItems:"center",flex:"auto"},ref:E,children:C&&w.jsxs(w.Fragment,{children:[w.jsxs("div",{"data-testid":"test-result-image-mismatch-tabs",style:{display:"flex",margin:"10px 0 20px"},children:[t.diff&&w.jsx("div",{style:{...B,fontWeight:r==="diff"?600:"initial"},onClick:()=>o("diff"),children:"Diff"}),w.jsx("div",{style:{...B,fontWeight:r==="actual"?600:"initial"},onClick:()=>o("actual"),children:"Actual"}),w.jsx("div",{style:{...B,fontWeight:r==="expected"?600:"initial"},onClick:()=>o("expected"),children:h}),w.jsx("div",{style:{...B,fontWeight:r==="sxs"?600:"initial"},onClick:()=>o("sxs"),children:"Side by side"}),w.jsx("div",{style:{...B,fontWeight:r==="slider"?600:"initial"},onClick:()=>o("slider"),children:"Slider"})]}),w.jsxs("div",{style:{display:"flex",justifyContent:"center",flex:"auto",minHeight:q+60},children:[t.diff&&r==="diff"&&w.jsx(En,{image:x,alt:"Diff",hideSize:n,canvasWidth:z,canvasHeight:q,scale:R}),t.diff&&r==="actual"&&w.jsx(En,{image:y,alt:"Actual",hideSize:n,canvasWidth:z,canvasHeight:q,scale:R}),t.diff&&r==="expected"&&w.jsx(En,{image:u,alt:h,hideSize:n,canvasWidth:z,canvasHeight:q,scale:R}),t.diff&&r==="slider"&&w.jsx($S,{expectedImage:u,actualImage:y,hideSize:n,canvasWidth:z,canvasHeight:q,scale:R,expectedTitle:h}),t.diff&&r==="sxs"&&w.jsxs("div",{style:{display:"flex"},children:[w.jsx(En,{image:u,title:h,hideSize:n,canvasWidth:D*A,canvasHeight:D*U,scale:D}),w.jsx(En,{image:l?x:y,title:l?"Diff":"Actual",onClick:()=>c(!l),hideSize:n,canvasWidth:D*A,canvasHeight:D*U,scale:D})]}),!t.diff&&r==="actual"&&w.jsx(En,{image:y,title:"Actual",hideSize:n,canvasWidth:z,canvasHeight:q,scale:R}),!t.diff&&r==="expected"&&w.jsx(En,{image:u,title:h,hideSize:n,canvasWidth:z,canvasHeight:q,scale:R}),!t.diff&&r==="sxs"&&w.jsxs("div",{style:{display:"flex"},children:[w.jsx(En,{image:u,title:h,canvasWidth:D*A,canvasHeight:D*U,scale:D}),w.jsx(En,{image:y,title:"Actual",canvasWidth:D*A,canvasHeight:D*U,scale:D})]})]}),!n&&w.jsxs("div",{style:{alignSelf:"start",lineHeight:"18px",marginLeft:"15px"},children:[w.jsx("div",{children:t.diff&&w.jsx("a",{target:"_blank",href:t.diff.attachment.path,rel:"noreferrer",children:t.diff.attachment.name})}),w.jsx("div",{children:w.jsx("a",{target:e?"":"_blank",href:t.actual.attachment.path,rel:"noreferrer",children:t.actual.attachment.name})}),w.jsx("div",{children:w.jsx("a",{target:e?"":"_blank",href:t.expected.attachment.path,rel:"noreferrer",children:t.expected.attachment.name})})]})]})})},$S=({expectedImage:t,actualImage:e,canvasWidth:n,canvasHeight:r,scale:o,expectedTitle:l,hideSize:c})=>{const u={position:"absolute",top:0,left:0},[d,h]=$.useState(n/2),g=t.naturalWidth===e.naturalWidth&&t.naturalHeight===e.naturalHeight;return w.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column",userSelect:"none"},children:[!c&&w.jsxs("div",{style:{margin:5},children:[!g&&w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"Expected "}),w.jsx("span",{children:t.naturalWidth}),w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),w.jsx("span",{children:t.naturalHeight}),!g&&w.jsx("span",{style:{flex:"none",margin:"0 5px 0 15px"},children:"Actual "}),!g&&w.jsx("span",{children:e.naturalWidth}),!g&&w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),!g&&w.jsx("span",{children:e.naturalHeight})]}),w.jsxs("div",{style:{position:"relative",width:n,height:r,margin:15,...Ou},children:[w.jsx(pg,{orientation:"horizontal",offsets:[d],setOffsets:y=>h(y[0]),resizerColor:"#57606a80",resizerWidth:6}),w.jsx("img",{alt:l,style:{width:t.naturalWidth*o,height:t.naturalHeight*o},draggable:"false",src:t.src}),w.jsx("div",{style:{...u,bottom:0,overflow:"hidden",width:d,...Ou},children:w.jsx("img",{alt:"Actual",style:{width:e.naturalWidth*o,height:e.naturalHeight*o},draggable:"false",src:e.src})})]})]})},En=({image:t,title:e,alt:n,hideSize:r,canvasWidth:o,canvasHeight:l,scale:c,onClick:u})=>w.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column"},children:[!r&&w.jsxs("div",{style:{margin:5},children:[e&&w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:e}),w.jsx("span",{children:t.naturalWidth}),w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),w.jsx("span",{children:t.naturalHeight})]}),w.jsx("div",{style:{display:"flex",flex:"none",width:o,height:l,margin:15,...Ou},children:w.jsx("img",{width:t.naturalWidth*c,height:t.naturalHeight*c,alt:e||n,style:{cursor:u?"pointer":"initial"},draggable:"false",src:t.src,onClick:u})})]}),DS="modulepreload",BS=function(t,e){return new URL(t,e).href},Jp={},FS=function(e,n,r){let o=Promise.resolve();if(n&&n.length>0){let c=function(g){return Promise.all(g.map(y=>Promise.resolve(y).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};const u=document.getElementsByTagName("link"),d=document.querySelector("meta[property=csp-nonce]"),h=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));o=c(n.map(g=>{if(g=BS(g,r),g in Jp)return;Jp[g]=!0;const y=g.endsWith(".css"),v=y?'[rel="stylesheet"]':"";if(!!r)for(let S=u.length-1;S>=0;S--){const E=u[S];if(E.href===g&&(!y||E.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${g}"]${v}`))return;const k=document.createElement("link");if(k.rel=y?"stylesheet":DS,y||(k.as="script"),k.crossOrigin="",k.href=g,h&&k.setAttribute("nonce",h),document.head.appendChild(k),y)return new Promise((S,E)=>{k.addEventListener("load",S),k.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${g}`)))})}))}function l(c){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=c,window.dispatchEvent(u),!u.defaultPrevented)throw c}return o.then(c=>{for(const u of c||[])u.status==="rejected"&&l(u.reason);return e().catch(l)})},zS=20,Cs=({text:t,highlighter:e,mimeType:n,linkify:r,readOnly:o,highlight:l,revealLine:c,lineNumbers:u,isFocused:d,focusOnChange:h,wrapLines:g,onChange:y,dataTestId:v,placeholder:x})=>{const[k,S]=jr(),[E]=$.useState(FS(()=>import("./codeMirrorModule-CgiWi6RU.js"),__vite__mapDeps([0,1]),import.meta.url).then(R=>R.default)),C=$.useRef(null),[A,U]=$.useState();return $.useEffect(()=>{(async()=>{var B,j;const R=await E;HS(R);const D=S.current;if(!D)return;const z=VS(e)||qS(n)||(r?"text/linkified":"");if(C.current&&z===C.current.cm.getOption("mode")&&!!o===C.current.cm.getOption("readOnly")&&u===C.current.cm.getOption("lineNumbers")&&g===C.current.cm.getOption("lineWrapping")&&x===C.current.cm.getOption("placeholder"))return;(j=(B=C.current)==null?void 0:B.cm)==null||j.getWrapperElement().remove();const q=R(D,{value:"",mode:z,readOnly:!!o,lineNumbers:u,lineWrapping:g,placeholder:x});return C.current={cm:q},d&&q.focus(),U(q),q})()},[E,A,S,e,n,r,u,g,o,d,x]),$.useEffect(()=>{C.current&&C.current.cm.setSize(k.width,k.height)},[k]),$.useLayoutEffect(()=>{var z;if(!A)return;let R=!1;if(A.getValue()!==t&&(A.setValue(t),R=!0,h&&(A.execCommand("selectAll"),A.focus())),R||JSON.stringify(l)!==JSON.stringify(C.current.highlight)){for(const j of C.current.highlight||[])A.removeLineClass(j.line-1,"wrap");for(const j of l||[])A.addLineClass(j.line-1,"wrap",`source-line-${j.type}`);for(const j of C.current.widgets||[])A.removeLineWidget(j);for(const j of C.current.markers||[])j.clear();const q=[],B=[];for(const j of l||[]){if(j.type!=="subtle-error"&&j.type!=="error")continue;const oe=(z=C.current)==null?void 0:z.cm.getLine(j.line-1);if(oe){const ae={};ae.title=j.message||"",B.push(A.markText({line:j.line-1,ch:0},{line:j.line-1,ch:j.column||oe.length},{className:"source-line-error-underline",attributes:ae}))}if(j.type==="error"){const ae=document.createElement("div");ae.innerHTML=Wi(j.message||""),ae.className="source-line-error-widget",q.push(A.addLineWidget(j.line,ae,{above:!0,coverGutter:!1}))}}C.current.highlight=l,C.current.widgets=q,C.current.markers=B}typeof c=="number"&&C.current.cm.lineCount()>=c&&A.scrollIntoView({line:Math.max(0,c-1),ch:0},50);let D;return y&&(D=()=>y(A.getValue()),A.on("change",D)),()=>{D&&A.off("change",D)}},[A,t,l,c,h,y]),w.jsx("div",{"data-testid":v,className:"cm-wrapper",ref:S,onClick:US})};function US(t){var n;if(!(t.target instanceof HTMLElement))return;let e;t.target.classList.contains("cm-linkified")?e=t.target.textContent:t.target.classList.contains("cm-link")&&((n=t.target.nextElementSibling)!=null&&n.classList.contains("cm-url"))&&(e=t.target.nextElementSibling.textContent.slice(1,-1)),e&&(t.preventDefault(),t.stopPropagation(),window.open(e,"_blank"))}let Xp=!1;function HS(t){Xp||(Xp=!0,t.defineSimpleMode("text/linkified",{start:[{regex:$m,token:"linkified"}]}))}function qS(t){if(t){if(t.includes("javascript")||t.includes("json"))return"javascript";if(t.includes("python"))return"python";if(t.includes("csharp"))return"text/x-csharp";if(t.includes("java"))return"text/x-java";if(t.includes("markdown"))return"markdown";if(t.includes("html")||t.includes("svg"))return"htmlmixed";if(t.includes("css"))return"css"}}function VS(t){if(t)return{javascript:"javascript",jsonl:"javascript",python:"python",csharp:"text/x-csharp",java:"text/x-java",markdown:"markdown",html:"htmlmixed",css:"css",yaml:"yaml"}[t]}function WS(t){return!!t.match(/^(text\/.*?|application\/(json|(x-)?javascript|xml.*?|ecmascript|graphql|x-www-form-urlencoded)|image\/svg(\+xml)?|application\/.*?(\+json|\+xml))(;\s*charset=.*)?$/)}const KS=({title:t,children:e,setExpanded:n,expanded:r,expandOnTitleClick:o})=>{const l=$.useId();return w.jsxs("div",{className:ze("expandable",r&&"expanded"),children:[w.jsxs("div",{role:"button","aria-expanded":r,"aria-controls":l,className:"expandable-title",onClick:()=>o&&n(!r),children:[w.jsx("div",{className:ze("codicon",r?"codicon-chevron-down":"codicon-chevron-right"),style:{cursor:"pointer",color:"var(--vscode-foreground)",marginLeft:"5px"},onClick:()=>!o&&n(!r)}),t]}),r&&w.jsx("div",{id:l,role:"region",style:{marginLeft:25},children:e})]})};function mg(t){const e=[];let n=0,r;for(;(r=$m.exec(t))!==null;){const l=t.substring(n,r.index);l&&e.push(l);const c=r[0];e.push(GS(c)),n=r.index+c.length}const o=t.substring(n);return o&&e.push(o),e}function GS(t){let e=t;return e.startsWith("www.")&&(e="https://"+e),w.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:t})}const QS=({attachment:t,reveal:e})=>{const[n,r]=$.useState(!1),[o,l]=$.useState(null),[c,u]=$.useState(null),[d,h]=k0(),g=$.useRef(null),y=WS(t.contentType),v=!!t.sha1||!!t.path;$.useEffect(()=>{var S;if(e)return(S=g.current)==null||S.scrollIntoView({behavior:"smooth"}),h()},[e,h]),$.useEffect(()=>{n&&o===null&&c===null&&(u("Loading ..."),fetch(ia(t)).then(S=>S.text()).then(S=>{l(S),u(null)}).catch(S=>{u("Failed to load: "+S.message)}))},[n,o,c,t]);const x=$.useMemo(()=>{const S=o?o.split(`
50
50
  `).length:0;return Math.min(Math.max(5,S),20)*zS},[o]),k=w.jsxs("span",{style:{marginLeft:5},ref:g,"aria-label":t.name,children:[w.jsx("span",{children:mg(t.name)}),v&&w.jsx("a",{style:{marginLeft:5},href:Ml(t),children:"download"})]});return!y||!v?w.jsx("div",{style:{marginLeft:20},children:k}):w.jsxs("div",{className:ze(d&&"yellow-flash"),children:[w.jsx(KS,{title:k,expanded:n,setExpanded:r,expandOnTitleClick:!0,children:c&&w.jsx("i",{children:c})}),n&&o!==null&&w.jsx("div",{className:"vbox",style:{height:x},children:w.jsx(Cs,{text:o,readOnly:!0,mimeType:t.contentType,linkify:!0,lineNumbers:!0,wrapLines:!1})})]})},JS=({model:t,revealedAttachment:e})=>{const{diffMap:n,screenshots:r,attachments:o}=$.useMemo(()=>{const l=new Set((t==null?void 0:t.visibleAttachments)??[]),c=new Set,u=new Map;for(const d of l){if(!d.path&&!d.sha1)continue;const h=d.name.match(/^(.*)-(expected|actual|diff)\.png$/);if(h){const g=h[1],y=h[2],v=u.get(g)||{expected:void 0,actual:void 0,diff:void 0};v[y]=d,u.set(g,v),l.delete(d)}else d.contentType.startsWith("image/")&&(c.add(d),l.delete(d))}return{diffMap:u,attachments:l,screenshots:c}},[t]);return!n.size&&!r.size&&!o.size?w.jsx(Pr,{text:"No attachments"}):w.jsxs("div",{className:"attachments-tab",children:[[...n.values()].map(({expected:l,actual:c,diff:u})=>w.jsxs(w.Fragment,{children:[l&&c&&w.jsx("div",{className:"attachments-section",children:"Image diff"}),l&&c&&w.jsx(RS,{noTargetBlank:!0,diff:{name:"Image diff",expected:{attachment:{...l,path:Ml(l)},title:"Expected"},actual:{attachment:{...c,path:Ml(c)}},diff:u?{attachment:{...u,path:Ml(u)}}:void 0}})]})),r.size?w.jsx("div",{className:"attachments-section",children:"Screenshots"}):void 0,[...r.values()].map((l,c)=>{const u=ia(l);return w.jsxs("div",{className:"attachment-item",children:[w.jsx("div",{children:w.jsx("img",{draggable:"false",src:u})}),w.jsx("div",{children:w.jsx("a",{target:"_blank",href:u,rel:"noreferrer",children:l.name})})]},`screenshot-${c}`)}),o.size?w.jsx("div",{className:"attachments-section",children:"Attachments"}):void 0,[...o.values()].map((l,c)=>w.jsx("div",{className:"attachment-item",children:w.jsx(QS,{attachment:l,reveal:e&&XS(l,e[0])?e:void 0})},YS(l,c)))]})};function XS(t,e){return t.name===e.name&&t.path===e.path&&t.sha1===e.sha1}function ia(t,e={}){const n=new URLSearchParams(e);return t.sha1?(n.set("trace",t.traceUrl),"sha1/"+t.sha1+"?"+n.toString()):(n.set("path",t.path),"file?"+n.toString())}function Ml(t){const e={dn:t.name};return t.contentType&&(e.dct=t.contentType),ia(t,e)}function YS(t,e){return e+"-"+(t.sha1?"sha1-"+t.sha1:"path-"+t.path)}const ZS=`
51
51
  # Instructions
52
52
 
@@ -101,7 +101,7 @@ ${o}}`}stringLiteral(e){return JSON.stringify(e)}}class E1{generatePlaywrightReq
101
101
  `+" ".repeat(o.pos)+`^
102
102
  `;return r.push({message:l,range:[n.lineCounter.linePos(e.range[0]),n.lineCounter.linePos(e.range[0]+o.pos)]}),null}throw o}}constructor(e,n){this._input=e,this._pos=0,this._length=e.length,this._options=n}_peek(){return this._input[this._pos]||""}_next(){return this._pos<this._length?this._input[this._pos++]:null}_eof(){return this._pos>=this._length}_isWhitespace(){return!this._eof()&&/\s/.test(this._peek())}_skipWhitespace(){for(;this._isWhitespace();)this._pos++}_readIdentifier(e){this._eof()&&this._throwError(`Unexpected end of input when expecting ${e}`);const n=this._pos;for(;!this._eof()&&/[a-zA-Z]/.test(this._peek());)this._pos++;return this._input.slice(n,this._pos)}_readString(){let e="",n=!1;for(;!this._eof();){const r=this._next();if(n)e+=r,n=!1;else if(r==="\\")n=!0;else{if(r==='"')return e;e+=r}}this._throwError("Unterminated string")}_throwError(e,n=0){throw new Zp(e,n||this._pos)}_readRegex(){let e="",n=!1,r=!1;for(;!this._eof();){const o=this._next();if(n)e+=o,n=!1;else if(o==="\\")n=!0,e+=o;else{if(o==="/"&&!r)return{pattern:e};o==="["?(r=!0,e+=o):o==="]"&&r?(e+=o,r=!1):e+=o}}this._throwError("Unterminated regex")}_readStringOrRegex(){const e=this._peek();return e==='"'?(this._next(),xg(this._readString())):e==="/"?(this._next(),this._readRegex()):null}_readAttributes(e){let n=this._pos;for(;this._skipWhitespace(),this._peek()==="[";){this._next(),this._skipWhitespace(),n=this._pos;const r=this._readIdentifier("attribute");this._skipWhitespace();let o="";if(this._peek()==="=")for(this._next(),this._skipWhitespace(),n=this._pos;this._peek()!=="]"&&!this._isWhitespace()&&!this._eof();)o+=this._next();this._skipWhitespace(),this._peek()!=="]"&&this._throwError("Expected ]"),this._next(),this._applyAttribute(e,r,o||"true",n)}}_parse(){this._skipWhitespace();const e=this._readIdentifier("role");this._skipWhitespace();const n=this._readStringOrRegex()||"",r={kind:"role",role:e,name:n};return this._readAttributes(r),this._skipWhitespace(),this._eof()||this._throwError("Unexpected input"),r}_applyAttribute(e,n,r,o){if(n==="checked"){this._assert(r==="true"||r==="false"||r==="mixed",'Value of "checked" attribute must be a boolean or "mixed"',o),e.checked=r==="true"?!0:r==="false"?!1:"mixed";return}if(n==="disabled"){this._assert(r==="true"||r==="false",'Value of "disabled" attribute must be a boolean',o),e.disabled=r==="true";return}if(n==="expanded"){this._assert(r==="true"||r==="false",'Value of "expanded" attribute must be a boolean',o),e.expanded=r==="true";return}if(n==="active"){this._assert(r==="true"||r==="false",'Value of "active" attribute must be a boolean',o),e.active=r==="true";return}if(n==="level"){this._assert(!isNaN(Number(r)),'Value of "level" attribute must be a number',o),e.level=Number(r);return}if(n==="pressed"){this._assert(r==="true"||r==="false"||r==="mixed",'Value of "pressed" attribute must be a boolean or "mixed"',o),e.pressed=r==="true"?!0:r==="false"?!1:"mixed";return}if(n==="selected"){this._assert(r==="true"||r==="false",'Value of "selected" attribute must be a boolean',o),e.selected=r==="true";return}this._assert(!1,`Unsupported attribute [${n}]`,o)}_assert(e,n,r){e||this._throwError(n||"Assertion error",r)}}class Zp extends Error{constructor(e,n){super(e),this.pos=n}}let _g={};function Y1(t){_g=t}function oa(t,e){for(;e;){if(t.contains(e))return!0;e=kg(e)}return!1}function at(t){if(t.parentElement)return t.parentElement;if(t.parentNode&&t.parentNode.nodeType===11&&t.parentNode.host)return t.parentNode.host}function Eg(t){let e=t;for(;e.parentNode;)e=e.parentNode;if(e.nodeType===11||e.nodeType===9)return e}function kg(t){for(;t.parentElement;)t=t.parentElement;return at(t)}function Pi(t,e,n){for(;t;){const r=t.closest(e);if(n&&r!==n&&(r!=null&&r.contains(n)))return;if(r)return r;t=kg(t)}}function rr(t,e){return t.ownerDocument&&t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,e):void 0}function bg(t,e){if(e=e??rr(t),!e)return!0;if(Element.prototype.checkVisibility&&_g.browserNameForWorkarounds!=="webkit"){if(!t.checkVisibility())return!1}else{const n=t.closest("details,summary");if(n!==t&&(n==null?void 0:n.nodeName)==="DETAILS"&&!n.open)return!1}return e.visibility==="visible"}function Gl(t){const e=rr(t);if(!e)return{visible:!0,inline:!1};if(e.display==="contents"){for(let r=t.firstChild;r;r=r.nextSibling){if(r.nodeType===1&&Zn(r))return{visible:!0,inline:!1,style:e};if(r.nodeType===3&&Tg(r))return{visible:!0,inline:!0,style:e}}return{visible:!1,inline:!1,style:e}}if(!bg(t,e))return{style:e,visible:!1,inline:!1};const n=t.getBoundingClientRect();return{rect:n,style:e,visible:n.width>0&&n.height>0,inline:e.display==="inline"}}function Zn(t){return Gl(t).visible}function Tg(t){const e=t.ownerDocument.createRange();e.selectNode(t);const n=e.getBoundingClientRect();return n.width>0&&n.height>0}function Ye(t){return t instanceof HTMLFormElement?"FORM":t.tagName.toUpperCase()}function em(t){return t.hasAttribute("aria-label")||t.hasAttribute("aria-labelledby")}const tm="article:not([role]), aside:not([role]), main:not([role]), nav:not([role]), section:not([role]), [role=article], [role=complementary], [role=main], [role=navigation], [role=region]",Z1=[["aria-atomic",void 0],["aria-busy",void 0],["aria-controls",void 0],["aria-current",void 0],["aria-describedby",void 0],["aria-details",void 0],["aria-dropeffect",void 0],["aria-flowto",void 0],["aria-grabbed",void 0],["aria-hidden",void 0],["aria-keyshortcuts",void 0],["aria-label",["caption","code","deletion","emphasis","generic","insertion","paragraph","presentation","strong","subscript","superscript"]],["aria-labelledby",["caption","code","deletion","emphasis","generic","insertion","paragraph","presentation","strong","subscript","superscript"]],["aria-live",void 0],["aria-owns",void 0],["aria-relevant",void 0],["aria-roledescription",["generic"]]];function Cg(t,e){return Z1.some(([n,r])=>!(r!=null&&r.includes(e||""))&&t.hasAttribute(n))}function Ng(t){return!Number.isNaN(Number(String(t.getAttribute("tabindex"))))}function ex(t){return!Fg(t)&&(tx(t)||Ng(t))}function tx(t){const e=Ye(t);return["BUTTON","DETAILS","SELECT","TEXTAREA"].includes(e)?!0:e==="A"||e==="AREA"?t.hasAttribute("href"):e==="INPUT"?!t.hidden:!1}const yu={A:t=>t.hasAttribute("href")?"link":null,AREA:t=>t.hasAttribute("href")?"link":null,ARTICLE:()=>"article",ASIDE:()=>"complementary",BLOCKQUOTE:()=>"blockquote",BUTTON:()=>"button",CAPTION:()=>"caption",CODE:()=>"code",DATALIST:()=>"listbox",DD:()=>"definition",DEL:()=>"deletion",DETAILS:()=>"group",DFN:()=>"term",DIALOG:()=>"dialog",DT:()=>"term",EM:()=>"emphasis",FIELDSET:()=>"group",FIGURE:()=>"figure",FOOTER:t=>Pi(t,tm)?null:"contentinfo",FORM:t=>em(t)?"form":null,H1:()=>"heading",H2:()=>"heading",H3:()=>"heading",H4:()=>"heading",H5:()=>"heading",H6:()=>"heading",HEADER:t=>Pi(t,tm)?null:"banner",HR:()=>"separator",HTML:()=>"document",IMG:t=>t.getAttribute("alt")===""&&!t.getAttribute("title")&&!Cg(t)&&!Ng(t)?"presentation":"img",INPUT:t=>{const e=t.type.toLowerCase();if(e==="search")return t.hasAttribute("list")?"combobox":"searchbox";if(["email","tel","text","url",""].includes(e)){const n=Ms(t,t.getAttribute("list"))[0];return n&&Ye(n)==="DATALIST"?"combobox":"textbox"}return e==="hidden"?null:e==="file"?"button":yx[e]||"textbox"},INS:()=>"insertion",LI:()=>"listitem",MAIN:()=>"main",MARK:()=>"mark",MATH:()=>"math",MENU:()=>"list",METER:()=>"meter",NAV:()=>"navigation",OL:()=>"list",OPTGROUP:()=>"group",OPTION:()=>"option",OUTPUT:()=>"status",P:()=>"paragraph",PROGRESS:()=>"progressbar",SEARCH:()=>"search",SECTION:t=>em(t)?"region":null,SELECT:t=>t.hasAttribute("multiple")||t.size>1?"listbox":"combobox",STRONG:()=>"strong",SUB:()=>"subscript",SUP:()=>"superscript",SVG:()=>"img",TABLE:()=>"table",TBODY:()=>"rowgroup",TD:t=>{const e=Pi(t,"table"),n=e?Ql(e):"";return n==="grid"||n==="treegrid"?"gridcell":"cell"},TEXTAREA:()=>"textbox",TFOOT:()=>"rowgroup",TH:t=>{if(t.getAttribute("scope")==="col")return"columnheader";if(t.getAttribute("scope")==="row")return"rowheader";const e=Pi(t,"table"),n=e?Ql(e):"";return n==="grid"||n==="treegrid"?"gridcell":"cell"},THEAD:()=>"rowgroup",TIME:()=>"time",TR:()=>"row",UL:()=>"list"},nx={DD:["DL","DIV"],DIV:["DL"],DT:["DL","DIV"],LI:["OL","UL"],TBODY:["TABLE"],TD:["TR"],TFOOT:["TABLE"],TH:["TR"],THEAD:["TABLE"],TR:["THEAD","TBODY","TFOOT","TABLE"]};function nm(t){var r;const e=((r=yu[Ye(t)])==null?void 0:r.call(yu,t))||"";if(!e)return null;let n=t;for(;n;){const o=at(n),l=nx[Ye(n)];if(!l||!o||!l.includes(Ye(o)))break;const c=Ql(o);if((c==="none"||c==="presentation")&&!Ag(o,c))return c;n=o}return e}const rx=["alert","alertdialog","application","article","banner","blockquote","button","caption","cell","checkbox","code","columnheader","combobox","complementary","contentinfo","definition","deletion","dialog","directory","document","emphasis","feed","figure","form","generic","grid","gridcell","group","heading","img","insertion","link","list","listbox","listitem","log","main","mark","marquee","math","meter","menu","menubar","menuitem","menuitemcheckbox","menuitemradio","navigation","none","note","option","paragraph","presentation","progressbar","radio","radiogroup","region","row","rowgroup","rowheader","scrollbar","search","searchbox","separator","slider","spinbutton","status","strong","subscript","superscript","switch","tab","table","tablist","tabpanel","term","textbox","time","timer","toolbar","tooltip","tree","treegrid","treeitem"];function Ql(t){return(t.getAttribute("role")||"").split(" ").map(n=>n.trim()).find(n=>rx.includes(n))||null}function Ag(t,e){return Cg(t,e)||ex(t)}function rt(t){const e=Ql(t);if(!e)return nm(t);if(e==="none"||e==="presentation"){const n=nm(t);if(Ag(t,n))return n}return e}function Ig(t){return t===null?void 0:t.toLowerCase()==="true"}function Lg(t){return["STYLE","SCRIPT","NOSCRIPT","TEMPLATE"].includes(Ye(t))}function zt(t){if(Lg(t))return!0;const e=rr(t),n=t.nodeName==="SLOT";if((e==null?void 0:e.display)==="contents"&&!n){for(let o=t.firstChild;o;o=o.nextSibling)if(o.nodeType===1&&!zt(o)||o.nodeType===3&&Tg(o))return!1;return!0}return!(t.nodeName==="OPTION"&&!!t.closest("select"))&&!n&&!bg(t,e)?!0:Mg(t)}function Mg(t){let e=Xn==null?void 0:Xn.get(t);if(e===void 0){if(e=!1,t.parentElement&&t.parentElement.shadowRoot&&!t.assignedSlot&&(e=!0),!e){const n=rr(t);e=!n||n.display==="none"||Ig(t.getAttribute("aria-hidden"))===!0}if(!e){const n=at(t);n&&(e=Mg(n))}Xn==null||Xn.set(t,e)}return e}function Ms(t,e){if(!e)return[];const n=Eg(t);if(!n)return[];try{const r=e.split(" ").filter(l=>!!l),o=[];for(const l of r){const c=n.querySelector("#"+CSS.escape(l));c&&!o.includes(c)&&o.push(c)}return o}catch{return[]}}function kn(t){return t.trim()}function Bi(t){return t.split(" ").map(e=>e.replace(/\r\n/g,`
103
103
  `).replace(/[\u200b\u00ad]/g,"").replace(/\s\s*/g," ")).join(" ").trim()}function rm(t,e){const n=[...t.querySelectorAll(e)];for(const r of Ms(t,t.getAttribute("aria-owns")))r.matches(e)&&n.push(r),n.push(...r.querySelectorAll(e));return n}function Fi(t,e){const n=e==="::before"?yf:e==="::after"?vf:gf;if(n!=null&&n.has(t))return n==null?void 0:n.get(t);const r=rr(t,e);let o;return r&&r.display!=="none"&&r.visibility!=="hidden"&&(o=sx(t,r.content,!!e)),e&&o!==void 0&&((r==null?void 0:r.display)||"inline")!=="inline"&&(o=" "+o+" "),n&&n.set(t,o),o}function sx(t,e,n){if(!(!e||e==="none"||e==="normal"))try{let r=Um(e).filter(u=>!(u instanceof Hl));const o=r.findIndex(u=>u instanceof tt&&u.value==="/");if(o!==-1)r=r.slice(o+1);else if(!n)return;const l=[];let c=0;for(;c<r.length;)if(r[c]instanceof ef)l.push(r[c].value),c++;else if(c+2<r.length&&r[c]instanceof Di&&r[c].value==="attr"&&r[c+1]instanceof Zu&&r[c+2]instanceof Yu){const u=r[c+1].value;l.push(t.getAttribute(u)||""),c+=3}else return;return l.join("")}catch{}}function jg(t){const e=t.getAttribute("aria-labelledby");if(e===null)return null;const n=Ms(t,e);return n.length?n:null}function ix(t,e){const n=["button","cell","checkbox","columnheader","gridcell","heading","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","row","rowheader","switch","tab","tooltip","treeitem"].includes(t),r=e&&["","caption","code","contentinfo","definition","deletion","emphasis","insertion","list","listitem","mark","none","paragraph","presentation","region","row","rowgroup","section","strong","subscript","superscript","table","term","time"].includes(t);return n||r}function Ki(t,e){const n=e?hf:df;let r=n==null?void 0:n.get(t);return r===void 0&&(r="",["caption","code","definition","deletion","emphasis","generic","insertion","mark","paragraph","presentation","strong","subscript","suggestion","superscript","term","time"].includes(rt(t)||"")||(r=Bi(tn(t,{includeHidden:e,visitedElements:new Set,embeddedInTargetElement:"self"}))),n==null||n.set(t,r)),r}function sm(t,e){const n=e?mf:pf;let r=n==null?void 0:n.get(t);if(r===void 0){if(r="",t.hasAttribute("aria-describedby")){const o=Ms(t,t.getAttribute("aria-describedby"));r=Bi(o.map(l=>tn(l,{includeHidden:e,visitedElements:new Set,embeddedInDescribedBy:{element:l,hidden:zt(l)}})).join(" "))}else t.hasAttribute("aria-description")?r=Bi(t.getAttribute("aria-description")||""):r=Bi(t.getAttribute("title")||"");n==null||n.set(t,r)}return r}function ox(t){const e=t.getAttribute("aria-invalid");return!e||e.trim()===""||e.toLocaleLowerCase()==="false"?"false":e==="true"||e==="grammar"||e==="spelling"?e:"true"}function lx(t){if("validity"in t){const e=t.validity;return(e==null?void 0:e.valid)===!1}return!1}function ax(t){const e=vs;let n=vs==null?void 0:vs.get(t);if(n===void 0){n="";const r=ox(t)!=="false",o=lx(t);if(r||o){const l=t.getAttribute("aria-errormessage");n=Ms(t,l).map(d=>Bi(tn(d,{visitedElements:new Set,embeddedInDescribedBy:{element:d,hidden:zt(d)}}))).join(" ").trim()}e==null||e.set(t,n)}return n}function tn(t,e){var d,h,g,y;if(e.visitedElements.has(t))return"";const n={...e,embeddedInTargetElement:e.embeddedInTargetElement==="self"?"descendant":e.embeddedInTargetElement};if(!e.includeHidden){const v=!!((d=e.embeddedInLabelledBy)!=null&&d.hidden)||!!((h=e.embeddedInDescribedBy)!=null&&h.hidden)||!!((g=e.embeddedInNativeTextAlternative)!=null&&g.hidden)||!!((y=e.embeddedInLabel)!=null&&y.hidden);if(Lg(t)||!v&&zt(t))return e.visitedElements.add(t),""}const r=jg(t);if(!e.embeddedInLabelledBy){const v=(r||[]).map(x=>tn(x,{...e,embeddedInLabelledBy:{element:x,hidden:zt(x)},embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0,embeddedInLabel:void 0,embeddedInNativeTextAlternative:void 0})).join(" ");if(v)return v}const o=rt(t)||"",l=Ye(t);if(e.embeddedInLabel||e.embeddedInLabelledBy||e.embeddedInTargetElement==="descendant"){const v=[...t.labels||[]].includes(t),x=(r||[]).includes(t);if(!v&&!x){if(o==="textbox")return e.visitedElements.add(t),l==="INPUT"||l==="TEXTAREA"?t.value:t.textContent||"";if(["combobox","listbox"].includes(o)){e.visitedElements.add(t);let k;if(l==="SELECT")k=[...t.selectedOptions],!k.length&&t.options.length&&k.push(t.options[0]);else{const S=o==="combobox"?rm(t,"*").find(E=>rt(E)==="listbox"):t;k=S?rm(S,'[aria-selected="true"]').filter(E=>rt(E)==="option"):[]}return!k.length&&l==="INPUT"?t.value:k.map(S=>tn(S,n)).join(" ")}if(["progressbar","scrollbar","slider","spinbutton","meter"].includes(o))return e.visitedElements.add(t),t.hasAttribute("aria-valuetext")?t.getAttribute("aria-valuetext")||"":t.hasAttribute("aria-valuenow")?t.getAttribute("aria-valuenow")||"":t.getAttribute("value")||"";if(["menu"].includes(o))return e.visitedElements.add(t),""}}const c=t.getAttribute("aria-label")||"";if(kn(c))return e.visitedElements.add(t),c;if(!["presentation","none"].includes(o)){if(l==="INPUT"&&["button","submit","reset"].includes(t.type)){e.visitedElements.add(t);const v=t.value||"";return kn(v)?v:t.type==="submit"?"Submit":t.type==="reset"?"Reset":t.getAttribute("title")||""}if(l==="INPUT"&&t.type==="file"){e.visitedElements.add(t);const v=t.labels||[];return v.length&&!e.embeddedInLabelledBy?Ci(v,e):"Choose File"}if(l==="INPUT"&&t.type==="image"){e.visitedElements.add(t);const v=t.labels||[];if(v.length&&!e.embeddedInLabelledBy)return Ci(v,e);const x=t.getAttribute("alt")||"";if(kn(x))return x;const k=t.getAttribute("title")||"";return kn(k)?k:"Submit"}if(!r&&l==="BUTTON"){e.visitedElements.add(t);const v=t.labels||[];if(v.length)return Ci(v,e)}if(!r&&l==="OUTPUT"){e.visitedElements.add(t);const v=t.labels||[];return v.length?Ci(v,e):t.getAttribute("title")||""}if(!r&&(l==="TEXTAREA"||l==="SELECT"||l==="INPUT")){e.visitedElements.add(t);const v=t.labels||[];if(v.length)return Ci(v,e);const x=l==="INPUT"&&["text","password","search","tel","email","url"].includes(t.type)||l==="TEXTAREA",k=t.getAttribute("placeholder")||"",S=t.getAttribute("title")||"";return!x||S?S:k}if(!r&&l==="FIELDSET"){e.visitedElements.add(t);for(let x=t.firstElementChild;x;x=x.nextElementSibling)if(Ye(x)==="LEGEND")return tn(x,{...n,embeddedInNativeTextAlternative:{element:x,hidden:zt(x)}});return t.getAttribute("title")||""}if(!r&&l==="FIGURE"){e.visitedElements.add(t);for(let x=t.firstElementChild;x;x=x.nextElementSibling)if(Ye(x)==="FIGCAPTION")return tn(x,{...n,embeddedInNativeTextAlternative:{element:x,hidden:zt(x)}});return t.getAttribute("title")||""}if(l==="IMG"){e.visitedElements.add(t);const v=t.getAttribute("alt")||"";return kn(v)?v:t.getAttribute("title")||""}if(l==="TABLE"){e.visitedElements.add(t);for(let x=t.firstElementChild;x;x=x.nextElementSibling)if(Ye(x)==="CAPTION")return tn(x,{...n,embeddedInNativeTextAlternative:{element:x,hidden:zt(x)}});const v=t.getAttribute("summary")||"";if(v)return v}if(l==="AREA"){e.visitedElements.add(t);const v=t.getAttribute("alt")||"";return kn(v)?v:t.getAttribute("title")||""}if(l==="SVG"||t.ownerSVGElement){e.visitedElements.add(t);for(let v=t.firstElementChild;v;v=v.nextElementSibling)if(Ye(v)==="TITLE"&&v.ownerSVGElement)return tn(v,{...n,embeddedInLabelledBy:{element:v,hidden:zt(v)}})}if(t.ownerSVGElement&&l==="A"){const v=t.getAttribute("xlink:title")||"";if(kn(v))return e.visitedElements.add(t),v}}const u=l==="SUMMARY"&&!["presentation","none"].includes(o);if(ix(o,e.embeddedInTargetElement==="descendant")||u||e.embeddedInLabelledBy||e.embeddedInDescribedBy||e.embeddedInLabel||e.embeddedInNativeTextAlternative){e.visitedElements.add(t);const v=cx(t,n);if(e.embeddedInTargetElement==="self"?kn(v):v)return v}if(!["presentation","none"].includes(o)||l==="IFRAME"){e.visitedElements.add(t);const v=t.getAttribute("title")||"";if(kn(v))return v}return e.visitedElements.add(t),""}function cx(t,e){const n=[],r=(l,c)=>{var u;if(!(c&&l.assignedSlot))if(l.nodeType===1){const d=((u=rr(l))==null?void 0:u.display)||"inline";let h=tn(l,e);(d!=="inline"||l.nodeName==="BR")&&(h=" "+h+" "),n.push(h)}else l.nodeType===3&&n.push(l.textContent||"")};n.push(Fi(t,"::before")||"");const o=Fi(t);if(o!==void 0)n.push(o);else{const l=t.nodeName==="SLOT"?t.assignedNodes():[];if(l.length)for(const c of l)r(c,!1);else{for(let c=t.firstChild;c;c=c.nextSibling)r(c,!0);if(t.shadowRoot)for(let c=t.shadowRoot.firstChild;c;c=c.nextSibling)r(c,!0);for(const c of Ms(t,t.getAttribute("aria-owns")))r(c,!0)}}return n.push(Fi(t,"::after")||""),n.join("")}const of=["gridcell","option","row","tab","rowheader","columnheader","treeitem"];function Pg(t){return Ye(t)==="OPTION"?t.selected:of.includes(rt(t)||"")?Ig(t.getAttribute("aria-selected"))===!0:!1}const lf=["checkbox","menuitemcheckbox","option","radio","switch","menuitemradio","treeitem"];function Og(t){const e=af(t,!0);return e==="error"?!1:e}function ux(t){return af(t,!0)}function fx(t){return af(t,!1)}function af(t,e){const n=Ye(t);if(e&&n==="INPUT"&&t.indeterminate)return"mixed";if(n==="INPUT"&&["checkbox","radio"].includes(t.type))return t.checked;if(lf.includes(rt(t)||"")){const r=t.getAttribute("aria-checked");return r==="true"?!0:e&&r==="mixed"?"mixed":!1}return"error"}const dx=["checkbox","combobox","grid","gridcell","listbox","radiogroup","slider","spinbutton","textbox","columnheader","rowheader","searchbox","switch","treegrid"];function hx(t){const e=Ye(t);return["INPUT","TEXTAREA","SELECT"].includes(e)?t.hasAttribute("readonly"):dx.includes(rt(t)||"")?t.getAttribute("aria-readonly")==="true":t.isContentEditable?!1:"error"}const cf=["button"];function Rg(t){if(cf.includes(rt(t)||"")){const e=t.getAttribute("aria-pressed");if(e==="true")return!0;if(e==="mixed")return"mixed"}return!1}const uf=["application","button","checkbox","combobox","gridcell","link","listbox","menuitem","row","rowheader","tab","treeitem","columnheader","menuitemcheckbox","menuitemradio","rowheader","switch"];function $g(t){if(Ye(t)==="DETAILS")return t.open;if(uf.includes(rt(t)||"")){const e=t.getAttribute("aria-expanded");return e===null?void 0:e==="true"}}const ff=["heading","listitem","row","treeitem"];function Dg(t){const e={H1:1,H2:2,H3:3,H4:4,H5:5,H6:6}[Ye(t)];if(e)return e;if(ff.includes(rt(t)||"")){const n=t.getAttribute("aria-level"),r=n===null?Number.NaN:Number(n);if(Number.isInteger(r)&&r>=1)return r}return 0}const Bg=["application","button","composite","gridcell","group","input","link","menuitem","scrollbar","separator","tab","checkbox","columnheader","combobox","grid","listbox","menu","menubar","menuitemcheckbox","menuitemradio","option","radio","radiogroup","row","rowheader","searchbox","select","slider","spinbutton","switch","tablist","textbox","toolbar","tree","treegrid","treeitem"];function Jl(t){return Fg(t)||zg(t)}function Fg(t){return["BUTTON","INPUT","SELECT","TEXTAREA","OPTION","OPTGROUP"].includes(Ye(t))&&(t.hasAttribute("disabled")||px(t)||mx(t))}function px(t){return Ye(t)==="OPTION"&&!!t.closest("OPTGROUP[DISABLED]")}function mx(t){const e=t==null?void 0:t.closest("FIELDSET[DISABLED]");if(!e)return!1;const n=e.querySelector(":scope > LEGEND");return!n||!n.contains(t)}function zg(t,e=!1){if(!t)return!1;if(e||Bg.includes(rt(t)||"")){const n=(t.getAttribute("aria-disabled")||"").toLowerCase();return n==="true"?!0:n==="false"?!1:zg(at(t),!0)}return!1}function Ci(t,e){return[...t].map(n=>tn(n,{...e,embeddedInLabel:{element:n,hidden:zt(n)},embeddedInNativeTextAlternative:void 0,embeddedInLabelledBy:void 0,embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0})).filter(n=>!!n).join(" ")}function gx(t){const e=wf;let n=t,r;const o=[];for(;n;n=at(n)){const l=e.get(n);if(l!==void 0){r=l;break}o.push(n);const c=rr(n);if(!c){r=!0;break}const u=c.pointerEvents;if(u){r=u!=="none";break}}r===void 0&&(r=!0);for(const l of o)e.set(l,r);return r}let df,hf,pf,mf,vs,Xn,gf,yf,vf,wf,Ug=0;function Sf(){++Ug,df??(df=new Map),hf??(hf=new Map),pf??(pf=new Map),mf??(mf=new Map),vs??(vs=new Map),Xn??(Xn=new Map),gf??(gf=new Map),yf??(yf=new Map),vf??(vf=new Map),wf??(wf=new Map)}function xf(){--Ug||(df=void 0,hf=void 0,pf=void 0,mf=void 0,vs=void 0,Xn=void 0,gf=void 0,yf=void 0,vf=void 0,wf=void 0)}const yx={button:"button",checkbox:"checkbox",image:"button",number:"spinbutton",radio:"radio",range:"slider",reset:"button",submit:"button"};function vx(t){return Hg(t)?"'"+t.replace(/'/g,"''")+"'":t}function vu(t){return Hg(t)?'"'+t.replace(/[\\"\x00-\x1f\x7f-\x9f]/g,e=>{switch(e){case"\\":return"\\\\";case'"':return'\\"';case"\b":return"\\b";case"\f":return"\\f";case`
104
- `:return"\\n";case"\r":return"\\r";case" ":return"\\t";default:return"\\x"+e.charCodeAt(0).toString(16).padStart(2,"0")}})+'"':t}function Hg(t){return!!(t.length===0||/^\s|\s$/.test(t)||/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f-\x9f]/.test(t)||/^-/.test(t)||/[\n:](\s|$)/.test(t)||/\s#/.test(t)||/[\n\r]/.test(t)||/^[&*\],?!>|@"'#%]/.test(t)||/[{}`]/.test(t)||/^\[/.test(t)||!isNaN(Number(t))||["y","n","yes","no","true","false","on","off","null"].includes(t.toLowerCase()))}let wx=0;function qg(t){return t.mode==="ai"?{visibility:"visible",refs:"interactable",refPrefix:t.refPrefix,includeGenericRole:!0,renderActive:!0,renderCursorPointer:!0}:t.mode==="autoexpect"?{visibility:"ariaAndVisible",refs:"none"}:t.mode==="codegen"?{visibility:"aria",refs:"none",renderStringsAsRegex:!0}:{visibility:"aria",refs:"none"}}function zi(t,e){const n=qg(e),r=new Set,o={root:{role:"fragment",name:"",children:[],element:t,props:{},box:Gl(t),receivesPointerEvents:!0},elements:new Map,refs:new Map},l=(u,d,h)=>{if(r.has(d))return;if(r.add(d),d.nodeType===Node.TEXT_NODE&&d.nodeValue){if(!h)return;const S=d.nodeValue;u.role!=="textbox"&&S&&u.children.push(d.nodeValue||"");return}if(d.nodeType!==Node.ELEMENT_NODE)return;const g=d,y=!zt(g);let v=y;if(n.visibility==="visible"&&(v=Zn(g)),n.visibility==="ariaAndVisible"&&(v=y&&Zn(g)),n.visibility==="aria"&&!v)return;const x=[];if(g.hasAttribute("aria-owns")){const S=g.getAttribute("aria-owns").split(/\s+/);for(const E of S){const C=t.ownerDocument.getElementById(E);C&&x.push(C)}}const k=v?Sx(g,n):null;k&&(k.ref&&(o.elements.set(k.ref,g),o.refs.set(g,k.ref)),u.children.push(k)),c(k||u,g,x,v)};function c(u,d,h,g){var k;const v=(((k=rr(d))==null?void 0:k.display)||"inline")!=="inline"||d.nodeName==="BR"?" ":"";v&&u.children.push(v),u.children.push(Fi(d,"::before")||"");const x=d.nodeName==="SLOT"?d.assignedNodes():[];if(x.length)for(const S of x)l(u,S,g);else{for(let S=d.firstChild;S;S=S.nextSibling)S.assignedSlot||l(u,S,g);if(d.shadowRoot)for(let S=d.shadowRoot.firstChild;S;S=S.nextSibling)l(u,S,g)}for(const S of h)l(u,S,g);if(u.children.push(Fi(d,"::after")||""),v&&u.children.push(v),u.children.length===1&&u.name===u.children[0]&&(u.children=[]),u.role==="link"&&d.hasAttribute("href")){const S=d.getAttribute("href");u.props.url=S}if(u.role==="textbox"&&d.hasAttribute("placeholder")&&d.getAttribute("placeholder")!==u.name){const S=d.getAttribute("placeholder");u.props.placeholder=S}}Sf();try{l(o.root,t,!0)}finally{xf()}return _x(o.root),xx(o.root),o}function im(t,e){if(e.refs==="none"||e.refs==="interactable"&&(!t.box.visible||!t.receivesPointerEvents))return;let n;n=t.element._ariaRef,(!n||n.role!==t.role||n.name!==t.name)&&(n={role:t.role,name:t.name,ref:(e.refPrefix??"")+"e"+ ++wx},t.element._ariaRef=n),t.ref=n.ref}function Sx(t,e){const n=t.ownerDocument.activeElement===t;if(t.nodeName==="IFRAME"){const h={role:"iframe",name:"",children:[],props:{},element:t,box:Gl(t),receivesPointerEvents:!0,active:n};return im(h,e),h}const r=e.includeGenericRole?"generic":null,o=rt(t)??r;if(!o||o==="presentation"||o==="none")return null;const l=mt(Ki(t,!1)||""),c=gx(t),u=Gl(t);if(o==="generic"&&u.inline&&t.childNodes.length===1&&t.childNodes[0].nodeType===Node.TEXT_NODE)return null;const d={role:o,name:l,children:[],props:{},element:t,box:u,receivesPointerEvents:c,active:n};return im(d,e),lf.includes(o)&&(d.checked=Og(t)),Bg.includes(o)&&(d.disabled=Jl(t)),uf.includes(o)&&(d.expanded=$g(t)),ff.includes(o)&&(d.level=Dg(t)),cf.includes(o)&&(d.pressed=Rg(t)),of.includes(o)&&(d.selected=Pg(t)),(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)&&t.type!=="checkbox"&&t.type!=="radio"&&t.type!=="file"&&(d.children=[t.value]),d}function xx(t){const e=n=>{const r=[];for(const l of n.children||[]){if(typeof l=="string"){r.push(l);continue}const c=e(l);r.push(...c)}return n.role==="generic"&&r.length<=1&&r.every(l=>typeof l!="string"&&!!l.ref)?r:(n.children=r,[n])};e(t)}function _x(t){const e=(r,o)=>{if(!r.length)return;const l=mt(r.join(""));l&&o.push(l),r.length=0},n=r=>{const o=[],l=[];for(const c of r.children||[])typeof c=="string"?l.push(c):(e(l,o),n(c),o.push(c));e(l,o),r.children=o.length?o:[],r.children.length===1&&r.children[0]===r.name&&(r.children=[])};n(t)}function _f(t,e){return e?t?typeof e=="string"?t===e:!!t.match(new RegExp(e.pattern)):!1:!0}function Ex(t,e){return _f(t,e.text)}function kx(t,e){return _f(t,e.name)}function bx(t,e){const n=zi(t,{mode:"expect"});return{matches:Vg(n.root,e,!1,!1),received:{raw:Xl(n,{mode:"expect"}),regex:Xl(n,{mode:"codegen"})}}}function Tx(t,e){const n=zi(t,{mode:"expect"}).root;return Vg(n,e,!0,!1).map(o=>o.element)}function Ef(t,e,n){var r;return typeof t=="string"&&e.kind==="text"?Ex(t,e):t===null||typeof t!="object"||e.kind!=="role"||e.role!=="fragment"&&e.role!==t.role||e.checked!==void 0&&e.checked!==t.checked||e.disabled!==void 0&&e.disabled!==t.disabled||e.expanded!==void 0&&e.expanded!==t.expanded||e.level!==void 0&&e.level!==t.level||e.pressed!==void 0&&e.pressed!==t.pressed||e.selected!==void 0&&e.selected!==t.selected||!kx(t.name,e)||!_f(t.props.url,(r=e.props)==null?void 0:r.url)?!1:e.containerMode==="contain"?lm(t.children||[],e.children||[]):e.containerMode==="equal"?om(t.children||[],e.children||[],!1):e.containerMode==="deep-equal"||n?om(t.children||[],e.children||[],!0):lm(t.children||[],e.children||[])}function om(t,e,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(!Ef(t[r],e[r],n))return!1;return!0}function lm(t,e){if(e.length>t.length)return!1;const n=t.slice(),r=e.slice();for(const o of r){let l=n.shift();for(;l&&!Ef(l,o,!1);)l=n.shift();if(!l)return!1}return!0}function Vg(t,e,n,r){const o=[],l=(c,u)=>{if(Ef(c,e,r)){const d=typeof c=="string"?u:c;return d&&o.push(d),!n}if(typeof c=="string")return!1;for(const d of c.children||[])if(l(d,c))return!0;return!1};return l(t,null),o}function Xl(t,e){const n=qg(e),r=[],o=n.renderStringsAsRegex?Nx:()=>!0,l=n.renderStringsAsRegex?Cx:d=>d,c=(d,h,g,y)=>{if(typeof d=="string"){if(h&&!o(h,d))return;const E=vu(l(d));E&&r.push(g+"- text: "+E);return}let v=d.role;if(d.name&&d.name.length<=900){const E=l(d.name);if(E){const C=E.startsWith("/")&&E.endsWith("/")?E:JSON.stringify(E);v+=" "+C}}d.checked==="mixed"&&(v+=" [checked=mixed]"),d.checked===!0&&(v+=" [checked]"),d.disabled&&(v+=" [disabled]"),d.expanded&&(v+=" [expanded]"),d.active&&n.renderActive&&(v+=" [active]"),d.level&&(v+=` [level=${d.level}]`),d.pressed==="mixed"&&(v+=" [pressed=mixed]"),d.pressed===!0&&(v+=" [pressed]"),d.selected===!0&&(v+=" [selected]");let x=!1;d.ref&&(v+=` [ref=${d.ref}]`,y&&Ax(d)&&(x=!0,v+=" [cursor=pointer]"));const k=g+"- "+vx(v),S=!!Object.keys(d.props).length;if(!d.children.length&&!S)r.push(k);else if(d.children.length===1&&typeof d.children[0]=="string"&&!S){const E=o(d,d.children[0])?l(d.children[0]):null;E?r.push(k+": "+vu(E)):r.push(k)}else{r.push(k+":");for(const[E,C]of Object.entries(d.props))r.push(g+" - /"+E+": "+vu(C));for(const E of d.children||[])c(E,d,g+" ",y&&!x)}},u=t.root;if(u.role==="fragment")for(const d of u.children||[])c(d,u,"",!!n.renderCursorPointer);else c(u,null,"",!!n.renderCursorPointer);return r.join(`
104
+ `:return"\\n";case"\r":return"\\r";case" ":return"\\t";default:return"\\x"+e.charCodeAt(0).toString(16).padStart(2,"0")}})+'"':t}function Hg(t){return!!(t.length===0||/^\s|\s$/.test(t)||/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f-\x9f]/.test(t)||/^-/.test(t)||/[\n:](\s|$)/.test(t)||/\s#/.test(t)||/[\n\r]/.test(t)||/^[&*\],?!>|@"'#%]/.test(t)||/[{}`]/.test(t)||/^\[/.test(t)||!isNaN(Number(t))||["y","n","yes","no","true","false","on","off","null"].includes(t.toLowerCase()))}let wx=0;function qg(t){return t.mode==="ai"?{visibility:"ariaOrVisible",refs:"interactable",refPrefix:t.refPrefix,includeGenericRole:!0,renderActive:!0,renderCursorPointer:!0}:t.mode==="autoexpect"?{visibility:"ariaAndVisible",refs:"none"}:t.mode==="codegen"?{visibility:"aria",refs:"none",renderStringsAsRegex:!0}:{visibility:"aria",refs:"none"}}function zi(t,e){const n=qg(e),r=new Set,o={root:{role:"fragment",name:"",children:[],element:t,props:{},box:Gl(t),receivesPointerEvents:!0},elements:new Map,refs:new Map},l=(u,d,h)=>{if(r.has(d))return;if(r.add(d),d.nodeType===Node.TEXT_NODE&&d.nodeValue){if(!h)return;const S=d.nodeValue;u.role!=="textbox"&&S&&u.children.push(d.nodeValue||"");return}if(d.nodeType!==Node.ELEMENT_NODE)return;const g=d,y=!zt(g);let v=y;if(n.visibility==="ariaOrVisible"&&(v=y||Zn(g)),n.visibility==="ariaAndVisible"&&(v=y&&Zn(g)),n.visibility==="aria"&&!v)return;const x=[];if(g.hasAttribute("aria-owns")){const S=g.getAttribute("aria-owns").split(/\s+/);for(const E of S){const C=t.ownerDocument.getElementById(E);C&&x.push(C)}}const k=v?Sx(g,n):null;k&&(k.ref&&(o.elements.set(k.ref,g),o.refs.set(g,k.ref)),u.children.push(k)),c(k||u,g,x,v)};function c(u,d,h,g){var k;const v=(((k=rr(d))==null?void 0:k.display)||"inline")!=="inline"||d.nodeName==="BR"?" ":"";v&&u.children.push(v),u.children.push(Fi(d,"::before")||"");const x=d.nodeName==="SLOT"?d.assignedNodes():[];if(x.length)for(const S of x)l(u,S,g);else{for(let S=d.firstChild;S;S=S.nextSibling)S.assignedSlot||l(u,S,g);if(d.shadowRoot)for(let S=d.shadowRoot.firstChild;S;S=S.nextSibling)l(u,S,g)}for(const S of h)l(u,S,g);if(u.children.push(Fi(d,"::after")||""),v&&u.children.push(v),u.children.length===1&&u.name===u.children[0]&&(u.children=[]),u.role==="link"&&d.hasAttribute("href")){const S=d.getAttribute("href");u.props.url=S}if(u.role==="textbox"&&d.hasAttribute("placeholder")&&d.getAttribute("placeholder")!==u.name){const S=d.getAttribute("placeholder");u.props.placeholder=S}}Sf();try{l(o.root,t,!0)}finally{xf()}return _x(o.root),xx(o.root),o}function im(t,e){if(e.refs==="none"||e.refs==="interactable"&&(!t.box.visible||!t.receivesPointerEvents))return;let n;n=t.element._ariaRef,(!n||n.role!==t.role||n.name!==t.name)&&(n={role:t.role,name:t.name,ref:(e.refPrefix??"")+"e"+ ++wx},t.element._ariaRef=n),t.ref=n.ref}function Sx(t,e){const n=t.ownerDocument.activeElement===t;if(t.nodeName==="IFRAME"){const h={role:"iframe",name:"",children:[],props:{},element:t,box:Gl(t),receivesPointerEvents:!0,active:n};return im(h,e),h}const r=e.includeGenericRole?"generic":null,o=rt(t)??r;if(!o||o==="presentation"||o==="none")return null;const l=mt(Ki(t,!1)||""),c=gx(t),u=Gl(t);if(o==="generic"&&u.inline&&t.childNodes.length===1&&t.childNodes[0].nodeType===Node.TEXT_NODE)return null;const d={role:o,name:l,children:[],props:{},element:t,box:u,receivesPointerEvents:c,active:n};return im(d,e),lf.includes(o)&&(d.checked=Og(t)),Bg.includes(o)&&(d.disabled=Jl(t)),uf.includes(o)&&(d.expanded=$g(t)),ff.includes(o)&&(d.level=Dg(t)),cf.includes(o)&&(d.pressed=Rg(t)),of.includes(o)&&(d.selected=Pg(t)),(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)&&t.type!=="checkbox"&&t.type!=="radio"&&t.type!=="file"&&(d.children=[t.value]),d}function xx(t){const e=n=>{const r=[];for(const l of n.children||[]){if(typeof l=="string"){r.push(l);continue}const c=e(l);r.push(...c)}return n.role==="generic"&&r.length<=1&&r.every(l=>typeof l!="string"&&!!l.ref)?r:(n.children=r,[n])};e(t)}function _x(t){const e=(r,o)=>{if(!r.length)return;const l=mt(r.join(""));l&&o.push(l),r.length=0},n=r=>{const o=[],l=[];for(const c of r.children||[])typeof c=="string"?l.push(c):(e(l,o),n(c),o.push(c));e(l,o),r.children=o.length?o:[],r.children.length===1&&r.children[0]===r.name&&(r.children=[])};n(t)}function _f(t,e){return e?t?typeof e=="string"?t===e:!!t.match(new RegExp(e.pattern)):!1:!0}function Ex(t,e){return _f(t,e.text)}function kx(t,e){return _f(t,e.name)}function bx(t,e){const n=zi(t,{mode:"expect"});return{matches:Vg(n.root,e,!1,!1),received:{raw:Xl(n,{mode:"expect"}),regex:Xl(n,{mode:"codegen"})}}}function Tx(t,e){const n=zi(t,{mode:"expect"}).root;return Vg(n,e,!0,!1).map(o=>o.element)}function Ef(t,e,n){var r;return typeof t=="string"&&e.kind==="text"?Ex(t,e):t===null||typeof t!="object"||e.kind!=="role"||e.role!=="fragment"&&e.role!==t.role||e.checked!==void 0&&e.checked!==t.checked||e.disabled!==void 0&&e.disabled!==t.disabled||e.expanded!==void 0&&e.expanded!==t.expanded||e.level!==void 0&&e.level!==t.level||e.pressed!==void 0&&e.pressed!==t.pressed||e.selected!==void 0&&e.selected!==t.selected||!kx(t.name,e)||!_f(t.props.url,(r=e.props)==null?void 0:r.url)?!1:e.containerMode==="contain"?lm(t.children||[],e.children||[]):e.containerMode==="equal"?om(t.children||[],e.children||[],!1):e.containerMode==="deep-equal"||n?om(t.children||[],e.children||[],!0):lm(t.children||[],e.children||[])}function om(t,e,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;++r)if(!Ef(t[r],e[r],n))return!1;return!0}function lm(t,e){if(e.length>t.length)return!1;const n=t.slice(),r=e.slice();for(const o of r){let l=n.shift();for(;l&&!Ef(l,o,!1);)l=n.shift();if(!l)return!1}return!0}function Vg(t,e,n,r){const o=[],l=(c,u)=>{if(Ef(c,e,r)){const d=typeof c=="string"?u:c;return d&&o.push(d),!n}if(typeof c=="string")return!1;for(const d of c.children||[])if(l(d,c))return!0;return!1};return l(t,null),o}function Xl(t,e){const n=qg(e),r=[],o=n.renderStringsAsRegex?Nx:()=>!0,l=n.renderStringsAsRegex?Cx:d=>d,c=(d,h,g,y)=>{if(typeof d=="string"){if(h&&!o(h,d))return;const E=vu(l(d));E&&r.push(g+"- text: "+E);return}let v=d.role;if(d.name&&d.name.length<=900){const E=l(d.name);if(E){const C=E.startsWith("/")&&E.endsWith("/")?E:JSON.stringify(E);v+=" "+C}}d.checked==="mixed"&&(v+=" [checked=mixed]"),d.checked===!0&&(v+=" [checked]"),d.disabled&&(v+=" [disabled]"),d.expanded&&(v+=" [expanded]"),d.active&&n.renderActive&&(v+=" [active]"),d.level&&(v+=` [level=${d.level}]`),d.pressed==="mixed"&&(v+=" [pressed=mixed]"),d.pressed===!0&&(v+=" [pressed]"),d.selected===!0&&(v+=" [selected]");let x=!1;d.ref&&(v+=` [ref=${d.ref}]`,y&&Ax(d)&&(x=!0,v+=" [cursor=pointer]"));const k=g+"- "+vx(v),S=!!Object.keys(d.props).length;if(!d.children.length&&!S)r.push(k);else if(d.children.length===1&&typeof d.children[0]=="string"&&!S){const E=o(d,d.children[0])?l(d.children[0]):null;E?r.push(k+": "+vu(E)):r.push(k)}else{r.push(k+":");for(const[E,C]of Object.entries(d.props))r.push(g+" - /"+E+": "+vu(C));for(const E of d.children||[])c(E,d,g+" ",y&&!x)}},u=t.root;if(u.role==="fragment")for(const d of u.children||[])c(d,u,"",!!n.renderCursorPointer);else c(u,null,"",!!n.renderCursorPointer);return r.join(`
105
105
  `)}function Cx(t){const e=[{regex:/\b[\d,.]+[bkmBKM]+\b/,replacement:"[\\d,.]+[bkmBKM]+"},{regex:/\b\d+[hmsp]+\b/,replacement:"\\d+[hmsp]+"},{regex:/\b[\d,.]+[hmsp]+\b/,replacement:"[\\d,.]+[hmsp]+"},{regex:/\b\d+,\d+\b/,replacement:"\\d+,\\d+"},{regex:/\b\d+\.\d{2,}\b/,replacement:"\\d+\\.\\d+"},{regex:/\b\d{2,}\.\d+\b/,replacement:"\\d+\\.\\d+"},{regex:/\b\d{2,}\b/,replacement:"\\d+"}];let n="",r=0;const o=new RegExp(e.map(l=>"("+l.regex.source+")").join("|"),"g");return t.replace(o,(l,...c)=>{const u=c[c.length-2],d=c.slice(0,-2);n+=Vl(t.slice(r,u));for(let h=0;h<d.length;h++)if(d[h]){const{replacement:g}=e[h];n+=g;break}return r=u+l.length,l}),n?(n+=Vl(t.slice(r)),String(new RegExp(n))):t}function Nx(t,e){if(!e.length)return!1;if(!t.name)return!0;if(t.name.length>e.length)return!1;const n=e.length<=200&&t.name.length<=200?pS(e,t.name):"";let r=e;for(;n&&r.includes(n);)r=r.replace(n,"");return r.trim().length/e.length>.1}function Ax(t){var e;return((e=t.box.style)==null?void 0:e.cursor)==="pointer"}const am=":host{font-size:13px;font-family:system-ui,Ubuntu,Droid Sans,sans-serif;color:#333}svg{position:absolute;height:0}x-pw-tooltip{-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);background-color:#fff;border-radius:6px;box-shadow:0 .5rem 1.2rem #0000004d;display:none;font-size:12.8px;font-weight:400;left:0;line-height:1.5;max-width:600px;position:absolute;top:0;padding:0;flex-direction:column;overflow:hidden}x-pw-tooltip-line{display:flex;max-width:600px;padding:6px;-webkit-user-select:none;user-select:none;cursor:pointer}x-pw-tooltip-line.selectable:hover{background-color:#f2f2f2;overflow:hidden}x-pw-tooltip-footer{display:flex;max-width:600px;padding:6px;-webkit-user-select:none;user-select:none;color:#777}x-pw-dialog{background-color:#fff;pointer-events:auto;border-radius:6px;box-shadow:0 .5rem 1.2rem #0000004d;display:flex;flex-direction:column;position:absolute;width:400px;height:150px;z-index:10;font-size:13px}x-pw-dialog-body{display:flex;flex-direction:column;flex:auto}x-pw-dialog-body label{margin:5px 8px;display:flex;flex-direction:row;align-items:center}x-pw-highlight{position:absolute;top:0;left:0;width:0;height:0}x-pw-action-point{position:absolute;width:20px;height:20px;background:red;border-radius:10px;margin:-10px 0 0 -10px;z-index:2}x-pw-separator{height:1px;margin:6px 9px;background:#949494e5}x-pw-tool-gripper{height:28px;width:24px;margin:2px 0;cursor:grab}x-pw-tool-gripper:active{cursor:grabbing}x-pw-tool-gripper>x-div{width:16px;height:16px;margin:6px 4px;clip-path:url(#icon-gripper);background-color:#555}x-pw-tools-list>label{display:flex;align-items:center;margin:0 10px;-webkit-user-select:none;user-select:none}x-pw-tools-list{display:flex;width:100%;border-bottom:1px solid #dddddd}x-pw-tool-item{pointer-events:auto;height:28px;width:28px;border-radius:3px}x-pw-tool-item:not(.disabled){cursor:pointer}x-pw-tool-item:not(.disabled):hover{background-color:#dbdbdb}x-pw-tool-item.toggled{background-color:#8acae480}x-pw-tool-item.toggled:not(.disabled):hover{background-color:#8acae4c4}x-pw-tool-item>x-div{width:16px;height:16px;margin:6px;background-color:#3a3a3a}x-pw-tool-item.disabled>x-div{background-color:#61616180;cursor:default}x-pw-tool-item.record.toggled{background-color:transparent}x-pw-tool-item.record.toggled:not(.disabled):hover{background-color:#dbdbdb}x-pw-tool-item.record.toggled>x-div{background-color:#a1260d}x-pw-tool-item.record.disabled.toggled>x-div{opacity:.8}x-pw-tool-item.accept>x-div{background-color:#388a34}x-pw-tool-item.record>x-div{clip-path:url(#icon-circle-large-filled)}x-pw-tool-item.pick-locator>x-div{clip-path:url(#icon-inspect)}x-pw-tool-item.text>x-div{clip-path:url(#icon-whole-word)}x-pw-tool-item.visibility>x-div{clip-path:url(#icon-eye)}x-pw-tool-item.value>x-div{clip-path:url(#icon-symbol-constant)}x-pw-tool-item.snapshot>x-div{clip-path:url(#icon-gist)}x-pw-tool-item.accept>x-div{clip-path:url(#icon-check)}x-pw-tool-item.cancel>x-div{clip-path:url(#icon-close)}x-pw-tool-item.succeeded>x-div{clip-path:url(#icon-pass);background-color:#388a34!important}x-pw-overlay{position:absolute;top:0;max-width:min-content;z-index:2147483647;background:transparent;pointer-events:auto}x-pw-overlay x-pw-tools-list{background-color:#fffd;box-shadow:#0000001a 0 5px 5px;border-radius:3px;border-bottom:none}x-pw-overlay x-pw-tool-item{margin:2px}textarea.text-editor{font-family:system-ui,Ubuntu,Droid Sans,sans-serif;flex:auto;border:none;margin:6px 10px;color:#333;outline:1px solid transparent!important;resize:none;padding:0;font-size:13px}textarea.text-editor.does-not-match{outline:1px solid red!important}x-div{display:block}x-spacer{flex:auto}*{box-sizing:border-box}*[hidden]{display:none!important}x-locator-editor{flex:none;width:100%;height:60px;padding:4px;border-bottom:1px solid #dddddd;outline:1px solid transparent}x-locator-editor.does-not-match{outline:1px solid red}.CodeMirror{width:100%!important;height:100%!important}";class wu{constructor(e){this._renderedEntries=[],this._language="javascript",this._injectedScript=e;const n=e.document;this._isUnderTest=e.isUnderTest,this._glassPaneElement=n.createElement("x-pw-glass"),this._glassPaneElement.style.position="fixed",this._glassPaneElement.style.top="0",this._glassPaneElement.style.right="0",this._glassPaneElement.style.bottom="0",this._glassPaneElement.style.left="0",this._glassPaneElement.style.zIndex="2147483647",this._glassPaneElement.style.pointerEvents="none",this._glassPaneElement.style.display="flex",this._glassPaneElement.style.backgroundColor="transparent";for(const r of["click","auxclick","dragstart","input","keydown","keyup","pointerdown","pointerup","mousedown","mouseup","mouseleave","focus","scroll"])this._glassPaneElement.addEventListener(r,o=>{o.stopPropagation(),o.stopImmediatePropagation()});if(this._actionPointElement=n.createElement("x-pw-action-point"),this._actionPointElement.setAttribute("hidden","true"),this._glassPaneShadow=this._glassPaneElement.attachShadow({mode:this._isUnderTest?"open":"closed"}),typeof this._glassPaneShadow.adoptedStyleSheets.push=="function"){const r=new this._injectedScript.window.CSSStyleSheet;r.replaceSync(am),this._glassPaneShadow.adoptedStyleSheets.push(r)}else{const r=this._injectedScript.document.createElement("style");r.textContent=am,this._glassPaneShadow.appendChild(r)}this._glassPaneShadow.appendChild(this._actionPointElement)}install(){this._injectedScript.document.documentElement&&(!this._injectedScript.document.documentElement.contains(this._glassPaneElement)||this._glassPaneElement.nextElementSibling)&&this._injectedScript.document.documentElement.appendChild(this._glassPaneElement)}setLanguage(e){this._language=e}runHighlightOnRaf(e){this._rafRequest&&this._injectedScript.utils.builtins.cancelAnimationFrame(this._rafRequest);const n=this._injectedScript.querySelectorAll(e,this._injectedScript.document.documentElement),r=Lr(this._language,Tn(e)),o=n.length>1?"#f6b26b7f":"#6fa8dc7f";this.updateHighlight(n.map((l,c)=>{const u=n.length>1?` [${c+1} of ${n.length}]`:"";return{element:l,color:o,tooltipText:r+u}})),this._rafRequest=this._injectedScript.utils.builtins.requestAnimationFrame(()=>this.runHighlightOnRaf(e))}uninstall(){this._rafRequest&&this._injectedScript.utils.builtins.cancelAnimationFrame(this._rafRequest),this._glassPaneElement.remove()}showActionPoint(e,n){this._actionPointElement.style.top=n+"px",this._actionPointElement.style.left=e+"px",this._actionPointElement.hidden=!1}hideActionPoint(){this._actionPointElement.hidden=!0}clearHighlight(){var e,n;for(const r of this._renderedEntries)(e=r.highlightElement)==null||e.remove(),(n=r.tooltipElement)==null||n.remove();this._renderedEntries=[]}maskElements(e,n){this.updateHighlight(e.map(r=>({element:r,color:n})))}updateHighlight(e){if(!this._highlightIsUpToDate(e)){this.clearHighlight();for(const n of e){const r=this._createHighlightElement();this._glassPaneShadow.appendChild(r);let o;if(n.tooltipText){o=this._injectedScript.document.createElement("x-pw-tooltip"),this._glassPaneShadow.appendChild(o),o.style.top="0",o.style.left="0",o.style.display="flex";const l=this._injectedScript.document.createElement("x-pw-tooltip-line");l.textContent=n.tooltipText,o.appendChild(l)}this._renderedEntries.push({targetElement:n.element,color:n.color,tooltipElement:o,highlightElement:r})}for(const n of this._renderedEntries){if(n.box=n.targetElement.getBoundingClientRect(),!n.tooltipElement)continue;const{anchorLeft:r,anchorTop:o}=this.tooltipPosition(n.box,n.tooltipElement);n.tooltipTop=o,n.tooltipLeft=r}for(const n of this._renderedEntries){n.tooltipElement&&(n.tooltipElement.style.top=n.tooltipTop+"px",n.tooltipElement.style.left=n.tooltipLeft+"px");const r=n.box;n.highlightElement.style.backgroundColor=n.color,n.highlightElement.style.left=r.x+"px",n.highlightElement.style.top=r.y+"px",n.highlightElement.style.width=r.width+"px",n.highlightElement.style.height=r.height+"px",n.highlightElement.style.display="block",this._isUnderTest&&console.error("Highlight box for test: "+JSON.stringify({x:r.x,y:r.y,width:r.width,height:r.height}))}}}firstBox(){var e;return(e=this._renderedEntries[0])==null?void 0:e.box}tooltipPosition(e,n){const r=n.offsetWidth,o=n.offsetHeight,l=this._glassPaneElement.offsetWidth,c=this._glassPaneElement.offsetHeight;let u=e.left;u+r>l-5&&(u=l-r-5);let d=e.bottom+5;return d+o>c-5&&(e.top>o+5?d=e.top-o-5:d=c-5-o),{anchorLeft:u,anchorTop:d}}_highlightIsUpToDate(e){if(e.length!==this._renderedEntries.length)return!1;for(let n=0;n<this._renderedEntries.length;++n){if(e[n].element!==this._renderedEntries[n].targetElement||e[n].color!==this._renderedEntries[n].color)return!1;const r=this._renderedEntries[n].box;if(!r)return!1;const o=e[n].element.getBoundingClientRect();if(o.top!==r.top||o.right!==r.right||o.bottom!==r.bottom||o.left!==r.left)return!1}return!0}_createHighlightElement(){return this._injectedScript.document.createElement("x-pw-highlight")}appendChild(e){this._glassPaneShadow.appendChild(e)}}function Ix(t,e,n){const r=t.left-e.right;if(!(r<0||n!==void 0&&r>n))return r+Math.max(e.bottom-t.bottom,0)+Math.max(t.top-e.top,0)}function Lx(t,e,n){const r=e.left-t.right;if(!(r<0||n!==void 0&&r>n))return r+Math.max(e.bottom-t.bottom,0)+Math.max(t.top-e.top,0)}function Mx(t,e,n){const r=e.top-t.bottom;if(!(r<0||n!==void 0&&r>n))return r+Math.max(t.left-e.left,0)+Math.max(e.right-t.right,0)}function jx(t,e,n){const r=t.top-e.bottom;if(!(r<0||n!==void 0&&r>n))return r+Math.max(t.left-e.left,0)+Math.max(e.right-t.right,0)}function Px(t,e,n){const r=n===void 0?50:n;let o=0;return t.left-e.right>=0&&(o+=t.left-e.right),e.left-t.right>=0&&(o+=e.left-t.right),e.top-t.bottom>=0&&(o+=e.top-t.bottom),t.top-e.bottom>=0&&(o+=t.top-e.bottom),o>r?void 0:o}const Ox=["left-of","right-of","above","below","near"];function Wg(t,e,n,r){const o=e.getBoundingClientRect(),l={"left-of":Lx,"right-of":Ix,above:Mx,below:jx,near:Px}[t];let c;for(const u of n){if(u===e)continue;const d=l(o,u.getBoundingClientRect(),r);d!==void 0&&(c===void 0||d<c)&&(c=d)}return c}function Kg(t,e){for(const n of e.jsonPath)t!=null&&(t=t[n]);return Gg(t,e)}function Gg(t,e){const n=typeof t=="string"&&!e.caseSensitive?t.toUpperCase():t,r=typeof e.value=="string"&&!e.caseSensitive?e.value.toUpperCase():e.value;return e.op==="<truthy>"?!!n:e.op==="="?r instanceof RegExp?typeof n=="string"&&!!n.match(r):n===r:typeof n!="string"||typeof r!="string"?!1:e.op==="*="?n.includes(r):e.op==="^="?n.startsWith(r):e.op==="$="?n.endsWith(r):e.op==="|="?n===r||n.startsWith(r+"-"):e.op==="~="?n.split(" ").includes(r):!1}function kf(t){const e=t.ownerDocument;return t.nodeName==="SCRIPT"||t.nodeName==="NOSCRIPT"||t.nodeName==="STYLE"||e.head&&e.head.contains(t)}function Tt(t,e){let n=t.get(e);if(n===void 0){if(n={full:"",normalized:"",immediate:[]},!kf(e)){let r="";if(e instanceof HTMLInputElement&&(e.type==="submit"||e.type==="button"))n={full:e.value,normalized:mt(e.value),immediate:[e.value]};else{for(let o=e.firstChild;o;o=o.nextSibling)if(o.nodeType===Node.TEXT_NODE)n.full+=o.nodeValue||"",r+=o.nodeValue||"";else{if(o.nodeType===Node.COMMENT_NODE)continue;r&&n.immediate.push(r),r="",o.nodeType===Node.ELEMENT_NODE&&(n.full+=Tt(t,o).full)}r&&n.immediate.push(r),e.shadowRoot&&(n.full+=Tt(t,e.shadowRoot).full),n.full&&(n.normalized=mt(n.full))}}t.set(e,n)}return n}function la(t,e,n){if(kf(e)||!n(Tt(t,e)))return"none";for(let r=e.firstChild;r;r=r.nextSibling)if(r.nodeType===Node.ELEMENT_NODE&&n(Tt(t,r)))return"selfAndChildren";return e.shadowRoot&&n(Tt(t,e.shadowRoot))?"selfAndChildren":"self"}function Qg(t,e){const n=jg(e);if(n)return n.map(l=>Tt(t,l));const r=e.getAttribute("aria-label");if(r!==null&&r.trim())return[{full:r,normalized:mt(r),immediate:[r]}];const o=e.nodeName==="INPUT"&&e.type!=="hidden";if(["BUTTON","METER","OUTPUT","PROGRESS","SELECT","TEXTAREA"].includes(e.nodeName)||o){const l=e.labels;if(l)return[...l].map(c=>Tt(t,c))}return[]}function cm(t){return t.displayName||t.name||"Anonymous"}function Rx(t){if(t.type)switch(typeof t.type){case"function":return cm(t.type);case"string":return t.type;case"object":return t.type.displayName||(t.type.render?cm(t.type.render):"")}if(t._currentElement){const e=t._currentElement.type;if(typeof e=="string")return e;if(typeof e=="function")return e.displayName||e.name||"Anonymous"}return""}function $x(t){var e;return t.key??((e=t._currentElement)==null?void 0:e.key)}function Dx(t){if(t.child){const n=[];for(let r=t.child;r;r=r.sibling)n.push(r);return n}if(!t._currentElement)return[];const e=n=>{var o;const r=(o=n._currentElement)==null?void 0:o.type;return typeof r=="function"||typeof r=="string"};if(t._renderedComponent){const n=t._renderedComponent;return e(n)?[n]:[]}return t._renderedChildren?[...Object.values(t._renderedChildren)].filter(e):[]}function Bx(t){var r;const e=t.memoizedProps||((r=t._currentElement)==null?void 0:r.props);if(!e||typeof e=="string")return e;const n={...e};return delete n.children,n}function Jg(t){var r;const e={key:$x(t),name:Rx(t),children:Dx(t).map(Jg),rootElements:[],props:Bx(t)},n=t.stateNode||t._hostNode||((r=t._renderedComponent)==null?void 0:r._hostNode);if(n instanceof Element)e.rootElements.push(n);else for(const o of e.children)e.rootElements.push(...o.rootElements);return e}function Xg(t,e,n=[]){e(t)&&n.push(t);for(const r of t.children)Xg(r,e,n);return n}function Yg(t,e=[]){const r=(t.ownerDocument||t).createTreeWalker(t,NodeFilter.SHOW_ELEMENT);do{const o=r.currentNode,l=o,c=Object.keys(l).find(d=>d.startsWith("__reactContainer")&&l[d]!==null);if(c)e.push(l[c].stateNode.current);else{const d="_reactRootContainer";l.hasOwnProperty(d)&&l[d]!==null&&e.push(l[d]._internalRoot.current)}if(o instanceof Element&&o.hasAttribute("data-reactroot"))for(const d of Object.keys(o))(d.startsWith("__reactInternalInstance")||d.startsWith("__reactFiber"))&&e.push(o[d]);const u=o instanceof Element?o.shadowRoot:null;u&&Yg(u,e)}while(r.nextNode());return e}const Fx=()=>({queryAll(t,e){const{name:n,attributes:r}=Ir(e,!1),c=Yg(t.ownerDocument||t).map(d=>Jg(d)).map(d=>Xg(d,h=>{const g=h.props??{};if(h.key!==void 0&&(g.key=h.key),n&&h.name!==n||h.rootElements.some(y=>!oa(t,y)))return!1;for(const y of r)if(!Kg(g,y))return!1;return!0})).flat(),u=new Set;for(const d of c)for(const h of d.rootElements)u.add(h);return[...u]}}),Zg=["selected","checked","pressed","expanded","level","disabled","name","include-hidden"];Zg.sort();function Ni(t,e,n){if(!e.includes(n))throw new Error(`"${t}" attribute is only supported for roles: ${e.slice().sort().map(r=>`"${r}"`).join(", ")}`)}function us(t,e){if(t.op!=="<truthy>"&&!e.includes(t.value))throw new Error(`"${t.name}" must be one of ${e.map(n=>JSON.stringify(n)).join(", ")}`)}function fs(t,e){if(!e.includes(t.op))throw new Error(`"${t.name}" does not support "${t.op}" matcher`)}function zx(t,e){const n={role:e};for(const r of t)switch(r.name){case"checked":{Ni(r.name,lf,e),us(r,[!0,!1,"mixed"]),fs(r,["<truthy>","="]),n.checked=r.op==="<truthy>"?!0:r.value;break}case"pressed":{Ni(r.name,cf,e),us(r,[!0,!1,"mixed"]),fs(r,["<truthy>","="]),n.pressed=r.op==="<truthy>"?!0:r.value;break}case"selected":{Ni(r.name,of,e),us(r,[!0,!1]),fs(r,["<truthy>","="]),n.selected=r.op==="<truthy>"?!0:r.value;break}case"expanded":{Ni(r.name,uf,e),us(r,[!0,!1]),fs(r,["<truthy>","="]),n.expanded=r.op==="<truthy>"?!0:r.value;break}case"level":{if(Ni(r.name,ff,e),typeof r.value=="string"&&(r.value=+r.value),r.op!=="="||typeof r.value!="number"||Number.isNaN(r.value))throw new Error('"level" attribute must be compared to a number');n.level=r.value;break}case"disabled":{us(r,[!0,!1]),fs(r,["<truthy>","="]),n.disabled=r.op==="<truthy>"?!0:r.value;break}case"name":{if(r.op==="<truthy>")throw new Error('"name" attribute must have a value');if(typeof r.value!="string"&&!(r.value instanceof RegExp))throw new Error('"name" attribute must be a string or a regular expression');n.name=r.value,n.nameOp=r.op,n.exact=r.caseSensitive;break}case"include-hidden":{us(r,[!0,!1]),fs(r,["<truthy>","="]),n.includeHidden=r.op==="<truthy>"?!0:r.value;break}default:throw new Error(`Unknown attribute "${r.name}", must be one of ${Zg.map(o=>`"${o}"`).join(", ")}.`)}return n}function Ux(t,e,n){const r=[],o=c=>{if(rt(c)===e.role&&!(e.selected!==void 0&&Pg(c)!==e.selected)&&!(e.checked!==void 0&&Og(c)!==e.checked)&&!(e.pressed!==void 0&&Rg(c)!==e.pressed)&&!(e.expanded!==void 0&&$g(c)!==e.expanded)&&!(e.level!==void 0&&Dg(c)!==e.level)&&!(e.disabled!==void 0&&Jl(c)!==e.disabled)&&!(!e.includeHidden&&zt(c))){if(e.name!==void 0){const u=mt(Ki(c,!!e.includeHidden));if(typeof e.name=="string"&&(e.name=mt(e.name)),n&&!e.exact&&e.nameOp==="="&&(e.nameOp="*="),!Gg(u,{op:e.nameOp||"=",value:e.name,caseSensitive:!!e.exact}))return}r.push(c)}},l=c=>{const u=[];c.shadowRoot&&u.push(c.shadowRoot);for(const d of c.querySelectorAll("*"))o(d),d.shadowRoot&&u.push(d.shadowRoot);u.forEach(l)};return l(t),r}function um(t){return{queryAll:(e,n)=>{const r=Ir(n,!0),o=r.name.toLowerCase();if(!o)throw new Error("Role must not be empty");const l=zx(r.attributes,o);Sf();try{return Ux(e,l,t)}finally{xf()}}}}class Hx{constructor(){this._retainCacheCounter=0,this._cacheText=new Map,this._cacheQueryCSS=new Map,this._cacheMatches=new Map,this._cacheQuery=new Map,this._cacheMatchesSimple=new Map,this._cacheMatchesParents=new Map,this._cacheCallMatches=new Map,this._cacheCallQuery=new Map,this._cacheQuerySimple=new Map,this._engines=new Map,this._engines.set("not",Wx),this._engines.set("is",Oi),this._engines.set("where",Oi),this._engines.set("has",qx),this._engines.set("scope",Vx),this._engines.set("light",Kx),this._engines.set("visible",Gx),this._engines.set("text",Qx),this._engines.set("text-is",Jx),this._engines.set("text-matches",Xx),this._engines.set("has-text",Yx),this._engines.set("right-of",Ai("right-of")),this._engines.set("left-of",Ai("left-of")),this._engines.set("above",Ai("above")),this._engines.set("below",Ai("below")),this._engines.set("near",Ai("near")),this._engines.set("nth-match",Zx);const e=[...this._engines.keys()];e.sort();const n=[...og];if(n.sort(),e.join("|")!==n.join("|"))throw new Error(`Please keep customCSSNames in sync with evaluator engines: ${e.join("|")} vs ${n.join("|")}`)}begin(){++this._retainCacheCounter}end(){--this._retainCacheCounter,this._retainCacheCounter||(this._cacheQueryCSS.clear(),this._cacheMatches.clear(),this._cacheQuery.clear(),this._cacheMatchesSimple.clear(),this._cacheMatchesParents.clear(),this._cacheCallMatches.clear(),this._cacheCallQuery.clear(),this._cacheQuerySimple.clear(),this._cacheText.clear())}_cached(e,n,r,o){e.has(n)||e.set(n,[]);const l=e.get(n),c=l.find(d=>r.every((h,g)=>d.rest[g]===h));if(c)return c.result;const u=o();return l.push({rest:r,result:u}),u}_checkSelector(e){if(!(typeof e=="object"&&e&&(Array.isArray(e)||"simples"in e&&e.simples.length)))throw new Error(`Malformed selector "${e}"`);return e}matches(e,n,r){const o=this._checkSelector(n);this.begin();try{return this._cached(this._cacheMatches,e,[o,r.scope,r.pierceShadow,r.originalScope],()=>Array.isArray(o)?this._matchesEngine(Oi,e,o,r):(this._hasScopeClause(o)&&(r=this._expandContextForScopeMatching(r)),this._matchesSimple(e,o.simples[o.simples.length-1].selector,r)?this._matchesParents(e,o,o.simples.length-2,r):!1))}finally{this.end()}}query(e,n){const r=this._checkSelector(n);this.begin();try{return this._cached(this._cacheQuery,r,[e.scope,e.pierceShadow,e.originalScope],()=>{if(Array.isArray(r))return this._queryEngine(Oi,e,r);this._hasScopeClause(r)&&(e=this._expandContextForScopeMatching(e));const o=this._scoreMap;this._scoreMap=new Map;let l=this._querySimple(e,r.simples[r.simples.length-1].selector);return l=l.filter(c=>this._matchesParents(c,r,r.simples.length-2,e)),this._scoreMap.size&&l.sort((c,u)=>{const d=this._scoreMap.get(c),h=this._scoreMap.get(u);return d===h?0:d===void 0?1:h===void 0?-1:d-h}),this._scoreMap=o,l})}finally{this.end()}}_markScore(e,n){this._scoreMap&&this._scoreMap.set(e,n)}_hasScopeClause(e){return e.simples.some(n=>n.selector.functions.some(r=>r.name==="scope"))}_expandContextForScopeMatching(e){if(e.scope.nodeType!==1)return e;const n=at(e.scope);return n?{...e,scope:n,originalScope:e.originalScope||e.scope}:e}_matchesSimple(e,n,r){return this._cached(this._cacheMatchesSimple,e,[n,r.scope,r.pierceShadow,r.originalScope],()=>{if(e===r.scope||n.css&&!this._matchesCSS(e,n.css))return!1;for(const o of n.functions)if(!this._matchesEngine(this._getEngine(o.name),e,o.args,r))return!1;return!0})}_querySimple(e,n){return n.functions.length?this._cached(this._cacheQuerySimple,n,[e.scope,e.pierceShadow,e.originalScope],()=>{let r=n.css;const o=n.functions;r==="*"&&o.length&&(r=void 0);let l,c=-1;r!==void 0?l=this._queryCSS(e,r):(c=o.findIndex(u=>this._getEngine(u.name).query!==void 0),c===-1&&(c=0),l=this._queryEngine(this._getEngine(o[c].name),e,o[c].args));for(let u=0;u<o.length;u++){if(u===c)continue;const d=this._getEngine(o[u].name);d.matches!==void 0&&(l=l.filter(h=>this._matchesEngine(d,h,o[u].args,e)))}for(let u=0;u<o.length;u++){if(u===c)continue;const d=this._getEngine(o[u].name);d.matches===void 0&&(l=l.filter(h=>this._matchesEngine(d,h,o[u].args,e)))}return l}):this._queryCSS(e,n.css||"*")}_matchesParents(e,n,r,o){return r<0?!0:this._cached(this._cacheMatchesParents,e,[n,r,o.scope,o.pierceShadow,o.originalScope],()=>{const{selector:l,combinator:c}=n.simples[r];if(c===">"){const u=yl(e,o);return!u||!this._matchesSimple(u,l,o)?!1:this._matchesParents(u,n,r-1,o)}if(c==="+"){const u=Su(e,o);return!u||!this._matchesSimple(u,l,o)?!1:this._matchesParents(u,n,r-1,o)}if(c===""){let u=yl(e,o);for(;u;){if(this._matchesSimple(u,l,o)){if(this._matchesParents(u,n,r-1,o))return!0;if(n.simples[r-1].combinator==="")break}u=yl(u,o)}return!1}if(c==="~"){let u=Su(e,o);for(;u;){if(this._matchesSimple(u,l,o)){if(this._matchesParents(u,n,r-1,o))return!0;if(n.simples[r-1].combinator==="~")break}u=Su(u,o)}return!1}if(c===">="){let u=e;for(;u;){if(this._matchesSimple(u,l,o)){if(this._matchesParents(u,n,r-1,o))return!0;if(n.simples[r-1].combinator==="")break}u=yl(u,o)}return!1}throw new Error(`Unsupported combinator "${c}"`)})}_matchesEngine(e,n,r,o){if(e.matches)return this._callMatches(e,n,r,o);if(e.query)return this._callQuery(e,r,o).includes(n);throw new Error('Selector engine should implement "matches" or "query"')}_queryEngine(e,n,r){if(e.query)return this._callQuery(e,r,n);if(e.matches)return this._queryCSS(n,"*").filter(o=>this._callMatches(e,o,r,n));throw new Error('Selector engine should implement "matches" or "query"')}_callMatches(e,n,r,o){return this._cached(this._cacheCallMatches,n,[e,o.scope,o.pierceShadow,o.originalScope,...r],()=>e.matches(n,r,o,this))}_callQuery(e,n,r){return this._cached(this._cacheCallQuery,e,[r.scope,r.pierceShadow,r.originalScope,...n],()=>e.query(r,n,this))}_matchesCSS(e,n){return e.matches(n)}_queryCSS(e,n){return this._cached(this._cacheQueryCSS,n,[e.scope,e.pierceShadow,e.originalScope],()=>{let r=[];function o(l){if(r=r.concat([...l.querySelectorAll(n)]),!!e.pierceShadow){l.shadowRoot&&o(l.shadowRoot);for(const c of l.querySelectorAll("*"))c.shadowRoot&&o(c.shadowRoot)}}return o(e.scope),r})}_getEngine(e){const n=this._engines.get(e);if(!n)throw new Error(`Unknown selector engine "${e}"`);return n}}const Oi={matches(t,e,n,r){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');return e.some(o=>r.matches(t,o,n))},query(t,e,n){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');let r=[];for(const o of e)r=r.concat(n.query(t,o));return e.length===1?r:ey(r)}},qx={matches(t,e,n,r){if(e.length===0)throw new Error('"has" engine expects non-empty selector list');return r.query({...n,scope:t},e).length>0}},Vx={matches(t,e,n,r){if(e.length!==0)throw new Error('"scope" engine expects no arguments');const o=n.originalScope||n.scope;return o.nodeType===9?t===o.documentElement:t===o},query(t,e,n){if(e.length!==0)throw new Error('"scope" engine expects no arguments');const r=t.originalScope||t.scope;if(r.nodeType===9){const o=r.documentElement;return o?[o]:[]}return r.nodeType===1?[r]:[]}},Wx={matches(t,e,n,r){if(e.length===0)throw new Error('"not" engine expects non-empty selector list');return!r.matches(t,e,n)}},Kx={query(t,e,n){return n.query({...t,pierceShadow:!1},e)},matches(t,e,n,r){return r.matches(t,e,{...n,pierceShadow:!1})}},Gx={matches(t,e,n,r){if(e.length)throw new Error('"visible" engine expects no arguments');return Zn(t)}},Qx={matches(t,e,n,r){if(e.length!==1||typeof e[0]!="string")throw new Error('"text" engine expects a single string');const o=mt(e[0]).toLowerCase(),l=c=>c.normalized.toLowerCase().includes(o);return la(r._cacheText,t,l)==="self"}},Jx={matches(t,e,n,r){if(e.length!==1||typeof e[0]!="string")throw new Error('"text-is" engine expects a single string');const o=mt(e[0]),l=c=>!o&&!c.immediate.length?!0:c.immediate.some(u=>mt(u)===o);return la(r._cacheText,t,l)!=="none"}},Xx={matches(t,e,n,r){if(e.length===0||typeof e[0]!="string"||e.length>2||e.length===2&&typeof e[1]!="string")throw new Error('"text-matches" engine expects a regexp body and optional regexp flags');const o=new RegExp(e[0],e.length===2?e[1]:void 0),l=c=>o.test(c.full);return la(r._cacheText,t,l)==="self"}},Yx={matches(t,e,n,r){if(e.length!==1||typeof e[0]!="string")throw new Error('"has-text" engine expects a single string');if(kf(t))return!1;const o=mt(e[0]).toLowerCase();return(c=>c.normalized.toLowerCase().includes(o))(Tt(r._cacheText,t))}};function Ai(t){return{matches(e,n,r,o){const l=n.length&&typeof n[n.length-1]=="number"?n[n.length-1]:void 0,c=l===void 0?n:n.slice(0,n.length-1);if(n.length<1+(l===void 0?0:1))throw new Error(`"${t}" engine expects a selector list and optional maximum distance in pixels`);const u=o.query(r,c),d=Wg(t,e,u,l);return d===void 0?!1:(o._markScore(e,d),!0)}}}const Zx={query(t,e,n){let r=e[e.length-1];if(e.length<2)throw new Error('"nth-match" engine expects non-empty selector list and an index argument');if(typeof r!="number"||r<1)throw new Error('"nth-match" engine expects a one-based index as the last argument');const o=Oi.query(t,e.slice(0,e.length-1),n);return r--,r<o.length?[o[r]]:[]}};function yl(t,e){if(t!==e.scope)return e.pierceShadow?at(t):t.parentElement||void 0}function Su(t,e){if(t!==e.scope)return t.previousElementSibling||void 0}function ey(t){const e=new Map,n=[],r=[];function o(c){let u=e.get(c);if(u)return u;const d=at(c);return d?o(d).children.push(c):n.push(c),u={children:[],taken:!1},e.set(c,u),u}for(const c of t)o(c).taken=!0;function l(c){const u=e.get(c);if(u.taken&&r.push(c),u.children.length>1){const d=new Set(u.children);u.children=[];let h=c.firstElementChild;for(;h&&u.children.length<d.size;)d.has(h)&&u.children.push(h),h=h.nextElementSibling;for(h=c.shadowRoot?c.shadowRoot.firstElementChild:null;h&&u.children.length<d.size;)d.has(h)&&u.children.push(h),h=h.nextElementSibling}u.children.forEach(l)}return n.forEach(l),r}const ty=10,js=ty/2,fm=1,e_=2,t_=10,n_=50,ny=100,ry=120,sy=140,iy=160,Pl=180,oy=200,dm=250,r_=ry+js,s_=sy+js,i_=ny+js,o_=iy+js,l_=Pl+js,a_=oy+js,c_=300,u_=500,ly=510,xu=520,ay=530,cy=1e4,f_=1e7,d_=1e3;function hm(t,e,n){t._evaluator.begin();const r={allowText:new Map,disallowText:new Map};Sf();try{let o=[];if(n.forTextExpect){let u=vl(t,e.ownerDocument.documentElement,n);for(let d=e;d;d=at(d)){const h=ds(r,t,d,{...n,noText:!0});if(!h)continue;if(Yn(h)<=d_){u=h;break}}o=[Ol(u)]}else{if(!e.matches("input,textarea,select")&&!e.isContentEditable){const u=Pi(e,"button,select,input,[role=button],[role=checkbox],[role=radio],a,[role=link]",n.root);u&&Zn(u)&&(e=u)}if(n.multiple){const u=ds(r,t,e,n),d=ds(r,t,e,{...n,noText:!0});let h=[u,d];if(r.allowText.clear(),r.disallowText.clear(),u&&_u(u)&&h.push(ds(r,t,e,{...n,noCSSId:!0})),d&&_u(d)&&h.push(ds(r,t,e,{...n,noText:!0,noCSSId:!0})),h=h.filter(Boolean),!h.length){const g=vl(t,e,n);h.push(g),_u(g)&&h.push(vl(t,e,{...n,noCSSId:!0}))}o=[...new Set(h.map(g=>Ol(g)))]}else{const u=ds(r,t,e,n)||vl(t,e,n);o=[Ol(u)]}}const l=o[0],c=t.parseSelector(l);return{selector:l,selectors:o,elements:t.querySelectorAll(c,n.root??e.ownerDocument)}}finally{xf(),t._evaluator.end()}}function pm(t){return t.filter(e=>e[0].selector[0]!=="/")}function ds(t,e,n,r){if(r.root&&!oa(r.root,n))throw new Error("Target element must belong to the root's subtree");if(n===r.root)return[{engine:"css",selector:":scope",score:1}];if(n.ownerDocument.documentElement===n)return[{engine:"css",selector:"html",score:1}];const o=(c,u)=>{const d=c===n;let h=u?p_(e,c,c===n):[];c!==n&&(h=pm(h));const g=h_(e,c,r).filter(x=>!r.omitInternalEngines||!x.engine.startsWith("internal:")).map(x=>[x]);let y=mm(e,r.root??n.ownerDocument,c,[...h,...g],d);h=pm(h);const v=x=>{const k=u&&!x.length,S=[...x,...g].filter(C=>y?Yn(C)<Yn(y):!0);let E=S[0];if(E)for(let C=at(c);C&&C!==r.root;C=at(C)){const A=l(C,k);if(!A||y&&Yn([...A,...E])>=Yn(y))continue;if(E=mm(e,C,c,S,d),!E)return;const U=[...A,...E];(!y||Yn(U)<Yn(y))&&(y=U)}};return v(h),c===n&&h.length&&v([]),y},l=(c,u)=>{const d=u?t.allowText:t.disallowText;let h=d.get(c);return h===void 0&&(h=o(c,u),d.set(c,h)),h};return o(n,!r.noText)}function h_(t,e,n){const r=[];{for(const c of["data-testid","data-test-id","data-test"])c!==n.testIdAttributeName&&e.getAttribute(c)&&r.push({engine:"css",selector:`[${c}=${gs(e.getAttribute(c))}]`,score:e_});if(!n.noCSSId){const c=e.getAttribute("id");c&&!m_(c)&&r.push({engine:"css",selector:uy(c),score:u_})}r.push({engine:"css",selector:bn(e),score:ay})}if(e.nodeName==="IFRAME"){for(const c of["name","title"])e.getAttribute(c)&&r.push({engine:"css",selector:`${bn(e)}[${c}=${gs(e.getAttribute(c))}]`,score:t_});return e.getAttribute(n.testIdAttributeName)&&r.push({engine:"css",selector:`[${n.testIdAttributeName}=${gs(e.getAttribute(n.testIdAttributeName))}]`,score:fm}),Du([r]),r}if(e.getAttribute(n.testIdAttributeName)&&r.push({engine:"internal:testid",selector:`[${n.testIdAttributeName}=${ht(e.getAttribute(n.testIdAttributeName),!0)}]`,score:fm}),e.nodeName==="INPUT"||e.nodeName==="TEXTAREA"){const c=e;if(c.placeholder){r.push({engine:"internal:attr",selector:`[placeholder=${ht(c.placeholder,!0)}]`,score:r_});for(const u of ws(c.placeholder))r.push({engine:"internal:attr",selector:`[placeholder=${ht(u.text,!1)}]`,score:ry-u.scoreBonus})}}const o=Qg(t._evaluator._cacheText,e);for(const c of o){const u=c.normalized;r.push({engine:"internal:label",selector:kt(u,!0),score:s_});for(const d of ws(u))r.push({engine:"internal:label",selector:kt(d.text,!1),score:sy-d.scoreBonus})}const l=rt(e);return l&&!["none","presentation"].includes(l)&&r.push({engine:"internal:role",selector:l,score:ly}),e.getAttribute("name")&&["BUTTON","FORM","FIELDSET","FRAME","IFRAME","INPUT","KEYGEN","OBJECT","OUTPUT","SELECT","TEXTAREA","MAP","META","PARAM"].includes(e.nodeName)&&r.push({engine:"css",selector:`${bn(e)}[name=${gs(e.getAttribute("name"))}]`,score:xu}),["INPUT","TEXTAREA"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&e.getAttribute("type")&&r.push({engine:"css",selector:`${bn(e)}[type=${gs(e.getAttribute("type"))}]`,score:xu}),["INPUT","TEXTAREA","SELECT"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&r.push({engine:"css",selector:bn(e),score:xu+1}),Du([r]),r}function p_(t,e,n){if(e.nodeName==="SELECT")return[];const r=[],o=e.getAttribute("title");if(o){r.push([{engine:"internal:attr",selector:`[title=${ht(o,!0)}]`,score:a_}]);for(const h of ws(o))r.push([{engine:"internal:attr",selector:`[title=${ht(h.text,!1)}]`,score:oy-h.scoreBonus}])}const l=e.getAttribute("alt");if(l&&["APPLET","AREA","IMG","INPUT"].includes(e.nodeName)){r.push([{engine:"internal:attr",selector:`[alt=${ht(l,!0)}]`,score:o_}]);for(const h of ws(l))r.push([{engine:"internal:attr",selector:`[alt=${ht(h.text,!1)}]`,score:iy-h.scoreBonus}])}const c=Tt(t._evaluator._cacheText,e).normalized,u=c?ws(c):[];if(c){if(n){c.length<=80&&r.push([{engine:"internal:text",selector:kt(c,!0),score:l_}]);for(const g of u)r.push([{engine:"internal:text",selector:kt(g.text,!1),score:Pl-g.scoreBonus}])}const h={engine:"css",selector:bn(e),score:ay};for(const g of u)r.push([h,{engine:"internal:has-text",selector:kt(g.text,!1),score:Pl-g.scoreBonus}]);if(c.length<=80){const g=new RegExp("^"+Vl(c)+"$");r.push([h,{engine:"internal:has-text",selector:kt(g,!1),score:dm}])}}const d=rt(e);if(d&&!["none","presentation"].includes(d)){const h=Ki(e,!1);if(h){const g={engine:"internal:role",selector:`${d}[name=${ht(h,!0)}]`,score:i_};r.push([g]);for(const y of ws(h))r.push([{engine:"internal:role",selector:`${d}[name=${ht(y.text,!1)}]`,score:ny-y.scoreBonus}])}else{const g={engine:"internal:role",selector:`${d}`,score:ly};for(const y of u)r.push([g,{engine:"internal:has-text",selector:kt(y.text,!1),score:Pl-y.scoreBonus}]);if(c.length<=80){const y=new RegExp("^"+Vl(c)+"$");r.push([g,{engine:"internal:has-text",selector:kt(y,!1),score:dm}])}}}return Du(r),r}function uy(t){return/^[a-zA-Z][a-zA-Z0-9\-\_]+$/.test(t)?"#"+t:`[id=${gs(t)}]`}function _u(t){return t.some(e=>e.engine==="css"&&(e.selector.startsWith("#")||e.selector.startsWith('[id="')))}function vl(t,e,n){const r=n.root??e.ownerDocument,o=[];function l(u){const d=o.slice();u&&d.unshift(u);const h=d.join(" > "),g=t.parseSelector(h);return t.querySelector(g,r,!1)===e?h:void 0}function c(u){const d={engine:"css",selector:u,score:f_},h=t.parseSelector(u),g=t.querySelectorAll(h,r);if(g.length===1)return[d];const y={engine:"nth",selector:String(g.indexOf(e)),score:cy};return[d,y]}for(let u=e;u&&u!==r;u=at(u)){let d="";if(u.id&&!n.noCSSId){const y=uy(u.id),v=l(y);if(v)return c(v);d=y}const h=u.parentNode,g=[...u.classList].map(g_);for(let y=0;y<g.length;++y){const v="."+g.slice(0,y+1).join("."),x=l(v);if(x)return c(x);!d&&h&&h.querySelectorAll(v).length===1&&(d=v)}if(h){const y=[...h.children],v=u.nodeName,k=y.filter(E=>E.nodeName===v).indexOf(u)===0?bn(u):`${bn(u)}:nth-child(${1+y.indexOf(u)})`,S=l(k);if(S)return c(S);d||(d=k)}else d||(d=bn(u));o.unshift(d)}return c(l())}function Du(t){for(const e of t)for(const n of e)n.score>n_&&n.score<c_&&(n.score+=Math.min(ty,n.selector.length/10|0))}function Ol(t){const e=[];let n="";for(const{engine:r,selector:o}of t)e.length&&(n!=="css"||r!=="css"||o.startsWith(":nth-match("))&&e.push(">>"),n=r,r==="css"?e.push(o):e.push(`${r}=${o}`);return e.join(" ")}function Yn(t){let e=0;for(let n=0;n<t.length;n++)e+=t[n].score*(t.length-n);return e}function mm(t,e,n,r,o){const l=r.map(u=>({tokens:u,score:Yn(u)}));l.sort((u,d)=>u.score-d.score);let c=null;for(const{tokens:u}of l){const d=t.parseSelector(Ol(u)),h=t.querySelectorAll(d,e);if(h[0]===n&&h.length===1)return u;const g=h.indexOf(n);if(!o||c||g===-1||h.length>5)continue;const y={engine:"nth",selector:String(g),score:cy};c=[...u,y]}return c}function m_(t){let e,n=0;for(let r=0;r<t.length;++r){const o=t[r];let l;if(!(o==="-"||o==="_")){if(o>="a"&&o<="z"?l="lower":o>="A"&&o<="Z"?l="upper":o>="0"&&o<="9"?l="digit":l="other",l==="lower"&&e==="upper"){e=l;continue}e&&e!==l&&++n,e=l}}return n>=t.length/4}function wl(t,e){if(t.length<=e)return t;t=t.substring(0,e);const n=t.match(/^(.*)\b(.+?)$/);return n?n[1].trimEnd():""}function ws(t){let e=[];{const n=t.match(/^([\d.,]+)[^.,\w]/),r=n?n[1].length:0;if(r){const o=wl(t.substring(r).trimStart(),80);e.push({text:o,scoreBonus:o.length<=30?2:1})}}{const n=t.match(/[^.,\w]([\d.,]+)$/),r=n?n[1].length:0;if(r){const o=wl(t.substring(0,t.length-r).trimEnd(),80);e.push({text:o,scoreBonus:o.length<=30?2:1})}}return t.length<=30?e.push({text:t,scoreBonus:0}):(e.push({text:wl(t,80),scoreBonus:0}),e.push({text:wl(t,30),scoreBonus:1})),e=e.filter(n=>n.text),e.length||e.push({text:t.substring(0,80),scoreBonus:0}),e}function bn(t){return t.nodeName.toLocaleLowerCase().replace(/[:\.]/g,e=>"\\"+e)}function g_(t){let e="";for(let n=0;n<t.length;n++)e+=y_(t,n);return e}function y_(t,e){const n=t.charCodeAt(e);return n===0?"�":n>=1&&n<=31||n>=48&&n<=57&&(e===0||e===1&&t.charCodeAt(0)===45)?"\\"+n.toString(16)+" ":e===0&&n===45&&t.length===1?"\\"+t.charAt(e):n>=128||n===45||n===95||n>=48&&n<=57||n>=65&&n<=90||n>=97&&n<=122?t.charAt(e):"\\"+t.charAt(e)}function fy(t,e){const n=t.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/");let r=n.substring(n.lastIndexOf("/")+1);return r.endsWith(e)&&(r=r.substring(0,r.length-e.length)),r}function v_(t,e){return e?e.toUpperCase():""}const w_=/(?:^|[-_/])(\w)/g,dy=t=>t&&t.replace(w_,v_);function S_(t){function e(g){const y=g.name||g._componentTag||g.__playwright_guessedName;if(y)return y;const v=g.__file;if(v)return dy(fy(v,".vue"))}function n(g,y){return g.type.__playwright_guessedName=y,y}function r(g){var v,x,k,S;const y=e(g.type||{});if(y)return y;if(g.root===g)return"Root";for(const E in(x=(v=g.parent)==null?void 0:v.type)==null?void 0:x.components)if(((k=g.parent)==null?void 0:k.type.components[E])===g.type)return n(g,E);for(const E in(S=g.appContext)==null?void 0:S.components)if(g.appContext.components[E]===g.type)return n(g,E);return"Anonymous Component"}function o(g){return g._isBeingDestroyed||g.isUnmounted}function l(g){return g.subTree.type.toString()==="Symbol(Fragment)"}function c(g){const y=[];return g.component&&y.push(g.component),g.suspense&&y.push(...c(g.suspense.activeBranch)),Array.isArray(g.children)&&g.children.forEach(v=>{v.component?y.push(v.component):y.push(...c(v))}),y.filter(v=>{var x;return!o(v)&&!((x=v.type.devtools)!=null&&x.hide)})}function u(g){return l(g)?d(g.subTree):[g.subTree.el]}function d(g){if(!g.children)return[];const y=[];for(let v=0,x=g.children.length;v<x;v++){const k=g.children[v];k.component?y.push(...u(k.component)):k.el&&y.push(k.el)}return y}function h(g){return{name:r(g),children:c(g.subTree).map(h),rootElements:u(g),props:g.props}}return h(t)}function x_(t){function e(l){const c=l.displayName||l.name||l._componentTag;if(c)return c;const u=l.__file;if(u)return dy(fy(u,".vue"))}function n(l){const c=e(l.$options||l.fnOptions||{});return c||(l.$root===l?"Root":"Anonymous Component")}function r(l){return l.$children?l.$children:Array.isArray(l.subTree.children)?l.subTree.children.filter(c=>!!c.component).map(c=>c.component):[]}function o(l){return{name:n(l),children:r(l).map(o),rootElements:[l.$el],props:l._props}}return o(t)}function hy(t,e,n=[]){e(t)&&n.push(t);for(const r of t.children)hy(r,e,n);return n}function py(t,e=[]){const r=(t.ownerDocument||t).createTreeWalker(t,NodeFilter.SHOW_ELEMENT),o=new Set;do{const l=r.currentNode;l.__vue__&&o.add(l.__vue__.$root),l.__vue_app__&&l._vnode&&l._vnode.component&&e.push({root:l._vnode.component,version:3});const c=l instanceof Element?l.shadowRoot:null;c&&py(c,e)}while(r.nextNode());for(const l of o)e.push({version:2,root:l});return e}const __=()=>({queryAll(t,e){const n=t.ownerDocument||t,{name:r,attributes:o}=Ir(e,!1),u=py(n).map(h=>h.version===3?S_(h.root):x_(h.root)).map(h=>hy(h,g=>{if(r&&g.name!==r||g.rootElements.some(y=>!oa(t,y)))return!1;for(const y of o)if(!Kg(g.props,y))return!1;return!0})).flat(),d=new Set;for(const h of u)for(const g of h.rootElements)d.add(g);return[...d]}}),gm={queryAll(t,e){e.startsWith("/")&&t.nodeType!==Node.DOCUMENT_NODE&&(e="."+e);const n=[],r=t.ownerDocument||t;if(!r)return n;const o=r.evaluate(e,t,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE);for(let l=o.iterateNext();l;l=o.iterateNext())l.nodeType===Node.ELEMENT_NODE&&n.push(l);return n}};function bf(t,e,n){return`internal:attr=[${t}=${ht(e,(n==null?void 0:n.exact)||!1)}]`}function E_(t,e){return`internal:testid=[${t}=${ht(e,!0)}]`}function k_(t,e){return"internal:label="+kt(t,!!(e!=null&&e.exact))}function b_(t,e){return bf("alt",t,e)}function T_(t,e){return bf("title",t,e)}function C_(t,e){return bf("placeholder",t,e)}function N_(t,e){return"internal:text="+kt(t,!!(e!=null&&e.exact))}function A_(t,e={}){const n=[];return e.checked!==void 0&&n.push(["checked",String(e.checked)]),e.disabled!==void 0&&n.push(["disabled",String(e.disabled)]),e.selected!==void 0&&n.push(["selected",String(e.selected)]),e.expanded!==void 0&&n.push(["expanded",String(e.expanded)]),e.includeHidden!==void 0&&n.push(["include-hidden",String(e.includeHidden)]),e.level!==void 0&&n.push(["level",String(e.level)]),e.name!==void 0&&n.push(["name",ht(e.name,!!e.exact)]),e.pressed!==void 0&&n.push(["pressed",String(e.pressed)]),`internal:role=${t}${n.map(([r,o])=>`[${r}=${o}]`).join("")}`}const Ii=Symbol("selector"),I_=class Ri{constructor(e,n,r){if(r!=null&&r.hasText&&(n+=` >> internal:has-text=${kt(r.hasText,!1)}`),r!=null&&r.hasNotText&&(n+=` >> internal:has-not-text=${kt(r.hasNotText,!1)}`),r!=null&&r.has&&(n+=" >> internal:has="+JSON.stringify(r.has[Ii])),r!=null&&r.hasNot&&(n+=" >> internal:has-not="+JSON.stringify(r.hasNot[Ii])),(r==null?void 0:r.visible)!==void 0&&(n+=` >> visible=${r.visible?"true":"false"}`),this[Ii]=n,n){const c=e.parseSelector(n);this.element=e.querySelector(c,e.document,!1),this.elements=e.querySelectorAll(c,e.document)}const o=n,l=this;l.locator=(c,u)=>new Ri(e,o?o+" >> "+c:c,u),l.getByTestId=c=>l.locator(E_(e.testIdAttributeNameForStrictErrorAndConsoleCodegen(),c)),l.getByAltText=(c,u)=>l.locator(b_(c,u)),l.getByLabel=(c,u)=>l.locator(k_(c,u)),l.getByPlaceholder=(c,u)=>l.locator(C_(c,u)),l.getByText=(c,u)=>l.locator(N_(c,u)),l.getByTitle=(c,u)=>l.locator(T_(c,u)),l.getByRole=(c,u={})=>l.locator(A_(c,u)),l.filter=c=>new Ri(e,n,c),l.first=()=>l.locator("nth=0"),l.last=()=>l.locator("nth=-1"),l.nth=c=>l.locator(`nth=${c}`),l.and=c=>new Ri(e,o+" >> internal:and="+JSON.stringify(c[Ii])),l.or=c=>new Ri(e,o+" >> internal:or="+JSON.stringify(c[Ii]))}};let L_=I_;class M_{constructor(e){this._injectedScript=e}install(){this._injectedScript.window.playwright||(this._injectedScript.window.playwright={$:(e,n)=>this._querySelector(e,!!n),$$:e=>this._querySelectorAll(e),inspect:e=>this._inspect(e),selector:e=>this._selector(e),generateLocator:(e,n)=>this._generateLocator(e,n),ariaSnapshot:(e,n)=>this._injectedScript.ariaSnapshot(e||this._injectedScript.document.body,n||{mode:"expect"}),resume:()=>this._resume(),...new L_(this._injectedScript,"")},delete this._injectedScript.window.playwright.filter,delete this._injectedScript.window.playwright.first,delete this._injectedScript.window.playwright.last,delete this._injectedScript.window.playwright.nth,delete this._injectedScript.window.playwright.and,delete this._injectedScript.window.playwright.or)}_querySelector(e,n){if(typeof e!="string")throw new Error("Usage: playwright.query('Playwright >> selector').");const r=this._injectedScript.parseSelector(e);return this._injectedScript.querySelector(r,this._injectedScript.document,n)}_querySelectorAll(e){if(typeof e!="string")throw new Error("Usage: playwright.$$('Playwright >> selector').");const n=this._injectedScript.parseSelector(e);return this._injectedScript.querySelectorAll(n,this._injectedScript.document)}_inspect(e){if(typeof e!="string")throw new Error("Usage: playwright.inspect('Playwright >> selector').");this._injectedScript.window.inspect(this._querySelector(e,!1))}_selector(e){if(!(e instanceof Element))throw new Error("Usage: playwright.selector(element).");return this._injectedScript.generateSelectorSimple(e)}_generateLocator(e,n){if(!(e instanceof Element))throw new Error("Usage: playwright.locator(element).");const r=this._injectedScript.generateSelectorSimple(e);return Lr(n||"javascript",r)}_resume(){if(!this._injectedScript.window.__pw_resume)return!1;this._injectedScript.window.__pw_resume().catch(()=>{})}}function j_(t){try{return t instanceof RegExp||Object.prototype.toString.call(t)==="[object RegExp]"}catch{return!1}}function P_(t){try{return t instanceof Date||Object.prototype.toString.call(t)==="[object Date]"}catch{return!1}}function O_(t){try{return t instanceof URL||Object.prototype.toString.call(t)==="[object URL]"}catch{return!1}}function R_(t){var e;try{return t instanceof Error||t&&((e=Object.getPrototypeOf(t))==null?void 0:e.name)==="Error"}catch{return!1}}function $_(t,e){try{return t instanceof e||Object.prototype.toString.call(t)===`[object ${e.name}]`}catch{return!1}}const my={i8:Int8Array,ui8:Uint8Array,ui8c:Uint8ClampedArray,i16:Int16Array,ui16:Uint16Array,i32:Int32Array,ui32:Uint32Array,f32:Float32Array,f64:Float64Array,bi64:BigInt64Array,bui64:BigUint64Array};function D_(t){if("toBase64"in t)return t.toBase64();const e=Array.from(new Uint8Array(t.buffer,t.byteOffset,t.byteLength)).map(n=>String.fromCharCode(n)).join("");return btoa(e)}function B_(t,e){const n=atob(t),r=new Uint8Array(n.length);for(let o=0;o<n.length;o++)r[o]=n.charCodeAt(o);return new e(r.buffer)}function Bu(t,e=[],n=new Map){if(!Object.is(t,void 0)){if(typeof t=="object"&&t){if("ref"in t)return n.get(t.ref);if("v"in t)return t.v==="undefined"?void 0:t.v==="null"?null:t.v==="NaN"?NaN:t.v==="Infinity"?1/0:t.v==="-Infinity"?-1/0:t.v==="-0"?-0:void 0;if("d"in t)return new Date(t.d);if("u"in t)return new URL(t.u);if("bi"in t)return BigInt(t.bi);if("e"in t){const r=new Error(t.e.m);return r.name=t.e.n,r.stack=t.e.s,r}if("r"in t)return new RegExp(t.r.p,t.r.f);if("a"in t){const r=[];n.set(t.id,r);for(const o of t.a)r.push(Bu(o,e,n));return r}if("o"in t){const r={};n.set(t.id,r);for(const{k:o,v:l}of t.o)o!=="__proto__"&&(r[o]=Bu(l,e,n));return r}if("h"in t)return e[t.h];if("ta"in t)return B_(t.ta.b,my[t.ta.k])}return t}}function F_(t,e){return Fu(t,e,{visited:new Map,lastId:0})}function Fu(t,e,n){if(t&&typeof t=="object"){if(typeof globalThis.Window=="function"&&t instanceof globalThis.Window)return"ref: <Window>";if(typeof globalThis.Document=="function"&&t instanceof globalThis.Document)return"ref: <Document>";if(typeof globalThis.Node=="function"&&t instanceof globalThis.Node)return"ref: <Node>"}return gy(t,e,n)}function gy(t,e,n){var l;const r=e(t);if("fallThrough"in r)t=r.fallThrough;else return r;if(typeof t=="symbol")return{v:"undefined"};if(Object.is(t,void 0))return{v:"undefined"};if(Object.is(t,null))return{v:"null"};if(Object.is(t,NaN))return{v:"NaN"};if(Object.is(t,1/0))return{v:"Infinity"};if(Object.is(t,-1/0))return{v:"-Infinity"};if(Object.is(t,-0))return{v:"-0"};if(typeof t=="boolean"||typeof t=="number"||typeof t=="string")return t;if(typeof t=="bigint")return{bi:t.toString()};if(R_(t)){let c;return(l=t.stack)!=null&&l.startsWith(t.name+": "+t.message)?c=t.stack:c=`${t.name}: ${t.message}
106
106
  ${t.stack}`,{e:{n:t.name,m:t.message,s:c}}}if(P_(t))return{d:t.toJSON()};if(O_(t))return{u:t.toJSON()};if(j_(t))return{r:{p:t.source,f:t.flags}};for(const[c,u]of Object.entries(my))if($_(t,u))return{ta:{b:D_(t),k:c}};const o=n.visited.get(t);if(o)return{ref:o};if(Array.isArray(t)){const c=[],u=++n.lastId;n.visited.set(t,u);for(let d=0;d<t.length;++d)c.push(Fu(t[d],e,n));return{a:c,id:u}}if(typeof t=="object"){const c=[],u=++n.lastId;n.visited.set(t,u);for(const h of Object.keys(t)){let g;try{g=t[h]}catch{continue}h==="toJSON"&&typeof g=="function"?c.push({k:h,v:{o:[],id:0}}):c.push({k:h,v:Fu(g,e,n)})}let d;try{c.length===0&&t.toJSON&&typeof t.toJSON=="function"&&(d={value:t.toJSON()})}catch{}return d?gy(d.value,e,n):{o:c,id:u}}}class z_{constructor(e,n){var r,o,l,c,u,d,h,g;this.global=e,this.isUnderTest=n,e.__pwClock?this.builtins=e.__pwClock.builtins:this.builtins={setTimeout:(r=e.setTimeout)==null?void 0:r.bind(e),clearTimeout:(o=e.clearTimeout)==null?void 0:o.bind(e),setInterval:(l=e.setInterval)==null?void 0:l.bind(e),clearInterval:(c=e.clearInterval)==null?void 0:c.bind(e),requestAnimationFrame:(u=e.requestAnimationFrame)==null?void 0:u.bind(e),cancelAnimationFrame:(d=e.cancelAnimationFrame)==null?void 0:d.bind(e),requestIdleCallback:(h=e.requestIdleCallback)==null?void 0:h.bind(e),cancelIdleCallback:(g=e.cancelIdleCallback)==null?void 0:g.bind(e),performance:e.performance,Intl:e.Intl,Date:e.Date},this.isUnderTest&&(e.builtins=this.builtins)}evaluate(e,n,r,o,...l){const c=l.slice(0,o),u=l.slice(o),d=[];for(let g=0;g<c.length;g++)d[g]=Bu(c[g],u);let h=this.global.eval(r);return e===!0?h=h(...d):e===!1?h=h:typeof h=="function"&&(h=h(...d)),n?this._promiseAwareJsonValueNoThrow(h):h}jsonValue(e,n){if(n!==void 0)return F_(n,r=>({fallThrough:r}))}_promiseAwareJsonValueNoThrow(e){const n=r=>{try{return this.jsonValue(!0,r)}catch{return}};return e&&typeof e=="object"&&typeof e.then=="function"?(async()=>{const r=await e;return n(r)})():n(e)}}class yy{constructor(e,n){this._testIdAttributeNameForStrictErrorAndConsoleCodegen="data-testid",this.utils={asLocator:Lr,cacheNormalizedWhitespaces:dS,elementText:Tt,getAriaRole:rt,getElementAccessibleDescription:sm,getElementAccessibleName:Ki,isElementVisible:Zn,isInsideScope:oa,normalizeWhiteSpace:mt,parseAriaSnapshot:sf,generateAriaTree:zi,builtins:null},this.window=e,this.document=e.document,this.isUnderTest=n.isUnderTest,this.utils.builtins=new z_(e,n.isUnderTest).builtins,this._sdkLanguage=n.sdkLanguage,this._testIdAttributeNameForStrictErrorAndConsoleCodegen=n.testIdAttributeName,this._evaluator=new Hx,this.consoleApi=new M_(this),this.onGlobalListenersRemoved=new Set,this._autoClosingTags=new Set(["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","MENUITEM","META","PARAM","SOURCE","TRACK","WBR"]),this._booleanAttributes=new Set(["checked","selected","disabled","readonly","multiple"]),this._eventTypes=new Map([["auxclick","mouse"],["click","mouse"],["dblclick","mouse"],["mousedown","mouse"],["mouseeenter","mouse"],["mouseleave","mouse"],["mousemove","mouse"],["mouseout","mouse"],["mouseover","mouse"],["mouseup","mouse"],["mouseleave","mouse"],["mousewheel","mouse"],["keydown","keyboard"],["keyup","keyboard"],["keypress","keyboard"],["textInput","keyboard"],["touchstart","touch"],["touchmove","touch"],["touchend","touch"],["touchcancel","touch"],["pointerover","pointer"],["pointerout","pointer"],["pointerenter","pointer"],["pointerleave","pointer"],["pointerdown","pointer"],["pointerup","pointer"],["pointermove","pointer"],["pointercancel","pointer"],["gotpointercapture","pointer"],["lostpointercapture","pointer"],["focus","focus"],["blur","focus"],["drag","drag"],["dragstart","drag"],["dragend","drag"],["dragover","drag"],["dragenter","drag"],["dragleave","drag"],["dragexit","drag"],["drop","drag"],["wheel","wheel"],["deviceorientation","deviceorientation"],["deviceorientationabsolute","deviceorientation"],["devicemotion","devicemotion"]]),this._hoverHitTargetInterceptorEvents=new Set(["mousemove"]),this._tapHitTargetInterceptorEvents=new Set(["pointerdown","pointerup","touchstart","touchend","touchcancel"]),this._mouseHitTargetInterceptorEvents=new Set(["mousedown","mouseup","pointerdown","pointerup","click","auxclick","dblclick","contextmenu"]),this._allHitTargetInterceptorEvents=new Set([...this._hoverHitTargetInterceptorEvents,...this._tapHitTargetInterceptorEvents,...this._mouseHitTargetInterceptorEvents]),this._engines=new Map,this._engines.set("xpath",gm),this._engines.set("xpath:light",gm),this._engines.set("_react",Fx()),this._engines.set("_vue",__()),this._engines.set("role",um(!1)),this._engines.set("text",this._createTextEngine(!0,!1)),this._engines.set("text:light",this._createTextEngine(!1,!1)),this._engines.set("id",this._createAttributeEngine("id",!0)),this._engines.set("id:light",this._createAttributeEngine("id",!1)),this._engines.set("data-testid",this._createAttributeEngine("data-testid",!0)),this._engines.set("data-testid:light",this._createAttributeEngine("data-testid",!1)),this._engines.set("data-test-id",this._createAttributeEngine("data-test-id",!0)),this._engines.set("data-test-id:light",this._createAttributeEngine("data-test-id",!1)),this._engines.set("data-test",this._createAttributeEngine("data-test",!0)),this._engines.set("data-test:light",this._createAttributeEngine("data-test",!1)),this._engines.set("css",this._createCSSEngine()),this._engines.set("nth",{queryAll:()=>[]}),this._engines.set("visible",this._createVisibleEngine()),this._engines.set("internal:control",this._createControlEngine()),this._engines.set("internal:has",this._createHasEngine()),this._engines.set("internal:has-not",this._createHasNotEngine()),this._engines.set("internal:and",{queryAll:()=>[]}),this._engines.set("internal:or",{queryAll:()=>[]}),this._engines.set("internal:chain",this._createInternalChainEngine()),this._engines.set("internal:label",this._createInternalLabelEngine()),this._engines.set("internal:text",this._createTextEngine(!0,!0)),this._engines.set("internal:has-text",this._createInternalHasTextEngine()),this._engines.set("internal:has-not-text",this._createInternalHasNotTextEngine()),this._engines.set("internal:attr",this._createNamedAttributeEngine()),this._engines.set("internal:testid",this._createNamedAttributeEngine()),this._engines.set("internal:role",um(!0)),this._engines.set("internal:describe",this._createDescribeEngine()),this._engines.set("aria-ref",this._createAriaRefEngine());for(const{name:r,source:o}of n.customEngines)this._engines.set(r,this.eval(o));this._stableRafCount=n.stableRafCount,this._browserName=n.browserName,Y1({browserNameForWorkarounds:n.browserName}),this._setupGlobalListenersRemovalDetection(),this._setupHitTargetInterceptors(),this.isUnderTest&&(this.window.__injectedScript=this)}eval(e){return this.window.eval(e)}testIdAttributeNameForStrictErrorAndConsoleCodegen(){return this._testIdAttributeNameForStrictErrorAndConsoleCodegen}parseSelector(e){const n=Yi(e);return uS(n,r=>{if(!this._engines.has(r.name))throw this.createStacklessError(`Unknown engine "${r.name}" while parsing selector ${e}`)}),n}generateSelector(e,n){return hm(this,e,n)}generateSelectorSimple(e,n){return hm(this,e,{...n,testIdAttributeName:this._testIdAttributeNameForStrictErrorAndConsoleCodegen}).selector}querySelector(e,n,r){const o=this.querySelectorAll(e,n);if(r&&o.length>1)throw this.strictModeViolationError(e,o);return o[0]}_queryNth(e,n){const r=[...e];let o=+n.body;return o===-1&&(o=r.length-1),new Set(r.slice(o,o+1))}_queryLayoutSelector(e,n,r){const o=n.name,l=n.body,c=[],u=this.querySelectorAll(l.parsed,r);for(const d of e){const h=Wg(o,d,u,l.distance);h!==void 0&&c.push({element:d,score:h})}return c.sort((d,h)=>d.score-h.score),new Set(c.map(d=>d.element))}ariaSnapshot(e,n){if(e.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError("Can only capture aria snapshot of Element nodes.");return this._lastAriaSnapshot=zi(e,n),Xl(this._lastAriaSnapshot,n)}ariaSnapshotForRecorder(){const e=zi(this.document.body,{mode:"ai"});return{ariaSnapshot:Xl(e,{mode:"ai"}),refs:e.refs}}getAllElementsMatchingExpectAriaTemplate(e,n){return Tx(e.documentElement,n)}querySelectorAll(e,n){if(e.capture!==void 0){if(e.parts.some(o=>o.name==="nth"))throw this.createStacklessError("Can't query n-th element in a request with the capture.");const r={parts:e.parts.slice(0,e.capture+1)};if(e.capture<e.parts.length-1){const o={parts:e.parts.slice(e.capture+1)},l={name:"internal:has",body:{parsed:o},source:Tn(o)};r.parts.push(l)}return this.querySelectorAll(r,n)}if(!n.querySelectorAll)throw this.createStacklessError("Node is not queryable.");if(e.capture!==void 0)throw this.createStacklessError("Internal error: there should not be a capture in the selector.");if(n.nodeType===11&&e.parts.length===1&&e.parts[0].name==="css"&&e.parts[0].source===":scope")return[n];this._evaluator.begin();try{let r=new Set([n]);for(const o of e.parts)if(o.name==="nth")r=this._queryNth(r,o);else if(o.name==="internal:and"){const l=this.querySelectorAll(o.body.parsed,n);r=new Set(l.filter(c=>r.has(c)))}else if(o.name==="internal:or"){const l=this.querySelectorAll(o.body.parsed,n);r=new Set(ey(new Set([...r,...l])))}else if(Ox.includes(o.name))r=this._queryLayoutSelector(r,o,n);else{const l=new Set;for(const c of r){const u=this._queryEngineAll(o,c);for(const d of u)l.add(d)}r=l}return[...r]}finally{this._evaluator.end()}}_queryEngineAll(e,n){const r=this._engines.get(e.name).queryAll(n,e.body);for(const o of r)if(!("nodeName"in o))throw this.createStacklessError(`Expected a Node but got ${Object.prototype.toString.call(o)}`);return r}_createAttributeEngine(e,n){const r=o=>[{simples:[{selector:{css:`[${e}=${JSON.stringify(o)}]`,functions:[]},combinator:""}]}];return{queryAll:(o,l)=>this._evaluator.query({scope:o,pierceShadow:n},r(l))}}_createCSSEngine(){return{queryAll:(e,n)=>this._evaluator.query({scope:e,pierceShadow:!0},n)}}_createTextEngine(e,n){return{queryAll:(o,l)=>{const{matcher:c,kind:u}=xl(l,n),d=[];let h=null;const g=v=>{if(u==="lax"&&h&&h.contains(v))return!1;const x=la(this._evaluator._cacheText,v,c);x==="none"&&(h=v),(x==="self"||x==="selfAndChildren"&&u==="strict"&&!n)&&d.push(v)};o.nodeType===Node.ELEMENT_NODE&&g(o);const y=this._evaluator._queryCSS({scope:o,pierceShadow:e},"*");for(const v of y)g(v);return d}}}_createInternalHasTextEngine(){return{queryAll:(e,n)=>{if(e.nodeType!==1)return[];const r=e,o=Tt(this._evaluator._cacheText,r),{matcher:l}=xl(n,!0);return l(o)?[r]:[]}}}_createInternalHasNotTextEngine(){return{queryAll:(e,n)=>{if(e.nodeType!==1)return[];const r=e,o=Tt(this._evaluator._cacheText,r),{matcher:l}=xl(n,!0);return l(o)?[]:[r]}}}_createInternalLabelEngine(){return{queryAll:(e,n)=>{const{matcher:r}=xl(n,!0);return this._evaluator._queryCSS({scope:e,pierceShadow:!0},"*").filter(l=>Qg(this._evaluator._cacheText,l).some(c=>r(c)))}}}_createNamedAttributeEngine(){return{queryAll:(n,r)=>{const o=Ir(r,!0);if(o.name||o.attributes.length!==1)throw new Error("Malformed attribute selector: "+r);const{name:l,value:c,caseSensitive:u}=o.attributes[0],d=u?null:c.toLowerCase();let h;return c instanceof RegExp?h=y=>!!y.match(c):u?h=y=>y===c:h=y=>y.toLowerCase().includes(d),this._evaluator._queryCSS({scope:n,pierceShadow:!0},`[${l}]`).filter(y=>h(y.getAttribute(l)))}}}_createDescribeEngine(){return{queryAll:n=>n.nodeType!==1?[]:[n]}}_createControlEngine(){return{queryAll(e,n){if(n==="enter-frame")return[];if(n==="return-empty")return[];if(n==="component")return e.nodeType!==1?[]:[e.childElementCount===1?e.firstElementChild:e];throw new Error(`Internal error, unknown internal:control selector ${n}`)}}}_createHasEngine(){return{queryAll:(n,r)=>n.nodeType!==1?[]:!!this.querySelector(r.parsed,n,!1)?[n]:[]}}_createHasNotEngine(){return{queryAll:(n,r)=>n.nodeType!==1?[]:!!this.querySelector(r.parsed,n,!1)?[]:[n]}}_createVisibleEngine(){return{queryAll:(n,r)=>{if(n.nodeType!==1)return[];const o=r==="true";return Zn(n)===o?[n]:[]}}}_createInternalChainEngine(){return{queryAll:(n,r)=>this.querySelectorAll(r.parsed,n)}}extend(e,n){const r=this.window.eval(`
107
107
  (() => {
@@ -1,2 +1,2 @@
1
- import{M as x,r,T as C,W as I,j as e,D as z,a as O,b as U,c as V,d as $,e as q}from"./assets/defaultSettingsView-htM0IBWp.js";const A=()=>{const[i,c]=r.useState(!1),[l,d]=r.useState([]),[h,p]=r.useState([]),[f,L]=r.useState(P),[w,j]=r.useState({done:0,total:0}),[b,v]=r.useState(!1),[E,S]=r.useState(null),[T,R]=r.useState(null),[W,N]=r.useState(!1),m=r.useCallback(t=>{const a=[],o=[],s=new URL(window.location.href);for(let n=0;n<t.length;n++){const g=t.item(n);if(!g)continue;const k=URL.createObjectURL(g);a.push(k),o.push(g.name),s.searchParams.append("trace",k),s.searchParams.append("traceFileName",g.name)}const u=s.toString();window.history.pushState({},"",u),d(a),p(o),v(!1),S(null)},[]);r.useEffect(()=>{const t=async a=>{var o;if((o=a.clipboardData)!=null&&o.files.length){for(const s of a.clipboardData.files)if(s.type!=="application/zip")return;a.preventDefault(),m(a.clipboardData.files)}};return document.addEventListener("paste",t),()=>document.removeEventListener("paste",t)}),r.useEffect(()=>{const t=a=>{const{method:o,params:s}=a.data;if(o!=="load"||!((s==null?void 0:s.trace)instanceof Blob))return;const u=new File([s.trace],"trace.zip",{type:"application/zip"}),n=new DataTransfer;n.items.add(u),m(n.files)};return window.addEventListener("message",t),()=>window.removeEventListener("message",t)});const M=r.useCallback(t=>{t.preventDefault(),m(t.dataTransfer.files)},[m]),F=r.useCallback(t=>{t.preventDefault(),t.target.files&&m(t.target.files)},[m]);r.useEffect(()=>{const t=new URL(window.location.href).searchParams,a=t.getAll("trace");c(t.has("isServer"));for(const o of a)if(o.startsWith("file:")){R(o||null);return}if(t.has("isServer")){const o=new URLSearchParams(window.location.search).get("ws"),s=new URL(`../${o}`,window.location.toString());s.protocol=window.location.protocol==="https:"?"wss:":"ws:";const u=new C(new I(s));u.onLoadTraceRequested(async n=>{d(n.traceUrl?[n.traceUrl]:[]),v(!1),S(null)}),u.initialize({}).catch(()=>{})}else a.some(o=>o.startsWith("blob:"))||d(a)},[]),r.useEffect(()=>{(async()=>{if(l.length){const t=s=>{s.data.method==="progress"&&j(s.data.params)};navigator.serviceWorker.addEventListener("message",t),j({done:0,total:1});const a=[];for(let s=0;s<l.length;s++){const u=l[s],n=new URLSearchParams;n.set("trace",u),h.length&&n.set("traceFileName",h[s]),n.set("limit",String(l.length));const g=await fetch(`contexts?${n.toString()}`);if(!g.ok){i||d([]),S((await g.json()).error);return}a.push(...await g.json())}navigator.serviceWorker.removeEventListener("message",t);const o=new x(a);j({done:0,total:0}),L(o)}else L(P)})()},[i,l,h]);const D=w.done!==w.total&&w.total!==0;r.useEffect(()=>{if(D){const t=setTimeout(()=>{N(!0)},200);return()=>clearTimeout(t)}else N(!1)},[D]);const y=!!(!i&&!b&&!T&&(!l.length||E));return e.jsxs("div",{className:"vbox workbench-loader",onDragOver:t=>{t.preventDefault(),v(!0)},children:[e.jsxs("div",{className:"hbox header",...y?{inert:"true"}:{},children:[e.jsx("div",{className:"logo",children:e.jsx("img",{src:"playwright-logo.svg",alt:"Playwright logo"})}),e.jsx("div",{className:"product",children:"Playwright"}),f.title&&e.jsx("div",{className:"title",children:f.title}),e.jsx("div",{className:"spacer"}),e.jsx(z,{icon:"settings-gear",title:"Settings",dialogDataTestId:"settings-toolbar-dialog",children:e.jsx(O,{})})]}),e.jsx(U,{model:f,inert:y}),T&&e.jsxs("div",{className:"drop-target",children:[e.jsx("div",{children:"Trace Viewer uses Service Workers to show traces. To view trace:"}),e.jsxs("div",{style:{paddingTop:20},children:[e.jsxs("div",{children:["1. Click ",e.jsx("a",{href:T,children:"here"})," to put your trace into the download shelf"]}),e.jsxs("div",{children:["2. Go to ",e.jsx("a",{href:"https://trace.playwright.dev",children:"trace.playwright.dev"})]}),e.jsx("div",{children:"3. Drop the trace from the download shelf into the page"})]})]}),e.jsx(V,{open:W,isModal:!0,className:"progress-dialog",children:e.jsxs("div",{className:"progress-content",children:[e.jsx("div",{className:"title",role:"heading","aria-level":1,children:"Loading Playwright Trace..."}),e.jsx("div",{className:"progress-wrapper",children:e.jsx("div",{className:"inner-progress",style:{width:w.total?100*w.done/w.total+"%":0}})})]})}),y&&e.jsxs("div",{className:"drop-target",children:[e.jsx("div",{className:"processing-error",role:"alert",children:E}),e.jsx("div",{className:"title",role:"heading","aria-level":1,children:"Drop Playwright Trace to load"}),e.jsx("div",{children:"or"}),e.jsx("button",{onClick:()=>{const t=document.createElement("input");t.type="file",t.multiple=!0,t.click(),t.addEventListener("change",a=>F(a))},type:"button",children:"Select file(s)"}),e.jsx("div",{style:{maxWidth:400},children:"Playwright Trace Viewer is a Progressive Web App, it does not send your trace anywhere, it opens it locally."})]}),i&&!l.length&&e.jsx("div",{className:"drop-target",children:e.jsx("div",{className:"title",children:"Select test to see the trace"})}),b&&e.jsx("div",{className:"drop-target",onDragLeave:()=>{v(!1)},onDrop:t=>M(t),children:e.jsx("div",{className:"title",children:"Release to analyse the Playwright Trace"})})]})},P=new x([]),B=({traceJson:i})=>{const[c,l]=r.useState(void 0),[d,h]=r.useState(0),p=r.useRef(null);return r.useEffect(()=>(p.current&&clearTimeout(p.current),p.current=setTimeout(async()=>{try{const f=await G(i);l(f)}catch{const f=new x([]);l(f)}finally{h(d+1)}},500),()=>{p.current&&clearTimeout(p.current)}),[i,d]),e.jsx(U,{model:c,isLive:!0})};async function G(i){const c=new URLSearchParams;c.set("trace",i),c.set("limit","1");const d=await(await fetch(`contexts?${c.toString()}`)).json();return new x(d)}(async()=>{const i=new URLSearchParams(window.location.search);if($(),window.location.protocol!=="file:"){if(i.get("isUnderTest")==="true"&&await new Promise(h=>setTimeout(h,1e3)),!navigator.serviceWorker)throw new Error(`Service workers are not supported.
1
+ import{M as x,r,T as C,W as I,j as e,D as z,a as O,b as U,c as V,d as $,e as q}from"./assets/defaultSettingsView-XM8laJv9.js";const A=()=>{const[i,c]=r.useState(!1),[l,d]=r.useState([]),[h,p]=r.useState([]),[f,L]=r.useState(P),[w,j]=r.useState({done:0,total:0}),[b,v]=r.useState(!1),[E,S]=r.useState(null),[T,R]=r.useState(null),[W,N]=r.useState(!1),m=r.useCallback(t=>{const a=[],o=[],s=new URL(window.location.href);for(let n=0;n<t.length;n++){const g=t.item(n);if(!g)continue;const k=URL.createObjectURL(g);a.push(k),o.push(g.name),s.searchParams.append("trace",k),s.searchParams.append("traceFileName",g.name)}const u=s.toString();window.history.pushState({},"",u),d(a),p(o),v(!1),S(null)},[]);r.useEffect(()=>{const t=async a=>{var o;if((o=a.clipboardData)!=null&&o.files.length){for(const s of a.clipboardData.files)if(s.type!=="application/zip")return;a.preventDefault(),m(a.clipboardData.files)}};return document.addEventListener("paste",t),()=>document.removeEventListener("paste",t)}),r.useEffect(()=>{const t=a=>{const{method:o,params:s}=a.data;if(o!=="load"||!((s==null?void 0:s.trace)instanceof Blob))return;const u=new File([s.trace],"trace.zip",{type:"application/zip"}),n=new DataTransfer;n.items.add(u),m(n.files)};return window.addEventListener("message",t),()=>window.removeEventListener("message",t)});const M=r.useCallback(t=>{t.preventDefault(),m(t.dataTransfer.files)},[m]),F=r.useCallback(t=>{t.preventDefault(),t.target.files&&m(t.target.files)},[m]);r.useEffect(()=>{const t=new URL(window.location.href).searchParams,a=t.getAll("trace");c(t.has("isServer"));for(const o of a)if(o.startsWith("file:")){R(o||null);return}if(t.has("isServer")){const o=new URLSearchParams(window.location.search).get("ws"),s=new URL(`../${o}`,window.location.toString());s.protocol=window.location.protocol==="https:"?"wss:":"ws:";const u=new C(new I(s));u.onLoadTraceRequested(async n=>{d(n.traceUrl?[n.traceUrl]:[]),v(!1),S(null)}),u.initialize({}).catch(()=>{})}else a.some(o=>o.startsWith("blob:"))||d(a)},[]),r.useEffect(()=>{(async()=>{if(l.length){const t=s=>{s.data.method==="progress"&&j(s.data.params)};navigator.serviceWorker.addEventListener("message",t),j({done:0,total:1});const a=[];for(let s=0;s<l.length;s++){const u=l[s],n=new URLSearchParams;n.set("trace",u),h.length&&n.set("traceFileName",h[s]),n.set("limit",String(l.length));const g=await fetch(`contexts?${n.toString()}`);if(!g.ok){i||d([]),S((await g.json()).error);return}a.push(...await g.json())}navigator.serviceWorker.removeEventListener("message",t);const o=new x(a);j({done:0,total:0}),L(o)}else L(P)})()},[i,l,h]);const D=w.done!==w.total&&w.total!==0;r.useEffect(()=>{if(D){const t=setTimeout(()=>{N(!0)},200);return()=>clearTimeout(t)}else N(!1)},[D]);const y=!!(!i&&!b&&!T&&(!l.length||E));return e.jsxs("div",{className:"vbox workbench-loader",onDragOver:t=>{t.preventDefault(),v(!0)},children:[e.jsxs("div",{className:"hbox header",...y?{inert:"true"}:{},children:[e.jsx("div",{className:"logo",children:e.jsx("img",{src:"playwright-logo.svg",alt:"Playwright logo"})}),e.jsx("div",{className:"product",children:"Playwright"}),f.title&&e.jsx("div",{className:"title",children:f.title}),e.jsx("div",{className:"spacer"}),e.jsx(z,{icon:"settings-gear",title:"Settings",dialogDataTestId:"settings-toolbar-dialog",children:e.jsx(O,{})})]}),e.jsx(U,{model:f,inert:y}),T&&e.jsxs("div",{className:"drop-target",children:[e.jsx("div",{children:"Trace Viewer uses Service Workers to show traces. To view trace:"}),e.jsxs("div",{style:{paddingTop:20},children:[e.jsxs("div",{children:["1. Click ",e.jsx("a",{href:T,children:"here"})," to put your trace into the download shelf"]}),e.jsxs("div",{children:["2. Go to ",e.jsx("a",{href:"https://trace.playwright.dev",children:"trace.playwright.dev"})]}),e.jsx("div",{children:"3. Drop the trace from the download shelf into the page"})]})]}),e.jsx(V,{open:W,isModal:!0,className:"progress-dialog",children:e.jsxs("div",{className:"progress-content",children:[e.jsx("div",{className:"title",role:"heading","aria-level":1,children:"Loading Playwright Trace..."}),e.jsx("div",{className:"progress-wrapper",children:e.jsx("div",{className:"inner-progress",style:{width:w.total?100*w.done/w.total+"%":0}})})]})}),y&&e.jsxs("div",{className:"drop-target",children:[e.jsx("div",{className:"processing-error",role:"alert",children:E}),e.jsx("div",{className:"title",role:"heading","aria-level":1,children:"Drop Playwright Trace to load"}),e.jsx("div",{children:"or"}),e.jsx("button",{onClick:()=>{const t=document.createElement("input");t.type="file",t.multiple=!0,t.click(),t.addEventListener("change",a=>F(a))},type:"button",children:"Select file(s)"}),e.jsx("div",{style:{maxWidth:400},children:"Playwright Trace Viewer is a Progressive Web App, it does not send your trace anywhere, it opens it locally."})]}),i&&!l.length&&e.jsx("div",{className:"drop-target",children:e.jsx("div",{className:"title",children:"Select test to see the trace"})}),b&&e.jsx("div",{className:"drop-target",onDragLeave:()=>{v(!1)},onDrop:t=>M(t),children:e.jsx("div",{className:"title",children:"Release to analyse the Playwright Trace"})})]})},P=new x([]),B=({traceJson:i})=>{const[c,l]=r.useState(void 0),[d,h]=r.useState(0),p=r.useRef(null);return r.useEffect(()=>(p.current&&clearTimeout(p.current),p.current=setTimeout(async()=>{try{const f=await G(i);l(f)}catch{const f=new x([]);l(f)}finally{h(d+1)}},500),()=>{p.current&&clearTimeout(p.current)}),[i,d]),e.jsx(U,{model:c,isLive:!0})};async function G(i){const c=new URLSearchParams;c.set("trace",i),c.set("limit","1");const d=await(await fetch(`contexts?${c.toString()}`)).json();return new x(d)}(async()=>{const i=new URLSearchParams(window.location.search);if($(),window.location.protocol!=="file:"){if(i.get("isUnderTest")==="true"&&await new Promise(h=>setTimeout(h,1e3)),!navigator.serviceWorker)throw new Error(`Service workers are not supported.
2
2
  Make sure to serve the Trace Viewer (${window.location}) via HTTPS or localhost.`);navigator.serviceWorker.register("sw.bundle.js"),navigator.serviceWorker.controller||await new Promise(h=>{navigator.serviceWorker.oncontrollerchange=()=>h()}),setInterval(function(){fetch("ping")},1e4)}const c=i.get("trace"),d=(c==null?void 0:c.endsWith(".json"))?e.jsx(B,{traceJson:c}):e.jsx(A,{});q.createRoot(document.querySelector("#root")).render(d)})();
@@ -7,8 +7,8 @@
7
7
  <link rel="icon" href="./playwright-logo.svg" type="image/svg+xml">
8
8
  <link rel="manifest" href="./manifest.webmanifest">
9
9
  <title>Playwright Trace Viewer</title>
10
- <script type="module" crossorigin src="./index.BIiN4xVX.js"></script>
11
- <link rel="modulepreload" crossorigin href="./assets/defaultSettingsView-htM0IBWp.js">
10
+ <script type="module" crossorigin src="./index.BdwOsQ8G.js"></script>
11
+ <link rel="modulepreload" crossorigin href="./assets/defaultSettingsView-XM8laJv9.js">
12
12
  <link rel="stylesheet" crossorigin href="./defaultSettingsView.CKxaMsyM.css">
13
13
  <link rel="stylesheet" crossorigin href="./index.BFsek2M6.css">
14
14
  </head>