playwright-core 1.55.0 → 1.55.1-beta-1758616458000
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.
- package/bin/reinstall_chrome_beta_mac.sh +1 -1
- package/bin/reinstall_chrome_stable_mac.sh +1 -1
- package/bin/reinstall_msedge_beta_mac.sh +1 -1
- package/bin/reinstall_msedge_dev_mac.sh +1 -1
- package/bin/reinstall_msedge_stable_mac.sh +1 -1
- package/browsers.json +4 -4
- package/lib/generated/injectedScriptSource.js +1 -1
- package/lib/server/deviceDescriptorsSource.json +54 -54
- package/lib/vite/htmlReport/index.html +1 -1
- package/lib/vite/traceViewer/assets/{codeMirrorModule-B9MwJ51G.js → codeMirrorModule-CEFqZ5b3.js} +1 -1
- package/lib/vite/traceViewer/assets/{defaultSettingsView-Do_wwdKw.js → defaultSettingsView-BA25Usqk.js} +3 -3
- package/lib/vite/traceViewer/{index.BZPYnuWQ.js → index.CheexZ4_.js} +1 -1
- package/lib/vite/traceViewer/index.html +2 -2
- package/lib/vite/traceViewer/{uiMode.9zHYMU6d.js → uiMode.Dy4dnPNW.js} +1 -1
- package/lib/vite/traceViewer/uiMode.html +2 -2
- package/package.json +1 -1
package/lib/vite/traceViewer/assets/{codeMirrorModule-B9MwJ51G.js → codeMirrorModule-CEFqZ5b3.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as Wu}from"./defaultSettingsView-Do_wwdKw.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&>.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{n as Wu}from"./defaultSettingsView-BA25Usqk.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&>.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-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./codeMirrorModule-CEFqZ5b3.js","../codeMirrorModule.C3UTv-Ge.css"])))=>i.map(i=>d[i]);
|
|
2
2
|
var p0=Object.defineProperty;var m0=(t,e,n)=>e in t?p0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var be=(t,e,n)=>m0(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 g0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var uu={exports:{}},Ti={},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`},PS=({diff:t,noTargetBlank:e,hideDetails:n})=>{const[r,o]=$.useState(t.diff?"diff":"actual"),[l,c]=$.useState(!1),[u,d]=$.useState(null),[p,g]=$.useState("Expected"),[y,v]=$.useState(null),[x,E]=$.useState(null),[S,k]=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)),E(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,F={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:k,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:{...F,fontWeight:r==="diff"?600:"initial"},onClick:()=>o("diff"),children:"Diff"}),w.jsx("div",{style:{...F,fontWeight:r==="actual"?600:"initial"},onClick:()=>o("actual"),children:"Actual"}),w.jsx("div",{style:{...F,fontWeight:r==="expected"?600:"initial"},onClick:()=>o("expected"),children:p}),w.jsx("div",{style:{...F,fontWeight:r==="sxs"?600:"initial"},onClick:()=>o("sxs"),children:"Side by side"}),w.jsx("div",{style:{...F,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:p,hideSize:n,canvasWidth:z,canvasHeight:q,scale:R}),t.diff&&r==="slider"&&w.jsx(OS,{expectedImage:u,actualImage:y,hideSize:n,canvasWidth:z,canvasHeight:q,scale:R,expectedTitle:p}),t.diff&&r==="sxs"&&w.jsxs("div",{style:{display:"flex"},children:[w.jsx(En,{image:u,title:p,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:p,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:p,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})})]})]})})},OS=({expectedImage:t,actualImage:e,canvasWidth:n,canvasHeight:r,scale:o,expectedTitle:l,hideSize:c})=>{const u={position:"absolute",top:0,left:0},[d,p]=$.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(hg,{orientation:"horizontal",offsets:[d],setOffsets:y=>p(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})})]}),RS="modulepreload",$S=function(t,e){return new URL(t,e).href},Jp={},DS=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]"),p=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));o=c(n.map(g=>{if(g=$S(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 k=u[S];if(k.href===g&&(!y||k.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${g}"]${v}`))return;const E=document.createElement("link");if(E.rel=y?"stylesheet":RS,y||(E.as="script"),E.crossOrigin="",E.href=g,p&&E.setAttribute("nonce",p),document.head.appendChild(E),y)return new Promise((S,k)=>{E.addEventListener("load",S),E.addEventListener("error",()=>k(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)})},FS=20,Ns=({text:t,highlighter:e,mimeType:n,linkify:r,readOnly:o,highlight:l,revealLine:c,lineNumbers:u,isFocused:d,focusOnChange:p,wrapLines:g,onChange:y,dataTestId:v,placeholder:x})=>{const[E,S]=jr(),[k]=$.useState(DS(()=>import("./codeMirrorModule-B9MwJ51G.js"),__vite__mapDeps([0,1]),import.meta.url).then(R=>R.default)),C=$.useRef(null),[A,U]=$.useState();return $.useEffect(()=>{(async()=>{var F,j;const R=await k;zS(R);const D=S.current;if(!D)return;const z=HS(e)||US(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=(F=C.current)==null?void 0:F.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})()},[k,A,S,e,n,r,u,g,o,d,x]),$.useEffect(()=>{C.current&&C.current.cm.setSize(E.width,E.height)},[E]),$.useLayoutEffect(()=>{var z;if(!A)return;let R=!1;if(A.getValue()!==t&&(A.setValue(t),R=!0,p&&(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=[],F=[];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||"",F.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=F}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,p,y]),w.jsx("div",{"data-testid":v,className:"cm-wrapper",ref:S,onClick:BS})};function BS(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 zS(t){Xp||(Xp=!0,t.defineSimpleMode("text/linkified",{start:[{regex:Rm,token:"linkified"}]}))}function US(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 HS(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 qS(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 VS=({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 pg(t){const e=[];let n=0,r;for(;(r=Rm.exec(t))!==null;){const l=t.substring(n,r.index);l&&e.push(l);const c=r[0];e.push(WS(c)),n=r.index+c.length}const o=t.substring(n);return o&&e.push(o),e}function WS(t){let e=t;return e.startsWith("www.")&&(e="https://"+e),w.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:t})}const KS=({attachment:t,reveal:e})=>{const[n,r]=$.useState(!1),[o,l]=$.useState(null),[c,u]=$.useState(null),[d,p]=_0(),g=$.useRef(null),y=qS(t.contentType),v=!!t.sha1||!!t.path;$.useEffect(()=>{var S;if(e)return(S=g.current)==null||S.scrollIntoView({behavior:"smooth"}),p()},[e,p]),$.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`},PS=({diff:t,noTargetBlank:e,hideDetails:n})=>{const[r,o]=$.useState(t.diff?"diff":"actual"),[l,c]=$.useState(!1),[u,d]=$.useState(null),[p,g]=$.useState("Expected"),[y,v]=$.useState(null),[x,E]=$.useState(null),[S,k]=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)),E(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,F={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:k,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:{...F,fontWeight:r==="diff"?600:"initial"},onClick:()=>o("diff"),children:"Diff"}),w.jsx("div",{style:{...F,fontWeight:r==="actual"?600:"initial"},onClick:()=>o("actual"),children:"Actual"}),w.jsx("div",{style:{...F,fontWeight:r==="expected"?600:"initial"},onClick:()=>o("expected"),children:p}),w.jsx("div",{style:{...F,fontWeight:r==="sxs"?600:"initial"},onClick:()=>o("sxs"),children:"Side by side"}),w.jsx("div",{style:{...F,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:p,hideSize:n,canvasWidth:z,canvasHeight:q,scale:R}),t.diff&&r==="slider"&&w.jsx(OS,{expectedImage:u,actualImage:y,hideSize:n,canvasWidth:z,canvasHeight:q,scale:R,expectedTitle:p}),t.diff&&r==="sxs"&&w.jsxs("div",{style:{display:"flex"},children:[w.jsx(En,{image:u,title:p,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:p,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:p,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})})]})]})})},OS=({expectedImage:t,actualImage:e,canvasWidth:n,canvasHeight:r,scale:o,expectedTitle:l,hideSize:c})=>{const u={position:"absolute",top:0,left:0},[d,p]=$.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(hg,{orientation:"horizontal",offsets:[d],setOffsets:y=>p(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})})]}),RS="modulepreload",$S=function(t,e){return new URL(t,e).href},Jp={},DS=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]"),p=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));o=c(n.map(g=>{if(g=$S(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 k=u[S];if(k.href===g&&(!y||k.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${g}"]${v}`))return;const E=document.createElement("link");if(E.rel=y?"stylesheet":RS,y||(E.as="script"),E.crossOrigin="",E.href=g,p&&E.setAttribute("nonce",p),document.head.appendChild(E),y)return new Promise((S,k)=>{E.addEventListener("load",S),E.addEventListener("error",()=>k(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)})},FS=20,Ns=({text:t,highlighter:e,mimeType:n,linkify:r,readOnly:o,highlight:l,revealLine:c,lineNumbers:u,isFocused:d,focusOnChange:p,wrapLines:g,onChange:y,dataTestId:v,placeholder:x})=>{const[E,S]=jr(),[k]=$.useState(DS(()=>import("./codeMirrorModule-CEFqZ5b3.js"),__vite__mapDeps([0,1]),import.meta.url).then(R=>R.default)),C=$.useRef(null),[A,U]=$.useState();return $.useEffect(()=>{(async()=>{var F,j;const R=await k;zS(R);const D=S.current;if(!D)return;const z=HS(e)||US(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=(F=C.current)==null?void 0:F.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})()},[k,A,S,e,n,r,u,g,o,d,x]),$.useEffect(()=>{C.current&&C.current.cm.setSize(E.width,E.height)},[E]),$.useLayoutEffect(()=>{var z;if(!A)return;let R=!1;if(A.getValue()!==t&&(A.setValue(t),R=!0,p&&(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=[],F=[];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||"",F.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=F}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,p,y]),w.jsx("div",{"data-testid":v,className:"cm-wrapper",ref:S,onClick:BS})};function BS(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 zS(t){Xp||(Xp=!0,t.defineSimpleMode("text/linkified",{start:[{regex:Rm,token:"linkified"}]}))}function US(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 HS(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 qS(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 VS=({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 pg(t){const e=[];let n=0,r;for(;(r=Rm.exec(t))!==null;){const l=t.substring(n,r.index);l&&e.push(l);const c=r[0];e.push(WS(c)),n=r.index+c.length}const o=t.substring(n);return o&&e.push(o),e}function WS(t){let e=t;return e.startsWith("www.")&&(e="https://"+e),w.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:t})}const KS=({attachment:t,reveal:e})=>{const[n,r]=$.useState(!1),[o,l]=$.useState(null),[c,u]=$.useState(null),[d,p]=_0(),g=$.useRef(null),y=qS(t.contentType),v=!!t.sha1||!!t.path;$.useEffect(()=>{var S;if(e)return(S=g.current)==null||S.scrollIntoView({behavior:"smooth"}),p()},[e,p]),$.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)*FS},[o]),E=w.jsxs("span",{style:{marginLeft:5},ref:g,"aria-label":t.name,children:[w.jsx("span",{children:pg(t.name)}),v&&w.jsx("a",{style:{marginLeft:5},href:Ml(t),children:"download"})]});return!y||!v?w.jsx("div",{style:{marginLeft:20},children:E}):w.jsxs("div",{className:ze(d&&"yellow-flash"),children:[w.jsx(VS,{title:E,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(Ns,{text:o,readOnly:!0,mimeType:t.contentType,linkify:!0,lineNumbers:!0,wrapLines:!1})})]})},GS=({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 p=d.name.match(/^(.*)-(expected|actual|diff)\.png$/);if(p){const g=p[1],y=p[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(PS,{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(KS,{attachment:l,reveal:e&&QS(l,e[0])?e:void 0})},JS(l,c)))]})};function QS(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 JS(t,e){return e+"-"+(t.sha1?"sha1-"+t.sha1:"path-"+t.path)}const XS=`
|
|
51
51
|
# Instructions
|
|
52
52
|
|
|
@@ -99,7 +99,7 @@ ${o}}`}stringLiteral(e){return JSON.stringify(e)}}class x1{generatePlaywrightReq
|
|
|
99
99
|
|
|
100
100
|
`+e.value+`
|
|
101
101
|
`+" ".repeat(o.pos)+`^
|
|
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(),Sg(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 xg={};function J1(t){xg=t}function oa(t,e){for(;e;){if(t.contains(e))return!0;e=Eg(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 _g(t){let e=t;for(;e.parentNode;)e=e.parentNode;if(e.nodeType===11||e.nodeType===9)return e}function Eg(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=Eg(t)}}function rr(t,e){return t.ownerDocument&&t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,e):void 0}function kg(t,e){if(e=e??rr(t),!e)return!0;if(Element.prototype.checkVisibility&&xg.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};if(e.display==="contents"){for(let r=t.firstChild;r;r=r.nextSibling){if(r.nodeType===1&&Zn(r))return{visible:!0,style:e};if(r.nodeType===3&&bg(r))return{visible:!0,style:e}}return{visible:!1,style:e}}if(!kg(t,e))return{style:e,visible:!1};const n=t.getBoundingClientRect();return{rect:n,style:e,visible:n.width>0&&n.height>0}}function Zn(t){return Gl(t).visible}function bg(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]",X1=[["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 Tg(t,e){return X1.some(([n,r])=>!(r!=null&&r.includes(e||""))&&t.hasAttribute(n))}function Cg(t){return!Number.isNaN(Number(String(t.getAttribute("tabindex"))))}function Y1(t){return!Fg(t)&&(Z1(t)||Cg(t))}function Z1(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")&&!Tg(t)&&!Cg(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=js(t,t.getAttribute("list"))[0];return n&&Ye(n)==="DATALIST"?"combobox":"textbox"}return e==="hidden"?null:e==="file"?"button":mx[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"},ex={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=ex[Ye(n)];if(!l||!o||!l.includes(Ye(o)))break;const c=Ql(o);if((c==="none"||c==="presentation")&&!Ng(o,c))return c;n=o}return e}const tx=["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=>tx.includes(n))||null}function Ng(t,e){return Tg(t,e)||Y1(t)}function rt(t){const e=Ql(t);if(!e)return nm(t);if(e==="none"||e==="presentation"){const n=nm(t);if(Ng(t,n))return n}return e}function Ag(t){return t===null?void 0:t.toLowerCase()==="true"}function Ig(t){return["STYLE","SCRIPT","NOSCRIPT","TEMPLATE"].includes(Ye(t))}function Bt(t){if(Ig(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&&!Bt(o)||o.nodeType===3&&bg(o))return!1;return!0}return!(t.nodeName==="OPTION"&&!!t.closest("select"))&&!n&&!kg(t,e)?!0:Lg(t)}function Lg(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"||Ag(t.getAttribute("aria-hidden"))===!0||t.getAttribute("inert")!==null}if(!e){const n=at(t);n&&(e=Lg(n))}Xn==null||Xn.set(t,e)}return e}function js(t,e){if(!e)return[];const n=_g(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 Fi(t){return t.split(" ").map(e=>e.replace(/\r\n/g,`
|
|
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(),Sg(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 xg={};function J1(t){xg=t}function oa(t,e){for(;e;){if(t.contains(e))return!0;e=Eg(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 _g(t){let e=t;for(;e.parentNode;)e=e.parentNode;if(e.nodeType===11||e.nodeType===9)return e}function Eg(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=Eg(t)}}function rr(t,e){return t.ownerDocument&&t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,e):void 0}function kg(t,e){if(e=e??rr(t),!e)return!0;if(Element.prototype.checkVisibility&&xg.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};if(e.display==="contents"){for(let r=t.firstChild;r;r=r.nextSibling){if(r.nodeType===1&&Zn(r))return{visible:!0,style:e};if(r.nodeType===3&&bg(r))return{visible:!0,style:e}}return{visible:!1,style:e}}if(!kg(t,e))return{style:e,visible:!1};const n=t.getBoundingClientRect();return{rect:n,style:e,visible:n.width>0&&n.height>0}}function Zn(t){return Gl(t).visible}function bg(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]",X1=[["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 Tg(t,e){return X1.some(([n,r])=>!(r!=null&&r.includes(e||""))&&t.hasAttribute(n))}function Cg(t){return!Number.isNaN(Number(String(t.getAttribute("tabindex"))))}function Y1(t){return!Fg(t)&&(Z1(t)||Cg(t))}function Z1(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")&&!Tg(t)&&!Cg(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=js(t,t.getAttribute("list"))[0];return n&&Ye(n)==="DATALIST"?"combobox":"textbox"}return e==="hidden"?null:e==="file"?"button":mx[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"},ex={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=ex[Ye(n)];if(!l||!o||!l.includes(Ye(o)))break;const c=Ql(o);if((c==="none"||c==="presentation")&&!Ng(o,c))return c;n=o}return e}const tx=["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=>tx.includes(n))||null}function Ng(t,e){return Tg(t,e)||Y1(t)}function rt(t){const e=Ql(t);if(!e)return nm(t);if(e==="none"||e==="presentation"){const n=nm(t);if(Ng(t,n))return n}return e}function Ag(t){return t===null?void 0:t.toLowerCase()==="true"}function Ig(t){return["STYLE","SCRIPT","NOSCRIPT","TEMPLATE"].includes(Ye(t))}function Bt(t){if(Ig(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&&!Bt(o)||o.nodeType===3&&bg(o))return!1;return!0}return!(t.nodeName==="OPTION"&&!!t.closest("select"))&&!n&&!kg(t,e)?!0:Lg(t)}function Lg(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"||Ag(t.getAttribute("aria-hidden"))===!0}if(!e){const n=at(t);n&&(e=Lg(n))}Xn==null||Xn.set(t,e)}return e}function js(t,e){if(!e)return[];const n=_g(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 Fi(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 js(t,t.getAttribute("aria-owns")))r.matches(e)&&n.push(r),n.push(...r.querySelectorAll(e));return n}function Bi(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=nx(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 nx(t,e,n){if(!(!e||e==="none"||e==="normal"))try{let r=zm(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 Mg(t){const e=t.getAttribute("aria-labelledby");if(e===null)return null;const n=js(t,e);return n.length?n:null}function rx(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=Fi(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=js(t,t.getAttribute("aria-describedby"));r=Fi(o.map(l=>tn(l,{includeHidden:e,visitedElements:new Set,embeddedInDescribedBy:{element:l,hidden:Bt(l)}})).join(" "))}else t.hasAttribute("aria-description")?r=Fi(t.getAttribute("aria-description")||""):r=Fi(t.getAttribute("title")||"");n==null||n.set(t,r)}return r}function sx(t){const e=t.getAttribute("aria-invalid");return!e||e.trim()===""||e.toLocaleLowerCase()==="false"?"false":e==="true"||e==="grammar"||e==="spelling"?e:"true"}function ix(t){if("validity"in t){const e=t.validity;return(e==null?void 0:e.valid)===!1}return!1}function ox(t){const e=ws;let n=ws==null?void 0:ws.get(t);if(n===void 0){n="";const r=sx(t)!=="false",o=ix(t);if(r||o){const l=t.getAttribute("aria-errormessage");n=js(t,l).map(d=>Fi(tn(d,{visitedElements:new Set,embeddedInDescribedBy:{element:d,hidden:Bt(d)}}))).join(" ").trim()}e==null||e.set(t,n)}return n}function tn(t,e){var d,p,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)||!!((p=e.embeddedInDescribedBy)!=null&&p.hidden)||!!((g=e.embeddedInNativeTextAlternative)!=null&&g.hidden)||!!((y=e.embeddedInLabel)!=null&&y.hidden);if(Ig(t)||!v&&Bt(t))return e.visitedElements.add(t),""}const r=Mg(t);if(!e.embeddedInLabelledBy){const v=(r||[]).map(x=>tn(x,{...e,embeddedInLabelledBy:{element:x,hidden:Bt(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 E;if(l==="SELECT")E=[...t.selectedOptions],!E.length&&t.options.length&&E.push(t.options[0]);else{const S=o==="combobox"?rm(t,"*").find(k=>rt(k)==="listbox"):t;E=S?rm(S,'[aria-selected="true"]').filter(k=>rt(k)==="option"):[]}return!E.length&&l==="INPUT"?t.value:E.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?Ni(v,e):"Choose File"}if(l==="INPUT"&&t.type==="image"){e.visitedElements.add(t);const v=t.labels||[];if(v.length&&!e.embeddedInLabelledBy)return Ni(v,e);const x=t.getAttribute("alt")||"";if(kn(x))return x;const E=t.getAttribute("title")||"";return kn(E)?E:"Submit"}if(!r&&l==="BUTTON"){e.visitedElements.add(t);const v=t.labels||[];if(v.length)return Ni(v,e)}if(!r&&l==="OUTPUT"){e.visitedElements.add(t);const v=t.labels||[];return v.length?Ni(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 Ni(v,e);const x=l==="INPUT"&&["text","password","search","tel","email","url"].includes(t.type)||l==="TEXTAREA",E=t.getAttribute("placeholder")||"",S=t.getAttribute("title")||"";return!x||S?S:E}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:Bt(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:Bt(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:Bt(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:Bt(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(rx(o,e.embeddedInTargetElement==="descendant")||u||e.embeddedInLabelledBy||e.embeddedInDescribedBy||e.embeddedInLabel||e.embeddedInNativeTextAlternative){e.visitedElements.add(t);const v=lx(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 lx(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 p=tn(l,e);(d!=="inline"||l.nodeName==="BR")&&(p=" "+p+" "),n.push(p)}else l.nodeType===3&&n.push(l.textContent||"")};n.push(Bi(t,"::before")||"");const o=Bi(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 js(t,t.getAttribute("aria-owns")))r(c,!0)}}return n.push(Bi(t,"::after")||""),n.join("")}const of=["gridcell","option","row","tab","rowheader","columnheader","treeitem"];function jg(t){return Ye(t)==="OPTION"?t.selected:of.includes(rt(t)||"")?Ag(t.getAttribute("aria-selected"))===!0:!1}const lf=["checkbox","menuitemcheckbox","option","radio","switch","menuitemradio","treeitem"];function Pg(t){const e=af(t,!0);return e==="error"?!1:e}function ax(t){return af(t,!0)}function cx(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 ux=["checkbox","combobox","grid","gridcell","listbox","radiogroup","slider","spinbutton","textbox","columnheader","rowheader","searchbox","switch","treegrid"];function fx(t){const e=Ye(t);return["INPUT","TEXTAREA","SELECT"].includes(e)?t.hasAttribute("readonly"):ux.includes(rt(t)||"")?t.getAttribute("aria-readonly")==="true":t.isContentEditable?!1:"error"}const cf=["button"];function Og(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 Rg(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 $g(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 Dg=["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)||Bg(t)}function Fg(t){return["BUTTON","INPUT","SELECT","TEXTAREA","OPTION","OPTGROUP"].includes(Ye(t))&&(t.hasAttribute("disabled")||dx(t)||hx(t))}function dx(t){return Ye(t)==="OPTION"&&!!t.closest("OPTGROUP[DISABLED]")}function hx(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 Bg(t,e=!1){if(!t)return!1;if(e||Dg.includes(rt(t)||"")){const n=(t.getAttribute("aria-disabled")||"").toLowerCase();return n==="true"?!0:n==="false"?!1:Bg(at(t),!0)}return!1}function Ni(t,e){return[...t].map(n=>tn(n,{...e,embeddedInLabel:{element:n,hidden:Bt(n)},embeddedInNativeTextAlternative:void 0,embeddedInLabelledBy:void 0,embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0})).filter(n=>!!n).join(" ")}function px(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,ws,Xn,gf,yf,vf,wf,zg=0;function Sf(){++zg,df??(df=new Map),hf??(hf=new Map),pf??(pf=new Map),mf??(mf=new Map),ws??(ws=new Map),Xn??(Xn=new Map),gf??(gf=new Map),yf??(yf=new Map),vf??(vf=new Map),wf??(wf=new Map)}function xf(){--zg||(df=void 0,hf=void 0,pf=void 0,mf=void 0,ws=void 0,Xn=void 0,gf=void 0,yf=void 0,vf=void 0,wf=void 0)}const mx={button:"button",checkbox:"checkbox",image:"button",number:"spinbutton",radio:"radio",range:"slider",reset:"button",submit:"button"};function gx(t){return Ug(t)?"'"+t.replace(/'/g,"''")+"'":t}function vu(t){return Ug(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
104
|
`:return"\\n";case"\r":return"\\r";case" ":return"\\t";default:return"\\x"+e.charCodeAt(0).toString(16).padStart(2,"0")}})+'"':t}function Ug(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 yx=0;function Hg(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=Hg(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,p)=>{if(r.has(d))return;if(r.add(d),d.nodeType===Node.TEXT_NODE&&d.nodeValue){if(!p)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=!Bt(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 k of S){const C=t.ownerDocument.getElementById(k);C&&x.push(C)}}const E=v?vx(g,n):null;E&&(E.ref&&(o.elements.set(E.ref,g),o.refs.set(g,E.ref)),u.children.push(E)),c(E||u,g,x,v)};function c(u,d,p,g){var E;const v=(((E=rr(d))==null?void 0:E.display)||"inline")!=="inline"||d.nodeName==="BR"?" ":"";v&&u.children.push(v),u.children.push(Bi(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 p)l(u,S,g);if(u.children.push(Bi(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}}Sf();try{l(o.root,t,!0)}finally{xf()}return Sx(o.root),wx(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"+ ++yx},t.element._ariaRef=n),t.ref=n.ref}function vx(t,e){const n=t.ownerDocument.activeElement===t;if(t.nodeName==="IFRAME"){const d={role:"iframe",name:"",children:[],props:{},element:t,box:Gl(t),receivesPointerEvents:!0,active:n};return im(d,e),d}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=px(t),u={role:o,name:l,children:[],props:{},element:t,box:Gl(t),receivesPointerEvents:c,active:n};return im(u,e),lf.includes(o)&&(u.checked=Pg(t)),Dg.includes(o)&&(u.disabled=Jl(t)),uf.includes(o)&&(u.expanded=Rg(t)),ff.includes(o)&&(u.level=$g(t)),cf.includes(o)&&(u.pressed=Og(t)),of.includes(o)&&(u.selected=jg(t)),(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)&&t.type!=="checkbox"&&t.type!=="radio"&&t.type!=="file"&&(u.children=[t.value]),u}function wx(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 Sx(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 xx(t,e){return _f(t,e.text)}function _x(t,e){return _f(t,e.name)}function Ex(t,e){const n=zi(t,{mode:"expect"});return{matches:qg(n.root,e,!1,!1),received:{raw:Xl(n,{mode:"expect"}),regex:Xl(n,{mode:"codegen"})}}}function kx(t,e){const n=zi(t,{mode:"expect"}).root;return qg(n,e,!0,!1).map(o=>o.element)}function Ef(t,e,n){var r;return typeof t=="string"&&e.kind==="text"?xx(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||!_x(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 qg(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=Hg(e),r=[],o=n.renderStringsAsRegex?Tx:()=>!0,l=n.renderStringsAsRegex?bx:d=>d,c=(d,p,g)=>{if(typeof d=="string"){if(p&&!o(p,d))return;const E=vu(l(d));E&&r.push(g+"- text: "+E);return}let y=d.role;if(d.name&&d.name.length<=900){const E=l(d.name);if(E){const S=E.startsWith("/")&&E.endsWith("/")?E:JSON.stringify(E);y+=" "+S}}d.checked==="mixed"&&(y+=" [checked=mixed]"),d.checked===!0&&(y+=" [checked]"),d.disabled&&(y+=" [disabled]"),d.expanded&&(y+=" [expanded]"),d.active&&n.renderActive&&(y+=" [active]"),d.level&&(y+=` [level=${d.level}]`),d.pressed==="mixed"&&(y+=" [pressed=mixed]"),d.pressed===!0&&(y+=" [pressed]"),d.selected===!0&&(y+=" [selected]"),d.ref&&(y+=` [ref=${d.ref}]`,n.renderCursorPointer&&Cx(d)&&(y+=" [cursor=pointer]"));const v=g+"- "+gx(y),x=!!Object.keys(d.props).length;if(!d.children.length&&!x)r.push(v);else if(d.children.length===1&&typeof d.children[0]=="string"&&!x){const E=o(d,d.children[0])?l(d.children[0]):null;E?r.push(v+": "+vu(E)):r.push(v)}else{r.push(v+":");for(const[E,S]of Object.entries(d.props))r.push(g+" - /"+E+": "+vu(S));for(const E of d.children||[])c(E,d,g+" ")}},u=t.root;if(u.role==="fragment")for(const d of u.children||[])c(d,u,"");else c(u,null,"");return r.join(`
|
|
105
105
|
`)}function bx(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 p=0;p<d.length;p++)if(d[p]){const{replacement:g}=e[p];n+=g;break}return r=u+l.length,l}),n?(n+=Vl(t.slice(r)),String(new RegExp(n))):t}function Tx(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?dS(e,t.name):"";let r=e;for(;n&&r.includes(n);)r=r.replace(n,"");return r.trim().length/e.length>.1}function Cx(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 Nx(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 Ax(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 Ix(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 Lx(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 Mx(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 jx=["left-of","right-of","above","below","near"];function Vg(t,e,n,r){const o=e.getBoundingClientRect(),l={"left-of":Ax,"right-of":Nx,above:Ix,below:Lx,near:Mx}[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 Wg(t,e){for(const n of e.jsonPath)t!=null&&(t=t[n]);return Kg(t,e)}function Kg(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 Gg(t,e){const n=Mg(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 Px(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 Ox(t){var e;return t.key??((e=t._currentElement)==null?void 0:e.key)}function Rx(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 $x(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 Qg(t){var r;const e={key:Ox(t),name:Px(t),children:Rx(t).map(Qg),rootElements:[],props:$x(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 Jg(t,e,n=[]){e(t)&&n.push(t);for(const r of t.children)Jg(r,e,n);return n}function Xg(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&&Xg(u,e)}while(r.nextNode());return e}const Dx=()=>({queryAll(t,e){const{name:n,attributes:r}=Ir(e,!1),c=Xg(t.ownerDocument||t).map(d=>Qg(d)).map(d=>Jg(d,p=>{const g=p.props??{};if(p.key!==void 0&&(g.key=p.key),n&&p.name!==n||p.rootElements.some(y=>!oa(t,y)))return!1;for(const y of r)if(!Wg(g,y))return!1;return!0})).flat(),u=new Set;for(const d of c)for(const p of d.rootElements)u.add(p);return[...u]}}),Yg=["selected","checked","pressed","expanded","level","disabled","name","include-hidden"];Yg.sort();function Ai(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 Fx(t,e){const n={role:e};for(const r of t)switch(r.name){case"checked":{Ai(r.name,lf,e),us(r,[!0,!1,"mixed"]),fs(r,["<truthy>","="]),n.checked=r.op==="<truthy>"?!0:r.value;break}case"pressed":{Ai(r.name,cf,e),us(r,[!0,!1,"mixed"]),fs(r,["<truthy>","="]),n.pressed=r.op==="<truthy>"?!0:r.value;break}case"selected":{Ai(r.name,of,e),us(r,[!0,!1]),fs(r,["<truthy>","="]),n.selected=r.op==="<truthy>"?!0:r.value;break}case"expanded":{Ai(r.name,uf,e),us(r,[!0,!1]),fs(r,["<truthy>","="]),n.expanded=r.op==="<truthy>"?!0:r.value;break}case"level":{if(Ai(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 ${Yg.map(o=>`"${o}"`).join(", ")}.`)}return n}function Bx(t,e,n){const r=[],o=c=>{if(rt(c)===e.role&&!(e.selected!==void 0&&jg(c)!==e.selected)&&!(e.checked!==void 0&&Pg(c)!==e.checked)&&!(e.pressed!==void 0&&Og(c)!==e.pressed)&&!(e.expanded!==void 0&&Rg(c)!==e.expanded)&&!(e.level!==void 0&&$g(c)!==e.level)&&!(e.disabled!==void 0&&Jl(c)!==e.disabled)&&!(!e.includeHidden&&Bt(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="*="),!Kg(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=Fx(r.attributes,o);Sf();try{return Bx(e,l,t)}finally{xf()}}}}class zx{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",qx),this._engines.set("is",Oi),this._engines.set("where",Oi),this._engines.set("has",Ux),this._engines.set("scope",Hx),this._engines.set("light",Vx),this._engines.set("visible",Wx),this._engines.set("text",Kx),this._engines.set("text-is",Gx),this._engines.set("text-matches",Qx),this._engines.set("has-text",Jx),this._engines.set("right-of",Ii("right-of")),this._engines.set("left-of",Ii("left-of")),this._engines.set("above",Ii("above")),this._engines.set("below",Ii("below")),this._engines.set("near",Ii("near")),this._engines.set("nth-match",Xx);const e=[...this._engines.keys()];e.sort();const n=[...ig];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((p,g)=>d.rest[g]===p));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),p=this._scoreMap.get(u);return d===p?0:d===void 0?1:p===void 0?-1:d-p}),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(p=>this._matchesEngine(d,p,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(p=>this._matchesEngine(d,p,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:Zg(r)}},Ux={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}},Hx={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]:[]}},qx={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)}},Vx={query(t,e,n){return n.query({...t,pierceShadow:!1},e)},matches(t,e,n,r){return r.matches(t,e,{...n,pierceShadow:!1})}},Wx={matches(t,e,n,r){if(e.length)throw new Error('"visible" engine expects no arguments');return Zn(t)}},Kx={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"}},Gx={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"}},Qx={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"}},Jx={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 Ii(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=Vg(t,e,u,l);return d===void 0?!1:(o._markScore(e,d),!0)}}}const Xx={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 Zg(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 p=c.firstElementChild;for(;p&&u.children.length<d.size;)d.has(p)&&u.children.push(p),p=p.nextElementSibling;for(p=c.shadowRoot?c.shadowRoot.firstElementChild:null;p&&u.children.length<d.size;)d.has(p)&&u.children.push(p),p=p.nextElementSibling}u.children.forEach(l)}return n.forEach(l),r}const ey=10,Ps=ey/2,fm=1,Yx=2,Zx=10,e_=50,ty=100,ny=120,ry=140,sy=160,Pl=180,iy=200,dm=250,t_=ny+Ps,n_=ry+Ps,r_=ty+Ps,s_=sy+Ps,i_=Pl+Ps,o_=iy+Ps,l_=300,a_=500,oy=510,xu=520,ly=530,ay=1e4,c_=1e7,u_=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 p=ds(r,t,d,{...n,noText:!0});if(!p)continue;if(Yn(p)<=u_){u=p;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 p=[u,d];if(r.allowText.clear(),r.disallowText.clear(),u&&_u(u)&&p.push(ds(r,t,e,{...n,noCSSId:!0})),d&&_u(d)&&p.push(ds(r,t,e,{...n,noText:!0,noCSSId:!0})),p=p.filter(Boolean),!p.length){const g=vl(t,e,n);p.push(g),_u(g)&&p.push(vl(t,e,{...n,noCSSId:!0}))}o=[...new Set(p.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 p=u?d_(e,c,c===n):[];c!==n&&(p=pm(p));const g=f_(e,c,r).filter(x=>!r.omitInternalEngines||!x.engine.startsWith("internal:")).map(x=>[x]);let y=mm(e,r.root??n.ownerDocument,c,[...p,...g],d);p=pm(p);const v=x=>{const E=u&&!x.length,S=[...x,...g].filter(C=>y?Yn(C)<Yn(y):!0);let k=S[0];if(k)for(let C=at(c);C&&C!==r.root;C=at(C)){const A=l(C,E);if(!A||y&&Yn([...A,...k])>=Yn(y))continue;if(k=mm(e,C,c,S,d),!k)return;const U=[...A,...k];(!y||Yn(U)<Yn(y))&&(y=U)}};return v(p),c===n&&p.length&&v([]),y},l=(c,u)=>{const d=u?t.allowText:t.disallowText;let p=d.get(c);return p===void 0&&(p=o(c,u),d.set(c,p)),p};return o(n,!r.noText)}function f_(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}=${ys(e.getAttribute(c))}]`,score:Yx});if(!n.noCSSId){const c=e.getAttribute("id");c&&!h_(c)&&r.push({engine:"css",selector:cy(c),score:a_})}r.push({engine:"css",selector:bn(e),score:ly})}if(e.nodeName==="IFRAME"){for(const c of["name","title"])e.getAttribute(c)&&r.push({engine:"css",selector:`${bn(e)}[${c}=${ys(e.getAttribute(c))}]`,score:Zx});return e.getAttribute(n.testIdAttributeName)&&r.push({engine:"css",selector:`[${n.testIdAttributeName}=${ys(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:t_});for(const u of Ss(c.placeholder))r.push({engine:"internal:attr",selector:`[placeholder=${ht(u.text,!1)}]`,score:ny-u.scoreBonus})}}const o=Gg(t._evaluator._cacheText,e);for(const c of o){const u=c.normalized;r.push({engine:"internal:label",selector:kt(u,!0),score:n_});for(const d of Ss(u))r.push({engine:"internal:label",selector:kt(d.text,!1),score:ry-d.scoreBonus})}const l=rt(e);return l&&!["none","presentation"].includes(l)&&r.push({engine:"internal:role",selector:l,score:oy}),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=${ys(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=${ys(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 d_(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:o_}]);for(const p of Ss(o))r.push([{engine:"internal:attr",selector:`[title=${ht(p.text,!1)}]`,score:iy-p.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:s_}]);for(const p of Ss(l))r.push([{engine:"internal:attr",selector:`[alt=${ht(p.text,!1)}]`,score:sy-p.scoreBonus}])}const c=Tt(t._evaluator._cacheText,e).normalized,u=c?Ss(c):[];if(c){if(n){c.length<=80&&r.push([{engine:"internal:text",selector:kt(c,!0),score:i_}]);for(const g of u)r.push([{engine:"internal:text",selector:kt(g.text,!1),score:Pl-g.scoreBonus}])}const p={engine:"css",selector:bn(e),score:ly};for(const g of u)r.push([p,{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([p,{engine:"internal:has-text",selector:kt(g,!1),score:dm}])}}const d=rt(e);if(d&&!["none","presentation"].includes(d)){const p=Ki(e,!1);if(p){const g={engine:"internal:role",selector:`${d}[name=${ht(p,!0)}]`,score:r_};r.push([g]);for(const y of Ss(p))r.push([{engine:"internal:role",selector:`${d}[name=${ht(y.text,!1)}]`,score:ty-y.scoreBonus}])}else{const g={engine:"internal:role",selector:`${d}`,score:oy};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 cy(t){return/^[a-zA-Z][a-zA-Z0-9\-\_]+$/.test(t)?"#"+t:`[id=${ys(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 p=d.join(" > "),g=t.parseSelector(p);return t.querySelector(g,r,!1)===e?p:void 0}function c(u){const d={engine:"css",selector:u,score:c_},p=t.parseSelector(u),g=t.querySelectorAll(p,r);if(g.length===1)return[d];const y={engine:"nth",selector:String(g.indexOf(e)),score:ay};return[d,y]}for(let u=e;u&&u!==r;u=at(u)){let d="";if(u.id&&!n.noCSSId){const y=cy(u.id),v=l(y);if(v)return c(v);d=y}const p=u.parentNode,g=[...u.classList].map(p_);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&&p&&p.querySelectorAll(v).length===1&&(d=v)}if(p){const y=[...p.children],v=u.nodeName,E=y.filter(k=>k.nodeName===v).indexOf(u)===0?bn(u):`${bn(u)}:nth-child(${1+y.indexOf(u)})`,S=l(E);if(S)return c(S);d||(d=E)}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>e_&&n.score<l_&&(n.score+=Math.min(ey,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)),p=t.querySelectorAll(d,e);if(p[0]===n&&p.length===1)return u;const g=p.indexOf(n);if(!o||c||g===-1||p.length>5)continue;const y={engine:"nth",selector:String(g),score:ay};c=[...u,y]}return c}function h_(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 Ss(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 p_(t){let e="";for(let n=0;n<t.length;n++)e+=m_(t,n);return e}function m_(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 uy(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 g_(t,e){return e?e.toUpperCase():""}const y_=/(?:^|[-_/])(\w)/g,fy=t=>t&&t.replace(y_,g_);function v_(t){function e(g){const y=g.name||g._componentTag||g.__playwright_guessedName;if(y)return y;const v=g.__file;if(v)return fy(uy(v,".vue"))}function n(g,y){return g.type.__playwright_guessedName=y,y}function r(g){var v,x,E,S;const y=e(g.type||{});if(y)return y;if(g.root===g)return"Root";for(const k in(x=(v=g.parent)==null?void 0:v.type)==null?void 0:x.components)if(((E=g.parent)==null?void 0:E.type.components[k])===g.type)return n(g,k);for(const k in(S=g.appContext)==null?void 0:S.components)if(g.appContext.components[k]===g.type)return n(g,k);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 E=g.children[v];E.component?y.push(...u(E.component)):E.el&&y.push(E.el)}return y}function p(g){return{name:r(g),children:c(g.subTree).map(p),rootElements:u(g),props:g.props}}return p(t)}function w_(t){function e(l){const c=l.displayName||l.name||l._componentTag;if(c)return c;const u=l.__file;if(u)return fy(uy(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 dy(t,e,n=[]){e(t)&&n.push(t);for(const r of t.children)dy(r,e,n);return n}function hy(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&&hy(c,e)}while(r.nextNode());for(const l of o)e.push({version:2,root:l});return e}const S_=()=>({queryAll(t,e){const n=t.ownerDocument||t,{name:r,attributes:o}=Ir(e,!1),u=hy(n).map(p=>p.version===3?v_(p.root):w_(p.root)).map(p=>dy(p,g=>{if(r&&g.name!==r||g.rootElements.some(y=>!oa(t,y)))return!1;for(const y of o)if(!Wg(g.props,y))return!1;return!0})).flat(),d=new Set;for(const p of u)for(const g of p.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 x_(t,e){return`internal:testid=[${t}=${ht(e,!0)}]`}function __(t,e){return"internal:label="+kt(t,!!(e!=null&&e.exact))}function E_(t,e){return bf("alt",t,e)}function k_(t,e){return bf("title",t,e)}function b_(t,e){return bf("placeholder",t,e)}function T_(t,e){return"internal:text="+kt(t,!!(e!=null&&e.exact))}function C_(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 Li=Symbol("selector"),N_=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[Li])),r!=null&&r.hasNot&&(n+=" >> internal:has-not="+JSON.stringify(r.hasNot[Li])),(r==null?void 0:r.visible)!==void 0&&(n+=` >> visible=${r.visible?"true":"false"}`),this[Li]=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(x_(e.testIdAttributeNameForStrictErrorAndConsoleCodegen(),c)),l.getByAltText=(c,u)=>l.locator(E_(c,u)),l.getByLabel=(c,u)=>l.locator(__(c,u)),l.getByPlaceholder=(c,u)=>l.locator(b_(c,u)),l.getByText=(c,u)=>l.locator(T_(c,u)),l.getByTitle=(c,u)=>l.locator(k_(c,u)),l.getByRole=(c,u={})=>l.locator(C_(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[Li])),l.or=c=>new Ri(e,o+" >> internal:or="+JSON.stringify(c[Li]))}};let A_=N_;class I_{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=>this._injectedScript.ariaSnapshot(e||this._injectedScript.document.body,{mode:"expect"}),resume:()=>this._resume(),...new A_(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 L_(t){try{return t instanceof RegExp||Object.prototype.toString.call(t)==="[object RegExp]"}catch{return!1}}function M_(t){try{return t instanceof Date||Object.prototype.toString.call(t)==="[object Date]"}catch{return!1}}function j_(t){try{return t instanceof URL||Object.prototype.toString.call(t)==="[object URL]"}catch{return!1}}function P_(t){var e;try{return t instanceof Error||t&&((e=Object.getPrototypeOf(t))==null?void 0:e.name)==="Error"}catch{return!1}}function O_(t,e){try{return t instanceof e||Object.prototype.toString.call(t)===`[object ${e.name}]`}catch{return!1}}const py={i8:Int8Array,ui8:Uint8Array,ui8c:Uint8ClampedArray,i16:Int16Array,ui16:Uint16Array,i32:Int32Array,ui32:Uint32Array,f32:Float32Array,f64:Float64Array,bi64:BigInt64Array,bui64:BigUint64Array};function R_(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 $_(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 Fu(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(Fu(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]=Fu(l,e,n));return r}if("h"in t)return e[t.h];if("ta"in t)return $_(t.ta.b,py[t.ta.k])}return t}}function D_(t,e){return Bu(t,e,{visited:new Map,lastId:0})}function Bu(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 my(t,e,n)}function my(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(P_(t)){let c;return(l=t.stack)!=null&&l.startsWith(t.name+": "+t.message)?c=t.stack:c=`${t.name}: ${t.message}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r,j as e,T as z,D as I,M as k,a as A,W as O,b as F,c as V,d as $}from"./assets/defaultSettingsView-
|
|
1
|
+
import{r,j as e,T as z,D as I,M as k,a as A,W as O,b as F,c as V,d as $}from"./assets/defaultSettingsView-BA25Usqk.js";const M=({className:n,style:o,open:s,isModal:a,width:l,verticalOffset:m,requestClose:u,anchor:x,dataTestId:p,children:T})=>{const g=r.useRef(null),[E,b]=r.useState(0);let j=o;if(x!=null&&x.current){const h=x.current.getBoundingClientRect();j={position:"fixed",margin:0,top:h.bottom+(m??0),left:G(h,l??0),width:l,zIndex:1,...o}}return r.useEffect(()=>{const h=y=>{!g.current||!(y.target instanceof Node)||g.current.contains(y.target)||u==null||u()},L=y=>{y.key==="Escape"&&(u==null||u())};return s?(document.addEventListener("mousedown",h),document.addEventListener("keydown",L),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("keydown",L)}):()=>{}},[s,u]),r.useEffect(()=>{const h=()=>b(L=>L+1);return window.addEventListener("resize",h),()=>{window.removeEventListener("resize",h)}},[]),r.useLayoutEffect(()=>{g.current&&(s?a?g.current.showModal():g.current.show():g.current.close())},[s,a]),e.jsx("dialog",{ref:g,style:j,className:n,"data-testid":p,children:T})},G=(n,o)=>{const s=U(n,o,"left");if(s.inBounds)return s.value;const a=U(n,o,"right");return a.inBounds?a.value:s.value},U=(n,o,s)=>{const a=document.documentElement.clientWidth;if(s==="left"){const l=n.left;return{value:l,inBounds:l+o<=a}}else return{value:n.right-o,inBounds:n.right-o>=0}},H=()=>{const n=r.useRef(null),[o,s]=r.useState(!1);return e.jsxs(e.Fragment,{children:[e.jsx(z,{ref:n,icon:"settings-gear",title:"Settings",onClick:()=>s(a=>!a)}),e.jsx(M,{style:{backgroundColor:"var(--vscode-sideBar-background)",padding:"4px 8px"},open:o,width:200,verticalOffset:8,requestClose:()=>s(!1),anchor:n,dataTestId:"settings-toolbar-dialog",children:e.jsx(I,{})})]})},K=()=>{const[n,o]=r.useState(!1),[s,a]=r.useState([]),[l,m]=r.useState([]),[u,x]=r.useState(W),[p,T]=r.useState({done:0,total:0}),[g,E]=r.useState(!1),[b,j]=r.useState(null),[h,L]=r.useState(null),[y,N]=r.useState(!1),S=r.useCallback(t=>{const c=[],d=[],i=new URL(window.location.href);for(let f=0;f<t.length;f++){const w=t.item(f);if(!w)continue;const P=URL.createObjectURL(w);c.push(P),d.push(w.name),i.searchParams.append("trace",P),i.searchParams.append("traceFileName",w.name)}const v=i.toString();window.history.pushState({},"",v),a(c),m(d),E(!1),j(null)},[]);r.useEffect(()=>{const t=async c=>{var d;if((d=c.clipboardData)!=null&&d.files.length){for(const i of c.clipboardData.files)if(i.type!=="application/zip")return;c.preventDefault(),S(c.clipboardData.files)}};return document.addEventListener("paste",t),()=>document.removeEventListener("paste",t)}),r.useEffect(()=>{const t=c=>{const{method:d,params:i}=c.data;if(d!=="load"||!((i==null?void 0:i.trace)instanceof Blob))return;const v=new File([i.trace],"trace.zip",{type:"application/zip"}),f=new DataTransfer;f.items.add(v),S(f.files)};return window.addEventListener("message",t),()=>window.removeEventListener("message",t)});const B=r.useCallback(t=>{t.preventDefault(),S(t.dataTransfer.files)},[S]),C=r.useCallback(t=>{t.preventDefault(),t.target.files&&S(t.target.files)},[S]);r.useEffect(()=>{const t=new URL(window.location.href).searchParams,c=t.getAll("trace");o(t.has("isServer"));for(const d of c)if(d.startsWith("file:")){L(d||null);return}if(t.has("isServer")){const d=new URLSearchParams(window.location.search).get("ws"),i=new URL(`../${d}`,window.location.toString());i.protocol=window.location.protocol==="https:"?"wss:":"ws:";const v=new A(new O(i));v.onLoadTraceRequested(async f=>{a(f.traceUrl?[f.traceUrl]:[]),E(!1),j(null)}),v.initialize({}).catch(()=>{})}else c.some(d=>d.startsWith("blob:"))||a(c)},[]),r.useEffect(()=>{(async()=>{if(s.length){const t=i=>{i.data.method==="progress"&&T(i.data.params)};navigator.serviceWorker.addEventListener("message",t),T({done:0,total:1});const c=[];for(let i=0;i<s.length;i++){const v=s[i],f=new URLSearchParams;f.set("trace",v),l.length&&f.set("traceFileName",l[i]),f.set("limit",String(s.length));const w=await fetch(`contexts?${f.toString()}`);if(!w.ok){n||a([]),j((await w.json()).error);return}c.push(...await w.json())}navigator.serviceWorker.removeEventListener("message",t);const d=new k(c);T({done:0,total:0}),x(d)}else x(W)})()},[n,s,l]);const D=p.done!==p.total&&p.total!==0;r.useEffect(()=>{if(D){const t=setTimeout(()=>{N(!0)},200);return()=>clearTimeout(t)}else N(!1)},[D]);const R=!!(!n&&!g&&!h&&(!s.length||b));return e.jsxs("div",{className:"vbox workbench-loader",onDragOver:t=>{t.preventDefault(),E(!0)},children:[e.jsxs("div",{className:"hbox header",...R?{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"}),u.title&&e.jsx("div",{className:"title",children:u.title}),e.jsx("div",{className:"spacer"}),e.jsx(H,{})]}),e.jsx(F,{model:u,inert:R}),h&&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:h,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(M,{open:y,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:p.total?100*p.done/p.total+"%":0}})})]})}),R&&e.jsxs("div",{className:"drop-target",children:[e.jsx("div",{className:"processing-error",role:"alert",children:b}),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",c=>C(c))},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."})]}),n&&!s.length&&e.jsx("div",{className:"drop-target",children:e.jsx("div",{className:"title",children:"Select test to see the trace"})}),g&&e.jsx("div",{className:"drop-target",onDragLeave:()=>{E(!1)},onDrop:t=>B(t),children:e.jsx("div",{className:"title",children:"Release to analyse the Playwright Trace"})})]})},W=new k([]),_=({traceJson:n})=>{const[o,s]=r.useState(void 0),[a,l]=r.useState(0),m=r.useRef(null);return r.useEffect(()=>(m.current&&clearTimeout(m.current),m.current=setTimeout(async()=>{try{const u=await J(n);s(u)}catch{const u=new k([]);s(u)}finally{l(a+1)}},500),()=>{m.current&&clearTimeout(m.current)}),[n,a]),e.jsx(F,{model:o,isLive:!0})};async function J(n){const o=new URLSearchParams;o.set("trace",n),o.set("limit","1");const a=await(await fetch(`contexts?${o.toString()}`)).json();return new k(a)}(async()=>{const n=new URLSearchParams(window.location.search);if(V(),window.location.protocol!=="file:"){if(n.get("isUnderTest")==="true"&&await new Promise(l=>setTimeout(l,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(l=>{navigator.serviceWorker.oncontrollerchange=()=>l()}),setInterval(function(){fetch("ping")},1e4)}const o=n.get("trace"),a=(o==null?void 0:o.endsWith(".json"))?e.jsx(_,{traceJson:o}):e.jsx(K,{});$.createRoot(document.querySelector("#root")).render(a)})();
|
|
@@ -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.
|
|
11
|
-
<link rel="modulepreload" crossorigin href="./assets/defaultSettingsView-
|
|
10
|
+
<script type="module" crossorigin src="./index.CheexZ4_.js"></script>
|
|
11
|
+
<link rel="modulepreload" crossorigin href="./assets/defaultSettingsView-BA25Usqk.js">
|
|
12
12
|
<link rel="stylesheet" crossorigin href="./defaultSettingsView.DVJHpiGt.css">
|
|
13
13
|
<link rel="stylesheet" crossorigin href="./index.BFsek2M6.css">
|
|
14
14
|
</head>
|