const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./codeMirrorModule-LEHpjmcn.js","./urlMatch-BYQrIQwR.js","../codeMirrorModule.DYBRYzYX.css"])))=>i.map(i=>d[i]);
import{i as mx}from"./urlMatch-BYQrIQwR.js";function yx(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var rh={exports:{}},ja={};/**
 * @license React
 * react-jsx-runtime.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Fy;function bx(){if(Fy)return ja;Fy=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function i(r,a,o){var u=null;if(o!==void 0&&(u=""+o),a.key!==void 0&&(u=""+a.key),"key"in a){o={};for(var f in a)f!=="key"&&(o[f]=a[f])}else o=a;return a=o.ref,{$$typeof:n,type:r,key:u,ref:a!==void 0?a:null,props:o}}return ja.Fragment=e,ja.jsx=i,ja.jsxs=i,ja}var Qy;function vx(){return Qy||(Qy=1,rh.exports=bx()),rh.exports}var b=vx(),ah={exports:{}},he={};/**
 * @license React
 * react.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Py;function Sx(){if(Py)return he;Py=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),S=Symbol.iterator;function w(M){return M===null||typeof M!="object"?null:(M=S&&M[S]||M["@@iterator"],typeof M=="function"?M:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,_={};function A(M,X,W){this.props=M,this.context=X,this.refs=_,this.updater=W||E}A.prototype.isReactComponent={},A.prototype.setState=function(M,X){if(typeof M!="object"&&typeof M!="function"&&M!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,M,X,"setState")},A.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function C(){}C.prototype=A.prototype;function H(M,X,W){this.props=M,this.context=X,this.refs=_,this.updater=W||E}var V=H.prototype=new C;V.constructor=H,x(V,A.prototype),V.isPureReactComponent=!0;var K=Array.isArray;function Q(){}var j={H:null,A:null,T:null,S:null},I=Object.prototype.hasOwnProperty;function O(M,X,W){var te=W.ref;return{$$typeof:n,type:M,key:X,ref:te!==void 0?te:null,props:W}}function P(M,X){return O(M.type,X,M.props)}function J(M){return typeof M=="object"&&M!==null&&M.$$typeof===n}function $(M){var X={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(W){return X[W]})}var ee=/\/+/g;function ce(M,X){return typeof M=="object"&&M!==null&&M.key!=null?$(""+M.key):X.toString(36)}function Me(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(Q,Q):(M.status="pending",M.then(function(X){M.status==="pending"&&(M.status="fulfilled",M.value=X)},function(X){M.status==="pending"&&(M.status="rejected",M.reason=X)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function q(M,X,W,te,ue){var se=typeof M;(se==="undefined"||se==="boolean")&&(M=null);var xe=!1;if(M===null)xe=!0;else switch(se){case"bigint":case"string":case"number":xe=!0;break;case"object":switch(M.$$typeof){case n:case e:xe=!0;break;case m:return xe=M._init,q(xe(M._payload),X,W,te,ue)}}if(xe)return ue=ue(M),xe=te===""?"."+ce(M,0):te,K(ue)?(W="",xe!=null&&(W=xe.replace(ee,"$&/")+"/"),q(ue,X,W,"",function(Rn){return Rn})):ue!=null&&(J(ue)&&(ue=P(ue,W+(ue.key==null||M&&M.key===ue.key?"":(""+ue.key).replace(ee,"$&/")+"/")+xe)),X.push(ue)),1;xe=0;var nt=te===""?".":te+":";if(K(M))for(var Re=0;Re<M.length;Re++)te=M[Re],se=nt+ce(te,Re),xe+=q(te,X,W,se,ue);else if(Re=w(M),typeof Re=="function")for(M=Re.call(M),Re=0;!(te=M.next()).done;)te=te.value,se=nt+ce(te,Re++),xe+=q(te,X,W,se,ue);else if(se==="object"){if(typeof M.then=="function")return q(Me(M),X,W,te,ue);throw X=String(M),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}return xe}function Z(M,X,W){if(M==null)return M;var te=[],ue=0;return q(M,te,"","",function(se){return X.call(W,se,ue++)}),te}function re(M){if(M._status===-1){var X=M._result;X=X(),X.then(function(W){(M._status===0||M._status===-1)&&(M._status=1,M._result=W)},function(W){(M._status===0||M._status===-1)&&(M._status=2,M._result=W)}),M._status===-1&&(M._status=0,M._result=X)}if(M._status===1)return M._result.default;throw M._result}var me=typeof reportError=="function"?reportError:function(M){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var X=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof M=="object"&&M!==null&&typeof M.message=="string"?String(M.message):String(M),error:M});if(!window.dispatchEvent(X))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",M);return}console.error(M)},Ee={map:Z,forEach:function(M,X,W){Z(M,function(){X.apply(this,arguments)},W)},count:function(M){var X=0;return Z(M,function(){X++}),X},toArray:function(M){return Z(M,function(X){return X})||[]},only:function(M){if(!J(M))throw Error("React.Children.only expected to receive a single React element child.");return M}};return he.Activity=y,he.Children=Ee,he.Component=A,he.Fragment=i,he.Profiler=a,he.PureComponent=H,he.StrictMode=r,he.Suspense=d,he.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=j,he.__COMPILER_RUNTIME={__proto__:null,c:function(M){return j.H.useMemoCache(M)}},he.cache=function(M){return function(){return M.apply(null,arguments)}},he.cacheSignal=function(){return null},he.cloneElement=function(M,X,W){if(M==null)throw Error("The argument must be a React element, but you passed "+M+".");var te=x({},M.props),ue=M.key;if(X!=null)for(se in X.key!==void 0&&(ue=""+X.key),X)!I.call(X,se)||se==="key"||se==="__self"||se==="__source"||se==="ref"&&X.ref===void 0||(te[se]=X[se]);var se=arguments.length-2;if(se===1)te.children=W;else if(1<se){for(var xe=Array(se),nt=0;nt<se;nt++)xe[nt]=arguments[nt+2];te.children=xe}return O(M.type,ue,te)},he.createContext=function(M){return M={$$typeof:u,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null},M.Provider=M,M.Consumer={$$typeof:o,_context:M},M},he.createElement=function(M,X,W){var te,ue={},se=null;if(X!=null)for(te in X.key!==void 0&&(se=""+X.key),X)I.call(X,te)&&te!=="key"&&te!=="__self"&&te!=="__source"&&(ue[te]=X[te]);var xe=arguments.length-2;if(xe===1)ue.children=W;else if(1<xe){for(var nt=Array(xe),Re=0;Re<xe;Re++)nt[Re]=arguments[Re+2];ue.children=nt}if(M&&M.defaultProps)for(te in xe=M.defaultProps,xe)ue[te]===void 0&&(ue[te]=xe[te]);return O(M,se,ue)},he.createRef=function(){return{current:null}},he.forwardRef=function(M){return{$$typeof:f,render:M}},he.isValidElement=J,he.lazy=function(M){return{$$typeof:m,_payload:{_status:-1,_result:M},_init:re}},he.memo=function(M,X){return{$$typeof:g,type:M,compare:X===void 0?null:X}},he.startTransition=function(M){var X=j.T,W={};j.T=W;try{var te=M(),ue=j.S;ue!==null&&ue(W,te),typeof te=="object"&&te!==null&&typeof te.then=="function"&&te.then(Q,me)}catch(se){me(se)}finally{X!==null&&W.types!==null&&(X.types=W.types),j.T=X}},he.unstable_useCacheRefresh=function(){return j.H.useCacheRefresh()},he.use=function(M){return j.H.use(M)},he.useActionState=function(M,X,W){return j.H.useActionState(M,X,W)},he.useCallback=function(M,X){return j.H.useCallback(M,X)},he.useContext=function(M){return j.H.useContext(M)},he.useDebugValue=function(){},he.useDeferredValue=function(M,X){return j.H.useDeferredValue(M,X)},he.useEffect=function(M,X){return j.H.useEffect(M,X)},he.useEffectEvent=function(M){return j.H.useEffectEvent(M)},he.useId=function(){return j.H.useId()},he.useImperativeHandle=function(M,X,W){return j.H.useImperativeHandle(M,X,W)},he.useInsertionEffect=function(M,X){return j.H.useInsertionEffect(M,X)},he.useLayoutEffect=function(M,X){return j.H.useLayoutEffect(M,X)},he.useMemo=function(M,X){return j.H.useMemo(M,X)},he.useOptimistic=function(M,X){return j.H.useOptimistic(M,X)},he.useReducer=function(M,X,W){return j.H.useReducer(M,X,W)},he.useRef=function(M){return j.H.useRef(M)},he.useState=function(M){return j.H.useState(M)},he.useSyncExternalStore=function(M,X,W){return j.H.useSyncExternalStore(M,X,W)},he.useTransition=function(){return j.H.useTransition()},he.version="19.2.1",he}var Jy;function ed(){return Jy||(Jy=1,ah.exports=Sx()),ah.exports}var R=ed();const Et=yx(R);function yc(n,e,i,r){const[a,o]=Et.useState(i);return Et.useEffect(()=>{let u=!1;return n().then(f=>{u||o(f)}),()=>{u=!0}},e),a}function gs(){const n=Et.useRef(null),[e]=kh(n);return[e,n]}function kh(n){const[e,i]=Et.useState(new DOMRect(0,0,10,10)),r=Et.useCallback(()=>{const a=n==null?void 0:n.current;a&&i(a.getBoundingClientRect())},[n]);return Et.useLayoutEffect(()=>{const a=n==null?void 0:n.current;if(!a)return;r();const o=new ResizeObserver(r);return o.observe(a),window.addEventListener("resize",r),()=>{o.disconnect(),window.removeEventListener("resize",r)}},[r,n]),[e,r]}function u0(n,e,i,r,a){let o=0,u=n.length;for(;o<u;){const f=o+u>>1;i(e,n[f])>=0?o=f+1:u=f}return u}function Zy(n){const e=document.createElement("textarea");e.style.position="absolute",e.style.zIndex="-1000",e.value=n,document.body.appendChild(e),e.select(),document.execCommand("copy"),e.remove()}function jt(n,e){n&&(e=ls.getObject(n,e));const[i,r]=Et.useState(e),a=Et.useCallback(o=>{n?ls.setObject(n,o):r(o)},[n,r]);return Et.useEffect(()=>{if(n){const o=()=>r(ls.getObject(n,e));return ls.onChangeEmitter.addEventListener(n,o),()=>ls.onChangeEmitter.removeEventListener(n,o)}},[e,n]),[i,a]}const Mh=new Map,f0=new Map;let sc;function or(n,e){const[i,r]=Et.useState();f0.set(n,{setter:r,defaultValue:e});const a=Et.useCallback(o=>{const u=Mh.get(sc||"default")||{};u[n]=o,Mh.set(sc||"default",u),r(o)},[n]);return[i,a]}function wx(n){if(sc===n)return;sc=n;const e=Mh.get(n)||{};for(const[i,r]of f0.entries())r.setter(e[i]||r.defaultValue)}class xx{constructor(){this.onChangeEmitter=new EventTarget}getString(e,i){return localStorage[e]||i}setString(e,i){var r;localStorage[e]=i,this.onChangeEmitter.dispatchEvent(new Event(e)),(r=window.saveSettings)==null||r.call(window)}getObject(e,i){if(!localStorage[e])return i;try{return JSON.parse(localStorage[e])}catch{return i}}setObject(e,i){var r;localStorage[e]=JSON.stringify(i),this.onChangeEmitter.dispatchEvent(new Event(e)),(r=window.saveSettings)==null||r.call(window)}}const ls=new xx;function ut(...n){return n.filter(Boolean).join(" ")}function td(n){n&&(n!=null&&n.scrollIntoViewIfNeeded?n.scrollIntoViewIfNeeded(!1):n==null||n.scrollIntoView())}const Wy="\\u0000-\\u0020\\u007f-\\u009f",h0=new RegExp("(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|www\\.)[^\\s"+Wy+'"]{2,}[^\\s'+Wy+`"')}\\],:;.!?]`,"ug");function _x(){const[n,e]=Et.useState(!1),i=Et.useCallback(()=>{const r=[];return e(a=>(r.push(setTimeout(()=>e(!1),1e3)),a?(r.push(setTimeout(()=>e(!0),50)),!1):!0)),()=>r.forEach(clearTimeout)},[e]);return[n,i]}const Ex="system",d0="theme",Tx=[{label:"Dark mode",value:"dark-mode"},{label:"Light mode",value:"light-mode"},{label:"System",value:"system"}],p0=window.matchMedia("(prefers-color-scheme: dark)");function B2(){document.playwrightThemeInitialized||(document.playwrightThemeInitialized=!0,document.defaultView.addEventListener("focus",n=>{n.target.document.nodeType===Node.DOCUMENT_NODE&&document.body.classList.remove("inactive")},!1),document.defaultView.addEventListener("blur",n=>{document.body.classList.add("inactive")},!1),Oh(jh()),p0.addEventListener("change",()=>{Oh(jh())}))}const nd=new Set;function Oh(n){const e=Ax(),i=n==="system"?p0.matches?"dark-mode":"light-mode":n;if(e!==i){e&&document.documentElement.classList.remove(e),document.documentElement.classList.add(i);for(const r of nd)r(i)}}function q2(n){nd.add(n)}function $2(n){nd.delete(n)}function jh(){return ls.getString(d0,Ex)}function Ax(){return document.documentElement.classList.contains("dark-mode")?"dark-mode":document.documentElement.classList.contains("light-mode")?"light-mode":null}function Cx(){const[n,e]=Et.useState(jh());return Et.useEffect(()=>{ls.setString(d0,n),Oh(n)},[n]),[n,e]}var lh={exports:{}},La={},oh={exports:{}},ch={};/**
 * @license React
 * scheduler.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var eb;function Nx(){return eb||(eb=1,(function(n){function e(q,Z){var re=q.length;q.push(Z);e:for(;0<re;){var me=re-1>>>1,Ee=q[me];if(0<a(Ee,Z))q[me]=Z,q[re]=Ee,re=me;else break e}}function i(q){return q.length===0?null:q[0]}function r(q){if(q.length===0)return null;var Z=q[0],re=q.pop();if(re!==Z){q[0]=re;e:for(var me=0,Ee=q.length,M=Ee>>>1;me<M;){var X=2*(me+1)-1,W=q[X],te=X+1,ue=q[te];if(0>a(W,re))te<Ee&&0>a(ue,W)?(q[me]=ue,q[te]=re,me=te):(q[me]=W,q[X]=re,me=X);else if(te<Ee&&0>a(ue,re))q[me]=ue,q[te]=re,me=te;else break e}}return Z}function a(q,Z){var re=q.sortIndex-Z.sortIndex;return re!==0?re:q.id-Z.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;n.unstable_now=function(){return o.now()}}else{var u=Date,f=u.now();n.unstable_now=function(){return u.now()-f}}var d=[],g=[],m=1,y=null,S=3,w=!1,E=!1,x=!1,_=!1,A=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,H=typeof setImmediate<"u"?setImmediate:null;function V(q){for(var Z=i(g);Z!==null;){if(Z.callback===null)r(g);else if(Z.startTime<=q)r(g),Z.sortIndex=Z.expirationTime,e(d,Z);else break;Z=i(g)}}function K(q){if(x=!1,V(q),!E)if(i(d)!==null)E=!0,Q||(Q=!0,$());else{var Z=i(g);Z!==null&&Me(K,Z.startTime-q)}}var Q=!1,j=-1,I=5,O=-1;function P(){return _?!0:!(n.unstable_now()-O<I)}function J(){if(_=!1,Q){var q=n.unstable_now();O=q;var Z=!0;try{e:{E=!1,x&&(x=!1,C(j),j=-1),w=!0;var re=S;try{t:{for(V(q),y=i(d);y!==null&&!(y.expirationTime>q&&P());){var me=y.callback;if(typeof me=="function"){y.callback=null,S=y.priorityLevel;var Ee=me(y.expirationTime<=q);if(q=n.unstable_now(),typeof Ee=="function"){y.callback=Ee,V(q),Z=!0;break t}y===i(d)&&r(d),V(q)}else r(d);y=i(d)}if(y!==null)Z=!0;else{var M=i(g);M!==null&&Me(K,M.startTime-q),Z=!1}}break e}finally{y=null,S=re,w=!1}Z=void 0}}finally{Z?$():Q=!1}}}var $;if(typeof H=="function")$=function(){H(J)};else if(typeof MessageChannel<"u"){var ee=new MessageChannel,ce=ee.port2;ee.port1.onmessage=J,$=function(){ce.postMessage(null)}}else $=function(){A(J,0)};function Me(q,Z){j=A(function(){q(n.unstable_now())},Z)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(q){q.callback=null},n.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<q?Math.floor(1e3/q):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function(q){switch(S){case 1:case 2:case 3:var Z=3;break;default:Z=S}var re=S;S=Z;try{return q()}finally{S=re}},n.unstable_requestPaint=function(){_=!0},n.unstable_runWithPriority=function(q,Z){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var re=S;S=q;try{return Z()}finally{S=re}},n.unstable_scheduleCallback=function(q,Z,re){var me=n.unstable_now();switch(typeof re=="object"&&re!==null?(re=re.delay,re=typeof re=="number"&&0<re?me+re:me):re=me,q){case 1:var Ee=-1;break;case 2:Ee=250;break;case 5:Ee=1073741823;break;case 4:Ee=1e4;break;default:Ee=5e3}return Ee=re+Ee,q={id:m++,callback:Z,priorityLevel:q,startTime:re,expirationTime:Ee,sortIndex:-1},re>me?(q.sortIndex=re,e(g,q),i(d)===null&&q===i(g)&&(x?(C(j),j=-1):x=!0,Me(K,re-me))):(q.sortIndex=Ee,e(d,q),E||w||(E=!0,Q||(Q=!0,$()))),q},n.unstable_shouldYield=P,n.unstable_wrapCallback=function(q){var Z=S;return function(){var re=S;S=Z;try{return q.apply(this,arguments)}finally{S=re}}}})(ch)),ch}var tb;function kx(){return tb||(tb=1,oh.exports=Nx()),oh.exports}var uh={exports:{}},At={};/**
 * @license React
 * react-dom.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var nb;function Mx(){if(nb)return At;nb=1;var n=ed();function e(d){var g="https://react.dev/errors/"+d;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var m=2;m<arguments.length;m++)g+="&args[]="+encodeURIComponent(arguments[m])}return"Minified React error #"+d+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var r={d:{f:i,r:function(){throw Error(e(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},a=Symbol.for("react.portal");function o(d,g,m){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:y==null?null:""+y,children:d,containerInfo:g,implementation:m}}var u=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(d,g){if(d==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return At.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,At.createPortal=function(d,g){var m=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(e(299));return o(d,g,null,m)},At.flushSync=function(d){var g=u.T,m=r.p;try{if(u.T=null,r.p=2,d)return d()}finally{u.T=g,r.p=m,r.d.f()}},At.preconnect=function(d,g){typeof d=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,r.d.C(d,g))},At.prefetchDNS=function(d){typeof d=="string"&&r.d.D(d)},At.preinit=function(d,g){if(typeof d=="string"&&g&&typeof g.as=="string"){var m=g.as,y=f(m,g.crossOrigin),S=typeof g.integrity=="string"?g.integrity:void 0,w=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;m==="style"?r.d.S(d,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:y,integrity:S,fetchPriority:w}):m==="script"&&r.d.X(d,{crossOrigin:y,integrity:S,fetchPriority:w,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},At.preinitModule=function(d,g){if(typeof d=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var m=f(g.as,g.crossOrigin);r.d.M(d,{crossOrigin:m,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&r.d.M(d)},At.preload=function(d,g){if(typeof d=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var m=g.as,y=f(m,g.crossOrigin);r.d.L(d,m,{crossOrigin:y,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},At.preloadModule=function(d,g){if(typeof d=="string")if(g){var m=f(g.as,g.crossOrigin);r.d.m(d,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:m,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else r.d.m(d)},At.requestFormReset=function(d){r.d.r(d)},At.unstable_batchedUpdates=function(d,g){return d(g)},At.useFormState=function(d,g,m){return u.H.useFormState(d,g,m)},At.useFormStatus=function(){return u.H.useHostTransitionStatus()},At.version="19.2.1",At}var ib;function Ox(){if(ib)return uh.exports;ib=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),uh.exports=Mx(),uh.exports}/**
 * @license React
 * react-dom-client.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var sb;function jx(){if(sb)return La;sb=1;var n=kx(),e=ed(),i=Ox();function r(t){var s="https://react.dev/errors/"+t;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)s+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+t+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function o(t){var s=t,l=t;if(t.alternate)for(;s.return;)s=s.return;else{t=s;do s=t,(s.flags&4098)!==0&&(l=s.return),t=s.return;while(t)}return s.tag===3?l:null}function u(t){if(t.tag===13){var s=t.memoizedState;if(s===null&&(t=t.alternate,t!==null&&(s=t.memoizedState)),s!==null)return s.dehydrated}return null}function f(t){if(t.tag===31){var s=t.memoizedState;if(s===null&&(t=t.alternate,t!==null&&(s=t.memoizedState)),s!==null)return s.dehydrated}return null}function d(t){if(o(t)!==t)throw Error(r(188))}function g(t){var s=t.alternate;if(!s){if(s=o(t),s===null)throw Error(r(188));return s!==t?null:t}for(var l=t,c=s;;){var h=l.return;if(h===null)break;var p=h.alternate;if(p===null){if(c=h.return,c!==null){l=c;continue}break}if(h.child===p.child){for(p=h.child;p;){if(p===l)return d(h),t;if(p===c)return d(h),s;p=p.sibling}throw Error(r(188))}if(l.return!==c.return)l=h,c=p;else{for(var v=!1,T=h.child;T;){if(T===l){v=!0,l=h,c=p;break}if(T===c){v=!0,c=h,l=p;break}T=T.sibling}if(!v){for(T=p.child;T;){if(T===l){v=!0,l=p,c=h;break}if(T===c){v=!0,c=p,l=h;break}T=T.sibling}if(!v)throw Error(r(189))}}if(l.alternate!==c)throw Error(r(190))}if(l.tag!==3)throw Error(r(188));return l.stateNode.current===l?t:s}function m(t){var s=t.tag;if(s===5||s===26||s===27||s===6)return t;for(t=t.child;t!==null;){if(s=m(t),s!==null)return s;t=t.sibling}return null}var y=Object.assign,S=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),H=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),K=Symbol.for("react.suspense"),Q=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),O=Symbol.for("react.activity"),P=Symbol.for("react.memo_cache_sentinel"),J=Symbol.iterator;function $(t){return t===null||typeof t!="object"?null:(t=J&&t[J]||t["@@iterator"],typeof t=="function"?t:null)}var ee=Symbol.for("react.client.reference");function ce(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===ee?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case x:return"Fragment";case A:return"Profiler";case _:return"StrictMode";case K:return"Suspense";case Q:return"SuspenseList";case O:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case E:return"Portal";case H:return t.displayName||"Context";case C:return(t._context.displayName||"Context")+".Consumer";case V:var s=t.render;return t=t.displayName,t||(t=s.displayName||s.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case j:return s=t.displayName||null,s!==null?s:ce(t.type)||"Memo";case I:s=t._payload,t=t._init;try{return ce(t(s))}catch{}}return null}var Me=Array.isArray,q=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,re={pending:!1,data:null,method:null,action:null},me=[],Ee=-1;function M(t){return{current:t}}function X(t){0>Ee||(t.current=me[Ee],me[Ee]=null,Ee--)}function W(t,s){Ee++,me[Ee]=t.current,t.current=s}var te=M(null),ue=M(null),se=M(null),xe=M(null);function nt(t,s){switch(W(se,s),W(ue,t),W(te,null),s.nodeType){case 9:case 11:t=(t=s.documentElement)&&(t=t.namespaceURI)?yy(t):0;break;default:if(t=s.tagName,s=s.namespaceURI)s=yy(s),t=by(s,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}X(te),W(te,t)}function Re(){X(te),X(ue),X(se)}function Rn(t){t.memoizedState!==null&&W(xe,t);var s=te.current,l=by(s,t.type);s!==l&&(W(ue,t),W(te,l))}function fe(t){ue.current===t&&(X(te),X(ue)),xe.current===t&&(X(xe),Na._currentValue=re)}var _e,Ue;function He(t){if(_e===void 0)try{throw Error()}catch(l){var s=l.stack.trim().match(/\n( *(at )?)/);_e=s&&s[1]||"",Ue=-1<l.stack.indexOf(`
    at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
`+_e+t+Ue}var Xt=!1;function Ye(t,s){if(!t||Xt)return"";Xt=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(s){var F=function(){throw Error()};if(Object.defineProperty(F.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(F,[])}catch(B){var U=B}Reflect.construct(t,[],F)}else{try{F.call()}catch(B){U=B}t.call(F.prototype)}}else{try{throw Error()}catch(B){U=B}(F=t())&&typeof F.catch=="function"&&F.catch(function(){})}}catch(B){if(B&&U&&typeof B.stack=="string")return[B.stack,U.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var p=c.DetermineComponentFrameRoot(),v=p[0],T=p[1];if(v&&T){var N=v.split(`
`),z=T.split(`
`);for(h=c=0;c<N.length&&!N[c].includes("DetermineComponentFrameRoot");)c++;for(;h<z.length&&!z[h].includes("DetermineComponentFrameRoot");)h++;if(c===N.length||h===z.length)for(c=N.length-1,h=z.length-1;1<=c&&0<=h&&N[c]!==z[h];)h--;for(;1<=c&&0<=h;c--,h--)if(N[c]!==z[h]){if(c!==1||h!==1)do if(c--,h--,0>h||N[c]!==z[h]){var G=`
`+N[c].replace(" at new "," at ");return t.displayName&&G.includes("<anonymous>")&&(G=G.replace("<anonymous>",t.displayName)),G}while(1<=c&&0<=h);break}}}finally{Xt=!1,Error.prepareStackTrace=l}return(l=t?t.displayName||t.name:"")?He(l):""}function Yt(t,s){switch(t.tag){case 26:case 27:case 5:return He(t.type);case 16:return He("Lazy");case 13:return t.child!==s&&s!==null?He("Suspense Fallback"):He("Suspense");case 19:return He("SuspenseList");case 0:case 15:return Ye(t.type,!1);case 11:return Ye(t.type.render,!1);case 1:return Ye(t.type,!0);case 31:return He("Activity");default:return""}}function bs(t){try{var s="",l=null;do s+=Yt(t,l),l=t,t=t.return;while(t);return s}catch(c){return`
Error generating stack: `+c.message+`
`+c.stack}}var qr=Object.prototype.hasOwnProperty,vs=n.unstable_scheduleCallback,Ss=n.unstable_cancelCallback,ws=n.unstable_shouldYield,qc=n.unstable_requestPaint,it=n.unstable_now,$c=n.unstable_getCurrentPriorityLevel,yl=n.unstable_ImmediatePriority,bl=n.unstable_UserBlockingPriority,xs=n.unstable_NormalPriority,vl=n.unstable_LowPriority,_s=n.unstable_IdlePriority,Ic=n.log,Vc=n.unstable_setDisableYieldValue,Bi=null,ft=null;function Ft(t){if(typeof Ic=="function"&&Vc(t),ft&&typeof ft.setStrictMode=="function")try{ft.setStrictMode(Bi,t)}catch{}}var kt=Math.clz32?Math.clz32:Sl,Gc=Math.log,Kc=Math.LN2;function Sl(t){return t>>>=0,t===0?32:31-(Gc(t)/Kc|0)|0}var le=256,Tn=262144,sn=4194304;function qi(t){var s=t&42;if(s!==0)return s;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function wl(t,s,l){var c=t.pendingLanes;if(c===0)return 0;var h=0,p=t.suspendedLanes,v=t.pingedLanes;t=t.warmLanes;var T=c&134217727;return T!==0?(c=T&~p,c!==0?h=qi(c):(v&=T,v!==0?h=qi(v):l||(l=T&~t,l!==0&&(h=qi(l))))):(T=c&~p,T!==0?h=qi(T):v!==0?h=qi(v):l||(l=c&~t,l!==0&&(h=qi(l)))),h===0?0:s!==0&&s!==h&&(s&p)===0&&(p=h&-h,l=s&-s,p>=l||p===32&&(l&4194048)!==0)?s:h}function $r(t,s){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&s)===0}function iw(t,s){switch(t){case 1:case 2:case 4:case 8:case 64:return s+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Zd(){var t=sn;return sn<<=1,(sn&62914560)===0&&(sn=4194304),t}function Xc(t){for(var s=[],l=0;31>l;l++)s.push(t);return s}function Ir(t,s){t.pendingLanes|=s,s!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function sw(t,s,l,c,h,p){var v=t.pendingLanes;t.pendingLanes=l,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=l,t.entangledLanes&=l,t.errorRecoveryDisabledLanes&=l,t.shellSuspendCounter=0;var T=t.entanglements,N=t.expirationTimes,z=t.hiddenUpdates;for(l=v&~l;0<l;){var G=31-kt(l),F=1<<G;T[G]=0,N[G]=-1;var U=z[G];if(U!==null)for(z[G]=null,G=0;G<U.length;G++){var B=U[G];B!==null&&(B.lane&=-536870913)}l&=~F}c!==0&&Wd(t,c,0),p!==0&&h===0&&t.tag!==0&&(t.suspendedLanes|=p&~(v&~s))}function Wd(t,s,l){t.pendingLanes|=s,t.suspendedLanes&=~s;var c=31-kt(s);t.entangledLanes|=s,t.entanglements[c]=t.entanglements[c]|1073741824|l&261930}function ep(t,s){var l=t.entangledLanes|=s;for(t=t.entanglements;l;){var c=31-kt(l),h=1<<c;h&s|t[c]&s&&(t[c]|=s),l&=~h}}function tp(t,s){var l=s&-s;return l=(l&42)!==0?1:Yc(l),(l&(t.suspendedLanes|s))!==0?0:l}function Yc(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Fc(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function np(){var t=Z.p;return t!==0?t:(t=window.event,t===void 0?32:$y(t.type))}function ip(t,s){var l=Z.p;try{return Z.p=t,s()}finally{Z.p=l}}var li=Math.random().toString(36).slice(2),bt="__reactFiber$"+li,Lt="__reactProps$"+li,Es="__reactContainer$"+li,Qc="__reactEvents$"+li,rw="__reactListeners$"+li,aw="__reactHandles$"+li,sp="__reactResources$"+li,Vr="__reactMarker$"+li;function Pc(t){delete t[bt],delete t[Lt],delete t[Qc],delete t[rw],delete t[aw]}function Ts(t){var s=t[bt];if(s)return s;for(var l=t.parentNode;l;){if(s=l[Es]||l[bt]){if(l=s.alternate,s.child!==null||l!==null&&l.child!==null)for(t=Ty(t);t!==null;){if(l=t[bt])return l;t=Ty(t)}return s}t=l,l=t.parentNode}return null}function As(t){if(t=t[bt]||t[Es]){var s=t.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return t}return null}function Gr(t){var s=t.tag;if(s===5||s===26||s===27||s===6)return t.stateNode;throw Error(r(33))}function Cs(t){var s=t[sp];return s||(s=t[sp]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function gt(t){t[Vr]=!0}var rp=new Set,ap={};function $i(t,s){Ns(t,s),Ns(t+"Capture",s)}function Ns(t,s){for(ap[t]=s,t=0;t<s.length;t++)rp.add(s[t])}var lw=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),lp={},op={};function ow(t){return qr.call(op,t)?!0:qr.call(lp,t)?!1:lw.test(t)?op[t]=!0:(lp[t]=!0,!1)}function xl(t,s,l){if(ow(s))if(l===null)t.removeAttribute(s);else{switch(typeof l){case"undefined":case"function":case"symbol":t.removeAttribute(s);return;case"boolean":var c=s.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){t.removeAttribute(s);return}}t.setAttribute(s,""+l)}}function _l(t,s,l){if(l===null)t.removeAttribute(s);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(s);return}t.setAttribute(s,""+l)}}function Dn(t,s,l,c){if(c===null)t.removeAttribute(l);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(l);return}t.setAttributeNS(s,l,""+c)}}function rn(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function cp(t){var s=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function cw(t,s,l){var c=Object.getOwnPropertyDescriptor(t.constructor.prototype,s);if(!t.hasOwnProperty(s)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var h=c.get,p=c.set;return Object.defineProperty(t,s,{configurable:!0,get:function(){return h.call(this)},set:function(v){l=""+v,p.call(this,v)}}),Object.defineProperty(t,s,{enumerable:c.enumerable}),{getValue:function(){return l},setValue:function(v){l=""+v},stopTracking:function(){t._valueTracker=null,delete t[s]}}}}function Jc(t){if(!t._valueTracker){var s=cp(t)?"checked":"value";t._valueTracker=cw(t,s,""+t[s])}}function up(t){if(!t)return!1;var s=t._valueTracker;if(!s)return!0;var l=s.getValue(),c="";return t&&(c=cp(t)?t.checked?"true":"false":t.value),t=c,t!==l?(s.setValue(t),!0):!1}function El(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var uw=/[\n"\\]/g;function an(t){return t.replace(uw,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function Zc(t,s,l,c,h,p,v,T){t.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?t.type=v:t.removeAttribute("type"),s!=null?v==="number"?(s===0&&t.value===""||t.value!=s)&&(t.value=""+rn(s)):t.value!==""+rn(s)&&(t.value=""+rn(s)):v!=="submit"&&v!=="reset"||t.removeAttribute("value"),s!=null?Wc(t,v,rn(s)):l!=null?Wc(t,v,rn(l)):c!=null&&t.removeAttribute("value"),h==null&&p!=null&&(t.defaultChecked=!!p),h!=null&&(t.checked=h&&typeof h!="function"&&typeof h!="symbol"),T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?t.name=""+rn(T):t.removeAttribute("name")}function fp(t,s,l,c,h,p,v,T){if(p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(t.type=p),s!=null||l!=null){if(!(p!=="submit"&&p!=="reset"||s!=null)){Jc(t);return}l=l!=null?""+rn(l):"",s=s!=null?""+rn(s):l,T||s===t.value||(t.value=s),t.defaultValue=s}c=c??h,c=typeof c!="function"&&typeof c!="symbol"&&!!c,t.checked=T?t.checked:!!c,t.defaultChecked=!!c,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(t.name=v),Jc(t)}function Wc(t,s,l){s==="number"&&El(t.ownerDocument)===t||t.defaultValue===""+l||(t.defaultValue=""+l)}function ks(t,s,l,c){if(t=t.options,s){s={};for(var h=0;h<l.length;h++)s["$"+l[h]]=!0;for(l=0;l<t.length;l++)h=s.hasOwnProperty("$"+t[l].value),t[l].selected!==h&&(t[l].selected=h),h&&c&&(t[l].defaultSelected=!0)}else{for(l=""+rn(l),s=null,h=0;h<t.length;h++){if(t[h].value===l){t[h].selected=!0,c&&(t[h].defaultSelected=!0);return}s!==null||t[h].disabled||(s=t[h])}s!==null&&(s.selected=!0)}}function hp(t,s,l){if(s!=null&&(s=""+rn(s),s!==t.value&&(t.value=s),l==null)){t.defaultValue!==s&&(t.defaultValue=s);return}t.defaultValue=l!=null?""+rn(l):""}function dp(t,s,l,c){if(s==null){if(c!=null){if(l!=null)throw Error(r(92));if(Me(c)){if(1<c.length)throw Error(r(93));c=c[0]}l=c}l==null&&(l=""),s=l}l=rn(s),t.defaultValue=l,c=t.textContent,c===l&&c!==""&&c!==null&&(t.value=c),Jc(t)}function Ms(t,s){if(s){var l=t.firstChild;if(l&&l===t.lastChild&&l.nodeType===3){l.nodeValue=s;return}}t.textContent=s}var fw=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function pp(t,s,l){var c=s.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?c?t.setProperty(s,""):s==="float"?t.cssFloat="":t[s]="":c?t.setProperty(s,l):typeof l!="number"||l===0||fw.has(s)?s==="float"?t.cssFloat=l:t[s]=(""+l).trim():t[s]=l+"px"}function gp(t,s,l){if(s!=null&&typeof s!="object")throw Error(r(62));if(t=t.style,l!=null){for(var c in l)!l.hasOwnProperty(c)||s!=null&&s.hasOwnProperty(c)||(c.indexOf("--")===0?t.setProperty(c,""):c==="float"?t.cssFloat="":t[c]="");for(var h in s)c=s[h],s.hasOwnProperty(h)&&l[h]!==c&&pp(t,h,c)}else for(var p in s)s.hasOwnProperty(p)&&pp(t,p,s[p])}function eu(t){if(t.indexOf("-")===-1)return!1;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var hw=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),dw=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Tl(t){return dw.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function zn(){}var tu=null;function nu(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Os=null,js=null;function mp(t){var s=As(t);if(s&&(t=s.stateNode)){var l=t[Lt]||null;e:switch(t=s.stateNode,s.type){case"input":if(Zc(t,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),s=l.name,l.type==="radio"&&s!=null){for(l=t;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+an(""+s)+'"][type="radio"]'),s=0;s<l.length;s++){var c=l[s];if(c!==t&&c.form===t.form){var h=c[Lt]||null;if(!h)throw Error(r(90));Zc(c,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(s=0;s<l.length;s++)c=l[s],c.form===t.form&&up(c)}break e;case"textarea":hp(t,l.value,l.defaultValue);break e;case"select":s=l.value,s!=null&&ks(t,!!l.multiple,s,!1)}}}var iu=!1;function yp(t,s,l){if(iu)return t(s,l);iu=!0;try{var c=t(s);return c}finally{if(iu=!1,(Os!==null||js!==null)&&(ho(),Os&&(s=Os,t=js,js=Os=null,mp(s),t)))for(s=0;s<t.length;s++)mp(t[s])}}function Kr(t,s){var l=t.stateNode;if(l===null)return null;var c=l[Lt]||null;if(c===null)return null;l=c[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(t=t.type,c=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!c;break e;default:t=!1}if(t)return null;if(l&&typeof l!="function")throw Error(r(231,s,typeof l));return l}var Un=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),su=!1;if(Un)try{var Xr={};Object.defineProperty(Xr,"passive",{get:function(){su=!0}}),window.addEventListener("test",Xr,Xr),window.removeEventListener("test",Xr,Xr)}catch{su=!1}var oi=null,ru=null,Al=null;function bp(){if(Al)return Al;var t,s=ru,l=s.length,c,h="value"in oi?oi.value:oi.textContent,p=h.length;for(t=0;t<l&&s[t]===h[t];t++);var v=l-t;for(c=1;c<=v&&s[l-c]===h[p-c];c++);return Al=h.slice(t,1<c?1-c:void 0)}function Cl(t){var s=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&s===13&&(t=13)):t=s,t===10&&(t=13),32<=t||t===13?t:0}function Nl(){return!0}function vp(){return!1}function Rt(t){function s(l,c,h,p,v){this._reactName=l,this._targetInst=h,this.type=c,this.nativeEvent=p,this.target=v,this.currentTarget=null;for(var T in t)t.hasOwnProperty(T)&&(l=t[T],this[T]=l?l(p):p[T]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?Nl:vp,this.isPropagationStopped=vp,this}return y(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Nl)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Nl)},persist:function(){},isPersistent:Nl}),s}var Ii={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},kl=Rt(Ii),Yr=y({},Ii,{view:0,detail:0}),pw=Rt(Yr),au,lu,Fr,Ml=y({},Yr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:cu,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Fr&&(Fr&&t.type==="mousemove"?(au=t.screenX-Fr.screenX,lu=t.screenY-Fr.screenY):lu=au=0,Fr=t),au)},movementY:function(t){return"movementY"in t?t.movementY:lu}}),Sp=Rt(Ml),gw=y({},Ml,{dataTransfer:0}),mw=Rt(gw),yw=y({},Yr,{relatedTarget:0}),ou=Rt(yw),bw=y({},Ii,{animationName:0,elapsedTime:0,pseudoElement:0}),vw=Rt(bw),Sw=y({},Ii,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),ww=Rt(Sw),xw=y({},Ii,{data:0}),wp=Rt(xw),_w={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ew={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Tw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Aw(t){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(t):(t=Tw[t])?!!s[t]:!1}function cu(){return Aw}var Cw=y({},Yr,{key:function(t){if(t.key){var s=_w[t.key]||t.key;if(s!=="Unidentified")return s}return t.type==="keypress"?(t=Cl(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Ew[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:cu,charCode:function(t){return t.type==="keypress"?Cl(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Cl(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Nw=Rt(Cw),kw=y({},Ml,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),xp=Rt(kw),Mw=y({},Yr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:cu}),Ow=Rt(Mw),jw=y({},Ii,{propertyName:0,elapsedTime:0,pseudoElement:0}),Lw=Rt(jw),Rw=y({},Ml,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),Dw=Rt(Rw),zw=y({},Ii,{newState:0,oldState:0}),Uw=Rt(zw),Hw=[9,13,27,32],uu=Un&&"CompositionEvent"in window,Qr=null;Un&&"documentMode"in document&&(Qr=document.documentMode);var Bw=Un&&"TextEvent"in window&&!Qr,_p=Un&&(!uu||Qr&&8<Qr&&11>=Qr),Ep=" ",Tp=!1;function Ap(t,s){switch(t){case"keyup":return Hw.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Cp(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Ls=!1;function qw(t,s){switch(t){case"compositionend":return Cp(s);case"keypress":return s.which!==32?null:(Tp=!0,Ep);case"textInput":return t=s.data,t===Ep&&Tp?null:t;default:return null}}function $w(t,s){if(Ls)return t==="compositionend"||!uu&&Ap(t,s)?(t=bp(),Al=ru=oi=null,Ls=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return _p&&s.locale!=="ko"?null:s.data;default:return null}}var Iw={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Np(t){var s=t&&t.nodeName&&t.nodeName.toLowerCase();return s==="input"?!!Iw[t.type]:s==="textarea"}function kp(t,s,l,c){Os?js?js.push(c):js=[c]:Os=c,s=So(s,"onChange"),0<s.length&&(l=new kl("onChange","change",null,l,c),t.push({event:l,listeners:s}))}var Pr=null,Jr=null;function Vw(t){fy(t,0)}function Ol(t){var s=Gr(t);if(up(s))return t}function Mp(t,s){if(t==="change")return s}var Op=!1;if(Un){var fu;if(Un){var hu="oninput"in document;if(!hu){var jp=document.createElement("div");jp.setAttribute("oninput","return;"),hu=typeof jp.oninput=="function"}fu=hu}else fu=!1;Op=fu&&(!document.documentMode||9<document.documentMode)}function Lp(){Pr&&(Pr.detachEvent("onpropertychange",Rp),Jr=Pr=null)}function Rp(t){if(t.propertyName==="value"&&Ol(Jr)){var s=[];kp(s,Jr,t,nu(t)),yp(Vw,s)}}function Gw(t,s,l){t==="focusin"?(Lp(),Pr=s,Jr=l,Pr.attachEvent("onpropertychange",Rp)):t==="focusout"&&Lp()}function Kw(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Ol(Jr)}function Xw(t,s){if(t==="click")return Ol(s)}function Yw(t,s){if(t==="input"||t==="change")return Ol(s)}function Fw(t,s){return t===s&&(t!==0||1/t===1/s)||t!==t&&s!==s}var Qt=typeof Object.is=="function"?Object.is:Fw;function Zr(t,s){if(Qt(t,s))return!0;if(typeof t!="object"||t===null||typeof s!="object"||s===null)return!1;var l=Object.keys(t),c=Object.keys(s);if(l.length!==c.length)return!1;for(c=0;c<l.length;c++){var h=l[c];if(!qr.call(s,h)||!Qt(t[h],s[h]))return!1}return!0}function Dp(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function zp(t,s){var l=Dp(t);t=0;for(var c;l;){if(l.nodeType===3){if(c=t+l.textContent.length,t<=s&&c>=s)return{node:l,offset:s-t};t=c}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Dp(l)}}function Up(t,s){return t&&s?t===s?!0:t&&t.nodeType===3?!1:s&&s.nodeType===3?Up(t,s.parentNode):"contains"in t?t.contains(s):t.compareDocumentPosition?!!(t.compareDocumentPosition(s)&16):!1:!1}function Hp(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var s=El(t.document);s instanceof t.HTMLIFrameElement;){try{var l=typeof s.contentWindow.location.href=="string"}catch{l=!1}if(l)t=s.contentWindow;else break;s=El(t.document)}return s}function du(t){var s=t&&t.nodeName&&t.nodeName.toLowerCase();return s&&(s==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||s==="textarea"||t.contentEditable==="true")}var Qw=Un&&"documentMode"in document&&11>=document.documentMode,Rs=null,pu=null,Wr=null,gu=!1;function Bp(t,s,l){var c=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;gu||Rs==null||Rs!==El(c)||(c=Rs,"selectionStart"in c&&du(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Wr&&Zr(Wr,c)||(Wr=c,c=So(pu,"onSelect"),0<c.length&&(s=new kl("onSelect","select",null,s,l),t.push({event:s,listeners:c}),s.target=Rs)))}function Vi(t,s){var l={};return l[t.toLowerCase()]=s.toLowerCase(),l["Webkit"+t]="webkit"+s,l["Moz"+t]="moz"+s,l}var Ds={animationend:Vi("Animation","AnimationEnd"),animationiteration:Vi("Animation","AnimationIteration"),animationstart:Vi("Animation","AnimationStart"),transitionrun:Vi("Transition","TransitionRun"),transitionstart:Vi("Transition","TransitionStart"),transitioncancel:Vi("Transition","TransitionCancel"),transitionend:Vi("Transition","TransitionEnd")},mu={},qp={};Un&&(qp=document.createElement("div").style,"AnimationEvent"in window||(delete Ds.animationend.animation,delete Ds.animationiteration.animation,delete Ds.animationstart.animation),"TransitionEvent"in window||delete Ds.transitionend.transition);function Gi(t){if(mu[t])return mu[t];if(!Ds[t])return t;var s=Ds[t],l;for(l in s)if(s.hasOwnProperty(l)&&l in qp)return mu[t]=s[l];return t}var $p=Gi("animationend"),Ip=Gi("animationiteration"),Vp=Gi("animationstart"),Pw=Gi("transitionrun"),Jw=Gi("transitionstart"),Zw=Gi("transitioncancel"),Gp=Gi("transitionend"),Kp=new Map,yu="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");yu.push("scrollEnd");function vn(t,s){Kp.set(t,s),$i(s,[t])}var jl=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},ln=[],zs=0,bu=0;function Ll(){for(var t=zs,s=bu=zs=0;s<t;){var l=ln[s];ln[s++]=null;var c=ln[s];ln[s++]=null;var h=ln[s];ln[s++]=null;var p=ln[s];if(ln[s++]=null,c!==null&&h!==null){var v=c.pending;v===null?h.next=h:(h.next=v.next,v.next=h),c.pending=h}p!==0&&Xp(l,h,p)}}function Rl(t,s,l,c){ln[zs++]=t,ln[zs++]=s,ln[zs++]=l,ln[zs++]=c,bu|=c,t.lanes|=c,t=t.alternate,t!==null&&(t.lanes|=c)}function vu(t,s,l,c){return Rl(t,s,l,c),Dl(t)}function Ki(t,s){return Rl(t,null,null,s),Dl(t)}function Xp(t,s,l){t.lanes|=l;var c=t.alternate;c!==null&&(c.lanes|=l);for(var h=!1,p=t.return;p!==null;)p.childLanes|=l,c=p.alternate,c!==null&&(c.childLanes|=l),p.tag===22&&(t=p.stateNode,t===null||t._visibility&1||(h=!0)),t=p,p=p.return;return t.tag===3?(p=t.stateNode,h&&s!==null&&(h=31-kt(l),t=p.hiddenUpdates,c=t[h],c===null?t[h]=[s]:c.push(s),s.lane=l|536870912),p):null}function Dl(t){if(50<wa)throw wa=0,kf=null,Error(r(185));for(var s=t.return;s!==null;)t=s,s=t.return;return t.tag===3?t.stateNode:null}var Us={};function Ww(t,s,l,c){this.tag=t,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pt(t,s,l,c){return new Ww(t,s,l,c)}function Su(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Hn(t,s){var l=t.alternate;return l===null?(l=Pt(t.tag,s,t.key,t.mode),l.elementType=t.elementType,l.type=t.type,l.stateNode=t.stateNode,l.alternate=t,t.alternate=l):(l.pendingProps=s,l.type=t.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=t.flags&65011712,l.childLanes=t.childLanes,l.lanes=t.lanes,l.child=t.child,l.memoizedProps=t.memoizedProps,l.memoizedState=t.memoizedState,l.updateQueue=t.updateQueue,s=t.dependencies,l.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},l.sibling=t.sibling,l.index=t.index,l.ref=t.ref,l.refCleanup=t.refCleanup,l}function Yp(t,s){t.flags&=65011714;var l=t.alternate;return l===null?(t.childLanes=0,t.lanes=s,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=l.childLanes,t.lanes=l.lanes,t.child=l.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=l.memoizedProps,t.memoizedState=l.memoizedState,t.updateQueue=l.updateQueue,t.type=l.type,s=l.dependencies,t.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),t}function zl(t,s,l,c,h,p){var v=0;if(c=t,typeof t=="function")Su(t)&&(v=1);else if(typeof t=="string")v=sx(t,l,te.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case O:return t=Pt(31,l,s,h),t.elementType=O,t.lanes=p,t;case x:return Xi(l.children,h,p,s);case _:v=8,h|=24;break;case A:return t=Pt(12,l,s,h|2),t.elementType=A,t.lanes=p,t;case K:return t=Pt(13,l,s,h),t.elementType=K,t.lanes=p,t;case Q:return t=Pt(19,l,s,h),t.elementType=Q,t.lanes=p,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case H:v=10;break e;case C:v=9;break e;case V:v=11;break e;case j:v=14;break e;case I:v=16,c=null;break e}v=29,l=Error(r(130,t===null?"null":typeof t,"")),c=null}return s=Pt(v,l,s,h),s.elementType=t,s.type=c,s.lanes=p,s}function Xi(t,s,l,c){return t=Pt(7,t,c,s),t.lanes=l,t}function wu(t,s,l){return t=Pt(6,t,null,s),t.lanes=l,t}function Fp(t){var s=Pt(18,null,null,0);return s.stateNode=t,s}function xu(t,s,l){return s=Pt(4,t.children!==null?t.children:[],t.key,s),s.lanes=l,s.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},s}var Qp=new WeakMap;function on(t,s){if(typeof t=="object"&&t!==null){var l=Qp.get(t);return l!==void 0?l:(s={value:t,source:s,stack:bs(s)},Qp.set(t,s),s)}return{value:t,source:s,stack:bs(s)}}var Hs=[],Bs=0,Ul=null,ea=0,cn=[],un=0,ci=null,An=1,Cn="";function Bn(t,s){Hs[Bs++]=ea,Hs[Bs++]=Ul,Ul=t,ea=s}function Pp(t,s,l){cn[un++]=An,cn[un++]=Cn,cn[un++]=ci,ci=t;var c=An;t=Cn;var h=32-kt(c)-1;c&=~(1<<h),l+=1;var p=32-kt(s)+h;if(30<p){var v=h-h%5;p=(c&(1<<v)-1).toString(32),c>>=v,h-=v,An=1<<32-kt(s)+h|l<<h|c,Cn=p+t}else An=1<<p|l<<h|c,Cn=t}function _u(t){t.return!==null&&(Bn(t,1),Pp(t,1,0))}function Eu(t){for(;t===Ul;)Ul=Hs[--Bs],Hs[Bs]=null,ea=Hs[--Bs],Hs[Bs]=null;for(;t===ci;)ci=cn[--un],cn[un]=null,Cn=cn[--un],cn[un]=null,An=cn[--un],cn[un]=null}function Jp(t,s){cn[un++]=An,cn[un++]=Cn,cn[un++]=ci,An=s.id,Cn=s.overflow,ci=t}var vt=null,Be=null,we=!1,ui=null,fn=!1,Tu=Error(r(519));function fi(t){var s=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ta(on(s,t)),Tu}function Zp(t){var s=t.stateNode,l=t.type,c=t.memoizedProps;switch(s[bt]=t,s[Lt]=c,l){case"dialog":be("cancel",s),be("close",s);break;case"iframe":case"object":case"embed":be("load",s);break;case"video":case"audio":for(l=0;l<_a.length;l++)be(_a[l],s);break;case"source":be("error",s);break;case"img":case"image":case"link":be("error",s),be("load",s);break;case"details":be("toggle",s);break;case"input":be("invalid",s),fp(s,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":be("invalid",s);break;case"textarea":be("invalid",s),dp(s,c.value,c.defaultValue,c.children)}l=c.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||s.textContent===""+l||c.suppressHydrationWarning===!0||gy(s.textContent,l)?(c.popover!=null&&(be("beforetoggle",s),be("toggle",s)),c.onScroll!=null&&be("scroll",s),c.onScrollEnd!=null&&be("scrollend",s),c.onClick!=null&&(s.onclick=zn),s=!0):s=!1,s||fi(t,!0)}function Wp(t){for(vt=t.return;vt;)switch(vt.tag){case 5:case 31:case 13:fn=!1;return;case 27:case 3:fn=!0;return;default:vt=vt.return}}function qs(t){if(t!==vt)return!1;if(!we)return Wp(t),we=!0,!1;var s=t.tag,l;if((l=s!==3&&s!==27)&&((l=s===5)&&(l=t.type,l=!(l!=="form"&&l!=="button")||Gf(t.type,t.memoizedProps)),l=!l),l&&Be&&fi(t),Wp(t),s===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));Be=Ey(t)}else if(s===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));Be=Ey(t)}else s===27?(s=Be,Ti(t.type)?(t=Qf,Qf=null,Be=t):Be=s):Be=vt?dn(t.stateNode.nextSibling):null;return!0}function Yi(){Be=vt=null,we=!1}function Au(){var t=ui;return t!==null&&(Ht===null?Ht=t:Ht.push.apply(Ht,t),ui=null),t}function ta(t){ui===null?ui=[t]:ui.push(t)}var Cu=M(null),Fi=null,qn=null;function hi(t,s,l){W(Cu,s._currentValue),s._currentValue=l}function $n(t){t._currentValue=Cu.current,X(Cu)}function Nu(t,s,l){for(;t!==null;){var c=t.alternate;if((t.childLanes&s)!==s?(t.childLanes|=s,c!==null&&(c.childLanes|=s)):c!==null&&(c.childLanes&s)!==s&&(c.childLanes|=s),t===l)break;t=t.return}}function ku(t,s,l,c){var h=t.child;for(h!==null&&(h.return=t);h!==null;){var p=h.dependencies;if(p!==null){var v=h.child;p=p.firstContext;e:for(;p!==null;){var T=p;p=h;for(var N=0;N<s.length;N++)if(T.context===s[N]){p.lanes|=l,T=p.alternate,T!==null&&(T.lanes|=l),Nu(p.return,l,t),c||(v=null);break e}p=T.next}}else if(h.tag===18){if(v=h.return,v===null)throw Error(r(341));v.lanes|=l,p=v.alternate,p!==null&&(p.lanes|=l),Nu(v,l,t),v=null}else v=h.child;if(v!==null)v.return=h;else for(v=h;v!==null;){if(v===t){v=null;break}if(h=v.sibling,h!==null){h.return=v.return,v=h;break}v=v.return}h=v}}function $s(t,s,l,c){t=null;for(var h=s,p=!1;h!==null;){if(!p){if((h.flags&524288)!==0)p=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var v=h.alternate;if(v===null)throw Error(r(387));if(v=v.memoizedProps,v!==null){var T=h.type;Qt(h.pendingProps.value,v.value)||(t!==null?t.push(T):t=[T])}}else if(h===xe.current){if(v=h.alternate,v===null)throw Error(r(387));v.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(t!==null?t.push(Na):t=[Na])}h=h.return}t!==null&&ku(s,t,l,c),s.flags|=262144}function Hl(t){for(t=t.firstContext;t!==null;){if(!Qt(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Qi(t){Fi=t,qn=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function St(t){return eg(Fi,t)}function Bl(t,s){return Fi===null&&Qi(t),eg(t,s)}function eg(t,s){var l=s._currentValue;if(s={context:s,memoizedValue:l,next:null},qn===null){if(t===null)throw Error(r(308));qn=s,t.dependencies={lanes:0,firstContext:s},t.flags|=524288}else qn=qn.next=s;return l}var e1=typeof AbortController<"u"?AbortController:function(){var t=[],s=this.signal={aborted:!1,addEventListener:function(l,c){t.push(c)}};this.abort=function(){s.aborted=!0,t.forEach(function(l){return l()})}},t1=n.unstable_scheduleCallback,n1=n.unstable_NormalPriority,st={$$typeof:H,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Mu(){return{controller:new e1,data:new Map,refCount:0}}function na(t){t.refCount--,t.refCount===0&&t1(n1,function(){t.controller.abort()})}var ia=null,Ou=0,Is=0,Vs=null;function i1(t,s){if(ia===null){var l=ia=[];Ou=0,Is=Df(),Vs={status:"pending",value:void 0,then:function(c){l.push(c)}}}return Ou++,s.then(tg,tg),s}function tg(){if(--Ou===0&&ia!==null){Vs!==null&&(Vs.status="fulfilled");var t=ia;ia=null,Is=0,Vs=null;for(var s=0;s<t.length;s++)(0,t[s])()}}function s1(t,s){var l=[],c={status:"pending",value:null,reason:null,then:function(h){l.push(h)}};return t.then(function(){c.status="fulfilled",c.value=s;for(var h=0;h<l.length;h++)(0,l[h])(s)},function(h){for(c.status="rejected",c.reason=h,h=0;h<l.length;h++)(0,l[h])(void 0)}),c}var ng=q.S;q.S=function(t,s){Bm=it(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&i1(t,s),ng!==null&&ng(t,s)};var Pi=M(null);function ju(){var t=Pi.current;return t!==null?t:De.pooledCache}function ql(t,s){s===null?W(Pi,Pi.current):W(Pi,s.pool)}function ig(){var t=ju();return t===null?null:{parent:st._currentValue,pool:t}}var Gs=Error(r(460)),Lu=Error(r(474)),$l=Error(r(542)),Il={then:function(){}};function sg(t){return t=t.status,t==="fulfilled"||t==="rejected"}function rg(t,s,l){switch(l=t[l],l===void 0?t.push(s):l!==s&&(s.then(zn,zn),s=l),s.status){case"fulfilled":return s.value;case"rejected":throw t=s.reason,lg(t),t;default:if(typeof s.status=="string")s.then(zn,zn);else{if(t=De,t!==null&&100<t.shellSuspendCounter)throw Error(r(482));t=s,t.status="pending",t.then(function(c){if(s.status==="pending"){var h=s;h.status="fulfilled",h.value=c}},function(c){if(s.status==="pending"){var h=s;h.status="rejected",h.reason=c}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw t=s.reason,lg(t),t}throw Zi=s,Gs}}function Ji(t){try{var s=t._init;return s(t._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Zi=l,Gs):l}}var Zi=null;function ag(){if(Zi===null)throw Error(r(459));var t=Zi;return Zi=null,t}function lg(t){if(t===Gs||t===$l)throw Error(r(483))}var Ks=null,sa=0;function Vl(t){var s=sa;return sa+=1,Ks===null&&(Ks=[]),rg(Ks,t,s)}function ra(t,s){s=s.props.ref,t.ref=s!==void 0?s:null}function Gl(t,s){throw s.$$typeof===S?Error(r(525)):(t=Object.prototype.toString.call(s),Error(r(31,t==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":t)))}function og(t){function s(L,k){if(t){var D=L.deletions;D===null?(L.deletions=[k],L.flags|=16):D.push(k)}}function l(L,k){if(!t)return null;for(;k!==null;)s(L,k),k=k.sibling;return null}function c(L){for(var k=new Map;L!==null;)L.key!==null?k.set(L.key,L):k.set(L.index,L),L=L.sibling;return k}function h(L,k){return L=Hn(L,k),L.index=0,L.sibling=null,L}function p(L,k,D){return L.index=D,t?(D=L.alternate,D!==null?(D=D.index,D<k?(L.flags|=67108866,k):D):(L.flags|=67108866,k)):(L.flags|=1048576,k)}function v(L){return t&&L.alternate===null&&(L.flags|=67108866),L}function T(L,k,D,Y){return k===null||k.tag!==6?(k=wu(D,L.mode,Y),k.return=L,k):(k=h(k,D),k.return=L,k)}function N(L,k,D,Y){var ae=D.type;return ae===x?G(L,k,D.props.children,Y,D.key):k!==null&&(k.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===I&&Ji(ae)===k.type)?(k=h(k,D.props),ra(k,D),k.return=L,k):(k=zl(D.type,D.key,D.props,null,L.mode,Y),ra(k,D),k.return=L,k)}function z(L,k,D,Y){return k===null||k.tag!==4||k.stateNode.containerInfo!==D.containerInfo||k.stateNode.implementation!==D.implementation?(k=xu(D,L.mode,Y),k.return=L,k):(k=h(k,D.children||[]),k.return=L,k)}function G(L,k,D,Y,ae){return k===null||k.tag!==7?(k=Xi(D,L.mode,Y,ae),k.return=L,k):(k=h(k,D),k.return=L,k)}function F(L,k,D){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return k=wu(""+k,L.mode,D),k.return=L,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case w:return D=zl(k.type,k.key,k.props,null,L.mode,D),ra(D,k),D.return=L,D;case E:return k=xu(k,L.mode,D),k.return=L,k;case I:return k=Ji(k),F(L,k,D)}if(Me(k)||$(k))return k=Xi(k,L.mode,D,null),k.return=L,k;if(typeof k.then=="function")return F(L,Vl(k),D);if(k.$$typeof===H)return F(L,Bl(L,k),D);Gl(L,k)}return null}function U(L,k,D,Y){var ae=k!==null?k.key:null;if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return ae!==null?null:T(L,k,""+D,Y);if(typeof D=="object"&&D!==null){switch(D.$$typeof){case w:return D.key===ae?N(L,k,D,Y):null;case E:return D.key===ae?z(L,k,D,Y):null;case I:return D=Ji(D),U(L,k,D,Y)}if(Me(D)||$(D))return ae!==null?null:G(L,k,D,Y,null);if(typeof D.then=="function")return U(L,k,Vl(D),Y);if(D.$$typeof===H)return U(L,k,Bl(L,D),Y);Gl(L,D)}return null}function B(L,k,D,Y,ae){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return L=L.get(D)||null,T(k,L,""+Y,ae);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case w:return L=L.get(Y.key===null?D:Y.key)||null,N(k,L,Y,ae);case E:return L=L.get(Y.key===null?D:Y.key)||null,z(k,L,Y,ae);case I:return Y=Ji(Y),B(L,k,D,Y,ae)}if(Me(Y)||$(Y))return L=L.get(D)||null,G(k,L,Y,ae,null);if(typeof Y.then=="function")return B(L,k,D,Vl(Y),ae);if(Y.$$typeof===H)return B(L,k,D,Bl(k,Y),ae);Gl(k,Y)}return null}function ne(L,k,D,Y){for(var ae=null,Te=null,ie=k,ge=k=0,Se=null;ie!==null&&ge<D.length;ge++){ie.index>ge?(Se=ie,ie=null):Se=ie.sibling;var Ae=U(L,ie,D[ge],Y);if(Ae===null){ie===null&&(ie=Se);break}t&&ie&&Ae.alternate===null&&s(L,ie),k=p(Ae,k,ge),Te===null?ae=Ae:Te.sibling=Ae,Te=Ae,ie=Se}if(ge===D.length)return l(L,ie),we&&Bn(L,ge),ae;if(ie===null){for(;ge<D.length;ge++)ie=F(L,D[ge],Y),ie!==null&&(k=p(ie,k,ge),Te===null?ae=ie:Te.sibling=ie,Te=ie);return we&&Bn(L,ge),ae}for(ie=c(ie);ge<D.length;ge++)Se=B(ie,L,ge,D[ge],Y),Se!==null&&(t&&Se.alternate!==null&&ie.delete(Se.key===null?ge:Se.key),k=p(Se,k,ge),Te===null?ae=Se:Te.sibling=Se,Te=Se);return t&&ie.forEach(function(Mi){return s(L,Mi)}),we&&Bn(L,ge),ae}function oe(L,k,D,Y){if(D==null)throw Error(r(151));for(var ae=null,Te=null,ie=k,ge=k=0,Se=null,Ae=D.next();ie!==null&&!Ae.done;ge++,Ae=D.next()){ie.index>ge?(Se=ie,ie=null):Se=ie.sibling;var Mi=U(L,ie,Ae.value,Y);if(Mi===null){ie===null&&(ie=Se);break}t&&ie&&Mi.alternate===null&&s(L,ie),k=p(Mi,k,ge),Te===null?ae=Mi:Te.sibling=Mi,Te=Mi,ie=Se}if(Ae.done)return l(L,ie),we&&Bn(L,ge),ae;if(ie===null){for(;!Ae.done;ge++,Ae=D.next())Ae=F(L,Ae.value,Y),Ae!==null&&(k=p(Ae,k,ge),Te===null?ae=Ae:Te.sibling=Ae,Te=Ae);return we&&Bn(L,ge),ae}for(ie=c(ie);!Ae.done;ge++,Ae=D.next())Ae=B(ie,L,ge,Ae.value,Y),Ae!==null&&(t&&Ae.alternate!==null&&ie.delete(Ae.key===null?ge:Ae.key),k=p(Ae,k,ge),Te===null?ae=Ae:Te.sibling=Ae,Te=Ae);return t&&ie.forEach(function(gx){return s(L,gx)}),we&&Bn(L,ge),ae}function Le(L,k,D,Y){if(typeof D=="object"&&D!==null&&D.type===x&&D.key===null&&(D=D.props.children),typeof D=="object"&&D!==null){switch(D.$$typeof){case w:e:{for(var ae=D.key;k!==null;){if(k.key===ae){if(ae=D.type,ae===x){if(k.tag===7){l(L,k.sibling),Y=h(k,D.props.children),Y.return=L,L=Y;break e}}else if(k.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===I&&Ji(ae)===k.type){l(L,k.sibling),Y=h(k,D.props),ra(Y,D),Y.return=L,L=Y;break e}l(L,k);break}else s(L,k);k=k.sibling}D.type===x?(Y=Xi(D.props.children,L.mode,Y,D.key),Y.return=L,L=Y):(Y=zl(D.type,D.key,D.props,null,L.mode,Y),ra(Y,D),Y.return=L,L=Y)}return v(L);case E:e:{for(ae=D.key;k!==null;){if(k.key===ae)if(k.tag===4&&k.stateNode.containerInfo===D.containerInfo&&k.stateNode.implementation===D.implementation){l(L,k.sibling),Y=h(k,D.children||[]),Y.return=L,L=Y;break e}else{l(L,k);break}else s(L,k);k=k.sibling}Y=xu(D,L.mode,Y),Y.return=L,L=Y}return v(L);case I:return D=Ji(D),Le(L,k,D,Y)}if(Me(D))return ne(L,k,D,Y);if($(D)){if(ae=$(D),typeof ae!="function")throw Error(r(150));return D=ae.call(D),oe(L,k,D,Y)}if(typeof D.then=="function")return Le(L,k,Vl(D),Y);if(D.$$typeof===H)return Le(L,k,Bl(L,D),Y);Gl(L,D)}return typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint"?(D=""+D,k!==null&&k.tag===6?(l(L,k.sibling),Y=h(k,D),Y.return=L,L=Y):(l(L,k),Y=wu(D,L.mode,Y),Y.return=L,L=Y),v(L)):l(L,k)}return function(L,k,D,Y){try{sa=0;var ae=Le(L,k,D,Y);return Ks=null,ae}catch(ie){if(ie===Gs||ie===$l)throw ie;var Te=Pt(29,ie,null,L.mode);return Te.lanes=Y,Te.return=L,Te}finally{}}}var Wi=og(!0),cg=og(!1),di=!1;function Ru(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Du(t,s){t=t.updateQueue,s.updateQueue===t&&(s.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function pi(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function gi(t,s,l){var c=t.updateQueue;if(c===null)return null;if(c=c.shared,(Ce&2)!==0){var h=c.pending;return h===null?s.next=s:(s.next=h.next,h.next=s),c.pending=s,s=Dl(t),Xp(t,null,l),s}return Rl(t,c,s,l),Dl(t)}function aa(t,s,l){if(s=s.updateQueue,s!==null&&(s=s.shared,(l&4194048)!==0)){var c=s.lanes;c&=t.pendingLanes,l|=c,s.lanes=l,ep(t,l)}}function zu(t,s){var l=t.updateQueue,c=t.alternate;if(c!==null&&(c=c.updateQueue,l===c)){var h=null,p=null;if(l=l.firstBaseUpdate,l!==null){do{var v={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};p===null?h=p=v:p=p.next=v,l=l.next}while(l!==null);p===null?h=p=s:p=p.next=s}else h=p=s;l={baseState:c.baseState,firstBaseUpdate:h,lastBaseUpdate:p,shared:c.shared,callbacks:c.callbacks},t.updateQueue=l;return}t=l.lastBaseUpdate,t===null?l.firstBaseUpdate=s:t.next=s,l.lastBaseUpdate=s}var Uu=!1;function la(){if(Uu){var t=Vs;if(t!==null)throw t}}function oa(t,s,l,c){Uu=!1;var h=t.updateQueue;di=!1;var p=h.firstBaseUpdate,v=h.lastBaseUpdate,T=h.shared.pending;if(T!==null){h.shared.pending=null;var N=T,z=N.next;N.next=null,v===null?p=z:v.next=z,v=N;var G=t.alternate;G!==null&&(G=G.updateQueue,T=G.lastBaseUpdate,T!==v&&(T===null?G.firstBaseUpdate=z:T.next=z,G.lastBaseUpdate=N))}if(p!==null){var F=h.baseState;v=0,G=z=N=null,T=p;do{var U=T.lane&-536870913,B=U!==T.lane;if(B?(ve&U)===U:(c&U)===U){U!==0&&U===Is&&(Uu=!0),G!==null&&(G=G.next={lane:0,tag:T.tag,payload:T.payload,callback:null,next:null});e:{var ne=t,oe=T;U=s;var Le=l;switch(oe.tag){case 1:if(ne=oe.payload,typeof ne=="function"){F=ne.call(Le,F,U);break e}F=ne;break e;case 3:ne.flags=ne.flags&-65537|128;case 0:if(ne=oe.payload,U=typeof ne=="function"?ne.call(Le,F,U):ne,U==null)break e;F=y({},F,U);break e;case 2:di=!0}}U=T.callback,U!==null&&(t.flags|=64,B&&(t.flags|=8192),B=h.callbacks,B===null?h.callbacks=[U]:B.push(U))}else B={lane:U,tag:T.tag,payload:T.payload,callback:T.callback,next:null},G===null?(z=G=B,N=F):G=G.next=B,v|=U;if(T=T.next,T===null){if(T=h.shared.pending,T===null)break;B=T,T=B.next,B.next=null,h.lastBaseUpdate=B,h.shared.pending=null}}while(!0);G===null&&(N=F),h.baseState=N,h.firstBaseUpdate=z,h.lastBaseUpdate=G,p===null&&(h.shared.lanes=0),Si|=v,t.lanes=v,t.memoizedState=F}}function ug(t,s){if(typeof t!="function")throw Error(r(191,t));t.call(s)}function fg(t,s){var l=t.callbacks;if(l!==null)for(t.callbacks=null,t=0;t<l.length;t++)ug(l[t],s)}var Xs=M(null),Kl=M(0);function hg(t,s){t=Pn,W(Kl,t),W(Xs,s),Pn=t|s.baseLanes}function Hu(){W(Kl,Pn),W(Xs,Xs.current)}function Bu(){Pn=Kl.current,X(Xs),X(Kl)}var Jt=M(null),hn=null;function mi(t){var s=t.alternate;W(Pe,Pe.current&1),W(Jt,t),hn===null&&(s===null||Xs.current!==null||s.memoizedState!==null)&&(hn=t)}function qu(t){W(Pe,Pe.current),W(Jt,t),hn===null&&(hn=t)}function dg(t){t.tag===22?(W(Pe,Pe.current),W(Jt,t),hn===null&&(hn=t)):yi()}function yi(){W(Pe,Pe.current),W(Jt,Jt.current)}function Zt(t){X(Jt),hn===t&&(hn=null),X(Pe)}var Pe=M(0);function Xl(t){for(var s=t;s!==null;){if(s.tag===13){var l=s.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Yf(l)||Ff(l)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break;for(;s.sibling===null;){if(s.return===null||s.return===t)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var In=0,pe=null,Oe=null,rt=null,Yl=!1,Ys=!1,es=!1,Fl=0,ca=0,Fs=null,r1=0;function Fe(){throw Error(r(321))}function $u(t,s){if(s===null)return!1;for(var l=0;l<s.length&&l<t.length;l++)if(!Qt(t[l],s[l]))return!1;return!0}function Iu(t,s,l,c,h,p){return In=p,pe=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,q.H=t===null||t.memoizedState===null?Pg:sf,es=!1,p=l(c,h),es=!1,Ys&&(p=gg(s,l,c,h)),pg(t),p}function pg(t){q.H=ha;var s=Oe!==null&&Oe.next!==null;if(In=0,rt=Oe=pe=null,Yl=!1,ca=0,Fs=null,s)throw Error(r(300));t===null||at||(t=t.dependencies,t!==null&&Hl(t)&&(at=!0))}function gg(t,s,l,c){pe=t;var h=0;do{if(Ys&&(Fs=null),ca=0,Ys=!1,25<=h)throw Error(r(301));if(h+=1,rt=Oe=null,t.updateQueue!=null){var p=t.updateQueue;p.lastEffect=null,p.events=null,p.stores=null,p.memoCache!=null&&(p.memoCache.index=0)}q.H=Jg,p=s(l,c)}while(Ys);return p}function a1(){var t=q.H,s=t.useState()[0];return s=typeof s.then=="function"?ua(s):s,t=t.useState()[0],(Oe!==null?Oe.memoizedState:null)!==t&&(pe.flags|=1024),s}function Vu(){var t=Fl!==0;return Fl=0,t}function Gu(t,s,l){s.updateQueue=t.updateQueue,s.flags&=-2053,t.lanes&=~l}function Ku(t){if(Yl){for(t=t.memoizedState;t!==null;){var s=t.queue;s!==null&&(s.pending=null),t=t.next}Yl=!1}In=0,rt=Oe=pe=null,Ys=!1,ca=Fl=0,Fs=null}function Mt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return rt===null?pe.memoizedState=rt=t:rt=rt.next=t,rt}function Je(){if(Oe===null){var t=pe.alternate;t=t!==null?t.memoizedState:null}else t=Oe.next;var s=rt===null?pe.memoizedState:rt.next;if(s!==null)rt=s,Oe=t;else{if(t===null)throw pe.alternate===null?Error(r(467)):Error(r(310));Oe=t,t={memoizedState:Oe.memoizedState,baseState:Oe.baseState,baseQueue:Oe.baseQueue,queue:Oe.queue,next:null},rt===null?pe.memoizedState=rt=t:rt=rt.next=t}return rt}function Ql(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ua(t){var s=ca;return ca+=1,Fs===null&&(Fs=[]),t=rg(Fs,t,s),s=pe,(rt===null?s.memoizedState:rt.next)===null&&(s=s.alternate,q.H=s===null||s.memoizedState===null?Pg:sf),t}function Pl(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return ua(t);if(t.$$typeof===H)return St(t)}throw Error(r(438,String(t)))}function Xu(t){var s=null,l=pe.updateQueue;if(l!==null&&(s=l.memoCache),s==null){var c=pe.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(s={data:c.data.map(function(h){return h.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),l===null&&(l=Ql(),pe.updateQueue=l),l.memoCache=s,l=s.data[s.index],l===void 0)for(l=s.data[s.index]=Array(t),c=0;c<t;c++)l[c]=P;return s.index++,l}function Vn(t,s){return typeof s=="function"?s(t):s}function Jl(t){var s=Je();return Yu(s,Oe,t)}function Yu(t,s,l){var c=t.queue;if(c===null)throw Error(r(311));c.lastRenderedReducer=l;var h=t.baseQueue,p=c.pending;if(p!==null){if(h!==null){var v=h.next;h.next=p.next,p.next=v}s.baseQueue=h=p,c.pending=null}if(p=t.baseState,h===null)t.memoizedState=p;else{s=h.next;var T=v=null,N=null,z=s,G=!1;do{var F=z.lane&-536870913;if(F!==z.lane?(ve&F)===F:(In&F)===F){var U=z.revertLane;if(U===0)N!==null&&(N=N.next={lane:0,revertLane:0,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null}),F===Is&&(G=!0);else if((In&U)===U){z=z.next,U===Is&&(G=!0);continue}else F={lane:0,revertLane:z.revertLane,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},N===null?(T=N=F,v=p):N=N.next=F,pe.lanes|=U,Si|=U;F=z.action,es&&l(p,F),p=z.hasEagerState?z.eagerState:l(p,F)}else U={lane:F,revertLane:z.revertLane,gesture:z.gesture,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},N===null?(T=N=U,v=p):N=N.next=U,pe.lanes|=F,Si|=F;z=z.next}while(z!==null&&z!==s);if(N===null?v=p:N.next=T,!Qt(p,t.memoizedState)&&(at=!0,G&&(l=Vs,l!==null)))throw l;t.memoizedState=p,t.baseState=v,t.baseQueue=N,c.lastRenderedState=p}return h===null&&(c.lanes=0),[t.memoizedState,c.dispatch]}function Fu(t){var s=Je(),l=s.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=t;var c=l.dispatch,h=l.pending,p=s.memoizedState;if(h!==null){l.pending=null;var v=h=h.next;do p=t(p,v.action),v=v.next;while(v!==h);Qt(p,s.memoizedState)||(at=!0),s.memoizedState=p,s.baseQueue===null&&(s.baseState=p),l.lastRenderedState=p}return[p,c]}function mg(t,s,l){var c=pe,h=Je(),p=we;if(p){if(l===void 0)throw Error(r(407));l=l()}else l=s();var v=!Qt((Oe||h).memoizedState,l);if(v&&(h.memoizedState=l,at=!0),h=h.queue,Ju(vg.bind(null,c,h,t),[t]),h.getSnapshot!==s||v||rt!==null&&rt.memoizedState.tag&1){if(c.flags|=2048,Qs(9,{destroy:void 0},bg.bind(null,c,h,l,s),null),De===null)throw Error(r(349));p||(In&127)!==0||yg(c,s,l)}return l}function yg(t,s,l){t.flags|=16384,t={getSnapshot:s,value:l},s=pe.updateQueue,s===null?(s=Ql(),pe.updateQueue=s,s.stores=[t]):(l=s.stores,l===null?s.stores=[t]:l.push(t))}function bg(t,s,l,c){s.value=l,s.getSnapshot=c,Sg(s)&&wg(t)}function vg(t,s,l){return l(function(){Sg(s)&&wg(t)})}function Sg(t){var s=t.getSnapshot;t=t.value;try{var l=s();return!Qt(t,l)}catch{return!0}}function wg(t){var s=Ki(t,2);s!==null&&Bt(s,t,2)}function Qu(t){var s=Mt();if(typeof t=="function"){var l=t;if(t=l(),es){Ft(!0);try{l()}finally{Ft(!1)}}}return s.memoizedState=s.baseState=t,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vn,lastRenderedState:t},s}function xg(t,s,l,c){return t.baseState=l,Yu(t,Oe,typeof c=="function"?c:Vn)}function l1(t,s,l,c,h){if(eo(t))throw Error(r(485));if(t=s.action,t!==null){var p={payload:h,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){p.listeners.push(v)}};q.T!==null?l(!0):p.isTransition=!1,c(p),l=s.pending,l===null?(p.next=s.pending=p,_g(s,p)):(p.next=l.next,s.pending=l.next=p)}}function _g(t,s){var l=s.action,c=s.payload,h=t.state;if(s.isTransition){var p=q.T,v={};q.T=v;try{var T=l(h,c),N=q.S;N!==null&&N(v,T),Eg(t,s,T)}catch(z){Pu(t,s,z)}finally{p!==null&&v.types!==null&&(p.types=v.types),q.T=p}}else try{p=l(h,c),Eg(t,s,p)}catch(z){Pu(t,s,z)}}function Eg(t,s,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(c){Tg(t,s,c)},function(c){return Pu(t,s,c)}):Tg(t,s,l)}function Tg(t,s,l){s.status="fulfilled",s.value=l,Ag(s),t.state=l,s=t.pending,s!==null&&(l=s.next,l===s?t.pending=null:(l=l.next,s.next=l,_g(t,l)))}function Pu(t,s,l){var c=t.pending;if(t.pending=null,c!==null){c=c.next;do s.status="rejected",s.reason=l,Ag(s),s=s.next;while(s!==c)}t.action=null}function Ag(t){t=t.listeners;for(var s=0;s<t.length;s++)(0,t[s])()}function Cg(t,s){return s}function Ng(t,s){if(we){var l=De.formState;if(l!==null){e:{var c=pe;if(we){if(Be){t:{for(var h=Be,p=fn;h.nodeType!==8;){if(!p){h=null;break t}if(h=dn(h.nextSibling),h===null){h=null;break t}}p=h.data,h=p==="F!"||p==="F"?h:null}if(h){Be=dn(h.nextSibling),c=h.data==="F!";break e}}fi(c)}c=!1}c&&(s=l[0])}}return l=Mt(),l.memoizedState=l.baseState=s,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cg,lastRenderedState:s},l.queue=c,l=Yg.bind(null,pe,c),c.dispatch=l,c=Qu(!1),p=nf.bind(null,pe,!1,c.queue),c=Mt(),h={state:s,dispatch:null,action:t,pending:null},c.queue=h,l=l1.bind(null,pe,h,p,l),h.dispatch=l,c.memoizedState=t,[s,l,!1]}function kg(t){var s=Je();return Mg(s,Oe,t)}function Mg(t,s,l){if(s=Yu(t,s,Cg)[0],t=Jl(Vn)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var c=ua(s)}catch(v){throw v===Gs?$l:v}else c=s;s=Je();var h=s.queue,p=h.dispatch;return l!==s.memoizedState&&(pe.flags|=2048,Qs(9,{destroy:void 0},o1.bind(null,h,l),null)),[c,p,t]}function o1(t,s){t.action=s}function Og(t){var s=Je(),l=Oe;if(l!==null)return Mg(s,l,t);Je(),s=s.memoizedState,l=Je();var c=l.queue.dispatch;return l.memoizedState=t,[s,c,!1]}function Qs(t,s,l,c){return t={tag:t,create:l,deps:c,inst:s,next:null},s=pe.updateQueue,s===null&&(s=Ql(),pe.updateQueue=s),l=s.lastEffect,l===null?s.lastEffect=t.next=t:(c=l.next,l.next=t,t.next=c,s.lastEffect=t),t}function jg(){return Je().memoizedState}function Zl(t,s,l,c){var h=Mt();pe.flags|=t,h.memoizedState=Qs(1|s,{destroy:void 0},l,c===void 0?null:c)}function Wl(t,s,l,c){var h=Je();c=c===void 0?null:c;var p=h.memoizedState.inst;Oe!==null&&c!==null&&$u(c,Oe.memoizedState.deps)?h.memoizedState=Qs(s,p,l,c):(pe.flags|=t,h.memoizedState=Qs(1|s,p,l,c))}function Lg(t,s){Zl(8390656,8,t,s)}function Ju(t,s){Wl(2048,8,t,s)}function c1(t){pe.flags|=4;var s=pe.updateQueue;if(s===null)s=Ql(),pe.updateQueue=s,s.events=[t];else{var l=s.events;l===null?s.events=[t]:l.push(t)}}function Rg(t){var s=Je().memoizedState;return c1({ref:s,nextImpl:t}),function(){if((Ce&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}function Dg(t,s){return Wl(4,2,t,s)}function zg(t,s){return Wl(4,4,t,s)}function Ug(t,s){if(typeof s=="function"){t=t();var l=s(t);return function(){typeof l=="function"?l():s(null)}}if(s!=null)return t=t(),s.current=t,function(){s.current=null}}function Hg(t,s,l){l=l!=null?l.concat([t]):null,Wl(4,4,Ug.bind(null,s,t),l)}function Zu(){}function Bg(t,s){var l=Je();s=s===void 0?null:s;var c=l.memoizedState;return s!==null&&$u(s,c[1])?c[0]:(l.memoizedState=[t,s],t)}function qg(t,s){var l=Je();s=s===void 0?null:s;var c=l.memoizedState;if(s!==null&&$u(s,c[1]))return c[0];if(c=t(),es){Ft(!0);try{t()}finally{Ft(!1)}}return l.memoizedState=[c,s],c}function Wu(t,s,l){return l===void 0||(In&1073741824)!==0&&(ve&261930)===0?t.memoizedState=s:(t.memoizedState=l,t=$m(),pe.lanes|=t,Si|=t,l)}function $g(t,s,l,c){return Qt(l,s)?l:Xs.current!==null?(t=Wu(t,l,c),Qt(t,s)||(at=!0),t):(In&42)===0||(In&1073741824)!==0&&(ve&261930)===0?(at=!0,t.memoizedState=l):(t=$m(),pe.lanes|=t,Si|=t,s)}function Ig(t,s,l,c,h){var p=Z.p;Z.p=p!==0&&8>p?p:8;var v=q.T,T={};q.T=T,nf(t,!1,s,l);try{var N=h(),z=q.S;if(z!==null&&z(T,N),N!==null&&typeof N=="object"&&typeof N.then=="function"){var G=s1(N,c);fa(t,s,G,tn(t))}else fa(t,s,c,tn(t))}catch(F){fa(t,s,{then:function(){},status:"rejected",reason:F},tn())}finally{Z.p=p,v!==null&&T.types!==null&&(v.types=T.types),q.T=v}}function u1(){}function ef(t,s,l,c){if(t.tag!==5)throw Error(r(476));var h=Vg(t).queue;Ig(t,h,s,re,l===null?u1:function(){return Gg(t),l(c)})}function Vg(t){var s=t.memoizedState;if(s!==null)return s;s={memoizedState:re,baseState:re,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vn,lastRenderedState:re},next:null};var l={};return s.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vn,lastRenderedState:l},next:null},t.memoizedState=s,t=t.alternate,t!==null&&(t.memoizedState=s),s}function Gg(t){var s=Vg(t);s.next===null&&(s=t.alternate.memoizedState),fa(t,s.next.queue,{},tn())}function tf(){return St(Na)}function Kg(){return Je().memoizedState}function Xg(){return Je().memoizedState}function f1(t){for(var s=t.return;s!==null;){switch(s.tag){case 24:case 3:var l=tn();t=pi(l);var c=gi(s,t,l);c!==null&&(Bt(c,s,l),aa(c,s,l)),s={cache:Mu()},t.payload=s;return}s=s.return}}function h1(t,s,l){var c=tn();l={lane:c,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},eo(t)?Fg(s,l):(l=vu(t,s,l,c),l!==null&&(Bt(l,t,c),Qg(l,s,c)))}function Yg(t,s,l){var c=tn();fa(t,s,l,c)}function fa(t,s,l,c){var h={lane:c,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(eo(t))Fg(s,h);else{var p=t.alternate;if(t.lanes===0&&(p===null||p.lanes===0)&&(p=s.lastRenderedReducer,p!==null))try{var v=s.lastRenderedState,T=p(v,l);if(h.hasEagerState=!0,h.eagerState=T,Qt(T,v))return Rl(t,s,h,0),De===null&&Ll(),!1}catch{}finally{}if(l=vu(t,s,h,c),l!==null)return Bt(l,t,c),Qg(l,s,c),!0}return!1}function nf(t,s,l,c){if(c={lane:2,revertLane:Df(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},eo(t)){if(s)throw Error(r(479))}else s=vu(t,l,c,2),s!==null&&Bt(s,t,2)}function eo(t){var s=t.alternate;return t===pe||s!==null&&s===pe}function Fg(t,s){Ys=Yl=!0;var l=t.pending;l===null?s.next=s:(s.next=l.next,l.next=s),t.pending=s}function Qg(t,s,l){if((l&4194048)!==0){var c=s.lanes;c&=t.pendingLanes,l|=c,s.lanes=l,ep(t,l)}}var ha={readContext:St,use:Pl,useCallback:Fe,useContext:Fe,useEffect:Fe,useImperativeHandle:Fe,useLayoutEffect:Fe,useInsertionEffect:Fe,useMemo:Fe,useReducer:Fe,useRef:Fe,useState:Fe,useDebugValue:Fe,useDeferredValue:Fe,useTransition:Fe,useSyncExternalStore:Fe,useId:Fe,useHostTransitionStatus:Fe,useFormState:Fe,useActionState:Fe,useOptimistic:Fe,useMemoCache:Fe,useCacheRefresh:Fe};ha.useEffectEvent=Fe;var Pg={readContext:St,use:Pl,useCallback:function(t,s){return Mt().memoizedState=[t,s===void 0?null:s],t},useContext:St,useEffect:Lg,useImperativeHandle:function(t,s,l){l=l!=null?l.concat([t]):null,Zl(4194308,4,Ug.bind(null,s,t),l)},useLayoutEffect:function(t,s){return Zl(4194308,4,t,s)},useInsertionEffect:function(t,s){Zl(4,2,t,s)},useMemo:function(t,s){var l=Mt();s=s===void 0?null:s;var c=t();if(es){Ft(!0);try{t()}finally{Ft(!1)}}return l.memoizedState=[c,s],c},useReducer:function(t,s,l){var c=Mt();if(l!==void 0){var h=l(s);if(es){Ft(!0);try{l(s)}finally{Ft(!1)}}}else h=s;return c.memoizedState=c.baseState=h,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:h},c.queue=t,t=t.dispatch=h1.bind(null,pe,t),[c.memoizedState,t]},useRef:function(t){var s=Mt();return t={current:t},s.memoizedState=t},useState:function(t){t=Qu(t);var s=t.queue,l=Yg.bind(null,pe,s);return s.dispatch=l,[t.memoizedState,l]},useDebugValue:Zu,useDeferredValue:function(t,s){var l=Mt();return Wu(l,t,s)},useTransition:function(){var t=Qu(!1);return t=Ig.bind(null,pe,t.queue,!0,!1),Mt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,s,l){var c=pe,h=Mt();if(we){if(l===void 0)throw Error(r(407));l=l()}else{if(l=s(),De===null)throw Error(r(349));(ve&127)!==0||yg(c,s,l)}h.memoizedState=l;var p={value:l,getSnapshot:s};return h.queue=p,Lg(vg.bind(null,c,p,t),[t]),c.flags|=2048,Qs(9,{destroy:void 0},bg.bind(null,c,p,l,s),null),l},useId:function(){var t=Mt(),s=De.identifierPrefix;if(we){var l=Cn,c=An;l=(c&~(1<<32-kt(c)-1)).toString(32)+l,s="_"+s+"R_"+l,l=Fl++,0<l&&(s+="H"+l.toString(32)),s+="_"}else l=r1++,s="_"+s+"r_"+l.toString(32)+"_";return t.memoizedState=s},useHostTransitionStatus:tf,useFormState:Ng,useActionState:Ng,useOptimistic:function(t){var s=Mt();s.memoizedState=s.baseState=t;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=l,s=nf.bind(null,pe,!0,l),l.dispatch=s,[t,s]},useMemoCache:Xu,useCacheRefresh:function(){return Mt().memoizedState=f1.bind(null,pe)},useEffectEvent:function(t){var s=Mt(),l={impl:t};return s.memoizedState=l,function(){if((Ce&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},sf={readContext:St,use:Pl,useCallback:Bg,useContext:St,useEffect:Ju,useImperativeHandle:Hg,useInsertionEffect:Dg,useLayoutEffect:zg,useMemo:qg,useReducer:Jl,useRef:jg,useState:function(){return Jl(Vn)},useDebugValue:Zu,useDeferredValue:function(t,s){var l=Je();return $g(l,Oe.memoizedState,t,s)},useTransition:function(){var t=Jl(Vn)[0],s=Je().memoizedState;return[typeof t=="boolean"?t:ua(t),s]},useSyncExternalStore:mg,useId:Kg,useHostTransitionStatus:tf,useFormState:kg,useActionState:kg,useOptimistic:function(t,s){var l=Je();return xg(l,Oe,t,s)},useMemoCache:Xu,useCacheRefresh:Xg};sf.useEffectEvent=Rg;var Jg={readContext:St,use:Pl,useCallback:Bg,useContext:St,useEffect:Ju,useImperativeHandle:Hg,useInsertionEffect:Dg,useLayoutEffect:zg,useMemo:qg,useReducer:Fu,useRef:jg,useState:function(){return Fu(Vn)},useDebugValue:Zu,useDeferredValue:function(t,s){var l=Je();return Oe===null?Wu(l,t,s):$g(l,Oe.memoizedState,t,s)},useTransition:function(){var t=Fu(Vn)[0],s=Je().memoizedState;return[typeof t=="boolean"?t:ua(t),s]},useSyncExternalStore:mg,useId:Kg,useHostTransitionStatus:tf,useFormState:Og,useActionState:Og,useOptimistic:function(t,s){var l=Je();return Oe!==null?xg(l,Oe,t,s):(l.baseState=t,[t,l.queue.dispatch])},useMemoCache:Xu,useCacheRefresh:Xg};Jg.useEffectEvent=Rg;function rf(t,s,l,c){s=t.memoizedState,l=l(c,s),l=l==null?s:y({},s,l),t.memoizedState=l,t.lanes===0&&(t.updateQueue.baseState=l)}var af={enqueueSetState:function(t,s,l){t=t._reactInternals;var c=tn(),h=pi(c);h.payload=s,l!=null&&(h.callback=l),s=gi(t,h,c),s!==null&&(Bt(s,t,c),aa(s,t,c))},enqueueReplaceState:function(t,s,l){t=t._reactInternals;var c=tn(),h=pi(c);h.tag=1,h.payload=s,l!=null&&(h.callback=l),s=gi(t,h,c),s!==null&&(Bt(s,t,c),aa(s,t,c))},enqueueForceUpdate:function(t,s){t=t._reactInternals;var l=tn(),c=pi(l);c.tag=2,s!=null&&(c.callback=s),s=gi(t,c,l),s!==null&&(Bt(s,t,l),aa(s,t,l))}};function Zg(t,s,l,c,h,p,v){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(c,p,v):s.prototype&&s.prototype.isPureReactComponent?!Zr(l,c)||!Zr(h,p):!0}function Wg(t,s,l,c){t=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(l,c),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(l,c),s.state!==t&&af.enqueueReplaceState(s,s.state,null)}function ts(t,s){var l=s;if("ref"in s){l={};for(var c in s)c!=="ref"&&(l[c]=s[c])}if(t=t.defaultProps){l===s&&(l=y({},l));for(var h in t)l[h]===void 0&&(l[h]=t[h])}return l}function em(t){jl(t)}function tm(t){console.error(t)}function nm(t){jl(t)}function to(t,s){try{var l=t.onUncaughtError;l(s.value,{componentStack:s.stack})}catch(c){setTimeout(function(){throw c})}}function im(t,s,l){try{var c=t.onCaughtError;c(l.value,{componentStack:l.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function lf(t,s,l){return l=pi(l),l.tag=3,l.payload={element:null},l.callback=function(){to(t,s)},l}function sm(t){return t=pi(t),t.tag=3,t}function rm(t,s,l,c){var h=l.type.getDerivedStateFromError;if(typeof h=="function"){var p=c.value;t.payload=function(){return h(p)},t.callback=function(){im(s,l,c)}}var v=l.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(t.callback=function(){im(s,l,c),typeof h!="function"&&(wi===null?wi=new Set([this]):wi.add(this));var T=c.stack;this.componentDidCatch(c.value,{componentStack:T!==null?T:""})})}function d1(t,s,l,c,h){if(l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(s=l.alternate,s!==null&&$s(s,l,h,!0),l=Jt.current,l!==null){switch(l.tag){case 31:case 13:return hn===null?po():l.alternate===null&&Qe===0&&(Qe=3),l.flags&=-257,l.flags|=65536,l.lanes=h,c===Il?l.flags|=16384:(s=l.updateQueue,s===null?l.updateQueue=new Set([c]):s.add(c),jf(t,c,h)),!1;case 22:return l.flags|=65536,c===Il?l.flags|=16384:(s=l.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([c])},l.updateQueue=s):(l=s.retryQueue,l===null?s.retryQueue=new Set([c]):l.add(c)),jf(t,c,h)),!1}throw Error(r(435,l.tag))}return jf(t,c,h),po(),!1}if(we)return s=Jt.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=h,c!==Tu&&(t=Error(r(422),{cause:c}),ta(on(t,l)))):(c!==Tu&&(s=Error(r(423),{cause:c}),ta(on(s,l))),t=t.current.alternate,t.flags|=65536,h&=-h,t.lanes|=h,c=on(c,l),h=lf(t.stateNode,c,h),zu(t,h),Qe!==4&&(Qe=2)),!1;var p=Error(r(520),{cause:c});if(p=on(p,l),Sa===null?Sa=[p]:Sa.push(p),Qe!==4&&(Qe=2),s===null)return!0;c=on(c,l),l=s;do{switch(l.tag){case 3:return l.flags|=65536,t=h&-h,l.lanes|=t,t=lf(l.stateNode,c,t),zu(l,t),!1;case 1:if(s=l.type,p=l.stateNode,(l.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(wi===null||!wi.has(p))))return l.flags|=65536,h&=-h,l.lanes|=h,h=sm(h),rm(h,t,l,c),zu(l,h),!1}l=l.return}while(l!==null);return!1}var of=Error(r(461)),at=!1;function wt(t,s,l,c){s.child=t===null?cg(s,null,l,c):Wi(s,t.child,l,c)}function am(t,s,l,c,h){l=l.render;var p=s.ref;if("ref"in c){var v={};for(var T in c)T!=="ref"&&(v[T]=c[T])}else v=c;return Qi(s),c=Iu(t,s,l,v,p,h),T=Vu(),t!==null&&!at?(Gu(t,s,h),Gn(t,s,h)):(we&&T&&_u(s),s.flags|=1,wt(t,s,c,h),s.child)}function lm(t,s,l,c,h){if(t===null){var p=l.type;return typeof p=="function"&&!Su(p)&&p.defaultProps===void 0&&l.compare===null?(s.tag=15,s.type=p,om(t,s,p,c,h)):(t=zl(l.type,null,c,s,s.mode,h),t.ref=s.ref,t.return=s,s.child=t)}if(p=t.child,!mf(t,h)){var v=p.memoizedProps;if(l=l.compare,l=l!==null?l:Zr,l(v,c)&&t.ref===s.ref)return Gn(t,s,h)}return s.flags|=1,t=Hn(p,c),t.ref=s.ref,t.return=s,s.child=t}function om(t,s,l,c,h){if(t!==null){var p=t.memoizedProps;if(Zr(p,c)&&t.ref===s.ref)if(at=!1,s.pendingProps=c=p,mf(t,h))(t.flags&131072)!==0&&(at=!0);else return s.lanes=t.lanes,Gn(t,s,h)}return cf(t,s,l,c,h)}function cm(t,s,l,c){var h=c.children,p=t!==null?t.memoizedState:null;if(t===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((s.flags&128)!==0){if(p=p!==null?p.baseLanes|l:l,t!==null){for(c=s.child=t.child,h=0;c!==null;)h=h|c.lanes|c.childLanes,c=c.sibling;c=h&~p}else c=0,s.child=null;return um(t,s,p,l,c)}if((l&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},t!==null&&ql(s,p!==null?p.cachePool:null),p!==null?hg(s,p):Hu(),dg(s);else return c=s.lanes=536870912,um(t,s,p!==null?p.baseLanes|l:l,l,c)}else p!==null?(ql(s,p.cachePool),hg(s,p),yi(),s.memoizedState=null):(t!==null&&ql(s,null),Hu(),yi());return wt(t,s,h,l),s.child}function da(t,s){return t!==null&&t.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function um(t,s,l,c,h){var p=ju();return p=p===null?null:{parent:st._currentValue,pool:p},s.memoizedState={baseLanes:l,cachePool:p},t!==null&&ql(s,null),Hu(),dg(s),t!==null&&$s(t,s,c,!0),s.childLanes=h,null}function no(t,s){return s=so({mode:s.mode,children:s.children},t.mode),s.ref=t.ref,t.child=s,s.return=t,s}function fm(t,s,l){return Wi(s,t.child,null,l),t=no(s,s.pendingProps),t.flags|=2,Zt(s),s.memoizedState=null,t}function p1(t,s,l){var c=s.pendingProps,h=(s.flags&128)!==0;if(s.flags&=-129,t===null){if(we){if(c.mode==="hidden")return t=no(s,c),s.lanes=536870912,da(null,t);if(qu(s),(t=Be)?(t=_y(t,fn),t=t!==null&&t.data==="&"?t:null,t!==null&&(s.memoizedState={dehydrated:t,treeContext:ci!==null?{id:An,overflow:Cn}:null,retryLane:536870912,hydrationErrors:null},l=Fp(t),l.return=s,s.child=l,vt=s,Be=null)):t=null,t===null)throw fi(s);return s.lanes=536870912,null}return no(s,c)}var p=t.memoizedState;if(p!==null){var v=p.dehydrated;if(qu(s),h)if(s.flags&256)s.flags&=-257,s=fm(t,s,l);else if(s.memoizedState!==null)s.child=t.child,s.flags|=128,s=null;else throw Error(r(558));else if(at||$s(t,s,l,!1),h=(l&t.childLanes)!==0,at||h){if(c=De,c!==null&&(v=tp(c,l),v!==0&&v!==p.retryLane))throw p.retryLane=v,Ki(t,v),Bt(c,t,v),of;po(),s=fm(t,s,l)}else t=p.treeContext,Be=dn(v.nextSibling),vt=s,we=!0,ui=null,fn=!1,t!==null&&Jp(s,t),s=no(s,c),s.flags|=4096;return s}return t=Hn(t.child,{mode:c.mode,children:c.children}),t.ref=s.ref,s.child=t,t.return=s,t}function io(t,s){var l=s.ref;if(l===null)t!==null&&t.ref!==null&&(s.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(r(284));(t===null||t.ref!==l)&&(s.flags|=4194816)}}function cf(t,s,l,c,h){return Qi(s),l=Iu(t,s,l,c,void 0,h),c=Vu(),t!==null&&!at?(Gu(t,s,h),Gn(t,s,h)):(we&&c&&_u(s),s.flags|=1,wt(t,s,l,h),s.child)}function hm(t,s,l,c,h,p){return Qi(s),s.updateQueue=null,l=gg(s,c,l,h),pg(t),c=Vu(),t!==null&&!at?(Gu(t,s,p),Gn(t,s,p)):(we&&c&&_u(s),s.flags|=1,wt(t,s,l,p),s.child)}function dm(t,s,l,c,h){if(Qi(s),s.stateNode===null){var p=Us,v=l.contextType;typeof v=="object"&&v!==null&&(p=St(v)),p=new l(c,p),s.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=af,s.stateNode=p,p._reactInternals=s,p=s.stateNode,p.props=c,p.state=s.memoizedState,p.refs={},Ru(s),v=l.contextType,p.context=typeof v=="object"&&v!==null?St(v):Us,p.state=s.memoizedState,v=l.getDerivedStateFromProps,typeof v=="function"&&(rf(s,l,v,c),p.state=s.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(v=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),v!==p.state&&af.enqueueReplaceState(p,p.state,null),oa(s,c,p,h),la(),p.state=s.memoizedState),typeof p.componentDidMount=="function"&&(s.flags|=4194308),c=!0}else if(t===null){p=s.stateNode;var T=s.memoizedProps,N=ts(l,T);p.props=N;var z=p.context,G=l.contextType;v=Us,typeof G=="object"&&G!==null&&(v=St(G));var F=l.getDerivedStateFromProps;G=typeof F=="function"||typeof p.getSnapshotBeforeUpdate=="function",T=s.pendingProps!==T,G||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(T||z!==v)&&Wg(s,p,c,v),di=!1;var U=s.memoizedState;p.state=U,oa(s,c,p,h),la(),z=s.memoizedState,T||U!==z||di?(typeof F=="function"&&(rf(s,l,F,c),z=s.memoizedState),(N=di||Zg(s,l,N,c,U,z,v))?(G||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(s.flags|=4194308)):(typeof p.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=c,s.memoizedState=z),p.props=c,p.state=z,p.context=v,c=N):(typeof p.componentDidMount=="function"&&(s.flags|=4194308),c=!1)}else{p=s.stateNode,Du(t,s),v=s.memoizedProps,G=ts(l,v),p.props=G,F=s.pendingProps,U=p.context,z=l.contextType,N=Us,typeof z=="object"&&z!==null&&(N=St(z)),T=l.getDerivedStateFromProps,(z=typeof T=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(v!==F||U!==N)&&Wg(s,p,c,N),di=!1,U=s.memoizedState,p.state=U,oa(s,c,p,h),la();var B=s.memoizedState;v!==F||U!==B||di||t!==null&&t.dependencies!==null&&Hl(t.dependencies)?(typeof T=="function"&&(rf(s,l,T,c),B=s.memoizedState),(G=di||Zg(s,l,G,c,U,B,N)||t!==null&&t.dependencies!==null&&Hl(t.dependencies))?(z||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(c,B,N),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(c,B,N)),typeof p.componentDidUpdate=="function"&&(s.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof p.componentDidUpdate!="function"||v===t.memoizedProps&&U===t.memoizedState||(s.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||v===t.memoizedProps&&U===t.memoizedState||(s.flags|=1024),s.memoizedProps=c,s.memoizedState=B),p.props=c,p.state=B,p.context=N,c=G):(typeof p.componentDidUpdate!="function"||v===t.memoizedProps&&U===t.memoizedState||(s.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||v===t.memoizedProps&&U===t.memoizedState||(s.flags|=1024),c=!1)}return p=c,io(t,s),c=(s.flags&128)!==0,p||c?(p=s.stateNode,l=c&&typeof l.getDerivedStateFromError!="function"?null:p.render(),s.flags|=1,t!==null&&c?(s.child=Wi(s,t.child,null,h),s.child=Wi(s,null,l,h)):wt(t,s,l,h),s.memoizedState=p.state,t=s.child):t=Gn(t,s,h),t}function pm(t,s,l,c){return Yi(),s.flags|=256,wt(t,s,l,c),s.child}var uf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ff(t){return{baseLanes:t,cachePool:ig()}}function hf(t,s,l){return t=t!==null?t.childLanes&~l:0,s&&(t|=en),t}function gm(t,s,l){var c=s.pendingProps,h=!1,p=(s.flags&128)!==0,v;if((v=p)||(v=t!==null&&t.memoizedState===null?!1:(Pe.current&2)!==0),v&&(h=!0,s.flags&=-129),v=(s.flags&32)!==0,s.flags&=-33,t===null){if(we){if(h?mi(s):yi(),(t=Be)?(t=_y(t,fn),t=t!==null&&t.data!=="&"?t:null,t!==null&&(s.memoizedState={dehydrated:t,treeContext:ci!==null?{id:An,overflow:Cn}:null,retryLane:536870912,hydrationErrors:null},l=Fp(t),l.return=s,s.child=l,vt=s,Be=null)):t=null,t===null)throw fi(s);return Ff(t)?s.lanes=32:s.lanes=536870912,null}var T=c.children;return c=c.fallback,h?(yi(),h=s.mode,T=so({mode:"hidden",children:T},h),c=Xi(c,h,l,null),T.return=s,c.return=s,T.sibling=c,s.child=T,c=s.child,c.memoizedState=ff(l),c.childLanes=hf(t,v,l),s.memoizedState=uf,da(null,c)):(mi(s),df(s,T))}var N=t.memoizedState;if(N!==null&&(T=N.dehydrated,T!==null)){if(p)s.flags&256?(mi(s),s.flags&=-257,s=pf(t,s,l)):s.memoizedState!==null?(yi(),s.child=t.child,s.flags|=128,s=null):(yi(),T=c.fallback,h=s.mode,c=so({mode:"visible",children:c.children},h),T=Xi(T,h,l,null),T.flags|=2,c.return=s,T.return=s,c.sibling=T,s.child=c,Wi(s,t.child,null,l),c=s.child,c.memoizedState=ff(l),c.childLanes=hf(t,v,l),s.memoizedState=uf,s=da(null,c));else if(mi(s),Ff(T)){if(v=T.nextSibling&&T.nextSibling.dataset,v)var z=v.dgst;v=z,c=Error(r(419)),c.stack="",c.digest=v,ta({value:c,source:null,stack:null}),s=pf(t,s,l)}else if(at||$s(t,s,l,!1),v=(l&t.childLanes)!==0,at||v){if(v=De,v!==null&&(c=tp(v,l),c!==0&&c!==N.retryLane))throw N.retryLane=c,Ki(t,c),Bt(v,t,c),of;Yf(T)||po(),s=pf(t,s,l)}else Yf(T)?(s.flags|=192,s.child=t.child,s=null):(t=N.treeContext,Be=dn(T.nextSibling),vt=s,we=!0,ui=null,fn=!1,t!==null&&Jp(s,t),s=df(s,c.children),s.flags|=4096);return s}return h?(yi(),T=c.fallback,h=s.mode,N=t.child,z=N.sibling,c=Hn(N,{mode:"hidden",children:c.children}),c.subtreeFlags=N.subtreeFlags&65011712,z!==null?T=Hn(z,T):(T=Xi(T,h,l,null),T.flags|=2),T.return=s,c.return=s,c.sibling=T,s.child=c,da(null,c),c=s.child,T=t.child.memoizedState,T===null?T=ff(l):(h=T.cachePool,h!==null?(N=st._currentValue,h=h.parent!==N?{parent:N,pool:N}:h):h=ig(),T={baseLanes:T.baseLanes|l,cachePool:h}),c.memoizedState=T,c.childLanes=hf(t,v,l),s.memoizedState=uf,da(t.child,c)):(mi(s),l=t.child,t=l.sibling,l=Hn(l,{mode:"visible",children:c.children}),l.return=s,l.sibling=null,t!==null&&(v=s.deletions,v===null?(s.deletions=[t],s.flags|=16):v.push(t)),s.child=l,s.memoizedState=null,l)}function df(t,s){return s=so({mode:"visible",children:s},t.mode),s.return=t,t.child=s}function so(t,s){return t=Pt(22,t,null,s),t.lanes=0,t}function pf(t,s,l){return Wi(s,t.child,null,l),t=df(s,s.pendingProps.children),t.flags|=2,s.memoizedState=null,t}function mm(t,s,l){t.lanes|=s;var c=t.alternate;c!==null&&(c.lanes|=s),Nu(t.return,s,l)}function gf(t,s,l,c,h,p){var v=t.memoizedState;v===null?t.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:c,tail:l,tailMode:h,treeForkCount:p}:(v.isBackwards=s,v.rendering=null,v.renderingStartTime=0,v.last=c,v.tail=l,v.tailMode=h,v.treeForkCount=p)}function ym(t,s,l){var c=s.pendingProps,h=c.revealOrder,p=c.tail;c=c.children;var v=Pe.current,T=(v&2)!==0;if(T?(v=v&1|2,s.flags|=128):v&=1,W(Pe,v),wt(t,s,c,l),c=we?ea:0,!T&&t!==null&&(t.flags&128)!==0)e:for(t=s.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&mm(t,l,s);else if(t.tag===19)mm(t,l,s);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===s)break e;for(;t.sibling===null;){if(t.return===null||t.return===s)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(h){case"forwards":for(l=s.child,h=null;l!==null;)t=l.alternate,t!==null&&Xl(t)===null&&(h=l),l=l.sibling;l=h,l===null?(h=s.child,s.child=null):(h=l.sibling,l.sibling=null),gf(s,!1,h,l,p,c);break;case"backwards":case"unstable_legacy-backwards":for(l=null,h=s.child,s.child=null;h!==null;){if(t=h.alternate,t!==null&&Xl(t)===null){s.child=h;break}t=h.sibling,h.sibling=l,l=h,h=t}gf(s,!0,l,null,p,c);break;case"together":gf(s,!1,null,null,void 0,c);break;default:s.memoizedState=null}return s.child}function Gn(t,s,l){if(t!==null&&(s.dependencies=t.dependencies),Si|=s.lanes,(l&s.childLanes)===0)if(t!==null){if($s(t,s,l,!1),(l&s.childLanes)===0)return null}else return null;if(t!==null&&s.child!==t.child)throw Error(r(153));if(s.child!==null){for(t=s.child,l=Hn(t,t.pendingProps),s.child=l,l.return=s;t.sibling!==null;)t=t.sibling,l=l.sibling=Hn(t,t.pendingProps),l.return=s;l.sibling=null}return s.child}function mf(t,s){return(t.lanes&s)!==0?!0:(t=t.dependencies,!!(t!==null&&Hl(t)))}function g1(t,s,l){switch(s.tag){case 3:nt(s,s.stateNode.containerInfo),hi(s,st,t.memoizedState.cache),Yi();break;case 27:case 5:Rn(s);break;case 4:nt(s,s.stateNode.containerInfo);break;case 10:hi(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,qu(s),null;break;case 13:var c=s.memoizedState;if(c!==null)return c.dehydrated!==null?(mi(s),s.flags|=128,null):(l&s.child.childLanes)!==0?gm(t,s,l):(mi(s),t=Gn(t,s,l),t!==null?t.sibling:null);mi(s);break;case 19:var h=(t.flags&128)!==0;if(c=(l&s.childLanes)!==0,c||($s(t,s,l,!1),c=(l&s.childLanes)!==0),h){if(c)return ym(t,s,l);s.flags|=128}if(h=s.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),W(Pe,Pe.current),c)break;return null;case 22:return s.lanes=0,cm(t,s,l,s.pendingProps);case 24:hi(s,st,t.memoizedState.cache)}return Gn(t,s,l)}function bm(t,s,l){if(t!==null)if(t.memoizedProps!==s.pendingProps)at=!0;else{if(!mf(t,l)&&(s.flags&128)===0)return at=!1,g1(t,s,l);at=(t.flags&131072)!==0}else at=!1,we&&(s.flags&1048576)!==0&&Pp(s,ea,s.index);switch(s.lanes=0,s.tag){case 16:e:{var c=s.pendingProps;if(t=Ji(s.elementType),s.type=t,typeof t=="function")Su(t)?(c=ts(t,c),s.tag=1,s=dm(null,s,t,c,l)):(s.tag=0,s=cf(null,s,t,c,l));else{if(t!=null){var h=t.$$typeof;if(h===V){s.tag=11,s=am(null,s,t,c,l);break e}else if(h===j){s.tag=14,s=lm(null,s,t,c,l);break e}}throw s=ce(t)||t,Error(r(306,s,""))}}return s;case 0:return cf(t,s,s.type,s.pendingProps,l);case 1:return c=s.type,h=ts(c,s.pendingProps),dm(t,s,c,h,l);case 3:e:{if(nt(s,s.stateNode.containerInfo),t===null)throw Error(r(387));c=s.pendingProps;var p=s.memoizedState;h=p.element,Du(t,s),oa(s,c,null,l);var v=s.memoizedState;if(c=v.cache,hi(s,st,c),c!==p.cache&&ku(s,[st],l,!0),la(),c=v.element,p.isDehydrated)if(p={element:c,isDehydrated:!1,cache:v.cache},s.updateQueue.baseState=p,s.memoizedState=p,s.flags&256){s=pm(t,s,c,l);break e}else if(c!==h){h=on(Error(r(424)),s),ta(h),s=pm(t,s,c,l);break e}else{switch(t=s.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(Be=dn(t.firstChild),vt=s,we=!0,ui=null,fn=!0,l=cg(s,null,c,l),s.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Yi(),c===h){s=Gn(t,s,l);break e}wt(t,s,c,l)}s=s.child}return s;case 26:return io(t,s),t===null?(l=ky(s.type,null,s.pendingProps,null))?s.memoizedState=l:we||(l=s.type,t=s.pendingProps,c=wo(se.current).createElement(l),c[bt]=s,c[Lt]=t,xt(c,l,t),gt(c),s.stateNode=c):s.memoizedState=ky(s.type,t.memoizedProps,s.pendingProps,t.memoizedState),null;case 27:return Rn(s),t===null&&we&&(c=s.stateNode=Ay(s.type,s.pendingProps,se.current),vt=s,fn=!0,h=Be,Ti(s.type)?(Qf=h,Be=dn(c.firstChild)):Be=h),wt(t,s,s.pendingProps.children,l),io(t,s),t===null&&(s.flags|=4194304),s.child;case 5:return t===null&&we&&((h=c=Be)&&(c=K1(c,s.type,s.pendingProps,fn),c!==null?(s.stateNode=c,vt=s,Be=dn(c.firstChild),fn=!1,h=!0):h=!1),h||fi(s)),Rn(s),h=s.type,p=s.pendingProps,v=t!==null?t.memoizedProps:null,c=p.children,Gf(h,p)?c=null:v!==null&&Gf(h,v)&&(s.flags|=32),s.memoizedState!==null&&(h=Iu(t,s,a1,null,null,l),Na._currentValue=h),io(t,s),wt(t,s,c,l),s.child;case 6:return t===null&&we&&((t=l=Be)&&(l=X1(l,s.pendingProps,fn),l!==null?(s.stateNode=l,vt=s,Be=null,t=!0):t=!1),t||fi(s)),null;case 13:return gm(t,s,l);case 4:return nt(s,s.stateNode.containerInfo),c=s.pendingProps,t===null?s.child=Wi(s,null,c,l):wt(t,s,c,l),s.child;case 11:return am(t,s,s.type,s.pendingProps,l);case 7:return wt(t,s,s.pendingProps,l),s.child;case 8:return wt(t,s,s.pendingProps.children,l),s.child;case 12:return wt(t,s,s.pendingProps.children,l),s.child;case 10:return c=s.pendingProps,hi(s,s.type,c.value),wt(t,s,c.children,l),s.child;case 9:return h=s.type._context,c=s.pendingProps.children,Qi(s),h=St(h),c=c(h),s.flags|=1,wt(t,s,c,l),s.child;case 14:return lm(t,s,s.type,s.pendingProps,l);case 15:return om(t,s,s.type,s.pendingProps,l);case 19:return ym(t,s,l);case 31:return p1(t,s,l);case 22:return cm(t,s,l,s.pendingProps);case 24:return Qi(s),c=St(st),t===null?(h=ju(),h===null&&(h=De,p=Mu(),h.pooledCache=p,p.refCount++,p!==null&&(h.pooledCacheLanes|=l),h=p),s.memoizedState={parent:c,cache:h},Ru(s),hi(s,st,h)):((t.lanes&l)!==0&&(Du(t,s),oa(s,null,null,l),la()),h=t.memoizedState,p=s.memoizedState,h.parent!==c?(h={parent:c,cache:c},s.memoizedState=h,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=h),hi(s,st,c)):(c=p.cache,hi(s,st,c),c!==h.cache&&ku(s,[st],l,!0))),wt(t,s,s.pendingProps.children,l),s.child;case 29:throw s.pendingProps}throw Error(r(156,s.tag))}function Kn(t){t.flags|=4}function yf(t,s,l,c,h){if((s=(t.mode&32)!==0)&&(s=!1),s){if(t.flags|=16777216,(h&335544128)===h)if(t.stateNode.complete)t.flags|=8192;else if(Km())t.flags|=8192;else throw Zi=Il,Lu}else t.flags&=-16777217}function vm(t,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Ry(s))if(Km())t.flags|=8192;else throw Zi=Il,Lu}function ro(t,s){s!==null&&(t.flags|=4),t.flags&16384&&(s=t.tag!==22?Zd():536870912,t.lanes|=s,Ws|=s)}function pa(t,s){if(!we)switch(t.tailMode){case"hidden":s=t.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?t.tail=null:l.sibling=null;break;case"collapsed":l=t.tail;for(var c=null;l!==null;)l.alternate!==null&&(c=l),l=l.sibling;c===null?s||t.tail===null?t.tail=null:t.tail.sibling=null:c.sibling=null}}function qe(t){var s=t.alternate!==null&&t.alternate.child===t.child,l=0,c=0;if(s)for(var h=t.child;h!==null;)l|=h.lanes|h.childLanes,c|=h.subtreeFlags&65011712,c|=h.flags&65011712,h.return=t,h=h.sibling;else for(h=t.child;h!==null;)l|=h.lanes|h.childLanes,c|=h.subtreeFlags,c|=h.flags,h.return=t,h=h.sibling;return t.subtreeFlags|=c,t.childLanes=l,s}function m1(t,s,l){var c=s.pendingProps;switch(Eu(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qe(s),null;case 1:return qe(s),null;case 3:return l=s.stateNode,c=null,t!==null&&(c=t.memoizedState.cache),s.memoizedState.cache!==c&&(s.flags|=2048),$n(st),Re(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(t===null||t.child===null)&&(qs(s)?Kn(s):t===null||t.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Au())),qe(s),null;case 26:var h=s.type,p=s.memoizedState;return t===null?(Kn(s),p!==null?(qe(s),vm(s,p)):(qe(s),yf(s,h,null,c,l))):p?p!==t.memoizedState?(Kn(s),qe(s),vm(s,p)):(qe(s),s.flags&=-16777217):(t=t.memoizedProps,t!==c&&Kn(s),qe(s),yf(s,h,t,c,l)),null;case 27:if(fe(s),l=se.current,h=s.type,t!==null&&s.stateNode!=null)t.memoizedProps!==c&&Kn(s);else{if(!c){if(s.stateNode===null)throw Error(r(166));return qe(s),null}t=te.current,qs(s)?Zp(s):(t=Ay(h,c,l),s.stateNode=t,Kn(s))}return qe(s),null;case 5:if(fe(s),h=s.type,t!==null&&s.stateNode!=null)t.memoizedProps!==c&&Kn(s);else{if(!c){if(s.stateNode===null)throw Error(r(166));return qe(s),null}if(p=te.current,qs(s))Zp(s);else{var v=wo(se.current);switch(p){case 1:p=v.createElementNS("http://www.w3.org/2000/svg",h);break;case 2:p=v.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;default:switch(h){case"svg":p=v.createElementNS("http://www.w3.org/2000/svg",h);break;case"math":p=v.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;case"script":p=v.createElement("div"),p.innerHTML="<script><\/script>",p=p.removeChild(p.firstChild);break;case"select":p=typeof c.is=="string"?v.createElement("select",{is:c.is}):v.createElement("select"),c.multiple?p.multiple=!0:c.size&&(p.size=c.size);break;default:p=typeof c.is=="string"?v.createElement(h,{is:c.is}):v.createElement(h)}}p[bt]=s,p[Lt]=c;e:for(v=s.child;v!==null;){if(v.tag===5||v.tag===6)p.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===s)break e;for(;v.sibling===null;){if(v.return===null||v.return===s)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}s.stateNode=p;e:switch(xt(p,h,c),h){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&Kn(s)}}return qe(s),yf(s,s.type,t===null?null:t.memoizedProps,s.pendingProps,l),null;case 6:if(t&&s.stateNode!=null)t.memoizedProps!==c&&Kn(s);else{if(typeof c!="string"&&s.stateNode===null)throw Error(r(166));if(t=se.current,qs(s)){if(t=s.stateNode,l=s.memoizedProps,c=null,h=vt,h!==null)switch(h.tag){case 27:case 5:c=h.memoizedProps}t[bt]=s,t=!!(t.nodeValue===l||c!==null&&c.suppressHydrationWarning===!0||gy(t.nodeValue,l)),t||fi(s,!0)}else t=wo(t).createTextNode(c),t[bt]=s,s.stateNode=t}return qe(s),null;case 31:if(l=s.memoizedState,t===null||t.memoizedState!==null){if(c=qs(s),l!==null){if(t===null){if(!c)throw Error(r(318));if(t=s.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(557));t[bt]=s}else Yi(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;qe(s),t=!1}else l=Au(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=l),t=!0;if(!t)return s.flags&256?(Zt(s),s):(Zt(s),null);if((s.flags&128)!==0)throw Error(r(558))}return qe(s),null;case 13:if(c=s.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(h=qs(s),c!==null&&c.dehydrated!==null){if(t===null){if(!h)throw Error(r(318));if(h=s.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(r(317));h[bt]=s}else Yi(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;qe(s),h=!1}else h=Au(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=h),h=!0;if(!h)return s.flags&256?(Zt(s),s):(Zt(s),null)}return Zt(s),(s.flags&128)!==0?(s.lanes=l,s):(l=c!==null,t=t!==null&&t.memoizedState!==null,l&&(c=s.child,h=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(h=c.alternate.memoizedState.cachePool.pool),p=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(p=c.memoizedState.cachePool.pool),p!==h&&(c.flags|=2048)),l!==t&&l&&(s.child.flags|=8192),ro(s,s.updateQueue),qe(s),null);case 4:return Re(),t===null&&Bf(s.stateNode.containerInfo),qe(s),null;case 10:return $n(s.type),qe(s),null;case 19:if(X(Pe),c=s.memoizedState,c===null)return qe(s),null;if(h=(s.flags&128)!==0,p=c.rendering,p===null)if(h)pa(c,!1);else{if(Qe!==0||t!==null&&(t.flags&128)!==0)for(t=s.child;t!==null;){if(p=Xl(t),p!==null){for(s.flags|=128,pa(c,!1),t=p.updateQueue,s.updateQueue=t,ro(s,t),s.subtreeFlags=0,t=l,l=s.child;l!==null;)Yp(l,t),l=l.sibling;return W(Pe,Pe.current&1|2),we&&Bn(s,c.treeForkCount),s.child}t=t.sibling}c.tail!==null&&it()>uo&&(s.flags|=128,h=!0,pa(c,!1),s.lanes=4194304)}else{if(!h)if(t=Xl(p),t!==null){if(s.flags|=128,h=!0,t=t.updateQueue,s.updateQueue=t,ro(s,t),pa(c,!0),c.tail===null&&c.tailMode==="hidden"&&!p.alternate&&!we)return qe(s),null}else 2*it()-c.renderingStartTime>uo&&l!==536870912&&(s.flags|=128,h=!0,pa(c,!1),s.lanes=4194304);c.isBackwards?(p.sibling=s.child,s.child=p):(t=c.last,t!==null?t.sibling=p:s.child=p,c.last=p)}return c.tail!==null?(t=c.tail,c.rendering=t,c.tail=t.sibling,c.renderingStartTime=it(),t.sibling=null,l=Pe.current,W(Pe,h?l&1|2:l&1),we&&Bn(s,c.treeForkCount),t):(qe(s),null);case 22:case 23:return Zt(s),Bu(),c=s.memoizedState!==null,t!==null?t.memoizedState!==null!==c&&(s.flags|=8192):c&&(s.flags|=8192),c?(l&536870912)!==0&&(s.flags&128)===0&&(qe(s),s.subtreeFlags&6&&(s.flags|=8192)):qe(s),l=s.updateQueue,l!==null&&ro(s,l.retryQueue),l=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),c=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(c=s.memoizedState.cachePool.pool),c!==l&&(s.flags|=2048),t!==null&&X(Pi),null;case 24:return l=null,t!==null&&(l=t.memoizedState.cache),s.memoizedState.cache!==l&&(s.flags|=2048),$n(st),qe(s),null;case 25:return null;case 30:return null}throw Error(r(156,s.tag))}function y1(t,s){switch(Eu(s),s.tag){case 1:return t=s.flags,t&65536?(s.flags=t&-65537|128,s):null;case 3:return $n(st),Re(),t=s.flags,(t&65536)!==0&&(t&128)===0?(s.flags=t&-65537|128,s):null;case 26:case 27:case 5:return fe(s),null;case 31:if(s.memoizedState!==null){if(Zt(s),s.alternate===null)throw Error(r(340));Yi()}return t=s.flags,t&65536?(s.flags=t&-65537|128,s):null;case 13:if(Zt(s),t=s.memoizedState,t!==null&&t.dehydrated!==null){if(s.alternate===null)throw Error(r(340));Yi()}return t=s.flags,t&65536?(s.flags=t&-65537|128,s):null;case 19:return X(Pe),null;case 4:return Re(),null;case 10:return $n(s.type),null;case 22:case 23:return Zt(s),Bu(),t!==null&&X(Pi),t=s.flags,t&65536?(s.flags=t&-65537|128,s):null;case 24:return $n(st),null;case 25:return null;default:return null}}function Sm(t,s){switch(Eu(s),s.tag){case 3:$n(st),Re();break;case 26:case 27:case 5:fe(s);break;case 4:Re();break;case 31:s.memoizedState!==null&&Zt(s);break;case 13:Zt(s);break;case 19:X(Pe);break;case 10:$n(s.type);break;case 22:case 23:Zt(s),Bu(),t!==null&&X(Pi);break;case 24:$n(st)}}function ga(t,s){try{var l=s.updateQueue,c=l!==null?l.lastEffect:null;if(c!==null){var h=c.next;l=h;do{if((l.tag&t)===t){c=void 0;var p=l.create,v=l.inst;c=p(),v.destroy=c}l=l.next}while(l!==h)}}catch(T){ke(s,s.return,T)}}function bi(t,s,l){try{var c=s.updateQueue,h=c!==null?c.lastEffect:null;if(h!==null){var p=h.next;c=p;do{if((c.tag&t)===t){var v=c.inst,T=v.destroy;if(T!==void 0){v.destroy=void 0,h=s;var N=l,z=T;try{z()}catch(G){ke(h,N,G)}}}c=c.next}while(c!==p)}}catch(G){ke(s,s.return,G)}}function wm(t){var s=t.updateQueue;if(s!==null){var l=t.stateNode;try{fg(s,l)}catch(c){ke(t,t.return,c)}}}function xm(t,s,l){l.props=ts(t.type,t.memoizedProps),l.state=t.memoizedState;try{l.componentWillUnmount()}catch(c){ke(t,s,c)}}function ma(t,s){try{var l=t.ref;if(l!==null){switch(t.tag){case 26:case 27:case 5:var c=t.stateNode;break;case 30:c=t.stateNode;break;default:c=t.stateNode}typeof l=="function"?t.refCleanup=l(c):l.current=c}}catch(h){ke(t,s,h)}}function Nn(t,s){var l=t.ref,c=t.refCleanup;if(l!==null)if(typeof c=="function")try{c()}catch(h){ke(t,s,h)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(h){ke(t,s,h)}else l.current=null}function _m(t){var s=t.type,l=t.memoizedProps,c=t.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":l.autoFocus&&c.focus();break e;case"img":l.src?c.src=l.src:l.srcSet&&(c.srcset=l.srcSet)}}catch(h){ke(t,t.return,h)}}function bf(t,s,l){try{var c=t.stateNode;B1(c,t.type,l,s),c[Lt]=s}catch(h){ke(t,t.return,h)}}function Em(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Ti(t.type)||t.tag===4}function vf(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Em(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Ti(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Sf(t,s,l){var c=t.tag;if(c===5||c===6)t=t.stateNode,s?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(t,s):(s=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,s.appendChild(t),l=l._reactRootContainer,l!=null||s.onclick!==null||(s.onclick=zn));else if(c!==4&&(c===27&&Ti(t.type)&&(l=t.stateNode,s=null),t=t.child,t!==null))for(Sf(t,s,l),t=t.sibling;t!==null;)Sf(t,s,l),t=t.sibling}function ao(t,s,l){var c=t.tag;if(c===5||c===6)t=t.stateNode,s?l.insertBefore(t,s):l.appendChild(t);else if(c!==4&&(c===27&&Ti(t.type)&&(l=t.stateNode),t=t.child,t!==null))for(ao(t,s,l),t=t.sibling;t!==null;)ao(t,s,l),t=t.sibling}function Tm(t){var s=t.stateNode,l=t.memoizedProps;try{for(var c=t.type,h=s.attributes;h.length;)s.removeAttributeNode(h[0]);xt(s,c,l),s[bt]=t,s[Lt]=l}catch(p){ke(t,t.return,p)}}var Xn=!1,lt=!1,wf=!1,Am=typeof WeakSet=="function"?WeakSet:Set,mt=null;function b1(t,s){if(t=t.containerInfo,If=No,t=Hp(t),du(t)){if("selectionStart"in t)var l={start:t.selectionStart,end:t.selectionEnd};else e:{l=(l=t.ownerDocument)&&l.defaultView||window;var c=l.getSelection&&l.getSelection();if(c&&c.rangeCount!==0){l=c.anchorNode;var h=c.anchorOffset,p=c.focusNode;c=c.focusOffset;try{l.nodeType,p.nodeType}catch{l=null;break e}var v=0,T=-1,N=-1,z=0,G=0,F=t,U=null;t:for(;;){for(var B;F!==l||h!==0&&F.nodeType!==3||(T=v+h),F!==p||c!==0&&F.nodeType!==3||(N=v+c),F.nodeType===3&&(v+=F.nodeValue.length),(B=F.firstChild)!==null;)U=F,F=B;for(;;){if(F===t)break t;if(U===l&&++z===h&&(T=v),U===p&&++G===c&&(N=v),(B=F.nextSibling)!==null)break;F=U,U=F.parentNode}F=B}l=T===-1||N===-1?null:{start:T,end:N}}else l=null}l=l||{start:0,end:0}}else l=null;for(Vf={focusedElem:t,selectionRange:l},No=!1,mt=s;mt!==null;)if(s=mt,t=s.child,(s.subtreeFlags&1028)!==0&&t!==null)t.return=s,mt=t;else for(;mt!==null;){switch(s=mt,p=s.alternate,t=s.flags,s.tag){case 0:if((t&4)!==0&&(t=s.updateQueue,t=t!==null?t.events:null,t!==null))for(l=0;l<t.length;l++)h=t[l],h.ref.impl=h.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&p!==null){t=void 0,l=s,h=p.memoizedProps,p=p.memoizedState,c=l.stateNode;try{var ne=ts(l.type,h);t=c.getSnapshotBeforeUpdate(ne,p),c.__reactInternalSnapshotBeforeUpdate=t}catch(oe){ke(l,l.return,oe)}}break;case 3:if((t&1024)!==0){if(t=s.stateNode.containerInfo,l=t.nodeType,l===9)Xf(t);else if(l===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Xf(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(r(163))}if(t=s.sibling,t!==null){t.return=s.return,mt=t;break}mt=s.return}}function Cm(t,s,l){var c=l.flags;switch(l.tag){case 0:case 11:case 15:Fn(t,l),c&4&&ga(5,l);break;case 1:if(Fn(t,l),c&4)if(t=l.stateNode,s===null)try{t.componentDidMount()}catch(v){ke(l,l.return,v)}else{var h=ts(l.type,s.memoizedProps);s=s.memoizedState;try{t.componentDidUpdate(h,s,t.__reactInternalSnapshotBeforeUpdate)}catch(v){ke(l,l.return,v)}}c&64&&wm(l),c&512&&ma(l,l.return);break;case 3:if(Fn(t,l),c&64&&(t=l.updateQueue,t!==null)){if(s=null,l.child!==null)switch(l.child.tag){case 27:case 5:s=l.child.stateNode;break;case 1:s=l.child.stateNode}try{fg(t,s)}catch(v){ke(l,l.return,v)}}break;case 27:s===null&&c&4&&Tm(l);case 26:case 5:Fn(t,l),s===null&&c&4&&_m(l),c&512&&ma(l,l.return);break;case 12:Fn(t,l);break;case 31:Fn(t,l),c&4&&Mm(t,l);break;case 13:Fn(t,l),c&4&&Om(t,l),c&64&&(t=l.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(l=C1.bind(null,l),Y1(t,l))));break;case 22:if(c=l.memoizedState!==null||Xn,!c){s=s!==null&&s.memoizedState!==null||lt,h=Xn;var p=lt;Xn=c,(lt=s)&&!p?Qn(t,l,(l.subtreeFlags&8772)!==0):Fn(t,l),Xn=h,lt=p}break;case 30:break;default:Fn(t,l)}}function Nm(t){var s=t.alternate;s!==null&&(t.alternate=null,Nm(s)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(s=t.stateNode,s!==null&&Pc(s)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var $e=null,Dt=!1;function Yn(t,s,l){for(l=l.child;l!==null;)km(t,s,l),l=l.sibling}function km(t,s,l){if(ft&&typeof ft.onCommitFiberUnmount=="function")try{ft.onCommitFiberUnmount(Bi,l)}catch{}switch(l.tag){case 26:lt||Nn(l,s),Yn(t,s,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:lt||Nn(l,s);var c=$e,h=Dt;Ti(l.type)&&($e=l.stateNode,Dt=!1),Yn(t,s,l),Ta(l.stateNode),$e=c,Dt=h;break;case 5:lt||Nn(l,s);case 6:if(c=$e,h=Dt,$e=null,Yn(t,s,l),$e=c,Dt=h,$e!==null)if(Dt)try{($e.nodeType===9?$e.body:$e.nodeName==="HTML"?$e.ownerDocument.body:$e).removeChild(l.stateNode)}catch(p){ke(l,s,p)}else try{$e.removeChild(l.stateNode)}catch(p){ke(l,s,p)}break;case 18:$e!==null&&(Dt?(t=$e,wy(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,l.stateNode),lr(t)):wy($e,l.stateNode));break;case 4:c=$e,h=Dt,$e=l.stateNode.containerInfo,Dt=!0,Yn(t,s,l),$e=c,Dt=h;break;case 0:case 11:case 14:case 15:bi(2,l,s),lt||bi(4,l,s),Yn(t,s,l);break;case 1:lt||(Nn(l,s),c=l.stateNode,typeof c.componentWillUnmount=="function"&&xm(l,s,c)),Yn(t,s,l);break;case 21:Yn(t,s,l);break;case 22:lt=(c=lt)||l.memoizedState!==null,Yn(t,s,l),lt=c;break;default:Yn(t,s,l)}}function Mm(t,s){if(s.memoizedState===null&&(t=s.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{lr(t)}catch(l){ke(s,s.return,l)}}}function Om(t,s){if(s.memoizedState===null&&(t=s.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{lr(t)}catch(l){ke(s,s.return,l)}}function v1(t){switch(t.tag){case 31:case 13:case 19:var s=t.stateNode;return s===null&&(s=t.stateNode=new Am),s;case 22:return t=t.stateNode,s=t._retryCache,s===null&&(s=t._retryCache=new Am),s;default:throw Error(r(435,t.tag))}}function lo(t,s){var l=v1(t);s.forEach(function(c){if(!l.has(c)){l.add(c);var h=N1.bind(null,t,c);c.then(h,h)}})}function zt(t,s){var l=s.deletions;if(l!==null)for(var c=0;c<l.length;c++){var h=l[c],p=t,v=s,T=v;e:for(;T!==null;){switch(T.tag){case 27:if(Ti(T.type)){$e=T.stateNode,Dt=!1;break e}break;case 5:$e=T.stateNode,Dt=!1;break e;case 3:case 4:$e=T.stateNode.containerInfo,Dt=!0;break e}T=T.return}if($e===null)throw Error(r(160));km(p,v,h),$e=null,Dt=!1,p=h.alternate,p!==null&&(p.return=null),h.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)jm(s,t),s=s.sibling}var Sn=null;function jm(t,s){var l=t.alternate,c=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:zt(s,t),Ut(t),c&4&&(bi(3,t,t.return),ga(3,t),bi(5,t,t.return));break;case 1:zt(s,t),Ut(t),c&512&&(lt||l===null||Nn(l,l.return)),c&64&&Xn&&(t=t.updateQueue,t!==null&&(c=t.callbacks,c!==null&&(l=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=l===null?c:l.concat(c))));break;case 26:var h=Sn;if(zt(s,t),Ut(t),c&512&&(lt||l===null||Nn(l,l.return)),c&4){var p=l!==null?l.memoizedState:null;if(c=t.memoizedState,l===null)if(c===null)if(t.stateNode===null){e:{c=t.type,l=t.memoizedProps,h=h.ownerDocument||h;t:switch(c){case"title":p=h.getElementsByTagName("title")[0],(!p||p[Vr]||p[bt]||p.namespaceURI==="http://www.w3.org/2000/svg"||p.hasAttribute("itemprop"))&&(p=h.createElement(c),h.head.insertBefore(p,h.querySelector("head > title"))),xt(p,c,l),p[bt]=t,gt(p),c=p;break e;case"link":var v=jy("link","href",h).get(c+(l.href||""));if(v){for(var T=0;T<v.length;T++)if(p=v[T],p.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&p.getAttribute("rel")===(l.rel==null?null:l.rel)&&p.getAttribute("title")===(l.title==null?null:l.title)&&p.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){v.splice(T,1);break t}}p=h.createElement(c),xt(p,c,l),h.head.appendChild(p);break;case"meta":if(v=jy("meta","content",h).get(c+(l.content||""))){for(T=0;T<v.length;T++)if(p=v[T],p.getAttribute("content")===(l.content==null?null:""+l.content)&&p.getAttribute("name")===(l.name==null?null:l.name)&&p.getAttribute("property")===(l.property==null?null:l.property)&&p.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&p.getAttribute("charset")===(l.charSet==null?null:l.charSet)){v.splice(T,1);break t}}p=h.createElement(c),xt(p,c,l),h.head.appendChild(p);break;default:throw Error(r(468,c))}p[bt]=t,gt(p),c=p}t.stateNode=c}else Ly(h,t.type,t.stateNode);else t.stateNode=Oy(h,c,t.memoizedProps);else p!==c?(p===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):p.count--,c===null?Ly(h,t.type,t.stateNode):Oy(h,c,t.memoizedProps)):c===null&&t.stateNode!==null&&bf(t,t.memoizedProps,l.memoizedProps)}break;case 27:zt(s,t),Ut(t),c&512&&(lt||l===null||Nn(l,l.return)),l!==null&&c&4&&bf(t,t.memoizedProps,l.memoizedProps);break;case 5:if(zt(s,t),Ut(t),c&512&&(lt||l===null||Nn(l,l.return)),t.flags&32){h=t.stateNode;try{Ms(h,"")}catch(ne){ke(t,t.return,ne)}}c&4&&t.stateNode!=null&&(h=t.memoizedProps,bf(t,h,l!==null?l.memoizedProps:h)),c&1024&&(wf=!0);break;case 6:if(zt(s,t),Ut(t),c&4){if(t.stateNode===null)throw Error(r(162));c=t.memoizedProps,l=t.stateNode;try{l.nodeValue=c}catch(ne){ke(t,t.return,ne)}}break;case 3:if(Eo=null,h=Sn,Sn=xo(s.containerInfo),zt(s,t),Sn=h,Ut(t),c&4&&l!==null&&l.memoizedState.isDehydrated)try{lr(s.containerInfo)}catch(ne){ke(t,t.return,ne)}wf&&(wf=!1,Lm(t));break;case 4:c=Sn,Sn=xo(t.stateNode.containerInfo),zt(s,t),Ut(t),Sn=c;break;case 12:zt(s,t),Ut(t);break;case 31:zt(s,t),Ut(t),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,lo(t,c)));break;case 13:zt(s,t),Ut(t),t.child.flags&8192&&t.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(co=it()),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,lo(t,c)));break;case 22:h=t.memoizedState!==null;var N=l!==null&&l.memoizedState!==null,z=Xn,G=lt;if(Xn=z||h,lt=G||N,zt(s,t),lt=G,Xn=z,Ut(t),c&8192)e:for(s=t.stateNode,s._visibility=h?s._visibility&-2:s._visibility|1,h&&(l===null||N||Xn||lt||ns(t)),l=null,s=t;;){if(s.tag===5||s.tag===26){if(l===null){N=l=s;try{if(p=N.stateNode,h)v=p.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{T=N.stateNode;var F=N.memoizedProps.style,U=F!=null&&F.hasOwnProperty("display")?F.display:null;T.style.display=U==null||typeof U=="boolean"?"":(""+U).trim()}}catch(ne){ke(N,N.return,ne)}}}else if(s.tag===6){if(l===null){N=s;try{N.stateNode.nodeValue=h?"":N.memoizedProps}catch(ne){ke(N,N.return,ne)}}}else if(s.tag===18){if(l===null){N=s;try{var B=N.stateNode;h?xy(B,!0):xy(N.stateNode,!1)}catch(ne){ke(N,N.return,ne)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===t)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;s.sibling===null;){if(s.return===null||s.return===t)break e;l===s&&(l=null),s=s.return}l===s&&(l=null),s.sibling.return=s.return,s=s.sibling}c&4&&(c=t.updateQueue,c!==null&&(l=c.retryQueue,l!==null&&(c.retryQueue=null,lo(t,l))));break;case 19:zt(s,t),Ut(t),c&4&&(c=t.updateQueue,c!==null&&(t.updateQueue=null,lo(t,c)));break;case 30:break;case 21:break;default:zt(s,t),Ut(t)}}function Ut(t){var s=t.flags;if(s&2){try{for(var l,c=t.return;c!==null;){if(Em(c)){l=c;break}c=c.return}if(l==null)throw Error(r(160));switch(l.tag){case 27:var h=l.stateNode,p=vf(t);ao(t,p,h);break;case 5:var v=l.stateNode;l.flags&32&&(Ms(v,""),l.flags&=-33);var T=vf(t);ao(t,T,v);break;case 3:case 4:var N=l.stateNode.containerInfo,z=vf(t);Sf(t,z,N);break;default:throw Error(r(161))}}catch(G){ke(t,t.return,G)}t.flags&=-3}s&4096&&(t.flags&=-4097)}function Lm(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var s=t;Lm(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),t=t.sibling}}function Fn(t,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)Cm(t,s.alternate,s),s=s.sibling}function ns(t){for(t=t.child;t!==null;){var s=t;switch(s.tag){case 0:case 11:case 14:case 15:bi(4,s,s.return),ns(s);break;case 1:Nn(s,s.return);var l=s.stateNode;typeof l.componentWillUnmount=="function"&&xm(s,s.return,l),ns(s);break;case 27:Ta(s.stateNode);case 26:case 5:Nn(s,s.return),ns(s);break;case 22:s.memoizedState===null&&ns(s);break;case 30:ns(s);break;default:ns(s)}t=t.sibling}}function Qn(t,s,l){for(l=l&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var c=s.alternate,h=t,p=s,v=p.flags;switch(p.tag){case 0:case 11:case 15:Qn(h,p,l),ga(4,p);break;case 1:if(Qn(h,p,l),c=p,h=c.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(z){ke(c,c.return,z)}if(c=p,h=c.updateQueue,h!==null){var T=c.stateNode;try{var N=h.shared.hiddenCallbacks;if(N!==null)for(h.shared.hiddenCallbacks=null,h=0;h<N.length;h++)ug(N[h],T)}catch(z){ke(c,c.return,z)}}l&&v&64&&wm(p),ma(p,p.return);break;case 27:Tm(p);case 26:case 5:Qn(h,p,l),l&&c===null&&v&4&&_m(p),ma(p,p.return);break;case 12:Qn(h,p,l);break;case 31:Qn(h,p,l),l&&v&4&&Mm(h,p);break;case 13:Qn(h,p,l),l&&v&4&&Om(h,p);break;case 22:p.memoizedState===null&&Qn(h,p,l),ma(p,p.return);break;case 30:break;default:Qn(h,p,l)}s=s.sibling}}function xf(t,s){var l=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),t=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(t=s.memoizedState.cachePool.pool),t!==l&&(t!=null&&t.refCount++,l!=null&&na(l))}function _f(t,s){t=null,s.alternate!==null&&(t=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==t&&(s.refCount++,t!=null&&na(t))}function wn(t,s,l,c){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)Rm(t,s,l,c),s=s.sibling}function Rm(t,s,l,c){var h=s.flags;switch(s.tag){case 0:case 11:case 15:wn(t,s,l,c),h&2048&&ga(9,s);break;case 1:wn(t,s,l,c);break;case 3:wn(t,s,l,c),h&2048&&(t=null,s.alternate!==null&&(t=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==t&&(s.refCount++,t!=null&&na(t)));break;case 12:if(h&2048){wn(t,s,l,c),t=s.stateNode;try{var p=s.memoizedProps,v=p.id,T=p.onPostCommit;typeof T=="function"&&T(v,s.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(N){ke(s,s.return,N)}}else wn(t,s,l,c);break;case 31:wn(t,s,l,c);break;case 13:wn(t,s,l,c);break;case 23:break;case 22:p=s.stateNode,v=s.alternate,s.memoizedState!==null?p._visibility&2?wn(t,s,l,c):ya(t,s):p._visibility&2?wn(t,s,l,c):(p._visibility|=2,Ps(t,s,l,c,(s.subtreeFlags&10256)!==0||!1)),h&2048&&xf(v,s);break;case 24:wn(t,s,l,c),h&2048&&_f(s.alternate,s);break;default:wn(t,s,l,c)}}function Ps(t,s,l,c,h){for(h=h&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var p=t,v=s,T=l,N=c,z=v.flags;switch(v.tag){case 0:case 11:case 15:Ps(p,v,T,N,h),ga(8,v);break;case 23:break;case 22:var G=v.stateNode;v.memoizedState!==null?G._visibility&2?Ps(p,v,T,N,h):ya(p,v):(G._visibility|=2,Ps(p,v,T,N,h)),h&&z&2048&&xf(v.alternate,v);break;case 24:Ps(p,v,T,N,h),h&&z&2048&&_f(v.alternate,v);break;default:Ps(p,v,T,N,h)}s=s.sibling}}function ya(t,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var l=t,c=s,h=c.flags;switch(c.tag){case 22:ya(l,c),h&2048&&xf(c.alternate,c);break;case 24:ya(l,c),h&2048&&_f(c.alternate,c);break;default:ya(l,c)}s=s.sibling}}var ba=8192;function Js(t,s,l){if(t.subtreeFlags&ba)for(t=t.child;t!==null;)Dm(t,s,l),t=t.sibling}function Dm(t,s,l){switch(t.tag){case 26:Js(t,s,l),t.flags&ba&&t.memoizedState!==null&&rx(l,Sn,t.memoizedState,t.memoizedProps);break;case 5:Js(t,s,l);break;case 3:case 4:var c=Sn;Sn=xo(t.stateNode.containerInfo),Js(t,s,l),Sn=c;break;case 22:t.memoizedState===null&&(c=t.alternate,c!==null&&c.memoizedState!==null?(c=ba,ba=16777216,Js(t,s,l),ba=c):Js(t,s,l));break;default:Js(t,s,l)}}function zm(t){var s=t.alternate;if(s!==null&&(t=s.child,t!==null)){s.child=null;do s=t.sibling,t.sibling=null,t=s;while(t!==null)}}function va(t){var s=t.deletions;if((t.flags&16)!==0){if(s!==null)for(var l=0;l<s.length;l++){var c=s[l];mt=c,Hm(c,t)}zm(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Um(t),t=t.sibling}function Um(t){switch(t.tag){case 0:case 11:case 15:va(t),t.flags&2048&&bi(9,t,t.return);break;case 3:va(t);break;case 12:va(t);break;case 22:var s=t.stateNode;t.memoizedState!==null&&s._visibility&2&&(t.return===null||t.return.tag!==13)?(s._visibility&=-3,oo(t)):va(t);break;default:va(t)}}function oo(t){var s=t.deletions;if((t.flags&16)!==0){if(s!==null)for(var l=0;l<s.length;l++){var c=s[l];mt=c,Hm(c,t)}zm(t)}for(t=t.child;t!==null;){switch(s=t,s.tag){case 0:case 11:case 15:bi(8,s,s.return),oo(s);break;case 22:l=s.stateNode,l._visibility&2&&(l._visibility&=-3,oo(s));break;default:oo(s)}t=t.sibling}}function Hm(t,s){for(;mt!==null;){var l=mt;switch(l.tag){case 0:case 11:case 15:bi(8,l,s);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var c=l.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:na(l.memoizedState.cache)}if(c=l.child,c!==null)c.return=l,mt=c;else e:for(l=t;mt!==null;){c=mt;var h=c.sibling,p=c.return;if(Nm(c),c===l){mt=null;break e}if(h!==null){h.return=p,mt=h;break e}mt=p}}}var S1={getCacheForType:function(t){var s=St(st),l=s.data.get(t);return l===void 0&&(l=t(),s.data.set(t,l)),l},cacheSignal:function(){return St(st).controller.signal}},w1=typeof WeakMap=="function"?WeakMap:Map,Ce=0,De=null,ye=null,ve=0,Ne=0,Wt=null,vi=!1,Zs=!1,Ef=!1,Pn=0,Qe=0,Si=0,is=0,Tf=0,en=0,Ws=0,Sa=null,Ht=null,Af=!1,co=0,Bm=0,uo=1/0,fo=null,wi=null,ht=0,xi=null,er=null,Jn=0,Cf=0,Nf=null,qm=null,wa=0,kf=null;function tn(){return(Ce&2)!==0&&ve!==0?ve&-ve:q.T!==null?Df():np()}function $m(){if(en===0)if((ve&536870912)===0||we){var t=Tn;Tn<<=1,(Tn&3932160)===0&&(Tn=262144),en=t}else en=536870912;return t=Jt.current,t!==null&&(t.flags|=32),en}function Bt(t,s,l){(t===De&&(Ne===2||Ne===9)||t.cancelPendingCommit!==null)&&(tr(t,0),_i(t,ve,en,!1)),Ir(t,l),((Ce&2)===0||t!==De)&&(t===De&&((Ce&2)===0&&(is|=l),Qe===4&&_i(t,ve,en,!1)),kn(t))}function Im(t,s,l){if((Ce&6)!==0)throw Error(r(327));var c=!l&&(s&127)===0&&(s&t.expiredLanes)===0||$r(t,s),h=c?E1(t,s):Of(t,s,!0),p=c;do{if(h===0){Zs&&!c&&_i(t,s,0,!1);break}else{if(l=t.current.alternate,p&&!x1(l)){h=Of(t,s,!1),p=!1;continue}if(h===2){if(p=s,t.errorRecoveryDisabledLanes&p)var v=0;else v=t.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){s=v;e:{var T=t;h=Sa;var N=T.current.memoizedState.isDehydrated;if(N&&(tr(T,v).flags|=256),v=Of(T,v,!1),v!==2){if(Ef&&!N){T.errorRecoveryDisabledLanes|=p,is|=p,h=4;break e}p=Ht,Ht=h,p!==null&&(Ht===null?Ht=p:Ht.push.apply(Ht,p))}h=v}if(p=!1,h!==2)continue}}if(h===1){tr(t,0),_i(t,s,0,!0);break}e:{switch(c=t,p=h,p){case 0:case 1:throw Error(r(345));case 4:if((s&4194048)!==s)break;case 6:_i(c,s,en,!vi);break e;case 2:Ht=null;break;case 3:case 5:break;default:throw Error(r(329))}if((s&62914560)===s&&(h=co+300-it(),10<h)){if(_i(c,s,en,!vi),wl(c,0,!0)!==0)break e;Jn=s,c.timeoutHandle=vy(Vm.bind(null,c,l,Ht,fo,Af,s,en,is,Ws,vi,p,"Throttled",-0,0),h);break e}Vm(c,l,Ht,fo,Af,s,en,is,Ws,vi,p,null,-0,0)}}break}while(!0);kn(t)}function Vm(t,s,l,c,h,p,v,T,N,z,G,F,U,B){if(t.timeoutHandle=-1,F=s.subtreeFlags,F&8192||(F&16785408)===16785408){F={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:zn},Dm(s,p,F);var ne=(p&62914560)===p?co-it():(p&4194048)===p?Bm-it():0;if(ne=ax(F,ne),ne!==null){Jn=p,t.cancelPendingCommit=ne(Jm.bind(null,t,s,p,l,c,h,v,T,N,G,F,null,U,B)),_i(t,p,v,!z);return}}Jm(t,s,p,l,c,h,v,T,N)}function x1(t){for(var s=t;;){var l=s.tag;if((l===0||l===11||l===15)&&s.flags&16384&&(l=s.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var c=0;c<l.length;c++){var h=l[c],p=h.getSnapshot;h=h.value;try{if(!Qt(p(),h))return!1}catch{return!1}}if(l=s.child,s.subtreeFlags&16384&&l!==null)l.return=s,s=l;else{if(s===t)break;for(;s.sibling===null;){if(s.return===null||s.return===t)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function _i(t,s,l,c){s&=~Tf,s&=~is,t.suspendedLanes|=s,t.pingedLanes&=~s,c&&(t.warmLanes|=s),c=t.expirationTimes;for(var h=s;0<h;){var p=31-kt(h),v=1<<p;c[p]=-1,h&=~v}l!==0&&Wd(t,l,s)}function ho(){return(Ce&6)===0?(xa(0),!1):!0}function Mf(){if(ye!==null){if(Ne===0)var t=ye.return;else t=ye,qn=Fi=null,Ku(t),Ks=null,sa=0,t=ye;for(;t!==null;)Sm(t.alternate,t),t=t.return;ye=null}}function tr(t,s){var l=t.timeoutHandle;l!==-1&&(t.timeoutHandle=-1,I1(l)),l=t.cancelPendingCommit,l!==null&&(t.cancelPendingCommit=null,l()),Jn=0,Mf(),De=t,ye=l=Hn(t.current,null),ve=s,Ne=0,Wt=null,vi=!1,Zs=$r(t,s),Ef=!1,Ws=en=Tf=is=Si=Qe=0,Ht=Sa=null,Af=!1,(s&8)!==0&&(s|=s&32);var c=t.entangledLanes;if(c!==0)for(t=t.entanglements,c&=s;0<c;){var h=31-kt(c),p=1<<h;s|=t[h],c&=~p}return Pn=s,Ll(),l}function Gm(t,s){pe=null,q.H=ha,s===Gs||s===$l?(s=ag(),Ne=3):s===Lu?(s=ag(),Ne=4):Ne=s===of?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,Wt=s,ye===null&&(Qe=1,to(t,on(s,t.current)))}function Km(){var t=Jt.current;return t===null?!0:(ve&4194048)===ve?hn===null:(ve&62914560)===ve||(ve&536870912)!==0?t===hn:!1}function Xm(){var t=q.H;return q.H=ha,t===null?ha:t}function Ym(){var t=q.A;return q.A=S1,t}function po(){Qe=4,vi||(ve&4194048)!==ve&&Jt.current!==null||(Zs=!0),(Si&134217727)===0&&(is&134217727)===0||De===null||_i(De,ve,en,!1)}function Of(t,s,l){var c=Ce;Ce|=2;var h=Xm(),p=Ym();(De!==t||ve!==s)&&(fo=null,tr(t,s)),s=!1;var v=Qe;e:do try{if(Ne!==0&&ye!==null){var T=ye,N=Wt;switch(Ne){case 8:Mf(),v=6;break e;case 3:case 2:case 9:case 6:Jt.current===null&&(s=!0);var z=Ne;if(Ne=0,Wt=null,nr(t,T,N,z),l&&Zs){v=0;break e}break;default:z=Ne,Ne=0,Wt=null,nr(t,T,N,z)}}_1(),v=Qe;break}catch(G){Gm(t,G)}while(!0);return s&&t.shellSuspendCounter++,qn=Fi=null,Ce=c,q.H=h,q.A=p,ye===null&&(De=null,ve=0,Ll()),v}function _1(){for(;ye!==null;)Fm(ye)}function E1(t,s){var l=Ce;Ce|=2;var c=Xm(),h=Ym();De!==t||ve!==s?(fo=null,uo=it()+500,tr(t,s)):Zs=$r(t,s);e:do try{if(Ne!==0&&ye!==null){s=ye;var p=Wt;t:switch(Ne){case 1:Ne=0,Wt=null,nr(t,s,p,1);break;case 2:case 9:if(sg(p)){Ne=0,Wt=null,Qm(s);break}s=function(){Ne!==2&&Ne!==9||De!==t||(Ne=7),kn(t)},p.then(s,s);break e;case 3:Ne=7;break e;case 4:Ne=5;break e;case 7:sg(p)?(Ne=0,Wt=null,Qm(s)):(Ne=0,Wt=null,nr(t,s,p,7));break;case 5:var v=null;switch(ye.tag){case 26:v=ye.memoizedState;case 5:case 27:var T=ye;if(v?Ry(v):T.stateNode.complete){Ne=0,Wt=null;var N=T.sibling;if(N!==null)ye=N;else{var z=T.return;z!==null?(ye=z,go(z)):ye=null}break t}}Ne=0,Wt=null,nr(t,s,p,5);break;case 6:Ne=0,Wt=null,nr(t,s,p,6);break;case 8:Mf(),Qe=6;break e;default:throw Error(r(462))}}T1();break}catch(G){Gm(t,G)}while(!0);return qn=Fi=null,q.H=c,q.A=h,Ce=l,ye!==null?0:(De=null,ve=0,Ll(),Qe)}function T1(){for(;ye!==null&&!ws();)Fm(ye)}function Fm(t){var s=bm(t.alternate,t,Pn);t.memoizedProps=t.pendingProps,s===null?go(t):ye=s}function Qm(t){var s=t,l=s.alternate;switch(s.tag){case 15:case 0:s=hm(l,s,s.pendingProps,s.type,void 0,ve);break;case 11:s=hm(l,s,s.pendingProps,s.type.render,s.ref,ve);break;case 5:Ku(s);default:Sm(l,s),s=ye=Yp(s,Pn),s=bm(l,s,Pn)}t.memoizedProps=t.pendingProps,s===null?go(t):ye=s}function nr(t,s,l,c){qn=Fi=null,Ku(s),Ks=null,sa=0;var h=s.return;try{if(d1(t,h,s,l,ve)){Qe=1,to(t,on(l,t.current)),ye=null;return}}catch(p){if(h!==null)throw ye=h,p;Qe=1,to(t,on(l,t.current)),ye=null;return}s.flags&32768?(we||c===1?t=!0:Zs||(ve&536870912)!==0?t=!1:(vi=t=!0,(c===2||c===9||c===3||c===6)&&(c=Jt.current,c!==null&&c.tag===13&&(c.flags|=16384))),Pm(s,t)):go(s)}function go(t){var s=t;do{if((s.flags&32768)!==0){Pm(s,vi);return}t=s.return;var l=m1(s.alternate,s,Pn);if(l!==null){ye=l;return}if(s=s.sibling,s!==null){ye=s;return}ye=s=t}while(s!==null);Qe===0&&(Qe=5)}function Pm(t,s){do{var l=y1(t.alternate,t);if(l!==null){l.flags&=32767,ye=l;return}if(l=t.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!s&&(t=t.sibling,t!==null)){ye=t;return}ye=t=l}while(t!==null);Qe=6,ye=null}function Jm(t,s,l,c,h,p,v,T,N){t.cancelPendingCommit=null;do mo();while(ht!==0);if((Ce&6)!==0)throw Error(r(327));if(s!==null){if(s===t.current)throw Error(r(177));if(p=s.lanes|s.childLanes,p|=bu,sw(t,l,p,v,T,N),t===De&&(ye=De=null,ve=0),er=s,xi=t,Jn=l,Cf=p,Nf=h,qm=c,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,k1(xs,function(){return ny(),null})):(t.callbackNode=null,t.callbackPriority=0),c=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||c){c=q.T,q.T=null,h=Z.p,Z.p=2,v=Ce,Ce|=4;try{b1(t,s,l)}finally{Ce=v,Z.p=h,q.T=c}}ht=1,Zm(),Wm(),ey()}}function Zm(){if(ht===1){ht=0;var t=xi,s=er,l=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||l){l=q.T,q.T=null;var c=Z.p;Z.p=2;var h=Ce;Ce|=4;try{jm(s,t);var p=Vf,v=Hp(t.containerInfo),T=p.focusedElem,N=p.selectionRange;if(v!==T&&T&&T.ownerDocument&&Up(T.ownerDocument.documentElement,T)){if(N!==null&&du(T)){var z=N.start,G=N.end;if(G===void 0&&(G=z),"selectionStart"in T)T.selectionStart=z,T.selectionEnd=Math.min(G,T.value.length);else{var F=T.ownerDocument||document,U=F&&F.defaultView||window;if(U.getSelection){var B=U.getSelection(),ne=T.textContent.length,oe=Math.min(N.start,ne),Le=N.end===void 0?oe:Math.min(N.end,ne);!B.extend&&oe>Le&&(v=Le,Le=oe,oe=v);var L=zp(T,oe),k=zp(T,Le);if(L&&k&&(B.rangeCount!==1||B.anchorNode!==L.node||B.anchorOffset!==L.offset||B.focusNode!==k.node||B.focusOffset!==k.offset)){var D=F.createRange();D.setStart(L.node,L.offset),B.removeAllRanges(),oe>Le?(B.addRange(D),B.extend(k.node,k.offset)):(D.setEnd(k.node,k.offset),B.addRange(D))}}}}for(F=[],B=T;B=B.parentNode;)B.nodeType===1&&F.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof T.focus=="function"&&T.focus(),T=0;T<F.length;T++){var Y=F[T];Y.element.scrollLeft=Y.left,Y.element.scrollTop=Y.top}}No=!!If,Vf=If=null}finally{Ce=h,Z.p=c,q.T=l}}t.current=s,ht=2}}function Wm(){if(ht===2){ht=0;var t=xi,s=er,l=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||l){l=q.T,q.T=null;var c=Z.p;Z.p=2;var h=Ce;Ce|=4;try{Cm(t,s.alternate,s)}finally{Ce=h,Z.p=c,q.T=l}}ht=3}}function ey(){if(ht===4||ht===3){ht=0,qc();var t=xi,s=er,l=Jn,c=qm;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?ht=5:(ht=0,er=xi=null,ty(t,t.pendingLanes));var h=t.pendingLanes;if(h===0&&(wi=null),Fc(l),s=s.stateNode,ft&&typeof ft.onCommitFiberRoot=="function")try{ft.onCommitFiberRoot(Bi,s,void 0,(s.current.flags&128)===128)}catch{}if(c!==null){s=q.T,h=Z.p,Z.p=2,q.T=null;try{for(var p=t.onRecoverableError,v=0;v<c.length;v++){var T=c[v];p(T.value,{componentStack:T.stack})}}finally{q.T=s,Z.p=h}}(Jn&3)!==0&&mo(),kn(t),h=t.pendingLanes,(l&261930)!==0&&(h&42)!==0?t===kf?wa++:(wa=0,kf=t):wa=0,xa(0)}}function ty(t,s){(t.pooledCacheLanes&=s)===0&&(s=t.pooledCache,s!=null&&(t.pooledCache=null,na(s)))}function mo(){return Zm(),Wm(),ey(),ny()}function ny(){if(ht!==5)return!1;var t=xi,s=Cf;Cf=0;var l=Fc(Jn),c=q.T,h=Z.p;try{Z.p=32>l?32:l,q.T=null,l=Nf,Nf=null;var p=xi,v=Jn;if(ht=0,er=xi=null,Jn=0,(Ce&6)!==0)throw Error(r(331));var T=Ce;if(Ce|=4,Um(p.current),Rm(p,p.current,v,l),Ce=T,xa(0,!1),ft&&typeof ft.onPostCommitFiberRoot=="function")try{ft.onPostCommitFiberRoot(Bi,p)}catch{}return!0}finally{Z.p=h,q.T=c,ty(t,s)}}function iy(t,s,l){s=on(l,s),s=lf(t.stateNode,s,2),t=gi(t,s,2),t!==null&&(Ir(t,2),kn(t))}function ke(t,s,l){if(t.tag===3)iy(t,t,l);else for(;s!==null;){if(s.tag===3){iy(s,t,l);break}else if(s.tag===1){var c=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(wi===null||!wi.has(c))){t=on(l,t),l=sm(2),c=gi(s,l,2),c!==null&&(rm(l,c,s,t),Ir(c,2),kn(c));break}}s=s.return}}function jf(t,s,l){var c=t.pingCache;if(c===null){c=t.pingCache=new w1;var h=new Set;c.set(s,h)}else h=c.get(s),h===void 0&&(h=new Set,c.set(s,h));h.has(l)||(Ef=!0,h.add(l),t=A1.bind(null,t,s,l),s.then(t,t))}function A1(t,s,l){var c=t.pingCache;c!==null&&c.delete(s),t.pingedLanes|=t.suspendedLanes&l,t.warmLanes&=~l,De===t&&(ve&l)===l&&(Qe===4||Qe===3&&(ve&62914560)===ve&&300>it()-co?(Ce&2)===0&&tr(t,0):Tf|=l,Ws===ve&&(Ws=0)),kn(t)}function sy(t,s){s===0&&(s=Zd()),t=Ki(t,s),t!==null&&(Ir(t,s),kn(t))}function C1(t){var s=t.memoizedState,l=0;s!==null&&(l=s.retryLane),sy(t,l)}function N1(t,s){var l=0;switch(t.tag){case 31:case 13:var c=t.stateNode,h=t.memoizedState;h!==null&&(l=h.retryLane);break;case 19:c=t.stateNode;break;case 22:c=t.stateNode._retryCache;break;default:throw Error(r(314))}c!==null&&c.delete(s),sy(t,l)}function k1(t,s){return vs(t,s)}var yo=null,ir=null,Lf=!1,bo=!1,Rf=!1,Ei=0;function kn(t){t!==ir&&t.next===null&&(ir===null?yo=ir=t:ir=ir.next=t),bo=!0,Lf||(Lf=!0,O1())}function xa(t,s){if(!Rf&&bo){Rf=!0;do for(var l=!1,c=yo;c!==null;){if(t!==0){var h=c.pendingLanes;if(h===0)var p=0;else{var v=c.suspendedLanes,T=c.pingedLanes;p=(1<<31-kt(42|t)+1)-1,p&=h&~(v&~T),p=p&201326741?p&201326741|1:p?p|2:0}p!==0&&(l=!0,oy(c,p))}else p=ve,p=wl(c,c===De?p:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(p&3)===0||$r(c,p)||(l=!0,oy(c,p));c=c.next}while(l);Rf=!1}}function M1(){ry()}function ry(){bo=Lf=!1;var t=0;Ei!==0&&$1()&&(t=Ei);for(var s=it(),l=null,c=yo;c!==null;){var h=c.next,p=ay(c,s);p===0?(c.next=null,l===null?yo=h:l.next=h,h===null&&(ir=l)):(l=c,(t!==0||(p&3)!==0)&&(bo=!0)),c=h}ht!==0&&ht!==5||xa(t),Ei!==0&&(Ei=0)}function ay(t,s){for(var l=t.suspendedLanes,c=t.pingedLanes,h=t.expirationTimes,p=t.pendingLanes&-62914561;0<p;){var v=31-kt(p),T=1<<v,N=h[v];N===-1?((T&l)===0||(T&c)!==0)&&(h[v]=iw(T,s)):N<=s&&(t.expiredLanes|=T),p&=~T}if(s=De,l=ve,l=wl(t,t===s?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c=t.callbackNode,l===0||t===s&&(Ne===2||Ne===9)||t.cancelPendingCommit!==null)return c!==null&&c!==null&&Ss(c),t.callbackNode=null,t.callbackPriority=0;if((l&3)===0||$r(t,l)){if(s=l&-l,s===t.callbackPriority)return s;switch(c!==null&&Ss(c),Fc(l)){case 2:case 8:l=bl;break;case 32:l=xs;break;case 268435456:l=_s;break;default:l=xs}return c=ly.bind(null,t),l=vs(l,c),t.callbackPriority=s,t.callbackNode=l,s}return c!==null&&c!==null&&Ss(c),t.callbackPriority=2,t.callbackNode=null,2}function ly(t,s){if(ht!==0&&ht!==5)return t.callbackNode=null,t.callbackPriority=0,null;var l=t.callbackNode;if(mo()&&t.callbackNode!==l)return null;var c=ve;return c=wl(t,t===De?c:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),c===0?null:(Im(t,c,s),ay(t,it()),t.callbackNode!=null&&t.callbackNode===l?ly.bind(null,t):null)}function oy(t,s){if(mo())return null;Im(t,s,!0)}function O1(){V1(function(){(Ce&6)!==0?vs(yl,M1):ry()})}function Df(){if(Ei===0){var t=Is;t===0&&(t=le,le<<=1,(le&261888)===0&&(le=256)),Ei=t}return Ei}function cy(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Tl(""+t)}function uy(t,s){var l=s.ownerDocument.createElement("input");return l.name=s.name,l.value=s.value,t.id&&l.setAttribute("form",t.id),s.parentNode.insertBefore(l,s),t=new FormData(t),l.parentNode.removeChild(l),t}function j1(t,s,l,c,h){if(s==="submit"&&l&&l.stateNode===h){var p=cy((h[Lt]||null).action),v=c.submitter;v&&(s=(s=v[Lt]||null)?cy(s.formAction):v.getAttribute("formAction"),s!==null&&(p=s,v=null));var T=new kl("action","action",null,c,h);t.push({event:T,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(Ei!==0){var N=v?uy(h,v):new FormData(h);ef(l,{pending:!0,data:N,method:h.method,action:p},null,N)}}else typeof p=="function"&&(T.preventDefault(),N=v?uy(h,v):new FormData(h),ef(l,{pending:!0,data:N,method:h.method,action:p},p,N))},currentTarget:h}]})}}for(var zf=0;zf<yu.length;zf++){var Uf=yu[zf],L1=Uf.toLowerCase(),R1=Uf[0].toUpperCase()+Uf.slice(1);vn(L1,"on"+R1)}vn($p,"onAnimationEnd"),vn(Ip,"onAnimationIteration"),vn(Vp,"onAnimationStart"),vn("dblclick","onDoubleClick"),vn("focusin","onFocus"),vn("focusout","onBlur"),vn(Pw,"onTransitionRun"),vn(Jw,"onTransitionStart"),vn(Zw,"onTransitionCancel"),vn(Gp,"onTransitionEnd"),Ns("onMouseEnter",["mouseout","mouseover"]),Ns("onMouseLeave",["mouseout","mouseover"]),Ns("onPointerEnter",["pointerout","pointerover"]),Ns("onPointerLeave",["pointerout","pointerover"]),$i("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),$i("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),$i("onBeforeInput",["compositionend","keypress","textInput","paste"]),$i("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),$i("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),$i("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var _a="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),D1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(_a));function fy(t,s){s=(s&4)!==0;for(var l=0;l<t.length;l++){var c=t[l],h=c.event;c=c.listeners;e:{var p=void 0;if(s)for(var v=c.length-1;0<=v;v--){var T=c[v],N=T.instance,z=T.currentTarget;if(T=T.listener,N!==p&&h.isPropagationStopped())break e;p=T,h.currentTarget=z;try{p(h)}catch(G){jl(G)}h.currentTarget=null,p=N}else for(v=0;v<c.length;v++){if(T=c[v],N=T.instance,z=T.currentTarget,T=T.listener,N!==p&&h.isPropagationStopped())break e;p=T,h.currentTarget=z;try{p(h)}catch(G){jl(G)}h.currentTarget=null,p=N}}}}function be(t,s){var l=s[Qc];l===void 0&&(l=s[Qc]=new Set);var c=t+"__bubble";l.has(c)||(hy(s,t,2,!1),l.add(c))}function Hf(t,s,l){var c=0;s&&(c|=4),hy(l,t,c,s)}var vo="_reactListening"+Math.random().toString(36).slice(2);function Bf(t){if(!t[vo]){t[vo]=!0,rp.forEach(function(l){l!=="selectionchange"&&(D1.has(l)||Hf(l,!1,t),Hf(l,!0,t))});var s=t.nodeType===9?t:t.ownerDocument;s===null||s[vo]||(s[vo]=!0,Hf("selectionchange",!1,s))}}function hy(t,s,l,c){switch($y(s)){case 2:var h=cx;break;case 8:h=ux;break;default:h=eh}l=h.bind(null,s,l,t),h=void 0,!su||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(h=!0),c?h!==void 0?t.addEventListener(s,l,{capture:!0,passive:h}):t.addEventListener(s,l,!0):h!==void 0?t.addEventListener(s,l,{passive:h}):t.addEventListener(s,l,!1)}function qf(t,s,l,c,h){var p=c;if((s&1)===0&&(s&2)===0&&c!==null)e:for(;;){if(c===null)return;var v=c.tag;if(v===3||v===4){var T=c.stateNode.containerInfo;if(T===h)break;if(v===4)for(v=c.return;v!==null;){var N=v.tag;if((N===3||N===4)&&v.stateNode.containerInfo===h)return;v=v.return}for(;T!==null;){if(v=Ts(T),v===null)return;if(N=v.tag,N===5||N===6||N===26||N===27){c=p=v;continue e}T=T.parentNode}}c=c.return}yp(function(){var z=p,G=nu(l),F=[];e:{var U=Kp.get(t);if(U!==void 0){var B=kl,ne=t;switch(t){case"keypress":if(Cl(l)===0)break e;case"keydown":case"keyup":B=Nw;break;case"focusin":ne="focus",B=ou;break;case"focusout":ne="blur",B=ou;break;case"beforeblur":case"afterblur":B=ou;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":B=Sp;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":B=mw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":B=Ow;break;case $p:case Ip:case Vp:B=vw;break;case Gp:B=Lw;break;case"scroll":case"scrollend":B=pw;break;case"wheel":B=Dw;break;case"copy":case"cut":case"paste":B=ww;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":B=xp;break;case"toggle":case"beforetoggle":B=Uw}var oe=(s&4)!==0,Le=!oe&&(t==="scroll"||t==="scrollend"),L=oe?U!==null?U+"Capture":null:U;oe=[];for(var k=z,D;k!==null;){var Y=k;if(D=Y.stateNode,Y=Y.tag,Y!==5&&Y!==26&&Y!==27||D===null||L===null||(Y=Kr(k,L),Y!=null&&oe.push(Ea(k,Y,D))),Le)break;k=k.return}0<oe.length&&(U=new B(U,ne,null,l,G),F.push({event:U,listeners:oe}))}}if((s&7)===0){e:{if(U=t==="mouseover"||t==="pointerover",B=t==="mouseout"||t==="pointerout",U&&l!==tu&&(ne=l.relatedTarget||l.fromElement)&&(Ts(ne)||ne[Es]))break e;if((B||U)&&(U=G.window===G?G:(U=G.ownerDocument)?U.defaultView||U.parentWindow:window,B?(ne=l.relatedTarget||l.toElement,B=z,ne=ne?Ts(ne):null,ne!==null&&(Le=o(ne),oe=ne.tag,ne!==Le||oe!==5&&oe!==27&&oe!==6)&&(ne=null)):(B=null,ne=z),B!==ne)){if(oe=Sp,Y="onMouseLeave",L="onMouseEnter",k="mouse",(t==="pointerout"||t==="pointerover")&&(oe=xp,Y="onPointerLeave",L="onPointerEnter",k="pointer"),Le=B==null?U:Gr(B),D=ne==null?U:Gr(ne),U=new oe(Y,k+"leave",B,l,G),U.target=Le,U.relatedTarget=D,Y=null,Ts(G)===z&&(oe=new oe(L,k+"enter",ne,l,G),oe.target=D,oe.relatedTarget=Le,Y=oe),Le=Y,B&&ne)t:{for(oe=z1,L=B,k=ne,D=0,Y=L;Y;Y=oe(Y))D++;Y=0;for(var ae=k;ae;ae=oe(ae))Y++;for(;0<D-Y;)L=oe(L),D--;for(;0<Y-D;)k=oe(k),Y--;for(;D--;){if(L===k||k!==null&&L===k.alternate){oe=L;break t}L=oe(L),k=oe(k)}oe=null}else oe=null;B!==null&&dy(F,U,B,oe,!1),ne!==null&&Le!==null&&dy(F,Le,ne,oe,!0)}}e:{if(U=z?Gr(z):window,B=U.nodeName&&U.nodeName.toLowerCase(),B==="select"||B==="input"&&U.type==="file")var Te=Mp;else if(Np(U))if(Op)Te=Yw;else{Te=Kw;var ie=Gw}else B=U.nodeName,!B||B.toLowerCase()!=="input"||U.type!=="checkbox"&&U.type!=="radio"?z&&eu(z.elementType)&&(Te=Mp):Te=Xw;if(Te&&(Te=Te(t,z))){kp(F,Te,l,G);break e}ie&&ie(t,U,z),t==="focusout"&&z&&U.type==="number"&&z.memoizedProps.value!=null&&Wc(U,"number",U.value)}switch(ie=z?Gr(z):window,t){case"focusin":(Np(ie)||ie.contentEditable==="true")&&(Rs=ie,pu=z,Wr=null);break;case"focusout":Wr=pu=Rs=null;break;case"mousedown":gu=!0;break;case"contextmenu":case"mouseup":case"dragend":gu=!1,Bp(F,l,G);break;case"selectionchange":if(Qw)break;case"keydown":case"keyup":Bp(F,l,G)}var ge;if(uu)e:{switch(t){case"compositionstart":var Se="onCompositionStart";break e;case"compositionend":Se="onCompositionEnd";break e;case"compositionupdate":Se="onCompositionUpdate";break e}Se=void 0}else Ls?Ap(t,l)&&(Se="onCompositionEnd"):t==="keydown"&&l.keyCode===229&&(Se="onCompositionStart");Se&&(_p&&l.locale!=="ko"&&(Ls||Se!=="onCompositionStart"?Se==="onCompositionEnd"&&Ls&&(ge=bp()):(oi=G,ru="value"in oi?oi.value:oi.textContent,Ls=!0)),ie=So(z,Se),0<ie.length&&(Se=new wp(Se,t,null,l,G),F.push({event:Se,listeners:ie}),ge?Se.data=ge:(ge=Cp(l),ge!==null&&(Se.data=ge)))),(ge=Bw?qw(t,l):$w(t,l))&&(Se=So(z,"onBeforeInput"),0<Se.length&&(ie=new wp("onBeforeInput","beforeinput",null,l,G),F.push({event:ie,listeners:Se}),ie.data=ge)),j1(F,t,z,l,G)}fy(F,s)})}function Ea(t,s,l){return{instance:t,listener:s,currentTarget:l}}function So(t,s){for(var l=s+"Capture",c=[];t!==null;){var h=t,p=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||p===null||(h=Kr(t,l),h!=null&&c.unshift(Ea(t,h,p)),h=Kr(t,s),h!=null&&c.push(Ea(t,h,p))),t.tag===3)return c;t=t.return}return[]}function z1(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function dy(t,s,l,c,h){for(var p=s._reactName,v=[];l!==null&&l!==c;){var T=l,N=T.alternate,z=T.stateNode;if(T=T.tag,N!==null&&N===c)break;T!==5&&T!==26&&T!==27||z===null||(N=z,h?(z=Kr(l,p),z!=null&&v.unshift(Ea(l,z,N))):h||(z=Kr(l,p),z!=null&&v.push(Ea(l,z,N)))),l=l.return}v.length!==0&&t.push({event:s,listeners:v})}var U1=/\r\n?/g,H1=/\u0000|\uFFFD/g;function py(t){return(typeof t=="string"?t:""+t).replace(U1,`
`).replace(H1,"")}function gy(t,s){return s=py(s),py(t)===s}function je(t,s,l,c,h,p){switch(l){case"children":typeof c=="string"?s==="body"||s==="textarea"&&c===""||Ms(t,c):(typeof c=="number"||typeof c=="bigint")&&s!=="body"&&Ms(t,""+c);break;case"className":_l(t,"class",c);break;case"tabIndex":_l(t,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":_l(t,l,c);break;case"style":gp(t,c,p);break;case"data":if(s!=="object"){_l(t,"data",c);break}case"src":case"href":if(c===""&&(s!=="a"||l!=="href")){t.removeAttribute(l);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(l);break}c=Tl(""+c),t.setAttribute(l,c);break;case"action":case"formAction":if(typeof c=="function"){t.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof p=="function"&&(l==="formAction"?(s!=="input"&&je(t,s,"name",h.name,h,null),je(t,s,"formEncType",h.formEncType,h,null),je(t,s,"formMethod",h.formMethod,h,null),je(t,s,"formTarget",h.formTarget,h,null)):(je(t,s,"encType",h.encType,h,null),je(t,s,"method",h.method,h,null),je(t,s,"target",h.target,h,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){t.removeAttribute(l);break}c=Tl(""+c),t.setAttribute(l,c);break;case"onClick":c!=null&&(t.onclick=zn);break;case"onScroll":c!=null&&be("scroll",t);break;case"onScrollEnd":c!=null&&be("scrollend",t);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(r(61));if(l=c.__html,l!=null){if(h.children!=null)throw Error(r(60));t.innerHTML=l}}break;case"multiple":t.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":t.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){t.removeAttribute("xlink:href");break}l=Tl(""+c),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(l,""+c):t.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":c&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(l,""):t.removeAttribute(l);break;case"capture":case"download":c===!0?t.setAttribute(l,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?t.setAttribute(l,c):t.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?t.setAttribute(l,c):t.removeAttribute(l);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?t.removeAttribute(l):t.setAttribute(l,c);break;case"popover":be("beforetoggle",t),be("toggle",t),xl(t,"popover",c);break;case"xlinkActuate":Dn(t,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":Dn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":Dn(t,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":Dn(t,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":Dn(t,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":Dn(t,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":Dn(t,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":Dn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":Dn(t,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":xl(t,"is",c);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=hw.get(l)||l,xl(t,l,c))}}function $f(t,s,l,c,h,p){switch(l){case"style":gp(t,c,p);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(r(61));if(l=c.__html,l!=null){if(h.children!=null)throw Error(r(60));t.innerHTML=l}}break;case"children":typeof c=="string"?Ms(t,c):(typeof c=="number"||typeof c=="bigint")&&Ms(t,""+c);break;case"onScroll":c!=null&&be("scroll",t);break;case"onScrollEnd":c!=null&&be("scrollend",t);break;case"onClick":c!=null&&(t.onclick=zn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ap.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(h=l.endsWith("Capture"),s=l.slice(2,h?l.length-7:void 0),p=t[Lt]||null,p=p!=null?p[l]:null,typeof p=="function"&&t.removeEventListener(s,p,h),typeof c=="function")){typeof p!="function"&&p!==null&&(l in t?t[l]=null:t.hasAttribute(l)&&t.removeAttribute(l)),t.addEventListener(s,c,h);break e}l in t?t[l]=c:c===!0?t.setAttribute(l,""):xl(t,l,c)}}}function xt(t,s,l){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":be("error",t),be("load",t);var c=!1,h=!1,p;for(p in l)if(l.hasOwnProperty(p)){var v=l[p];if(v!=null)switch(p){case"src":c=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:je(t,s,p,v,l,null)}}h&&je(t,s,"srcSet",l.srcSet,l,null),c&&je(t,s,"src",l.src,l,null);return;case"input":be("invalid",t);var T=p=v=h=null,N=null,z=null;for(c in l)if(l.hasOwnProperty(c)){var G=l[c];if(G!=null)switch(c){case"name":h=G;break;case"type":v=G;break;case"checked":N=G;break;case"defaultChecked":z=G;break;case"value":p=G;break;case"defaultValue":T=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(r(137,s));break;default:je(t,s,c,G,l,null)}}fp(t,p,T,N,z,v,h,!1);return;case"select":be("invalid",t),c=v=p=null;for(h in l)if(l.hasOwnProperty(h)&&(T=l[h],T!=null))switch(h){case"value":p=T;break;case"defaultValue":v=T;break;case"multiple":c=T;default:je(t,s,h,T,l,null)}s=p,l=v,t.multiple=!!c,s!=null?ks(t,!!c,s,!1):l!=null&&ks(t,!!c,l,!0);return;case"textarea":be("invalid",t),p=h=c=null;for(v in l)if(l.hasOwnProperty(v)&&(T=l[v],T!=null))switch(v){case"value":c=T;break;case"defaultValue":h=T;break;case"children":p=T;break;case"dangerouslySetInnerHTML":if(T!=null)throw Error(r(91));break;default:je(t,s,v,T,l,null)}dp(t,c,h,p);return;case"option":for(N in l)if(l.hasOwnProperty(N)&&(c=l[N],c!=null))switch(N){case"selected":t.selected=c&&typeof c!="function"&&typeof c!="symbol";break;default:je(t,s,N,c,l,null)}return;case"dialog":be("beforetoggle",t),be("toggle",t),be("cancel",t),be("close",t);break;case"iframe":case"object":be("load",t);break;case"video":case"audio":for(c=0;c<_a.length;c++)be(_a[c],t);break;case"image":be("error",t),be("load",t);break;case"details":be("toggle",t);break;case"embed":case"source":case"link":be("error",t),be("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(z in l)if(l.hasOwnProperty(z)&&(c=l[z],c!=null))switch(z){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:je(t,s,z,c,l,null)}return;default:if(eu(s)){for(G in l)l.hasOwnProperty(G)&&(c=l[G],c!==void 0&&$f(t,s,G,c,l,void 0));return}}for(T in l)l.hasOwnProperty(T)&&(c=l[T],c!=null&&je(t,s,T,c,l,null))}function B1(t,s,l,c){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,p=null,v=null,T=null,N=null,z=null,G=null;for(B in l){var F=l[B];if(l.hasOwnProperty(B)&&F!=null)switch(B){case"checked":break;case"value":break;case"defaultValue":N=F;default:c.hasOwnProperty(B)||je(t,s,B,null,c,F)}}for(var U in c){var B=c[U];if(F=l[U],c.hasOwnProperty(U)&&(B!=null||F!=null))switch(U){case"type":p=B;break;case"name":h=B;break;case"checked":z=B;break;case"defaultChecked":G=B;break;case"value":v=B;break;case"defaultValue":T=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(r(137,s));break;default:B!==F&&je(t,s,U,B,c,F)}}Zc(t,v,T,N,z,G,p,h);return;case"select":B=v=T=U=null;for(p in l)if(N=l[p],l.hasOwnProperty(p)&&N!=null)switch(p){case"value":break;case"multiple":B=N;default:c.hasOwnProperty(p)||je(t,s,p,null,c,N)}for(h in c)if(p=c[h],N=l[h],c.hasOwnProperty(h)&&(p!=null||N!=null))switch(h){case"value":U=p;break;case"defaultValue":T=p;break;case"multiple":v=p;default:p!==N&&je(t,s,h,p,c,N)}s=T,l=v,c=B,U!=null?ks(t,!!l,U,!1):!!c!=!!l&&(s!=null?ks(t,!!l,s,!0):ks(t,!!l,l?[]:"",!1));return;case"textarea":B=U=null;for(T in l)if(h=l[T],l.hasOwnProperty(T)&&h!=null&&!c.hasOwnProperty(T))switch(T){case"value":break;case"children":break;default:je(t,s,T,null,c,h)}for(v in c)if(h=c[v],p=l[v],c.hasOwnProperty(v)&&(h!=null||p!=null))switch(v){case"value":U=h;break;case"defaultValue":B=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(r(91));break;default:h!==p&&je(t,s,v,h,c,p)}hp(t,U,B);return;case"option":for(var ne in l)if(U=l[ne],l.hasOwnProperty(ne)&&U!=null&&!c.hasOwnProperty(ne))switch(ne){case"selected":t.selected=!1;break;default:je(t,s,ne,null,c,U)}for(N in c)if(U=c[N],B=l[N],c.hasOwnProperty(N)&&U!==B&&(U!=null||B!=null))switch(N){case"selected":t.selected=U&&typeof U!="function"&&typeof U!="symbol";break;default:je(t,s,N,U,c,B)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var oe in l)U=l[oe],l.hasOwnProperty(oe)&&U!=null&&!c.hasOwnProperty(oe)&&je(t,s,oe,null,c,U);for(z in c)if(U=c[z],B=l[z],c.hasOwnProperty(z)&&U!==B&&(U!=null||B!=null))switch(z){case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(r(137,s));break;default:je(t,s,z,U,c,B)}return;default:if(eu(s)){for(var Le in l)U=l[Le],l.hasOwnProperty(Le)&&U!==void 0&&!c.hasOwnProperty(Le)&&$f(t,s,Le,void 0,c,U);for(G in c)U=c[G],B=l[G],!c.hasOwnProperty(G)||U===B||U===void 0&&B===void 0||$f(t,s,G,U,c,B);return}}for(var L in l)U=l[L],l.hasOwnProperty(L)&&U!=null&&!c.hasOwnProperty(L)&&je(t,s,L,null,c,U);for(F in c)U=c[F],B=l[F],!c.hasOwnProperty(F)||U===B||U==null&&B==null||je(t,s,F,U,c,B)}function my(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function q1(){if(typeof performance.getEntriesByType=="function"){for(var t=0,s=0,l=performance.getEntriesByType("resource"),c=0;c<l.length;c++){var h=l[c],p=h.transferSize,v=h.initiatorType,T=h.duration;if(p&&T&&my(v)){for(v=0,T=h.responseEnd,c+=1;c<l.length;c++){var N=l[c],z=N.startTime;if(z>T)break;var G=N.transferSize,F=N.initiatorType;G&&my(F)&&(N=N.responseEnd,v+=G*(N<T?1:(T-z)/(N-z)))}if(--c,s+=8*(p+v)/(h.duration/1e3),t++,10<t)break}}if(0<t)return s/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var If=null,Vf=null;function wo(t){return t.nodeType===9?t:t.ownerDocument}function yy(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function by(t,s){if(t===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&s==="foreignObject"?0:t}function Gf(t,s){return t==="textarea"||t==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Kf=null;function $1(){var t=window.event;return t&&t.type==="popstate"?t===Kf?!1:(Kf=t,!0):(Kf=null,!1)}var vy=typeof setTimeout=="function"?setTimeout:void 0,I1=typeof clearTimeout=="function"?clearTimeout:void 0,Sy=typeof Promise=="function"?Promise:void 0,V1=typeof queueMicrotask=="function"?queueMicrotask:typeof Sy<"u"?function(t){return Sy.resolve(null).then(t).catch(G1)}:vy;function G1(t){setTimeout(function(){throw t})}function Ti(t){return t==="head"}function wy(t,s){var l=s,c=0;do{var h=l.nextSibling;if(t.removeChild(l),h&&h.nodeType===8)if(l=h.data,l==="/$"||l==="/&"){if(c===0){t.removeChild(h),lr(s);return}c--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")c++;else if(l==="html")Ta(t.ownerDocument.documentElement);else if(l==="head"){l=t.ownerDocument.head,Ta(l);for(var p=l.firstChild;p;){var v=p.nextSibling,T=p.nodeName;p[Vr]||T==="SCRIPT"||T==="STYLE"||T==="LINK"&&p.rel.toLowerCase()==="stylesheet"||l.removeChild(p),p=v}}else l==="body"&&Ta(t.ownerDocument.body);l=h}while(l);lr(s)}function xy(t,s){var l=t;t=0;do{var c=l.nextSibling;if(l.nodeType===1?s?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(s?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),c&&c.nodeType===8)if(l=c.data,l==="/$"){if(t===0)break;t--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||t++;l=c}while(l)}function Xf(t){var s=t.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var l=s;switch(s=s.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Xf(l),Pc(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}t.removeChild(l)}}function K1(t,s,l,c){for(;t.nodeType===1;){var h=l;if(t.nodeName.toLowerCase()!==s.toLowerCase()){if(!c&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(c){if(!t[Vr])switch(s){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(p=t.getAttribute("rel"),p==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(p!==h.rel||t.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||t.getAttribute("title")!==(h.title==null?null:h.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(p=t.getAttribute("src"),(p!==(h.src==null?null:h.src)||t.getAttribute("type")!==(h.type==null?null:h.type)||t.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&p&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(s==="input"&&t.type==="hidden"){var p=h.name==null?null:""+h.name;if(h.type==="hidden"&&t.getAttribute("name")===p)return t}else return t;if(t=dn(t.nextSibling),t===null)break}return null}function X1(t,s,l){if(s==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!l||(t=dn(t.nextSibling),t===null))return null;return t}function _y(t,s){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!s||(t=dn(t.nextSibling),t===null))return null;return t}function Yf(t){return t.data==="$?"||t.data==="$~"}function Ff(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function Y1(t,s){var l=t.ownerDocument;if(t.data==="$~")t._reactRetry=s;else if(t.data!=="$?"||l.readyState!=="loading")s();else{var c=function(){s(),l.removeEventListener("DOMContentLoaded",c)};l.addEventListener("DOMContentLoaded",c),t._reactRetry=c}}function dn(t){for(;t!=null;t=t.nextSibling){var s=t.nodeType;if(s===1||s===3)break;if(s===8){if(s=t.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return t}var Qf=null;function Ey(t){t=t.nextSibling;for(var s=0;t;){if(t.nodeType===8){var l=t.data;if(l==="/$"||l==="/&"){if(s===0)return dn(t.nextSibling);s--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||s++}t=t.nextSibling}return null}function Ty(t){t=t.previousSibling;for(var s=0;t;){if(t.nodeType===8){var l=t.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(s===0)return t;s--}else l!=="/$"&&l!=="/&"||s++}t=t.previousSibling}return null}function Ay(t,s,l){switch(s=wo(l),t){case"html":if(t=s.documentElement,!t)throw Error(r(452));return t;case"head":if(t=s.head,!t)throw Error(r(453));return t;case"body":if(t=s.body,!t)throw Error(r(454));return t;default:throw Error(r(451))}}function Ta(t){for(var s=t.attributes;s.length;)t.removeAttributeNode(s[0]);Pc(t)}var pn=new Map,Cy=new Set;function xo(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var Zn=Z.d;Z.d={f:F1,r:Q1,D:P1,C:J1,L:Z1,m:W1,X:tx,S:ex,M:nx};function F1(){var t=Zn.f(),s=ho();return t||s}function Q1(t){var s=As(t);s!==null&&s.tag===5&&s.type==="form"?Gg(s):Zn.r(t)}var sr=typeof document>"u"?null:document;function Ny(t,s,l){var c=sr;if(c&&typeof s=="string"&&s){var h=an(s);h='link[rel="'+t+'"][href="'+h+'"]',typeof l=="string"&&(h+='[crossorigin="'+l+'"]'),Cy.has(h)||(Cy.add(h),t={rel:t,crossOrigin:l,href:s},c.querySelector(h)===null&&(s=c.createElement("link"),xt(s,"link",t),gt(s),c.head.appendChild(s)))}}function P1(t){Zn.D(t),Ny("dns-prefetch",t,null)}function J1(t,s){Zn.C(t,s),Ny("preconnect",t,s)}function Z1(t,s,l){Zn.L(t,s,l);var c=sr;if(c&&t&&s){var h='link[rel="preload"][as="'+an(s)+'"]';s==="image"&&l&&l.imageSrcSet?(h+='[imagesrcset="'+an(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(h+='[imagesizes="'+an(l.imageSizes)+'"]')):h+='[href="'+an(t)+'"]';var p=h;switch(s){case"style":p=rr(t);break;case"script":p=ar(t)}pn.has(p)||(t=y({rel:"preload",href:s==="image"&&l&&l.imageSrcSet?void 0:t,as:s},l),pn.set(p,t),c.querySelector(h)!==null||s==="style"&&c.querySelector(Aa(p))||s==="script"&&c.querySelector(Ca(p))||(s=c.createElement("link"),xt(s,"link",t),gt(s),c.head.appendChild(s)))}}function W1(t,s){Zn.m(t,s);var l=sr;if(l&&t){var c=s&&typeof s.as=="string"?s.as:"script",h='link[rel="modulepreload"][as="'+an(c)+'"][href="'+an(t)+'"]',p=h;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":p=ar(t)}if(!pn.has(p)&&(t=y({rel:"modulepreload",href:t},s),pn.set(p,t),l.querySelector(h)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Ca(p)))return}c=l.createElement("link"),xt(c,"link",t),gt(c),l.head.appendChild(c)}}}function ex(t,s,l){Zn.S(t,s,l);var c=sr;if(c&&t){var h=Cs(c).hoistableStyles,p=rr(t);s=s||"default";var v=h.get(p);if(!v){var T={loading:0,preload:null};if(v=c.querySelector(Aa(p)))T.loading=5;else{t=y({rel:"stylesheet",href:t,"data-precedence":s},l),(l=pn.get(p))&&Pf(t,l);var N=v=c.createElement("link");gt(N),xt(N,"link",t),N._p=new Promise(function(z,G){N.onload=z,N.onerror=G}),N.addEventListener("load",function(){T.loading|=1}),N.addEventListener("error",function(){T.loading|=2}),T.loading|=4,_o(v,s,c)}v={type:"stylesheet",instance:v,count:1,state:T},h.set(p,v)}}}function tx(t,s){Zn.X(t,s);var l=sr;if(l&&t){var c=Cs(l).hoistableScripts,h=ar(t),p=c.get(h);p||(p=l.querySelector(Ca(h)),p||(t=y({src:t,async:!0},s),(s=pn.get(h))&&Jf(t,s),p=l.createElement("script"),gt(p),xt(p,"link",t),l.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},c.set(h,p))}}function nx(t,s){Zn.M(t,s);var l=sr;if(l&&t){var c=Cs(l).hoistableScripts,h=ar(t),p=c.get(h);p||(p=l.querySelector(Ca(h)),p||(t=y({src:t,async:!0,type:"module"},s),(s=pn.get(h))&&Jf(t,s),p=l.createElement("script"),gt(p),xt(p,"link",t),l.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},c.set(h,p))}}function ky(t,s,l,c){var h=(h=se.current)?xo(h):null;if(!h)throw Error(r(446));switch(t){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(s=rr(l.href),l=Cs(h).hoistableStyles,c=l.get(s),c||(c={type:"style",instance:null,count:0,state:null},l.set(s,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){t=rr(l.href);var p=Cs(h).hoistableStyles,v=p.get(t);if(v||(h=h.ownerDocument||h,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},p.set(t,v),(p=h.querySelector(Aa(t)))&&!p._p&&(v.instance=p,v.state.loading=5),pn.has(t)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},pn.set(t,l),p||ix(h,t,l,v.state))),s&&c===null)throw Error(r(528,""));return v}if(s&&c!==null)throw Error(r(529,""));return null;case"script":return s=l.async,l=l.src,typeof l=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=ar(l),l=Cs(h).hoistableScripts,c=l.get(s),c||(c={type:"script",instance:null,count:0,state:null},l.set(s,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,t))}}function rr(t){return'href="'+an(t)+'"'}function Aa(t){return'link[rel="stylesheet"]['+t+"]"}function My(t){return y({},t,{"data-precedence":t.precedence,precedence:null})}function ix(t,s,l,c){t.querySelector('link[rel="preload"][as="style"]['+s+"]")?c.loading=1:(s=t.createElement("link"),c.preload=s,s.addEventListener("load",function(){return c.loading|=1}),s.addEventListener("error",function(){return c.loading|=2}),xt(s,"link",l),gt(s),t.head.appendChild(s))}function ar(t){return'[src="'+an(t)+'"]'}function Ca(t){return"script[async]"+t}function Oy(t,s,l){if(s.count++,s.instance===null)switch(s.type){case"style":var c=t.querySelector('style[data-href~="'+an(l.href)+'"]');if(c)return s.instance=c,gt(c),c;var h=y({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return c=(t.ownerDocument||t).createElement("style"),gt(c),xt(c,"style",h),_o(c,l.precedence,t),s.instance=c;case"stylesheet":h=rr(l.href);var p=t.querySelector(Aa(h));if(p)return s.state.loading|=4,s.instance=p,gt(p),p;c=My(l),(h=pn.get(h))&&Pf(c,h),p=(t.ownerDocument||t).createElement("link"),gt(p);var v=p;return v._p=new Promise(function(T,N){v.onload=T,v.onerror=N}),xt(p,"link",c),s.state.loading|=4,_o(p,l.precedence,t),s.instance=p;case"script":return p=ar(l.src),(h=t.querySelector(Ca(p)))?(s.instance=h,gt(h),h):(c=l,(h=pn.get(p))&&(c=y({},l),Jf(c,h)),t=t.ownerDocument||t,h=t.createElement("script"),gt(h),xt(h,"link",c),t.head.appendChild(h),s.instance=h);case"void":return null;default:throw Error(r(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(c=s.instance,s.state.loading|=4,_o(c,l.precedence,t));return s.instance}function _o(t,s,l){for(var c=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=c.length?c[c.length-1]:null,p=h,v=0;v<c.length;v++){var T=c[v];if(T.dataset.precedence===s)p=T;else if(p!==h)break}p?p.parentNode.insertBefore(t,p.nextSibling):(s=l.nodeType===9?l.head:l,s.insertBefore(t,s.firstChild))}function Pf(t,s){t.crossOrigin==null&&(t.crossOrigin=s.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=s.referrerPolicy),t.title==null&&(t.title=s.title)}function Jf(t,s){t.crossOrigin==null&&(t.crossOrigin=s.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=s.referrerPolicy),t.integrity==null&&(t.integrity=s.integrity)}var Eo=null;function jy(t,s,l){if(Eo===null){var c=new Map,h=Eo=new Map;h.set(l,c)}else h=Eo,c=h.get(l),c||(c=new Map,h.set(l,c));if(c.has(t))return c;for(c.set(t,null),l=l.getElementsByTagName(t),h=0;h<l.length;h++){var p=l[h];if(!(p[Vr]||p[bt]||t==="link"&&p.getAttribute("rel")==="stylesheet")&&p.namespaceURI!=="http://www.w3.org/2000/svg"){var v=p.getAttribute(s)||"";v=t+v;var T=c.get(v);T?T.push(p):c.set(v,[p])}}return c}function Ly(t,s,l){t=t.ownerDocument||t,t.head.insertBefore(l,s==="title"?t.querySelector("head > title"):null)}function sx(t,s,l){if(l===1||s.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;switch(s.rel){case"stylesheet":return t=s.disabled,typeof s.precedence=="string"&&t==null;default:return!0}case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function Ry(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function rx(t,s,l,c){if(l.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var h=rr(c.href),p=s.querySelector(Aa(h));if(p){s=p._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(t.count++,t=To.bind(t),s.then(t,t)),l.state.loading|=4,l.instance=p,gt(p);return}p=s.ownerDocument||s,c=My(c),(h=pn.get(h))&&Pf(c,h),p=p.createElement("link"),gt(p);var v=p;v._p=new Promise(function(T,N){v.onload=T,v.onerror=N}),xt(p,"link",c),l.instance=p}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(l,s),(s=l.state.preload)&&(l.state.loading&3)===0&&(t.count++,l=To.bind(t),s.addEventListener("load",l),s.addEventListener("error",l))}}var Zf=0;function ax(t,s){return t.stylesheets&&t.count===0&&Co(t,t.stylesheets),0<t.count||0<t.imgCount?function(l){var c=setTimeout(function(){if(t.stylesheets&&Co(t,t.stylesheets),t.unsuspend){var p=t.unsuspend;t.unsuspend=null,p()}},6e4+s);0<t.imgBytes&&Zf===0&&(Zf=62500*q1());var h=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Co(t,t.stylesheets),t.unsuspend)){var p=t.unsuspend;t.unsuspend=null,p()}},(t.imgBytes>Zf?50:800)+s);return t.unsuspend=l,function(){t.unsuspend=null,clearTimeout(c),clearTimeout(h)}}:null}function To(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Co(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Ao=null;function Co(t,s){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Ao=new Map,s.forEach(lx,t),Ao=null,To.call(t))}function lx(t,s){if(!(s.state.loading&4)){var l=Ao.get(t);if(l)var c=l.get(null);else{l=new Map,Ao.set(t,l);for(var h=t.querySelectorAll("link[data-precedence],style[data-precedence]"),p=0;p<h.length;p++){var v=h[p];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(l.set(v.dataset.precedence,v),c=v)}c&&l.set(null,c)}h=s.instance,v=h.getAttribute("data-precedence"),p=l.get(v)||c,p===c&&l.set(null,h),l.set(v,h),this.count++,c=To.bind(this),h.addEventListener("load",c),h.addEventListener("error",c),p?p.parentNode.insertBefore(h,p.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(h,t.firstChild)),s.state.loading|=4}}var Na={$$typeof:H,Provider:null,Consumer:null,_currentValue:re,_currentValue2:re,_threadCount:0};function ox(t,s,l,c,h,p,v,T,N){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Xc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xc(0),this.hiddenUpdates=Xc(null),this.identifierPrefix=c,this.onUncaughtError=h,this.onCaughtError=p,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=N,this.incompleteTransitions=new Map}function Dy(t,s,l,c,h,p,v,T,N,z,G,F){return t=new ox(t,s,l,v,N,z,G,F,T),s=1,p===!0&&(s|=24),p=Pt(3,null,null,s),t.current=p,p.stateNode=t,s=Mu(),s.refCount++,t.pooledCache=s,s.refCount++,p.memoizedState={element:c,isDehydrated:l,cache:s},Ru(p),t}function zy(t){return t?(t=Us,t):Us}function Uy(t,s,l,c,h,p){h=zy(h),c.context===null?c.context=h:c.pendingContext=h,c=pi(s),c.payload={element:l},p=p===void 0?null:p,p!==null&&(c.callback=p),l=gi(t,c,s),l!==null&&(Bt(l,t,s),aa(l,t,s))}function Hy(t,s){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var l=t.retryLane;t.retryLane=l!==0&&l<s?l:s}}function Wf(t,s){Hy(t,s),(t=t.alternate)&&Hy(t,s)}function By(t){if(t.tag===13||t.tag===31){var s=Ki(t,67108864);s!==null&&Bt(s,t,67108864),Wf(t,67108864)}}function qy(t){if(t.tag===13||t.tag===31){var s=tn();s=Yc(s);var l=Ki(t,s);l!==null&&Bt(l,t,s),Wf(t,s)}}var No=!0;function cx(t,s,l,c){var h=q.T;q.T=null;var p=Z.p;try{Z.p=2,eh(t,s,l,c)}finally{Z.p=p,q.T=h}}function ux(t,s,l,c){var h=q.T;q.T=null;var p=Z.p;try{Z.p=8,eh(t,s,l,c)}finally{Z.p=p,q.T=h}}function eh(t,s,l,c){if(No){var h=th(c);if(h===null)qf(t,s,c,ko,l),Iy(t,c);else if(hx(h,t,s,l,c))c.stopPropagation();else if(Iy(t,c),s&4&&-1<fx.indexOf(t)){for(;h!==null;){var p=As(h);if(p!==null)switch(p.tag){case 3:if(p=p.stateNode,p.current.memoizedState.isDehydrated){var v=qi(p.pendingLanes);if(v!==0){var T=p;for(T.pendingLanes|=2,T.entangledLanes|=2;v;){var N=1<<31-kt(v);T.entanglements[1]|=N,v&=~N}kn(p),(Ce&6)===0&&(uo=it()+500,xa(0))}}break;case 31:case 13:T=Ki(p,2),T!==null&&Bt(T,p,2),ho(),Wf(p,2)}if(p=th(c),p===null&&qf(t,s,c,ko,l),p===h)break;h=p}h!==null&&c.stopPropagation()}else qf(t,s,c,null,l)}}function th(t){return t=nu(t),nh(t)}var ko=null;function nh(t){if(ko=null,t=Ts(t),t!==null){var s=o(t);if(s===null)t=null;else{var l=s.tag;if(l===13){if(t=u(s),t!==null)return t;t=null}else if(l===31){if(t=f(s),t!==null)return t;t=null}else if(l===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;t=null}else s!==t&&(t=null)}}return ko=t,null}function $y(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch($c()){case yl:return 2;case bl:return 8;case xs:case vl:return 32;case _s:return 268435456;default:return 32}default:return 32}}var ih=!1,Ai=null,Ci=null,Ni=null,ka=new Map,Ma=new Map,ki=[],fx="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Iy(t,s){switch(t){case"focusin":case"focusout":Ai=null;break;case"dragenter":case"dragleave":Ci=null;break;case"mouseover":case"mouseout":Ni=null;break;case"pointerover":case"pointerout":ka.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ma.delete(s.pointerId)}}function Oa(t,s,l,c,h,p){return t===null||t.nativeEvent!==p?(t={blockedOn:s,domEventName:l,eventSystemFlags:c,nativeEvent:p,targetContainers:[h]},s!==null&&(s=As(s),s!==null&&By(s)),t):(t.eventSystemFlags|=c,s=t.targetContainers,h!==null&&s.indexOf(h)===-1&&s.push(h),t)}function hx(t,s,l,c,h){switch(s){case"focusin":return Ai=Oa(Ai,t,s,l,c,h),!0;case"dragenter":return Ci=Oa(Ci,t,s,l,c,h),!0;case"mouseover":return Ni=Oa(Ni,t,s,l,c,h),!0;case"pointerover":var p=h.pointerId;return ka.set(p,Oa(ka.get(p)||null,t,s,l,c,h)),!0;case"gotpointercapture":return p=h.pointerId,Ma.set(p,Oa(Ma.get(p)||null,t,s,l,c,h)),!0}return!1}function Vy(t){var s=Ts(t.target);if(s!==null){var l=o(s);if(l!==null){if(s=l.tag,s===13){if(s=u(l),s!==null){t.blockedOn=s,ip(t.priority,function(){qy(l)});return}}else if(s===31){if(s=f(l),s!==null){t.blockedOn=s,ip(t.priority,function(){qy(l)});return}}else if(s===3&&l.stateNode.current.memoizedState.isDehydrated){t.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Mo(t){if(t.blockedOn!==null)return!1;for(var s=t.targetContainers;0<s.length;){var l=th(t.nativeEvent);if(l===null){l=t.nativeEvent;var c=new l.constructor(l.type,l);tu=c,l.target.dispatchEvent(c),tu=null}else return s=As(l),s!==null&&By(s),t.blockedOn=l,!1;s.shift()}return!0}function Gy(t,s,l){Mo(t)&&l.delete(s)}function dx(){ih=!1,Ai!==null&&Mo(Ai)&&(Ai=null),Ci!==null&&Mo(Ci)&&(Ci=null),Ni!==null&&Mo(Ni)&&(Ni=null),ka.forEach(Gy),Ma.forEach(Gy)}function Oo(t,s){t.blockedOn===s&&(t.blockedOn=null,ih||(ih=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,dx)))}var jo=null;function Ky(t){jo!==t&&(jo=t,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){jo===t&&(jo=null);for(var s=0;s<t.length;s+=3){var l=t[s],c=t[s+1],h=t[s+2];if(typeof c!="function"){if(nh(c||l)===null)continue;break}var p=As(l);p!==null&&(t.splice(s,3),s-=3,ef(p,{pending:!0,data:h,method:l.method,action:c},c,h))}}))}function lr(t){function s(N){return Oo(N,t)}Ai!==null&&Oo(Ai,t),Ci!==null&&Oo(Ci,t),Ni!==null&&Oo(Ni,t),ka.forEach(s),Ma.forEach(s);for(var l=0;l<ki.length;l++){var c=ki[l];c.blockedOn===t&&(c.blockedOn=null)}for(;0<ki.length&&(l=ki[0],l.blockedOn===null);)Vy(l),l.blockedOn===null&&ki.shift();if(l=(t.ownerDocument||t).$$reactFormReplay,l!=null)for(c=0;c<l.length;c+=3){var h=l[c],p=l[c+1],v=h[Lt]||null;if(typeof p=="function")v||Ky(l);else if(v){var T=null;if(p&&p.hasAttribute("formAction")){if(h=p,v=p[Lt]||null)T=v.formAction;else if(nh(h)!==null)continue}else T=v.action;typeof T=="function"?l[c+1]=T:(l.splice(c,3),c-=3),Ky(l)}}}function Xy(){function t(p){p.canIntercept&&p.info==="react-transition"&&p.intercept({handler:function(){return new Promise(function(v){return h=v})},focusReset:"manual",scroll:"manual"})}function s(){h!==null&&(h(),h=null),c||setTimeout(l,20)}function l(){if(!c&&!navigation.transition){var p=navigation.currentEntry;p&&p.url!=null&&navigation.navigate(p.url,{state:p.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,h=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(l,100),function(){c=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),h!==null&&(h(),h=null)}}}function sh(t){this._internalRoot=t}Lo.prototype.render=sh.prototype.render=function(t){var s=this._internalRoot;if(s===null)throw Error(r(409));var l=s.current,c=tn();Uy(l,c,t,s,null,null)},Lo.prototype.unmount=sh.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var s=t.containerInfo;Uy(t.current,2,null,t,null,null),ho(),s[Es]=null}};function Lo(t){this._internalRoot=t}Lo.prototype.unstable_scheduleHydration=function(t){if(t){var s=np();t={blockedOn:null,target:t,priority:s};for(var l=0;l<ki.length&&s!==0&&s<ki[l].priority;l++);ki.splice(l,0,t),l===0&&Vy(t)}};var Yy=e.version;if(Yy!=="19.2.1")throw Error(r(527,Yy,"19.2.1"));Z.findDOMNode=function(t){var s=t._reactInternals;if(s===void 0)throw typeof t.render=="function"?Error(r(188)):(t=Object.keys(t).join(","),Error(r(268,t)));return t=g(s),t=t!==null?m(t):null,t=t===null?null:t.stateNode,t};var px={bundleType:0,version:"19.2.1",rendererPackageName:"react-dom",currentDispatcherRef:q,reconcilerVersion:"19.2.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ro=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ro.isDisabled&&Ro.supportsFiber)try{Bi=Ro.inject(px),ft=Ro}catch{}}return La.createRoot=function(t,s){if(!a(t))throw Error(r(299));var l=!1,c="",h=em,p=tm,v=nm;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(c=s.identifierPrefix),s.onUncaughtError!==void 0&&(h=s.onUncaughtError),s.onCaughtError!==void 0&&(p=s.onCaughtError),s.onRecoverableError!==void 0&&(v=s.onRecoverableError)),s=Dy(t,1,!1,null,null,l,c,null,h,p,v,Xy),t[Es]=s.current,Bf(t),new sh(s)},La.hydrateRoot=function(t,s,l){if(!a(t))throw Error(r(299));var c=!1,h="",p=em,v=tm,T=nm,N=null;return l!=null&&(l.unstable_strictMode===!0&&(c=!0),l.identifierPrefix!==void 0&&(h=l.identifierPrefix),l.onUncaughtError!==void 0&&(p=l.onUncaughtError),l.onCaughtError!==void 0&&(v=l.onCaughtError),l.onRecoverableError!==void 0&&(T=l.onRecoverableError),l.formState!==void 0&&(N=l.formState)),s=Dy(t,1,!0,s,l??null,c,h,N,p,v,T,Xy),s.context=zy(null),l=s.current,c=tn(),c=Yc(c),h=pi(c),h.callback=null,gi(l,h,c),l=c,s.current.lanes=l,Ir(s,l),kn(s),t[Es]=s.current,Bf(t),new Lo(s)},La.version="19.2.1",La}var rb;function Lx(){if(rb)return lh.exports;rb=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),lh.exports=jx(),lh.exports}var I2=Lx();const Rx=new Map([["Android.devices",{internal:!0}],["AndroidSocket.write",{internal:!0}],["AndroidSocket.close",{internal:!0}],["AndroidDevice.wait",{title:"Wait"}],["AndroidDevice.fill",{title:'Fill "{text}"'}],["AndroidDevice.tap",{title:"Tap"}],["AndroidDevice.drag",{title:"Drag"}],["AndroidDevice.fling",{title:"Fling"}],["AndroidDevice.longTap",{title:"Long tap"}],["AndroidDevice.pinchClose",{title:"Pinch close"}],["AndroidDevice.pinchOpen",{title:"Pinch open"}],["AndroidDevice.scroll",{title:"Scroll"}],["AndroidDevice.swipe",{title:"Swipe"}],["AndroidDevice.info",{internal:!0}],["AndroidDevice.screenshot",{title:"Screenshot"}],["AndroidDevice.inputType",{title:"Type"}],["AndroidDevice.inputPress",{title:"Press"}],["AndroidDevice.inputTap",{title:"Tap"}],["AndroidDevice.inputSwipe",{title:"Swipe"}],["AndroidDevice.inputDrag",{title:"Drag"}],["AndroidDevice.launchBrowser",{title:"Launch browser"}],["AndroidDevice.open",{title:"Open app"}],["AndroidDevice.shell",{title:"Execute shell command",group:"configuration"}],["AndroidDevice.installApk",{title:"Install apk"}],["AndroidDevice.push",{title:"Push"}],["AndroidDevice.connectToWebView",{title:"Connect to Web View"}],["AndroidDevice.close",{internal:!0}],["APIRequestContext.fetch",{title:'{method} "{url}"'}],["APIRequestContext.fetchResponseBody",{title:"Get response body",group:"getter"}],["APIRequestContext.fetchLog",{internal:!0}],["APIRequestContext.storageState",{title:"Get storage state",group:"configuration"}],["APIRequestContext.disposeAPIResponse",{internal:!0}],["APIRequestContext.dispose",{internal:!0,potentiallyClosesScope:!0}],["Artifact.pathAfterFinished",{internal:!0}],["Artifact.saveAs",{internal:!0}],["Artifact.saveAsStream",{internal:!0}],["Artifact.failure",{internal:!0}],["Artifact.stream",{internal:!0}],["Artifact.cancel",{internal:!0}],["Artifact.delete",{internal:!0,potentiallyClosesScope:!0}],["Stream.read",{internal:!0}],["Stream.close",{internal:!0}],["WritableStream.write",{internal:!0}],["WritableStream.close",{internal:!0}],["Browser.startServer",{title:"Start server"}],["Browser.stopServer",{title:"Stop server"}],["Browser.close",{title:"Close browser",pause:!0,potentiallyClosesScope:!0}],["Browser.killForTests",{internal:!0,potentiallyClosesScope:!0}],["Browser.defaultUserAgentForTest",{internal:!0}],["Browser.newContext",{title:"Create context"}],["Browser.newContextForReuse",{internal:!0}],["Browser.disconnectFromReusedContext",{internal:!0}],["Browser.newBrowserCDPSession",{title:"Create CDP session",group:"configuration"}],["Browser.startTracing",{title:"Start browser tracing",group:"configuration"}],["Browser.stopTracing",{title:"Stop browser tracing",group:"configuration"}],["BrowserContext.addCookies",{title:"Add cookies",group:"configuration"}],["BrowserContext.addInitScript",{title:"Add init script",group:"configuration"}],["BrowserContext.clearCookies",{title:"Clear cookies",group:"configuration"}],["BrowserContext.clearPermissions",{title:"Clear permissions",group:"configuration"}],["BrowserContext.close",{title:"Close context",pause:!0,potentiallyClosesScope:!0}],["BrowserContext.cookies",{title:"Get cookies",group:"getter"}],["BrowserContext.exposeBinding",{title:"Expose binding",group:"configuration"}],["BrowserContext.grantPermissions",{title:"Grant permissions",group:"configuration"}],["BrowserContext.newPage",{title:"Create page"}],["BrowserContext.registerSelectorEngine",{internal:!0}],["BrowserContext.setTestIdAttributeName",{internal:!0}],["BrowserContext.setExtraHTTPHeaders",{title:"Set extra HTTP headers",group:"configuration"}],["BrowserContext.setGeolocation",{title:"Set geolocation",group:"configuration"}],["BrowserContext.setHTTPCredentials",{title:"Set HTTP credentials",group:"configuration"}],["BrowserContext.setNetworkInterceptionPatterns",{title:"Route requests",group:"route"}],["BrowserContext.setWebSocketInterceptionPatterns",{title:"Route WebSockets",group:"route"}],["BrowserContext.setOffline",{title:"Set offline mode"}],["BrowserContext.storageState",{title:"Get storage state",group:"configuration"}],["BrowserContext.setStorageState",{title:"Set storage state",group:"configuration"}],["BrowserContext.pause",{title:"Pause"}],["BrowserContext.enableRecorder",{internal:!0}],["BrowserContext.disableRecorder",{internal:!0}],["BrowserContext.exposeConsoleApi",{internal:!0}],["BrowserContext.newCDPSession",{title:"Create CDP session",group:"configuration"}],["BrowserContext.createTempFiles",{internal:!0}],["BrowserContext.updateSubscription",{internal:!0}],["BrowserContext.clockFastForward",{title:'Fast forward clock "{ticksNumber|ticksString}"'}],["BrowserContext.clockInstall",{title:'Install clock "{timeNumber|timeString}"'}],["BrowserContext.clockPauseAt",{title:'Pause clock "{timeNumber|timeString}"'}],["BrowserContext.clockResume",{title:"Resume clock"}],["BrowserContext.clockRunFor",{title:'Run clock "{ticksNumber|ticksString}"'}],["BrowserContext.clockSetFixedTime",{title:'Set fixed time "{timeNumber|timeString}"'}],["BrowserContext.clockSetSystemTime",{title:'Set system time "{timeNumber|timeString}"'}],["BrowserContext.credentialsInstall",{title:"Install virtual WebAuthn authenticator",group:"configuration"}],["BrowserContext.credentialsCreate",{title:'Create virtual credential for "{rpId}"',group:"configuration"}],["BrowserContext.credentialsGet",{title:"Get virtual credentials",group:"configuration"}],["BrowserContext.credentialsDelete",{title:"Delete virtual credential",group:"configuration"}],["BrowserType.launch",{title:"Launch browser"}],["BrowserType.launchPersistentContext",{title:"Launch persistent context"}],["BrowserType.connectOverCDP",{title:"Connect over CDP"}],["BrowserType.connectToWorker",{title:"Connect to worker"}],["Disposable.dispose",{internal:!0,potentiallyClosesScope:!0}],["Electron.launch",{title:"Launch electron"}],["ElectronApplication.browserWindow",{internal:!0}],["ElectronApplication.evaluateExpression",{title:"Evaluate"}],["ElectronApplication.evaluateExpressionHandle",{title:"Evaluate"}],["ElectronApplication.updateSubscription",{internal:!0}],["Frame.evalOnSelector",{title:"Evaluate",snapshot:!0,pause:!0}],["Frame.evalOnSelectorAll",{title:"Evaluate",snapshot:!0,pause:!0}],["Frame.addScriptTag",{title:"Add script tag",snapshot:!0,pause:!0}],["Frame.addStyleTag",{title:"Add style tag",snapshot:!0,pause:!0}],["Frame.ariaSnapshot",{title:"Aria snapshot",group:"getter"}],["Frame.blur",{title:"Blur",slowMo:!0,snapshot:!0,pause:!0}],["Frame.check",{title:"Check",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["Frame.click",{title:"Click",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0,potentiallyClosesScope:!0}],["Frame.content",{title:"Get content",snapshot:!0,pause:!0}],["Frame.dragAndDrop",{title:"Drag and drop",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["Frame.drop",{title:"Drop files or data onto an element",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["Frame.dblclick",{title:"Double click",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["Frame.dispatchEvent",{title:'Dispatch "{type}"',slowMo:!0,snapshot:!0,pause:!0}],["Frame.evaluateExpression",{title:"Evaluate",snapshot:!0,pause:!0}],["Frame.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0,pause:!0}],["Frame.fill",{title:'Fill "{value}"',slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["Frame.focus",{title:"Focus",slowMo:!0,snapshot:!0,pause:!0}],["Frame.frameElement",{title:"Get frame element",group:"getter"}],["Frame.resolveSelector",{internal:!0}],["Frame.highlight",{internal:!0}],["Frame.hideHighlight",{internal:!0}],["Frame.getAttribute",{title:'Get attribute "{name}"',snapshot:!0,pause:!0,group:"getter"}],["Frame.goto",{title:'Navigate to "{url}"',slowMo:!0,snapshot:!0,pause:!0}],["Frame.hover",{title:"Hover",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["Frame.innerHTML",{title:"Get HTML",snapshot:!0,pause:!0,group:"getter"}],["Frame.innerText",{title:"Get inner text",snapshot:!0,pause:!0,group:"getter"}],["Frame.inputValue",{title:"Get input value",snapshot:!0,pause:!0,group:"getter"}],["Frame.isChecked",{title:"Is checked",snapshot:!0,pause:!0,group:"getter"}],["Frame.isDisabled",{title:"Is disabled",snapshot:!0,pause:!0,group:"getter"}],["Frame.isEnabled",{title:"Is enabled",snapshot:!0,pause:!0,group:"getter"}],["Frame.isHidden",{title:"Is hidden",snapshot:!0,pause:!0,group:"getter"}],["Frame.isVisible",{title:"Is visible",snapshot:!0,pause:!0,group:"getter"}],["Frame.isEditable",{title:"Is editable",snapshot:!0,pause:!0,group:"getter"}],["Frame.press",{title:'Press "{key}"',slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["Frame.querySelector",{title:"Query selector",snapshot:!0}],["Frame.querySelectorAll",{title:"Query selector all",snapshot:!0}],["Frame.queryCount",{title:"Query count",snapshot:!0,pause:!0}],["Frame.selectOption",{title:"Select option",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["Frame.setContent",{title:"Set content",snapshot:!0,pause:!0}],["Frame.setInputFiles",{title:"Set input files",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["Frame.tap",{title:"Tap",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["Frame.textContent",{title:"Get text content",snapshot:!0,pause:!0,group:"getter"}],["Frame.title",{title:"Get page title",group:"getter"}],["Frame.type",{title:'Type "{text}"',slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["Frame.uncheck",{title:"Uncheck",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["Frame.waitForTimeout",{title:"Wait for timeout",snapshot:!0}],["Frame.waitForFunction",{title:"Wait for function",snapshot:!0,pause:!0}],["Frame.waitForSelector",{title:"Wait for selector",snapshot:!0}],["Frame.expect",{title:'Expect "{expression}"',snapshot:!0,pause:!0}],["JSHandle.dispose",{internal:!0,potentiallyClosesScope:!0}],["ElementHandle.dispose",{internal:!0,potentiallyClosesScope:!0}],["JSHandle.evaluateExpression",{title:"Evaluate",snapshot:!0,pause:!0}],["ElementHandle.evaluateExpression",{title:"Evaluate",snapshot:!0,pause:!0}],["JSHandle.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0,pause:!0}],["ElementHandle.evaluateExpressionHandle",{title:"Evaluate",snapshot:!0,pause:!0}],["JSHandle.getPropertyList",{title:"Get property list",group:"getter"}],["ElementHandle.getPropertyList",{title:"Get property list",group:"getter"}],["JSHandle.getProperty",{title:"Get JS property",group:"getter"}],["ElementHandle.getProperty",{title:"Get JS property",group:"getter"}],["JSHandle.jsonValue",{title:"Get JSON value",group:"getter"}],["ElementHandle.jsonValue",{title:"Get JSON value",group:"getter"}],["ElementHandle.evalOnSelector",{title:"Evaluate",snapshot:!0,pause:!0}],["ElementHandle.evalOnSelectorAll",{title:"Evaluate",snapshot:!0,pause:!0}],["ElementHandle.boundingBox",{title:"Get bounding box",snapshot:!0,pause:!0}],["ElementHandle.check",{title:"Check",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["ElementHandle.click",{title:"Click",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["ElementHandle.contentFrame",{title:"Get content frame",group:"getter"}],["ElementHandle.dblclick",{title:"Double click",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["ElementHandle.dispatchEvent",{title:"Dispatch event",slowMo:!0,snapshot:!0,pause:!0}],["ElementHandle.fill",{title:'Fill "{value}"',slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["ElementHandle.focus",{title:"Focus",slowMo:!0,snapshot:!0,pause:!0}],["ElementHandle.getAttribute",{title:"Get attribute",snapshot:!0,pause:!0,group:"getter"}],["ElementHandle.hover",{title:"Hover",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["ElementHandle.innerHTML",{title:"Get HTML",snapshot:!0,pause:!0,group:"getter"}],["ElementHandle.innerText",{title:"Get inner text",snapshot:!0,pause:!0,group:"getter"}],["ElementHandle.inputValue",{title:"Get input value",snapshot:!0,pause:!0,group:"getter"}],["ElementHandle.isChecked",{title:"Is checked",snapshot:!0,pause:!0,group:"getter"}],["ElementHandle.isDisabled",{title:"Is disabled",snapshot:!0,pause:!0,group:"getter"}],["ElementHandle.isEditable",{title:"Is editable",snapshot:!0,pause:!0,group:"getter"}],["ElementHandle.isEnabled",{title:"Is enabled",snapshot:!0,pause:!0,group:"getter"}],["ElementHandle.isHidden",{title:"Is hidden",snapshot:!0,pause:!0,group:"getter"}],["ElementHandle.isVisible",{title:"Is visible",snapshot:!0,pause:!0,group:"getter"}],["ElementHandle.ownerFrame",{title:"Get owner frame",group:"getter"}],["ElementHandle.press",{title:'Press "{key}"',slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["ElementHandle.querySelector",{title:"Query selector",snapshot:!0}],["ElementHandle.querySelectorAll",{title:"Query selector all",snapshot:!0}],["ElementHandle.screenshot",{title:"Screenshot",snapshot:!0,pause:!0}],["ElementHandle.scrollIntoViewIfNeeded",{title:"Scroll into view",slowMo:!0,snapshot:!0,pause:!0}],["ElementHandle.selectOption",{title:"Select option",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["ElementHandle.selectText",{title:"Select text",slowMo:!0,snapshot:!0,pause:!0}],["ElementHandle.setInputFiles",{title:"Set input files",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["ElementHandle.tap",{title:"Tap",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["ElementHandle.textContent",{title:"Get text content",snapshot:!0,pause:!0,group:"getter"}],["ElementHandle.type",{title:"Type",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["ElementHandle.uncheck",{title:"Uncheck",slowMo:!0,snapshot:!0,pause:!0,input:!0,isAutoWaiting:!0}],["ElementHandle.waitForElementState",{title:"Wait for state",snapshot:!0,pause:!0}],["ElementHandle.waitForSelector",{title:"Wait for selector",snapshot:!0}],["LocalUtils.zip",{internal:!0}],["LocalUtils.harOpen",{internal:!0}],["LocalUtils.harLookup",{internal:!0}],["LocalUtils.harClose",{internal:!0}],["LocalUtils.harUnzip",{internal:!0}],["LocalUtils.connect",{internal:!0}],["LocalUtils.tracingStarted",{internal:!0}],["LocalUtils.addStackToTracingNoReply",{internal:!0}],["LocalUtils.traceDiscarded",{internal:!0}],["LocalUtils.globToRegex",{internal:!0}],["Request.response",{internal:!0}],["Request.rawRequestHeaders",{internal:!0}],["Route.redirectNavigationRequest",{internal:!0}],["Route.abort",{title:"Abort request",group:"route"}],["Route.continue",{title:"Continue request",group:"route"}],["Route.fulfill",{title:"Fulfill request",group:"route"}],["WebSocketRoute.connect",{title:"Connect WebSocket to server",group:"route"}],["WebSocketRoute.ensureOpened",{internal:!0}],["WebSocketRoute.sendToPage",{title:"Send WebSocket message",group:"route"}],["WebSocketRoute.sendToServer",{title:"Send WebSocket message",group:"route"}],["WebSocketRoute.closePage",{internal:!0}],["WebSocketRoute.closeServer",{internal:!0}],["Response.body",{title:"Get response body",group:"getter"}],["Response.securityDetails",{internal:!0}],["Response.serverAddr",{internal:!0}],["Response.rawResponseHeaders",{internal:!0}],["Response.httpVersion",{internal:!0}],["Response.sizes",{internal:!0}],["Page.addInitScript",{title:"Add init script",group:"configuration"}],["Page.close",{title:"Close page",pause:!0,potentiallyClosesScope:!0}],["Page.runBeforeUnload",{title:"Run beforeunload",pause:!0}],["Page.clearConsoleMessages",{title:"Clear console messages"}],["Page.consoleMessages",{title:"Get console messages",group:"getter"}],["Page.emulateMedia",{title:"Emulate media",snapshot:!0,pause:!0}],["Page.exposeBinding",{title:"Expose binding",group:"configuration"}],["Page.goBack",{title:"Go back",slowMo:!0,snapshot:!0,pause:!0}],["Page.goForward",{title:"Go forward",slowMo:!0,snapshot:!0,pause:!0}],["Page.requestGC",{title:"Request garbage collection",group:"configuration"}],["Page.registerLocatorHandler",{title:"Register locator handler"}],["Page.resolveLocatorHandlerNoReply",{internal:!0}],["Page.unregisterLocatorHandler",{title:"Unregister locator handler"}],["Page.reload",{title:"Reload",slowMo:!0,snapshot:!0,pause:!0}],["Page.expectScreenshot",{title:"Expect screenshot",snapshot:!0,pause:!0}],["Page.screenshot",{title:"Screenshot",snapshot:!0,pause:!0}],["Page.setExtraHTTPHeaders",{title:"Set extra HTTP headers",group:"configuration"}],["Page.setNetworkInterceptionPatterns",{title:"Route requests",group:"route"}],["Page.setWebSocketInterceptionPatterns",{title:"Route WebSockets",group:"route"}],["Page.setViewportSize",{title:"Set viewport size",snapshot:!0,pause:!0}],["Page.keyboardDown",{title:'Key down "{key}"',slowMo:!0,snapshot:!0,pause:!0,input:!0}],["Page.keyboardUp",{title:'Key up "{key}"',slowMo:!0,snapshot:!0,pause:!0,input:!0}],["Page.keyboardInsertText",{title:'Insert "{text}"',slowMo:!0,snapshot:!0,pause:!0,input:!0}],["Page.keyboardType",{title:'Type "{text}"',slowMo:!0,snapshot:!0,pause:!0,input:!0}],["Page.keyboardPress",{title:'Press "{key}"',slowMo:!0,snapshot:!0,pause:!0,input:!0}],["Page.mouseMove",{title:"Mouse move",slowMo:!0,snapshot:!0,pause:!0,input:!0}],["Page.mouseDown",{title:"Mouse down",slowMo:!0,snapshot:!0,pause:!0,input:!0}],["Page.mouseUp",{title:"Mouse up",slowMo:!0,snapshot:!0,pause:!0,input:!0}],["Page.mouseClick",{title:"Click",slowMo:!0,snapshot:!0,pause:!0,input:!0}],["Page.mouseWheel",{title:"Mouse wheel",slowMo:!0,snapshot:!0,pause:!0,input:!0}],["Page.touchscreenTap",{title:"Tap",slowMo:!0,snapshot:!0,pause:!0,input:!0}],["Page.clearPageErrors",{title:"Clear page errors"}],["Page.pageErrors",{title:"Get page errors",group:"getter"}],["Page.pdf",{title:"PDF"}],["Page.requests",{title:"Get network requests",group:"getter"}],["Page.startJSCoverage",{title:"Start JS coverage",group:"configuration"}],["Page.stopJSCoverage",{title:"Stop JS coverage",group:"configuration"}],["Page.startCSSCoverage",{title:"Start CSS coverage",group:"configuration"}],["Page.stopCSSCoverage",{title:"Stop CSS coverage",group:"configuration"}],["Page.bringToFront",{title:"Bring to front"}],["Page.pickLocator",{title:"Pick locator",group:"configuration"}],["Page.cancelPickLocator",{title:"Cancel pick locator",group:"configuration"}],["Page.hideHighlight",{title:"Hide all element highlights",group:"configuration"}],["Page.screencastShowOverlay",{title:"Show overlay",group:"configuration"}],["Page.screencastRemoveOverlay",{title:"Remove overlay",group:"configuration"}],["Page.screencastChapter",{title:"Show chapter overlay",group:"configuration"}],["Page.screencastSetOverlayVisible",{title:"Set overlay visibility",group:"configuration"}],["Page.screencastShowActions",{title:"Show actions",group:"configuration"}],["Page.screencastHideActions",{title:"Remove actions",group:"configuration"}],["Page.screencastStart",{title:"Start screencast",group:"configuration"}],["Page.screencastStop",{title:"Stop screencast",group:"configuration"}],["Page.updateSubscription",{internal:!0}],["Page.setDockTile",{internal:!0}],["Page.webStorageItems",{title:"Get WebStorage items",group:"getter"}],["Page.webStorageGetItem",{title:"Get WebStorage item",group:"getter"}],["Page.webStorageSetItem",{title:"Set WebStorage item",group:"configuration"}],["Page.webStorageRemoveItem",{title:"Remove WebStorage item",group:"configuration"}],["Page.webStorageClear",{title:"Clear WebStorage",group:"configuration"}],["Root.initialize",{internal:!0}],["Playwright.newRequest",{title:"Create request context"}],["DebugController.initialize",{internal:!0}],["DebugController.setReportStateChanged",{internal:!0}],["DebugController.setRecorderMode",{internal:!0}],["DebugController.highlight",{internal:!0}],["DebugController.hideHighlight",{internal:!0}],["DebugController.resume",{internal:!0}],["DebugController.kill",{internal:!0}],["SocksSupport.socksConnected",{internal:!0}],["SocksSupport.socksFailed",{internal:!0}],["SocksSupport.socksData",{internal:!0}],["SocksSupport.socksError",{internal:!0}],["SocksSupport.socksEnd",{internal:!0}],["JsonPipe.send",{internal:!0}],["JsonPipe.close",{internal:!0}],["CDPSession.send",{title:"Send CDP command",group:"configuration"}],["CDPSession.detach",{title:"Detach CDP session",potentiallyClosesScope:!0,group:"configuration"}],["BindingCall.reject",{internal:!0}],["BindingCall.resolve",{internal:!0}],["Debugger.requestPause",{title:"Pause on next call",group:"configuration"}],["Debugger.resume",{title:"Resume",group:"configuration"}],["Debugger.next",{title:"Step to next call",group:"configuration"}],["Debugger.runTo",{title:"Run to location",group:"configuration"}],["Dialog.accept",{title:"Accept dialog"}],["Dialog.dismiss",{title:"Dismiss dialog"}],["Tracing.tracingStart",{title:"Start tracing",group:"configuration"}],["Tracing.tracingStartChunk",{title:"Start tracing",group:"configuration"}],["Tracing.tracingGroup",{title:'Trace "{name}"'}],["Tracing.tracingGroupEnd",{title:"Group end"}],["Tracing.tracingStopChunk",{title:"Stop tracing",group:"configuration"}],["Tracing.tracingStop",{title:"Stop tracing",group:"configuration"}],["Tracing.harStart",{internal:!0}],["Tracing.harExport",{internal:!0}],["Worker.disconnect",{title:"Disconnect from worker",potentiallyClosesScope:!0}],["Worker.evaluateExpression",{title:"Evaluate"}],["Worker.evaluateExpressionHandle",{title:"Evaluate"}],["Worker.updateSubscription",{internal:!0}]]);function id(n){return Rx.get(n.type+"."+n.method)}function g0(n,e){var i;return(i=Dx(n,e))==null?void 0:i.replaceAll(`
`,"\\n")}function Dx(n,e){if(n)for(const i of e.split("|")){if(i==="url")try{const a=new URL(n[i]);return a.protocol==="data:"?a.protocol:["about:","chrome:","edge:"].includes(a.protocol)?n[i]:a.pathname+a.search}catch{if(n[i]!==void 0)return n[i]}if(i==="timeNumber"&&n[i]!==void 0)return new Date(n[i]).toString();const r=zx(n,i);if(r!==void 0)return r}}function zx(n,e){const i=e.split(".");let r=n;for(const a of i){if(typeof r!="object"||r===null)return;r=r[a]}if(r!==void 0)return String(r)}function Ux(n){var i;return(n.title??((i=id(n))==null?void 0:i.title)??n.method).replace(/\{([^}]+)\}/g,(r,a)=>g0(n.params,a)??r)}function Hx(n){var e;return(e=id(n))==null?void 0:e.group}const Ia=Symbol("context"),m0=Symbol("nextInContext"),y0=Symbol("prevByEndTime"),b0=Symbol("nextByStartTime"),ab=Symbol("events");class V2{constructor(e,i){var a,o;i.forEach(u=>Bx(u));const r=i.find(u=>u.origin==="library");this.traceUri=e,this.browserName=(r==null?void 0:r.browserName)||"",this.sdkLanguage=r==null?void 0:r.sdkLanguage,this.channel=r==null?void 0:r.channel,this.testIdAttributeName=r==null?void 0:r.testIdAttributeName,this.platform=(r==null?void 0:r.platform)||"",this.playwrightVersion=(a=i.find(u=>u.playwrightVersion))==null?void 0:a.playwrightVersion,this.title=(r==null?void 0:r.title)||"",this.options=(r==null?void 0:r.options)||{},this.testTimeout=(o=i.find(u=>u.origin==="testRunner"))==null?void 0:o.testTimeout,this.actions=qx(i),this.pages=[].concat(...i.map(u=>u.pages)),this.wallTime=i.map(u=>u.wallTime).reduce((u,f)=>Math.min(u||Number.MAX_VALUE,f),Number.MAX_VALUE),this.startTime=i.map(u=>u.startTime).reduce((u,f)=>Math.min(u,f),Number.MAX_VALUE),this.endTime=i.map(u=>u.endTime).reduce((u,f)=>Math.max(u,f),Number.MIN_VALUE),this.events=[].concat(...i.map(u=>u.events)),this.stdio=[].concat(...i.map(u=>u.stdio)),this.errors=[].concat(...i.map(u=>u.errors)),this.hasSource=i.some(u=>u.hasSource),this.hasStepData=i.some(u=>u.origin==="testRunner"),this.resources=[...i.map(u=>u.resources)].flat().map(u=>({...u,id:`${u.pageref}-${u.startedDateTime}-${u.request.url}`})),this.attachments=this.actions.flatMap(u=>{var f;return((f=u.attachments)==null?void 0:f.map(d=>({...d,callId:u.callId,traceUri:e})))??[]}),this.visibleAttachments=this.attachments.filter(u=>!u.name.startsWith("_")),this.events.sort((u,f)=>u.time-f.time),this.resources.sort((u,f)=>u._monotonicTime-f._monotonicTime),this.errorDescriptors=this.hasStepData?this._errorDescriptorsFromTestRunner():this._errorDescriptorsFromActions(),this.sources=Yx(this.actions,this.errorDescriptors),this.actionCounters=new Map;for(const u of this.actions)u.group=u.group??Hx({type:u.class,method:u.method}),u.group&&this.actionCounters.set(u.group,1+(this.actionCounters.get(u.group)||0))}createRelativeUrl(e){const i=new URL("http://localhost/"+e);return i.searchParams.set("trace",this.traceUri),i.toString().substring(17)}failedAction(){return this.actions.findLast(e=>e.error)}filteredActions(e){const i=new Set(e);return this.actions.filter(r=>!r.group||i.has(r.group))}renderActionTree(e){const i=this.filteredActions(e??[]),{rootItem:r}=v0(i),a=[],o=(u,f)=>{const d=Ux({...u.action,type:u.action.class});a.push(`${f}${d||u.id}`);for(const g of u.children)o(g,f+"  ")};return r.children.forEach(u=>o(u,"")),a}_errorDescriptorsFromActions(){var i;const e=[];for(const r of this.actions||[])(i=r.error)!=null&&i.message&&e.push({action:r,stack:r.stack,message:r.error.message});return e}_errorDescriptorsFromTestRunner(){return this.errors.filter(e=>!!e.message).map((e,i)=>({stack:e.stack,message:e.message}))}}function Bx(n){for(const i of n.pages)i[Ia]=n;for(let i=0;i<n.actions.length;++i){const r=n.actions[i];r[Ia]=n}let e;for(let i=n.actions.length-1;i>=0;i--){const r=n.actions[i];r[m0]=e,r.class!=="Route"&&(e=r)}for(const i of n.events)i[Ia]=n;for(const i of n.resources)i[Ia]=n}function qx(n){const e=[],i=$x(n);e.push(...i),e.sort((r,a)=>a.parentId===r.callId?1:r.parentId===a.callId?-1:r.endTime-a.endTime);for(let r=1;r<e.length;++r)e[r][y0]=e[r-1];e.sort((r,a)=>a.parentId===r.callId?-1:r.parentId===a.callId?1:r.startTime-a.startTime);for(let r=0;r+1<e.length;++r)e[r][b0]=e[r+1];return e}let lb=0;function $x(n){const e=new Map,i=n.filter(u=>u.origin==="library"),r=n.filter(u=>u.origin==="testRunner");if(!r.length||!i.length)return n.map(u=>u.actions.map(f=>({...f,context:u}))).flat();for(const u of i)for(const f of u.actions)e.set(f.stepId||`tmp-step@${++lb}`,{...f,context:u});const a=Vx(r,e);a&&Ix(i,a);const o=new Map;for(const u of r)for(const f of u.actions){const d=f.stepId&&e.get(f.stepId);if(d){o.set(f.callId,d.callId),f.error&&(d.error=f.error),f.attachments&&(d.attachments=f.attachments),f.annotations&&(d.annotations=f.annotations),f.parentId&&(d.parentId=o.get(f.parentId)??f.parentId),f.group&&(d.group=f.group),d.startTime=f.startTime,d.endTime=f.endTime;continue}f.parentId&&(f.parentId=o.get(f.parentId)??f.parentId),e.set(f.stepId||`tmp-step@${++lb}`,{...f,context:u})}return[...e.values()]}function Ix(n,e){for(const i of n){i.startTime+=e,i.endTime+=e;for(const r of i.actions)r.startTime&&(r.startTime+=e),r.endTime&&(r.endTime+=e);for(const r of i.events)r.time+=e;for(const r of i.stdio)r.timestamp+=e;for(const r of i.pages)for(const a of r.screencastFrames)a.timestamp+=e;for(const r of i.resources)r._monotonicTime&&(r._monotonicTime+=e)}}function Vx(n,e){for(const i of n)for(const r of i.actions){if(!r.startTime)continue;const a=r.stepId?e.get(r.stepId):void 0;if(a)return r.startTime-a.startTime}return 0}function v0(n){const e=new Map;for(const a of n)e.set(a.callId,{id:a.callId,parent:void 0,children:[],action:a});const i={action:{...Fx},id:"",parent:void 0,children:[]};for(const a of e.values()){i.action.startTime=Math.min(i.action.startTime,a.action.startTime),i.action.endTime=Math.max(i.action.endTime,a.action.endTime);const o=a.action.parentId&&e.get(a.action.parentId)||i;o.children.push(a),a.parent=o}const r=a=>{for(const o of a.children)o.action.stack=o.action.stack??a.action.stack,r(o)};return r(i),{rootItem:i,itemMap:e}}function S0(n){return n[Ia]}function Gx(n){return n[m0]}function ob(n){return n[y0]}function cb(n){return n[b0]}function Kx(n){let e=0,i=0;for(const r of Xx(n)){if(r.type==="console"){const a=r.messageType;a==="warning"?++i:a==="error"&&++e}r.type==="event"&&r.method==="pageError"&&++e}return{errors:e,warnings:i}}function Xx(n){let e=n[ab];if(e)return e;const i=Gx(n);return e=S0(n).events.filter(r=>r.time>=n.startTime&&(!i||r.time<i.startTime)),n[ab]=e,e}function Yx(n,e){var r;const i=new Map;for(const a of n)for(const o of a.stack||[]){let u=i.get(o.file);u||(u={errors:[],content:void 0},i.set(o.file,u))}for(const a of e){const{action:o,stack:u,message:f}=a;!o||!u||(r=i.get(u[0].file))==null||r.errors.push({line:u[0].line||0,message:f})}return i}const Fx={type:"action",callId:"",startTime:0,endTime:0,class:"",method:"",params:{},log:[],context:{origin:"library",startTime:0,endTime:0,browserName:"",wallTime:0,options:{},pages:[],resources:[],actions:[],events:[],stdio:[],errors:[],hasSource:!1,contextId:""}},Qx=50,il=({sidebarSize:n,sidebarHidden:e=!1,sidebarIsFirst:i=!1,orientation:r="vertical",minSidebarSize:a=Qx,settingName:o,sidebar:u,main:f})=>{const d=Math.max(a,n)*window.devicePixelRatio,[g,m]=jt(o?o+"."+r+":size":void 0,d),[y,S]=jt(o?o+"."+r+":size":void 0,d),[w,E]=R.useState(null),[x,_]=gs();let A;r==="vertical"?(A=y/window.devicePixelRatio,x&&x.height<A&&(A=x.height-10)):(A=g/window.devicePixelRatio,x&&x.width<A&&(A=x.width-10)),document.body.style.userSelect=w?"none":"inherit";let C={};return r==="vertical"?i?C={top:w?0:A-4,bottom:w?0:void 0,height:w?"initial":8}:C={bottom:w?0:A-4,top:w?0:void 0,height:w?"initial":8}:i?C={left:w?0:A-4,right:w?0:void 0,width:w?"initial":8}:C={right:w?0:A-4,left:w?0:void 0,width:w?"initial":8},b.jsxs("div",{className:ut("split-view",r,i&&"sidebar-first"),ref:_,children:[b.jsx("div",{className:"split-view-main",children:f}),!e&&b.jsx("div",{style:{flexBasis:A},className:"split-view-sidebar",children:u}),!e&&b.jsx("div",{style:C,className:"split-view-resizer",onMouseDown:H=>E({offset:r==="vertical"?H.clientY:H.clientX,size:A}),onMouseUp:()=>E(null),onMouseMove:H=>{if(!H.buttons)E(null);else if(w){const K=(r==="vertical"?H.clientY:H.clientX)-w.offset,Q=i?w.size+K:w.size-K,I=H.target.parentElement.getBoundingClientRect(),O=Math.min(Math.max(a,Q),(r==="vertical"?I.height:I.width)-a);r==="vertical"?S(O*window.devicePixelRatio):m(O*window.devicePixelRatio)}}})]})};function yt(n){if(n<0||!isFinite(n))return"-";if(n===0)return"0ms";if(n<1e3)return n.toFixed(0)+"ms";const e=n/1e3;if(e<60)return e.toFixed(1)+"s";const i=e/60;if(i<60)return i.toFixed(1)+"m";const r=i/60;return r<24?r.toFixed(1)+"h":(r/24).toFixed(1)+"d"}function bc(n){if(n<0||!isFinite(n))return"-";if(n===0)return"0";if(n<1e3)return n.toFixed(0);const e=n/1024;if(e<1e3)return e.toFixed(1)+"K";const i=e/1024;return i<1e3?i.toFixed(1)+"M":(i/1024).toFixed(1)+"G"}const ot=function(n,e,i){return n>=e&&n<=i};function qt(n){return ot(n,48,57)}function ub(n){return qt(n)||ot(n,65,70)||ot(n,97,102)}function Px(n){return ot(n,65,90)}function Jx(n){return ot(n,97,122)}function Zx(n){return Px(n)||Jx(n)}function Wx(n){return n>=128}function Xo(n){return Zx(n)||Wx(n)||n===95}function fb(n){return Xo(n)||qt(n)||n===45}function e_(n){return ot(n,0,8)||n===11||ot(n,14,31)||n===127}function Yo(n){return n===10}function Wn(n){return Yo(n)||n===9||n===32}const t_=1114111;class sd extends Error{constructor(e){super(e),this.name="InvalidCharacterError"}}function n_(n){const e=[];for(let i=0;i<n.length;i++){let r=n.charCodeAt(i);if(r===13&&n.charCodeAt(i+1)===10&&(r=10,i++),(r===13||r===12)&&(r=10),r===0&&(r=65533),ot(r,55296,56319)&&ot(n.charCodeAt(i+1),56320,57343)){const a=r-55296,o=n.charCodeAt(i+1)-56320;r=Math.pow(2,16)+a*Math.pow(2,10)+o,i++}e.push(r)}return e}function dt(n){if(n<=65535)return String.fromCharCode(n);n-=Math.pow(2,16);const e=Math.floor(n/Math.pow(2,10))+55296,i=n%Math.pow(2,10)+56320;return String.fromCharCode(e)+String.fromCharCode(i)}function w0(n){const e=n_(n);let i=-1;const r=[];let a;const o=function($){return $>=e.length?-1:e[$]},u=function($){if($===void 0&&($=1),$>3)throw"Spec Error: no more than three codepoints of lookahead.";return o(i+$)},f=function($){return $===void 0&&($=1),i+=$,a=o(i),!0},d=function(){return i-=1,!0},g=function($){return $===void 0&&($=a),$===-1},m=function(){if(y(),f(),Wn(a)){for(;Wn(u());)f();return new rc}else{if(a===34)return E();if(a===35)if(fb(u())||A(u(1),u(2))){const $=new R0("");return H(u(1),u(2),u(3))&&($.type="id"),$.value=j(),$}else return new _t(a);else return a===36?u()===61?(f(),new a_):new _t(a):a===39?E():a===40?new O0:a===41?new rd:a===42?u()===61?(f(),new l_):new _t(a):a===43?Q()?(d(),S()):new _t(a):a===44?new C0:a===45?Q()?(d(),S()):u(1)===45&&u(2)===62?(f(2),new E0):V()?(d(),w()):new _t(a):a===46?Q()?(d(),S()):new _t(a):a===58?new T0:a===59?new A0:a===60?u(1)===33&&u(2)===45&&u(3)===45?(f(3),new _0):new _t(a):a===64?H(u(1),u(2),u(3))?new L0(j()):new _t(a):a===91?new M0:a===92?C()?(d(),w()):new _t(a):a===93?new Lh:a===94?u()===61?(f(),new r_):new _t(a):a===123?new N0:a===124?u()===61?(f(),new s_):u()===124?(f(),new j0):new _t(a):a===125?new k0:a===126?u()===61?(f(),new i_):new _t(a):qt(a)?(d(),S()):Xo(a)?(d(),w()):g()?new Qo:new _t(a)}},y=function(){for(;u(1)===47&&u(2)===42;)for(f(2);;)if(f(),a===42&&u()===47){f();break}else if(g())return},S=function(){const $=I();if(H(u(1),u(2),u(3))){const ee=new o_;return ee.value=$.value,ee.repr=$.repr,ee.type=$.type,ee.unit=j(),ee}else if(u()===37){f();const ee=new U0;return ee.value=$.value,ee.repr=$.repr,ee}else{const ee=new z0;return ee.value=$.value,ee.repr=$.repr,ee.type=$.type,ee}},w=function(){const $=j();if($.toLowerCase()==="url"&&u()===40){for(f();Wn(u(1))&&Wn(u(2));)f();return u()===34||u()===39?new Fa($):Wn(u())&&(u(2)===34||u(2)===39)?new Fa($):x()}else return u()===40?(f(),new Fa($)):new ad($)},E=function($){$===void 0&&($=a);let ee="";for(;f();){if(a===$||g())return new ld(ee);if(Yo(a))return d(),new x0;a===92?g(u())||(Yo(u())?f():ee+=dt(_())):ee+=dt(a)}throw new Error("Internal error")},x=function(){const $=new D0("");for(;Wn(u());)f();if(g(u()))return $;for(;f();){if(a===41||g())return $;if(Wn(a)){for(;Wn(u());)f();return u()===41||g(u())?(f(),$):(P(),new Fo)}else{if(a===34||a===39||a===40||e_(a))return P(),new Fo;if(a===92)if(C())$.value+=dt(_());else return P(),new Fo;else $.value+=dt(a)}}throw new Error("Internal error")},_=function(){if(f(),ub(a)){const $=[a];for(let ce=0;ce<5&&ub(u());ce++)f(),$.push(a);Wn(u())&&f();let ee=parseInt($.map(function(ce){return String.fromCharCode(ce)}).join(""),16);return ee>t_&&(ee=65533),ee}else return g()?65533:a},A=function($,ee){return!($!==92||Yo(ee))},C=function(){return A(a,u())},H=function($,ee,ce){return $===45?Xo(ee)||ee===45||A(ee,ce):Xo($)?!0:$===92?A($,ee):!1},V=function(){return H(a,u(1),u(2))},K=function($,ee,ce){return $===43||$===45?!!(qt(ee)||ee===46&&qt(ce)):$===46?!!qt(ee):!!qt($)},Q=function(){return K(a,u(1),u(2))},j=function(){let $="";for(;f();)if(fb(a))$+=dt(a);else if(C())$+=dt(_());else return d(),$;throw new Error("Internal parse error")},I=function(){let $="",ee="integer";for((u()===43||u()===45)&&(f(),$+=dt(a));qt(u());)f(),$+=dt(a);if(u(1)===46&&qt(u(2)))for(f(),$+=dt(a),f(),$+=dt(a),ee="number";qt(u());)f(),$+=dt(a);const ce=u(1),Me=u(2),q=u(3);if((ce===69||ce===101)&&qt(Me))for(f(),$+=dt(a),f(),$+=dt(a),ee="number";qt(u());)f(),$+=dt(a);else if((ce===69||ce===101)&&(Me===43||Me===45)&&qt(q))for(f(),$+=dt(a),f(),$+=dt(a),f(),$+=dt(a),ee="number";qt(u());)f(),$+=dt(a);const Z=O($);return{type:ee,value:Z,repr:$}},O=function($){return+$},P=function(){for(;f();){if(a===41||g())return;C()&&_()}};let J=0;for(;!g(u());)if(r.push(m()),J++,J>e.length*2)throw new Error("I'm infinite-looping!");return r}class tt{constructor(){this.tokenType=""}toJSON(){return{token:this.tokenType}}toString(){return this.tokenType}toSource(){return""+this}}class x0 extends tt{constructor(){super(...arguments),this.tokenType="BADSTRING"}}class Fo extends tt{constructor(){super(...arguments),this.tokenType="BADURL"}}class rc extends tt{constructor(){super(...arguments),this.tokenType="WHITESPACE"}toString(){return"WS"}toSource(){return" "}}class _0 extends tt{constructor(){super(...arguments),this.tokenType="CDO"}toSource(){return"<!--"}}class E0 extends tt{constructor(){super(...arguments),this.tokenType="CDC"}toSource(){return"-->"}}class T0 extends tt{constructor(){super(...arguments),this.tokenType=":"}}class A0 extends tt{constructor(){super(...arguments),this.tokenType=";"}}class C0 extends tt{constructor(){super(...arguments),this.tokenType=","}}class Mr extends tt{constructor(){super(...arguments),this.value="",this.mirror=""}}class N0 extends Mr{constructor(){super(),this.tokenType="{",this.value="{",this.mirror="}"}}class k0 extends Mr{constructor(){super(),this.tokenType="}",this.value="}",this.mirror="{"}}class M0 extends Mr{constructor(){super(),this.tokenType="[",this.value="[",this.mirror="]"}}class Lh extends Mr{constructor(){super(),this.tokenType="]",this.value="]",this.mirror="["}}class O0 extends Mr{constructor(){super(),this.tokenType="(",this.value="(",this.mirror=")"}}class rd extends Mr{constructor(){super(),this.tokenType=")",this.value=")",this.mirror="("}}class i_ extends tt{constructor(){super(...arguments),this.tokenType="~="}}class s_ extends tt{constructor(){super(...arguments),this.tokenType="|="}}class r_ extends tt{constructor(){super(...arguments),this.tokenType="^="}}class a_ extends tt{constructor(){super(...arguments),this.tokenType="$="}}class l_ extends tt{constructor(){super(...arguments),this.tokenType="*="}}class j0 extends tt{constructor(){super(...arguments),this.tokenType="||"}}class Qo extends tt{constructor(){super(...arguments),this.tokenType="EOF"}toSource(){return""}}class _t extends tt{constructor(e){super(),this.tokenType="DELIM",this.value="",this.value=dt(e)}toString(){return"DELIM("+this.value+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e}toSource(){return this.value==="\\"?`\\
`:this.value}}class Or extends tt{constructor(){super(...arguments),this.value=""}ASCIIMatch(e){return this.value.toLowerCase()===e.toLowerCase()}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e}}class ad extends Or{constructor(e){super(),this.tokenType="IDENT",this.value=e}toString(){return"IDENT("+this.value+")"}toSource(){return ul(this.value)}}class Fa extends Or{constructor(e){super(),this.tokenType="FUNCTION",this.value=e,this.mirror=")"}toString(){return"FUNCTION("+this.value+")"}toSource(){return ul(this.value)+"("}}class L0 extends Or{constructor(e){super(),this.tokenType="AT-KEYWORD",this.value=e}toString(){return"AT("+this.value+")"}toSource(){return"@"+ul(this.value)}}class R0 extends Or{constructor(e){super(),this.tokenType="HASH",this.value=e,this.type="unrestricted"}toString(){return"HASH("+this.value+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.type=this.type,e}toSource(){return this.type==="id"?"#"+ul(this.value):"#"+c_(this.value)}}class ld extends Or{constructor(e){super(),this.tokenType="STRING",this.value=e}toString(){return'"'+H0(this.value)+'"'}}class D0 extends Or{constructor(e){super(),this.tokenType="URL",this.value=e}toString(){return"URL("+this.value+")"}toSource(){return'url("'+H0(this.value)+'")'}}class z0 extends tt{constructor(){super(),this.tokenType="NUMBER",this.type="integer",this.repr=""}toString(){return this.type==="integer"?"INT("+this.value+")":"NUMBER("+this.value+")"}toJSON(){const e=super.toJSON();return e.value=this.value,e.type=this.type,e.repr=this.repr,e}toSource(){return this.repr}}class U0 extends tt{constructor(){super(),this.tokenType="PERCENTAGE",this.repr=""}toString(){return"PERCENTAGE("+this.value+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.repr=this.repr,e}toSource(){return this.repr+"%"}}class o_ extends tt{constructor(){super(),this.tokenType="DIMENSION",this.type="integer",this.repr="",this.unit=""}toString(){return"DIM("+this.value+","+this.unit+")"}toJSON(){const e=this.constructor.prototype.constructor.prototype.toJSON.call(this);return e.value=this.value,e.type=this.type,e.repr=this.repr,e.unit=this.unit,e}toSource(){const e=this.repr;let i=ul(this.unit);return i[0].toLowerCase()==="e"&&(i[1]==="-"||ot(i.charCodeAt(1),48,57))&&(i="\\65 "+i.slice(1,i.length)),e+i}}function ul(n){n=""+n;let e="";const i=n.charCodeAt(0);for(let r=0;r<n.length;r++){const a=n.charCodeAt(r);if(a===0)throw new sd("Invalid character: the input contains U+0000.");ot(a,1,31)||a===127||r===0&&ot(a,48,57)||r===1&&ot(a,48,57)&&i===45?e+="\\"+a.toString(16)+" ":a>=128||a===45||a===95||ot(a,48,57)||ot(a,65,90)||ot(a,97,122)?e+=n[r]:e+="\\"+n[r]}return e}function c_(n){n=""+n;let e="";for(let i=0;i<n.length;i++){const r=n.charCodeAt(i);if(r===0)throw new sd("Invalid character: the input contains U+0000.");r>=128||r===45||r===95||ot(r,48,57)||ot(r,65,90)||ot(r,97,122)?e+=n[i]:e+="\\"+r.toString(16)+" "}return e}function H0(n){n=""+n;let e="";for(let i=0;i<n.length;i++){const r=n.charCodeAt(i);if(r===0)throw new sd("Invalid character: the input contains U+0000.");ot(r,1,31)||r===127?e+="\\"+r.toString(16)+" ":r===34||r===92?e+="\\"+n[i]:e+=n[i]}return e}class $t extends Error{}function u_(n,e){let i;try{i=w0(n),i[i.length-1]instanceof Qo||i.push(new Qo)}catch(O){const P=O.message+` while parsing css selector "${n}". Did you mean to CSS.escape it?`,J=(O.stack||"").indexOf(O.message);throw J!==-1&&(O.stack=O.stack.substring(0,J)+P+O.stack.substring(J+O.message.length)),O.message=P,O}const r=i.find(O=>O instanceof L0||O instanceof x0||O instanceof Fo||O instanceof j0||O instanceof _0||O instanceof E0||O instanceof A0||O instanceof N0||O instanceof k0||O instanceof D0||O instanceof U0);if(r)throw new $t(`Unsupported token "${r.toSource()}" while parsing css selector "${n}". Did you mean to CSS.escape it?`);let a=0;const o=new Set;function u(){return new $t(`Unexpected token "${i[a].toSource()}" while parsing css selector "${n}". Did you mean to CSS.escape it?`)}function f(){for(;i[a]instanceof rc;)a++}function d(O=a){return i[O]instanceof ad}function g(O=a){return i[O]instanceof ld}function m(O=a){return i[O]instanceof z0}function y(O=a){return i[O]instanceof C0}function S(O=a){return i[O]instanceof O0}function w(O=a){return i[O]instanceof rd}function E(O=a){return i[O]instanceof Fa}function x(O=a){return i[O]instanceof _t&&i[O].value==="*"}function _(O=a){return i[O]instanceof Qo}function A(O=a){return i[O]instanceof _t&&[">","+","~"].includes(i[O].value)}function C(O=a){return y(O)||w(O)||_(O)||A(O)||i[O]instanceof rc}function H(){const O=[V()];for(;f(),!!y();)a++,O.push(V());return O}function V(){return f(),m()||g()?i[a++].value:K()}function K(){const O={simples:[]};for(f(),A()?O.simples.push({selector:{functions:[{name:"scope",args:[]}]},combinator:""}):O.simples.push({selector:Q(),combinator:""});;){if(f(),A())O.simples[O.simples.length-1].combinator=i[a++].value,f();else if(C())break;O.simples.push({combinator:"",selector:Q()})}return O}function Q(){let O="";const P=[];for(;!C();)if(d()||x())O+=i[a++].toSource();else if(i[a]instanceof R0)O+=i[a++].toSource();else if(i[a]instanceof _t&&i[a].value===".")if(a++,d())O+="."+i[a++].toSource();else throw u();else if(i[a]instanceof T0)if(a++,d())if(!e.has(i[a].value.toLowerCase()))O+=":"+i[a++].toSource();else{const J=i[a++].value.toLowerCase();P.push({name:J,args:[]}),o.add(J)}else if(E()){const J=i[a++].value.toLowerCase();if(e.has(J)?(P.push({name:J,args:H()}),o.add(J)):O+=`:${J}(${j()})`,f(),!w())throw u();a++}else throw u();else if(i[a]instanceof M0){for(O+="[",a++;!(i[a]instanceof Lh)&&!_();)O+=i[a++].toSource();if(!(i[a]instanceof Lh))throw u();O+="]",a++}else throw u();if(!O&&!P.length)throw u();return{css:O||void 0,functions:P}}function j(){let O="",P=1;for(;!_()&&((S()||E())&&P++,w()&&P--,!!P);)O+=i[a++].toSource();return O}const I=H();if(!_())throw u();if(I.some(O=>typeof O!="object"||!("simples"in O)))throw new $t(`Error while parsing css selector "${n}". Did you mean to CSS.escape it?`);return{selector:I,names:Array.from(o)}}const Rh=new Set(["internal:has","internal:has-not","internal:and","internal:or","internal:chain","left-of","right-of","above","below","near"]),f_=new Set(["left-of","right-of","above","below","near"]),B0=new Set(["not","is","where","has","scope","light","visible","text","text-matches","text-is","has-text","above","below","right-of","left-of","near","nth-match"]);function fl(n){const e=p_(n),i=[];for(const r of e.parts){if(r.name==="css"||r.name==="css:light"){r.name==="css:light"&&(r.body=":light("+r.body+")");const a=u_(r.body,B0);i.push({name:"css",body:a.selector,source:r.body});continue}if(Rh.has(r.name)){let a,o;try{const g=JSON.parse("["+r.body+"]");if(!Array.isArray(g)||g.length<1||g.length>2||typeof g[0]!="string")throw new $t(`Malformed selector: ${r.name}=`+r.body);if(a=g[0],g.length===2){if(typeof g[1]!="number"||!f_.has(r.name))throw new $t(`Malformed selector: ${r.name}=`+r.body);o=g[1]}}catch{throw new $t(`Malformed selector: ${r.name}=`+r.body)}const u={name:r.name,source:r.body,body:{parsed:fl(a),distance:o}},f=[...u.body.parsed.parts].reverse().find(g=>g.name==="internal:control"&&g.body==="enter-frame"),d=f?u.body.parsed.parts.indexOf(f):-1;d!==-1&&h_(u.body.parsed.parts.slice(0,d+1),i.slice(0,d+1))&&u.body.parsed.parts.splice(0,d+1),i.push(u);continue}i.push({...r,source:r.body})}if(Rh.has(i[0].name))throw new $t(`"${i[0].name}" selector cannot be first`);return{capture:e.capture,parts:i}}function h_(n,e){return It({parts:n})===It({parts:e})}function It(n,e){return typeof n=="string"?n:n.parts.map((i,r)=>{let a=!0;!e&&r!==n.capture&&(i.name==="css"||i.name==="xpath"&&i.source.startsWith("//")||i.source.startsWith(".."))&&(a=!1);const o=a?i.name+"=":"";return`${r===n.capture?"*":""}${o}${i.source}`}).join(" >> ")}function d_(n,e){const i=(r,a)=>{for(const o of r.parts)e(o,a),Rh.has(o.name)&&i(o.body.parsed,!0)};i(n,!1)}function p_(n){let e=0,i,r=0;const a={parts:[]},o=()=>{const f=n.substring(r,e).trim(),d=f.indexOf("=");let g,m;d!==-1&&f.substring(0,d).trim().match(/^[a-zA-Z_0-9-+:*]+$/)?(g=f.substring(0,d).trim(),m=f.substring(d+1)):f.length>1&&f[0]==='"'&&f[f.length-1]==='"'||f.length>1&&f[0]==="'"&&f[f.length-1]==="'"?(g="text",m=f):/^\(*\/\//.test(f)||f.startsWith("..")?(g="xpath",m=f):(g="css",m=f);let y=!1;if(g[0]==="*"&&(y=!0,g=g.substring(1)),a.parts.push({name:g,body:m}),y){if(a.capture!==void 0)throw new $t("Only one of the selectors can capture using * modifier");a.capture=a.parts.length-1}};if(!n.includes(">>"))return e=n.length,o(),a;const u=()=>{const d=n.substring(r,e).match(/^\s*text\s*=(.*)$/);return!!d&&!!d[1]};for(;e<n.length;){const f=n[e];f==="\\"&&e+1<n.length?e+=2:f===i?(i=void 0,e++):!i&&(f==='"'||f==="'"||f==="`")&&!u()?(i=f,e++):!i&&f===">"&&n[e+1]===">"?(o(),e+=2,r=e):e++}return o(),a}function Er(n,e){let i=0,r=n.length===0;const a=()=>n[i]||"",o=()=>{const _=a();return++i,r=i>=n.length,_},u=_=>{throw r?new $t(`Unexpected end of selector while parsing selector \`${n}\``):new $t(`Error while parsing selector \`${n}\` - unexpected symbol "${a()}" at position ${i}`+(_?" during "+_:""))};function f(){for(;!r&&/\s/.test(a());)o()}function d(_){return _>=""||_>="0"&&_<="9"||_>="A"&&_<="Z"||_>="a"&&_<="z"||_>="0"&&_<="9"||_==="_"||_==="-"}function g(){let _="";for(f();!r&&d(a());)_+=o();return _}function m(_){let A=o();for(A!==_&&u("parsing quoted string");!r&&a()!==_;)a()==="\\"&&o(),A+=o();return a()!==_&&u("parsing quoted string"),A+=o(),A}function y(){o()!=="/"&&u("parsing regular expression");let _="",A=!1;for(;!r;){if(a()==="\\")_+=o(),r&&u("parsing regular expression");else if(A&&a()==="]")A=!1;else if(!A&&a()==="[")A=!0;else if(!A&&a()==="/")break;_+=o()}o()!=="/"&&u("parsing regular expression");let C="";for(;!r&&a().match(/[dgimsuy]/);)C+=o();try{return new RegExp(_,C)}catch(H){throw new $t(`Error while parsing selector \`${n}\`: ${H.message}`)}}function S(){let _="";return f(),a()==="'"||a()==='"'?_=m(a()).slice(1,-1):_=g(),_||u("parsing property path"),_}function w(){f();let _="";return r||(_+=o()),!r&&_!=="="&&(_+=o()),["=","*=","^=","$=","|=","~="].includes(_)||u("parsing operator"),_}function E(){o();const _=[];for(_.push(S()),f();a()===".";)o(),_.push(S()),f();if(a()==="]")return o(),{name:_.join("."),jsonPath:_,op:"<truthy>",value:null,caseSensitive:!1};const A=w();let C,H=!0;if(f(),a()==="/"){if(A!=="=")throw new $t(`Error while parsing selector \`${n}\` - cannot use ${A} in attribute with regular expression`);C=y()}else if(a()==="'"||a()==='"')C=m(a()).slice(1,-1),f(),a()==="i"||a()==="I"?(H=!1,o()):(a()==="s"||a()==="S")&&(H=!0,o());else{for(C="";!r&&(d(a())||a()==="+"||a()===".");)C+=o();C==="true"?C=!0:C==="false"&&(C=!1)}if(f(),a()!=="]"&&u("parsing attribute value"),o(),A!=="="&&typeof C!="string")throw new $t(`Error while parsing selector \`${n}\` - cannot use ${A} in attribute with non-string matching value - ${C}`);return{name:_.join("."),jsonPath:_,op:A,value:C,caseSensitive:H}}const x={name:"",attributes:[]};for(x.name=g(),f();a()==="[";)x.attributes.push(E()),f();if(r||u(void 0),!x.name&&!x.attributes.length)throw new $t(`Error while parsing selector \`${n}\` - selector cannot be empty`);return x}function vc(n,e="'"){const i=JSON.stringify(n),r=i.substring(1,i.length-1).replace(/\\"/g,'"');if(e==="'")return e+r.replace(/[']/g,"\\'")+e;if(e==='"')return e+r.replace(/["]/g,'\\"')+e;if(e==="`")return e+r.replace(/[`]/g,"\\`")+e;throw new Error("Invalid escape char")}function ac(n){return n.charAt(0).toUpperCase()+n.substring(1)}function q0(n){return n.replace(/([a-z0-9])([A-Z])/g,"$1_$2").replace(/([A-Z])([A-Z][a-z])/g,"$1_$2").toLowerCase()}function gr(n){return`"${n.replace(/["\\]/g,e=>"\\"+e)}"`}let ss;function g_(){ss=new Map}function pt(n){let e=ss==null?void 0:ss.get(n);return e===void 0&&(e=n.replace(/[\u200b\u00ad]/g,"").trim().replace(/\s+/g," "),ss==null||ss.set(n,e)),e}function Sc(n){return n.replace(/(^|[^\\])(\\\\)*\\(['"`])/g,"$1$2$3")}function $0(n){return n.unicode||n.unicodeSets?String(n):String(n).replace(/(^|[^\\])(\\\\)*(["'`])/g,"$1$2\\$3").replace(/>>/g,"\\>\\>")}function Vt(n,e){return typeof n!="string"?$0(n):`${JSON.stringify(n)}${e?"s":"i"}`}function Ze(n,e){return typeof n!="string"?$0(n):`"${n.replace(/\\/g,"\\\\").replace(/["]/g,'\\"')}"${e?"s":"i"}`}function m_(n,e,i=""){if(n.length<=e)return n;const r=[...n];return r.length>e?r.slice(0,e-i.length).join("")+i:r.join("")}function hb(n,e){return m_(n,e,"…")}function lc(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function y_(n,e){const i=n.length,r=e.length;let a=0,o=0;const u=Array(i+1).fill(null).map(()=>Array(r+1).fill(0));for(let f=1;f<=i;f++)for(let d=1;d<=r;d++)n[f-1]===e[d-1]&&(u[f][d]=u[f-1][d-1]+1,u[f][d]>a&&(a=u[f][d],o=f));return n.slice(o-a,o)}function I0(n,e){try{const i=fl(e),r=b_(i);return r||os(new G0[n],i,!1,1)[0]}catch{return e}}function b_(n){const e=n.parts[n.parts.length-1];if((e==null?void 0:e.name)==="internal:describe"){const i=JSON.parse(e.body);if(typeof i=="string")return i}}function Ri(n,e,i=!1){return V0(n,e,i,1)[0]}function V0(n,e,i=!1,r=20,a){try{return os(new G0[n](a),fl(e),i,r)}catch{return[e]}}function os(n,e,i=!1,r=20){const a=[...e.parts],o=[];let u=i?"frame-locator":"page";for(let f=0;f<a.length;f++){const d=a[f],g=u;if(u="locator",d.name==="internal:describe")continue;if(d.name==="nth"){d.body==="0"?o.push([n.generateLocator(g,"first",""),n.generateLocator(g,"nth","0")]):d.body==="-1"?o.push([n.generateLocator(g,"last",""),n.generateLocator(g,"nth","-1")]):o.push([n.generateLocator(g,"nth",d.body)]);continue}if(d.name==="visible"){o.push([n.generateLocator(g,"visible",d.body),n.generateLocator(g,"default",`visible=${d.body}`)]);continue}if(d.name==="internal:text"){const{exact:E,text:x}=Ra(d.body);o.push([n.generateLocator(g,"text",x,{exact:E})]);continue}if(d.name==="internal:has-text"){const{exact:E,text:x}=Ra(d.body);if(!E){o.push([n.generateLocator(g,"has-text",x,{exact:E})]);continue}}if(d.name==="internal:has-not-text"){const{exact:E,text:x}=Ra(d.body);if(!E){o.push([n.generateLocator(g,"has-not-text",x,{exact:E})]);continue}}if(d.name==="internal:has"){const E=os(n,d.body.parsed,!1,r);o.push(E.map(x=>n.generateLocator(g,"has",x)));continue}if(d.name==="internal:has-not"){const E=os(n,d.body.parsed,!1,r);o.push(E.map(x=>n.generateLocator(g,"hasNot",x)));continue}if(d.name==="internal:and"){const E=os(n,d.body.parsed,!1,r);o.push(E.map(x=>n.generateLocator(g,"and",x)));continue}if(d.name==="internal:or"){const E=os(n,d.body.parsed,!1,r);o.push(E.map(x=>n.generateLocator(g,"or",x)));continue}if(d.name==="internal:chain"){const E=os(n,d.body.parsed,!1,r);o.push(E.map(x=>n.generateLocator(g,"chain",x)));continue}if(d.name==="internal:label"){const{exact:E,text:x}=Ra(d.body);o.push([n.generateLocator(g,"label",x,{exact:E})]);continue}if(d.name==="internal:role"){const E=Er(d.body),x={attrs:[]};for(const _ of E.attributes)if(_.name==="name"){if(x.exact!==void 0&&x.exact!==_.caseSensitive)throw new Error(`Conflicting exactness in internal:role selector: ${It({parts:[d]})}`);x.exact=_.caseSensitive,x.name=_.value}else if(_.name==="description"){if(x.exact!==void 0&&x.exact!==_.caseSensitive)throw new Error(`Conflicting exactness in internal:role selector: ${It({parts:[d]})}`);x.exact=_.caseSensitive,x.description=_.value}else _.name==="level"&&typeof _.value=="string"&&(_.value=+_.value),x.attrs.push({name:_.name==="include-hidden"?"includeHidden":_.name,value:_.value});o.push([n.generateLocator(g,"role",E.name,x)]);continue}if(d.name==="internal:testid"){const E=Er(d.body),{value:x}=E.attributes[0];o.push([n.generateLocator(g,"test-id",x)]);continue}if(d.name==="internal:attr"){const E=Er(d.body),{name:x,value:_,caseSensitive:A}=E.attributes[0],C=_,H=!!A;if(x==="placeholder"){o.push([n.generateLocator(g,"placeholder",C,{exact:H})]);continue}if(x==="alt"){o.push([n.generateLocator(g,"alt",C,{exact:H})]);continue}if(x==="title"){o.push([n.generateLocator(g,"title",C,{exact:H})]);continue}}if(d.name==="internal:control"&&d.body==="enter-frame"){const E=o[o.length-1],x=a[f-1],_=E.map(A=>n.chainLocators([A,n.generateLocator(g,"frame","")]));["xpath","css"].includes(x.name)&&_.push(n.generateLocator(g,"frame-locator",It({parts:[x]})),n.generateLocator(g,"frame-locator",It({parts:[x]},!0))),E.splice(0,E.length,..._),u="frame-locator";continue}const m=a[f+1],y=It({parts:[d]}),S=n.generateLocator(g,"default",y);if(m&&["internal:has-text","internal:has-not-text"].includes(m.name)){const{exact:E,text:x}=Ra(m.body);if(!E){const _=n.generateLocator("locator",m.name==="internal:has-text"?"has-text":"has-not-text",x,{exact:E}),A={};m.name==="internal:has-text"?A.hasText=x:A.hasNotText=x;const C=n.generateLocator(g,"default",y,A);o.push([n.chainLocators([S,_]),C]),f++;continue}}let w;if(["xpath","css"].includes(d.name)){const E=It({parts:[d]},!0);w=n.generateLocator(g,"default",E)}o.push([S,w].filter(Boolean))}return v_(n,o,r)}function v_(n,e,i){const r=e.map(()=>""),a=[],o=u=>{if(u===e.length)return a.push(n.chainLocators(r)),a.length<i;for(const f of e[u])if(r[u]=f,!o(u+1))return!1;return!0};return o(0),a}function Ra(n){let e=!1;const i=n.match(/^\/(.*)\/([igm]*)$/);return i?{text:new RegExp(i[1],i[2])}:(n.endsWith('"')?(n=JSON.parse(n),e=!0):n.endsWith('"s')?(n=JSON.parse(n.substring(0,n.length-1)),e=!0):n.endsWith('"i')&&(n=JSON.parse(n.substring(0,n.length-1)),e=!1),{exact:e,text:n})}class S_{constructor(e){this.preferredQuote=e}generateLocator(e,i,r,a={}){switch(i){case"default":return a.hasText!==void 0?`locator(${this.quote(r)}, { hasText: ${this.toHasText(a.hasText)} })`:a.hasNotText!==void 0?`locator(${this.quote(r)}, { hasNotText: ${this.toHasText(a.hasNotText)} })`:`locator(${this.quote(r)})`;case"frame-locator":return`frameLocator(${this.quote(r)})`;case"frame":return"contentFrame()";case"nth":return`nth(${r})`;case"first":return"first()";case"last":return"last()";case"visible":return`filter({ visible: ${r==="true"?"true":"false"} })`;case"role":const o=[];We(a.name)?o.push(`name: ${this.regexToSourceString(a.name)}`):typeof a.name=="string"&&o.push(`name: ${this.quote(a.name)}`),We(a.description)?o.push(`description: ${this.regexToSourceString(a.description)}`):typeof a.description=="string"&&o.push(`description: ${this.quote(a.description)}`),a.exact&&(typeof a.name=="string"||typeof a.description=="string")&&o.push("exact: true");for(const{name:f,value:d}of a.attrs)o.push(`${f}: ${typeof d=="string"?this.quote(d):d}`);const u=o.length?`, { ${o.join(", ")} }`:"";return`getByRole(${this.quote(r)}${u})`;case"has-text":return`filter({ hasText: ${this.toHasText(r)} })`;case"has-not-text":return`filter({ hasNotText: ${this.toHasText(r)} })`;case"has":return`filter({ has: ${r} })`;case"hasNot":return`filter({ hasNot: ${r} })`;case"and":return`and(${r})`;case"or":return`or(${r})`;case"chain":return`locator(${r})`;case"test-id":return`getByTestId(${this.toTestIdValue(r)})`;case"text":return this.toCallWithExact("getByText",r,!!a.exact);case"alt":return this.toCallWithExact("getByAltText",r,!!a.exact);case"placeholder":return this.toCallWithExact("getByPlaceholder",r,!!a.exact);case"label":return this.toCallWithExact("getByLabel",r,!!a.exact);case"title":return this.toCallWithExact("getByTitle",r,!!a.exact);default:throw new Error("Unknown selector kind "+i)}}chainLocators(e){return e.join(".")}regexToSourceString(e){return Sc(String(e))}toCallWithExact(e,i,r){return We(i)?`${e}(${this.regexToSourceString(i)})`:r?`${e}(${this.quote(i)}, { exact: true })`:`${e}(${this.quote(i)})`}toHasText(e){return We(e)?this.regexToSourceString(e):this.quote(e)}toTestIdValue(e){return We(e)?this.regexToSourceString(e):this.quote(e)}quote(e){return vc(e,this.preferredQuote??"'")}}class w_{generateLocator(e,i,r,a={}){switch(i){case"default":return a.hasText!==void 0?`locator(${this.quote(r)}, has_text=${this.toHasText(a.hasText)})`:a.hasNotText!==void 0?`locator(${this.quote(r)}, has_not_text=${this.toHasText(a.hasNotText)})`:`locator(${this.quote(r)})`;case"frame-locator":return`frame_locator(${this.quote(r)})`;case"frame":return"content_frame";case"nth":return`nth(${r})`;case"first":return"first";case"last":return"last";case"visible":return`filter(visible=${r==="true"?"True":"False"})`;case"role":const o=[];We(a.name)?o.push(`name=${this.regexToString(a.name)}`):typeof a.name=="string"&&o.push(`name=${this.quote(a.name)}`),We(a.description)?o.push(`description=${this.regexToString(a.description)}`):typeof a.description=="string"&&o.push(`description=${this.quote(a.description)}`),a.exact&&(typeof a.name=="string"||typeof a.description=="string")&&o.push("exact=True");for(const{name:f,value:d}of a.attrs){let g=typeof d=="string"?this.quote(d):d;typeof d=="boolean"&&(g=d?"True":"False"),o.push(`${q0(f)}=${g}`)}const u=o.length?`, ${o.join(", ")}`:"";return`get_by_role(${this.quote(r)}${u})`;case"has-text":return`filter(has_text=${this.toHasText(r)})`;case"has-not-text":return`filter(has_not_text=${this.toHasText(r)})`;case"has":return`filter(has=${r})`;case"hasNot":return`filter(has_not=${r})`;case"and":return`and_(${r})`;case"or":return`or_(${r})`;case"chain":return`locator(${r})`;case"test-id":return`get_by_test_id(${this.toTestIdValue(r)})`;case"text":return this.toCallWithExact("get_by_text",r,!!a.exact);case"alt":return this.toCallWithExact("get_by_alt_text",r,!!a.exact);case"placeholder":return this.toCallWithExact("get_by_placeholder",r,!!a.exact);case"label":return this.toCallWithExact("get_by_label",r,!!a.exact);case"title":return this.toCallWithExact("get_by_title",r,!!a.exact);default:throw new Error("Unknown selector kind "+i)}}chainLocators(e){return e.join(".")}regexToString(e){const i=e.flags.includes("i")?", re.IGNORECASE":"";return`re.compile(r"${Sc(e.source).replace(/\\\//,"/").replace(/"/g,'\\"')}"${i})`}toCallWithExact(e,i,r){return We(i)?`${e}(${this.regexToString(i)})`:r?`${e}(${this.quote(i)}, exact=True)`:`${e}(${this.quote(i)})`}toHasText(e){return We(e)?this.regexToString(e):`${this.quote(e)}`}toTestIdValue(e){return We(e)?this.regexToString(e):this.quote(e)}quote(e){return vc(e,'"')}}class x_{generateLocator(e,i,r,a={}){let o;switch(e){case"page":o="Page";break;case"frame-locator":o="FrameLocator";break;case"locator":o="Locator";break}switch(i){case"default":return a.hasText!==void 0?`locator(${this.quote(r)}, new ${o}.LocatorOptions().setHasText(${this.toHasText(a.hasText)}))`:a.hasNotText!==void 0?`locator(${this.quote(r)}, new ${o}.LocatorOptions().setHasNotText(${this.toHasText(a.hasNotText)}))`:`locator(${this.quote(r)})`;case"frame-locator":return`frameLocator(${this.quote(r)})`;case"frame":return"contentFrame()";case"nth":return`nth(${r})`;case"first":return"first()";case"last":return"last()";case"visible":return`filter(new ${o}.FilterOptions().setVisible(${r==="true"?"true":"false"}))`;case"role":const u=[];We(a.name)?u.push(`.setName(${this.regexToString(a.name)})`):typeof a.name=="string"&&u.push(`.setName(${this.quote(a.name)})`),We(a.description)?u.push(`.setDescription(${this.regexToString(a.description)})`):typeof a.description=="string"&&u.push(`.setDescription(${this.quote(a.description)})`),a.exact&&(typeof a.name=="string"||typeof a.description=="string")&&u.push(".setExact(true)");for(const{name:d,value:g}of a.attrs)u.push(`.set${ac(d)}(${typeof g=="string"?this.quote(g):g})`);const f=u.length?`, new ${o}.GetByRoleOptions()${u.join("")}`:"";return`getByRole(AriaRole.${q0(r).toUpperCase()}${f})`;case"has-text":return`filter(new ${o}.FilterOptions().setHasText(${this.toHasText(r)}))`;case"has-not-text":return`filter(new ${o}.FilterOptions().setHasNotText(${this.toHasText(r)}))`;case"has":return`filter(new ${o}.FilterOptions().setHas(${r}))`;case"hasNot":return`filter(new ${o}.FilterOptions().setHasNot(${r}))`;case"and":return`and(${r})`;case"or":return`or(${r})`;case"chain":return`locator(${r})`;case"test-id":return`getByTestId(${this.toTestIdValue(r)})`;case"text":return this.toCallWithExact(o,"getByText",r,!!a.exact);case"alt":return this.toCallWithExact(o,"getByAltText",r,!!a.exact);case"placeholder":return this.toCallWithExact(o,"getByPlaceholder",r,!!a.exact);case"label":return this.toCallWithExact(o,"getByLabel",r,!!a.exact);case"title":return this.toCallWithExact(o,"getByTitle",r,!!a.exact);default:throw new Error("Unknown selector kind "+i)}}chainLocators(e){return e.join(".")}regexToString(e){const i=e.flags.includes("i")?", Pattern.CASE_INSENSITIVE":"";return`Pattern.compile(${this.quote(Sc(e.source))}${i})`}toCallWithExact(e,i,r,a){return We(r)?`${i}(${this.regexToString(r)})`:a?`${i}(${this.quote(r)}, new ${e}.${ac(i)}Options().setExact(true))`:`${i}(${this.quote(r)})`}toHasText(e){return We(e)?this.regexToString(e):this.quote(e)}toTestIdValue(e){return We(e)?this.regexToString(e):this.quote(e)}quote(e){return vc(e,'"')}}class __{generateLocator(e,i,r,a={}){switch(i){case"default":return a.hasText!==void 0?`Locator(${this.quote(r)}, new() { ${this.toHasText(a.hasText)} })`:a.hasNotText!==void 0?`Locator(${this.quote(r)}, new() { ${this.toHasNotText(a.hasNotText)} })`:`Locator(${this.quote(r)})`;case"frame-locator":return`FrameLocator(${this.quote(r)})`;case"frame":return"ContentFrame";case"nth":return`Nth(${r})`;case"first":return"First";case"last":return"Last";case"visible":return`Filter(new() { Visible = ${r==="true"?"true":"false"} })`;case"role":const o=[];We(a.name)?o.push(`NameRegex = ${this.regexToString(a.name)}`):typeof a.name=="string"&&o.push(`Name = ${this.quote(a.name)}`),We(a.description)?o.push(`DescriptionRegex = ${this.regexToString(a.description)}`):typeof a.description=="string"&&o.push(`Description = ${this.quote(a.description)}`),a.exact&&(typeof a.name=="string"||typeof a.description=="string")&&o.push("Exact = true");for(const{name:f,value:d}of a.attrs)o.push(`${ac(f)} = ${typeof d=="string"?this.quote(d):d}`);const u=o.length?`, new() { ${o.join(", ")} }`:"";return`GetByRole(AriaRole.${ac(r)}${u})`;case"has-text":return`Filter(new() { ${this.toHasText(r)} })`;case"has-not-text":return`Filter(new() { ${this.toHasNotText(r)} })`;case"has":return`Filter(new() { Has = ${r} })`;case"hasNot":return`Filter(new() { HasNot = ${r} })`;case"and":return`And(${r})`;case"or":return`Or(${r})`;case"chain":return`Locator(${r})`;case"test-id":return`GetByTestId(${this.toTestIdValue(r)})`;case"text":return this.toCallWithExact("GetByText",r,!!a.exact);case"alt":return this.toCallWithExact("GetByAltText",r,!!a.exact);case"placeholder":return this.toCallWithExact("GetByPlaceholder",r,!!a.exact);case"label":return this.toCallWithExact("GetByLabel",r,!!a.exact);case"title":return this.toCallWithExact("GetByTitle",r,!!a.exact);default:throw new Error("Unknown selector kind "+i)}}chainLocators(e){return e.join(".")}regexToString(e){const i=e.flags.includes("i")?", RegexOptions.IgnoreCase":"";return`new Regex(${this.quote(Sc(e.source))}${i})`}toCallWithExact(e,i,r){return We(i)?`${e}(${this.regexToString(i)})`:r?`${e}(${this.quote(i)}, new() { Exact = true })`:`${e}(${this.quote(i)})`}toHasText(e){return We(e)?`HasTextRegex = ${this.regexToString(e)}`:`HasText = ${this.quote(e)}`}toTestIdValue(e){return We(e)?this.regexToString(e):this.quote(e)}toHasNotText(e){return We(e)?`HasNotTextRegex = ${this.regexToString(e)}`:`HasNotText = ${this.quote(e)}`}quote(e){return vc(e,'"')}}class E_{generateLocator(e,i,r,a={}){return JSON.stringify({kind:i,body:r,options:a})}chainLocators(e){const i=e.map(r=>JSON.parse(r));for(let r=0;r<i.length-1;++r)i[r].next=i[r+1];return JSON.stringify(i[0])}}const G0={javascript:S_,python:w_,java:x_,csharp:__,jsonl:E_};function We(n){return n instanceof RegExp}const db=new Map;function T_({name:n,rootItem:e,render:i,title:r,icon:a,isError:o,isVisible:u,selectedItem:f,onAccepted:d,onSelected:g,onHighlighted:m,treeState:y,setTreeState:S,noItemsMessage:w,dataTestId:E,autoExpandDepth:x,revealSelectedKey:_}){const A=R.useMemo(()=>A_(e,f,y.expandedItems,x||0,u),[e,f,y,x,u]),C=R.useRef(null),[H,V]=R.useState();R.useEffect(()=>{m==null||m(H)},[m,H]),R.useEffect(()=>{const j=C.current;if(!j)return;const I=()=>{db.set(n,j.scrollTop)};return j.addEventListener("scroll",I,{passive:!0}),()=>j.removeEventListener("scroll",I)},[n]),R.useEffect(()=>{C.current&&(C.current.scrollTop=db.get(n)||0)},[n]),R.useEffect(()=>{var I;if(_===void 0)return;const j=(I=C.current)==null?void 0:I.querySelector('[aria-selected="true"]');j&&td(j)},[_]);const K=R.useCallback(j=>{const{expanded:I}=A.get(j);if(I){for(let O=f;O;O=O.parent)if(O===j){g==null||g(j);break}y.expandedItems.set(j.id,!1)}else y.expandedItems.set(j.id,!0);S({...y})},[A,f,g,y,S]),Q=R.useCallback(j=>{const{expanded:I}=A.get(j),O=[j];for(;O.length;){const P=O.pop();O.push(...P.children),y.expandedItems.set(P.id,!I)}S({...y})},[A,y,S]);return b.jsx("div",{className:ut("tree-view vbox",n+"-tree-view"),"data-testid":E||n+"-tree",children:b.jsxs("div",{className:ut("tree-view-content"),role:A.size>0?"tree":void 0,tabIndex:0,onKeyDown:j=>{if(f&&j.key==="Enter"){d==null||d(f);return}if(j.key!=="ArrowDown"&&j.key!=="ArrowUp"&&j.key!=="ArrowLeft"&&j.key!=="ArrowRight")return;if(j.stopPropagation(),j.preventDefault(),f&&j.key==="ArrowLeft"){const{expanded:O,parent:P}=A.get(f);O?(y.expandedItems.set(f.id,!1),S({...y})):P&&(g==null||g(P));return}if(f&&j.key==="ArrowRight"){f.children.length&&(y.expandedItems.set(f.id,!0),S({...y}));return}let I=f;if(j.key==="ArrowDown"&&(f?I=A.get(f).next:A.size&&(I=[...A.keys()][0])),j.key==="ArrowUp"){if(f)I=A.get(f).prev;else if(A.size){const O=[...A.keys()];I=O[O.length-1]}}m==null||m(void 0),I&&(g==null||g(I)),V(void 0)},ref:C,children:[w&&A.size===0&&b.jsx("div",{className:"tree-view-empty",children:w}),e.children.map(j=>A.get(j)&&b.jsx(K0,{item:j,treeItems:A,selectedItem:f,onSelected:g,onAccepted:d,isError:o,toggleExpanded:K,toggleSubtree:Q,highlightedItem:H,setHighlightedItem:V,render:i,icon:a,title:r},j.id))]})})}function K0({item:n,treeItems:e,selectedItem:i,onSelected:r,highlightedItem:a,setHighlightedItem:o,isError:u,onAccepted:f,toggleExpanded:d,toggleSubtree:g,render:m,title:y,icon:S}){const w=R.useId(),E=R.useRef(null);R.useEffect(()=>{(i==null?void 0:i.id)===n.id&&E.current&&td(E.current)},[n.id,i==null?void 0:i.id]);const x=e.get(n),_=x.depth,A=x.expanded;let C="codicon-blank";typeof A=="boolean"&&(C=A?"codicon-chevron-down":"codicon-chevron-right");const H=m(n),V=A&&n.children.length?n.children:[],K=y==null?void 0:y(n),Q=(S==null?void 0:S(n))||"codicon-blank";return b.jsxs("div",{ref:E,role:"treeitem","aria-selected":n===i,"aria-expanded":A,"aria-controls":w,title:K,className:"vbox",style:{flex:"none"},children:[b.jsxs("div",{onDoubleClick:()=>f==null?void 0:f(n),className:ut("tree-view-entry",i===n&&"selected",a===n&&"highlighted",(u==null?void 0:u(n))&&"error"),onClick:()=>r==null?void 0:r(n),onMouseEnter:()=>o(n),onMouseLeave:()=>o(void 0),children:[_?new Array(_).fill(0).map((j,I)=>b.jsx("div",{className:"tree-view-indent"},"indent-"+I)):void 0,b.jsx("div",{"aria-hidden":"true",className:"codicon "+C,style:{minWidth:16,marginRight:4},onDoubleClick:j=>{j.preventDefault(),j.stopPropagation()},onClick:j=>{j.stopPropagation(),j.preventDefault(),j.altKey?g(n):d(n)}}),S&&b.jsx("div",{className:"codicon "+Q,style:{minWidth:16,marginRight:4},"aria-label":"["+Q.replace("codicon","icon")+"]"}),typeof H=="string"?b.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:H}):H]}),!!V.length&&b.jsx("div",{id:w,role:"group",children:V.map(j=>e.get(j)&&b.jsx(K0,{item:j,treeItems:e,selectedItem:i,onSelected:r,onAccepted:f,isError:u,toggleExpanded:d,toggleSubtree:g,highlightedItem:a,setHighlightedItem:o,render:m,title:y,icon:S},j.id))})]})}function Dh(n,e,i){const r=i.get(n.id);if(r!==void 0)return r;const a=e(n),o=a==="if-needed"?n.children.some(u=>Dh(u,e,i)):a;return i.set(n.id,o),o}function A_(n,e,i,r,a=()=>!0){const o=new Map;if(!Dh(n,a,o))return new Map;const u=new Map,f=new Set;for(let m=e==null?void 0:e.parent;m;m=m.parent)f.add(m.id);let d=null;const g=(m,y)=>{for(const S of m.children){if(!Dh(S,a,o))continue;const w=f.has(S.id)||i.get(S.id),E=r>y&&u.size<25&&w!==!1,x=S.children.length?w??E:void 0,_={depth:y,expanded:x,parent:n===m?null:m,next:null,prev:d};d&&(u.get(d).next=S),d=S,u.set(S,_),x&&g(S,y+1)}};return g(n,0),u}const ct=R.forwardRef(function({children:e,title:i="",icon:r,disabled:a=!1,toggled:o=!1,onClick:u=()=>{},style:f,testId:d,className:g,ariaLabel:m,errorBadge:y},S){const w=R.useId();return b.jsxs("button",{ref:S,className:ut(g,"toolbar-button",r,o&&"toggled"),onMouseDown:pb,onClick:u,onDoubleClick:pb,title:i,disabled:!!a,style:f,"data-testid":d,"aria-label":m||i,"aria-describedby":y?w:void 0,children:[r&&b.jsx("span",{className:`codicon codicon-${r}`,style:e?{marginRight:5}:{}}),e,y&&b.jsx("span",{id:w,className:"toolbar-button-error-badge",title:y,"aria-label":y})]})}),pb=n=>{n.stopPropagation(),n.preventDefault()};function X0(n){return n==="scheduled"?"codicon-clock":n==="running"?"codicon-loading":n==="failed"?"codicon-error":n==="passed"?"codicon-check":n==="skipped"?"codicon-circle-slash":"codicon-circle-outline"}function C_(n){return n==="scheduled"?"Pending":n==="running"?"Running":n==="failed"?"Failed":n==="passed"?"Passed":n==="skipped"?"Skipped":"Did not run"}const N_=T_,k_=({actions:n,selectedAction:e,selectedTime:i,setSelectedTime:r,treeState:a,setTreeState:o,sdkLanguage:u,onSelected:f,onHighlighted:d,revealConsole:g,revealActionAttachment:m,isLive:y,actionFilterText:S})=>{const{rootItem:w,itemMap:E}=R.useMemo(()=>v0(n),[n]),{selectedItem:x}=R.useMemo(()=>({selectedItem:e?E.get(e.callId):void 0}),[E,e]),_=R.useCallback(O=>{var P;return!!((P=O.action.error)!=null&&P.message)},[]),A=R.useCallback(O=>r({minimum:O.action.startTime,maximum:O.action.endTime}),[r]),C=R.useCallback(O=>{var J;const P=!!m&&!!((J=O.action.attachments)!=null&&J.length);return od(O.action,{sdkLanguage:u,revealConsole:g,revealActionAttachment:()=>m==null?void 0:m(O.action.callId),isLive:y,showDuration:!0,showBadges:!0,showAttachments:P})},[y,g,m,u]),H=R.useCallback(O=>{if(!(!i||!O.action||O.action.startTime<=i.maximum&&O.action.endTime>=i.minimum))return!1;const J=cd(O.action).title;return S?J.toLowerCase().includes(S.toLowerCase())?!0:"if-needed":!0},[i,S]),V=R.useCallback(O=>{f==null||f(O.action)},[f]),K=R.useCallback(O=>{d==null||d(O==null?void 0:O.action)},[d]),[Q,j]=R.useState(),I=R.useCallback(()=>{r(void 0),j(O=>(O??0)+1)},[r]);return b.jsxs("div",{className:"vbox action-list-container",children:[i&&b.jsxs("div",{className:"action-list-show-all",onClick:I,children:[b.jsx("span",{className:"codicon codicon-triangle-left"}),"Show all"]}),b.jsx(N_,{name:"actions",rootItem:w,treeState:a,setTreeState:o,selectedItem:x,onSelected:V,onHighlighted:K,onAccepted:A,isError:_,isVisible:H,render:C,autoExpandDepth:S!=null&&S.trim()?5:0,revealSelectedKey:Q})]})},od=(n,e)=>{var _;const{sdkLanguage:i,revealConsole:r,revealActionAttachment:a,isLive:o,showDuration:u,showBadges:f,showAttachments:d}=e,{errors:g,warnings:m}=Kx(n),y=n.params.selector?I0(i||"javascript",n.params.selector):void 0,S=n.class==="Test"&&n.method==="test.step"&&((_=n.annotations)==null?void 0:_.some(A=>A.type==="skip"));let w="";n.endTime?w=yt(n.endTime-n.startTime):n.error?w="Timed out":o||(w="-");const{elements:E,title:x}=cd(n);return b.jsxs("div",{className:"action-title vbox",children:[b.jsxs("div",{className:"hbox",children:[b.jsx("span",{className:"action-title-method",title:x,children:E}),(u||f||d||S)&&b.jsx("div",{className:"spacer"}),d&&b.jsx(ct,{icon:"attach",title:"Open Attachment",onClick:()=>a==null?void 0:a()}),u&&!S&&b.jsx("div",{className:"action-duration",children:w||b.jsx("span",{className:"codicon codicon-loading"})}),S&&b.jsx("span",{className:ut("action-skipped","codicon",X0("skipped")),title:"skipped"}),f&&b.jsxs("div",{className:"action-icons",onClick:()=>r==null?void 0:r(),children:[!!g&&b.jsxs("div",{className:"action-icon",children:[b.jsx("span",{className:"codicon codicon-error"}),b.jsx("span",{className:"action-icon-value",children:g})]}),!!m&&b.jsxs("div",{className:"action-icon",children:[b.jsx("span",{className:"codicon codicon-warning"}),b.jsx("span",{className:"action-icon-value",children:m})]})]})]}),y&&b.jsx("div",{className:"action-title-selector",title:y,children:y})]})};function cd(n,e){var g;let i=n.title??((g=id({type:n.class,method:n.method}))==null?void 0:g.title)??n.method;i=i.replace(/\n/g," ");const r=[],a=[];let o=0;const u=/\{([^}]+)\}/g;let f;for(;(f=u.exec(i))!==null;){const[m,y]=f,S=i.slice(o,f.index);r.push(S),a.push(S);const w=g0(n.params,y);w===void 0?(r.push(m),a.push(m)):f.index===0?(r.push(w),a.push(w)):(r.push(b.jsx("span",{className:"action-title-param",children:w},r.length)),a.push(w)),o=f.index+m.length}if(o<i.length){const m=i.slice(o);r.push(m),a.push(m)}const d=n.params.selector?I0("javascript",n.params.selector):void 0;return d&&(a.push(" "),a.push(d)),{elements:r,title:a.join("")}}const ud=({value:n,description:e})=>{const[i,r]=R.useState("copy"),a=R.useCallback(()=>{(typeof n=="function"?n():Promise.resolve(n)).then(u=>{navigator.clipboard.writeText(u).then(()=>{r("check"),setTimeout(()=>{r("copy")},3e3)},()=>{r("close")})},()=>{r("close")})},[n]);return b.jsx(ct,{title:e||"Copy",icon:i,onClick:a})},Po=({value:n,description:e,copiedDescription:i=e,style:r})=>{const[a,o]=R.useState(!1),u=R.useCallback(async()=>{const f=typeof n=="function"?await n():n;await navigator.clipboard.writeText(f),o(!0),setTimeout(()=>o(!1),3e3)},[n]);return b.jsx(ct,{style:r,title:e,onClick:u,className:"copy-to-clipboard-text-button",children:a?i:e})},ai=({text:n})=>b.jsx("div",{className:"fill",style:{display:"flex",alignItems:"center",justifyContent:"center",fontSize:24,fontWeight:"bold",opacity:.5},children:n}),M_=({action:n,startTimeOffset:e,sdkLanguage:i})=>{const r=R.useMemo(()=>Object.keys((n==null?void 0:n.params)??{}).filter(f=>f!=="info"),[n]);if(!n)return b.jsx(ai,{text:"No action selected"});const a=n.startTime-e,o=yt(a),{title:u}=cd(n);return b.jsxs("div",{className:"call-tab",children:[b.jsx("div",{className:"call-line",children:u}),b.jsx("div",{className:"call-section",children:"Time"}),Do({name:"start",type:"literal",text:o}),Do({name:"duration",type:"literal",text:O_(n)}),!!r.length&&b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"call-section",children:"Parameters"}),r.map(f=>Do(gb(n,f,n.params[f],i)))]}),!!n.result&&b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"call-section",children:"Return value"}),Object.keys(n.result).map(f=>Do(gb(n,f,n.result[f],i)))]})]})};function O_(n){return n.endTime?yt(n.endTime-n.startTime):n.error?"Timed Out":"Running"}function Do(n){let e=n.text;return e.length>1e3&&(e=e.slice(0,1e3)+"…"),e=e.replace(/\n/g,"↵"),n.type==="string"&&(e=`"${e}"`),b.jsxs("div",{className:"call-line",children:[n.name,":",b.jsx("span",{className:ut("call-value",n.type),title:e,children:e}),["literal","string","number","object","locator"].includes(n.type)&&b.jsx(ud,{value:n.text})]},n.name)}function gb(n,e,i,r){const a=n.method.includes("eval")||n.method==="waitForFunction";if(e==="files")return{text:"<files>",type:"string",name:e};if((e==="eventInit"||e==="expectedValue"||e==="arg"&&a)&&(i=Qa(i.value,new Array(10).fill({handle:"<handle>"}))),e==="value"&&a&&(i=Qa(i,new Array(10).fill({handle:"<handle>"}))),e==="received"&&n.method==="expect"){const f=i&&typeof i=="object"&&("value"in i||"ariaSnapshot"in i)?i.value:i;i=f!==void 0?Qa(f,new Array(10).fill({handle:"<handle>"})):void 0}if(e==="selector")return{text:Ri(r||"javascript",n.params.selector),type:"locator",name:"locator"};const o=typeof i;return o!=="object"||i===null?{text:String(i),type:o,name:e}:i.guid?{text:"<handle>",type:"handle",name:e}:{text:JSON.stringify(i),type:"object",name:e}}function Qa(n,e){if(n.n!==void 0)return n.n;if(n.s!==void 0)return n.s;if(n.b!==void 0)return n.b;if(n.v!==void 0){if(n.v==="undefined")return;if(n.v==="null")return null;if(n.v==="NaN")return NaN;if(n.v==="Infinity")return 1/0;if(n.v==="-Infinity")return-1/0;if(n.v==="-0")return-0}if(n.d!==void 0)return new Date(n.d);if(n.r!==void 0)return new RegExp(n.r.p,n.r.f);if(n.a!==void 0)return n.a.map(i=>Qa(i,e));if(n.o!==void 0){const i={};for(const{k:r,v:a}of n.o)i[r]=Qa(a,e);return i}return n.h!==void 0?e===void 0?"<object>":e[n.h]:"<object>"}const mb=new Map;function hl({name:n,items:e=[],id:i,render:r,icon:a,isError:o,isWarning:u,isInfo:f,selectedItem:d,onAccepted:g,onSelected:m,onHighlighted:y,onIconClicked:S,noItemsMessage:w,dataTestId:E,notSelectable:x,ariaLabel:_}){const A=R.useRef(null),[C,H]=R.useState();return R.useEffect(()=>{y==null||y(C)},[y,C]),R.useEffect(()=>{const V=A.current;if(!V)return;const K=()=>{mb.set(n,V.scrollTop)};return V.addEventListener("scroll",K,{passive:!0}),()=>V.removeEventListener("scroll",K)},[n]),R.useEffect(()=>{A.current&&(A.current.scrollTop=mb.get(n)||0)},[n]),b.jsx("div",{className:ut("list-view vbox",n+"-list-view"),role:e.length>0?"listbox":void 0,"aria-label":_,children:b.jsxs("div",{className:ut("list-view-content",x&&"not-selectable"),tabIndex:0,onKeyDown:V=>{var I;if(d&&V.key==="Enter"){g==null||g(d,e.indexOf(d));return}if(V.key!=="ArrowDown"&&V.key!=="ArrowUp")return;V.stopPropagation(),V.preventDefault();const K=d?e.indexOf(d):-1;let Q=K;V.key==="ArrowDown"&&(K===-1?Q=0:Q=Math.min(K+1,e.length-1)),V.key==="ArrowUp"&&(K===-1?Q=e.length-1:Q=Math.max(K-1,0));const j=(I=A.current)==null?void 0:I.children.item(Q);td(j||void 0),y==null||y(void 0),m==null||m(e[Q],Q),H(void 0)},ref:A,children:[w&&e.length===0&&b.jsx("div",{className:"list-view-empty",children:w}),e.map((V,K)=>{const Q=r(V,K);return b.jsxs("div",{onDoubleClick:()=>g==null?void 0:g(V,K),role:"option",className:ut("list-view-entry",d===V&&"selected",!x&&C===V&&"highlighted",(o==null?void 0:o(V,K))&&"error",(u==null?void 0:u(V,K))&&"warning",(f==null?void 0:f(V,K))&&"info"),"aria-selected":d===V,onClick:()=>m==null?void 0:m(V,K),onMouseEnter:()=>H(V),onMouseLeave:()=>H(void 0),children:[a&&b.jsx("div",{className:"codicon "+(a(V,K)||"codicon-blank"),style:{minWidth:16,marginRight:4},onDoubleClick:j=>{j.preventDefault(),j.stopPropagation()},onClick:j=>{j.stopPropagation(),j.preventDefault(),S==null||S(V,K)}}),typeof Q=="string"?b.jsx("div",{style:{textOverflow:"ellipsis",overflow:"hidden"},children:Q}):Q]},(i==null?void 0:i(V,K))||K)})]})})}const j_=hl,L_=({action:n,isLive:e})=>{const i=R.useMemo(()=>{var u;if(!n||!n.log.length)return[];const r=n.log,a=n.context.wallTime-n.context.startTime,o=[];for(let f=0;f<r.length;++f){let d="";if(r[f].time!==-1){const g=(u=r[f])==null?void 0:u.time;f+1<r.length?d=yt(r[f+1].time-g):n.endTime>0?d=yt(n.endTime-g):e?d=yt(Date.now()-a-g):d="-"}o.push({message:r[f].message,time:d})}return o},[n,e]);return i.length?b.jsx(j_,{name:"log",ariaLabel:"Log entries",items:i,render:r=>b.jsxs("div",{className:"log-list-item",children:[b.jsx("span",{className:"log-list-duration",children:r.time}),r.message]}),notSelectable:!0}):b.jsx(ai,{text:"No log entries"})};function sl(n,e){const i=/(\x1b\[(\d+(;\d+)*)m)|([^\x1b]+)/g,r=[];let a,o={},u=!1,f=e==null?void 0:e.fg,d=e==null?void 0:e.bg;for(;(a=i.exec(n))!==null;){const[,,g,,m]=a;if(g)for(const y of g.split(";")){const S=+y;switch(S){case 0:o={};break;case 1:o["font-weight"]="bold";break;case 2:o.opacity="0.8";break;case 3:o["font-style"]="italic";break;case 4:o["text-decoration"]="underline";break;case 7:u=!0;break;case 8:o.display="none";break;case 9:o["text-decoration"]="line-through";break;case 22:delete o["font-weight"],delete o["font-style"],delete o.opacity,delete o["text-decoration"];break;case 23:delete o["font-weight"],delete o["font-style"],delete o.opacity;break;case 24:delete o["text-decoration"];break;case 27:u=!1;break;case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:f=yb[S-30];break;case 39:f=e==null?void 0:e.fg;break;case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:d=yb[S-40];break;case 49:d=e==null?void 0:e.bg;break;case 53:o["text-decoration"]="overline";break;case 90:case 91:case 92:case 93:case 94:case 95:case 96:case 97:f=bb[S-90];break;case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:d=bb[S-100];break}}else if(m){const y={...o},S=u?d:f;S!==void 0&&(y.color=S),u&&f&&(y["background-color"]=f),r.push(`<span style="${D_(y)}">${R_(m)}</span>`)}}return r.join("")}const yb={0:"var(--vscode-terminal-ansiBlack)",1:"var(--vscode-terminal-ansiRed)",2:"var(--vscode-terminal-ansiGreen)",3:"var(--vscode-terminal-ansiYellow)",4:"var(--vscode-terminal-ansiBlue)",5:"var(--vscode-terminal-ansiMagenta)",6:"var(--vscode-terminal-ansiCyan)",7:"var(--vscode-terminal-ansiWhite)"},bb={0:"var(--vscode-terminal-ansiBrightBlack)",1:"var(--vscode-terminal-ansiBrightRed)",2:"var(--vscode-terminal-ansiBrightGreen)",3:"var(--vscode-terminal-ansiBrightYellow)",4:"var(--vscode-terminal-ansiBrightBlue)",5:"var(--vscode-terminal-ansiBrightMagenta)",6:"var(--vscode-terminal-ansiBrightCyan)",7:"var(--vscode-terminal-ansiBrightWhite)"};function R_(n){return n.replace(/[&"<>]/g,e=>({"&":"&amp;",'"':"&quot;","<":"&lt;",">":"&gt;"})[e])}function D_(n){return Object.entries(n).map(([e,i])=>`${e}: ${i}`).join("; ")}const z_=({error:n})=>{const e=R.useMemo(()=>sl(n,{bg:"var(--vscode-editor-background)",fg:"var(--vscode-editor-foreground)"}),[n]);return b.jsx("div",{className:"error-message",dangerouslySetInnerHTML:{__html:e||""}})},Y0=({cursor:n,onPaneMouseMove:e,onPaneMouseUp:i,onPaneDoubleClick:r})=>(Et.useEffect(()=>{const a=document.createElement("div");return a.style.position="fixed",a.style.top="0",a.style.right="0",a.style.bottom="0",a.style.left="0",a.style.zIndex="9999",a.style.cursor=n,document.body.appendChild(a),e&&a.addEventListener("mousemove",e),i&&a.addEventListener("mouseup",i),r&&document.body.addEventListener("dblclick",r),()=>{e&&a.removeEventListener("mousemove",e),i&&a.removeEventListener("mouseup",i),r&&document.body.removeEventListener("dblclick",r),document.body.removeChild(a)}},[n,e,i,r]),b.jsx(b.Fragment,{})),U_={position:"absolute",top:0,right:0,bottom:0,left:0},F0=({orientation:n,offsets:e,setOffsets:i,resizerColor:r,resizerWidth:a,minColumnWidth:o})=>{const u=o||0,[f,d]=Et.useState(null),[g,m]=gs(),y={position:"absolute",right:n==="horizontal"?void 0:0,bottom:n==="horizontal"?0:void 0,width:n==="horizontal"?7:void 0,height:n==="horizontal"?void 0:7,borderTopWidth:n==="horizontal"?void 0:(7-a)/2,borderRightWidth:n==="horizontal"?(7-a)/2:void 0,borderBottomWidth:n==="horizontal"?void 0:(7-a)/2,borderLeftWidth:n==="horizontal"?(7-a)/2:void 0,borderColor:"transparent",borderStyle:"solid",cursor:n==="horizontal"?"ew-resize":"ns-resize"};return b.jsxs("div",{style:{position:"absolute",top:0,right:0,bottom:0,left:-(7-a)/2,zIndex:100,pointerEvents:"none"},ref:m,children:[!!f&&b.jsx(Y0,{cursor:n==="horizontal"?"ew-resize":"ns-resize",onPaneMouseUp:()=>d(null),onPaneMouseMove:S=>{if(!S.buttons)d(null);else if(f){const w=n==="horizontal"?S.clientX-f.clientX:S.clientY-f.clientY,E=f.offset+w,x=f.index>0?e[f.index-1]:0,_=n==="horizontal"?g.width:g.height,A=Math.min(Math.max(x+u,E),_-u)-e[f.index];for(let C=f.index;C<e.length;++C)e[C]=e[C]+A;i([...e])}}}),e.map((S,w)=>b.jsx("div",{style:{...y,top:n==="horizontal"?0:S,left:n==="horizontal"?S:0,pointerEvents:"initial"},onMouseDown:E=>d({clientX:E.clientX,clientY:E.clientY,offset:S,index:w}),children:b.jsx("div",{style:{...U_,background:r}})},w))]})};async function fh(n){const e=new Image;return n&&(e.src=n,await new Promise((i,r)=>{e.onload=i,e.onerror=i})),e}const zh={backgroundImage:`linear-gradient(45deg, #80808020 25%, transparent 25%),
                    linear-gradient(-45deg, #80808020 25%, transparent 25%),
                    linear-gradient(45deg, transparent 75%, #80808020 75%),
                    linear-gradient(-45deg, transparent 75%, #80808020 75%)`,backgroundSize:"20px 20px",backgroundPosition:"0 0, 0 10px, 10px -10px, -10px 0px",boxShadow:`rgb(0 0 0 / 10%) 0px 1.8px 1.9px,
              rgb(0 0 0 / 15%) 0px 6.1px 6.3px,
              rgb(0 0 0 / 10%) 0px -2px 4px,
              rgb(0 0 0 / 15%) 0px -6.1px 12px,
              rgb(0 0 0 / 25%) 0px 6px 12px`},H_=({diff:n,noTargetBlank:e,hideDetails:i})=>{const[r,a]=R.useState(n.diff?"diff":"actual"),[o,u]=R.useState(!1),[f,d]=R.useState(null),[g,m]=R.useState("Expected"),[y,S]=R.useState(null),[w,E]=R.useState(null),[x,_]=gs();R.useEffect(()=>{(async()=>{var O,P,J,$;d(await fh((O=n.expected)==null?void 0:O.attachment.path)),m(((P=n.expected)==null?void 0:P.title)||"Expected"),S(await fh((J=n.actual)==null?void 0:J.attachment.path)),E(await fh(($=n.diff)==null?void 0:$.attachment.path))})()},[n]);const A=f&&y&&w,C=A?Math.max(f.naturalWidth,y.naturalWidth,200):500,H=A?Math.max(f.naturalHeight,y.naturalHeight,200):500,V=Math.min(1,(x.width-30)/C),K=Math.min(1,(x.width-50)/C/2),Q=C*V,j=H*V,I={flex:"none",margin:"0 10px",cursor:"pointer",userSelect:"none"};return b.jsx("div",{"data-testid":"test-result-image-mismatch",style:{display:"flex",flexDirection:"column",alignItems:"center",flex:"auto"},ref:_,children:A&&b.jsxs(b.Fragment,{children:[b.jsxs("div",{"data-testid":"test-result-image-mismatch-tabs",style:{display:"flex",margin:"10px 0 20px"},children:[n.diff&&b.jsx("div",{style:{...I,fontWeight:r==="diff"?600:"initial"},onClick:()=>a("diff"),children:"Diff"}),b.jsx("div",{style:{...I,fontWeight:r==="actual"?600:"initial"},onClick:()=>a("actual"),children:"Actual"}),b.jsx("div",{style:{...I,fontWeight:r==="expected"?600:"initial"},onClick:()=>a("expected"),children:g}),b.jsx("div",{style:{...I,fontWeight:r==="sxs"?600:"initial"},onClick:()=>a("sxs"),children:"Side by side"}),b.jsx("div",{style:{...I,fontWeight:r==="slider"?600:"initial"},onClick:()=>a("slider"),children:"Slider"})]}),b.jsxs("div",{style:{display:"flex",justifyContent:"center",flex:"auto",minHeight:j+60},children:[n.diff&&r==="diff"&&b.jsx(ei,{image:w,alt:"Diff",hideSize:i,canvasWidth:Q,canvasHeight:j,scale:V}),n.diff&&r==="actual"&&b.jsx(ei,{image:y,alt:"Actual",hideSize:i,canvasWidth:Q,canvasHeight:j,scale:V}),n.diff&&r==="expected"&&b.jsx(ei,{image:f,alt:g,hideSize:i,canvasWidth:Q,canvasHeight:j,scale:V}),n.diff&&r==="slider"&&b.jsx(B_,{expectedImage:f,actualImage:y,hideSize:i,canvasWidth:Q,canvasHeight:j,scale:V,expectedTitle:g}),n.diff&&r==="sxs"&&b.jsxs("div",{style:{display:"flex"},children:[b.jsx(ei,{image:f,title:g,hideSize:i,canvasWidth:K*C,canvasHeight:K*H,scale:K}),b.jsx(ei,{image:o?w:y,title:o?"Diff":"Actual",onClick:()=>u(!o),hideSize:i,canvasWidth:K*C,canvasHeight:K*H,scale:K})]}),!n.diff&&r==="actual"&&b.jsx(ei,{image:y,title:"Actual",hideSize:i,canvasWidth:Q,canvasHeight:j,scale:V}),!n.diff&&r==="expected"&&b.jsx(ei,{image:f,title:g,hideSize:i,canvasWidth:Q,canvasHeight:j,scale:V}),!n.diff&&r==="sxs"&&b.jsxs("div",{style:{display:"flex"},children:[b.jsx(ei,{image:f,title:g,canvasWidth:K*C,canvasHeight:K*H,scale:K}),b.jsx(ei,{image:y,title:"Actual",canvasWidth:K*C,canvasHeight:K*H,scale:K})]})]}),!i&&b.jsxs("div",{style:{alignSelf:"start",lineHeight:"18px",marginLeft:"15px"},children:[b.jsx("div",{children:n.diff&&b.jsx("a",{target:"_blank",href:n.diff.attachment.path,rel:"noreferrer",children:n.diff.attachment.name})}),b.jsx("div",{children:b.jsx("a",{target:e?"":"_blank",href:n.actual.attachment.path,rel:"noreferrer",children:n.actual.attachment.name})}),b.jsx("div",{children:b.jsx("a",{target:e?"":"_blank",href:n.expected.attachment.path,rel:"noreferrer",children:n.expected.attachment.name})})]})]})})},B_=({expectedImage:n,actualImage:e,canvasWidth:i,canvasHeight:r,scale:a,expectedTitle:o,hideSize:u})=>{const f={position:"absolute",top:0,left:0},[d,g]=R.useState(i/2),m=n.naturalWidth===e.naturalWidth&&n.naturalHeight===e.naturalHeight;return b.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column",userSelect:"none"},children:[!u&&b.jsxs("div",{style:{margin:5},children:[!m&&b.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"Actual "}),!m&&b.jsx("span",{children:e.naturalWidth}),!m&&b.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),!m&&b.jsx("span",{children:e.naturalHeight}),!m&&b.jsxs("span",{style:{flex:"none",margin:"0 5px 0 15px"},children:[o," "]}),b.jsx("span",{children:n.naturalWidth}),b.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),b.jsx("span",{children:n.naturalHeight})]}),b.jsxs("div",{style:{position:"relative",width:i,height:r,margin:15,...zh},children:[b.jsx(F0,{orientation:"horizontal",offsets:[d],setOffsets:y=>g(y[0]),resizerColor:"#57606a80",resizerWidth:6}),b.jsx("img",{alt:o,style:{width:n.naturalWidth*a,height:n.naturalHeight*a},draggable:"false",src:n.src}),b.jsx("div",{style:{...f,bottom:0,overflow:"hidden",width:d,...zh},children:b.jsx("img",{alt:"Actual",style:{width:e.naturalWidth*a,height:e.naturalHeight*a},draggable:"false",src:e.src})})]})]})},ei=({image:n,title:e,alt:i,hideSize:r,canvasWidth:a,canvasHeight:o,scale:u,onClick:f})=>b.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column"},children:[!r&&b.jsxs("div",{style:{margin:5},children:[e&&b.jsx("span",{style:{flex:"none",margin:"0 5px"},children:e}),b.jsx("span",{children:n.naturalWidth}),b.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),b.jsx("span",{children:n.naturalHeight})]}),b.jsx("div",{style:{display:"flex",flex:"none",width:a,height:o,margin:15,...zh},children:b.jsx("img",{width:n.naturalWidth*u,height:n.naturalHeight*u,alt:e||i,style:{cursor:f?"pointer":"initial"},draggable:"false",src:n.src,onClick:f})})]}),q_="modulepreload",$_=function(n,e){return new URL(n,e).href},vb={},I_=function(e,i,r){let a=Promise.resolve();if(i&&i.length>0){let u=function(m){return Promise.all(m.map(y=>Promise.resolve(y).then(S=>({status:"fulfilled",value:S}),S=>({status:"rejected",reason:S}))))};const f=document.getElementsByTagName("link"),d=document.querySelector("meta[property=csp-nonce]"),g=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));a=u(i.map(m=>{if(m=$_(m,r),m in vb)return;vb[m]=!0;const y=m.endsWith(".css"),S=y?'[rel="stylesheet"]':"";if(!!r)for(let x=f.length-1;x>=0;x--){const _=f[x];if(_.href===m&&(!y||_.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${m}"]${S}`))return;const E=document.createElement("link");if(E.rel=y?"stylesheet":q_,y||(E.as="script"),E.crossOrigin="",E.href=m,g&&E.setAttribute("nonce",g),document.head.appendChild(E),y)return new Promise((x,_)=>{E.addEventListener("load",x),E.addEventListener("error",()=>_(new Error(`Unable to preload CSS for ${m}`)))})}))}function o(u){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=u,window.dispatchEvent(f),!f.defaultPrevented)throw u}return a.then(u=>{for(const f of u||[])f.status==="rejected"&&o(f.reason);return e().catch(o)})},V_=20,ds=({text:n,highlighter:e,mimeType:i,linkify:r,readOnly:a,highlight:o,revealLine:u,lineNumbers:f,isFocused:d,focusOnChange:g,wrapLines:m,onChange:y,dataTestId:S,placeholder:w})=>{const[E,x]=gs(),[_]=R.useState(I_(()=>import("./codeMirrorModule-LEHpjmcn.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(V=>V.default)),A=R.useRef(null),[C,H]=R.useState();return R.useEffect(()=>{(async()=>{var I,O;const V=await _;K_(V);const K=x.current;if(!K)return;const Q=Y_(e)||X_(i)||(r?"text/linkified":"");if(A.current&&Q===A.current.cm.getOption("mode")&&!!a===A.current.cm.getOption("readOnly")&&f===A.current.cm.getOption("lineNumbers")&&m===A.current.cm.getOption("lineWrapping")&&w===A.current.cm.getOption("placeholder"))return;(O=(I=A.current)==null?void 0:I.cm)==null||O.getWrapperElement().remove();const j=V(K,{value:"",mode:Q,readOnly:!!a,lineNumbers:f,lineWrapping:m,placeholder:w,matchBrackets:!0,autoCloseBrackets:!0,extraKeys:{"Ctrl-F":"findPersistent","Cmd-F":"findPersistent"}});return A.current={cm:j},d&&j.focus(),H(j),j})()},[_,C,x,e,i,r,f,m,a,d,w]),R.useEffect(()=>{A.current&&A.current.cm.setSize(E.width,E.height)},[E]),R.useLayoutEffect(()=>{var Q;if(!C)return;let V=!1;if(C.getValue()!==n&&(C.setValue(n),V=!0,g&&(C.execCommand("selectAll"),C.focus())),V||JSON.stringify(o)!==JSON.stringify(A.current.highlight)){for(const O of A.current.highlight||[])C.removeLineClass(O.line-1,"wrap");for(const O of o||[])C.addLineClass(O.line-1,"wrap",`source-line-${O.type}`);for(const O of A.current.widgets||[])C.removeLineWidget(O);for(const O of A.current.markers||[])O.clear();const j=[],I=[];for(const O of o||[]){if(O.type!=="subtle-error"&&O.type!=="error")continue;const P=(Q=A.current)==null?void 0:Q.cm.getLine(O.line-1);if(P){const J={};J.title=O.message||"",I.push(C.markText({line:O.line-1,ch:0},{line:O.line-1,ch:O.column||P.length},{className:"source-line-error-underline",attributes:J}))}if(O.type==="error"){const J=document.createElement("div");J.innerHTML=sl(O.message||"",{bg:"var(--vscode-inputValidation-errorBackground)",fg:"var(--vscode-editor-foreground)"}),J.className="source-line-error-widget",j.push(C.addLineWidget(O.line,J,{above:!0,coverGutter:!1}))}}A.current.highlight=o,A.current.widgets=j,A.current.markers=I}typeof u=="number"&&A.current.cm.lineCount()>=u&&C.scrollIntoView({line:Math.max(0,u-1),ch:0},50);let K;return y&&(K=()=>y(C.getValue()),C.on("change",K)),()=>{K&&C.off("change",K)}},[C,n,o,u,g,y]),b.jsx("div",{"data-testid":S,className:"cm-wrapper",ref:x,onClick:G_})};function G_(n){var i;if(!(n.target instanceof HTMLElement))return;let e;n.target.classList.contains("cm-linkified")?e=n.target.textContent:n.target.classList.contains("cm-link")&&((i=n.target.nextElementSibling)!=null&&i.classList.contains("cm-url"))&&(e=n.target.nextElementSibling.textContent.slice(1,-1)),e&&(n.preventDefault(),n.stopPropagation(),window.open(e,"_blank"))}let Sb=!1;function K_(n){Sb||(Sb=!0,n.defineSimpleMode("text/linkified",{start:[{regex:h0,token:"linkified"}]}))}function X_(n){if(n){if(n.includes("javascript")||n.includes("json"))return"javascript";if(n.includes("python"))return"python";if(n.includes("csharp"))return"text/x-csharp";if(n.includes("java"))return"text/x-java";if(n.includes("markdown"))return"markdown";if(n.includes("html")||n.includes("svg"))return"htmlmixed";if(n.includes("css"))return"css"}}function Y_(n){if(n)return{javascript:"javascript",jsonl:"javascript",python:"python",csharp:"text/x-csharp",java:"text/x-java",markdown:"markdown",html:"htmlmixed",css:"css",yaml:"yaml"}[n]}function F_(n){return!!n.match(/^(application\/json|application\/.*?\+json|text\/(x-)?json)(;\s*charset=.*)?$/)}function Q_(n){return!!n.match(/^(application\/xml|application\/.*?\+xml|text\/xml)(;\s*charset=.*)?$/)}function P_(n){return!!n.match(/^(text\/.*?|application\/(json|(x-)?javascript|xml.*?|ecmascript|graphql|x-www-form-urlencoded)|image\/svg(\+xml)?|application\/.*?(\+json|\+xml))(;\s*charset=.*)?$/)}const Q0=({title:n,children:e,setExpanded:i,expanded:r,expandOnTitleClick:a,className:o})=>{const u=R.useId(),f=R.useId(),d=R.useCallback(()=>i(!r),[r,i]),g=b.jsx("div",{className:ut("codicon",r?"codicon-chevron-down":"codicon-chevron-right"),style:{cursor:"pointer",color:"var(--vscode-foreground)",marginLeft:"5px"},onClick:a?void 0:d});return b.jsxs("div",{className:ut("expandable",r&&"expanded",o),children:[a?b.jsxs("div",{id:u,role:"button","aria-expanded":r,"aria-controls":f,className:"expandable-title",onClick:d,children:[g,n]}):b.jsxs("div",{className:"expandable-title",children:[g,n]}),r&&b.jsx("div",{id:f,"aria-labelledby":u,role:"region",className:"expandable-content",children:e})]})};function P0(n){const e=[];let i=0,r;for(;(r=h0.exec(n))!==null;){const o=n.substring(i,r.index);o&&e.push(o);const u=r[0];e.push(J_(u)),i=r.index+u.length}const a=n.substring(i);return a&&e.push(a),e}function J_(n){let e=n;return e.startsWith("www.")&&(e="https://"+e),b.jsx("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:n})}const J0=R.createContext(void 0),Ln=()=>R.useContext(J0),Z_=({attachment:n,reveal:e})=>{const i=Ln(),[r,a]=R.useState(!1),[o,u]=R.useState(null),[f,d]=R.useState(null),[g,m]=_x(),y=R.useRef(null),S=P_(n.contentType),w=!!n.sha1||!!n.path;R.useEffect(()=>{var _;if(e)return(_=y.current)==null||_.scrollIntoView({behavior:"smooth"}),m()},[e,m]),R.useEffect(()=>{r&&o===null&&f===null&&(d("Loading ..."),fetch(wc(i,n)).then(_=>_.text()).then(_=>{u(_),d(null)}).catch(_=>{d("Failed to load: "+_.message)}))},[i,r,o,f,n]);const E=R.useMemo(()=>{const _=o?o.split(`
`).length:0;return Math.min(Math.max(5,_),20)*V_},[o]),x=b.jsxs("span",{style:{marginLeft:5},ref:y,"aria-label":n.name,children:[b.jsx("span",{children:P0(n.name)}),w&&b.jsx("a",{style:{marginLeft:5},href:Jo(i,n),children:"download"})]});return!S||!w?b.jsx("div",{style:{marginLeft:20},children:x}):b.jsxs("div",{className:ut(g&&"yellow-flash"),children:[b.jsx(Q0,{title:x,expanded:r,setExpanded:a,expandOnTitleClick:!0,children:f&&b.jsx("i",{children:f})}),r&&o!==null&&b.jsx("div",{className:"vbox",style:{height:E},children:b.jsx(ds,{text:o,readOnly:!0,mimeType:n.contentType,linkify:!0,lineNumbers:!0,wrapLines:!1})})]})},W_=({revealedAttachmentCallId:n})=>{const e=Ln(),{diffMap:i,screenshots:r,attachments:a}=R.useMemo(()=>{const o=new Set((e==null?void 0:e.visibleAttachments)??[]),u=new Set,f=new Map;for(const d of o){if(!d.path&&!d.sha1)continue;const g=d.name.match(/^(.*)-(expected|actual|diff)\.png$/);if(g){const m=g[1],y=g[2],S=f.get(m)||{expected:void 0,actual:void 0,diff:void 0};S[y]=d,f.set(m,S),o.delete(d)}else d.contentType.startsWith("image/")&&(u.add(d),o.delete(d))}return{diffMap:f,attachments:o,screenshots:u}},[e]);return!i.size&&!r.size&&!a.size?b.jsx(ai,{text:"No attachments"}):b.jsxs("div",{className:"attachments-tab",children:[[...i.values()].map(({expected:o,actual:u,diff:f})=>b.jsxs(b.Fragment,{children:[o&&u&&b.jsx("div",{className:"attachments-section",children:"Image diff"}),o&&u&&b.jsx(H_,{noTargetBlank:!0,diff:{name:"Image diff",expected:{attachment:{...o,path:Jo(e,o)},title:"Expected"},actual:{attachment:{...u,path:Jo(e,u)}},diff:f?{attachment:{...f,path:Jo(e,f)}}:void 0}})]})),r.size?b.jsx("div",{className:"attachments-section",children:"Screenshots"}):void 0,[...r.values()].map((o,u)=>{const f=wc(e,o);return b.jsxs("div",{className:"attachment-item",children:[b.jsx("div",{children:b.jsx("img",{draggable:"false",src:f})}),b.jsx("div",{children:b.jsx("a",{target:"_blank",href:f,rel:"noreferrer",children:o.name})})]},`screenshot-${u}`)}),a.size?b.jsx("div",{className:"attachments-section",children:"Attachments"}):void 0,[...a.values()].map((o,u)=>b.jsx("div",{className:"attachment-item",children:b.jsx(Z_,{attachment:o,reveal:n&&o.callId===n.callId?n:void 0})},eE(o,u)))]})};function wc(n,e){return n&&e.sha1?n.createRelativeUrl(`sha1/${e.sha1}`):`file?path=${encodeURIComponent(e.path)}`}function Jo(n,e){let i=e.contentType?`&dn=${encodeURIComponent(e.name)}`:"";return e.contentType&&(i+=`&dct=${encodeURIComponent(e.contentType)}`),wc(n,e)+i}function eE(n,e){return e+"-"+(n.sha1?"sha1-"+n.sha1:"path-"+n.path)}const tE=({prompt:n})=>b.jsx(Po,{value:n,description:"Copy prompt",copiedDescription:b.jsxs(b.Fragment,{children:["Copied ",b.jsx("span",{className:"codicon codicon-copy",style:{marginLeft:"5px"}})]}),style:{width:"120px",justifyContent:"center"}});function nE(n){return R.useMemo(()=>{if(!n)return{errors:new Map};const e=new Map;for(const i of n.errorDescriptors)e.set(i.message,i);return{errors:e}},[n])}function iE({message:n,error:e,sdkLanguage:i,revealInSource:r}){var f;let a,o;const u=(f=e.stack)==null?void 0:f[0];return u&&(a=u.file.replace(/.*[/\\](.*)/,"$1")+":"+u.line,o=u.file+":"+u.line),b.jsxs("div",{style:{display:"flex",flexDirection:"column",overflowX:"clip"},children:[b.jsxs("div",{className:"hbox",style:{alignItems:"center",padding:"5px 10px",minHeight:36,fontWeight:"bold",color:"var(--vscode-errorForeground)",flex:0},children:[e.action&&od(e.action,{sdkLanguage:i}),a&&b.jsxs("div",{className:"action-location",children:["@ ",b.jsx("span",{title:o,onClick:()=>r(e),children:a})]})]}),b.jsx(z_,{error:n})]})}const sE=({errorsModel:n,sdkLanguage:e,revealInSource:i,wallTime:r,testRunMetadata:a})=>{const o=Ln(),u=yc(async()=>{const f=o==null?void 0:o.attachments.find(g=>g.name==="error-context");if(!f)return;let d=await fetch(wc(o,f)).then(g=>g.text());if(d)return a!=null&&a.gitDiff&&(d+=`

# Local changes

\`\`\`diff
`+a.gitDiff+"\n```"),d},[o,a],void 0);return n.errors.size?b.jsxs("div",{className:"fill",style:{overflow:"auto"},children:[b.jsx("span",{style:{position:"absolute",right:"5px",top:"5px",zIndex:1},children:u&&b.jsx(tE,{prompt:u})}),[...n.errors.entries()].map(([f,d])=>{const g=`error-${r}-${f}`;return b.jsx(iE,{message:f,error:d,revealInSource:i,sdkLanguage:e},g)})]}):b.jsx(ai,{text:"No errors"})},rE=hl,Da={log:{bg:"var(--vscode-editor-background)",fg:"var(--vscode-editor-foreground)"},warning:{fg:"var(--vscode-list-warningForeground)",bg:"var(--vscode-inputValidation-warningBackground)"},error:{fg:"var(--vscode-list-errorForeground)",bg:"var(--vscode-inputValidation-errorBackground)"}};function aE(n,e,i){const{entries:r}=R.useMemo(()=>{if(!n)return{entries:[]};const o=[];function u(d){var y,S,w,E,x,_;const g=o[o.length-1];g&&((y=d.browserMessage)==null?void 0:y.bodyString)===((S=g.browserMessage)==null?void 0:S.bodyString)&&((w=d.browserMessage)==null?void 0:w.location)===((E=g.browserMessage)==null?void 0:E.location)&&d.browserError===g.browserError&&((x=d.nodeMessage)==null?void 0:x.html)===((_=g.nodeMessage)==null?void 0:_.html)&&d.isError===g.isError&&d.isWarning===g.isWarning&&d.timestamp-g.timestamp<1e3?g.repeat++:o.push({...d,repeat:1})}const f=[...n.events,...n.stdio].sort((d,g)=>{const m="time"in d?d.time:d.timestamp,y="time"in g?g.time:g.timestamp;return m-y});for(const d of f){if(d.type==="console"){const g=d.messageType==="error"?Da.error:d.messageType==="warning"?Da.warning:Da.log,m=d.args&&d.args.length?oE(d.args,g):Z0(d.text,g),y=d.location.url,w=`${y?y.substring(y.lastIndexOf("/")+1):"<anonymous>"}:${d.location.lineNumber}`;u({browserMessage:{body:m,bodyString:d.text,location:w},isError:d.messageType==="error",isWarning:d.messageType==="warning",timestamp:d.time})}if(d.type==="event"&&d.method==="pageError"&&u({browserError:d.params.error,isError:!0,isWarning:!1,timestamp:d.time}),d.type==="stderr"||d.type==="stdout"){let g="";const m=d.type==="stderr"?Da.error:Da.log;d.text&&(g=sl(d.text.trim(),m)||""),d.base64&&(g=sl(atob(d.base64).trim(),m)||""),u({nodeMessage:{html:g},isError:d.type==="stderr",isWarning:!1,timestamp:d.timestamp})}}return{entries:o}},[n,i]);return{entries:R.useMemo(()=>e?r.filter(o=>o.timestamp>=e.minimum&&o.timestamp<=e.maximum):r,[r,e])}}const lE=({consoleModel:n,boundaries:e,onEntryHovered:i,onAccepted:r})=>n.entries.length?b.jsx("div",{className:"console-tab",children:b.jsx(rE,{name:"console",onAccepted:r,onHighlighted:a=>i==null?void 0:i(a?{minimum:a.timestamp,maximum:a.timestamp}:void 0),items:n.entries,isError:a=>a.isError,isWarning:a=>a.isWarning,render:a=>{const o=yt(a.timestamp-e.minimum),u=b.jsx("span",{className:"console-time",children:o}),f=a.isError?"status-error":a.isWarning?"status-warning":"status-none",d=a.browserMessage||a.browserError?b.jsx("span",{className:ut("codicon","codicon-browser",f),title:"Browser message"}):b.jsx("span",{className:ut("codicon","codicon-file",f),title:"Runner message"});let g,m,y,S;const{browserMessage:w,browserError:E,nodeMessage:x}=a;if(w&&(g=w.location,m=w.body),E){const{error:_,value:A}=E;_?(m=_.message,S=_.stack):m=String(A)}return x&&(y=x.html),b.jsxs("div",{className:"console-line",children:[u,d,g&&b.jsx("span",{className:"console-location",children:g}),a.repeat>1&&b.jsx("span",{className:"console-repeat",children:a.repeat}),m&&b.jsx("span",{className:"console-line-message",children:m}),y&&b.jsx("span",{className:"console-line-message",dangerouslySetInnerHTML:{__html:y}}),S&&b.jsx("div",{className:"console-stack",children:S})]})}})}):b.jsx(ai,{text:"No console entries"});function oE(n,e){if(n.length===1)return Z0(n[0].preview,e);const i=typeof n[0].value=="string"&&n[0].value.includes("%"),r=i?n[0].value:"",a=i?n.slice(1):n;let o=0;const u=/%([%sdifoOc])/g;let f;const d=[];let g=[];d.push(b.jsx("span",{children:g},d.length+1));let m=0;for(;(f=u.exec(r))!==null;){const y=r.substring(m,f.index);g.push(b.jsx("span",{children:y},g.length+1)),m=f.index+2;const S=f[0][1];if(S==="%")g.push(b.jsx("span",{children:"%"},g.length+1));else if(S==="s"||S==="o"||S==="O"||S==="d"||S==="i"||S==="f"){const w=a[o++],E={};typeof(w==null?void 0:w.value)!="string"&&(E.color="var(--vscode-debugTokenExpression-number)"),g.push(b.jsx("span",{style:E,children:(w==null?void 0:w.preview)||""},g.length+1))}else if(S==="c"){g=[];const w=a[o++],E=w?cE(w.preview):{};d.push(b.jsx("span",{style:E,children:g},d.length+1))}}for(m<r.length&&g.push(b.jsx("span",{children:r.substring(m)},g.length+1));o<a.length;o++){const y=a[o],S={};g.length&&g.push(b.jsx("span",{children:" "},g.length+1)),typeof(y==null?void 0:y.value)!="string"&&(S.color="var(--vscode-debugTokenExpression-number)"),g.push(b.jsx("span",{style:S,children:(y==null?void 0:y.preview)||""},g.length+1))}return d}function Z0(n,e){return[b.jsx("span",{dangerouslySetInnerHTML:{__html:sl(n.trim(),e)}})]}function cE(n){try{const e={},i=n.split(";");for(const r of i){const a=r.trim();if(!a)continue;let[o,u]=a.split(":");if(o=o.trim(),u=u.trim(),!uE(o))continue;const f=o.replace(/-([a-z])/g,d=>d[1].toUpperCase());e[f]=u}return e}catch{return{}}}function uE(n){return["background","border","color","font","line","margin","padding","text"].some(i=>n.startsWith(i))}const dl=({noShadow:n,children:e,noMinHeight:i,className:r,sidebarBackground:a,onClick:o})=>b.jsx("div",{className:ut("toolbar",n&&"no-shadow",i&&"no-min-height",r,a&&"toolbar-sidebar-background"),onClick:o,children:e}),oc=({tabs:n,selectedTab:e,setSelectedTab:i,leftToolbar:r,rightToolbar:a,dataTestId:o,mode:u})=>{const f=R.useId(),d=R.useRef(null);e||(e=n[0].id),u||(u="default");const g=m=>{var E;const y=Array.from(((E=d.current)==null?void 0:E.querySelectorAll('[role="tab"]'))??[]),S=y.findIndex(x=>x===document.activeElement);if(S===-1)return;let w=S;if(m.key==="ArrowRight")w=(S+1)%y.length;else if(m.key==="ArrowLeft")w=(S-1+y.length)%y.length;else if(m.key==="Home")w=0;else if(m.key==="End")w=y.length-1;else return;m.preventDefault(),y[w].focus(),i==null||i(n[w].id)};return b.jsx("div",{className:"tabbed-pane","data-testid":o,children:b.jsxs("div",{className:"vbox",children:[b.jsxs(dl,{children:[r&&b.jsxs("div",{style:{flex:"none",display:"flex",margin:"0 4px",alignItems:"center"},children:[...r]}),u==="default"&&b.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",onKeyDown:g,ref:d,children:[...n.map(m=>b.jsx(W0,{id:m.id,ariaControls:`${f}-${m.id}`,title:m.title,count:m.count,errorCount:m.errorCount,selected:e===m.id,onSelect:i,tabIndex:e===m.id?0:-1},m.id))]}),u==="select"&&b.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:b.jsx("select",{style:{width:"100%",background:"none",cursor:"pointer"},value:e,onChange:m=>{i==null||i(n[m.currentTarget.selectedIndex].id)},children:n.map(m=>{let y="";return m.count&&(y=` (${m.count})`),m.errorCount&&(y=` (${m.errorCount})`),b.jsxs("option",{value:m.id,role:"tab","aria-controls":`${f}-${m.id}`,children:[m.title,y]},m.id)})})}),a&&b.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center"},children:[...a]})]}),n.map(m=>{const y="tab-content tab-"+m.id;if(m.component)return b.jsx("div",{id:`${f}-${m.id}`,role:"tabpanel","aria-label":m.title,className:y,style:{display:e===m.id?"inherit":"none"},children:m.component},m.id);if(e===m.id)return b.jsx("div",{id:`${f}-${m.id}`,role:"tabpanel","aria-label":m.title,className:y,children:m.render()},m.id)})]})})},W0=({id:n,title:e,count:i,errorCount:r,selected:a,onSelect:o,ariaControls:u,tabIndex:f})=>b.jsxs("div",{className:ut("tabbed-pane-tab",a&&"selected"),onClick:()=>o==null?void 0:o(n),role:"tab",title:e,tabIndex:f??(a?0:-1),"aria-controls":u,"aria-selected":a,children:[b.jsx("div",{className:"tabbed-pane-tab-label",children:e}),!!i&&b.jsx("div",{className:"tabbed-pane-tab-counter",children:i}),!!r&&b.jsx("div",{className:"tabbed-pane-tab-counter error",children:r})]});async function fE(n,e){const i=navigator.platform.includes("Win")?"win":"unix";let r=[];const a=new Set(["accept-encoding","host","method","path","scheme","version","authority","protocol"]);function o(S){return'^"'+S.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/[^a-zA-Z0-9\s_\-:=+~'\/.',?;()*`]/g,"^$&").replace(/%(?=[a-zA-Z0-9_])/g,"%^").replace(/[^ -~\r\n]/g," ").replace(/\r?\n|\r/g,`^

`)+'^"'}function u(S){function w(E){let _=E.charCodeAt(0).toString(16);for(;_.length<4;)_="0"+_;return"\\u"+_}return/[\0-\x1F\x7F-\x9F!]|\'/.test(S)?"$'"+S.replace(/\\/g,"\\\\").replace(/\'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\0-\x1F\x7F-\x9F!]/g,w)+"'":"'"+S+"'"}const f=i==="win"?o:u;r.push(f(e.request.url).replace(/[[{}\]]/g,"\\$&"));let d="GET";const g=[],m=await ev(n,e);m&&(g.push("--data-raw "+f(m)),a.add("content-length"),d="POST"),e.request.method!==d&&r.push("-X "+f(e.request.method));const y=e.request.headers;for(let S=0;S<y.length;S++){const w=y[S],E=w.name.replace(/^:/,"");if(a.has(E.toLowerCase()))continue;const x=w.value;x.trim()?E.toLowerCase()==="cookie"?r.push("-b "+f(x)):r.push("-H "+f(E+": "+x)):r.push("-H "+f(E+";"))}return r=r.concat(g),"curl "+r.join(r.length>=3?i==="win"?` ^
  `:` \\
  `:" ")}async function hE(n,e,i=0){const r=new Set(["method","path","scheme","version","accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via","user-agent"]),a=new Set(["cookie","authorization"]),o=JSON.stringify(e.request.url),u=e.request.headers,f=u.reduce((x,_)=>{const A=_.name;return!r.has(A.toLowerCase())&&!A.includes(":")&&x.append(A,_.value),x},new Headers),d={};for(const x of f)d[x[0]]=x[1];const g=e.request.cookies.length||u.some(({name:x})=>a.has(x.toLowerCase()))?"include":"omit",m=u.find(({name:x})=>x.toLowerCase()==="referer"),y=m?m.value:void 0,S=await ev(n,e),w={headers:Object.keys(d).length?d:void 0,referrer:y,body:S,method:e.request.method,mode:"cors"};if(i===1){const x=u.find(A=>A.name.toLowerCase()==="cookie"),_={};delete w.mode,x&&(_.cookie=x.value),y&&(delete w.referrer,_.Referer=y),Object.keys(_).length&&(w.headers={...d,..._})}else w.credentials=g;const E=JSON.stringify(w,null,2);return`fetch(${o}, ${E});`}async function ev(n,e){var i,r;return n&&((i=e.request.postData)!=null&&i._sha1)?await fetch(n.createRelativeUrl(`sha1/${e.request.postData._sha1}`)).then(a=>a.text()):(r=e.request.postData)==null?void 0:r.text}class dE{generatePlaywrightRequestCall(e,i){let r=e.method.toLowerCase();const a=new URL(e.url),o=`${a.origin}${a.pathname}`,u={};["delete","get","head","post","put","patch"].includes(r)||(u.method=r,r="fetch"),a.searchParams.size&&(u.params=Object.fromEntries(a.searchParams.entries())),i&&(u.data=i),e.headers.length&&(u.headers=Object.fromEntries(e.headers.map(g=>[g.name,g.value])));const f=[`'${o}'`];return Object.keys(u).length>0&&f.push(this.prettyPrintObject(u)),`await page.request.${r}(${f.join(", ")});`}prettyPrintObject(e,i=2,r=0){if(e===null)return"null";if(e===void 0)return"undefined";if(typeof e!="object")return typeof e=="string"?this.stringLiteral(e):String(e);if(Array.isArray(e)){if(e.length===0)return"[]";const f=" ".repeat(r*i),d=" ".repeat((r+1)*i);return`[
${e.map(m=>`${d}${this.prettyPrintObject(m,i,r+1)}`).join(`,
`)}
${f}]`}if(Object.keys(e).length===0)return"{}";const a=" ".repeat(r*i),o=" ".repeat((r+1)*i);return`{
${Object.entries(e).map(([f,d])=>{const g=this.prettyPrintObject(d,i,r+1),m=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(f)?f:this.stringLiteral(f);return`${o}${m}: ${g}`}).join(`,
`)}
${a}}`}stringLiteral(e){return e=e.replace(/\\/g,"\\\\").replace(/'/g,"\\'"),e.includes(`
`)||e.includes("\r")||e.includes("	")?"`"+e+"`":`'${e}'`}}class pE{generatePlaywrightRequestCall(e,i){const r=new URL(e.url),o=[`"${`${r.origin}${r.pathname}`}"`];let u=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(u)||(o.push(`method="${u}"`),u="fetch"),r.searchParams.size&&o.push(`params=${this.prettyPrintObject(Object.fromEntries(r.searchParams.entries()))}`),i&&o.push(`data=${this.prettyPrintObject(i)}`),e.headers.length&&o.push(`headers=${this.prettyPrintObject(Object.fromEntries(e.headers.map(d=>[d.name,d.value])))}`);const f=o.length===1?o[0]:`
${o.map(d=>this.indent(d,2)).join(`,
`)}
`;return`await page.request.${u}(${f})`}indent(e,i){return e.split(`
`).map(r=>" ".repeat(i)+r).join(`
`)}prettyPrintObject(e,i=2,r=0){if(e===null||e===void 0)return"None";if(typeof e!="object")return typeof e=="string"?this.stringLiteral(e):typeof e=="boolean"?e?"True":"False":String(e);if(Array.isArray(e)){if(e.length===0)return"[]";const f=" ".repeat(r*i),d=" ".repeat((r+1)*i);return`[
${e.map(m=>`${d}${this.prettyPrintObject(m,i,r+1)}`).join(`,
`)}
${f}]`}if(Object.keys(e).length===0)return"{}";const a=" ".repeat(r*i),o=" ".repeat((r+1)*i);return`{
${Object.entries(e).map(([f,d])=>{const g=this.prettyPrintObject(d,i,r+1);return`${o}${this.stringLiteral(f)}: ${g}`}).join(`,
`)}
${a}}`}stringLiteral(e){return JSON.stringify(e)}}class gE{generatePlaywrightRequestCall(e,i){const r=new URL(e.url),a=`${r.origin}${r.pathname}`,o={},u=[];let f=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(f)||(o.Method=f,f="fetch"),r.searchParams.size&&(o.Params=Object.fromEntries(r.searchParams.entries())),i&&(o.Data=i),e.headers.length&&(o.Headers=Object.fromEntries(e.headers.map(m=>[m.name,m.value])));const d=[`"${a}"`];return Object.keys(o).length>0&&d.push(this.prettyPrintObject(o)),`${u.join(`
`)}${u.length?`
`:""}await request.${this.toFunctionName(f)}(${d.join(", ")});`}toFunctionName(e){return e[0].toUpperCase()+e.slice(1)+"Async"}prettyPrintObject(e,i=2,r=0){if(e===null||e===void 0)return"null";if(typeof e!="object")return typeof e=="string"?this.stringLiteral(e):typeof e=="boolean"?e?"true":"false":String(e);if(Array.isArray(e)){if(e.length===0)return"new object[] {}";const f=" ".repeat(r*i),d=" ".repeat((r+1)*i);return`new object[] {
${e.map(m=>`${d}${this.prettyPrintObject(m,i,r+1)}`).join(`,
`)}
${f}}`}if(Object.keys(e).length===0)return"new {}";const a=" ".repeat(r*i),o=" ".repeat((r+1)*i);return`new() {
${Object.entries(e).map(([f,d])=>{const g=this.prettyPrintObject(d,i,r+1),m=r===0?f:`[${this.stringLiteral(f)}]`;return`${o}${m} = ${g}`}).join(`,
`)}
${a}}`}stringLiteral(e){return JSON.stringify(e)}}class mE{generatePlaywrightRequestCall(e,i){const r=new URL(e.url),a=[`"${r.origin}${r.pathname}"`],o=[];let u=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(u)||(o.push(`setMethod("${u}")`),u="fetch");for(const[f,d]of r.searchParams)o.push(`setQueryParam(${this.stringLiteral(f)}, ${this.stringLiteral(d)})`);i&&o.push(`setData(${this.stringLiteral(i)})`);for(const f of e.headers)o.push(`setHeader(${this.stringLiteral(f.name)}, ${this.stringLiteral(f.value)})`);return o.length>0&&a.push(`RequestOptions.create()
  .${o.join(`
  .`)}
`),`request.${u}(${a.join(", ")});`}stringLiteral(e){return JSON.stringify(e)}}function yE(n){if(n==="javascript")return new dE;if(n==="python")return new pE;if(n==="csharp")return new gE;if(n==="java")return new mE;throw new Error("Unsupported language: "+n)}const bE=({resource:n,sdkLanguage:e,startTimeOffset:i,onClose:r})=>{const[a,o]=R.useState("headers"),u=Ln(),f=yc(async()=>{if(u&&n.request.postData){const d=n.request.headers.find(m=>m.name.toLowerCase()==="content-type"),g=d?d.value:"";return n.request.postData._sha1?{text:await(await fetch(u.createRelativeUrl(`sha1/${n.request.postData._sha1}`))).text(),mimeType:g}:{text:n.request.postData.text,mimeType:g}}else return null},[n],null);return b.jsx(oc,{leftToolbar:[b.jsx(ct,{icon:"close",title:"Close",onClick:r},"close")],rightToolbar:[b.jsx(vE,{requestBody:f,resource:n,sdkLanguage:e},"dropdown")],tabs:[{id:"headers",title:"Headers",render:()=>b.jsx(tv,{resource:n,startTimeOffset:i})},{id:"payload",title:"Payload",render:()=>b.jsx(SE,{resource:n,requestBody:f})},{id:"response",title:"Response",render:()=>b.jsx(wE,{resource:n})}],selectedTab:a,setSelectedTab:o})},vE=({resource:n,sdkLanguage:e,requestBody:i})=>{const r=Ln(),a=b.jsxs(b.Fragment,{children:[b.jsx("span",{className:"codicon codicon-check",style:{marginRight:"5px"}})," Copied "]}),o=async()=>yE(e).generatePlaywrightRequestCall(n.request,i==null?void 0:i.text);return b.jsxs("div",{className:"copy-request-dropdown",children:[b.jsxs(ct,{className:"copy-request-dropdown-toggle",children:[b.jsx("span",{className:"codicon codicon-copy",style:{marginRight:"5px"}}),"Copy request",b.jsx("span",{className:"codicon codicon-chevron-down",style:{marginLeft:"5px"}})]}),b.jsxs("div",{className:"copy-request-dropdown-menu",children:[b.jsx(Po,{description:"Copy as cURL",copiedDescription:a,value:()=>fE(r,n)}),b.jsx(Po,{description:"Copy as Fetch",copiedDescription:a,value:()=>hE(r,n)}),b.jsx(Po,{description:"Copy as Playwright",copiedDescription:a,value:o})]})]})},fd=({toggled:n,error:e,onToggle:i})=>b.jsx(ct,{icon:"json",title:"Pretty print",toggled:n,errorBadge:e?"Formatting failed":void 0,onClick:r=>{r.stopPropagation(),i()}}),Pa=({title:n,data:e,showCount:i,children:r,titleChildren:a,className:o})=>{const[u,f]=jt(`trace-viewer-network-details-${n.replaceAll(" ","-")}`,!0);return b.jsxs(Q0,{expanded:u,setExpanded:f,expandOnTitleClick:!0,title:b.jsxs(b.Fragment,{children:[b.jsxs("span",{className:"network-request-details-header",children:[n,i&&b.jsxs("span",{className:"network-request-details-header-count",children:[" × ",(e==null?void 0:e.length)??0]})]}),a]}),className:o,children:[e&&b.jsx("table",{className:"network-request-details-table",children:b.jsx("tbody",{children:e.map(({name:d,value:g},m)=>g!==null&&b.jsxs("tr",{children:[b.jsx("td",{children:d}),b.jsx("td",{children:g})]},m))})}),r]})},tv=({resource:n,startTimeOffset:e})=>{const i=R.useMemo(()=>Object.entries({URL:n.request.url,Method:n.request.method,"Status Code":n.response.status===-1?"canceled":n.response.status>0&&b.jsxs("span",{className:kE(n.response.status),children:[" ",n.response.status," ",n.response.statusText]}),Start:yt(e),Duration:yt(n.time)}).map(([r,a])=>({name:r,value:a})),[n,e]);return b.jsxs("div",{className:"vbox network-request-details-tab",children:[b.jsx(Pa,{title:"General",data:i}),b.jsx(Pa,{title:"Request Headers",showCount:!0,data:n.request.headers}),b.jsx(Pa,{title:"Response Headers",showCount:!0,data:n.response.headers})]})},SE=({resource:n,requestBody:e})=>{const[i,r]=jt("trace-viewer-network-details-show-formatted-payload",!0),a=n.request.queryString.length>0,o=!!(e||n.request.postData),u=hd(e,i);return b.jsxs("div",{className:"vbox network-request-details-tab",children:[!a&&!o&&b.jsx("em",{className:"network-request-no-payload",children:"No payload for this request."}),a&&b.jsx(Pa,{title:"Query String Parameters",showCount:!0,data:n.request.queryString}),e&&b.jsx(Pa,{title:"Request Body",className:"network-request-request-body",titleChildren:b.jsxs(b.Fragment,{children:[b.jsx("div",{style:{margin:"auto"}}),b.jsx(fd,{toggled:i,error:u.error,onToggle:()=>r(!i)})]}),children:b.jsx(ds,{text:u.text,mimeType:e.mimeType,readOnly:!0,lineNumbers:!0})})]})},wE=({resource:n})=>{const e=Ln(),[i,r]=R.useState(null);R.useEffect(()=>{(async()=>{if(e&&n.response.content._sha1){const d=n.response.content.mimeType.includes("image"),g=n.response.content.mimeType.includes("font"),m=await fetch(e.createRelativeUrl(`sha1/${n.response.content._sha1}`));if(d){const y=await m.blob(),S=new FileReader,w=new Promise(E=>S.onload=E);S.readAsDataURL(y),r({dataUrl:(await w).target.result})}else if(g){const y=await m.arrayBuffer();r({font:y})}else r({text:await m.text(),mimeType:n.response.content.mimeType})}else r(null)})()},[n,e]);const[a,o]=jt("trace-viewer-network-details-show-formatted-response",!0),u=hd(i,a);return b.jsxs("div",{className:"vbox network-request-details-tab",children:[!n.response.content._sha1&&b.jsx("div",{children:"Response body is not available for this request."}),i&&i.font&&b.jsx(xE,{font:i.font}),i&&i.dataUrl&&b.jsx("div",{children:b.jsx("img",{draggable:"false",src:i.dataUrl})}),i&&i.text!==void 0&&b.jsxs("div",{className:"vbox network-response-body",children:[b.jsx(ds,{text:u.text,mimeType:i.mimeType,readOnly:!0,lineNumbers:!0}),b.jsxs(dl,{noShadow:!0,noMinHeight:!0,className:"network-response-toolbar",children:[b.jsx("div",{style:{margin:"auto"}}),b.jsx(fd,{toggled:a,error:u.error,onToggle:()=>o(!a)})]})]})]})},xE=({font:n})=>{const[e,i]=R.useState(!1);return R.useEffect(()=>{let r;try{r=new FontFace("font-preview",n),r.status==="loaded"&&document.fonts.add(r),r.status==="error"&&i(!0)}catch{i(!0)}return()=>{document.fonts.delete(r)}},[n]),e?b.jsx("div",{className:"network-font-preview-error",children:"Could not load font preview"}):b.jsxs("div",{className:"network-font-preview",children:["ABCDEFGHIJKLM",b.jsx("br",{}),"NOPQRSTUVWXYZ",b.jsx("br",{}),"abcdefghijklm",b.jsx("br",{}),"nopqrstuvwxyz",b.jsx("br",{}),"1234567890"]})},_E=({resource:n,startTimeOffset:e,onClose:i})=>{const[r,a]=R.useState("messages");return b.jsx(oc,{leftToolbar:[b.jsx(ct,{icon:"close",title:"Close",onClick:i},"close")],tabs:[{id:"headers",title:"Headers",render:()=>b.jsx(tv,{resource:n,startTimeOffset:e})},{id:"messages",title:"Messages",render:()=>b.jsx(EE,{resource:n})}],selectedTab:r,setSelectedTab:a})},EE=({resource:n})=>{const e=Ln(),i=yc(async()=>{if(n._webSocketMessages)return n._webSocketMessages.map((d,g)=>({...d,index:g,byteLength:Uh(d)}));if(e&&n.response.content._sha1)try{const d=await fetch(e.createRelativeUrl(`sha1/${n.response.content._sha1}`));return d.ok?(await d.text()).split(`
`).filter(Boolean).map(y=>JSON.parse(y)).map((y,S)=>({...y,index:S,byteLength:Uh(y)})):[]}catch{return[]}return[]},[n,e],void 0),[r,a]=R.useState(void 0),o=r!==void 0?i==null?void 0:i[r]:void 0,u=R.useMemo(()=>{if(i){for(const d of i)if(d.time>0)return d.time}},[i]);if(i===void 0)return b.jsx(ai,{text:"Loading..."});if(i.length===0)return b.jsx(ai,{text:"No messages captured"});const f=b.jsx(TE,{name:"network-websocket-messages",ariaLabel:"WebSocket messages",items:i,id:d=>String(d.index),selectedItem:o,onSelected:d=>a(d.index),render:d=>CE(d,u)});return o?b.jsx(il,{sidebarSize:200,orientation:"vertical",sidebarIsFirst:!1,settingName:"networkWebSocketMessageDetails",main:f,sidebar:b.jsx(AE,{message:o})}):f},TE=hl,AE=({message:n})=>{const[e,i]=jt("trace-viewer-network-details-show-formatted-message",!0),r=R.useMemo(()=>{if(n.opcode===1){const o=n.data;let u;try{JSON.parse(o),u="application/json"}catch{u="text/plain"}return{text:o,mimeType:u}}if(n.opcode===8||n.opcode===9||n.opcode===10){if(!n.data)return{text:""};try{return{text:LE(n.data),mimeType:"text/plain"}}catch{return{text:wb(n.data)}}}return{text:wb(n.data)}},[n]),a=hd(r,e);return b.jsxs("div",{className:"vbox network-websocket-message-detail",children:[b.jsxs(dl,{noShadow:!0,noMinHeight:!0,className:"network-websocket-message-detail-toolbar",children:[b.jsxs("span",{className:"network-websocket-message-detail-summary",children:[n.type==="send"?"Sent":"Received"," · ",nv(n.opcode)," · ",bc(Uh(n))]}),b.jsx("div",{style:{margin:"auto"}}),b.jsx(fd,{toggled:e,error:a.error,onToggle:()=>i(!e)})]}),b.jsx("div",{className:"vbox network-websocket-message-detail-body",children:b.jsx(ds,{text:a.text,mimeType:r.mimeType,readOnly:!0,lineNumbers:!0})})]})};function CE(n,e){const i=n.type==="send"?"codicon-arrow-up":"codicon-arrow-down",r=n.type==="send"?"Sent":"Received",a=nv(n.opcode),o=n.time>0&&e!==void 0?yt(n.time-e):"-",u=NE(n);return b.jsxs("div",{className:"network-websocket-message-row",children:[b.jsx("span",{className:`network-websocket-message-direction-${n.type} codicon ${i}`,title:r}),b.jsx("span",{className:"network-websocket-message-preview",title:u,children:u}),b.jsx("span",{className:"network-websocket-message-opcode",title:`Opcode ${n.opcode}`,children:a}),b.jsx("span",{className:"network-websocket-message-length",title:`${n.byteLength} bytes`,children:bc(n.byteLength)}),b.jsx("span",{className:"network-websocket-message-time",children:o})]})}function nv(n){switch(n){case 0:return"Continuation";case 1:return"Text";case 2:return"Binary";case 8:return"Close";case 9:return"Ping";case 10:return"Pong";default:return`Opcode ${n}`}}function Uh(n){return n.opcode===1?new TextEncoder().encode(n.data).length:iv(n.data)}function NE(n){if(n.opcode===1){const e=n.data.replace(/\s+/g," ");return e.length>200?e.substring(0,200)+"…":e}return n.opcode===8?"(close)":n.opcode===9?"(ping)":n.opcode===10?"(pong)":`(binary, ${bc(iv(n.data))})`}function kE(n){return n<300||n===304?"green-circle":n<400?"yellow-circle":"red-circle"}const ME=/<[^>]+>[^<]*<\//;function OE(n,e="  "){let i=0;const r=[],a=n.replace(/>\s*</g,`>
<`).split(`
`);for(const o of a){const u=o.trim();u&&(u.startsWith("</")?(i=Math.max(i-1,0),r.push(e.repeat(i)+u)):u.endsWith("/>")||u.startsWith("<?")||ME.test(u)?r.push(e.repeat(i)+u):u.startsWith("<")?(r.push(e.repeat(i)+u),i++):r.push(e.repeat(i)+u))}return r.join(`
`)}function jE(n,e){return!n.trim()||!e?n:F_(e)?JSON.stringify(JSON.parse(n),null,2):Q_(e)?OE(n):e.includes("application/x-www-form-urlencoded")?decodeURIComponent(n):n}const hd=(n,e)=>R.useMemo(()=>{if((n==null?void 0:n.text)===void 0)return{text:""};if(!e)return{text:n.text};try{return{text:jE(n.text,n.mimeType)}}catch{return{text:n.text,error:!0}}},[n,e]);function iv(n){if(!n)return 0;const e=n[n.length-2]==="="?2:n[n.length-1]==="="?1:0;return Math.max(0,Math.floor(n.length*3/4)-e)}function LE(n){const e=atob(n),i=new Uint8Array(e.length);for(let r=0;r<e.length;++r)i[r]=e.charCodeAt(r);return new TextDecoder("utf-8",{fatal:!1}).decode(i)}function wb(n){if(!n)return"";const e=atob(n),i=[];for(let r=0;r<e.length;r+=16){const a=Math.min(16,e.length-r),o=[],u=[];for(let f=0;f<16;++f){if(f<a){const d=e.charCodeAt(r+f);o.push(d.toString(16).padStart(2,"0")),u.push(d>=32&&d<127?e[r+f]:".")}else o.push("  ");f===7&&o.push("")}i.push(`${r.toString(16).padStart(8,"0")}  ${o.join(" ")}  ${u.join("")}`)}return i.join(`
`)}function RE(n){const[e,i]=R.useState([]);R.useEffect(()=>{const o=[];for(let u=0;u<n.columns.length-1;++u){const f=n.columns[u];o[u]=(o[u-1]||0)+n.columnWidths.get(f)}i(o)},[n.columns,n.columnWidths]);function r(o){const u=new Map(n.columnWidths.entries());for(let f=0;f<o.length;++f){const d=o[f]-(o[f-1]||0),g=n.columns[f];u.set(g,d)}n.setColumnWidths(u)}const a=R.useCallback(o=>{var u,f;(f=n.setSorting)==null||f.call(n,{by:o,negate:((u=n.sorting)==null?void 0:u.by)===o?!n.sorting.negate:!1})},[n]);return b.jsxs("div",{className:`grid-view ${n.name}-grid-view`,children:[b.jsx(F0,{orientation:"horizontal",offsets:e,setOffsets:r,resizerColor:"var(--vscode-panel-border)",resizerWidth:1,minColumnWidth:25}),b.jsxs("div",{className:"vbox",children:[b.jsx("div",{className:"grid-view-header",children:n.columns.map((o,u)=>b.jsxs("div",{className:"grid-view-header-cell "+DE(o,n.sorting),style:{width:u<n.columns.length-1?n.columnWidths.get(o):void 0},onClick:()=>n.setSorting&&a(o),children:[b.jsx("span",{className:"grid-view-header-cell-title",children:n.columnTitle(o)}),b.jsx("span",{className:"codicon codicon-triangle-up"}),b.jsx("span",{className:"codicon codicon-triangle-down"})]},n.columnTitle(o)))}),b.jsx(hl,{name:n.name,items:n.items,ariaLabel:n.ariaLabel,id:n.id,render:(o,u)=>b.jsx(b.Fragment,{children:n.columns.map((f,d)=>{const{body:g,title:m}=n.render(o,f,u);return b.jsx("div",{className:`grid-view-cell grid-view-column-${String(f)}`,title:m,style:{width:d<n.columns.length-1?n.columnWidths.get(f):void 0},children:g},n.columnTitle(f))})}),icon:n.icon,isError:n.isError,isWarning:n.isWarning,isInfo:n.isInfo,selectedItem:n.selectedItem,onAccepted:n.onAccepted,onSelected:n.onSelected,onHighlighted:n.onHighlighted,onIconClicked:n.onIconClicked,noItemsMessage:n.noItemsMessage,dataTestId:n.dataTestId,notSelectable:n.notSelectable})]})]})}function DE(n,e){return n===(e==null?void 0:e.by)?" filter-"+(e.negate?"negative":"positive"):""}const zE=["Fetch","HTML","JS","CSS","Font","Image","WS"],UE={searchValue:"",resourceTypes:new Set},HE=({filterState:n,onFilterStateChange:e})=>b.jsxs("div",{className:"network-filters",children:[b.jsx("input",{type:"search",placeholder:"Filter network",spellCheck:!1,value:n.searchValue,onChange:i=>e({...n,searchValue:i.target.value})}),b.jsxs("div",{className:"network-filters-resource-types",role:"tablist","aria-multiselectable":"true",children:[b.jsx("div",{title:"All",onClick:()=>e({...n,resourceTypes:new Set}),className:`network-filters-resource-type ${n.resourceTypes.size===0?"selected":""}`,children:"All"}),zE.map(i=>b.jsx("div",{title:i,onClick:r=>{let a;r.ctrlKey||r.metaKey?a=n.resourceTypes.symmetricDifference(new Set([i])):a=new Set([i]),e({...n,resourceTypes:a})},className:`network-filters-resource-type ${n.resourceTypes.has(i)?"selected":""}`,role:"tab","aria-selected":n.resourceTypes.has(i),children:i},i))]})]}),BE=RE;function qE(n,e,i){const r=R.useMemo(()=>((n==null?void 0:n.resources)||[]).filter(f=>e?!!f._monotonicTime&&f._monotonicTime>=e.minimum&&f._monotonicTime<=e.maximum:!0),[n,e,i]),a=R.useMemo(()=>new XE(n),[n]);return{resources:r,contextIdMap:a}}const $E=({boundaries:n,networkModel:e,onResourceHovered:i,sdkLanguage:r})=>{const[a,o]=R.useState(void 0),[u,f]=R.useState(void 0),[d,g]=R.useState(UE),{renderedEntries:m}=R.useMemo(()=>{const _=e.resources.map(A=>YE(A,n,e.contextIdMap)).filter(WE(d));return a&&PE(_,a),{renderedEntries:_}},[e.resources,e.contextIdMap,d,a,n]),y=R.useMemo(()=>u?m.find(_=>_.resource.id===u):void 0,[u,m]),[S,w]=R.useState(()=>new Map(sv().map(_=>[_,VE(_)]))),E=R.useCallback(_=>{g(_),f(void 0)},[]);if(!e.resources.length)return b.jsx(ai,{text:"No network calls"});const x=b.jsx(BE,{name:"network",ariaLabel:"Network requests",items:m,selectedItem:y,onSelected:_=>f(_.resource.id),onHighlighted:_=>i==null?void 0:i(_?FE(_.resource):void 0),columns:GE(!!y,m),columnTitle:IE,columnWidths:S,setColumnWidths:w,isError:_=>_.status.code>=400||_.status.code===-1,isInfo:_=>!!_.route,render:(_,A)=>KE(_,A),sorting:a,setSorting:o});return b.jsxs(b.Fragment,{children:[b.jsx(HE,{filterState:d,onFilterStateChange:E}),!y&&x,y&&b.jsx(il,{sidebarSize:S.get("name"),sidebarIsFirst:!0,orientation:"horizontal",settingName:"networkResourceDetails",main:y.resource._resourceType==="websocket"?b.jsx(_E,{resource:y.resource,startTimeOffset:y.start,onClose:()=>f(void 0)}):b.jsx(bE,{resource:y.resource,sdkLanguage:r,startTimeOffset:y.start,onClose:()=>f(void 0)}),sidebar:x})]})},IE=n=>n==="contextId"?"Source":n==="name"?"Name":n==="method"?"Method":n==="status"?"Status":n==="contentType"?"Content Type":n==="duration"?"Duration":n==="size"?"Size":n==="start"?"Start":n==="route"?"Route":"",VE=n=>n==="name"?200:n==="method"||n==="status"?60:n==="contentType"?200:n==="contextId"?60:100;function GE(n,e){if(n){const r=["name"];return xb(e)&&r.unshift("contextId"),r}let i=sv();return xb(e)||(i=i.filter(r=>r!=="contextId")),i}function sv(){return["contextId","name","method","status","contentType","duration","size","start","route"]}const KE=(n,e)=>e==="contextId"?{body:n.contextId,title:n.name.url}:e==="name"?{body:n.name.name,title:n.name.url}:e==="method"?{body:n.method}:e==="status"?{body:n.status.code===-1?"canceled":n.status.code>0?n.status.code:"",title:n.status.code===-1?"canceled":n.status.text}:e==="contentType"?{body:n.contentType}:e==="duration"?{body:yt(n.duration)}:e==="size"?{body:bc(n.size)}:e==="start"?{body:yt(n.start)}:e==="route"?{body:n.route}:{body:""};class XE{constructor(e){this._pagerefToShortId=new Map,this._contextToId=new Map,this._lastPageId=0,this._lastApiRequestContextId=0}contextId(e){return e.pageref?this._pageId(e.pageref):e._apiRequest?this._apiRequestContextId(e):""}_pageId(e){let i=this._pagerefToShortId.get(e);return i||(++this._lastPageId,i="page#"+this._lastPageId,this._pagerefToShortId.set(e,i)),i}_apiRequestContextId(e){const i=S0(e);if(!i)return"";let r=this._contextToId.get(i);return r||(++this._lastApiRequestContextId,r="api#"+this._lastApiRequestContextId,this._contextToId.set(i,r)),r}}function xb(n){const e=new Set;for(const i of n)if(e.add(i.contextId),e.size>1)return!0;return!1}const YE=(n,e,i)=>{const r=QE(n);let a;try{const u=new URL(n.request.url);a=u.pathname.substring(u.pathname.lastIndexOf("/")+1),a||(a=u.host),u.search&&(a+=u.search)}catch{a=n.request.url}let o;if(n._resourceType==="websocket")o="websocket";else{o=n.response.content.mimeType;const u=o.match(/^(.*);\s*charset=.*$/);u&&(o=u[1])}return{name:{name:a,url:n.request.url},method:n.request.method,status:{code:n.response.status,text:n.response.statusText},contentType:o,duration:n.time,size:n.response._transferSize>0?n.response._transferSize:n.response.bodySize,start:n._monotonicTime-e.minimum,route:r,resource:n,contextId:i.contextId(n)}};function FE(n){if(n._monotonicTime)return{minimum:n._monotonicTime,maximum:n._monotonicTime+n.time}}function QE(n){return n._wasAborted?"aborted":n._wasContinued?"continued":n._wasFulfilled?"fulfilled":n._apiRequest?"api":""}function PE(n,e){const i=JE(e==null?void 0:e.by);i&&n.sort(i),e.negate&&n.reverse()}function JE(n){if(n==="start")return(e,i)=>e.start-i.start;if(n==="duration")return(e,i)=>e.duration-i.duration;if(n==="status")return(e,i)=>e.status.code-i.status.code;if(n==="method")return(e,i)=>{const r=e.method,a=i.method;return r.localeCompare(a)};if(n==="size")return(e,i)=>e.size-i.size;if(n==="contentType")return(e,i)=>e.contentType.localeCompare(i.contentType);if(n==="name")return(e,i)=>e.name.name.localeCompare(i.name.name);if(n==="route")return(e,i)=>e.route.localeCompare(i.route);if(n==="contextId")return(e,i)=>e.contextId.localeCompare(i.contextId)}const ZE={Fetch:n=>n.contentType==="application/json",HTML:n=>n.contentType==="text/html",CSS:n=>n.contentType==="text/css",JS:n=>n.contentType.includes("javascript"),Font:n=>n.contentType.includes("font"),Image:n=>n.contentType.includes("image"),WS:n=>n.resource._resourceType==="websocket"};function WE({searchValue:n,resourceTypes:e}){return i=>(e.size===0||Array.from(e).some(a=>ZE[a](i)))&&i.name.url.toLowerCase().includes(n.toLowerCase())}function eT(n,e){if(n.role!==e.role||n.name!==e.name||!tT(n,e)||cc(n)!==cc(e))return!1;const i=Object.keys(n.props),r=Object.keys(e.props);return i.length===r.length&&i.every(a=>n.props[a]===e.props[a])}function cc(n){return n.box.cursor==="pointer"}function tT(n,e){return n.active===e.active&&n.checked===e.checked&&n.disabled===e.disabled&&n.expanded===e.expanded&&n.invalid===e.invalid&&n.selected===e.selected&&n.level===e.level&&n.pressed===e.pressed}function dd(n,e,i={}){var S;const r=new n.LineCounter,a={keepSourceTokens:!0,lineCounter:r,...i},o=n.parseDocument(e,a),u=[],f=w=>[r.linePos(w[0]),r.linePos(w[1])],d=w=>{u.push({message:w.message,range:[r.linePos(w.pos[0]),r.linePos(w.pos[1])]})},g=(w,E)=>{for(const x of E.items){if(x instanceof n.Scalar&&typeof x.value=="string"){const C=uc.parse(x,a,u);C&&(w.children=w.children||[],w.children.push(C));continue}if(x instanceof n.YAMLMap){m(w,x);continue}u.push({message:"Sequence items should be strings or maps",range:f(x.range||E.range)})}},m=(w,E)=>{for(const x of E.items){if(w.children=w.children||[],!(x.key instanceof n.Scalar&&typeof x.key.value=="string")){u.push({message:"Only string keys are supported",range:f(x.key.range||E.range)});continue}const A=x.key,C=x.value;if(A.value==="text"){if(!(C instanceof n.Scalar&&typeof C.value=="string")){u.push({message:"Text value should be a string",range:f(x.value.range||E.range)});continue}w.children.push({kind:"text",text:hh(C.value)});continue}if(A.value==="/children"){if(!(C instanceof n.Scalar&&typeof C.value=="string")||C.value!=="contain"&&C.value!=="equal"&&C.value!=="deep-equal"){u.push({message:'Strict value should be "contain", "equal" or "deep-equal"',range:f(x.value.range||E.range)});continue}w.containerMode=C.value;continue}if(A.value.startsWith("/")){if(!(C instanceof n.Scalar&&typeof C.value=="string")){u.push({message:"Property value should be a string",range:f(x.value.range||E.range)});continue}w.props=w.props??{},w.props[A.value.slice(1)]=hh(C.value);continue}const H=uc.parse(A,a,u);if(!H)continue;if(C instanceof n.Scalar){const Q=typeof C.value;if(Q!=="string"&&Q!=="number"&&Q!=="boolean"){u.push({message:"Node value should be a string or a sequence",range:f(x.value.range||E.range)});continue}w.children.push({...H,children:[{kind:"text",text:hh(String(C.value))}]});continue}if(C instanceof n.YAMLSeq){w.children.push(H),g(H,C);continue}u.push({message:"Map values should be strings or sequences",range:f(x.value.range||E.range)})}},y={kind:"role",role:"fragment"};return o.errors.forEach(d),u.length?{errors:u,fragment:y}:(o.contents instanceof n.YAMLSeq||u.push({message:'Aria snapshot must be a YAML sequence, elements starting with " -"',range:o.contents?f(o.contents.range):[{line:0,col:0},{line:0,col:0}]}),u.length?{errors:u,fragment:y}:(g(y,o.contents),u.length?{errors:u,fragment:nT}:((S=y.children)==null?void 0:S.length)===1&&(!y.containerMode||y.containerMode==="contain")?{fragment:y.children[0],errors:[]}:{fragment:y,errors:[]}))}const nT={kind:"role",role:"fragment"};function rv(n){return n.replace(/[\u200b\u00ad]/g,"").replace(/[\r\n\s\t]+/g," ").trim()}function hh(n){return{raw:n,normalized:rv(n)}}class uc{static parse(e,i,r){try{return new uc(e.value)._parse()}catch(a){if(a instanceof _b){const o=i.prettyErrors===!1?a.message:a.message+`:

`+e.value+`
`+" ".repeat(a.pos)+`^
`;return r.push({message:o,range:[i.lineCounter.linePos(e.range[0]),i.lineCounter.linePos(e.range[0]+a.pos)]}),null}throw a}}constructor(e){this._input=e,this._pos=0,this._length=e.length}_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 i=this._pos;for(;!this._eof()&&/[a-zA-Z]/.test(this._peek());)this._pos++;return this._input.slice(i,this._pos)}_readString(){let e="",i=!1;for(;!this._eof();){const r=this._next();if(i)e+=r,i=!1;else if(r==="\\")i=!0;else{if(r==='"')return e;e+=r}}this._throwError("Unterminated string")}_throwError(e,i=0){throw new _b(e,i||this._pos)}_readRegex(){let e="",i=!1,r=!1;for(;!this._eof();){const a=this._next();if(i)e+=a,i=!1;else if(a==="\\")i=!0,e+=a;else{if(a==="/"&&!r)return{pattern:e};a==="["?(r=!0,e+=a):a==="]"&&r?(e+=a,r=!1):e+=a}}this._throwError("Unterminated regex")}_readStringOrRegex(){const e=this._peek();return e==='"'?(this._next(),rv(this._readString())):e==="/"?(this._next(),this._readRegex()):null}_readAttributes(e){let i=this._pos;for(;this._skipWhitespace(),this._peek()==="[";){this._next(),this._skipWhitespace(),i=this._pos;const r=this._readIdentifier("attribute");this._skipWhitespace();let a="";if(this._peek()==="=")for(this._next(),this._skipWhitespace(),i=this._pos;this._peek()!=="]"&&!this._isWhitespace()&&!this._eof();)a+=this._next();this._skipWhitespace(),this._peek()!=="]"&&this._throwError("Expected ]"),this._next(),this._applyAttribute(e,r,a||"true",i)}}_parse(){this._skipWhitespace();const e=this._readIdentifier("role");this._skipWhitespace();const i=this._readStringOrRegex()||"",r={kind:"role",role:e,name:i};return this._readAttributes(r),this._skipWhitespace(),this._eof()||this._throwError("Unexpected input"),r}_applyAttribute(e,i,r,a){if(i==="checked"){this._assert(r==="true"||r==="false"||r==="mixed",'Value of "checked" attribute must be a boolean or "mixed"',a),e.checked=r==="true"?!0:r==="false"?!1:"mixed";return}if(i==="disabled"){this._assert(r==="true"||r==="false",'Value of "disabled" attribute must be a boolean',a),e.disabled=r==="true";return}if(i==="expanded"){this._assert(r==="true"||r==="false",'Value of "expanded" attribute must be a boolean',a),e.expanded=r==="true";return}if(i==="active"){this._assert(r==="true"||r==="false",'Value of "active" attribute must be a boolean',a),e.active=r==="true";return}if(i==="invalid"){this._assert(r==="true"||r==="false"||r==="grammar"||r==="spelling",'Value of "invalid" attribute must be a boolean, "grammar" or "spelling"',a),e.invalid=r==="true"?!0:r==="false"?!1:r;return}if(i==="level"){this._assert(!isNaN(Number(r)),'Value of "level" attribute must be a number',a),e.level=Number(r);return}if(i==="pressed"){this._assert(r==="true"||r==="false"||r==="mixed",'Value of "pressed" attribute must be a boolean or "mixed"',a),e.pressed=r==="true"?!0:r==="false"?!1:"mixed";return}if(i==="selected"){this._assert(r==="true"||r==="false",'Value of "selected" attribute must be a boolean',a),e.selected=r==="true";return}this._assert(!1,`Unsupported attribute [${i}]`,a)}_assert(e,i,r){e||this._throwError(i||"Assertion error",r)}}class _b extends Error{constructor(e,i){super(e),this.pos=i}}function iT(n,e){var u,f;function i(d,g,m){let y=1,S=m+y;for(const w of d.children||[])typeof w=="string"?(y++,S++):(y+=i(w,g,S),S+=y);if(!["none","presentation","fragment","iframe","generic"].includes(d.role)&&d.name){let w=g.get(d.role);w||(w=new Map,g.set(d.role,w));const E=w.get(d.name),x=y*100-m;(!E||E.sizeAndPosition<x)&&w.set(d.name,{node:d,sizeAndPosition:x})}return y}const r=new Map;n&&i(n,r,0);const a=new Map;i(e,a,0);const o=[];for(const[d,g]of a)for(const[m,y]of g)((u=r.get(d))==null?void 0:u.get(m))||o.push(y);return o.sort((d,g)=>g.sizeAndPosition-d.sizeAndPosition),(f=o[0])==null?void 0:f.node}function pd(n,e,i){return`internal:attr=[${n}=${Ze(e,(i==null?void 0:i.exact)||!1)}]`}function av(n){return n.split(",")}function lv(n){return n.includes(",")?JSON.stringify(n):n}function sT(n,e){return`internal:testid=[${lv(n)}=${Ze(e,!0)}]`}function rT(n,e){return"internal:label="+Vt(n,!!(e!=null&&e.exact))}function aT(n,e){return pd("alt",n,e)}function lT(n,e){return pd("title",n,e)}function oT(n,e){return pd("placeholder",n,e)}function cT(n,e){return"internal:text="+Vt(n,!!(e!=null&&e.exact))}function uT(n,e={}){const i=[];return e.checked!==void 0&&i.push(["checked",String(e.checked)]),e.disabled!==void 0&&i.push(["disabled",String(e.disabled)]),e.selected!==void 0&&i.push(["selected",String(e.selected)]),e.expanded!==void 0&&i.push(["expanded",String(e.expanded)]),e.includeHidden!==void 0&&i.push(["include-hidden",String(e.includeHidden)]),e.level!==void 0&&i.push(["level",String(e.level)]),e.name!==void 0&&i.push(["name",Ze(e.name,!!e.exact)]),e.description!==void 0&&i.push(["description",Ze(e.description,!!e.exact)]),e.pressed!==void 0&&i.push(["pressed",String(e.pressed)]),`internal:role=${n}${i.map(([r,a])=>`[${r}=${a}]`).join("")}`}function fT(n){return ov(n)?"'"+n.replace(/'/g,"''")+"'":n}function dh(n){return ov(n)?'"'+n.replace(/[\\"\x00-\x1f\x7f-\x9f]/g,e=>{switch(e){case"\\":return"\\\\";case'"':return'\\"';case"\b":return"\\b";case"\f":return"\\f";case`
`:return"\\n";case"\r":return"\\r";case"	":return"\\t";default:return"\\x"+e.charCodeAt(0).toString(16).padStart(2,"0")}})+'"':n}function ov(n){return!!(n.length===0||/^\s|\s$/.test(n)||/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f-\x9f]/.test(n)||/^-/.test(n)||/[\n:](\s|$)/.test(n)||/\s#/.test(n)||/[\n\r]/.test(n)||/^[&*\],?!>|@"'#%]/.test(n)||/[{}`]/.test(n)||/^\[/.test(n)||!isNaN(Number(n))||["y","n","yes","no","true","false","on","off","null"].includes(n.toLowerCase()))}let cv={};function hT(n){cv=n}function Hh(n,e){for(;e;){if(n.contains(e))return!0;e=fv(e)}return!1}function Ct(n){if(n.parentElement)return n.parentElement;if(n.parentNode&&n.parentNode.nodeType===11&&n.parentNode.host)return n.parentNode.host}function uv(n){let e=n;for(;e.parentNode;)e=e.parentNode;if(e.nodeType===11||e.nodeType===9)return e}function fv(n){for(;n.parentElement;)n=n.parentElement;return Ct(n)}function Va(n,e,i){for(;n;){const r=n.closest(e);if(i&&r!==i&&(r!=null&&r.contains(i)))return;if(r)return r;n=fv(n)}}function Ui(n,e){const i=e==="::before"?md:e==="::after"?yd:gd;if(i&&i.has(n))return i.get(n);const r=n.ownerDocument&&n.ownerDocument.defaultView?n.ownerDocument.defaultView.getComputedStyle(n,e):void 0;return i==null||i.set(n,r),r}function hv(n,e){if(e=e??Ui(n),!e)return!0;if(Element.prototype.checkVisibility&&cv.browserNameForWorkarounds!=="webkit"){if(!n.checkVisibility())return!1}else{const i=n.closest("details,summary");if(i!==n&&(i==null?void 0:i.nodeName)==="DETAILS"&&!i.open)return!1}return e.visibility==="visible"}function fc(n){const e=Ui(n);if(!e)return{visible:!0,inline:!1};const i=e.cursor;if(e.display==="contents"){for(let a=n.firstChild;a;a=a.nextSibling){if(a.nodeType===1&&ii(a))return{visible:!0,inline:!1,cursor:i};if(a.nodeType===3&&dv(a))return{visible:!0,inline:!0,cursor:i}}return{visible:!1,inline:!1,cursor:i}}if(!hv(n,e))return{cursor:i,visible:!1,inline:!1};const r=n.getBoundingClientRect();return{cursor:i,visible:r.width>0&&r.height>0,inline:e.display==="inline"}}function ii(n){return fc(n).visible}function dv(n){const e=n.ownerDocument.createRange();e.selectNode(n);const i=e.getBoundingClientRect();return i.width>0&&i.height>0}function et(n){const e=n.tagName;return typeof e=="string"?e.toUpperCase():n instanceof HTMLFormElement?"FORM":n.tagName.toUpperCase()}let gd,md,yd,pv=0;function bd(){++pv,gd??(gd=new Map),md??(md=new Map),yd??(yd=new Map)}function vd(){--pv||(gd=void 0,md=void 0,yd=void 0)}function Eb(n){return n.hasAttribute("aria-label")||n.hasAttribute("aria-labelledby")}const Tb="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]",dT=[["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 gv(n,e){return dT.some(([i,r])=>!(r!=null&&r.includes(e||""))&&n.hasAttribute(i))}function mv(n){return!Number.isNaN(Number(String(n.getAttribute("tabindex"))))}function pT(n){return!kv(n)&&(gT(n)||mv(n))}function gT(n){const e=et(n);return["BUTTON","DETAILS","SELECT","TEXTAREA"].includes(e)?!0:e==="A"||e==="AREA"?n.hasAttribute("href"):e==="INPUT"?!n.hidden:!1}const ph={A:n=>n.hasAttribute("href")?"link":null,AREA:n=>n.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:n=>Va(n,Tb)?null:"contentinfo",FORM:n=>Eb(n)?"form":null,H1:()=>"heading",H2:()=>"heading",H3:()=>"heading",H4:()=>"heading",H5:()=>"heading",H6:()=>"heading",HEADER:n=>Va(n,Tb)?null:"banner",HR:()=>"separator",HTML:()=>"document",IMG:n=>n.getAttribute("alt")===""&&!n.getAttribute("title")&&!gv(n)&&!mv(n)?"presentation":"img",INPUT:n=>{const e=n.type.toLowerCase();if(e==="search")return n.hasAttribute("list")?"combobox":"searchbox";if(["email","tel","text","url",""].includes(e)){const i=jr(n,n.getAttribute("list"))[0];return i&&et(i)==="DATALIST"?"combobox":"textbox"}return e==="hidden"?null:e==="file"?"button":OT[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:n=>Eb(n)?"region":null,SELECT:n=>n.hasAttribute("multiple")||n.size>1?"listbox":"combobox",STRONG:()=>"strong",SUB:()=>"subscript",SUP:()=>"superscript",SVG:()=>"img",TABLE:()=>"table",TBODY:()=>"rowgroup",TD:n=>{const e=Va(n,"table"),i=e?Sd(e):"";return i==="grid"||i==="treegrid"?"gridcell":"cell"},TEXTAREA:()=>"textbox",TFOOT:()=>"rowgroup",TH:n=>{const e=n.getAttribute("scope");if(e==="col"||e==="colgroup")return"columnheader";if(e==="row"||e==="rowgroup")return"rowheader";const i=n.nextElementSibling,r=n.previousElementSibling,a=n.parentElement&&et(n.parentElement)==="TR"?n.parentElement:void 0;if(!i&&!r){if(a){const o=Va(a,"table");if(o&&o.rows.length<=1)return null}return"columnheader"}return Ab(i)&&Ab(r)?"columnheader":Cb(i)||Cb(r)?"rowheader":"columnheader"},THEAD:()=>"rowgroup",TIME:()=>"time",TR:()=>"row",UL:()=>"list"};function Ab(n){return!!n&&et(n)==="TH"}function Cb(n){var e;return!n||et(n)!=="TD"?!1:!!((e=n.textContent)!=null&&e.trim()||n.children.length>0)}const mT={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 Nb(n){var r;const e=((r=ph[et(n)])==null?void 0:r.call(ph,n))||"";if(!e)return null;let i=n;for(;i;){const a=Ct(i),o=mT[et(i)];if(!o||!a||!o.includes(et(a)))break;const u=Sd(a);if((u==="none"||u==="presentation")&&!yv(a,u))return u;i=a}return e}const yT=["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 Sd(n){return(n.getAttribute("role")||"").split(" ").map(i=>i.trim()).find(i=>yT.includes(i))||null}function yv(n,e){return gv(n,e)||pT(n)}function Tt(n){const e=Sd(n);if(!e)return Nb(n);if(e==="none"||e==="presentation"){const i=Nb(n);if(yv(n,i))return i}return e}function bv(n){return n===null?void 0:n.toLowerCase()==="true"}function vv(n){return["STYLE","SCRIPT","NOSCRIPT","TEMPLATE"].includes(et(n))}function gn(n){if(vv(n))return!0;const e=Ui(n),i=n.nodeName==="SLOT";if((e==null?void 0:e.display)==="contents"&&!i){for(let a=n.firstChild;a;a=a.nextSibling)if(a.nodeType===1&&!gn(a)||a.nodeType===3&&dv(a))return!1;return!0}return!(n.nodeName==="OPTION"&&!!n.closest("select"))&&!i&&!hv(n,e)?!0:Sv(n)}function Sv(n){let e=ji==null?void 0:ji.get(n);if(e===void 0){if(e=!1,n.parentElement&&n.parentElement.shadowRoot&&!n.assignedSlot&&(e=!0),!e){const i=Ui(n);e=!i||i.display==="none"||bv(n.getAttribute("aria-hidden"))===!0}if(!e){const i=Ct(n);i&&(e=Sv(i))}ji==null||ji.set(n,e)}return e}function jr(n,e){if(!e)return[];const i=uv(n);if(!i)return[];try{const r=e.split(" ").filter(o=>!!o),a=[];for(const o of r){const u=i.querySelector("#"+CSS.escape(o));u&&!a.includes(u)&&a.push(u)}return a}catch{return[]}}function ti(n){return n.trim()}function Ja(n){return n.split(" ").map(e=>e.replace(/\r\n/g,`
`).replace(/[\u200b\u00ad]/g,"").replace(/\s\s*/g," ")).join(" ").trim()}function kb(n,e){const i=[...n.querySelectorAll(e)];for(const r of jr(n,n.getAttribute("aria-owns")))r.matches(e)&&i.push(r),i.push(...r.querySelectorAll(e));return i}function Za(n,e){const i=e==="::before"?jd:e==="::after"?Ld:Od;if(i!=null&&i.has(n))return i==null?void 0:i.get(n);const r=Ui(n,e);let a;if(r){const o=r.content;o&&o!=="none"&&o!=="normal"&&r.display!=="none"&&r.visibility!=="hidden"&&(a=bT(n,o,!!e))}return e&&a!==void 0&&((r==null?void 0:r.display)||"inline")!=="inline"&&(a=" "+a+" "),i&&i.set(n,a),a}function bT(n,e,i){if(!(!e||e==="none"||e==="normal"))try{let r=w0(e).filter(f=>!(f instanceof rc));const a=r.findIndex(f=>f instanceof _t&&f.value==="/");if(a!==-1)r=r.slice(a+1);else if(!i)return;const o=[];let u=0;for(;u<r.length;)if(r[u]instanceof ld)o.push(r[u].value),u++;else if(u+2<r.length&&r[u]instanceof Fa&&r[u].value==="attr"&&r[u+1]instanceof ad&&r[u+2]instanceof rd){const f=r[u+1].value;o.push(n.getAttribute(f)||""),u+=3}else return;return o.join("")}catch{}}function wv(n){const e=n.getAttribute("aria-labelledby");if(e===null)return null;const i=jr(n,e);return i.length?i:null}function vT(n,e){const i=["button","cell","checkbox","columnheader","gridcell","heading","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","row","rowheader","switch","tab","tooltip","treeitem"].includes(n),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(n);return i||r}function rl(n,e){const i=e?Nd:Cd;let r=i==null?void 0:i.get(n);return r===void 0&&(r="",["caption","code","definition","deletion","emphasis","generic","insertion","mark","paragraph","presentation","strong","subscript","suggestion","superscript","term","time"].includes(Tt(n)||"")||(r=Ja(_n(n,{includeHidden:e,visitedElements:new Set,embeddedInTargetElement:"self"}))),i==null||i.set(n,r)),r}function al(n,e){const i=e?Md:kd;let r=i==null?void 0:i.get(n);if(r===void 0){if(r="",n.hasAttribute("aria-describedby")){const a=jr(n,n.getAttribute("aria-describedby"));r=Ja(a.map(o=>_n(o,{includeHidden:e,visitedElements:new Set,embeddedInDescribedBy:{element:o,hidden:gn(o)}})).join(" "))}else n.hasAttribute("aria-description")?r=Ja(n.getAttribute("aria-description")||""):r=Ja(n.getAttribute("title")||"");i==null||i.set(n,r)}return r}const ST=["application","checkbox","columnheader","combobox","gridcell","listbox","radiogroup","rowheader","searchbox","slider","spinbutton","switch","textbox","tree"];function xv(n){const e=n.getAttribute("aria-invalid");return!e||e.trim()===""||e.toLocaleLowerCase()==="false"?"false":e==="true"||e==="grammar"||e==="spelling"?e:"true"}function wT(n){if("validity"in n){const e=n.validity;return(e==null?void 0:e.valid)===!1}return!1}function xT(n){const e=yr;let i=yr==null?void 0:yr.get(n);if(i===void 0){i="";const r=xv(n)!=="false",a=wT(n);if(r||a){const o=n.getAttribute("aria-errormessage");i=jr(n,o).map(d=>Ja(_n(d,{visitedElements:new Set,embeddedInDescribedBy:{element:d,hidden:gn(d)}}))).join(" ").trim()}e==null||e.set(n,i)}return i}function _n(n,e){var d,g,m,y;if(e.visitedElements.has(n))return"";const i={...e,embeddedInTargetElement:e.embeddedInTargetElement==="self"?"descendant":e.embeddedInTargetElement};if(!e.includeHidden){const S=!!((d=e.embeddedInLabelledBy)!=null&&d.hidden)||!!((g=e.embeddedInDescribedBy)!=null&&g.hidden)||!!((m=e.embeddedInNativeTextAlternative)!=null&&m.hidden)||!!((y=e.embeddedInLabel)!=null&&y.hidden);if(vv(n)||!S&&gn(n))return e.visitedElements.add(n),""}const r=wv(n);if(!e.embeddedInLabelledBy){const S=(r||[]).map(w=>_n(w,{...e,embeddedInLabelledBy:{element:w,hidden:gn(w)},embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0,embeddedInLabel:void 0,embeddedInNativeTextAlternative:void 0})).join(" ");if(S)return S}const a=Tt(n)||"",o=et(n);if(e.embeddedInLabel||e.embeddedInLabelledBy||e.embeddedInTargetElement==="descendant"){const S=[...n.labels||[]].includes(n),w=(r||[]).includes(n);if(!S&&!w){if(a==="textbox")return e.visitedElements.add(n),o==="INPUT"||o==="TEXTAREA"?n.value:n.textContent||"";if(["combobox","listbox"].includes(a)){e.visitedElements.add(n);let E;if(o==="SELECT")E=[...n.selectedOptions],!E.length&&n.options.length&&E.push(n.options[0]);else{const x=a==="combobox"?kb(n,"*").find(_=>Tt(_)==="listbox"):n;E=x?kb(x,'[aria-selected="true"]').filter(_=>Tt(_)==="option"):[]}return!E.length&&o==="INPUT"?n.value:E.map(x=>_n(x,i)).join(" ")}if(["progressbar","scrollbar","slider","spinbutton","meter"].includes(a))return e.visitedElements.add(n),n.hasAttribute("aria-valuetext")?n.getAttribute("aria-valuetext")||"":n.hasAttribute("aria-valuenow")?n.getAttribute("aria-valuenow")||"":n.getAttribute("value")||"";if(["menu"].includes(a))return e.visitedElements.add(n),""}}const u=n.getAttribute("aria-label")||"";if(ti(u))return e.visitedElements.add(n),u;if(!["presentation","none"].includes(a)){if(o==="INPUT"&&["button","submit","reset"].includes(n.type)){e.visitedElements.add(n);const S=n.value||"";return ti(S)?S:n.type==="submit"?"Submit":n.type==="reset"?"Reset":n.getAttribute("title")||""}if(o==="INPUT"&&n.type==="file"){e.visitedElements.add(n);const S=n.labels||[];return S.length&&!e.embeddedInLabelledBy?za(S,e):"Choose File"}if(o==="INPUT"&&n.type==="image"){e.visitedElements.add(n);const S=n.labels||[];if(S.length&&!e.embeddedInLabelledBy)return za(S,e);const w=n.getAttribute("alt")||"";if(ti(w))return w;const E=n.getAttribute("title")||"";return ti(E)?E:"Submit"}if(!r&&o==="BUTTON"){e.visitedElements.add(n);const S=n.labels||[];if(S.length)return za(S,e)}if(!r&&o==="OUTPUT"){e.visitedElements.add(n);const S=n.labels||[];return S.length?za(S,e):n.getAttribute("title")||""}if(!r&&(o==="TEXTAREA"||o==="SELECT"||o==="INPUT")){e.visitedElements.add(n);const S=n.labels||[];if(S.length)return za(S,e);const w=o==="INPUT"&&["text","password","search","tel","email","url"].includes(n.type)||o==="TEXTAREA",E=n.getAttribute("placeholder")||"",x=n.getAttribute("title")||"";return!w||x?x:E}if(!r&&o==="FIELDSET"){e.visitedElements.add(n);for(let w=n.firstElementChild;w;w=w.nextElementSibling)if(et(w)==="LEGEND")return _n(w,{...i,embeddedInNativeTextAlternative:{element:w,hidden:gn(w)}});return n.getAttribute("title")||""}if(!r&&o==="FIGURE"){e.visitedElements.add(n);for(let w=n.firstElementChild;w;w=w.nextElementSibling)if(et(w)==="FIGCAPTION")return _n(w,{...i,embeddedInNativeTextAlternative:{element:w,hidden:gn(w)}});return n.getAttribute("title")||""}if(o==="IMG"){e.visitedElements.add(n);const S=n.getAttribute("alt")||"";return ti(S)?S:n.getAttribute("title")||""}if(o==="TABLE"){e.visitedElements.add(n);for(let w=n.firstElementChild;w;w=w.nextElementSibling)if(et(w)==="CAPTION")return _n(w,{...i,embeddedInNativeTextAlternative:{element:w,hidden:gn(w)}});const S=n.getAttribute("summary")||"";if(S)return S}if(o==="AREA"){e.visitedElements.add(n);const S=n.getAttribute("alt")||"";return ti(S)?S:n.getAttribute("title")||""}if(o==="SVG"||n.ownerSVGElement){e.visitedElements.add(n);for(let S=n.firstElementChild;S;S=S.nextElementSibling)if(et(S)==="TITLE"&&S.ownerSVGElement)return _n(S,{...i,embeddedInLabelledBy:{element:S,hidden:gn(S)}})}if(n.ownerSVGElement&&o==="A"){const S=n.getAttribute("xlink:title")||"";if(ti(S))return e.visitedElements.add(n),S}}const f=o==="SUMMARY"&&!["presentation","none"].includes(a);if(vT(a,e.embeddedInTargetElement==="descendant")||f||e.embeddedInLabelledBy||e.embeddedInDescribedBy||e.embeddedInLabel||e.embeddedInNativeTextAlternative){e.visitedElements.add(n);const S=_T(n,i);if(e.embeddedInTargetElement==="self"?ti(S):S)return S}if(!["presentation","none"].includes(a)||o==="IFRAME"){e.visitedElements.add(n);const S=n.getAttribute("title")||"";if(ti(S))return S}return e.visitedElements.add(n),""}function _T(n,e){const i=[],r=(o,u)=>{var f;if(!(u&&o.assignedSlot))if(o.nodeType===1){const d=((f=Ui(o))==null?void 0:f.display)||"inline";let g=_n(o,e);(d!=="inline"||o.nodeName==="BR")&&(g=" "+g+" "),i.push(g)}else o.nodeType===3&&i.push(o.textContent||"")};i.push(Za(n,"::before")||"");const a=Za(n);if(a!==void 0)i.push(a);else{const o=n.nodeName==="SLOT"?n.assignedNodes():[];if(o.length)for(const u of o)r(u,!1);else{for(let u=n.firstChild;u;u=u.nextSibling)r(u,!0);if(n.shadowRoot)for(let u=n.shadowRoot.firstChild;u;u=u.nextSibling)r(u,!0);for(const u of jr(n,n.getAttribute("aria-owns")))r(u,!0)}}return i.push(Za(n,"::after")||""),i.join("")}const wd=["gridcell","option","row","tab","rowheader","columnheader","treeitem"];function _v(n){return et(n)==="OPTION"?n.selected:wd.includes(Tt(n)||"")?bv(n.getAttribute("aria-selected"))===!0:!1}const xd=["checkbox","menuitemcheckbox","option","radio","switch","menuitemradio","treeitem"];function Ev(n){const e=_d(n,!0);return e==="error"?!1:e}function ET(n){return _d(n,!0)}function TT(n){return _d(n,!1)}function _d(n,e){const i=et(n);if(e&&i==="INPUT"&&n.indeterminate)return"mixed";if(i==="INPUT"&&["checkbox","radio"].includes(n.type))return n.checked;if(xd.includes(Tt(n)||"")){const r=n.getAttribute("aria-checked");return r==="true"?!0:e&&r==="mixed"?"mixed":!1}return"error"}const AT=["checkbox","combobox","grid","gridcell","listbox","radiogroup","slider","spinbutton","textbox","columnheader","rowheader","searchbox","switch","treegrid"];function CT(n){const e=et(n);return["INPUT","TEXTAREA","SELECT"].includes(e)?n.hasAttribute("readonly"):AT.includes(Tt(n)||"")?n.getAttribute("aria-readonly")==="true":n.isContentEditable?!1:"error"}const Ed=["button"];function Tv(n){if(Ed.includes(Tt(n)||"")){const e=n.getAttribute("aria-pressed");if(e==="true")return!0;if(e==="mixed")return"mixed"}return!1}const Td=["application","button","checkbox","combobox","gridcell","link","listbox","menuitem","row","rowheader","tab","treeitem","columnheader","menuitemcheckbox","menuitemradio","rowheader","switch"];function Av(n){if(et(n)==="DETAILS")return n.open;if(Td.includes(Tt(n)||"")){const e=n.getAttribute("aria-expanded");return e===null?void 0:e==="true"}}const Ad=["heading","listitem","row","treeitem"];function Cv(n){const e={H1:1,H2:2,H3:3,H4:4,H5:5,H6:6}[et(n)];if(e)return e;if(Ad.includes(Tt(n)||"")){const i=n.getAttribute("aria-level"),r=i===null?Number.NaN:Number(i);if(Number.isInteger(r)&&r>=1)return r}return 0}const Nv=["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 hc(n){return kv(n)||Mv(n)}function kv(n){return["BUTTON","INPUT","SELECT","TEXTAREA","OPTION","OPTGROUP"].includes(et(n))&&(n.hasAttribute("disabled")||NT(n)||kT(n))}function NT(n){return et(n)==="OPTION"&&!!n.closest("OPTGROUP[DISABLED]")}function kT(n){const e=n==null?void 0:n.closest("FIELDSET[DISABLED]");if(!e)return!1;const i=e.querySelector(":scope > LEGEND");return!i||!i.contains(n)}function Mv(n,e=!1){if(!n)return!1;if(e||Nv.includes(Tt(n)||"")){const i=(n.getAttribute("aria-disabled")||"").toLowerCase();return i==="true"?!0:i==="false"?!1:Mv(Ct(n),!0)}return!1}function za(n,e){return[...n].map(i=>_n(i,{...e,embeddedInLabel:{element:i,hidden:gn(i)},embeddedInNativeTextAlternative:void 0,embeddedInLabelledBy:void 0,embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0})).filter(i=>!!i).join(" ")}function MT(n){const e=Rd;let i=n,r;const a=[];for(;i;i=Ct(i)){const o=e.get(i);if(o!==void 0){r=o;break}a.push(i);const u=Ui(i);if(!u){r=!0;break}const f=u.pointerEvents;if(f){r=f!=="none";break}}r===void 0&&(r=!0);for(const o of a)e.set(o,r);return r}let Cd,Nd,kd,Md,yr,ji,Od,jd,Ld,Rd,Ov=0;function xc(){bd(),++Ov,Cd??(Cd=new Map),Nd??(Nd=new Map),kd??(kd=new Map),Md??(Md=new Map),yr??(yr=new Map),ji??(ji=new Map),Od??(Od=new Map),jd??(jd=new Map),Ld??(Ld=new Map),Rd??(Rd=new Map)}function _c(){--Ov||(Cd=void 0,Nd=void 0,kd=void 0,Md=void 0,yr=void 0,ji=void 0,Od=void 0,jd=void 0,Ld=void 0,Rd=void 0),vd()}const OT={button:"button",checkbox:"checkbox",image:"button",number:"spinbutton",radio:"radio",range:"slider",reset:"button",submit:"button"};let jT=0;function jv(n){const e=n.boxes;return n.mode==="ai"?{visibility:"ariaOrVisible",refs:"interactable",refPrefix:n.refPrefix,includeGenericRole:!0,renderActive:!n.doNotRenderActive,renderCursorPointer:!0,renderBoxes:e}:n.mode==="autoexpect"?{visibility:"ariaAndVisible",refs:"none",renderBoxes:e}:n.mode==="codegen"?{visibility:"aria",refs:"none",renderStringsAsRegex:!0,renderBoxes:e}:{visibility:"aria",refs:"none",renderBoxes:e}}function br(n,e){const i=jv(e),r=new Set,a={root:{role:"fragment",name:"",children:[],props:{},box:fc(n),receivesPointerEvents:!0},elements:new Map,refs:new Map,iframeRefs:[]};Bh(a.root,n);const o=(f,d,g)=>{if(r.has(d))return;if(r.add(d),d.nodeType===Node.TEXT_NODE&&d.nodeValue){if(!g)return;const x=d.nodeValue;f.role!=="textbox"&&x&&f.children.push(d.nodeValue||"");return}if(d.nodeType!==Node.ELEMENT_NODE)return;const m=d,y=!gn(m);let S=y;if(i.visibility==="ariaOrVisible"&&(S=y||ii(m)),i.visibility==="ariaAndVisible"&&(S=y&&ii(m)),i.visibility==="aria"&&!S)return;const w=[];if(m.hasAttribute("aria-owns")){const x=m.getAttribute("aria-owns").split(/\s+/);for(const _ of x){const A=n.ownerDocument.getElementById(_);A&&w.push(A)}}const E=S?LT(m,i):null;E&&(E.ref&&(a.elements.set(E.ref,m),a.refs.set(m,E.ref),E.role==="iframe"&&a.iframeRefs.push(E.ref)),f.children.push(E)),u(E||f,m,w,S)};function u(f,d,g,m){var E;const S=(((E=Ui(d))==null?void 0:E.display)||"inline")!=="inline"||d.nodeName==="BR"?" ":"";S&&f.children.push(S),f.children.push(Za(d,"::before")||"");const w=d.nodeName==="SLOT"?d.assignedNodes():[];if(w.length)for(const x of w)o(f,x,m);else{for(let x=d.firstChild;x;x=x.nextSibling)x.assignedSlot||o(f,x,m);if(d.shadowRoot)for(let x=d.shadowRoot.firstChild;x;x=x.nextSibling)o(f,x,m)}for(const x of g)o(f,x,m);if(f.children.push(Za(d,"::after")||""),S&&f.children.push(S),f.children.length===1&&f.name===f.children[0]&&(f.children=[]),f.role==="link"&&d.hasAttribute("href")){const x=d.getAttribute("href");f.props.url=x}if(f.role==="textbox"&&d.hasAttribute("placeholder")&&d.getAttribute("placeholder")!==f.name){const x=d.getAttribute("placeholder");f.props.placeholder=x}}xc();try{o(a.root,n,!0)}finally{_c()}return DT(a.root),RT(a.root),a}function Mb(n,e){if(e.refs==="none"||e.refs==="interactable"&&(!n.box.visible||!n.receivesPointerEvents))return;const i=Ec(n);let r=i._ariaRef;(!r||r.role!==n.role||r.name!==n.name)&&(r={role:n.role,name:n.name,ref:(e.refPrefix??"")+"e"+ ++jT},i._ariaRef=r),n.ref=r.ref}function LT(n,e){const i=n.ownerDocument.activeElement===n;if(n.nodeName==="IFRAME"){const g={role:"iframe",name:"",children:[],props:{},box:fc(n),receivesPointerEvents:!0,active:i};return Bh(g,n),Mb(g,e),g}const r=e.includeGenericRole?"generic":null,a=Tt(n)??r;if(!a||a==="presentation"||a==="none")return null;const o=pt(rl(n,!1)||""),u=MT(n),f=fc(n);if(a==="generic"&&f.inline&&n.childNodes.length===1&&n.childNodes[0].nodeType===Node.TEXT_NODE)return null;const d={role:a,name:o,children:[],props:{},box:f,receivesPointerEvents:u,active:i};if(Bh(d,n),Mb(d,e),xd.includes(a)&&(d.checked=Ev(n)),Nv.includes(a)&&(d.disabled=hc(n)),Td.includes(a)&&(d.expanded=Av(n)),ST.includes(a)){const g=xv(n);d.invalid=g==="false"?!1:g==="true"?!0:g}return Ad.includes(a)&&(d.level=Cv(n)),Ed.includes(a)&&(d.pressed=Tv(n)),wd.includes(a)&&(d.selected=_v(n)),(n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)&&n.type!=="checkbox"&&n.type!=="radio"&&n.type!=="file"&&(d.children=[n.value]),d}function RT(n){const e=i=>{const r=[];for(const o of i.children||[]){if(typeof o=="string"){r.push(o);continue}const u=e(o);r.push(...u)}return i.role==="generic"&&!i.name&&r.length<=1&&r.every(o=>typeof o!="string"&&!!o.ref)?r:(i.children=r,[i])};e(n)}function DT(n){const e=(r,a)=>{if(!r.length)return;const o=pt(r.join(""));o&&a.push(o),r.length=0},i=r=>{const a=[],o=[];for(const u of r.children||[])typeof u=="string"?o.push(u):(e(o,a),i(u),a.push(u));e(o,a),r.children=a.length?a:[],r.children.length===1&&r.children[0]===r.name&&(r.children=[])};i(n)}function zT(n,e){return e?n?typeof e=="string"?n===e:!!n.match(new RegExp(e.pattern)):!1:!0}function Ob(n,e){if(!(e!=null&&e.normalized))return!0;if(!n)return!1;if(n===e.normalized||n===e.raw)return!0;const i=UT(e);return i?!!n.match(i):!1}const gh=Symbol("cachedRegex");function UT(n){if(n[gh]!==void 0)return n[gh];const{raw:e}=n,i=e.startsWith("/")&&e.endsWith("/")&&e.length>1;let r;try{r=i?new RegExp(e.slice(1,-1)):null}catch{r=null}return n[gh]=r,r}function jb(n,e){const i=br(n,{mode:"default"});return{matches:Lv(i.root,e,!1,!1),received:{raw:vr(i,{mode:"default"}).text,regex:vr(i,{mode:"codegen"}).text}}}function HT(n,e){const i=br(n,{mode:"default"}).root;return Lv(i,e,!0,!1).map(a=>Ec(a))}function Dd(n,e,i){var r;return typeof n=="string"&&e.kind==="text"?Ob(n,e.text):n===null||typeof n!="object"||e.kind!=="role"||e.role!=="fragment"&&e.role!==n.role||e.checked!==void 0&&e.checked!==n.checked||e.disabled!==void 0&&e.disabled!==n.disabled||e.expanded!==void 0&&e.expanded!==n.expanded||e.invalid!==void 0&&e.invalid!==n.invalid||e.level!==void 0&&e.level!==n.level||e.pressed!==void 0&&e.pressed!==n.pressed||e.selected!==void 0&&e.selected!==n.selected||!zT(n.name,e.name)||!Ob(n.props.url,(r=e.props)==null?void 0:r.url)?!1:e.containerMode==="contain"?Rb(n.children||[],e.children||[]):e.containerMode==="equal"?Lb(n.children||[],e.children||[],!1):e.containerMode==="deep-equal"||i?Lb(n.children||[],e.children||[],!0):Rb(n.children||[],e.children||[])}function Lb(n,e,i){if(e.length!==n.length)return!1;for(let r=0;r<e.length;++r)if(!Dd(n[r],e[r],i))return!1;return!0}function Rb(n,e){if(e.length>n.length)return!1;const i=n.slice(),r=e.slice();for(const a of r){let o=i.shift();for(;o&&!Dd(o,a,!1);)o=i.shift();if(!o)return!1}return!0}function Lv(n,e,i,r){const a=[],o=(u,f)=>{if(Dd(u,e,r)){const d=typeof u=="string"?f:u;return d&&a.push(d),!i}if(typeof u=="string")return!1;for(const d of u.children||[])if(o(d,u))return!0;return!1};return o(n,null),a}function Rv(n,e=new Map){n!=null&&n.ref&&e.set(n.ref,n);for(const i of(n==null?void 0:n.children)||[])typeof i!="string"&&Rv(i,e);return e}function BT(n,e){var o;const i=Rv(e==null?void 0:e.root),r=new Map,a=(u,f)=>{let d=u.children.length===(f==null?void 0:f.children.length)&&eT(u,f),g=d;for(let m=0;m<u.children.length;m++){const y=u.children[m],S=f==null?void 0:f.children[m];if(typeof y=="string")d&&(d=y===S),g&&(g=y===S);else{let w=typeof S!="string"?S:void 0;y.ref&&(w=i.get(y.ref));const E=a(y,w);(!w||!E&&!y.ref||w!==S)&&(g=!1),d&&(d=E&&w===S)}}return r.set(u,d?"same":g?"skip":"changed"),d};return a(n.root,i.get((o=e==null?void 0:e.root)==null?void 0:o.ref)),r}function qT(n,e){const i=[],r=a=>{const o=e.get(a);if(o!=="same")if(o==="skip")for(const u of a.children)typeof u!="string"&&r(u);else i.push(a)};for(const a of n)typeof a=="string"?i.push(a):r(a);return i}function zo(n){return"  ".repeat(n)}function vr(n,e,i){const r=jv(e),a=[],o={},u=r.renderStringsAsRegex?IT:()=>!0,f=r.renderStringsAsRegex?$T:E=>E;let d=n.root.role==="fragment"?n.root.children:[n.root];const g=BT(n,i);i&&(d=qT(d,g));const m=(E,x)=>{if(e.depth&&x>e.depth)return;const _=dh(f(E));_&&a.push(zo(x)+"- text: "+_)},y=(E,x)=>{let _=E.role;if(E.name&&E.name.length<=900){const A=f(E.name);if(A){const C=A.startsWith("/")&&A.endsWith("/")?A:JSON.stringify(A);_+=" "+C}}if(E.checked==="mixed"&&(_+=" [checked=mixed]"),E.checked===!0&&(_+=" [checked]"),E.disabled&&(_+=" [disabled]"),E.expanded&&(_+=" [expanded]"),E.active&&r.renderActive&&(_+=" [active]"),(E.invalid==="grammar"||E.invalid==="spelling")&&(_+=` [invalid=${E.invalid}]`),E.invalid===!0&&(_+=" [invalid]"),E.level&&(_+=` [level=${E.level}]`),E.pressed==="mixed"&&(_+=" [pressed=mixed]"),E.pressed===!0&&(_+=" [pressed]"),E.selected===!0&&(_+=" [selected]"),E.ref&&(_+=` [ref=${E.ref}]`,x&&cc(E)&&(_+=" [cursor=pointer]")),r.renderBoxes){const A=Ec(E);if(A){const C=A.getBoundingClientRect();_+=` [box=${Math.round(C.x)},${Math.round(C.y)},${Math.round(C.width)},${Math.round(C.height)}]`}}return _},S=E=>(E==null?void 0:E.children.length)===1&&typeof E.children[0]=="string"&&!Object.keys(E.props).length?E.children[0]:void 0,w=(E,x,_)=>{if(e.depth&&x>e.depth)return;if(E.role==="iframe"&&E.ref&&(o[E.ref]=x),g.get(E)==="same"&&E.ref){a.push(zo(x)+`- ref=${E.ref} [unchanged]`);return}const A=!!i&&!x,C=zo(x)+"- "+(A?"<changed> ":"")+fT(y(E,_)),H=S(E),V=!!e.depth&&x===e.depth;if(!H&&(!E.children.length||V)&&!Object.keys(E.props).length)a.push(C);else if(H!==void 0)u(E,H)?a.push(C+": "+dh(f(H))):a.push(C);else{a.push(C+":");for(const[j,I]of Object.entries(E.props))a.push(zo(x+1)+"- /"+j+": "+dh(I));const Q=!!E.ref&&_&&cc(E);for(const j of E.children)typeof j=="string"?m(u(E,j)?j:"",x+1):w(j,x+1,_&&!Q)}};for(const E of d)typeof E=="string"?m(E,0):w(E,0,!!r.renderCursorPointer);return{text:a.join(`
`),iframeDepths:o}}function $T(n){const e=[{regex:/\b[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}\b/,replacement:"[0-9a-fA-F-]+"},{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 i="",r=0;const a=new RegExp(e.map(o=>"("+o.regex.source+")").join("|"),"g");return n.replace(a,(o,...u)=>{const f=u[u.length-2],d=u.slice(0,-2);i+=lc(n.slice(r,f));for(let g=0;g<d.length;g++)if(d[g]){const{replacement:m}=e[g];i+=m;break}return r=f+o.length,o}),i?(i+=lc(n.slice(r)),String(new RegExp(i))):n}function IT(n,e){if(!e.length)return!1;if(!n.name)return!0;const i=e.length<=200&&n.name.length<=200?y_(e,n.name):"";let r=e;for(;i&&r.includes(i);)r=r.replace(i,"");return r.trim().length/e.length>.1}const Dv=Symbol("element");function Ec(n){return n[Dv]}function Bh(n,e){n[Dv]=e}function VT(n,e){const i=iT(n,e);return i?Ec(i):void 0}const Db=":host{font-size:13px;font-family:system-ui,Ubuntu,Droid Sans,sans-serif;color:#333;color-scheme:light}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-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;z-index:10;font-size:13px}x-pw-dialog:not(.autosize){width:400px;height:150px}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-action-cursor{position:absolute;width:18px;height:22px;pointer-events:none;z-index:4;filter:drop-shadow(0 1px 2px rgba(0,0,0,.4))}x-pw-action-cursor svg{width:100%;height:100%;position:static}x-pw-title{position:absolute;-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);background-color:#00000080;color:#fff;border-radius:6px;padding:6px;font-size:24px;line-height:1.4;white-space:nowrap;-webkit-user-select:none;user-select:none;z-index:3}x-pw-user-overlays,x-pw-user-overlay{position:absolute;top:0;right:0;bottom:0;left:0}@keyframes pw-fade-out{0%{opacity:1}to{opacity:0}}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.record.toggled>x-div{clip-path:url(#icon-stop-circle)}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}x-pw-action-list{flex:auto;display:flex;flex-direction:column;-webkit-user-select:none;user-select:none}x-pw-action-item{padding:6px 10px;cursor:pointer;overflow:hidden}x-pw-action-item:hover{background-color:#f2f2f2}x-pw-action-item:last-child{border-bottom-left-radius:6px;border-bottom-right-radius:6px}";class mh{constructor(e){this._renderedEntries=[],this._userOverlays=new Map,this._userOverlayHidden=!1,this._language="javascript",this._elementHighlightSelectors=new Map,this._injectedScript=e;const i=e.document;if(this._isUnderTest=e.isUnderTest,this._glassPaneElement=i.createElement("x-pw-glass"),this._glassPaneElement.setAttribute("popover","manual"),this._glassPaneElement.style.inset="0",this._glassPaneElement.style.width="100%",this._glassPaneElement.style.height="100%",this._glassPaneElement.style.maxWidth="none",this._glassPaneElement.style.maxHeight="none",this._glassPaneElement.style.padding="0",this._glassPaneElement.style.margin="0",this._glassPaneElement.style.border="none",this._glassPaneElement.style.overflow="visible",this._glassPaneElement.style.pointerEvents="none",this._glassPaneElement.style.display="flex",this._glassPaneElement.style.backgroundColor="transparent",this._actionPointElement=i.createElement("x-pw-action-point"),this._actionPointElement.setAttribute("hidden","true"),this._actionCursorElement=i.createElement("x-pw-action-cursor"),this._actionCursorElement.style.visibility="hidden",this._actionCursorElement.appendChild(this._createCursorSvg(i)),this._titleElement=i.createElement("x-pw-title"),this._titleElement.setAttribute("hidden","true"),this._userOverlayContainer=i.createElement("x-pw-user-overlays"),this._userOverlayContainer.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(Db),this._glassPaneShadow.adoptedStyleSheets.push(r)}else{const r=this._injectedScript.document.createElement("style");r.textContent=Db,this._glassPaneShadow.appendChild(r)}this._glassPaneShadow.appendChild(this._actionPointElement),this._glassPaneShadow.appendChild(this._actionCursorElement),this._glassPaneShadow.appendChild(this._titleElement),this._glassPaneShadow.appendChild(this._userOverlayContainer)}install(){this._injectedScript.document.documentElement&&((!this._injectedScript.document.documentElement.contains(this._glassPaneElement)||this._glassPaneElement.nextElementSibling)&&this._injectedScript.document.documentElement.appendChild(this._glassPaneElement),this._bringToFront())}_bringToFront(){this._glassPaneElement.hidePopover(),this._glassPaneElement.showPopover()}setLanguage(e){this._language=e}addElementHighlight(e,i){const r=It(e);this._elementHighlightSelectors.set(r,{selector:e,cssStyle:i}),this._ensureElementHighlightRaf()}removeElementHighlight(e){const i=It(e);this._elementHighlightSelectors.delete(i)&&this._elementHighlightSelectors.size===0&&(this._rafRequest&&(this._injectedScript.utils.builtins.cancelAnimationFrame(this._rafRequest),this._rafRequest=void 0),this.clearHighlight())}_ensureElementHighlightRaf(){if(this._rafRequest)return;const e=()=>{const i=[];for(const{selector:r,cssStyle:a}of this._elementHighlightSelectors.values()){const o=this._injectedScript.querySelectorAll(r,this._injectedScript.document.documentElement),u=Ri(this._language,It(r)),f=o.length>1?"#f6b26b7f":"#6fa8dc7f";for(let d=0;d<o.length;++d){const g=o.length>1?` [${d+1} of ${o.length}]`:"";i.push({element:o[d],color:f,tooltipText:u+g,cssStyle:a})}}this.updateHighlight(i),this._rafRequest=this._injectedScript.utils.builtins.requestAnimationFrame(e)};this._rafRequest=this._injectedScript.utils.builtins.requestAnimationFrame(e)}uninstall(){this._rafRequest&&(this._injectedScript.utils.builtins.cancelAnimationFrame(this._rafRequest),this._rafRequest=void 0),this._elementHighlightSelectors.clear(),this._glassPaneElement.remove()}showActionPoint(e,i,r){this._actionPointElement.style.top=i+"px",this._actionPointElement.style.left=e+"px",this._actionPointElement.hidden=!1,r?this._actionPointElement.style.animation=`pw-fade-out ${r}ms ease-out forwards`:this._actionPointElement.style.animation=""}hideActionPoint(){this._actionPointElement.hidden=!0}moveActionCursor(e,i,r){const a=r?Math.max(80,Math.min(r*.6,400)):0;this._actionCursorElement.style.transition=`top ${a}ms ease, left ${a}ms ease`,this._actionCursorElement.style.left=e+"px",this._actionCursorElement.style.top=i+"px",this._actionCursorElement.style.visibility="visible"}hideActionCursor(){this._actionCursorElement.style.visibility="hidden"}_createCursorSvg(e){const i="http://www.w3.org/2000/svg",r=e.createElementNS(i,"svg");r.setAttribute("viewBox","0 0 18 22");const a=e.createElementNS(i,"path");return a.setAttribute("d","M1 1 L1 17 L5.5 13 L8 20.5 L11 19.5 L8.5 12 L15 12 Z"),a.setAttribute("fill","white"),a.setAttribute("stroke","black"),a.setAttribute("stroke-width","1.5"),a.setAttribute("stroke-linejoin","round"),r.appendChild(a),r}showActionTitle(e,i,r,a){if(this._titleElement.textContent=e,this._titleElement.hidden=!1,i){const o=i/4;this._titleElement.style.animation=`pw-fade-out ${o}ms ease-out ${i-o}ms forwards`}else this._titleElement.style.animation="";switch(this._titleElement.style.top="",this._titleElement.style.bottom="",this._titleElement.style.left="",this._titleElement.style.right="",this._titleElement.style.transform="",r){case"top-left":this._titleElement.style.top="6px",this._titleElement.style.left="6px";break;case"top":this._titleElement.style.top="6px",this._titleElement.style.left="50%",this._titleElement.style.transform="translateX(-50%)";break;case"bottom-left":this._titleElement.style.bottom="6px",this._titleElement.style.left="6px";break;case"bottom":this._titleElement.style.bottom="6px",this._titleElement.style.left="50%",this._titleElement.style.transform="translateX(-50%)";break;case"bottom-right":this._titleElement.style.bottom="6px",this._titleElement.style.right="6px";break;case"top-right":default:this._titleElement.style.top="6px",this._titleElement.style.right="6px";break}a&&(this._titleElement.style.fontSize=a+"px")}hideActionTitle(){this._titleElement.hidden=!0}addUserOverlay(e,i){const r=this._injectedScript.document.createElement("div");r.className="x-pw-user-overlay",r.innerHTML=i;for(const a of r.querySelectorAll("script"))a.remove();for(const a of r.querySelectorAll("*"))for(const o of[...a.attributes])o.name.startsWith("on")&&a.removeAttribute(o.name);return this._userOverlays.set(e,r),this._userOverlayContainer.appendChild(r),this._userOverlayContainer.hidden=this._userOverlayHidden,e}getUserOverlay(e){return this._userOverlays.get(e)}removeUserOverlay(e){const i=this._userOverlays.get(e);i&&(i.remove(),this._userOverlays.delete(e)),this._userOverlays.size===0&&(this._userOverlayContainer.hidden=!0)}setUserOverlaysVisible(e){this._userOverlayHidden=!e,this._userOverlayContainer.hidden=!e||this._userOverlays.size===0}clearHighlight(){var e,i;for(const r of this._renderedEntries)(e=r.highlightElement)==null||e.remove(),(i=r.tooltipElement)==null||i.remove();this._renderedEntries=[]}maskElements(e,i){this.updateHighlight(e.map(r=>({element:r,color:i})))}updateHighlight(e){if(!this._highlightIsUpToDate(e)){this.clearHighlight();for(const i of e){const r=this._createHighlightElement();this._glassPaneShadow.appendChild(r);let a;if(i.tooltipText){a=this._injectedScript.document.createElement("x-pw-tooltip"),this._glassPaneShadow.appendChild(a),a.style.top="0",a.style.left="0",a.style.display="flex";const o=this._injectedScript.document.createElement("x-pw-tooltip-line");o.textContent=i.tooltipText,a.appendChild(o)}this._renderedEntries.push({targetElement:i.element,box:zb(i.box),color:i.color,borderColor:i.borderColor,fadeDuration:i.fadeDuration,cssStyle:i.cssStyle,tooltipElement:a,highlightElement:r})}for(const i of this._renderedEntries){if(!i.box&&!i.targetElement||(i.box=i.box||i.targetElement.getBoundingClientRect(),!i.tooltipElement))continue;const{anchorLeft:r,anchorTop:a}=this.tooltipPosition(i.box,i.tooltipElement);i.tooltipTop=a,i.tooltipLeft=r}for(const i of this._renderedEntries){i.tooltipElement&&(i.tooltipElement.style.top=i.tooltipTop+"px",i.tooltipElement.style.left=i.tooltipLeft+"px");const r=i.box;i.highlightElement.style.backgroundColor=i.color,i.highlightElement.style.left=r.x+"px",i.highlightElement.style.top=r.y+"px",i.highlightElement.style.width=r.width+"px",i.highlightElement.style.height=r.height+"px",i.highlightElement.style.display="block",i.borderColor&&(i.highlightElement.style.border="2px solid "+i.borderColor),i.fadeDuration&&(i.highlightElement.style.animation=`pw-fade-out ${i.fadeDuration}ms ease-out forwards`),i.cssStyle&&(i.highlightElement.style.cssText+=";"+i.cssStyle),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}firstTooltipBox(){const e=this._renderedEntries[0];if(!(!e||!e.tooltipElement||e.tooltipLeft===void 0||e.tooltipTop===void 0))return{x:e.tooltipLeft,y:e.tooltipTop,left:e.tooltipLeft,top:e.tooltipTop,width:e.tooltipElement.offsetWidth,height:e.tooltipElement.offsetHeight,bottom:e.tooltipTop+e.tooltipElement.offsetHeight,right:e.tooltipLeft+e.tooltipElement.offsetWidth,toJSON:()=>{}}}tooltipPosition(e,i){const r=i.offsetWidth,a=i.offsetHeight,o=this._glassPaneElement.offsetWidth,u=this._glassPaneElement.offsetHeight;let f=Math.max(5,e.left);f+r>o-5&&(f=o-r-5);let d=Math.max(0,e.bottom)+5;return d+a>u-5&&(Math.max(0,e.top)>a+5?d=Math.max(0,e.top)-a-5:d=u-5-a),{anchorLeft:f,anchorTop:d}}_highlightIsUpToDate(e){if(e.length!==this._renderedEntries.length)return!1;for(let i=0;i<this._renderedEntries.length;++i){if(e[i].element!==this._renderedEntries[i].targetElement||e[i].color!==this._renderedEntries[i].color||e[i].cssStyle!==this._renderedEntries[i].cssStyle)return!1;const r=this._renderedEntries[i].box;if(!r)return!1;const a=e[i].box?zb(e[i].box):e[i].element.getBoundingClientRect();if(a.top!==r.top||a.right!==r.right||a.bottom!==r.bottom||a.left!==r.left)return!1}return!0}_createHighlightElement(){return this._injectedScript.document.createElement("x-pw-highlight")}appendChild(e){this._glassPaneShadow.appendChild(e)}onGlassPaneClick(e){this._glassPaneElement.style.pointerEvents="auto",this._glassPaneElement.style.backgroundColor="rgba(0, 0, 0, 0.3)",this._glassPaneElement.addEventListener("click",e)}offGlassPaneClick(e){this._glassPaneElement.style.pointerEvents="none",this._glassPaneElement.style.backgroundColor="transparent",this._glassPaneElement.removeEventListener("click",e)}}function zb(n){if(n)return new DOMRect(n.x,n.y,n.width,n.height)}function GT(n,e,i){const r=n.left-e.right;if(!(r<0||i!==void 0&&r>i))return r+Math.max(e.bottom-n.bottom,0)+Math.max(n.top-e.top,0)}function KT(n,e,i){const r=e.left-n.right;if(!(r<0||i!==void 0&&r>i))return r+Math.max(e.bottom-n.bottom,0)+Math.max(n.top-e.top,0)}function XT(n,e,i){const r=e.top-n.bottom;if(!(r<0||i!==void 0&&r>i))return r+Math.max(n.left-e.left,0)+Math.max(e.right-n.right,0)}function YT(n,e,i){const r=n.top-e.bottom;if(!(r<0||i!==void 0&&r>i))return r+Math.max(n.left-e.left,0)+Math.max(e.right-n.right,0)}function FT(n,e,i){const r=i===void 0?50:i;let a=0;return n.left-e.right>=0&&(a+=n.left-e.right),e.left-n.right>=0&&(a+=e.left-n.right),e.top-n.bottom>=0&&(a+=e.top-n.bottom),n.top-e.bottom>=0&&(a+=n.top-e.bottom),a>r?void 0:a}const QT=["left-of","right-of","above","below","near"];function zv(n,e,i,r){const a=e.getBoundingClientRect(),o={"left-of":KT,"right-of":GT,above:XT,below:YT,near:FT}[n];let u;for(const f of i){if(f===e)continue;const d=o(a,f.getBoundingClientRect(),r);d!==void 0&&(u===void 0||d<u)&&(u=d)}return u}function Ub(n,e){const i=typeof n=="string"&&!e.caseSensitive?n.toUpperCase():n,r=typeof e.value=="string"&&!e.caseSensitive?e.value.toUpperCase():e.value;return e.op==="<truthy>"?!!i:e.op==="="?r instanceof RegExp?typeof i=="string"&&!!i.match(r):i===r:typeof i!="string"||typeof r!="string"?!1:e.op==="*="?i.includes(r):e.op==="^="?i.startsWith(r):e.op==="$="?i.endsWith(r):e.op==="|="?i===r||i.startsWith(r+"-"):e.op==="~="?i.split(" ").includes(r):!1}function zd(n){const e=n.ownerDocument;return n.nodeName==="SCRIPT"||n.nodeName==="NOSCRIPT"||n.nodeName==="STYLE"||e.head&&e.head.contains(n)}function Kt(n,e){let i=n.get(e);if(i===void 0){if(i={full:"",normalized:"",immediate:[]},!zd(e)){let r="";if(e instanceof HTMLInputElement&&(e.type==="submit"||e.type==="button"))i={full:e.value,normalized:pt(e.value),immediate:[e.value]};else{for(let a=e.firstChild;a;a=a.nextSibling)if(a.nodeType===Node.TEXT_NODE)i.full+=a.nodeValue||"",r+=a.nodeValue||"";else{if(a.nodeType===Node.COMMENT_NODE)continue;r&&i.immediate.push(r),r="",a.nodeType===Node.ELEMENT_NODE&&(i.full+=Kt(n,a).full)}r&&i.immediate.push(r),e.shadowRoot&&(i.full+=Kt(n,e.shadowRoot).full),i.full&&(i.normalized=pt(i.full))}}n.set(e,i)}return i}function Tc(n,e,i){if(zd(e)||!i(Kt(n,e)))return"none";for(let r=e.firstChild;r;r=r.nextSibling)if(r.nodeType===Node.ELEMENT_NODE&&i(Kt(n,r)))return"selfAndChildren";return e.shadowRoot&&i(Kt(n,e.shadowRoot))?"selfAndChildren":"self"}function Uv(n,e){const i=wv(e);if(i)return i.map(o=>Kt(n,o));const r=e.getAttribute("aria-label");if(r!==null&&r.trim())return[{full:r,normalized:pt(r),immediate:[r]}];const a=e.nodeName==="INPUT"&&e.type!=="hidden";if(["BUTTON","METER","OUTPUT","PROGRESS","SELECT","TEXTAREA"].includes(e.nodeName)||a){const o=e.labels;if(o)return[...o].map(u=>Kt(n,u))}return[]}const Hv=["selected","checked","pressed","expanded","level","disabled","name","description","include-hidden"];Hv.sort();function Ua(n,e,i){if(!e.includes(i))throw new Error(`"${n}" attribute is only supported for roles: ${e.slice().sort().map(r=>`"${r}"`).join(", ")}`)}function cr(n,e){if(n.op!=="<truthy>"&&!e.includes(n.value))throw new Error(`"${n.name}" must be one of ${e.map(i=>JSON.stringify(i)).join(", ")}`)}function ur(n,e){if(!e.includes(n.op))throw new Error(`"${n.name}" does not support "${n.op}" matcher`)}function PT(n,e){const i={role:e};for(const r of n)switch(r.name){case"checked":{Ua(r.name,xd,e),cr(r,[!0,!1,"mixed"]),ur(r,["<truthy>","="]),i.checked=r.op==="<truthy>"?!0:r.value;break}case"pressed":{Ua(r.name,Ed,e),cr(r,[!0,!1,"mixed"]),ur(r,["<truthy>","="]),i.pressed=r.op==="<truthy>"?!0:r.value;break}case"selected":{Ua(r.name,wd,e),cr(r,[!0,!1]),ur(r,["<truthy>","="]),i.selected=r.op==="<truthy>"?!0:r.value;break}case"expanded":{Ua(r.name,Td,e),cr(r,[!0,!1]),ur(r,["<truthy>","="]),i.expanded=r.op==="<truthy>"?!0:r.value;break}case"level":{if(Ua(r.name,Ad,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');i.level=r.value;break}case"disabled":{cr(r,[!0,!1]),ur(r,["<truthy>","="]),i.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');i.name=r.value,i.nameOp=r.op,i.nameExact=r.caseSensitive;break}case"description":{if(r.op==="<truthy>")throw new Error('"description" attribute must have a value');if(typeof r.value!="string"&&!(r.value instanceof RegExp))throw new Error('"description" attribute must be a string or a regular expression');i.description=r.value,i.descriptionOp=r.op,i.descriptionExact=r.caseSensitive;break}case"include-hidden":{cr(r,[!0,!1]),ur(r,["<truthy>","="]),i.includeHidden=r.op==="<truthy>"?!0:r.value;break}default:throw new Error(`Unknown attribute "${r.name}", must be one of ${Hv.map(a=>`"${a}"`).join(", ")}.`)}return i}function JT(n,e,i){const r=[],a=u=>{if(Tt(u)===e.role&&!(e.selected!==void 0&&_v(u)!==e.selected)&&!(e.checked!==void 0&&Ev(u)!==e.checked)&&!(e.pressed!==void 0&&Tv(u)!==e.pressed)&&!(e.expanded!==void 0&&Av(u)!==e.expanded)&&!(e.level!==void 0&&Cv(u)!==e.level)&&!(e.disabled!==void 0&&hc(u)!==e.disabled)&&!(!e.includeHidden&&gn(u))){if(e.name!==void 0){const f=pt(rl(u,!!e.includeHidden));if(typeof e.name=="string"&&(e.name=pt(e.name)),i&&!e.nameExact&&e.nameOp==="="&&(e.nameOp="*="),!Ub(f,{op:e.nameOp||"=",value:e.name,caseSensitive:!!e.nameExact}))return}if(e.description!==void 0){const f=pt(al(u,!!e.includeHidden));if(typeof e.description=="string"&&(e.description=pt(e.description)),i&&!e.descriptionExact&&e.descriptionOp==="="&&(e.descriptionOp="*="),!Ub(f,{op:e.descriptionOp||"=",value:e.description,caseSensitive:!!e.descriptionExact}))return}r.push(u)}},o=u=>{const f=[];u.shadowRoot&&f.push(u.shadowRoot);for(const d of u.querySelectorAll("*"))a(d),d.shadowRoot&&f.push(d.shadowRoot);f.forEach(o)};return o(n),r}function Hb(n){return{queryAll:(e,i)=>{const r=Er(i),a=r.name.toLowerCase();if(!a)throw new Error("Role must not be empty");const o=PT(r.attributes,a);xc();try{return JT(e,o,n)}finally{_c()}}}}class ZT{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",tA),this._engines.set("is",Ga),this._engines.set("where",Ga),this._engines.set("has",WT),this._engines.set("scope",eA),this._engines.set("light",nA),this._engines.set("visible",iA),this._engines.set("text",sA),this._engines.set("text-is",rA),this._engines.set("text-matches",aA),this._engines.set("has-text",lA),this._engines.set("right-of",Ha("right-of")),this._engines.set("left-of",Ha("left-of")),this._engines.set("above",Ha("above")),this._engines.set("below",Ha("below")),this._engines.set("near",Ha("near")),this._engines.set("nth-match",oA);const e=[...this._engines.keys()];e.sort();const i=[...B0];if(i.sort(),e.join("|")!==i.join("|"))throw new Error(`Please keep customCSSNames in sync with evaluator engines: ${e.join("|")} vs ${i.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,i,r,a){e.has(i)||e.set(i,[]);const o=e.get(i),u=o.find(d=>r.every((g,m)=>d.rest[m]===g));if(u)return u.result;const f=a();return o.push({rest:r,result:f}),f}_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,i,r){const a=this._checkSelector(i);this.begin();try{return this._cached(this._cacheMatches,e,[a,r.scope,r.pierceShadow,r.originalScope],()=>Array.isArray(a)?this._matchesEngine(Ga,e,a,r):(this._hasScopeClause(a)&&(r=this._expandContextForScopeMatching(r)),this._matchesSimple(e,a.simples[a.simples.length-1].selector,r)?this._matchesParents(e,a,a.simples.length-2,r):!1))}finally{this.end()}}query(e,i){const r=this._checkSelector(i);this.begin();try{return this._cached(this._cacheQuery,r,[e.scope,e.pierceShadow,e.originalScope],()=>{if(Array.isArray(r))return this._queryEngine(Ga,e,r);this._hasScopeClause(r)&&(e=this._expandContextForScopeMatching(e));const a=this._scoreMap;this._scoreMap=new Map;let o=this._querySimple(e,r.simples[r.simples.length-1].selector);return o=o.filter(u=>this._matchesParents(u,r,r.simples.length-2,e)),this._scoreMap.size&&o.sort((u,f)=>{const d=this._scoreMap.get(u),g=this._scoreMap.get(f);return d===g?0:d===void 0?1:g===void 0?-1:d-g}),this._scoreMap=a,o})}finally{this.end()}}_markScore(e,i){this._scoreMap&&this._scoreMap.set(e,i)}_hasScopeClause(e){return e.simples.some(i=>i.selector.functions.some(r=>r.name==="scope"))}_expandContextForScopeMatching(e){if(e.scope.nodeType!==1)return e;const i=Ct(e.scope);return i?{...e,scope:i,originalScope:e.originalScope||e.scope}:e}_matchesSimple(e,i,r){return this._cached(this._cacheMatchesSimple,e,[i,r.scope,r.pierceShadow,r.originalScope],()=>{if(e===r.scope||i.css&&!this._matchesCSS(e,i.css))return!1;for(const a of i.functions)if(!this._matchesEngine(this._getEngine(a.name),e,a.args,r))return!1;return!0})}_querySimple(e,i){return i.functions.length?this._cached(this._cacheQuerySimple,i,[e.scope,e.pierceShadow,e.originalScope],()=>{let r=i.css;const a=i.functions;r==="*"&&a.length&&(r=void 0);let o,u=-1;r!==void 0?o=this._queryCSS(e,r):(u=a.findIndex(f=>this._getEngine(f.name).query!==void 0),u===-1&&(u=0),o=this._queryEngine(this._getEngine(a[u].name),e,a[u].args));for(let f=0;f<a.length;f++){if(f===u)continue;const d=this._getEngine(a[f].name);d.matches!==void 0&&(o=o.filter(g=>this._matchesEngine(d,g,a[f].args,e)))}for(let f=0;f<a.length;f++){if(f===u)continue;const d=this._getEngine(a[f].name);d.matches===void 0&&(o=o.filter(g=>this._matchesEngine(d,g,a[f].args,e)))}return o}):this._queryCSS(e,i.css||"*")}_matchesParents(e,i,r,a){return r<0?!0:this._cached(this._cacheMatchesParents,e,[i,r,a.scope,a.pierceShadow,a.originalScope],()=>{const{selector:o,combinator:u}=i.simples[r];if(u===">"){const f=Uo(e,a);return!f||!this._matchesSimple(f,o,a)?!1:this._matchesParents(f,i,r-1,a)}if(u==="+"){const f=yh(e,a);return!f||!this._matchesSimple(f,o,a)?!1:this._matchesParents(f,i,r-1,a)}if(u===""){let f=Uo(e,a);for(;f;){if(this._matchesSimple(f,o,a)){if(this._matchesParents(f,i,r-1,a))return!0;if(i.simples[r-1].combinator==="")break}f=Uo(f,a)}return!1}if(u==="~"){let f=yh(e,a);for(;f;){if(this._matchesSimple(f,o,a)){if(this._matchesParents(f,i,r-1,a))return!0;if(i.simples[r-1].combinator==="~")break}f=yh(f,a)}return!1}if(u===">="){let f=e;for(;f;){if(this._matchesSimple(f,o,a)){if(this._matchesParents(f,i,r-1,a))return!0;if(i.simples[r-1].combinator==="")break}f=Uo(f,a)}return!1}throw new Error(`Unsupported combinator "${u}"`)})}_matchesEngine(e,i,r,a){if(e.matches)return this._callMatches(e,i,r,a);if(e.query)return this._callQuery(e,r,a).includes(i);throw new Error('Selector engine should implement "matches" or "query"')}_queryEngine(e,i,r){if(e.query)return this._callQuery(e,r,i);if(e.matches)return this._queryCSS(i,"*").filter(a=>this._callMatches(e,a,r,i));throw new Error('Selector engine should implement "matches" or "query"')}_callMatches(e,i,r,a){return this._cached(this._cacheCallMatches,i,[e,a.scope,a.pierceShadow,a.originalScope,...r],()=>e.matches(i,r,a,this))}_callQuery(e,i,r){return this._cached(this._cacheCallQuery,e,[r.scope,r.pierceShadow,r.originalScope,...i],()=>e.query(r,i,this))}_matchesCSS(e,i){return e.matches(i)}_queryCSS(e,i){return this._cached(this._cacheQueryCSS,i,[e.scope,e.pierceShadow,e.originalScope],()=>{let r=[];function a(o){if(r=r.concat([...o.querySelectorAll(i)]),!!e.pierceShadow){o.shadowRoot&&a(o.shadowRoot);for(const u of o.querySelectorAll("*"))u.shadowRoot&&a(u.shadowRoot)}}return a(e.scope),r})}_getEngine(e){const i=this._engines.get(e);if(!i)throw new Error(`Unknown selector engine "${e}"`);return i}}const Ga={matches(n,e,i,r){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');return e.some(a=>r.matches(n,a,i))},query(n,e,i){if(e.length===0)throw new Error('"is" engine expects non-empty selector list');let r=[];for(const a of e)r=r.concat(i.query(n,a));return e.length===1?r:Bv(r)}},WT={matches(n,e,i,r){if(e.length===0)throw new Error('"has" engine expects non-empty selector list');return r.query({...i,scope:n},e).length>0}},eA={matches(n,e,i,r){if(e.length!==0)throw new Error('"scope" engine expects no arguments');const a=i.originalScope||i.scope;return a.nodeType===9?n===a.documentElement:n===a},query(n,e,i){if(e.length!==0)throw new Error('"scope" engine expects no arguments');const r=n.originalScope||n.scope;if(r.nodeType===9){const a=r.documentElement;return a?[a]:[]}return r.nodeType===1?[r]:[]}},tA={matches(n,e,i,r){if(e.length===0)throw new Error('"not" engine expects non-empty selector list');return!r.matches(n,e,i)}},nA={query(n,e,i){return i.query({...n,pierceShadow:!1},e)},matches(n,e,i,r){return r.matches(n,e,{...i,pierceShadow:!1})}},iA={matches(n,e,i,r){if(e.length)throw new Error('"visible" engine expects no arguments');return ii(n)}},sA={matches(n,e,i,r){if(e.length!==1||typeof e[0]!="string")throw new Error('"text" engine expects a single string');const a=pt(e[0]).toLowerCase(),o=u=>u.normalized.toLowerCase().includes(a);return Tc(r._cacheText,n,o)==="self"}},rA={matches(n,e,i,r){if(e.length!==1||typeof e[0]!="string")throw new Error('"text-is" engine expects a single string');const a=pt(e[0]),o=u=>!a&&!u.immediate.length?!0:u.immediate.some(f=>pt(f)===a);return Tc(r._cacheText,n,o)!=="none"}},aA={matches(n,e,i,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 a=new RegExp(e[0],e.length===2?e[1]:void 0),o=u=>a.test(u.full);return Tc(r._cacheText,n,o)==="self"}},lA={matches(n,e,i,r){if(e.length!==1||typeof e[0]!="string")throw new Error('"has-text" engine expects a single string');if(zd(n))return!1;const a=pt(e[0]).toLowerCase();return(u=>u.normalized.toLowerCase().includes(a))(Kt(r._cacheText,n))}};function Ha(n){return{matches(e,i,r,a){const o=i.length&&typeof i[i.length-1]=="number"?i[i.length-1]:void 0,u=o===void 0?i:i.slice(0,i.length-1);if(i.length<1+(o===void 0?0:1))throw new Error(`"${n}" engine expects a selector list and optional maximum distance in pixels`);const f=a.query(r,u),d=zv(n,e,f,o);return d===void 0?!1:(a._markScore(e,d),!0)}}}const oA={query(n,e,i){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 a=Ga.query(n,e.slice(0,e.length-1),i);return r--,r<a.length?[a[r]]:[]}};function Uo(n,e){if(n!==e.scope)return e.pierceShadow?Ct(n):n.parentElement||void 0}function yh(n,e){if(n!==e.scope)return n.previousElementSibling||void 0}function Bv(n){const e=new Map,i=[],r=[];function a(u){let f=e.get(u);if(f)return f;const d=Ct(u);return d?a(d).children.push(u):i.push(u),f={children:[],taken:!1},e.set(u,f),f}for(const u of n)a(u).taken=!0;function o(u){const f=e.get(u);if(f.taken&&r.push(u),f.children.length>1){const d=new Set(f.children);f.children=[];let g=u.firstElementChild;for(;g&&f.children.length<d.size;)d.has(g)&&f.children.push(g),g=g.nextElementSibling;for(g=u.shadowRoot?u.shadowRoot.firstElementChild:null;g&&f.children.length<d.size;)d.has(g)&&f.children.push(g),g=g.nextElementSibling}f.children.forEach(o)}return i.forEach(o),r}const qv=10,Lr=qv/2,Bb=1,cA=2,uA=10,fA=50,qh=100,$v=120,Iv=140,Vv=160,Zo=180,Gv=200,qb=250,hA=$v+Lr,dA=Iv+Lr,$b=qh+Lr,pA=Vv+Lr,gA=Zo+Lr,mA=Gv+Lr,yA=300,bA=500,$h=510,bh=520,Kv=530,Ih=1e4,vA=1e7,SA=1e3;function Ib(n,e,i){n._evaluator.begin();const r={allowText:new Map,disallowText:new Map};xc(),bd();try{let a=[];if(i.forTextExpect){let f=Ka(n,e.ownerDocument.documentElement,i);for(let d=e;d;d=Ct(d)){const g=rs(r,n,d,{...i,noText:!0});if(!g)continue;if(as(g)<=SA){f=g;break}}a=[Wo(f)]}else{if(!e.matches("input,textarea,select")&&!e.isContentEditable){const f=Va(e,"button,select,input,[role=button],[role=checkbox],[role=radio],a,[role=link]",i.root);f&&ii(f)&&(e=f)}if(i.multiple){const f=rs(r,n,e,i),d=rs(r,n,e,{...i,noText:!0});let g=[f,d];if(r.allowText.clear(),r.disallowText.clear(),f&&vh(f)&&g.push(rs(r,n,e,{...i,noCSSId:!0})),d&&vh(d)&&g.push(rs(r,n,e,{...i,noText:!0,noCSSId:!0})),g=g.filter(Boolean),!g.length){const m=Ka(n,e,i);g.push(m),vh(m)&&g.push(Ka(n,e,{...i,noCSSId:!0}))}a=[...new Set(g.map(m=>Wo(m)))]}else{const f=rs(r,n,e,i)||Ka(n,e,i);a=[Wo(f)]}}const o=a[0],u=n.parseSelector(o);return{selector:o,selectors:a,elements:n.querySelectorAll(u,i.root??e.ownerDocument)}}finally{vd(),_c(),n._evaluator.end()}}function rs(n,e,i,r){if(r.root&&!Hh(r.root,i))throw new Error("Target element must belong to the root's subtree");if(i===r.root)return[{engine:"css",selector:":scope",score:1}];if(i.ownerDocument.documentElement===i)return[{engine:"css",selector:"html",score:1}];let a=null;const o=f=>{(!a||as(f)<as(a))&&(a=f)},u=[];if(!r.noText)for(const f of xA(e,i,!r.isRecursive))u.push({candidate:f,isTextCandidate:!0});for(const f of wA(e,i,r))r.omitInternalEngines&&f.engine.startsWith("internal:")||u.push({candidate:[f],isTextCandidate:!1});u.sort((f,d)=>as(f.candidate)-as(d.candidate));for(const{candidate:f,isTextCandidate:d}of u){const g=e.querySelectorAll(e.parseSelector(Wo(f)),r.root??i.ownerDocument);if(!g.includes(i))continue;if(g.length===1){o(f);break}const m=g.indexOf(i);if(!(m>5)&&(o([...f,{engine:"nth",selector:String(m),score:Ih}]),!r.isRecursive))for(let y=Ct(i);y&&y!==r.root;y=Ct(y)){const S=g.filter(H=>Hh(y,H)&&H!==y),w=S.indexOf(i);if(S.length>5||w===-1||w===m&&S.length>1)continue;const E=S.length===1?f:[...f,{engine:"nth",selector:String(w),score:Ih}];if(a&&as([{engine:"",selector:"",score:1},...E])>=as(a))continue;const _=!!r.noText||d,A=_?n.disallowText:n.allowText;let C=A.get(y);C===void 0&&(C=rs(n,e,y,{...r,isRecursive:!0,noText:_})||Ka(e,y,r),A.set(y,C)),C&&o([...C,...E])}}return a}function wA(n,e,i){const r=[],a=av(i.testIdAttributeName);{for(const f of["data-testid","data-test-id","data-test"])!a.includes(f)&&e.getAttribute(f)&&r.push({engine:"css",selector:`[${f}=${gr(e.getAttribute(f))}]`,score:cA});if(!i.noCSSId){const f=e.getAttribute("id");f&&!_A(f)&&r.push({engine:"css",selector:Xv(f),score:bA})}r.push({engine:"css",selector:ni(e),score:Kv})}if(e.nodeName==="IFRAME"){for(const f of["name","title"])e.getAttribute(f)&&r.push({engine:"css",selector:`${ni(e)}[${f}=${gr(e.getAttribute(f))}]`,score:uA});for(const f of a)e.getAttribute(f)&&r.push({engine:"css",selector:`[${f}=${gr(e.getAttribute(f))}]`,score:Bb});return Vh([r]),r}for(const f of a)e.getAttribute(f)&&r.push({engine:"internal:testid",selector:`[${f}=${Ze(e.getAttribute(f),!0)}]`,score:Bb});if(e.nodeName==="INPUT"||e.nodeName==="TEXTAREA"){const f=e;if(f.placeholder){r.push({engine:"internal:attr",selector:`[placeholder=${Ze(f.placeholder,!0)}]`,score:hA});for(const d of cs(f.placeholder))r.push({engine:"internal:attr",selector:`[placeholder=${Ze(d.text,!1)}]`,score:$v-d.scoreBonus})}}const o=Uv(n._evaluator._cacheText,e);for(const f of o){const d=f.normalized;r.push({engine:"internal:label",selector:Vt(d,!0),score:dA});for(const g of cs(d))r.push({engine:"internal:label",selector:Vt(g.text,!1),score:Iv-g.scoreBonus})}const u=Tt(e);return u&&!["none","presentation"].includes(u)&&r.push({engine:"internal:role",selector:u,score:$h}),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:`${ni(e)}[name=${gr(e.getAttribute("name"))}]`,score:bh}),["INPUT","TEXTAREA"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&e.getAttribute("type")&&r.push({engine:"css",selector:`${ni(e)}[type=${gr(e.getAttribute("type"))}]`,score:bh}),["INPUT","TEXTAREA","SELECT"].includes(e.nodeName)&&e.getAttribute("type")!=="hidden"&&r.push({engine:"css",selector:ni(e),score:bh+1}),Vh([r]),r}function xA(n,e,i){if(e.nodeName==="SELECT")return[];const r=[],a=e.getAttribute("title");if(a){r.push([{engine:"internal:attr",selector:`[title=${Ze(a,!0)}]`,score:mA}]);for(const g of cs(a))r.push([{engine:"internal:attr",selector:`[title=${Ze(g.text,!1)}]`,score:Gv-g.scoreBonus}])}const o=e.getAttribute("alt");if(o&&["APPLET","AREA","IMG","INPUT"].includes(e.nodeName)){r.push([{engine:"internal:attr",selector:`[alt=${Ze(o,!0)}]`,score:pA}]);for(const g of cs(o))r.push([{engine:"internal:attr",selector:`[alt=${Ze(g.text,!1)}]`,score:Vv-g.scoreBonus}])}const u=Kt(n._evaluator._cacheText,e).normalized,f=u?cs(u):[];if(u){if(i){u.length<=80&&r.push([{engine:"internal:text",selector:Vt(u,!0),score:gA}]);for(const m of f)r.push([{engine:"internal:text",selector:Vt(m.text,!1),score:Zo-m.scoreBonus}])}const g={engine:"css",selector:ni(e),score:Kv};for(const m of f)r.push([g,{engine:"internal:has-text",selector:Vt(m.text,!1),score:Zo-m.scoreBonus}]);if(i&&u.length<=80){const m=new RegExp("^"+lc(u)+"$");r.push([g,{engine:"internal:has-text",selector:Vt(m,!1),score:qb}])}}const d=Tt(e);if(d&&!["none","presentation"].includes(d)){const g=rl(e,!1);if(g&&!g.match(new RegExp("^\\p{Co}+$","u"))){const m={engine:"internal:role",selector:`${d}[name=${Ze(g,!0)}]`,score:$b};r.push([m]);for(const S of cs(g))r.push([{engine:"internal:role",selector:`${d}[name=${Ze(S.text,!1)}]`,score:qh-S.scoreBonus}]);const y=al(e,!1);if(y){r.push([{engine:"internal:role",selector:`${d}[name=${Ze(g,!0)}][description=${Ze(y,!0)}]`,score:$b+1}]);for(const S of cs(g))r.push([{engine:"internal:role",selector:`${d}[name=${Ze(S.text,!1)}][description=${Ze(y,!1)}]`,score:qh-S.scoreBonus+1}])}}else{const m={engine:"internal:role",selector:`${d}`,score:$h},y=al(e,!1);y&&r.push([{engine:"internal:role",selector:`${d}[description=${Ze(y,!0)}]`,score:$h+1}]);for(const S of f)r.push([m,{engine:"internal:has-text",selector:Vt(S.text,!1),score:Zo-S.scoreBonus}]);if(i&&u.length<=80){const S=new RegExp("^"+lc(u)+"$");r.push([m,{engine:"internal:has-text",selector:Vt(S,!1),score:qb}])}}}return Vh(r),r}function Xv(n){return/^[a-zA-Z][a-zA-Z0-9\-\_]+$/.test(n)?"#"+n:`[id=${gr(n)}]`}function vh(n){return n.some(e=>e.engine==="css"&&(e.selector.startsWith("#")||e.selector.startsWith('[id="')))}function Ka(n,e,i){const r=i.root??e.ownerDocument,a=[];function o(f){const d=a.slice();f&&d.unshift(f);const g=d.join(" > "),m=n.parseSelector(g);return n.querySelector(m,r,!1)===e?g:void 0}function u(f){const d={engine:"css",selector:f,score:vA},g=n.parseSelector(f),m=n.querySelectorAll(g,r);if(m.length===1)return[d];const y={engine:"nth",selector:String(m.indexOf(e)),score:Ih};return[d,y]}for(let f=e;f&&f!==r;f=Ct(f)){let d="";if(f.id&&!i.noCSSId){const y=Xv(f.id),S=o(y);if(S)return u(S);d=y}const g=f.parentNode,m=[...f.classList].map(EA);for(let y=0;y<m.length;++y){const S="."+m.slice(0,y+1).join("."),w=o(S);if(w)return u(w);!d&&g&&g.querySelectorAll(S).length===1&&(d=S)}if(g){const y=[...g.children],S=f.nodeName,E=y.filter(_=>_.nodeName===S).indexOf(f)===0?ni(f):`${ni(f)}:nth-child(${1+y.indexOf(f)})`,x=o(E);if(x)return u(x);d||(d=E)}else d||(d=ni(f));a.unshift(d)}return u(o())}function Vh(n){for(const e of n)for(const i of e)i.score>fA&&i.score<yA&&(i.score+=Math.min(qv,i.selector.length/10|0))}function Wo(n){const e=[];let i="";for(const{engine:r,selector:a}of n)e.length&&(i!=="css"||r!=="css"||a.startsWith(":nth-match("))&&e.push(">>"),i=r,r==="css"?e.push(a):e.push(`${r}=${a}`);return e.join(" ")}function as(n){let e=0;for(let i=0;i<n.length;i++)e+=n[i].score*(n.length-i);return e}function _A(n){let e,i=0;for(let r=0;r<n.length;++r){const a=n[r];let o;if(!(a==="-"||a==="_")){if(a>="a"&&a<="z"?o="lower":a>="A"&&a<="Z"?o="upper":a>="0"&&a<="9"?o="digit":o="other",o==="lower"&&e==="upper"){e=o;continue}e&&e!==o&&++i,e=o}}return i>=n.length/4}function Ho(n,e){if(n.length<=e)return n;n=n.substring(0,e);const i=n.match(/^(.*)\b(.+?)$/);return i?i[1].trimEnd():""}function cs(n){let e=[];{const i=n.match(/^([\d.,]+)[^.,\w]/),r=i?i[1].length:0;if(r){const a=Ho(n.substring(r).trimStart(),80);e.push({text:a,scoreBonus:a.length<=30?2:1})}}{const i=n.match(/[^.,\w]([\d.,]+)$/),r=i?i[1].length:0;if(r){const a=Ho(n.substring(0,n.length-r).trimEnd(),80);e.push({text:a,scoreBonus:a.length<=30?2:1})}}return n.length<=30?e.push({text:n,scoreBonus:0}):(e.push({text:Ho(n,80),scoreBonus:0}),e.push({text:Ho(n,30),scoreBonus:1})),e=e.filter(i=>i.text),e.length||e.push({text:n.substring(0,80),scoreBonus:0}),e}function ni(n){return n.nodeName.toLocaleLowerCase().replace(/[:\.]/g,e=>"\\"+e)}function EA(n){let e="";for(let i=0;i<n.length;i++)e+=TA(n,i);return e}function TA(n,e){const i=n.charCodeAt(e);return i===0?"�":i>=1&&i<=31||i>=48&&i<=57&&(e===0||e===1&&n.charCodeAt(0)===45)?"\\"+i.toString(16)+" ":e===0&&i===45&&n.length===1?"\\"+n.charAt(e):i>=128||i===45||i===95||i>=48&&i<=57||i>=65&&i<=90||i>=97&&i<=122?n.charAt(e):"\\"+n.charAt(e)}const Vb={queryAll(n,e){e.startsWith("/")&&n.nodeType!==Node.DOCUMENT_NODE&&(e="."+e);const i=[],r=n.ownerDocument||n;if(!r)return i;const a=r.evaluate(e,n,null,XPathResult.ORDERED_NODE_ITERATOR_TYPE);for(let o=a.iterateNext();o;o=a.iterateNext())o.nodeType===Node.ELEMENT_NODE&&i.push(o);return i}},Ba=Symbol("selector"),AA=class Xa{constructor(e,i,r){if(r!=null&&r.hasText&&(i+=` >> internal:has-text=${Vt(r.hasText,!1)}`),r!=null&&r.hasNotText&&(i+=` >> internal:has-not-text=${Vt(r.hasNotText,!1)}`),r!=null&&r.has&&(i+=" >> internal:has="+JSON.stringify(r.has[Ba])),r!=null&&r.hasNot&&(i+=" >> internal:has-not="+JSON.stringify(r.hasNot[Ba])),(r==null?void 0:r.visible)!==void 0&&(i+=` >> visible=${r.visible?"true":"false"}`),this[Ba]=i,i){const u=e.parseSelector(i);this.element=e.querySelector(u,e.document,!1),this.elements=e.querySelectorAll(u,e.document)}const a=i,o=this;o.locator=(u,f)=>new Xa(e,a?a+" >> "+u:u,f),o.getByTestId=u=>o.locator(sT(e.testIdAttributeNameForStrictErrorAndConsoleCodegen(),u)),o.getByAltText=(u,f)=>o.locator(aT(u,f)),o.getByLabel=(u,f)=>o.locator(rT(u,f)),o.getByPlaceholder=(u,f)=>o.locator(oT(u,f)),o.getByText=(u,f)=>o.locator(cT(u,f)),o.getByTitle=(u,f)=>o.locator(lT(u,f)),o.getByRole=(u,f={})=>o.locator(uT(u,f)),o.filter=u=>new Xa(e,i,u),o.first=()=>o.locator("nth=0"),o.last=()=>o.locator("nth=-1"),o.nth=u=>o.locator(`nth=${u}`),o.and=u=>new Xa(e,a+" >> internal:and="+JSON.stringify(u[Ba])),o.or=u=>new Xa(e,a+" >> internal:or="+JSON.stringify(u[Ba]))}};let CA=AA;class NA{constructor(e){this._injectedScript=e}install(){this._injectedScript.window.playwright||(this._injectedScript.window.playwright={$:(e,i)=>this._querySelector(e,!!i),$$:e=>this._querySelectorAll(e),inspect:e=>this._inspect(e),selector:e=>this._selector(e),generateLocator:(e,i)=>this._generateLocator(e,i),ariaSnapshot:(e,i)=>this._injectedScript.ariaSnapshot(e||this._injectedScript.document.body,i||{mode:"default"}),resume:()=>this._resume(),...new CA(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,i){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,i)}_querySelectorAll(e){if(typeof e!="string")throw new Error("Usage: playwright.$$('Playwright >> selector').");const i=this._injectedScript.parseSelector(e);return this._injectedScript.querySelectorAll(i,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,i){if(!(e instanceof Element))throw new Error("Usage: playwright.locator(element).");const r=this._injectedScript.generateSelectorSimple(e);return Ri(i||"javascript",r)}_resume(){if(!this._injectedScript.window.__pw_resume)return!1;this._injectedScript.window.__pw_resume().catch(()=>{})}}function kA(n){try{return n instanceof RegExp||Object.prototype.toString.call(n)==="[object RegExp]"}catch{return!1}}function MA(n){try{return n instanceof Date||Object.prototype.toString.call(n)==="[object Date]"}catch{return!1}}function OA(n){try{return n instanceof URL||Object.prototype.toString.call(n)==="[object URL]"}catch{return!1}}function jA(n){var e;try{return n instanceof Error||n&&((e=Object.getPrototypeOf(n))==null?void 0:e.name)==="Error"}catch{return!1}}function LA(n,e){try{return n instanceof e||Object.prototype.toString.call(n)===`[object ${e.name}]`}catch{return!1}}function RA(n){try{return n instanceof ArrayBuffer||Object.prototype.toString.call(n)==="[object ArrayBuffer]"}catch{return!1}}const Yv={i8:Int8Array,ui8:Uint8Array,ui8c:Uint8ClampedArray,i16:Int16Array,ui16:Uint16Array,i32:Int32Array,ui32:Uint32Array,f32:Float32Array,f64:Float64Array,bi64:BigInt64Array,bui64:BigUint64Array};function Gb(n){if("toBase64"in n)return n.toBase64();const e=Array.from(new Uint8Array(n.buffer,n.byteOffset,n.byteLength)).map(i=>String.fromCharCode(i)).join("");return btoa(e)}function Kb(n,e){const i=atob(n),r=new Uint8Array(i.length);for(let a=0;a<i.length;a++)r[a]=i.charCodeAt(a);return new e(r.buffer)}function Gh(n,e=[],i=new Map){if(!Object.is(n,void 0)){if(typeof n=="object"&&n){if("ref"in n)return i.get(n.ref);if("v"in n)return n.v==="undefined"?void 0:n.v==="null"?null:n.v==="NaN"?NaN:n.v==="Infinity"?1/0:n.v==="-Infinity"?-1/0:n.v==="-0"?-0:void 0;if("d"in n)return new Date(n.d);if("u"in n)return new URL(n.u);if("bi"in n)return BigInt(n.bi);if("e"in n){const r=new Error(n.e.m);return r.name=n.e.n,r.stack=n.e.s,r}if("r"in n)return new RegExp(n.r.p,n.r.f);if("a"in n){const r=[];i.set(n.id,r);for(const a of n.a)r.push(Gh(a,e,i));return r}if("o"in n){const r={};i.set(n.id,r);for(const{k:a,v:o}of n.o)a!=="__proto__"&&(r[a]=Gh(o,e,i));return r}if("h"in n)return e[n.h];if("ta"in n)return Kb(n.ta.b,Yv[n.ta.k]);if("ab"in n)return Kb(n.ab.b,Uint8Array).buffer}return n}}function DA(n,e){return Kh(n,e,{visited:new Map,lastId:0})}function Kh(n,e,i){if(n&&typeof n=="object"){if(typeof globalThis.Window=="function"&&n instanceof globalThis.Window)return"ref: <Window>";if(typeof globalThis.Document=="function"&&n instanceof globalThis.Document)return"ref: <Document>";if(typeof globalThis.Node=="function"&&n instanceof globalThis.Node)return"ref: <Node>"}return Fv(n,e,i)}function Fv(n,e,i){var o;const r=e(n);if("fallThrough"in r)n=r.fallThrough;else return r;if(typeof n=="symbol")return{v:"undefined"};if(Object.is(n,void 0))return{v:"undefined"};if(Object.is(n,null))return{v:"null"};if(Object.is(n,NaN))return{v:"NaN"};if(Object.is(n,1/0))return{v:"Infinity"};if(Object.is(n,-1/0))return{v:"-Infinity"};if(Object.is(n,-0))return{v:"-0"};if(typeof n=="boolean"||typeof n=="number"||typeof n=="string")return n;if(typeof n=="bigint")return{bi:n.toString()};if(jA(n)){let u;return(o=n.stack)!=null&&o.startsWith(n.name+": "+n.message)?u=n.stack:u=`${n.name}: ${n.message}
${n.stack}`,{e:{n:n.name,m:n.message,s:u}}}if(MA(n))return{d:n.toJSON()};if(OA(n))return{u:n.toJSON()};if(kA(n))return{r:{p:n.source,f:n.flags}};for(const[u,f]of Object.entries(Yv))if(LA(n,f))return{ta:{b:Gb(n),k:u}};if(RA(n))return{ab:{b:Gb(new Uint8Array(n))}};const a=i.visited.get(n);if(a)return{ref:a};if(Array.isArray(n)){const u=[],f=++i.lastId;i.visited.set(n,f);for(let d=0;d<n.length;++d)u.push(Kh(n[d],e,i));return{a:u,id:f}}if(typeof n=="object"){const u=[],f=++i.lastId;i.visited.set(n,f);for(const g of Object.keys(n)){let m;try{m=n[g]}catch{continue}g==="toJSON"&&typeof m=="function"?u.push({k:g,v:{o:[],id:0}}):u.push({k:g,v:Kh(m,e,i)})}let d;try{u.length===0&&n.toJSON&&typeof n.toJSON=="function"&&(d={value:n.toJSON()})}catch{}return d?Fv(d.value,e,i):{o:u,id:f}}}class zA{constructor(e,i){var r,a,o,u,f,d,g,m;this.global=e,this.isUnderTest=i,e.__pwClock?this.builtins=e.__pwClock.builtins:this.builtins={setTimeout:(r=e.setTimeout)==null?void 0:r.bind(e),clearTimeout:(a=e.clearTimeout)==null?void 0:a.bind(e),setInterval:(o=e.setInterval)==null?void 0:o.bind(e),clearInterval:(u=e.clearInterval)==null?void 0:u.bind(e),requestAnimationFrame:(f=e.requestAnimationFrame)==null?void 0:f.bind(e),cancelAnimationFrame:(d=e.cancelAnimationFrame)==null?void 0:d.bind(e),requestIdleCallback:(g=e.requestIdleCallback)==null?void 0:g.bind(e),cancelIdleCallback:(m=e.cancelIdleCallback)==null?void 0:m.bind(e),performance:e.performance,Intl:e.Intl,Date:e.Date,AbortSignal:e.AbortSignal},this.isUnderTest&&(e.builtins=this.builtins)}evaluate(e,i,r,a,...o){const u=o.slice(0,a),f=o.slice(a),d=[];for(let m=0;m<u.length;m++)d[m]=Gh(u[m],f);let g=this.global.eval(r);return e===!0?g=g(...d):e===!1?g=g:typeof g=="function"&&(g=g(...d)),i?this._promiseAwareJsonValueNoThrow(g):g}jsonValue(e,i){if(i!==void 0)return DA(i,r=>({fallThrough:r}))}_promiseAwareJsonValueNoThrow(e){const i=r=>{try{return this.jsonValue(!0,r)}catch{return}};return e&&typeof e=="object"&&typeof e.then=="function"?(async()=>{const r=await e;return i(r)})():i(e)}}class Qv{constructor(e,i){this._testIdAttributeNameForStrictErrorAndConsoleCodegen="data-testid",this._lastAriaSnapshotForTrack=new Map,this.utils={asLocator:Ri,cacheNormalizedWhitespaces:g_,elementText:Kt,getAriaRole:Tt,getElementAccessibleDescription:al,getElementAccessibleName:rl,isElementVisible:ii,isInsideScope:Hh,normalizeWhiteSpace:pt,parseAriaSnapshot:dd,generateAriaTree:br,findNewElement:VT,builtins:null},this.window=e,this.document=e.document,this.isUnderTest=i.isUnderTest,this.utils.builtins=new zA(e,i.isUnderTest).builtins,this._sdkLanguage=i.sdkLanguage,this._testIdAttributeNameForStrictErrorAndConsoleCodegen=i.testIdAttributeName,this._evaluator=new ZT,this.consoleApi=new NA(this),this.onGlobalListenersRemoved=new Set,this._autoClosingTags=new Set(["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","MENUITEM","META","PARAM","SOURCE","TRACK","WBR"]),this._booleanAttributes=new Set(["checked","selected","disabled","readonly","multiple"]),this._eventTypes=new Map([["auxclick","mouse"],["click","mouse"],["dblclick","mouse"],["mousedown","mouse"],["mouseeenter","mouse"],["mouseleave","mouse"],["mousemove","mouse"],["mouseout","mouse"],["mouseover","mouse"],["mouseup","mouse"],["mouseleave","mouse"],["mousewheel","mouse"],["keydown","keyboard"],["keyup","keyboard"],["keypress","keyboard"],["textInput","keyboard"],["touchstart","touch"],["touchmove","touch"],["touchend","touch"],["touchcancel","touch"],["pointerover","pointer"],["pointerout","pointer"],["pointerenter","pointer"],["pointerleave","pointer"],["pointerdown","pointer"],["pointerup","pointer"],["pointermove","pointer"],["pointercancel","pointer"],["gotpointercapture","pointer"],["lostpointercapture","pointer"],["focus","focus"],["blur","focus"],["drag","drag"],["dragstart","drag"],["dragend","drag"],["dragover","drag"],["dragenter","drag"],["dragleave","drag"],["dragexit","drag"],["drop","drag"],["wheel","wheel"],["deviceorientation","deviceorientation"],["deviceorientationabsolute","deviceorientation"],["devicemotion","devicemotion"]]),this._hoverHitTargetInterceptorEvents=new Set(["mousemove"]),this._tapHitTargetInterceptorEvents=new Set(["pointerdown","pointerup","touchstart","touchend","touchcancel"]),this._mouseHitTargetInterceptorEvents=new Set(["mousedown","mouseup","pointerdown","pointerup","click","auxclick","dblclick","contextmenu"]),this._allHitTargetInterceptorEvents=new Set([...this._hoverHitTargetInterceptorEvents,...this._tapHitTargetInterceptorEvents,...this._mouseHitTargetInterceptorEvents]),this._engines=new Map,this._engines.set("xpath",Vb),this._engines.set("xpath:light",Vb),this._engines.set("role",Hb(!1)),this._engines.set("text",this._createTextEngine(!0,!1)),this._engines.set("text:light",this._createTextEngine(!1,!1)),this._engines.set("id",this._createAttributeEngine("id",!0)),this._engines.set("id:light",this._createAttributeEngine("id",!1)),this._engines.set("data-testid",this._createAttributeEngine("data-testid",!0)),this._engines.set("data-testid:light",this._createAttributeEngine("data-testid",!1)),this._engines.set("data-test-id",this._createAttributeEngine("data-test-id",!0)),this._engines.set("data-test-id:light",this._createAttributeEngine("data-test-id",!1)),this._engines.set("data-test",this._createAttributeEngine("data-test",!0)),this._engines.set("data-test:light",this._createAttributeEngine("data-test",!1)),this._engines.set("css",this._createCSSEngine()),this._engines.set("nth",{queryAll:()=>[]}),this._engines.set("visible",this._createVisibleEngine()),this._engines.set("internal:control",this._createControlEngine()),this._engines.set("internal:has",this._createHasEngine()),this._engines.set("internal:has-not",this._createHasNotEngine()),this._engines.set("internal:and",{queryAll:()=>[]}),this._engines.set("internal:or",{queryAll:()=>[]}),this._engines.set("internal:chain",this._createInternalChainEngine()),this._engines.set("internal:label",this._createInternalLabelEngine()),this._engines.set("internal:text",this._createTextEngine(!0,!0)),this._engines.set("internal:has-text",this._createInternalHasTextEngine()),this._engines.set("internal:has-not-text",this._createInternalHasNotTextEngine()),this._engines.set("internal:attr",this._createNamedAttributeEngine()),this._engines.set("internal:testid",this._createTestIdEngine()),this._engines.set("internal:role",Hb(!0)),this._engines.set("internal:describe",this._createDescribeEngine()),this._engines.set("aria-ref",this._createAriaRefEngine());for(const{name:r,source:a}of i.customEngines)this._engines.set(r,this.eval(a));this._stableRafCount=i.stableRafCount,this._browserName=i.browserName,this._shouldPrependErrorPrefix=!!i.shouldPrependErrorPrefix,this._isUtilityWorld=!!i.isUtilityWorld,hT({browserNameForWorkarounds:i.browserName}),this._setupGlobalListenersRemovalDetection(),this._setupHitTargetInterceptors(),this.isUnderTest&&(this.window.__injectedScript=this)}eval(e){return this.window.eval(e)}testIdAttributeNameForStrictErrorAndConsoleCodegen(){return this._testIdAttributeNameForStrictErrorAndConsoleCodegen}parseSelector(e){const i=fl(e);return d_(i,r=>{if(!this._engines.has(r.name))throw this.createStacklessError(`Unknown engine "${r.name}" while parsing selector ${e}`)}),i}generateSelector(e,i){return Ib(this,e,i)}generateSelectorSimple(e,i){return Ib(this,e,{...i,testIdAttributeName:this._testIdAttributeNameForStrictErrorAndConsoleCodegen}).selector}querySelector(e,i,r){const a=this.querySelectorAll(e,i);if(r&&a.length>1)throw this.strictModeViolationError(e,a);return this.checkDeprecatedSelectorUsage(e,a),a[0]}_queryNth(e,i){const r=[...e];let a=+i.body;return a===-1&&(a=r.length-1),new Set(r.slice(a,a+1))}_queryLayoutSelector(e,i,r){const a=i.name,o=i.body,u=[],f=this.querySelectorAll(o.parsed,r);for(const d of e){const g=zv(a,d,f,o.distance);g!==void 0&&u.push({element:d,score:g})}return u.sort((d,g)=>d.score-g.score),new Set(u.map(d=>d.element))}ariaSnapshot(e,i){return this.incrementalAriaSnapshot(e,i).full}incrementalAriaSnapshot(e,i){if(e.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError("Can only capture aria snapshot of Element nodes.");const r=br(e,i),a=vr(r,i);let o;if(i.track){const u=this._lastAriaSnapshotForTrack.get(i.track);u&&(o=vr(r,i,u).text),this._lastAriaSnapshotForTrack.set(i.track,r)}return this._lastAriaSnapshotForQuery=r,{full:a.text,incremental:o,iframeRefs:r.iframeRefs,iframeDepths:a.iframeDepths}}ariaSnapshotForRecorder(){const e=br(this.document.body,{mode:"ai"}),{text:i}=vr(e,{mode:"ai"});return{ariaSnapshot:i,refs:e.refs}}getAllElementsMatchingExpectAriaTemplate(e,i){return HT(e.documentElement,i)}querySelectorAll(e,i){if(e.capture!==void 0){if(e.parts.some(a=>a.name==="nth"))throw this.createStacklessError("Can't query n-th element in a request with the capture.");const r={parts:e.parts.slice(0,e.capture+1)};if(e.capture<e.parts.length-1){const a={parts:e.parts.slice(e.capture+1)},o={name:"internal:has",body:{parsed:a},source:It(a)};r.parts.push(o)}return this.querySelectorAll(r,i)}if(!i.querySelectorAll)throw this.createStacklessError("Node is not queryable.");if(e.capture!==void 0)throw this.createStacklessError("Internal error: there should not be a capture in the selector.");if(i.nodeType===11&&e.parts.length===1&&e.parts[0].name==="css"&&e.parts[0].source===":scope")return[i];this._evaluator.begin();try{let r=new Set([i]);for(const a of e.parts)if(a.name==="nth")r=this._queryNth(r,a);else if(a.name==="internal:and"){const o=this.querySelectorAll(a.body.parsed,i);r=new Set(o.filter(u=>r.has(u)))}else if(a.name==="internal:or"){const o=this.querySelectorAll(a.body.parsed,i);r=new Set(Bv(new Set([...r,...o])))}else if(QT.includes(a.name))r=this._queryLayoutSelector(r,a,i);else{const o=new Set;for(const u of r){const f=this._queryEngineAll(a,u);for(const d of f)o.add(d)}r=o}return[...r]}finally{this._evaluator.end()}}_queryEngineAll(e,i){const r=this._engines.get(e.name).queryAll(i,e.body);for(const a of r)if(!("nodeName"in a))throw this.createStacklessError(`Expected a Node but got ${Object.prototype.toString.call(a)}`);return r}_createAttributeEngine(e,i){const r=a=>[{simples:[{selector:{css:`[${e}=${JSON.stringify(a)}]`,functions:[]},combinator:""}]}];return{queryAll:(a,o)=>this._evaluator.query({scope:a,pierceShadow:i},r(o))}}_createCSSEngine(){return{queryAll:(e,i)=>this._evaluator.query({scope:e,pierceShadow:!0},i)}}_createTextEngine(e,i){return{queryAll:(a,o)=>{const{matcher:u,kind:f}=qo(o,i),d=[];let g=null;const m=S=>{if(f==="lax"&&g&&g.contains(S))return!1;const w=Tc(this._evaluator._cacheText,S,u);w==="none"&&(g=S),(w==="self"||w==="selfAndChildren"&&f==="strict"&&!i)&&d.push(S)};a.nodeType===Node.ELEMENT_NODE&&m(a);const y=this._evaluator._queryCSS({scope:a,pierceShadow:e},"*");for(const S of y)m(S);return d}}}_createInternalHasTextEngine(){return{queryAll:(e,i)=>{if(e.nodeType!==1)return[];const r=e,a=Kt(this._evaluator._cacheText,r),{matcher:o}=qo(i,!0);return o(a)?[r]:[]}}}_createInternalHasNotTextEngine(){return{queryAll:(e,i)=>{if(e.nodeType!==1)return[];const r=e,a=Kt(this._evaluator._cacheText,r),{matcher:o}=qo(i,!0);return o(a)?[]:[r]}}}_createInternalLabelEngine(){return{queryAll:(e,i)=>{const{matcher:r}=qo(i,!0);return this._evaluator._queryCSS({scope:e,pierceShadow:!0},"*").filter(o=>Uv(this._evaluator._cacheText,o).some(u=>r(u)))}}}_createNamedAttributeEngine(){return{queryAll:(i,r)=>{const a=Er(r);if(a.name||a.attributes.length!==1)throw new Error("Malformed attribute selector: "+r);const{name:o}=a.attributes[0],u=Xb(a.attributes[0]);return this._evaluator._queryCSS({scope:i,pierceShadow:!0},`[${o}]`).filter(d=>u(d.getAttribute(o)))}}}_createTestIdEngine(){return{queryAll:(i,r)=>{const a=Er(r);if(a.name||a.attributes.length!==1)throw new Error("Malformed test id selector: "+r);const o=av(a.attributes[0].name),u=Xb(a.attributes[0]),f=o.map(g=>`[${g}]`).join(",");return this._evaluator._queryCSS({scope:i,pierceShadow:!0},f).filter(g=>o.some(m=>{const y=g.getAttribute(m);return y!==null&&u(y)}))}}}_createDescribeEngine(){return{queryAll:i=>i.nodeType!==1?[]:[i]}}_createControlEngine(){return{queryAll(e,i){if(i==="enter-frame")return[];if(i==="return-empty")return[];if(i==="component")return e.nodeType!==1?[]:[e.childElementCount===1?e.firstElementChild:e];throw new Error(`Internal error, unknown internal:control selector ${i}`)}}}_createHasEngine(){return{queryAll:(i,r)=>i.nodeType!==1?[]:!!this.querySelector(r.parsed,i,!1)?[i]:[]}}_createHasNotEngine(){return{queryAll:(i,r)=>i.nodeType!==1?[]:!!this.querySelector(r.parsed,i,!1)?[]:[i]}}_createVisibleEngine(){return{queryAll:(i,r)=>{if(i.nodeType!==1)return[];const a=r==="true";return ii(i)===a?[i]:[]}}}_createInternalChainEngine(){return{queryAll:(i,r)=>this.querySelectorAll(r.parsed,i)}}extend(e,i){const r=this.window.eval(`
    (() => {
      const module = {};
      ${e}
      return module.exports.default();
    })()`);return new r(this,i)}async viewportRatio(e){return await new Promise(i=>{const r=new IntersectionObserver(a=>{i(a[0].intersectionRatio),r.disconnect()});r.observe(e),this.utils.builtins.requestAnimationFrame(()=>{})})}getElementBorderWidth(e){if(e.nodeType!==Node.ELEMENT_NODE||!e.ownerDocument||!e.ownerDocument.defaultView)return{left:0,top:0};const i=e.ownerDocument.defaultView.getComputedStyle(e);return{left:parseInt(i.borderLeftWidth||"",10),top:parseInt(i.borderTopWidth||"",10)}}describeIFrameStyle(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return"error:notconnected";const i=e.ownerDocument.defaultView;for(let a=e;a;a=Ct(a))if(i.getComputedStyle(a).transform!=="none")return"transformed";const r=i.getComputedStyle(e);return{left:parseInt(r.borderLeftWidth||"",10)+parseInt(r.paddingLeft||"",10),top:parseInt(r.borderTopWidth||"",10)+parseInt(r.paddingTop||"",10)}}retarget(e,i){let r=e.nodeType===Node.ELEMENT_NODE?e:e.parentElement;if(!r)return null;if(i==="none")return r;if(!r.matches("input, textarea, select")&&!r.isContentEditable&&(i==="button-link"?r=r.closest("button, [role=button], a, [role=link]")||r:r=r.closest("button, [role=button], [role=checkbox], [role=radio]")||r),i==="follow-label"&&!r.matches("a, input, textarea, button, select, [role=link], [role=button], [role=checkbox], [role=radio]")&&!r.isContentEditable){const a=r.closest("label");a&&a.control&&(r=a.control)}return r}async checkElementStates(e,i){if(i.includes("stable")){const r=await this._checkElementIsStable(e);if(r===!1)return{missingState:"stable"};if(r==="error:notconnected")return"error:notconnected"}for(const r of i)if(r!=="stable"){const a=this.elementState(e,r);if(a.received==="error:notconnected")return"error:notconnected";if(!a.matches)return{missingState:r}}}async _checkElementIsStable(e){const i=Symbol("continuePolling");let r,a=0,o=0;const u=()=>{const y=this.retarget(e,"no-follow-label");if(!y)return"error:notconnected";const S=this.utils.builtins.performance.now();if(this._stableRafCount>1&&S-o<15)return i;o=S;const w=y.getBoundingClientRect(),E={x:w.top,y:w.left,width:w.width,height:w.height};if(r){if(!(E.x===r.x&&E.y===r.y&&E.width===r.width&&E.height===r.height))return!1;if(++a>=this._stableRafCount)return!0}return r=E,i};let f,d;const g=new Promise((y,S)=>{f=y,d=S}),m=()=>{try{const y=u();y!==i?f(y):this.utils.builtins.requestAnimationFrame(m)}catch(y){d(y)}};return this.utils.builtins.requestAnimationFrame(m),g}_createAriaRefEngine(){return{queryAll:(i,r)=>{var o,u;const a=(u=(o=this._lastAriaSnapshotForQuery)==null?void 0:o.elements)==null?void 0:u.get(r);return a&&a.isConnected?[a]:[]}}}elementState(e,i){const r=this.retarget(e,["visible","hidden"].includes(i)?"none":"follow-label");if(!r||!r.isConnected)return i==="hidden"?{matches:!0,received:"hidden"}:{matches:!1,received:"error:notconnected"};if(i==="visible"||i==="hidden"){const a=ii(r);return{matches:i==="visible"?a:!a,received:a?"visible":"hidden"}}if(i==="disabled"||i==="enabled"){const a=hc(r);return{matches:i==="disabled"?a:!a,received:a?"disabled":"enabled"}}if(i==="editable"){const a=hc(r),o=CT(r);if(o==="error")throw this.createStacklessError("Element is not an <input>, <textarea>, <select> or [contenteditable] and does not have a role allowing [aria-readonly]");return{matches:!a&&!o,received:a?"disabled":o?"readOnly":"editable"}}if(i==="checked"||i==="unchecked"){const a=i==="checked",o=TT(r);if(o==="error")throw this.createStacklessError("Not a checkbox or radio button");const u=r.nodeName==="INPUT"&&r.type==="radio";return{matches:a===o,received:o?"checked":"unchecked",isRadio:u}}if(i==="indeterminate"){const a=ET(r);if(a==="error")throw this.createStacklessError("Not a checkbox or radio button");return{matches:a==="mixed",received:a===!0?"checked":a===!1?"unchecked":"mixed"}}throw this.createStacklessError(`Unexpected element state "${i}"`)}selectOptions(e,i){const r=this.retarget(e,"follow-label");if(!r)return"error:notconnected";if(r.nodeName.toLowerCase()!=="select")throw this.createStacklessError("Element is not a <select> element");const a=r,o=[...a.options],u=[];let f=i.slice();for(let d=0;d<o.length;d++){const g=o[d],m=pt(g.label),y=S=>{if(S instanceof Node)return g===S;const w=x=>x===g.label||pt(x)===m;let E=!0;return S.valueOrLabel!==void 0&&(E=E&&(S.valueOrLabel===g.value||w(S.valueOrLabel))),S.value!==void 0&&(E=E&&S.value===g.value),S.label!==void 0&&(E=E&&w(S.label)),S.index!==void 0&&(E=E&&S.index===d),E};if(f.some(y)){if(!this.elementState(g,"enabled").matches)return"error:optionnotenabled";if(u.push(g),a.multiple)f=f.filter(S=>!y(S));else{f=[];break}}}return f.length?"error:optionsnotfound":(a.value=void 0,u.forEach(d=>d.selected=!0),a.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),a.dispatchEvent(new Event("change",{bubbles:!0})),u.map(d=>d.value))}fill(e,i){const r=this.retarget(e,"follow-label");if(!r)return"error:notconnected";if(r.nodeName.toLowerCase()==="input"){const a=r,o=a.type.toLowerCase(),u=new Set(["color","date","time","datetime-local","month","range","week"]);if(!new Set(["","email","number","password","search","tel","text","url"]).has(o)&&!u.has(o))throw this.createStacklessError(`Input of type "${o}" cannot be filled`);if(o==="number"&&(i=i.trim(),isNaN(Number(i))))throw this.createStacklessError("Cannot type text into input[type=number]");if(o==="color"&&(i=i.toLowerCase()),u.has(o)){if(i=i.trim(),a.focus(),a.value=i,a.value!==i)throw this.createStacklessError("Malformed value");return r.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),r.dispatchEvent(new Event("change",{bubbles:!0})),"done"}}else if(r.nodeName.toLowerCase()!=="textarea"){if(!r.isContentEditable)throw this.createStacklessError("Element is not an <input>, <textarea> or [contenteditable] element")}return this.selectText(r),"needsinput"}selectText(e){const i=this.retarget(e,"follow-label");if(!i)return"error:notconnected";if(i.nodeName.toLowerCase()==="input"){const o=i;return o.select(),o.focus(),"done"}if(i.nodeName.toLowerCase()==="textarea"){const o=i;return o.selectionStart=0,o.selectionEnd=o.value.length,o.focus(),"done"}i.focus();const r=i.ownerDocument.createRange();r.selectNodeContents(i);const a=i.ownerDocument.defaultView.getSelection();return a&&(a.removeAllRanges(),a.addRange(r)),"done"}_activelyFocused(e){const i=e.getRootNode().activeElement,r=i===e&&!!e.ownerDocument&&e.ownerDocument.hasFocus();return{activeElement:i,isFocused:r}}focusNode(e,i){if(!e.isConnected)return"error:notconnected";if(e.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError("Node is not an element");const{activeElement:r,isFocused:a}=this._activelyFocused(e);if(e.isContentEditable&&!a&&r&&r.blur&&r.blur(),e.focus(),e.focus(),i&&!a&&e.nodeName.toLowerCase()==="input")try{e.setSelectionRange(0,0)}catch{}return"done"}blurNode(e){if(!e.isConnected)return"error:notconnected";if(e.nodeType!==Node.ELEMENT_NODE)throw this.createStacklessError("Node is not an element");return e.blur(),"done"}setInputFiles(e,i){if(e.nodeType!==Node.ELEMENT_NODE)return"Node is not of type HTMLElement";const r=e;if(r.nodeName!=="INPUT")return"Not an <input> element";const a=r;if((a.getAttribute("type")||"").toLowerCase()!=="file")return"Not an input[type=file] element";const u=i.map(d=>{const g=Uint8Array.from(atob(d.buffer),m=>m.charCodeAt(0));return new File([g],d.name,{type:d.mimeType,lastModified:d.lastModifiedMs})}),f=new DataTransfer;for(const d of u)f.items.add(d);a.files=f.files,a.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),a.dispatchEvent(new Event("change",{bubbles:!0}))}expectHitTarget(e,i){const r=[];let a=i;for(;a;){const m=uv(a);if(!m||(r.push(m),m.nodeType===9))break;a=m.host}let o;for(let m=r.length-1;m>=0;m--){const y=r[m],S=y.elementsFromPoint(e.x,e.y),w=y.elementFromPoint(e.x,e.y);if(w&&S[0]&&Ct(w)===S[0]){const x=this.window.getComputedStyle(w);(x==null?void 0:x.display)==="contents"&&S.unshift(w)}S[0]&&S[0].shadowRoot===y&&S[1]===w&&S.shift();const E=S[0];if(!E||(o=E,m&&E!==r[m-1].host))break}const u=[];for(;o&&o!==i;)u.push(o),o=o.assignedSlot??Ct(o);if(o===i)return"done";const f=this.previewNode(u[0]||this.document.documentElement);let d,g=i;for(;g;){const m=u.indexOf(g);if(m!==-1){m>1&&(d=this.previewNode(u[m-1]));break}g=Ct(g)}return d?{hitTargetDescription:`${f} from ${d} subtree`}:{hitTargetDescription:f}}setupHitTargetInterceptor(e,i,r,a){const o=this.retarget(e,"button-link");if(!o||!o.isConnected)return"error:notconnected";if(r){const m=this.expectHitTarget(r,o);if(m!=="done")return m.hitTargetDescription}if(i==="drag")return{stop:()=>"done"};const u={hover:this._hoverHitTargetInterceptorEvents,tap:this._tapHitTargetInterceptorEvents,mouse:this._mouseHitTargetInterceptorEvents}[i];let f;const d=m=>{if(!u.has(m.type)||!m.isTrusted&&!m.__pwTrustedSynthetic)return;const y=this.window.TouchEvent&&m instanceof this.window.TouchEvent?m.touches[0]:m;f===void 0&&y&&(f=this.expectHitTarget({x:y.clientX,y:y.clientY},o)),(a||f!=="done"&&f!==void 0)&&(m.preventDefault(),m.stopPropagation(),m.stopImmediatePropagation())},g=()=>(this._hitTargetInterceptor===d&&(this._hitTargetInterceptor=void 0),f||"done");return this._hitTargetInterceptor=d,{stop:g}}dispatchEvent(e,i,r){var u,f,d;let a;const o={bubbles:!0,cancelable:!0,composed:!0,...r};switch(this._eventTypes.get(i)){case"mouse":a=new MouseEvent(i,o);break;case"keyboard":a=new KeyboardEvent(i,o);break;case"touch":{if(this._browserName==="webkit"){const g=y=>{var E,x;if(y instanceof Touch)return y;let S=y.pageX;S===void 0&&y.clientX!==void 0&&(S=y.clientX+(((E=this.document.scrollingElement)==null?void 0:E.scrollLeft)||0));let w=y.pageY;return w===void 0&&y.clientY!==void 0&&(w=y.clientY+(((x=this.document.scrollingElement)==null?void 0:x.scrollTop)||0)),this.document.createTouch(this.window,y.target??e,y.identifier,S,w,y.screenX,y.screenY,y.radiusX,y.radiusY,y.rotationAngle,y.force)},m=y=>y instanceof TouchList||!y?y:this.document.createTouchList(...y.map(g));o.target??(o.target=e),o.touches=m(o.touches),o.targetTouches=m(o.targetTouches),o.changedTouches=m(o.changedTouches),a=new TouchEvent(i,o)}else o.target??(o.target=e),o.touches=(u=o.touches)==null?void 0:u.map(g=>g instanceof Touch?g:new Touch({...g,target:g.target??e})),o.targetTouches=(f=o.targetTouches)==null?void 0:f.map(g=>g instanceof Touch?g:new Touch({...g,target:g.target??e})),o.changedTouches=(d=o.changedTouches)==null?void 0:d.map(g=>g instanceof Touch?g:new Touch({...g,target:g.target??e})),a=new TouchEvent(i,o);break}case"pointer":a=new PointerEvent(i,o);break;case"focus":a=new FocusEvent(i,o);break;case"drag":a=new DragEvent(i,o);break;case"wheel":a=new WheelEvent(i,o);break;case"deviceorientation":try{a=new DeviceOrientationEvent(i,o)}catch{const{bubbles:g,cancelable:m,alpha:y,beta:S,gamma:w,absolute:E}=o;a=this.document.createEvent("DeviceOrientationEvent"),a.initDeviceOrientationEvent(i,g,m,y,S,w,E)}break;case"devicemotion":try{a=new DeviceMotionEvent(i,o)}catch{const{bubbles:g,cancelable:m,acceleration:y,accelerationIncludingGravity:S,rotationRate:w,interval:E}=o;a=this.document.createEvent("DeviceMotionEvent"),a.initDeviceMotionEvent(i,g,m,y,S,w,E)}break;default:a=new Event(i,o);break}e.dispatchEvent(a)}previewNode(e){if(e.nodeType===Node.TEXT_NODE)return Bo(`#text=${e.nodeValue||""}`);if(e.nodeType!==Node.ELEMENT_NODE)return Bo(`<${e.nodeName.toLowerCase()} />`);const i=e,r=[];for(let d=0;d<i.attributes.length;d++){const{name:g,value:m}=i.attributes[d];g!=="style"&&(!m&&this._booleanAttributes.has(g)?r.push(` ${g}`):r.push(` ${g}="${m}"`))}r.sort((d,g)=>d.length-g.length);const a=hb(r.join(""),500);if(this._autoClosingTags.has(i.nodeName))return Bo(`<${i.nodeName.toLowerCase()}${a}/>`);const o=i.childNodes;let u=!1;if(o.length<=5){u=!0;for(let d=0;d<o.length;d++)u=u&&o[d].nodeType===Node.TEXT_NODE}const f=u?i.textContent||"":o.length?"…":"";return Bo(`<${i.nodeName.toLowerCase()}${a}>${hb(f,50)}</${i.nodeName.toLowerCase()}>`)}_generateSelectors(e){this._evaluator.begin(),xc(),bd();try{const i=this._isUtilityWorld&&this._browserName==="firefox"?2:10;return e.slice(0,i).map(a=>({preview:this.previewNode(a),selector:this.generateSelectorSimple(a)})).map((a,o)=>`${o+1}) ${a.preview} aka ${Ri(this._sdkLanguage,a.selector)}`)}finally{vd(),_c(),this._evaluator.end()}}strictModeViolationError(e,i){const r=this._generateSelectors(i).map(a=>`
    `+a);return r.length<i.length&&r.push(`
    ...`),this.createStacklessError(`strict mode violation: ${Ri(this._sdkLanguage,It(e))} resolved to ${i.length} elements:${r.join("")}
`)}checkDeprecatedSelectorUsage(e,i){const r=new Set(["_react","_vue","xpath:light","text:light","id:light","data-testid:light","data-test-id:light","data-test:light"]);if(!i.length)return;const a=e.parts.find(u=>r.has(u.name));if(!a)return;const o=this._generateSelectors(i).map(u=>`
    `+u);throw o.length<i.length&&o.push(`
    ...`),this.createStacklessError(`"${a.name}" selector is not supported: ${Ri(this._sdkLanguage,It(e))} resolved to ${i.length} element${i.length===1?"":"s"}:${o.join("")}
`)}createStacklessError(e){const i=this._shouldPrependErrorPrefix?new Error("Error: "+e):new Error(e);return this._browserName==="firefox"?(i.stack="",i):(delete i.stack,i)}createHighlight(){return new mh(this)}maskSelectors(e,i){const r=this._createHighlight(),a=[];for(const o of e)a.push(this.querySelectorAll(o,this.document.documentElement));r.maskElements(a.flat(),i)}_createHighlight(){return this._highlight&&this.hideHighlight(),this._highlight=new mh(this),this._highlight.install(),this._highlight}_ensureHighlight(){return this._highlight||(this._highlight=new mh(this),this._highlight.install()),this._highlight}addHighlight(e,i){this._ensureHighlight().addElementHighlight(e,i)}removeHighlight(e){this._ensureHighlight().removeElementHighlight(e)}setScreencastAnnotation(e){const i=this._ensureHighlight();if(!e){i.updateHighlight([]),i.hideActionPoint(),i.hideActionTitle(),i.hideActionCursor();return}const r=e.duration??500;e.box&&i.updateHighlight([{box:e.box,color:"rgba(0, 128, 255, 0.15)",borderColor:"rgba(0, 128, 255, 0.6)",fadeDuration:r}]),e.point&&(e.cursor!=="none"&&i.moveActionCursor(e.point.x,e.point.y,r),i.showActionPoint(e.point.x,e.point.y,r)),e.actionTitle&&i.showActionTitle(e.actionTitle,r,e.position,e.fontSize)}addUserOverlay(e,i){this._ensureHighlight().addUserOverlay(e,i)}getUserOverlay(e){return this._ensureHighlight().getUserOverlay(e)}removeUserOverlay(e){this._ensureHighlight().removeUserOverlay(e)}setUserOverlaysVisible(e){this._ensureHighlight().setUserOverlaysVisible(e)}hideHighlight(){this._highlight&&(this._highlight.uninstall(),delete this._highlight)}markTargetElements(e){const i=new CustomEvent("__playwright_reset_targets__",{bubbles:!0,cancelable:!0,composed:!0});this.document.dispatchEvent(i);const r=new CustomEvent("__playwright_mark_target__",{bubbles:!0,cancelable:!0,composed:!0});for(const a of e)a.dispatchEvent(r)}_setupGlobalListenersRemovalDetection(){const e="__playwright_global_listeners_check__";let i=!1;const r=()=>i=!0;this.window.addEventListener(e,r),new MutationObserver(a=>{if(a.some(u=>Array.from(u.addedNodes).includes(this.document.documentElement))&&(i=!1,this.window.dispatchEvent(new CustomEvent(e)),!i)){this.window.addEventListener(e,r);for(const u of this.onGlobalListenersRemoved)u()}}).observe(this.document,{childList:!0})}_setupHitTargetInterceptors(){const e=r=>{var a;return(a=this._hitTargetInterceptor)==null?void 0:a.call(this,r)},i=()=>{for(const r of this._allHitTargetInterceptorEvents)this.window.addEventListener(r,e,{capture:!0,passive:!1})};i(),this.onGlobalListenersRemoved.add(i)}async expect(e,i,r){const a=await this._expectCore(e,i,r),o=a.matches!==i.isNot?void 0:this._ariaSnapshotForExpect(e,i);return a.received===void 0&&o===void 0?{matches:a.matches,missingReceived:a.missingReceived}:{matches:a.matches,received:{value:a.received,ariaSnapshot:o},missingReceived:a.missingReceived}}_ariaSnapshotForExpect(e,i){const r=i.expression;if(!(r==="to.have.count"||r.endsWith(".array"))&&r!=="to.match.aria"){if(e&&ii(e)){const a=r==="to.have.text";return this._renderAriaSnapshot(e,{mode:"default",depth:a?void 0:1})}if(this.document.body)return this._renderAriaSnapshot(this.document.body,{mode:"default"})}}_renderAriaSnapshot(e,i){return vr(br(e,i),i).text}async _expectCore(e,i,r){var o,u;if(i.expression==="to.have.count"||i.expression.endsWith(".array"))return this.expectArray(r,i);if(!e){if(!i.isNot&&i.expression==="to.be.hidden")return{matches:!0};if(i.isNot&&i.expression==="to.be.visible")return{matches:!1};if(!i.isNot&&i.expression==="to.be.detached")return{matches:!0};if(i.isNot&&i.expression==="to.be.attached")return{matches:!1};if(i.isNot&&i.expression==="to.be.in.viewport")return{matches:!1};if(i.expression==="to.have.title"&&((o=i==null?void 0:i.expectedText)!=null&&o[0])){const f=new fr(i.expectedText[0]),d=this.document.title;return{received:d,matches:f.matches(d)}}if(i.expression==="to.have.url"&&((u=i==null?void 0:i.expectedText)!=null&&u[0])){const f=new fr(i.expectedText[0]),d=this.document.location.href;return{received:d,matches:f.matches(d)}}if(i.expression==="to.match.aria"&&!i.selector){if(!this.document.body)return{matches:i.isNot,missingReceived:!0};const f=jb(this.document.body,i.expectedValue);return{received:f.received,matches:!!f.matches.length}}return{matches:i.isNot,missingReceived:!0}}return await this.expectSingleElement(e,i)}async expectSingleElement(e,i){var a;const r=i.expression;{let o;if(r==="to.have.attribute"){const u=e.hasAttribute(i.expressionArg);o={matches:u,received:u?"attribute present":"attribute not present"}}else if(r==="to.be.checked"){const{checked:u,indeterminate:f}=i.expectedValue;if(f){if(u!==void 0)throw this.createStacklessError("Can't assert indeterminate and checked at the same time");o=this.elementState(e,"indeterminate")}else o=this.elementState(e,u===!1?"unchecked":"checked")}else if(r==="to.be.disabled")o=this.elementState(e,"disabled");else if(r==="to.be.editable")o=this.elementState(e,"editable");else if(r==="to.be.readonly")o=this.elementState(e,"editable"),o.matches=!o.matches;else if(r==="to.be.empty")if(e.nodeName==="INPUT"||e.nodeName==="TEXTAREA"){const u=e.value;o={matches:!u,received:u?"notEmpty":"empty"}}else{const u=(a=e.textContent)==null?void 0:a.trim();o={matches:!u,received:u?"notEmpty":"empty"}}else if(r==="to.be.enabled")o=this.elementState(e,"enabled");else if(r==="to.be.focused"){const u=this._activelyFocused(e).isFocused;o={matches:u,received:u?"focused":"inactive"}}else r==="to.be.hidden"?o=this.elementState(e,"hidden"):r==="to.be.visible"?o=this.elementState(e,"visible"):r==="to.be.attached"?o={matches:!0,received:"attached"}:r==="to.be.detached"&&(o={matches:!1,received:"attached"});if(o){if(o.received==="error:notconnected")throw this.createStacklessError("Element is not connected");return o}}if(r==="to.have.property"){let o=e;const u=i.expressionArg.split(".");for(let g=0;g<u.length-1;g++){if(typeof o!="object"||!(u[g]in o))return{received:void 0,matches:!1};o=o[u[g]]}const f=o[u[u.length-1]],d=Xh(f,i.expectedValue);return{received:f,matches:d}}if(r==="to.be.in.viewport"){const o=await this.viewportRatio(e);return{received:`viewport ratio ${o}`,matches:o>0&&o>(i.expectedNumber??0)-1e-9}}if(r==="to.have.values"){if(e=this.retarget(e,"follow-label"),e.nodeName!=="SELECT"||!e.multiple)throw this.createStacklessError("Not a select element with a multiple attribute");const o=[...e.selectedOptions].map(u=>u.value);return o.length!==i.expectedText.length?{received:o,matches:!1}:{received:o,matches:o.map((u,f)=>new fr(i.expectedText[f]).matches(u)).every(Boolean)}}if(r==="to.match.aria"){const o=jb(e,i.expectedValue);return{received:o.received,matches:!!o.matches.length}}{let o;if(r==="to.have.attribute.value"){const u=e.getAttribute(i.expressionArg);if(u===null)return{received:null,matches:!1};o=u}else if(["to.have.class","to.contain.class"].includes(r)){if(!i.expectedText)throw this.createStacklessError("Expected text is not provided for "+r);return{received:e.classList.toString(),matches:new fr(i.expectedText[0]).matchesClassList(this,e.classList,r==="to.contain.class")}}else if(r==="to.have.css")o=this.window.getComputedStyle(e,i.pseudo?`::${i.pseudo}`:void 0).getPropertyValue(i.expressionArg);else if(r==="to.have.id")o=e.id;else if(r==="to.have.text")o=i.useInnerText?e.innerText:Kt(new Map,e).full;else if(r==="to.have.accessible.name")o=rl(e,!1);else if(r==="to.have.accessible.description")o=al(e,!1);else if(r==="to.have.accessible.error.message")o=xT(e);else if(r==="to.have.role")o=Tt(e)||"";else if(r==="to.have.value"){if(e=this.retarget(e,"follow-label"),e.nodeName!=="INPUT"&&e.nodeName!=="TEXTAREA"&&e.nodeName!=="SELECT")throw this.createStacklessError("Not an input element");o=e.value}if(o!==void 0&&i.expectedText){const u=new fr(i.expectedText[0]);return{received:o,matches:u.matches(o)}}}throw this.createStacklessError("Unknown expect matcher: "+r)}expectArray(e,i){const r=i.expression;if(r==="to.have.count"){const d=e.length,g=d===i.expectedNumber;return{received:d,matches:g}}if(!i.expectedText)throw this.createStacklessError("Expected text is not provided for "+r);if(["to.have.class.array","to.contain.class.array"].includes(r)){const d=e.map(y=>y.classList),g=d.map(String);if(d.length!==i.expectedText.length)return{received:g,matches:!1};const m=this._matchSequentially(i.expectedText,d,(y,S)=>y.matchesClassList(this,S,r==="to.contain.class.array"));return{received:g,matches:m}}if(!["to.contain.text.array","to.have.text.array"].includes(r))throw this.createStacklessError("Unknown expect matcher: "+r);const a=e.map(d=>i.useInnerText?d.innerText:Kt(new Map,d).full),o=r!=="to.contain.text.array";if(!(a.length===i.expectedText.length||!o))return{received:a,matches:!1};const f=this._matchSequentially(i.expectedText,a,(d,g)=>d.matches(g));return{received:a,matches:f}}_matchSequentially(e,i,r){const a=e.map(f=>new fr(f));let o=0,u=0;for(;o<a.length&&u<i.length;)r(a[o],i[u])&&++o,++u;return o===a.length}}function Bo(n){return n.replace(/\n/g,"↵").replace(/\t/g,"⇆")}function Xb(n){const{value:e,caseSensitive:i}=n;if(e instanceof RegExp)return a=>!!a.match(e);if(i)return a=>a===e;const r=e.toLowerCase();return a=>a.toLowerCase().includes(r)}function UA(n){if(n=n.substring(1,n.length-1),!n.includes("\\"))return n;const e=[];let i=0;for(;i<n.length;)n[i]==="\\"&&i+1<n.length&&i++,e.push(n[i++]);return e.join("")}function qo(n,e){if(n[0]==="/"&&n.lastIndexOf("/")>0){const a=n.lastIndexOf("/"),o=new RegExp(n.substring(1,a),n.substring(a+1));return{matcher:u=>o.test(u.full),kind:"regex"}}const i=e?JSON.parse.bind(JSON):UA;let r=!1;return n.length>1&&n[0]==='"'&&n[n.length-1]==='"'?(n=i(n),r=!0):e&&n.length>1&&n[0]==='"'&&n[n.length-2]==='"'&&n[n.length-1]==="i"?(n=i(n.substring(0,n.length-1)),r=!1):e&&n.length>1&&n[0]==='"'&&n[n.length-2]==='"'&&n[n.length-1]==="s"?(n=i(n.substring(0,n.length-1)),r=!0):n.length>1&&n[0]==="'"&&n[n.length-1]==="'"&&(n=i(n),r=!0),n=pt(n),r?e?{kind:"strict",matcher:o=>o.normalized===n}:{matcher:o=>!n&&!o.immediate.length?!0:o.immediate.some(u=>pt(u)===n),kind:"strict"}:(n=n.toLowerCase(),{kind:"lax",matcher:a=>a.normalized.toLowerCase().includes(n)})}class fr{constructor(e){if(this._normalizeWhiteSpace=e.normalizeWhiteSpace,this._ignoreCase=e.ignoreCase,this._string=e.matchSubstring?void 0:this.normalize(e.string),this._substring=e.matchSubstring?this.normalize(e.string):void 0,e.regexSource){const i=new Set((e.regexFlags||"").split(""));e.ignoreCase===!1&&i.delete("i"),e.ignoreCase===!0&&i.add("i"),this._regex=new RegExp(e.regexSource,[...i].join(""))}}matches(e){return this._regex||(e=this.normalize(e)),this._string!==void 0?e===this._string:this._substring!==void 0?e.includes(this._substring):this._regex?!!this._regex.test(e):!1}matchesClassList(e,i,r){if(r){if(this._regex)throw e.createStacklessError("Partial matching does not support regular expressions. Please provide a string value.");return this._string.split(/\s+/g).filter(Boolean).every(a=>i.contains(a))}return this.matches(i.toString())}normalize(e){return e&&(this._normalizeWhiteSpace&&(e=pt(e)),this._ignoreCase&&(e=e.toLocaleLowerCase()),e)}}function Xh(n,e){if(n===e)return!0;if(n&&e&&typeof n=="object"&&typeof e=="object"){if(n.constructor!==e.constructor)return!1;if(Array.isArray(n)){if(n.length!==e.length)return!1;for(let r=0;r<n.length;++r)if(!Xh(n[r],e[r]))return!1;return!0}if(n instanceof RegExp)return n.source===e.source&&n.flags===e.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===e.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===e.toString();const i=Object.keys(n);if(i.length!==Object.keys(e).length)return!1;for(let r=0;r<i.length;++r)if(!e.hasOwnProperty(i[r]))return!1;for(const r of i)if(!Xh(n[r],e[r]))return!1;return!0}return typeof n=="number"&&typeof e=="number"?isNaN(n)&&isNaN(e):!1}const HA={tagName:"svg",children:[{tagName:"defs",children:[{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-gripper"},children:[{tagName:"path",attrs:{d:"M5 3h2v2H5zm0 4h2v2H5zm0 4h2v2H5zm4-8h2v2H9zm0 4h2v2H9zm0 4h2v2H9z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-circle-large-filled"},children:[{tagName:"path",attrs:{d:"M8 1a6.8 6.8 0 0 1 1.86.253 6.899 6.899 0 0 1 3.083 1.805 6.903 6.903 0 0 1 1.804 3.083C14.916 6.738 15 7.357 15 8s-.084 1.262-.253 1.86a6.9 6.9 0 0 1-.704 1.674 7.157 7.157 0 0 1-2.516 2.509 6.966 6.966 0 0 1-1.668.71A6.984 6.984 0 0 1 8 15a6.984 6.984 0 0 1-1.86-.246 7.098 7.098 0 0 1-1.674-.711 7.3 7.3 0 0 1-1.415-1.094 7.295 7.295 0 0 1-1.094-1.415 7.098 7.098 0 0 1-.71-1.675A6.985 6.985 0 0 1 1 8c0-.643.082-1.262.246-1.86a6.968 6.968 0 0 1 .711-1.667 7.156 7.156 0 0 1 2.509-2.516 6.895 6.895 0 0 1 1.675-.704A6.808 6.808 0 0 1 8 1z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-stop-circle"},children:[{tagName:"path",attrs:{d:"M6 6h4v4H6z"}},{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.6 1c1.6.1 3.1.9 4.2 2 1.3 1.4 2 3.1 2 5.1 0 1.6-.6 3.1-1.6 4.4-1 1.2-2.4 2.1-4 2.4-1.6.3-3.2.1-4.6-.7-1.4-.8-2.5-2-3.1-3.5C.9 9.2.8 7.5 1.3 6c.5-1.6 1.4-2.9 2.8-3.8C5.4 1.3 7 .9 8.6 1zm.5 12.9c1.3-.3 2.5-1 3.4-2.1.8-1.1 1.3-2.4 1.2-3.8 0-1.6-.6-3.2-1.7-4.3-1-1-2.2-1.6-3.6-1.7-1.3-.1-2.7.2-3.8 1-1.1.8-1.9 1.9-2.3 3.3-.4 1.3-.4 2.7.2 4 .6 1.3 1.5 2.3 2.7 3 1.2.7 2.6.9 3.9.6z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-inspect"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1 3l1-1h12l1 1v6h-1V3H2v8h5v1H2l-1-1V3zm14.707 9.707L9 6v9.414l2.707-2.707h4zM10 13V8.414l3.293 3.293h-2L10 13z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-whole-word"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M0 11H1V13H15V11H16V14H15H1H0V11Z"}},{tagName:"path",attrs:{d:"M6.84048 11H5.95963V10.1406H5.93814C5.555 10.7995 4.99104 11.1289 4.24625 11.1289C3.69839 11.1289 3.26871 10.9839 2.95718 10.6938C2.64924 10.4038 2.49527 10.0189 2.49527 9.53906C2.49527 8.51139 3.10041 7.91341 4.3107 7.74512L5.95963 7.51416C5.95963 6.57959 5.58186 6.1123 4.82632 6.1123C4.16389 6.1123 3.56591 6.33789 3.03238 6.78906V5.88672C3.57307 5.54297 4.19612 5.37109 4.90152 5.37109C6.19416 5.37109 6.84048 6.05501 6.84048 7.42285V11ZM5.95963 8.21777L4.63297 8.40039C4.22476 8.45768 3.91682 8.55973 3.70914 8.70654C3.50145 8.84977 3.39761 9.10579 3.39761 9.47461C3.39761 9.74316 3.4925 9.96338 3.68228 10.1353C3.87564 10.3035 4.13166 10.3877 4.45035 10.3877C4.8872 10.3877 5.24706 10.2355 5.52994 9.93115C5.8164 9.62321 5.95963 9.2347 5.95963 8.76562V8.21777Z"}},{tagName:"path",attrs:{d:"M9.3475 10.2051H9.32601V11H8.44515V2.85742H9.32601V6.4668H9.3475C9.78076 5.73633 10.4146 5.37109 11.2489 5.37109C11.9543 5.37109 12.5057 5.61816 12.9032 6.1123C13.3042 6.60286 13.5047 7.26172 13.5047 8.08887C13.5047 9.00911 13.2809 9.74674 12.8333 10.3018C12.3857 10.8532 11.7734 11.1289 10.9964 11.1289C10.2695 11.1289 9.71989 10.821 9.3475 10.2051ZM9.32601 7.98682V8.75488C9.32601 9.20964 9.47282 9.59635 9.76644 9.91504C10.0636 10.2301 10.4396 10.3877 10.8944 10.3877C11.4279 10.3877 11.8451 10.1836 12.1458 9.77539C12.4502 9.36719 12.6024 8.79964 12.6024 8.07275C12.6024 7.46045 12.4609 6.98063 12.1781 6.6333C11.8952 6.28597 11.512 6.1123 11.0286 6.1123C10.5166 6.1123 10.1048 6.29134 9.7933 6.64941C9.48177 7.00391 9.32601 7.44971 9.32601 7.98682Z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-eye"},children:[{tagName:"path",attrs:{d:"M7.99993 6.00316C9.47266 6.00316 10.6666 7.19708 10.6666 8.66981C10.6666 10.1426 9.47266 11.3365 7.99993 11.3365C6.52715 11.3365 5.33324 10.1426 5.33324 8.66981C5.33324 7.19708 6.52715 6.00316 7.99993 6.00316ZM7.99993 7.00315C7.07946 7.00315 6.33324 7.74935 6.33324 8.66981C6.33324 9.59028 7.07946 10.3365 7.99993 10.3365C8.9204 10.3365 9.6666 9.59028 9.6666 8.66981C9.6666 7.74935 8.9204 7.00315 7.99993 7.00315ZM7.99993 3.66675C11.0756 3.66675 13.7307 5.76675 14.4673 8.70968C14.5344 8.97755 14.3716 9.24908 14.1037 9.31615C13.8358 9.38315 13.5643 9.22041 13.4973 8.95248C12.8713 6.45205 10.6141 4.66675 7.99993 4.66675C5.38454 4.66675 3.12664 6.45359 2.50182 8.95555C2.43491 9.22341 2.16348 9.38635 1.89557 9.31948C1.62766 9.25255 1.46471 8.98115 1.53162 8.71321C2.26701 5.76856 4.9229 3.66675 7.99993 3.66675Z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-symbol-constant"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4 6h8v1H4V6zm8 3H4v1h8V9z"}},{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M1 4l1-1h12l1 1v8l-1 1H2l-1-1V4zm1 0v8h12V4H2z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-check"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14.431 3.323l-8.47 10-.79-.036-3.35-4.77.818-.574 2.978 4.24 8.051-9.506.764.646z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-close"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 8.707l3.646 3.647.708-.707L8.707 8l3.647-3.646-.707-.708L8 7.293 4.354 3.646l-.707.708L7.293 8l-3.646 3.646.707.708L8 8.707z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-pass"},children:[{tagName:"path",attrs:{d:"M6.27 10.87h.71l4.56-4.56-.71-.71-4.2 4.21-1.92-1.92L4 8.6l2.27 2.27z"}},{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.6 1c1.6.1 3.1.9 4.2 2 1.3 1.4 2 3.1 2 5.1 0 1.6-.6 3.1-1.6 4.4-1 1.2-2.4 2.1-4 2.4-1.6.3-3.2.1-4.6-.7-1.4-.8-2.5-2-3.1-3.5C.9 9.2.8 7.5 1.3 6c.5-1.6 1.4-2.9 2.8-3.8C5.4 1.3 7 .9 8.6 1zm.5 12.9c1.3-.3 2.5-1 3.4-2.1.8-1.1 1.3-2.4 1.2-3.8 0-1.6-.6-3.2-1.7-4.3-1-1-2.2-1.6-3.6-1.7-1.3-.1-2.7.2-3.8 1-1.1.8-1.9 1.9-2.3 3.3-.4 1.3-.4 2.7.2 4 .6 1.3 1.5 2.3 2.7 3 1.2.7 2.6.9 3.9.6z"}}]},{tagName:"clipPath",attrs:{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",id:"icon-gist"},children:[{tagName:"path",attrs:{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M10.57 1.14l3.28 3.3.15.36v9.7l-.5.5h-11l-.5-.5v-13l.5-.5h7.72l.35.14zM10 5h3l-3-3v3zM3 2v12h10V6H9.5L9 5.5V2H3zm2.062 7.533l1.817-1.828L6.17 7 4 9.179v.707l2.171 2.174.707-.707-1.816-1.82zM8.8 7.714l.7-.709 2.189 2.175v.709L9.5 12.062l-.705-.709 1.831-1.82L8.8 7.714z"}}]}]}]},mn={multiple:"#f6b26b7f",single:"#6fa8dc7f",assert:"#8acae480",action:"#dc6f6f7f"};class Yb{}class Sh{constructor(e,i){this._hoveredModel=null,this._hoveredElement=null,this._recorder=e,this._assertVisibility=i}cursor(){return"pointer"}uninstall(){this._hoveredModel=null,this._hoveredElement=null}onClick(e){var i;Ge(e),e.button===0&&(i=this._hoveredModel)!=null&&i.selector&&this._commit(this._hoveredModel.selector,this._hoveredModel)}onPointerDown(e){Ge(e)}onPointerUp(e){Ge(e)}onMouseDown(e){Ge(e)}onMouseUp(e){Ge(e)}onMouseMove(e){var a;Ge(e);let i=this._recorder.deepEventTarget(e);if(i.isConnected||(i=null),this._hoveredElement===i)return;this._hoveredElement=i;let r=null;if(this._hoveredElement){const o=this._recorder.injectedScript.generateSelector(this._hoveredElement,{testIdAttributeName:this._recorder.state.testIdAttributeName,multiple:!1});r={selector:o.selector,elements:o.elements,tooltipText:this._recorder.injectedScript.utils.asLocator(this._recorder.state.language,o.selector),color:this._assertVisibility?mn.assert:mn.single}}((a=this._hoveredModel)==null?void 0:a.selector)!==(r==null?void 0:r.selector)&&(this._hoveredModel=r,this._recorder.updateHighlight(r,!0))}onMouseEnter(e){Ge(e)}onMouseLeave(e){Ge(e);const i=this._recorder.injectedScript.window;i.top!==i&&this._recorder.deepEventTarget(e).nodeType===Node.DOCUMENT_NODE&&this._reset(!0)}onKeyDown(e){Ge(e),e.key==="Escape"&&this._assertVisibility&&this._recorder.setMode("recording")}onKeyUp(e){Ge(e)}onScroll(e){this._reset(!1)}_commit(e,i){var r;this._assertVisibility?(this._recorder.recordAction({name:"assertVisible",selector:e,signals:[]}),this._recorder.setMode("recording"),(r=this._recorder.overlay)==null||r.flashToolSucceeded("assertingVisibility")):this._recorder.elementPicked(e,i)}_reset(e){this._hoveredElement=null,this._hoveredModel=null,this._recorder.updateHighlight(null,e)}}class BA{constructor(e){this._hoveredModel=null,this._hoveredElement=null,this._activeModel=null,this._expectProgrammaticKeyUp=!1,this._observer=null,this._recorder=e,this._performingActions=new Set,this._dialog=new Pv(e)}cursor(){return"pointer"}_installObserverIfNeeded(){var e;this._observer||(e=this._recorder.injectedScript.document)!=null&&e.body&&(this._observer=new MutationObserver(i=>{if(this._hoveredElement)for(const r of i)for(const a of r.removedNodes)(a===this._hoveredElement||a.contains(this._hoveredElement))&&this._resetHoveredModel()}),this._observer.observe(this._recorder.injectedScript.document.body,{childList:!0,subtree:!0}))}uninstall(){var e;(e=this._observer)==null||e.disconnect(),this._observer=null,this._hoveredModel=null,this._hoveredElement=null,this._activeModel=null,this._expectProgrammaticKeyUp=!1,this._dialog.close()}onClick(e){if(this._dialog.isShowing()){e.button===2&&e.type==="auxclick"&&Ge(e);return}if(tl(this._hoveredElement)||this._shouldIgnoreMouseEvent(e)||this._actionInProgress(e)||this._consumedDueToNoModel(e,this._hoveredModel))return;if(e.button===2&&e.type==="auxclick"){this._showActionListDialog(this._hoveredModel,e);return}const i=el(this._recorder.deepEventTarget(e));if(i&&e.detail===1){this._performAction({name:i.checked?"check":"uncheck",selector:this._hoveredModel.selector,signals:[]});return}this._cancelPendingClickAction(),e.detail===1&&(this._pendingClickAction={action:{name:"click",selector:this._hoveredModel.selector,position:Wa(e),signals:[],button:Yh(e),modifiers:Tr(e),clickCount:e.detail},timeout:this._recorder.injectedScript.utils.builtins.setTimeout(()=>this._commitPendingClickAction(),200)})}onDblClick(e){this._dialog.isShowing()||tl(this._hoveredElement)||this._shouldIgnoreMouseEvent(e)||this._actionInProgress(e)||this._consumedDueToNoModel(e,this._hoveredModel)||(this._cancelPendingClickAction(),this._performAction({name:"click",selector:this._hoveredModel.selector,position:Wa(e),signals:[],button:Yh(e),modifiers:Tr(e),clickCount:e.detail}))}_commitPendingClickAction(){this._pendingClickAction&&this._performAction(this._pendingClickAction.action),this._cancelPendingClickAction()}_cancelPendingClickAction(){this._pendingClickAction&&this._recorder.injectedScript.utils.builtins.clearTimeout(this._pendingClickAction.timeout),this._pendingClickAction=void 0}onContextMenu(e){if(this._dialog.isShowing()){Ge(e);return}this._shouldIgnoreMouseEvent(e)||this._actionInProgress(e)||this._consumedDueToNoModel(e,this._hoveredModel)||this._showActionListDialog(this._hoveredModel,e)}onPointerDown(e){this._dialog.isShowing()||this._shouldIgnoreMouseEvent(e)||this._consumeWhenAboutToPerform(e)}onPointerUp(e){this._dialog.isShowing()||this._shouldIgnoreMouseEvent(e)||this._consumeWhenAboutToPerform(e)}onMouseDown(e){this._dialog.isShowing()||this._shouldIgnoreMouseEvent(e)||(this._consumeWhenAboutToPerform(e),this._activeModel=this._hoveredModel)}onMouseUp(e){this._dialog.isShowing()||this._shouldIgnoreMouseEvent(e)||this._consumeWhenAboutToPerform(e)}onMouseMove(e){if(this._dialog.isShowing())return;const i=this._recorder.deepEventTarget(e);this._hoveredElement!==i&&(this._hoveredElement=i,this._updateModelForHoveredElement())}onMouseLeave(e){if(this._dialog.isShowing())return;const i=this._recorder.injectedScript.window;i.top!==i&&this._recorder.deepEventTarget(e).nodeType===Node.DOCUMENT_NODE&&(this._hoveredElement=null,this._updateModelForHoveredElement())}onFocus(e){this._dialog.isShowing()||this._onFocus(!0)}onInput(e){if(this._dialog.isShowing())return;const i=this._recorder.deepEventTarget(e);if(i.nodeName==="INPUT"&&i.type.toLowerCase()==="file"){const r=i===this._hoveredElement?this._hoveredModel.selector:this._recorder.injectedScript.generateSelector(i,{testIdAttributeName:this._recorder.state.testIdAttributeName}).selector;this._recordAction({name:"setInputFiles",selector:r,signals:[],files:[...i.files||[]].map(a=>a.name)});return}if(tl(i)){this._recordAction({name:"fill",selector:this._hoveredModel.selector,signals:[],text:i.value});return}if(["INPUT","TEXTAREA"].includes(i.nodeName)||i.isContentEditable){if(i.nodeName==="INPUT"&&["checkbox","radio"].includes(i.type.toLowerCase())||this._consumedDueWrongTarget(e))return;this._recordAction({name:"fill",selector:this._activeModel.selector,signals:[],text:i.isContentEditable?i.innerText:i.value})}if(i.nodeName==="SELECT"){const r=i;this._recordAction({name:"select",selector:this._activeModel.selector,options:[...r.selectedOptions].map(a=>a.value),signals:[]})}}onKeyDown(e){if(!this._dialog.isShowing()&&this._shouldGenerateKeyPressFor(e)){if(this._actionInProgress(e)){this._expectProgrammaticKeyUp=!0;return}if(!this._consumedDueWrongTarget(e)){if(e.key===" "){const i=el(this._recorder.deepEventTarget(e));if(i&&e.detail===0){this._performAction({name:i.checked?"uncheck":"check",selector:this._activeModel.selector,signals:[]});return}}this._performAction({name:"press",selector:this._activeModel.selector,signals:[],key:e.key,modifiers:Tr(e)})}}}onKeyUp(e){if(!this._dialog.isShowing()&&this._shouldGenerateKeyPressFor(e)){if(!this._expectProgrammaticKeyUp){Ge(e);return}this._expectProgrammaticKeyUp=!1}}onScroll(e){this._dialog.isShowing()||this._resetHoveredModel()}_showActionListDialog(e,i){Ge(i);const r=Wa(i),a=[{title:"Click",cb:()=>this._performAction({name:"click",selector:e.selector,position:r,signals:[],button:"left",modifiers:0,clickCount:0})},{title:"Right click",cb:()=>this._performAction({name:"click",selector:e.selector,position:r,signals:[],button:"right",modifiers:0,clickCount:0})},{title:"Double click",cb:()=>this._performAction({name:"click",selector:e.selector,position:r,signals:[],button:"left",modifiers:0,clickCount:2})},{title:"Hover",cb:()=>this._performAction({name:"hover",selector:e.selector,position:r,signals:[]})},{title:"Pick locator",cb:()=>this._recorder.elementPicked(e.selector,e)}],o=this._recorder.document.createElement("x-pw-action-list");o.setAttribute("role","list"),o.setAttribute("aria-label","Choose action");for(const g of a){const m=this._recorder.document.createElement("x-pw-action-item");m.setAttribute("role","listitem"),m.textContent=g.title,m.setAttribute("aria-label",g.title),m.addEventListener("click",()=>{this._dialog.close(),g.cb()}),o.appendChild(m)}const u=this._dialog.show({label:"Choose action",body:o,autosize:!0}),f=this._recorder.highlight.firstTooltipBox()||e.elements[0].getBoundingClientRect(),d=this._recorder.highlight.tooltipPosition(f,u);this._dialog.moveTo(d.anchorTop,d.anchorLeft)}_resetHoveredModel(){this._hoveredModel=null,this._hoveredElement=null,this._updateHighlight(!1)}_onFocus(e){const i=VA(this._recorder.document);if(e&&i===this._recorder.document.body)return;const r=i?this._recorder.injectedScript.generateSelector(i,{testIdAttributeName:this._recorder.state.testIdAttributeName}):null;this._activeModel=r&&r.selector?{...r,color:mn.action}:null,e&&(this._hoveredElement=i,this._updateModelForHoveredElement())}_shouldIgnoreMouseEvent(e){return Jv(this._recorder.deepEventTarget(e))}_actionInProgress(e){const i=e instanceof KeyboardEvent,r=e instanceof MouseEvent||e instanceof PointerEvent;for(const a of this._performingActions)if(i&&a.name==="press"&&e.key===a.key||r&&(a.name==="click"||a.name==="hover"||a.name==="check"||a.name==="uncheck"))return!0;return Ge(e),!1}_consumedDueToNoModel(e,i){return i?!1:(Ge(e),!0)}_consumedDueWrongTarget(e){return this._activeModel&&this._activeModel.elements[0]===this._recorder.deepEventTarget(e)?!1:(Ge(e),!0)}_consumeWhenAboutToPerform(e){this._performingActions.size||Ge(e)}_reportPerformedActionForTests(){this._recorder.injectedScript.isUnderTest&&console.error("Action performed for test: "+JSON.stringify({hovered:this._hoveredModel?this._hoveredModel.selector:null,active:this._activeModel?this._activeModel.selector:null}))}_recordAction(e){this._recorder.recordAction(e).then(()=>this._reportPerformedActionForTests())}_performAction(e){this._recorder.updateHighlight(null,!1),this._performingActions.add(e),this._recorder.performAction(e).finally(()=>{this._performingActions.delete(e),this._onFocus(!1)}).then(()=>this._reportPerformedActionForTests())}_shouldGenerateKeyPressFor(e){if(typeof e.key!="string"||e.key==="Enter"&&(this._recorder.deepEventTarget(e).nodeName==="TEXTAREA"||this._recorder.deepEventTarget(e).isContentEditable)||["Backspace","Delete","AltGraph"].includes(e.key)||e.key==="@"&&e.code==="KeyL")return!1;if(navigator.platform.includes("Mac")){if(e.key==="v"&&e.metaKey)return!1}else if(e.key==="v"&&e.ctrlKey||e.key==="Insert"&&e.shiftKey)return!1;if(["Shift","Control","Meta","Alt","Process"].includes(e.key))return!1;const i=e.ctrlKey||e.altKey||e.metaKey;return e.key.length===1&&!i?!!el(this._recorder.deepEventTarget(e)):!0}_updateModelForHoveredElement(){if(this._installObserverIfNeeded(),this._performingActions.size)return;if(!this._hoveredElement||!this._hoveredElement.isConnected){this._hoveredModel=null,this._hoveredElement=null,this._updateHighlight(!0);return}const{selector:e,elements:i}=this._recorder.injectedScript.generateSelector(this._hoveredElement,{testIdAttributeName:this._recorder.state.testIdAttributeName});this._hoveredModel&&this._hoveredModel.selector===e||(this._hoveredModel=e?{selector:e,elements:i,color:mn.action}:null,this._updateHighlight(!0))}_updateHighlight(e){this._recorder.updateHighlight(this._hoveredModel,e)}}class qA{constructor(e){this._recorder=e}install(){this._recorder.highlight.uninstall()}uninstall(){this._recorder.highlight.install()}onClick(e){const i=this._recorder.deepEventTarget(e);if(tl(i)||e.button===2&&e.type==="auxclick"||this._shouldIgnoreMouseEvent(e))return;const r=el(i),{ariaSnapshot:a,selector:o,ref:u}=this._ariaSnapshot(i);if(r&&e.detail===1){this._recorder.recordAction({name:r.checked?"check":"uncheck",selector:o,ref:u,signals:[],ariaSnapshot:a});return}this._recorder.recordAction({name:"click",selector:o,ref:u,ariaSnapshot:a,position:Wa(e),signals:[],button:Yh(e),modifiers:Tr(e),clickCount:e.detail})}onContextMenu(e){const i=this._recorder.deepEventTarget(e),{ariaSnapshot:r,selector:a,ref:o}=this._ariaSnapshot(i);this._recorder.recordAction({name:"click",selector:a,ref:o,ariaSnapshot:r,position:Wa(e),signals:[],button:"right",modifiers:Tr(e),clickCount:1})}onInput(e){const i=this._recorder.deepEventTarget(e),{ariaSnapshot:r,selector:a,ref:o}=this._ariaSnapshot(i);if(tl(i)){this._recorder.recordAction({name:"fill",selector:a,ref:o,ariaSnapshot:r,signals:[],text:i.value});return}if(["INPUT","TEXTAREA"].includes(i.nodeName)||i.isContentEditable){if(i.nodeName==="INPUT"&&["checkbox","radio"].includes(i.type.toLowerCase()))return;this._recorder.recordAction({name:"fill",ref:o,selector:a,ariaSnapshot:r,signals:[],text:i.isContentEditable?i.innerText:i.value});return}if(i.nodeName==="SELECT"){const u=i;this._recorder.recordAction({name:"select",selector:a,ref:o,ariaSnapshot:r,options:[...u.selectedOptions].map(f=>f.value),signals:[]});return}}onKeyDown(e){if(!this._shouldGenerateKeyPressFor(e))return;const i=this._recorder.deepEventTarget(e),{ariaSnapshot:r,selector:a,ref:o}=this._ariaSnapshot(i);if(e.key===" "){const u=el(i);if(u&&e.detail===0){this._recorder.recordAction({name:u.checked?"uncheck":"check",selector:a,ref:o,ariaSnapshot:r,signals:[]});return}}this._recorder.recordAction({name:"press",selector:a,ref:o,ariaSnapshot:r,signals:[],key:e.key,modifiers:Tr(e)})}_shouldIgnoreMouseEvent(e){return Jv(this._recorder.deepEventTarget(e))}_shouldGenerateKeyPressFor(e){if(typeof e.key!="string"||e.key==="Enter"&&(this._recorder.deepEventTarget(e).nodeName==="TEXTAREA"||this._recorder.deepEventTarget(e).isContentEditable)||["Backspace","Delete","AltGraph"].includes(e.key)||e.key==="@"&&e.code==="KeyL")return!1;if(navigator.platform.includes("Mac")){if(e.key==="v"&&e.metaKey)return!1}else if(e.key==="v"&&e.ctrlKey||e.key==="Insert"&&e.shiftKey)return!1;if(["Shift","Control","Meta","Alt","Process"].includes(e.key))return!1;const i=e.ctrlKey||e.altKey||e.metaKey;return e.key.length===1&&!i?!this._isEditable(this._recorder.deepEventTarget(e)):!0}_isEditable(e){return!!(e.nodeName==="TEXTAREA"||e.nodeName==="INPUT"||e.isContentEditable)}_ariaSnapshot(e){const{ariaSnapshot:i,refs:r}=this._recorder.injectedScript.ariaSnapshotForRecorder(),a=e?r.get(e):void 0,o=e?this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName}):void 0;return{ariaSnapshot:i,selector:o==null?void 0:o.selector,ref:a}}}class wh{constructor(e,i){this._hoverHighlight=null,this._action=null,this._recorder=e,this._textCache=new Map,this._kind=i,this._dialog=new Pv(e)}cursor(){return"pointer"}uninstall(){this._dialog.close(),this._hoverHighlight=null}onClick(e){Ge(e),this._kind==="value"?this._commitAssertValue():this._dialog.isShowing()||this._showDialog()}onMouseDown(e){const i=this._recorder.deepEventTarget(e);this._elementHasValue(i)&&e.preventDefault()}onPointerUp(e){var r;const i=(r=this._hoverHighlight)==null?void 0:r.elements[0];this._kind==="value"&&i&&(i.nodeName==="INPUT"||i.nodeName==="SELECT")&&i.disabled&&this._commitAssertValue()}onMouseMove(e){var r;if(this._dialog.isShowing())return;const i=this._recorder.deepEventTarget(e);if(((r=this._hoverHighlight)==null?void 0:r.elements[0])!==i){if(this._kind==="text"||this._kind==="snapshot")this._hoverHighlight=this._recorder.injectedScript.utils.elementText(this._textCache,i).full?{elements:[i],selector:"",color:mn.assert}:null;else if(this._elementHasValue(i)){const a=this._recorder.injectedScript.generateSelector(i,{testIdAttributeName:this._recorder.state.testIdAttributeName});this._hoverHighlight={selector:a.selector,elements:a.elements,color:mn.assert}}else this._hoverHighlight=null;this._recorder.updateHighlight(this._hoverHighlight,!0)}}onKeyDown(e){e.key==="Escape"&&this._recorder.setMode("recording"),Ge(e)}onScroll(e){this._recorder.updateHighlight(this._hoverHighlight,!1)}_elementHasValue(e){return e.nodeName==="TEXTAREA"||e.nodeName==="SELECT"||e.nodeName==="INPUT"&&!["button","image","reset","submit"].includes(e.type)}_generateAction(){var i;this._textCache.clear();const e=(i=this._hoverHighlight)==null?void 0:i.elements[0];if(!e)return null;if(this._kind==="value"){if(!this._elementHasValue(e))return null;const{selector:r}=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName});return e.nodeName==="INPUT"&&["checkbox","radio"].includes(e.type.toLowerCase())?{name:"assertChecked",selector:r,signals:[],checked:!e.checked}:{name:"assertValue",selector:r,signals:[],value:e.value}}else if(this._kind==="snapshot"){const r=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName,forTextExpect:!0});return this._hoverHighlight={selector:r.selector,elements:r.elements,color:mn.assert},this._recorder.updateHighlight(this._hoverHighlight,!0),{name:"assertSnapshot",selector:this._hoverHighlight.selector,signals:[],ariaSnapshot:this._recorder.injectedScript.ariaSnapshot(e,{mode:"codegen"})}}else{const r=this._recorder.injectedScript.generateSelector(e,{testIdAttributeName:this._recorder.state.testIdAttributeName,forTextExpect:!0});return this._hoverHighlight={selector:r.selector,elements:r.elements,color:mn.assert},this._recorder.updateHighlight(this._hoverHighlight,!0),{name:"assertText",selector:this._hoverHighlight.selector,signals:[],text:this._recorder.injectedScript.utils.elementText(this._textCache,e).normalized,substring:!0}}}_renderValue(e){return(e==null?void 0:e.name)==="assertText"?this._recorder.injectedScript.utils.normalizeWhiteSpace(e.text):(e==null?void 0:e.name)==="assertChecked"?String(e.checked):(e==null?void 0:e.name)==="assertValue"?e.value:(e==null?void 0:e.name)==="assertSnapshot"?e.ariaSnapshot:""}_commit(){!this._action||!this._dialog.isShowing()||(this._dialog.close(),this._recorder.recordAction(this._action),this._recorder.setMode("recording"))}_showDialog(){var e,i,r,a;(e=this._hoverHighlight)!=null&&e.elements[0]&&(this._action=this._generateAction(),((i=this._action)==null?void 0:i.name)==="assertText"?this._showTextDialog(this._action):((r=this._action)==null?void 0:r.name)==="assertSnapshot"&&(this._recorder.recordAction(this._action),this._recorder.setMode("recording"),(a=this._recorder.overlay)==null||a.flashToolSucceeded("assertingSnapshot")))}_showTextDialog(e){const i=this._recorder.document.createElement("textarea");i.setAttribute("spellcheck","false"),i.value=this._renderValue(e),i.classList.add("text-editor");const r=()=>{var y;const f=this._recorder.injectedScript.utils.normalizeWhiteSpace(i.value),d=(y=this._hoverHighlight)==null?void 0:y.elements[0];if(!d)return;e.text=f;const g=this._recorder.injectedScript.utils.elementText(this._textCache,d).normalized,m=f&&g.includes(f);i.classList.toggle("does-not-match",!m)};i.addEventListener("input",r);const o=this._dialog.show({label:"Assert that element contains text",body:i,onCommit:()=>this._commit()}),u=this._recorder.highlight.tooltipPosition(this._recorder.highlight.firstBox(),o);this._dialog.moveTo(u.anchorTop,u.anchorLeft),i.focus()}_commitAssertValue(){var i;if(this._kind!=="value")return;const e=this._generateAction();e&&(this._recorder.recordAction(e),this._recorder.setMode("recording"),(i=this._recorder.overlay)==null||i.flashToolSucceeded("assertingValue"))}}class $A{constructor(e){this._listeners=[],this._offsetX=0,this._measure={width:0,height:0},this._recorder=e;const i=this._recorder.document;this._overlayElement=i.createElement("x-pw-overlay");const r=i.createElement("x-pw-tools-list");this._overlayElement.appendChild(r),this._dragHandle=i.createElement("x-pw-tool-gripper"),this._dragHandle.appendChild(i.createElement("x-div")),r.appendChild(this._dragHandle),this._recordToggle=this._recorder.document.createElement("x-pw-tool-item"),this._recordToggle.title="Record",this._recordToggle.classList.add("record"),this._recordToggle.appendChild(this._recorder.document.createElement("x-div")),r.appendChild(this._recordToggle),this._pickLocatorToggle=this._recorder.document.createElement("x-pw-tool-item"),this._pickLocatorToggle.title="Pick locator",this._pickLocatorToggle.classList.add("pick-locator"),this._pickLocatorToggle.appendChild(this._recorder.document.createElement("x-div")),r.appendChild(this._pickLocatorToggle),this._assertVisibilityToggle=this._recorder.document.createElement("x-pw-tool-item"),this._assertVisibilityToggle.title="Assert visibility",this._assertVisibilityToggle.classList.add("visibility"),this._assertVisibilityToggle.appendChild(this._recorder.document.createElement("x-div")),r.appendChild(this._assertVisibilityToggle),this._assertTextToggle=this._recorder.document.createElement("x-pw-tool-item"),this._assertTextToggle.title="Assert text",this._assertTextToggle.classList.add("text"),this._assertTextToggle.appendChild(this._recorder.document.createElement("x-div")),r.appendChild(this._assertTextToggle),this._assertValuesToggle=this._recorder.document.createElement("x-pw-tool-item"),this._assertValuesToggle.title="Assert value",this._assertValuesToggle.classList.add("value"),this._assertValuesToggle.appendChild(this._recorder.document.createElement("x-div")),r.appendChild(this._assertValuesToggle),this._assertSnapshotToggle=this._recorder.document.createElement("x-pw-tool-item"),this._assertSnapshotToggle.title="Assert snapshot",this._assertSnapshotToggle.classList.add("snapshot"),this._assertSnapshotToggle.appendChild(this._recorder.document.createElement("x-div")),r.appendChild(this._assertSnapshotToggle),this._updateVisualPosition(),this._refreshListeners()}_refreshListeners(){Zv(this._listeners),this._listeners=[Ie(this._dragHandle,"mousedown",e=>{this._dragState={offsetX:this._offsetX,dragStart:{x:e.clientX,y:0}}}),Ie(this._recordToggle,"click",()=>{this._recordToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="none"||this._recorder.state.mode==="standby"||this._recorder.state.mode==="inspecting"?"recording":"standby")}),Ie(this._pickLocatorToggle,"click",()=>{if(this._pickLocatorToggle.classList.contains("disabled"))return;const e={inspecting:"standby",none:"inspecting",standby:"inspecting",recording:"recording-inspecting","recording-inspecting":"recording",assertingText:"recording-inspecting",assertingVisibility:"recording-inspecting",assertingValue:"recording-inspecting",assertingSnapshot:"recording-inspecting"};this._recorder.setMode(e[this._recorder.state.mode])}),Ie(this._assertVisibilityToggle,"click",()=>{this._assertVisibilityToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingVisibility"?"recording":"assertingVisibility")}),Ie(this._assertTextToggle,"click",()=>{this._assertTextToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingText"?"recording":"assertingText")}),Ie(this._assertValuesToggle,"click",()=>{this._assertValuesToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingValue"?"recording":"assertingValue")}),Ie(this._assertSnapshotToggle,"click",()=>{this._assertSnapshotToggle.classList.contains("disabled")||this._recorder.setMode(this._recorder.state.mode==="assertingSnapshot"?"recording":"assertingSnapshot")})]}install(){this._recorder.highlight.appendChild(this._overlayElement),this._refreshListeners(),this._updateVisualPosition()}contains(e){return this._recorder.injectedScript.utils.isInsideScope(this._overlayElement,e)}setUIState(e){const i=e.mode==="recording"||e.mode==="assertingText"||e.mode==="assertingVisibility"||e.mode==="assertingValue"||e.mode==="assertingSnapshot"||e.mode==="recording-inspecting";this._recordToggle.classList.toggle("toggled",i),this._recordToggle.title=i?"Stop Recording":"Start Recording",this._pickLocatorToggle.classList.toggle("toggled",e.mode==="inspecting"||e.mode==="recording-inspecting"),this._assertVisibilityToggle.classList.toggle("toggled",e.mode==="assertingVisibility"),this._assertVisibilityToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"),this._assertTextToggle.classList.toggle("toggled",e.mode==="assertingText"),this._assertTextToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"),this._assertValuesToggle.classList.toggle("toggled",e.mode==="assertingValue"),this._assertValuesToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"),this._assertSnapshotToggle.classList.toggle("toggled",e.mode==="assertingSnapshot"),this._assertSnapshotToggle.classList.toggle("disabled",e.mode==="none"||e.mode==="standby"||e.mode==="inspecting"),this._offsetX!==e.overlay.offsetX&&(this._offsetX=e.overlay.offsetX,this._updateVisualPosition()),e.mode==="none"?this._hideOverlay():this._showOverlay()}flashToolSucceeded(e){let i;e==="assertingVisibility"?i=this._assertVisibilityToggle:e==="assertingSnapshot"?i=this._assertSnapshotToggle:i=this._assertValuesToggle,i.classList.add("succeeded"),this._recorder.injectedScript.utils.builtins.setTimeout(()=>i.classList.remove("succeeded"),2e3)}_hideOverlay(){this._overlayElement.setAttribute("hidden","true")}_showOverlay(){this._overlayElement.hasAttribute("hidden")&&(this._overlayElement.removeAttribute("hidden"),this._updateVisualPosition())}_updateVisualPosition(){this._measure=this._overlayElement.getBoundingClientRect(),this._overlayElement.style.left=(this._recorder.injectedScript.window.innerWidth-this._measure.width)/2+this._offsetX+"px"}onMouseMove(e){if(!e.buttons)return this._dragState=void 0,!1;if(this._dragState){this._offsetX=this._dragState.offsetX+e.clientX-this._dragState.dragStart.x;const i=(this._recorder.injectedScript.window.innerWidth-this._measure.width)/2-10;return this._offsetX=Math.max(-i,Math.min(i,this._offsetX)),this._updateVisualPosition(),this._recorder.setOverlayState({offsetX:this._offsetX}),Ge(e),!0}return!1}onMouseUp(e){return this._dragState?(Ge(e),!0):!1}onClick(e){return this._dragState?(this._dragState=void 0,Ge(e),!0):!1}onDblClick(e){return!1}}class IA{constructor(e,i){var r,a;this._listeners=[],this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",this.state={mode:"none",testIdAttributeName:"data-testid",language:"javascript",overlay:{offsetX:0}},this._delegate={},this.document=e.document,this.injectedScript=e,this.highlight=e.createHighlight(),this._tools={none:new Yb,standby:new Yb,inspecting:new Sh(this,!1),recording:(i==null?void 0:i.recorderMode)==="api"?new qA(this):new BA(this),"recording-inspecting":new Sh(this,!1),assertingText:new wh(this,"text"),assertingVisibility:new Sh(this,!0),assertingValue:new wh(this,"value"),assertingSnapshot:new wh(this,"snapshot")},this._currentTool=this._tools.none,(a=(r=this._currentTool).install)==null||a.call(r),e.window.top===e.window&&!(i!=null&&i.hideToolbar)&&(this.overlay=new $A(this),this.overlay.setUIState(this.state)),this._stylesheet=new e.window.CSSStyleSheet,this._stylesheet.replaceSync(`
      body[data-pw-cursor=pointer] *, body[data-pw-cursor=pointer] *::after { cursor: pointer !important; }
      body[data-pw-cursor=text] *, body[data-pw-cursor=text] *::after { cursor: text !important; }
    `),this.installListeners(),e.utils.cacheNormalizedWhitespaces(),e.isUnderTest&&console.error("Recorder script ready for test"),e.consoleApi.install()}installListeners(){var r,a,o;Zv(this._listeners),this._listeners=[Ie(this.document,"click",u=>this._onClick(u),!0),Ie(this.document,"auxclick",u=>this._onClick(u),!0),Ie(this.document,"dblclick",u=>this._onDblClick(u),!0),Ie(this.document,"contextmenu",u=>this._onContextMenu(u),!0),Ie(this.document,"dragstart",u=>this._onDragStart(u),!0),Ie(this.document,"input",u=>this._onInput(u),!0),Ie(this.document,"keydown",u=>this._onKeyDown(u),!0),Ie(this.document,"keyup",u=>this._onKeyUp(u),!0),Ie(this.document,"pointerdown",u=>this._onPointerDown(u),!0),Ie(this.document,"pointerup",u=>this._onPointerUp(u),!0),Ie(this.document,"mousedown",u=>this._onMouseDown(u),!0),Ie(this.document,"mouseup",u=>this._onMouseUp(u),!0),Ie(this.document,"mousemove",u=>this._onMouseMove(u),!0),Ie(this.document,"mouseleave",u=>this._onMouseLeave(u),!0),Ie(this.document,"mouseenter",u=>this._onMouseEnter(u),!0),Ie(this.document,"focus",u=>this._onFocus(u),!0),Ie(this.document,"scroll",u=>this._onScroll(u),!0)],this.highlight.install();let e;const i=()=>{this.highlight.install(),e=this.injectedScript.utils.builtins.setTimeout(i,500)};e=this.injectedScript.utils.builtins.setTimeout(i,500),this._listeners.push(()=>this.injectedScript.utils.builtins.clearTimeout(e)),this.highlight.appendChild(Wv(this.document,HA)),(r=this.overlay)==null||r.install(),(o=(a=this._currentTool)==null?void 0:a.install)==null||o.call(a),this.document.adoptedStyleSheets.push(this._stylesheet)}_switchCurrentTool(){var r,a,o,u,f,d;const e=this._tools[this.state.mode];if(e===this._currentTool)return;(a=(r=this._currentTool).uninstall)==null||a.call(r),this.clearHighlight(),this._currentTool=e,(u=(o=this._currentTool).install)==null||u.call(o);const i=(f=e.cursor)==null?void 0:f.call(e);i&&((d=this.injectedScript.document.body)==null||d.setAttribute("data-pw-cursor",i))}setUIState(e,i){var o;this._delegate=i,e.actionPoint&&this.state.actionPoint&&e.actionPoint.x===this.state.actionPoint.x&&e.actionPoint.y===this.state.actionPoint.y||!e.actionPoint&&!this.state.actionPoint||(e.actionPoint?this.highlight.showActionPoint(e.actionPoint.x,e.actionPoint.y):this.highlight.hideActionPoint()),this.state=e,this.highlight.setLanguage(e.language),this._switchCurrentTool(),(o=this.overlay)==null||o.setUIState(e);let r="noop";if(e.actionSelector!==this._lastHighlightedSelector){const u=e.actionSelector?KA(this.injectedScript,e.language,e.actionSelector,this.document):null;r=u!=null&&u.length?u:"clear",this._lastHighlightedSelector=u!=null&&u.length?e.actionSelector:void 0}const a=JSON.stringify(e.ariaTemplate);if(this._lastHighlightedAriaTemplateJSON!==a){const u=e.ariaTemplate?this.injectedScript.getAllElementsMatchingExpectAriaTemplate(this.document,e.ariaTemplate):[];if(u.length){const f=u.length>1?mn.multiple:mn.single;r=u.map(d=>({element:d,color:f})),this._lastHighlightedAriaTemplateJSON=a}else this._lastHighlightedSelector||(r="clear"),this._lastHighlightedAriaTemplateJSON="undefined"}r==="clear"?this.highlight.clearHighlight():r!=="noop"&&this.highlight.updateHighlight(r)}clearHighlight(){this.updateHighlight(null,!1)}_onClick(e){var i,r,a;e.isTrusted&&((i=this.overlay)!=null&&i.onClick(e)||this._ignoreOverlayEvent(e)||(a=(r=this._currentTool).onClick)==null||a.call(r,e))}_onDblClick(e){var i,r,a;e.isTrusted&&((i=this.overlay)!=null&&i.onDblClick(e)||this._ignoreOverlayEvent(e)||(a=(r=this._currentTool).onDblClick)==null||a.call(r,e))}_onContextMenu(e){var i,r;e.isTrusted&&((r=(i=this._currentTool).onContextMenu)==null||r.call(i,e))}_onDragStart(e){var i,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(i=this._currentTool).onDragStart)==null||r.call(i,e))}_onPointerDown(e){var i,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(i=this._currentTool).onPointerDown)==null||r.call(i,e))}_onPointerUp(e){var i,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(i=this._currentTool).onPointerUp)==null||r.call(i,e))}_onMouseDown(e){var i,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(i=this._currentTool).onMouseDown)==null||r.call(i,e))}_onMouseUp(e){var i,r,a;e.isTrusted&&((i=this.overlay)!=null&&i.onMouseUp(e)||this._ignoreOverlayEvent(e)||(a=(r=this._currentTool).onMouseUp)==null||a.call(r,e))}_onMouseMove(e){var i,r,a;e.isTrusted&&((i=this.overlay)!=null&&i.onMouseMove(e)||this._ignoreOverlayEvent(e)||(a=(r=this._currentTool).onMouseMove)==null||a.call(r,e))}_onMouseEnter(e){var i,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(i=this._currentTool).onMouseEnter)==null||r.call(i,e))}_onMouseLeave(e){var i,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(i=this._currentTool).onMouseLeave)==null||r.call(i,e))}_onFocus(e){var i,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(i=this._currentTool).onFocus)==null||r.call(i,e))}_onScroll(e){var i,r;e.isTrusted&&(this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",this.highlight.hideActionPoint(),(r=(i=this._currentTool).onScroll)==null||r.call(i,e))}_onInput(e){var i,r;this._ignoreOverlayEvent(e)||(r=(i=this._currentTool).onInput)==null||r.call(i,e)}_onKeyDown(e){var i,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(i=this._currentTool).onKeyDown)==null||r.call(i,e))}_onKeyUp(e){var i,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(i=this._currentTool).onKeyUp)==null||r.call(i,e))}updateHighlight(e,i){this._lastHighlightedSelector=void 0,this._lastHighlightedAriaTemplateJSON="undefined",this._updateHighlight(e,i)}_updateHighlight(e,i){var a,o;let r=e==null?void 0:e.tooltipText;r===void 0&&(e!=null&&e.selector)&&(r=this.injectedScript.utils.asLocator(this.state.language,e.selector)),e?this.highlight.updateHighlight(e.elements.map(u=>({element:u,color:e.color,tooltipText:r}))):this.highlight.clearHighlight(),i&&((o=(a=this._delegate).highlightUpdated)==null||o.call(a))}_ignoreOverlayEvent(e){return e.composedPath().some(i=>(i.nodeName||"").toLowerCase()==="x-pw-glass")}deepEventTarget(e){var i;for(const r of e.composedPath())if(!((i=this.overlay)!=null&&i.contains(r)))return r;return e.composedPath()[0]}setMode(e){var i,r;(r=(i=this._delegate).setMode)==null||r.call(i,e)}_captureAutoExpectSnapshot(){const e=this.injectedScript.document.documentElement;return e?this.injectedScript.utils.generateAriaTree(e,{mode:"autoexpect"}):void 0}async performAction(e){var r,a,o;const i=this._lastActionAutoexpectSnapshot;if(this._lastActionAutoexpectSnapshot=this._captureAutoExpectSnapshot(),!XA(e)&&this._lastActionAutoexpectSnapshot){const u=this.injectedScript.utils.findNewElement(i==null?void 0:i.root,(r=this._lastActionAutoexpectSnapshot)==null?void 0:r.root);e.preconditionSelector=u?this.injectedScript.generateSelector(u,{testIdAttributeName:this.state.testIdAttributeName}).selector:void 0,e.preconditionSelector===e.selector&&(e.preconditionSelector=void 0)}await((o=(a=this._delegate).performAction)==null?void 0:o.call(a,e).catch(()=>{}))}async recordAction(e){var i,r;this._lastActionAutoexpectSnapshot=this._captureAutoExpectSnapshot(),await((r=(i=this._delegate).recordAction)==null?void 0:r.call(i,e))}setOverlayState(e){var i,r;(r=(i=this._delegate).setOverlayState)==null||r.call(i,e)}elementPicked(e,i){var a,o;const r=this.injectedScript.ariaSnapshot(i.elements[0],{mode:"default"});(o=(a=this._delegate).elementPicked)==null||o.call(a,{selector:e,ariaSnapshot:r})}}let Pv=class{constructor(e){this._dialogElement=null,this._recorder=e}isShowing(){return!!this._dialogElement}show(e){const i=this._recorder.document.createElement("x-pw-tool-item");i.title="Accept",i.classList.add("accept"),i.appendChild(this._recorder.document.createElement("x-div")),i.addEventListener("click",()=>{var f;return(f=e.onCommit)==null?void 0:f.call(e)});const r=this._recorder.document.createElement("x-pw-tool-item");r.title="Close",r.classList.add("cancel"),r.appendChild(this._recorder.document.createElement("x-div")),r.addEventListener("click",()=>{var f;this.close(),(f=e.onCancel)==null||f.call(e)}),this._dialogElement=this._recorder.document.createElement("x-pw-dialog"),e.autosize&&this._dialogElement.classList.add("autosize"),this._keyboardListener=f=>{var d;if(f.key==="Escape"){this.close(),(d=e.onCancel)==null||d.call(e);return}if(e.onCommit&&f.key==="Enter"&&(f.ctrlKey||f.metaKey)){this._dialogElement&&e.onCommit();return}},this._onGlassPaneClickHandler=f=>{var d;this.close(),(d=e.onCancel)==null||d.call(e)},this._dialogElement.addEventListener("click",f=>f.stopPropagation());const a=this._recorder.document.createElement("x-pw-tools-list"),o=this._recorder.document.createElement("label");o.textContent=e.label,a.appendChild(o),a.appendChild(this._recorder.document.createElement("x-spacer")),e.onCommit&&a.appendChild(i),a.appendChild(r),this._dialogElement.appendChild(a);const u=this._recorder.document.createElement("x-pw-dialog-body");return u.appendChild(e.body),this._dialogElement.appendChild(u),this._recorder.highlight.appendChild(this._dialogElement),this._recorder.highlight.onGlassPaneClick(this._onGlassPaneClickHandler),this._recorder.document.addEventListener("keydown",this._keyboardListener,!0),this._dialogElement}moveTo(e,i){this._dialogElement&&(this._dialogElement.style.top=e+"px",this._dialogElement.style.left=i+"px")}close(){this._dialogElement&&(this._dialogElement.remove(),this._recorder.highlight.offGlassPaneClick(this._onGlassPaneClickHandler),this._recorder.document.removeEventListener("keydown",this._keyboardListener),this._dialogElement=null)}};function VA(n){let e=n.activeElement;for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function Tr(n){return(n.altKey?1:0)|(n.ctrlKey?2:0)|(n.metaKey?4:0)|(n.shiftKey?8:0)}function Yh(n){switch(n.which){case 1:return"left";case 2:return"middle";case 3:return"right"}return"left"}function Wa(n){if(n.target.nodeName==="CANVAS")return{x:n.offsetX,y:n.offsetY}}function Ge(n){n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation()}function el(n){if(!n||n.nodeName!=="INPUT")return null;const e=n;return["checkbox","radio"].includes(e.type)?e:null}function tl(n){return!n||n.nodeName!=="INPUT"?!1:n.type.toLowerCase()==="range"}const GA=new Set(["color","date","datetime-local","file","month","range","time","week"]);function Jv(n){const e=n.nodeName;return!!(e==="SELECT"||e==="OPTION"||e==="INPUT"&&GA.has(n.type))}function Ie(n,e,i,r){return n.addEventListener(e,i,r),()=>{n.removeEventListener(e,i,r)}}function Zv(n){for(const e of n)e();n.splice(0,n.length)}function KA(n,e,i,r){try{const a=n.parseSelector(i),o=n.querySelectorAll(a,r),u=o.length>1?mn.multiple:mn.single,f=n.utils.asLocator(e,i);return o.map((d,g)=>{const m=o.length>1?` [${g+1} of ${o.length}]`:"";return{element:d,color:u,tooltipText:f+m}})}catch{return[]}}function Wv(n,{tagName:e,attrs:i,children:r}){const a=n.createElementNS("http://www.w3.org/2000/svg",e);if(i)for(const[o,u]of Object.entries(i))a.setAttribute(o,u);if(r)for(const o of r)a.appendChild(Wv(n,o));return a}function XA(n){return n.name.startsWith("assert")}const YA="data:text/html;base64,"+btoa("<body></body><style>body { color-scheme: light dark; background: light-dark(white, #333) }</style>");function FA(n,e){n=n.replace(/AriaRole\s*\.\s*([\w]+)/g,(o,u)=>u.toLowerCase()).replace(/(get_by_role|getByRole)\s*\(\s*(?:["'`])([^'"`]+)['"`]/g,(o,u,f)=>`${u}(${f.toLowerCase()}`);const i=[];let r="";for(let o=0;o<n.length;++o){const u=n[o];if(u!=='"'&&u!=="'"&&u!=="`"&&u!=="/"){r+=u;continue}const f=n[o-1]==="r"||n[o]==="/";++o;let d="";for(;o<n.length;){if(n[o]==="\\"){f?(n[o+1]!==u&&(d+=n[o]),++o,d+=n[o]):(++o,n[o]==="n"?d+=`
`:n[o]==="r"?d+="\r":n[o]==="t"?d+="	":d+=n[o]),++o;continue}if(n[o]!==u){d+=n[o++];continue}break}i.push({quote:u,text:d}),r+=(u==="/"?"r":"")+"$"+i.length}r=r.toLowerCase().replace(/get_by_alt_text/g,"getbyalttext").replace(/get_by_test_id/g,"getbytestid").replace(/get_by_([\w]+)/g,"getby$1").replace(/has_not_text/g,"hasnottext").replace(/has_text/g,"hastext").replace(/has_not/g,"hasnot").replace(/frame_locator/g,"framelocator").replace(/content_frame/g,"contentframe").replace(/[{}\s]/g,"").replace(/new\(\)/g,"").replace(/new[\w]+\.[\w]+options\(\)/g,"").replace(/\.set/g,",set").replace(/\.or_\(/g,"or(").replace(/\.and_\(/g,"and(").replace(/:/g,"=").replace(/,re\.ignorecase/g,"i").replace(/,pattern.case_insensitive/g,"i").replace(/,regexoptions.ignorecase/g,"i").replace(/re.compile\(([^)]+)\)/g,"$1").replace(/pattern.compile\(([^)]+)\)/g,"r$1").replace(/newregex\(([^)]+)\)/g,"r$1").replace(/string=/g,"=").replace(/regex=/g,"=").replace(/,,/g,",").replace(/,\)/g,")");const a=i.map(o=>o.quote).filter(o=>"'\"`".includes(o))[0];return{selector:eS(r,i,e),preferredQuote:a}}function Fb(n){return[...n.matchAll(/\$\d+/g)].length}function Qb(n,e){return n.replace(/\$(\d+)/g,(i,r)=>`$${r-e}`)}function eS(n,e,i){for(;;){const a=n.match(/filter\(,?(has=|hasnot=|sethas\(|sethasnot\()/);if(!a)break;const o=a.index+a[0].length;let u=0,f=o;for(;f<n.length&&(n[f]==="("?u++:n[f]===")"&&u--,!(u<0));f++);let d=n.substring(0,o),g=0;["sethas(","sethasnot("].includes(a[1])&&(g=1,d=d.replace(/sethas\($/,"has=").replace(/sethasnot\($/,"hasnot="));const m=Fb(n.substring(0,o)),y=Qb(n.substring(o,f),m),S=Fb(y),w=e.slice(m,m+S),E=JSON.stringify(eS(y,w,i));n=d.replace(/=$/,"2=")+`$${m+1}`+Qb(n.substring(f+g),S-1);const x=e.slice(0,m),_=e.slice(m+S);e=x.concat([{quote:'"',text:E}]).concat(_)}n=n.replace(/\,set([\w]+)\(([^)]+)\)/g,(a,o,u)=>","+o.toLowerCase()+"="+u.toLowerCase()).replace(/framelocator\(([^)]+)\)/g,"$1.internal:control=enter-frame").replace(/contentframe(\(\))?/g,"internal:control=enter-frame").replace(/locator\(([^)]+),hastext=([^),]+)\)/g,"locator($1).internal:has-text=$2").replace(/locator\(([^)]+),hasnottext=([^),]+)\)/g,"locator($1).internal:has-not-text=$2").replace(/locator\(([^)]+),hastext=([^),]+)\)/g,"locator($1).internal:has-text=$2").replace(/locator\(([^)]+)\)/g,"$1").replace(/getbyrole\(([^)]+)\)/g,"internal:role=$1").replace(/getbytext\(([^)]+)\)/g,"internal:text=$1").replace(/getbylabel\(([^)]+)\)/g,"internal:label=$1").replace(/getbytestid\(([^)]+)\)/g,`internal:testid=[${lv(i)}=$1]`).replace(/getby(placeholder|alt|title)(?:text)?\(([^)]+)\)/g,"internal:attr=[$1=$2]").replace(/first(\(\))?/g,"nth=0").replace(/last(\(\))?/g,"nth=-1").replace(/nth\(([^)]+)\)/g,"nth=$1").replace(/filter\(,?visible=true\)/g,"visible=true").replace(/filter\(,?visible=false\)/g,"visible=false").replace(/filter\(,?hastext=([^)]+)\)/g,"internal:has-text=$1").replace(/filter\(,?hasnottext=([^)]+)\)/g,"internal:has-not-text=$1").replace(/filter\(,?has2=([^)]+)\)/g,"internal:has=$1").replace(/filter\(,?hasnot2=([^)]+)\)/g,"internal:has-not=$1").replace(/,exact=false/g,"").replace(/(,name=\$\d+)(,description=\$\d+),exact=true/g,"$1s$2s").replace(/,exact=true/g,"s").replace(/,includehidden=/g,",include-hidden=").replace(/\,/g,"][");const r=n.split(".");for(let a=0;a<r.length-1;a++)if(r[a]==="internal:control=enter-frame"&&r[a+1].startsWith("nth=")){const[o]=r.splice(a,1);r.splice(a+1,0,o)}return r.map(a=>!a.startsWith("internal:")||a==="internal:control"?a.replace(/\$(\d+)/g,(o,u)=>e[+u-1].text):(a=a.includes("[")?a.replace(/\]/,"")+"]":a,a=a.replace(/(?:r)\$(\d+)(i)?/g,(o,u,f)=>{const d=e[+u-1];return a.startsWith("internal:attr")||a.startsWith("internal:testid")||a.startsWith("internal:role")?Ze(new RegExp(d.text),!1)+(f||""):Vt(new RegExp(d.text,f),!1)}).replace(/\$(\d+)(i|s)?/g,(o,u,f)=>{const d=e[+u-1];return a.startsWith("internal:has=")||a.startsWith("internal:has-not=")?d.text:a.startsWith("internal:testid")?Ze(d.text,!0):a.startsWith("internal:attr")||a.startsWith("internal:role")?Ze(d.text,f==="s"):Vt(d.text,f==="s")}),a)).join(" >> ")}function QA(n,e,i="data-testid"){try{return PA(n,e,i)}catch{return""}}function PA(n,e,i="data-testid"){try{return fl(e),e}catch{}const{selector:r,preferredQuote:a}=FA(e,i),o=V0(n,r,void 0,void 0,a),u=Pb(n,e);return o.some(f=>Pb(n,f)===u)?r:""}function Pb(n,e){return e=e.replace(/\s/g,""),n==="javascript"&&(e=e.replace(/\\?["`]/g,"'").replace(/,{}/g,"")),e}const JA=({url:n})=>b.jsxs("div",{className:"browser-frame-header",children:[b.jsxs("div",{className:"browser-traffic-lights",children:[b.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(242, 95, 88)"}}),b.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(251, 190, 60)"}}),b.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(88, 203, 66)"}})]}),b.jsxs("div",{className:"browser-frame-address-bar",title:n||"about:blank",children:[b.jsx("span",{className:"browser-frame-address",children:n||"about:blank"}),n&&b.jsx(ud,{value:n})]}),b.jsx("div",{style:{marginLeft:"auto"},children:b.jsxs("div",{children:[b.jsx("span",{className:"browser-frame-menu-bar"}),b.jsx("span",{className:"browser-frame-menu-bar"}),b.jsx("span",{className:"browser-frame-menu-bar"})]})})]}),Ud=Symbol.for("yaml.alias"),Fh=Symbol.for("yaml.document"),Di=Symbol.for("yaml.map"),tS=Symbol.for("yaml.pair"),jn=Symbol.for("yaml.scalar"),Rr=Symbol.for("yaml.seq"),bn=Symbol.for("yaml.node.type"),Hi=n=>!!n&&typeof n=="object"&&n[bn]===Ud,ms=n=>!!n&&typeof n=="object"&&n[bn]===Fh,Dr=n=>!!n&&typeof n=="object"&&n[bn]===Di,Ve=n=>!!n&&typeof n=="object"&&n[bn]===tS,ze=n=>!!n&&typeof n=="object"&&n[bn]===jn,zr=n=>!!n&&typeof n=="object"&&n[bn]===Rr;function Ke(n){if(n&&typeof n=="object")switch(n[bn]){case Di:case Rr:return!0}return!1}function Xe(n){if(n&&typeof n=="object")switch(n[bn]){case Ud:case Di:case jn:case Rr:return!0}return!1}const nS=n=>(ze(n)||Ke(n))&&!!n.anchor,Gt=Symbol("break visit"),iS=Symbol("skip children"),On=Symbol("remove node");function ys(n,e){const i=sS(e);ms(n)?Sr(null,n.contents,i,Object.freeze([n]))===On&&(n.contents=null):Sr(null,n,i,Object.freeze([]))}ys.BREAK=Gt;ys.SKIP=iS;ys.REMOVE=On;function Sr(n,e,i,r){const a=rS(n,e,i,r);if(Xe(a)||Ve(a))return aS(n,r,a),Sr(n,a,i,r);if(typeof a!="symbol"){if(Ke(e)){r=Object.freeze(r.concat(e));for(let o=0;o<e.items.length;++o){const u=Sr(o,e.items[o],i,r);if(typeof u=="number")o=u-1;else{if(u===Gt)return Gt;u===On&&(e.items.splice(o,1),o-=1)}}}else if(Ve(e)){r=Object.freeze(r.concat(e));const o=Sr("key",e.key,i,r);if(o===Gt)return Gt;o===On&&(e.key=null);const u=Sr("value",e.value,i,r);if(u===Gt)return Gt;u===On&&(e.value=null)}}return a}async function Ac(n,e){const i=sS(e);ms(n)?await wr(null,n.contents,i,Object.freeze([n]))===On&&(n.contents=null):await wr(null,n,i,Object.freeze([]))}Ac.BREAK=Gt;Ac.SKIP=iS;Ac.REMOVE=On;async function wr(n,e,i,r){const a=await rS(n,e,i,r);if(Xe(a)||Ve(a))return aS(n,r,a),wr(n,a,i,r);if(typeof a!="symbol"){if(Ke(e)){r=Object.freeze(r.concat(e));for(let o=0;o<e.items.length;++o){const u=await wr(o,e.items[o],i,r);if(typeof u=="number")o=u-1;else{if(u===Gt)return Gt;u===On&&(e.items.splice(o,1),o-=1)}}}else if(Ve(e)){r=Object.freeze(r.concat(e));const o=await wr("key",e.key,i,r);if(o===Gt)return Gt;o===On&&(e.key=null);const u=await wr("value",e.value,i,r);if(u===Gt)return Gt;u===On&&(e.value=null)}}return a}function sS(n){return typeof n=="object"&&(n.Collection||n.Node||n.Value)?Object.assign({Alias:n.Node,Map:n.Node,Scalar:n.Node,Seq:n.Node},n.Value&&{Map:n.Value,Scalar:n.Value,Seq:n.Value},n.Collection&&{Map:n.Collection,Seq:n.Collection},n):n}function rS(n,e,i,r){var a,o,u,f,d;if(typeof i=="function")return i(n,e,r);if(Dr(e))return(a=i.Map)==null?void 0:a.call(i,n,e,r);if(zr(e))return(o=i.Seq)==null?void 0:o.call(i,n,e,r);if(Ve(e))return(u=i.Pair)==null?void 0:u.call(i,n,e,r);if(ze(e))return(f=i.Scalar)==null?void 0:f.call(i,n,e,r);if(Hi(e))return(d=i.Alias)==null?void 0:d.call(i,n,e,r)}function aS(n,e,i){const r=e[e.length-1];if(Ke(r))r.items[n]=i;else if(Ve(r))n==="key"?r.key=i:r.value=i;else if(ms(r))r.contents=i;else{const a=Hi(r)?"alias":"scalar";throw new Error(`Cannot replace node with ${a} parent`)}}const ZA={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},WA=n=>n.replace(/[!,[\]{}]/g,e=>ZA[e]);class Ot{constructor(e,i){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Ot.defaultYaml,e),this.tags=Object.assign({},Ot.defaultTags,i)}clone(){const e=new Ot(this.yaml,this.tags);return e.docStart=this.docStart,e}atDocument(){const e=new Ot(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Ot.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Ot.defaultTags);break}return e}add(e,i){this.atNextDocument&&(this.yaml={explicit:Ot.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Ot.defaultTags),this.atNextDocument=!1);const r=e.trim().split(/[ \t]+/),a=r.shift();switch(a){case"%TAG":{if(r.length!==2&&(i(0,"%TAG directive should contain exactly two parts"),r.length<2))return!1;const[o,u]=r;return this.tags[o]=u,!0}case"%YAML":{if(this.yaml.explicit=!0,r.length!==1)return i(0,"%YAML directive should contain exactly one part"),!1;const[o]=r;if(o==="1.1"||o==="1.2")return this.yaml.version=o,!0;{const u=/^\d+\.\d+$/.test(o);return i(6,`Unsupported YAML version ${o}`,u),!1}}default:return i(0,`Unknown directive ${a}`,!0),!1}}tagName(e,i){if(e==="!")return"!";if(e[0]!=="!")return i(`Not a valid tag: ${e}`),null;if(e[1]==="<"){const u=e.slice(2,-1);return u==="!"||u==="!!"?(i(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==">"&&i("Verbatim tags must end with a >"),u)}const[,r,a]=e.match(/^(.*!)([^!]*)$/s);a||i(`The ${e} tag has no suffix`);const o=this.tags[r];if(o)try{return o+decodeURIComponent(a)}catch(u){return i(String(u)),null}return r==="!"?e:(i(`Could not resolve tag: ${e}`),null)}tagString(e){for(const[i,r]of Object.entries(this.tags))if(e.startsWith(r))return i+WA(e.substring(r.length));return e[0]==="!"?e:`!<${e}>`}toString(e){const i=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],r=Object.entries(this.tags);let a;if(e&&r.length>0&&Xe(e.contents)){const o={};ys(e.contents,(u,f)=>{Xe(f)&&f.tag&&(o[f.tag]=!0)}),a=Object.keys(o)}else a=[];for(const[o,u]of r)o==="!!"&&u==="tag:yaml.org,2002:"||(!e||a.some(f=>f.startsWith(u)))&&i.push(`%TAG ${o} ${u}`);return i.join(`
`)}}Ot.defaultYaml={explicit:!1,version:"1.2"};Ot.defaultTags={"!!":"tag:yaml.org,2002:"};function lS(n){if(/[\x00-\x19\s,[\]{}]/.test(n)){const i=`Anchor must not contain whitespace or control characters: ${JSON.stringify(n)}`;throw new Error(i)}return!0}function oS(n){const e=new Set;return ys(n,{Value(i,r){r.anchor&&e.add(r.anchor)}}),e}function cS(n,e){for(let i=1;;++i){const r=`${n}${i}`;if(!e.has(r))return r}}function eC(n,e){const i=[],r=new Map;let a=null;return{onAnchor:o=>{i.push(o),a??(a=oS(n));const u=cS(e,a);return a.add(u),u},setAnchors:()=>{for(const o of i){const u=r.get(o);if(typeof u=="object"&&u.anchor&&(ze(u.node)||Ke(u.node)))u.node.anchor=u.anchor;else{const f=new Error("Failed to resolve repeated object (this should not happen)");throw f.source=o,f}}},sourceObjects:r}}function xr(n,e,i,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let a=0,o=r.length;a<o;++a){const u=r[a],f=xr(n,r,String(a),u);f===void 0?delete r[a]:f!==u&&(r[a]=f)}else if(r instanceof Map)for(const a of Array.from(r.keys())){const o=r.get(a),u=xr(n,r,a,o);u===void 0?r.delete(a):u!==o&&r.set(a,u)}else if(r instanceof Set)for(const a of Array.from(r)){const o=xr(n,r,a,a);o===void 0?r.delete(a):o!==a&&(r.delete(a),r.add(o))}else for(const[a,o]of Object.entries(r)){const u=xr(n,r,a,o);u===void 0?delete r[a]:u!==o&&(r[a]=u)}return n.call(e,i,r)}function yn(n,e,i){if(Array.isArray(n))return n.map((r,a)=>yn(r,String(a),i));if(n&&typeof n.toJSON=="function"){if(!i||!nS(n))return n.toJSON(e,i);const r={aliasCount:0,count:1,res:void 0};i.anchors.set(n,r),i.onCreate=o=>{r.res=o,delete i.onCreate};const a=n.toJSON(e,i);return i.onCreate&&i.onCreate(a),a}return typeof n=="bigint"&&!(i!=null&&i.keep)?Number(n):n}class Hd{constructor(e){Object.defineProperty(this,bn,{value:e})}clone(){const e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:i,maxAliasCount:r,onAnchor:a,reviver:o}={}){if(!ms(e))throw new TypeError("A document argument is required");const u={anchors:new Map,doc:e,keep:!0,mapAsMap:i===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},f=yn(this,"",u);if(typeof a=="function")for(const{count:d,res:g}of u.anchors.values())a(g,d);return typeof o=="function"?xr(o,{"":f},"",f):f}}class Cc extends Hd{constructor(e){super(Ud),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e,i){let r;i!=null&&i.aliasResolveCache?r=i.aliasResolveCache:(r=[],ys(e,{Node:(o,u)=>{(Hi(u)||nS(u))&&r.push(u)}}),i&&(i.aliasResolveCache=r));let a;for(const o of r){if(o===this)break;o.anchor===this.source&&(a=o)}return a}toJSON(e,i){if(!i)return{source:this.source};const{anchors:r,doc:a,maxAliasCount:o}=i,u=this.resolve(a,i);if(!u){const d=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(d)}let f=r.get(u);if(f||(yn(u,null,i),f=r.get(u)),(f==null?void 0:f.res)===void 0){const d="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(d)}if(o>=0&&(f.count+=1,f.aliasCount===0&&(f.aliasCount=ec(a,u,r)),f.count*f.aliasCount>o)){const d="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(d)}return f.res}toString(e,i,r){const a=`*${this.source}`;if(e){if(lS(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const o=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(o)}if(e.implicitKey)return`${a} `}return a}}function ec(n,e,i){if(Hi(e)){const r=e.resolve(n),a=i&&r&&i.get(r);return a?a.count*a.aliasCount:0}else if(Ke(e)){let r=0;for(const a of e.items){const o=ec(n,a,i);o>r&&(r=o)}return r}else if(Ve(e)){const r=ec(n,e.key,i),a=ec(n,e.value,i);return Math.max(r,a)}return 1}const uS=n=>!n||typeof n!="function"&&typeof n!="object";class de extends Hd{constructor(e){super(jn),this.value=e}toJSON(e,i){return i!=null&&i.keep?this.value:yn(this.value,e,i)}toString(){return String(this.value)}}de.BLOCK_FOLDED="BLOCK_FOLDED";de.BLOCK_LITERAL="BLOCK_LITERAL";de.PLAIN="PLAIN";de.QUOTE_DOUBLE="QUOTE_DOUBLE";de.QUOTE_SINGLE="QUOTE_SINGLE";const tC="tag:yaml.org,2002:";function nC(n,e,i){if(e){const r=i.filter(o=>o.tag===e),a=r.find(o=>!o.format)??r[0];if(!a)throw new Error(`Tag ${e} not found`);return a}return i.find(r=>{var a;return((a=r.identify)==null?void 0:a.call(r,n))&&!r.format})}function ll(n,e,i){var y,S,w;if(ms(n)&&(n=n.contents),Xe(n))return n;if(Ve(n)){const E=(S=(y=i.schema[Di]).createNode)==null?void 0:S.call(y,i.schema,null,i);return E.items.push(n),E}(n instanceof String||n instanceof Number||n instanceof Boolean||typeof BigInt<"u"&&n instanceof BigInt)&&(n=n.valueOf());const{aliasDuplicateObjects:r,onAnchor:a,onTagObj:o,schema:u,sourceObjects:f}=i;let d;if(r&&n&&typeof n=="object"){if(d=f.get(n),d)return d.anchor??(d.anchor=a(n)),new Cc(d.anchor);d={anchor:null,node:null},f.set(n,d)}e!=null&&e.startsWith("!!")&&(e=tC+e.slice(2));let g=nC(n,e,u.tags);if(!g){if(n&&typeof n.toJSON=="function"&&(n=n.toJSON()),!n||typeof n!="object"){const E=new de(n);return d&&(d.node=E),E}g=n instanceof Map?u[Di]:Symbol.iterator in Object(n)?u[Rr]:u[Di]}o&&(o(g),delete i.onTagObj);const m=g!=null&&g.createNode?g.createNode(i.schema,n,i):typeof((w=g==null?void 0:g.nodeClass)==null?void 0:w.from)=="function"?g.nodeClass.from(i.schema,n,i):new de(n);return e?m.tag=e:g.default||(m.tag=g.tag),d&&(d.node=m),m}function dc(n,e,i){let r=i;for(let a=e.length-1;a>=0;--a){const o=e[a];if(typeof o=="number"&&Number.isInteger(o)&&o>=0){const u=[];u[o]=r,r=u}else r=new Map([[o,r]])}return ll(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:n,sourceObjects:new Map})}const Ya=n=>n==null||typeof n=="object"&&!!n[Symbol.iterator]().next().done;class fS extends Hd{constructor(e,i){super(e),Object.defineProperty(this,"schema",{value:i,configurable:!0,enumerable:!1,writable:!0})}clone(e){const i=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(i.schema=e),i.items=i.items.map(r=>Xe(r)||Ve(r)?r.clone(e):r),this.range&&(i.range=this.range.slice()),i}addIn(e,i){if(Ya(e))this.add(i);else{const[r,...a]=e,o=this.get(r,!0);if(Ke(o))o.addIn(a,i);else if(o===void 0&&this.schema)this.set(r,dc(this.schema,a,i));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${a}`)}}deleteIn(e){const[i,...r]=e;if(r.length===0)return this.delete(i);const a=this.get(i,!0);if(Ke(a))return a.deleteIn(r);throw new Error(`Expected YAML collection at ${i}. Remaining path: ${r}`)}getIn(e,i){const[r,...a]=e,o=this.get(r,!0);return a.length===0?!i&&ze(o)?o.value:o:Ke(o)?o.getIn(a,i):void 0}hasAllNullValues(e){return this.items.every(i=>{if(!Ve(i))return!1;const r=i.value;return r==null||e&&ze(r)&&r.value==null&&!r.commentBefore&&!r.comment&&!r.tag})}hasIn(e){const[i,...r]=e;if(r.length===0)return this.has(i);const a=this.get(i,!0);return Ke(a)?a.hasIn(r):!1}setIn(e,i){const[r,...a]=e;if(a.length===0)this.set(r,i);else{const o=this.get(r,!0);if(Ke(o))o.setIn(a,i);else if(o===void 0&&this.schema)this.set(r,dc(this.schema,a,i));else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${a}`)}}}const iC=n=>n.replace(/^(?!$)(?: $)?/gm,"#");function si(n,e){return/^\n+$/.test(n)?n.substring(1):e?n.replace(/^(?! *$)/gm,e):n}const us=(n,e,i)=>n.endsWith(`
`)?si(i,e):i.includes(`
`)?`
`+si(i,e):(n.endsWith(" ")?"":" ")+i,hS="flow",Qh="block",tc="quoted";function Nc(n,e,i="flow",{indentAtStart:r,lineWidth:a=80,minContentWidth:o=20,onFold:u,onOverflow:f}={}){if(!a||a<0)return n;a<o&&(o=0);const d=Math.max(1+o,1+a-e.length);if(n.length<=d)return n;const g=[],m={};let y=a-e.length;typeof r=="number"&&(r>a-Math.max(2,o)?g.push(0):y=a-r);let S,w,E=!1,x=-1,_=-1,A=-1;i===Qh&&(x=Jb(n,x,e.length),x!==-1&&(y=x+d));for(let H;H=n[x+=1];){if(i===tc&&H==="\\"){switch(_=x,n[x+1]){case"x":x+=3;break;case"u":x+=5;break;case"U":x+=9;break;default:x+=1}A=x}if(H===`
`)i===Qh&&(x=Jb(n,x,e.length)),y=x+e.length+d,S=void 0;else{if(H===" "&&w&&w!==" "&&w!==`
`&&w!=="	"){const V=n[x+1];V&&V!==" "&&V!==`
`&&V!=="	"&&(S=x)}if(x>=y)if(S)g.push(S),y=S+d,S=void 0;else if(i===tc){for(;w===" "||w==="	";)w=H,H=n[x+=1],E=!0;const V=x>A+1?x-2:_-1;if(m[V])return n;g.push(V),m[V]=!0,y=V+d,S=void 0}else E=!0}w=H}if(E&&f&&f(),g.length===0)return n;u&&u();let C=n.slice(0,g[0]);for(let H=0;H<g.length;++H){const V=g[H],K=g[H+1]||n.length;V===0?C=`
${e}${n.slice(0,K)}`:(i===tc&&m[V]&&(C+=`${n[V]}\\`),C+=`
${e}${n.slice(V+1,K)}`)}return C}function Jb(n,e,i){let r=e,a=e+1,o=n[a];for(;o===" "||o==="	";)if(e<a+i)o=n[++e];else{do o=n[++e];while(o&&o!==`
`);r=e,a=e+1,o=n[a]}return r}const kc=(n,e)=>({indentAtStart:e?n.indent.length:n.indentAtStart,lineWidth:n.options.lineWidth,minContentWidth:n.options.minContentWidth}),Mc=n=>/^(%|---|\.\.\.)/m.test(n);function sC(n,e,i){if(!e||e<0)return!1;const r=e-i,a=n.length;if(a<=r)return!1;for(let o=0,u=0;o<a;++o)if(n[o]===`
`){if(o-u>r)return!0;if(u=o+1,a-u<=r)return!1}return!0}function nl(n,e){const i=JSON.stringify(n);if(e.options.doubleQuotedAsJSON)return i;const{implicitKey:r}=e,a=e.options.doubleQuotedMinMultiLineLength,o=e.indent||(Mc(n)?"  ":"");let u="",f=0;for(let d=0,g=i[d];g;g=i[++d])if(g===" "&&i[d+1]==="\\"&&i[d+2]==="n"&&(u+=i.slice(f,d)+"\\ ",d+=1,f=d,g="\\"),g==="\\")switch(i[d+1]){case"u":{u+=i.slice(f,d);const m=i.substr(d+2,4);switch(m){case"0000":u+="\\0";break;case"0007":u+="\\a";break;case"000b":u+="\\v";break;case"001b":u+="\\e";break;case"0085":u+="\\N";break;case"00a0":u+="\\_";break;case"2028":u+="\\L";break;case"2029":u+="\\P";break;default:m.substr(0,2)==="00"?u+="\\x"+m.substr(2):u+=i.substr(d,6)}d+=5,f=d+1}break;case"n":if(r||i[d+2]==='"'||i.length<a)d+=1;else{for(u+=i.slice(f,d)+`

`;i[d+2]==="\\"&&i[d+3]==="n"&&i[d+4]!=='"';)u+=`
`,d+=2;u+=o,i[d+2]===" "&&(u+="\\"),d+=1,f=d+1}break;default:d+=1}return u=f?u+i.slice(f):i,r?u:Nc(u,o,tc,kc(e,!1))}function Ph(n,e){if(e.options.singleQuote===!1||e.implicitKey&&n.includes(`
`)||/[ \t]\n|\n[ \t]/.test(n))return nl(n,e);const i=e.indent||(Mc(n)?"  ":""),r="'"+n.replace(/'/g,"''").replace(/\n+/g,`$&
${i}`)+"'";return e.implicitKey?r:Nc(r,i,hS,kc(e,!1))}function _r(n,e){const{singleQuote:i}=e.options;let r;if(i===!1)r=nl;else{const a=n.includes('"'),o=n.includes("'");a&&!o?r=Ph:o&&!a?r=nl:r=i?Ph:nl}return r(n,e)}let Jh;try{Jh=new RegExp(`(^|(?<!
))
+(?!
|$)`,"g")}catch{Jh=/\n+(?!\n|$)/g}function nc({comment:n,type:e,value:i},r,a,o){const{blockQuote:u,commentString:f,lineWidth:d}=r.options;if(!u||/\n[\t ]+$/.test(i))return _r(i,r);const g=r.indent||(r.forceBlockIndent||Mc(i)?"  ":""),m=u==="literal"?!0:u==="folded"||e===de.BLOCK_FOLDED?!1:e===de.BLOCK_LITERAL?!0:!sC(i,d,g.length);if(!i)return m?`|
`:`>
`;let y,S;for(S=i.length;S>0;--S){const K=i[S-1];if(K!==`
`&&K!=="	"&&K!==" ")break}let w=i.substring(S);const E=w.indexOf(`
`);E===-1?y="-":i===w||E!==w.length-1?(y="+",o&&o()):y="",w&&(i=i.slice(0,-w.length),w[w.length-1]===`
`&&(w=w.slice(0,-1)),w=w.replace(Jh,`$&${g}`));let x=!1,_,A=-1;for(_=0;_<i.length;++_){const K=i[_];if(K===" ")x=!0;else if(K===`
`)A=_;else break}let C=i.substring(0,A<_?A+1:_);C&&(i=i.substring(C.length),C=C.replace(/\n+/g,`$&${g}`));let V=(x?g?"2":"1":"")+y;if(n&&(V+=" "+f(n.replace(/ ?[\r\n]+/g," ")),a&&a()),!m){const K=i.replace(/\n+/g,`
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${g}`);let Q=!1;const j=kc(r,!0);u!=="folded"&&e!==de.BLOCK_FOLDED&&(j.onOverflow=()=>{Q=!0});const I=Nc(`${C}${K}${w}`,g,Qh,j);if(!Q)return`>${V}
${g}${I}`}return i=i.replace(/\n+/g,`$&${g}`),`|${V}
${g}${C}${i}${w}`}function rC(n,e,i,r){const{type:a,value:o}=n,{actualString:u,implicitKey:f,indent:d,indentStep:g,inFlow:m}=e;if(f&&o.includes(`
`)||m&&/[[\]{},]/.test(o))return _r(o,e);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return f||m||!o.includes(`
`)?_r(o,e):nc(n,e,i,r);if(!f&&!m&&a!==de.PLAIN&&o.includes(`
`))return nc(n,e,i,r);if(Mc(o)){if(d==="")return e.forceBlockIndent=!0,nc(n,e,i,r);if(f&&d===g)return _r(o,e)}const y=o.replace(/\n+/g,`$&
${d}`);if(u){const S=x=>{var _;return x.default&&x.tag!=="tag:yaml.org,2002:str"&&((_=x.test)==null?void 0:_.test(y))},{compat:w,tags:E}=e.doc.schema;if(E.some(S)||w!=null&&w.some(S))return _r(o,e)}return f?y:Nc(y,d,hS,kc(e,!1))}function pl(n,e,i,r){const{implicitKey:a,inFlow:o}=e,u=typeof n.value=="string"?n:Object.assign({},n,{value:String(n.value)});let{type:f}=n;f!==de.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(u.value)&&(f=de.QUOTE_DOUBLE);const d=m=>{switch(m){case de.BLOCK_FOLDED:case de.BLOCK_LITERAL:return a||o?_r(u.value,e):nc(u,e,i,r);case de.QUOTE_DOUBLE:return nl(u.value,e);case de.QUOTE_SINGLE:return Ph(u.value,e);case de.PLAIN:return rC(u,e,i,r);default:return null}};let g=d(f);if(g===null){const{defaultKeyType:m,defaultStringType:y}=e.options,S=a&&m||y;if(g=d(S),g===null)throw new Error(`Unsupported default string type ${S}`)}return g}function dS(n,e){const i=Object.assign({blockQuote:!0,commentString:iC,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},n.schema.toStringOptions,e);let r;switch(i.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:n,flowCollectionPadding:i.flowCollectionPadding?" ":"",indent:"",indentStep:typeof i.indent=="number"?" ".repeat(i.indent):"  ",inFlow:r,options:i}}function aC(n,e){var a;if(e.tag){const o=n.filter(u=>u.tag===e.tag);if(o.length>0)return o.find(u=>u.format===e.format)??o[0]}let i,r;if(ze(e)){r=e.value;let o=n.filter(u=>{var f;return(f=u.identify)==null?void 0:f.call(u,r)});if(o.length>1){const u=o.filter(f=>f.test);u.length>0&&(o=u)}i=o.find(u=>u.format===e.format)??o.find(u=>!u.format)}else r=e,i=n.find(o=>o.nodeClass&&r instanceof o.nodeClass);if(!i){const o=((a=r==null?void 0:r.constructor)==null?void 0:a.name)??(r===null?"null":typeof r);throw new Error(`Tag not resolved for ${o} value`)}return i}function lC(n,e,{anchors:i,doc:r}){if(!r.directives)return"";const a=[],o=(ze(n)||Ke(n))&&n.anchor;o&&lS(o)&&(i.add(o),a.push(`&${o}`));const u=n.tag??(e.default?null:e.tag);return u&&a.push(r.directives.tagString(u)),a.join(" ")}function Nr(n,e,i,r){var d;if(Ve(n))return n.toString(e,i,r);if(Hi(n)){if(e.doc.directives)return n.toString(e);if((d=e.resolvedAliases)!=null&&d.has(n))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(n):e.resolvedAliases=new Set([n]),n=n.resolve(e.doc)}let a;const o=Xe(n)?n:e.doc.createNode(n,{onTagObj:g=>a=g});a??(a=aC(e.doc.schema.tags,o));const u=lC(o,a,e);u.length>0&&(e.indentAtStart=(e.indentAtStart??0)+u.length+1);const f=typeof a.stringify=="function"?a.stringify(o,e,i,r):ze(o)?pl(o,e,i,r):o.toString(e,i,r);return u?ze(o)||f[0]==="{"||f[0]==="["?`${u} ${f}`:`${u}
${e.indent}${f}`:f}function oC({key:n,value:e},i,r,a){const{allNullValues:o,doc:u,indent:f,indentStep:d,options:{commentString:g,indentSeq:m,simpleKeys:y}}=i;let S=Xe(n)&&n.comment||null;if(y){if(S)throw new Error("With simple keys, key nodes cannot have comments");if(Ke(n)||!Xe(n)&&typeof n=="object"){const j="With simple keys, collection cannot be used as a key value";throw new Error(j)}}let w=!y&&(!n||S&&e==null&&!i.inFlow||Ke(n)||(ze(n)?n.type===de.BLOCK_FOLDED||n.type===de.BLOCK_LITERAL:typeof n=="object"));i=Object.assign({},i,{allNullValues:!1,implicitKey:!w&&(y||!o),indent:f+d});let E=!1,x=!1,_=Nr(n,i,()=>E=!0,()=>x=!0);if(!w&&!i.inFlow&&_.length>1024){if(y)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");w=!0}if(i.inFlow){if(o||e==null)return E&&r&&r(),_===""?"?":w?`? ${_}`:_}else if(o&&!y||e==null&&w)return _=`? ${_}`,S&&!E?_+=us(_,i.indent,g(S)):x&&a&&a(),_;E&&(S=null),w?(S&&(_+=us(_,i.indent,g(S))),_=`? ${_}
${f}:`):(_=`${_}:`,S&&(_+=us(_,i.indent,g(S))));let A,C,H;Xe(e)?(A=!!e.spaceBefore,C=e.commentBefore,H=e.comment):(A=!1,C=null,H=null,e&&typeof e=="object"&&(e=u.createNode(e))),i.implicitKey=!1,!w&&!S&&ze(e)&&(i.indentAtStart=_.length+1),x=!1,!m&&d.length>=2&&!i.inFlow&&!w&&zr(e)&&!e.flow&&!e.tag&&!e.anchor&&(i.indent=i.indent.substring(2));let V=!1;const K=Nr(e,i,()=>V=!0,()=>x=!0);let Q=" ";if(S||A||C){if(Q=A?`
`:"",C){const j=g(C);Q+=`
${si(j,i.indent)}`}K===""&&!i.inFlow?Q===`
`&&H&&(Q=`

`):Q+=`
${i.indent}`}else if(!w&&Ke(e)){const j=K[0],I=K.indexOf(`
`),O=I!==-1,P=i.inFlow??e.flow??e.items.length===0;if(O||!P){let J=!1;if(O&&(j==="&"||j==="!")){let $=K.indexOf(" ");j==="&"&&$!==-1&&$<I&&K[$+1]==="!"&&($=K.indexOf(" ",$+1)),($===-1||I<$)&&(J=!0)}J||(Q=`
${i.indent}`)}}else(K===""||K[0]===`
`)&&(Q="");return _+=Q+K,i.inFlow?V&&r&&r():H&&!V?_+=us(_,i.indent,g(H)):x&&a&&a(),_}function pS(n,e){(n==="debug"||n==="warn")&&console.warn(e)}const $o="<<",ri={identify:n=>n===$o||typeof n=="symbol"&&n.description===$o,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new de(Symbol($o)),{addToJSMap:gS}),stringify:()=>$o},cC=(n,e)=>(ri.identify(e)||ze(e)&&(!e.type||e.type===de.PLAIN)&&ri.identify(e.value))&&(n==null?void 0:n.doc.schema.tags.some(i=>i.tag===ri.tag&&i.default));function gS(n,e,i){if(i=n&&Hi(i)?i.resolve(n.doc):i,zr(i))for(const r of i.items)xh(n,e,r);else if(Array.isArray(i))for(const r of i)xh(n,e,r);else xh(n,e,i)}function xh(n,e,i){const r=n&&Hi(i)?i.resolve(n.doc):i;if(!Dr(r))throw new Error("Merge sources must be maps or map aliases");const a=r.toJSON(null,n,Map);for(const[o,u]of a)e instanceof Map?e.has(o)||e.set(o,u):e instanceof Set?e.add(o):Object.prototype.hasOwnProperty.call(e,o)||Object.defineProperty(e,o,{value:u,writable:!0,enumerable:!0,configurable:!0});return e}function mS(n,e,{key:i,value:r}){if(Xe(i)&&i.addToJSMap)i.addToJSMap(n,e,r);else if(cC(n,i))gS(n,e,r);else{const a=yn(i,"",n);if(e instanceof Map)e.set(a,yn(r,a,n));else if(e instanceof Set)e.add(a);else{const o=uC(i,a,n),u=yn(r,o,n);o in e?Object.defineProperty(e,o,{value:u,writable:!0,enumerable:!0,configurable:!0}):e[o]=u}}return e}function uC(n,e,i){if(e===null)return"";if(typeof e!="object")return String(e);if(Xe(n)&&(i!=null&&i.doc)){const r=dS(i.doc,{});r.anchors=new Set;for(const o of i.anchors.keys())r.anchors.add(o.anchor);r.inFlow=!0,r.inStringifyKey=!0;const a=n.toString(r);if(!i.mapKeyWarned){let o=JSON.stringify(a);o.length>40&&(o=o.substring(0,36)+'..."'),pS(i.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${o}. Set mapAsMap: true to use object keys.`),i.mapKeyWarned=!0}return a}return JSON.stringify(e)}function Bd(n,e,i){const r=ll(n,void 0,i),a=ll(e,void 0,i);return new Nt(r,a)}class Nt{constructor(e,i=null){Object.defineProperty(this,bn,{value:tS}),this.key=e,this.value=i}clone(e){let{key:i,value:r}=this;return Xe(i)&&(i=i.clone(e)),Xe(r)&&(r=r.clone(e)),new Nt(i,r)}toJSON(e,i){const r=i!=null&&i.mapAsMap?new Map:{};return mS(i,r,this)}toString(e,i,r){return e!=null&&e.doc?oC(this,e,i,r):JSON.stringify(this)}}function yS(n,e,i){return(e.inFlow??n.flow?hC:fC)(n,e,i)}function fC({comment:n,items:e},i,{blockItemPrefix:r,flowChars:a,itemIndent:o,onChompKeep:u,onComment:f}){const{indent:d,options:{commentString:g}}=i,m=Object.assign({},i,{indent:o,type:null});let y=!1;const S=[];for(let E=0;E<e.length;++E){const x=e[E];let _=null;if(Xe(x))!y&&x.spaceBefore&&S.push(""),pc(i,S,x.commentBefore,y),x.comment&&(_=x.comment);else if(Ve(x)){const C=Xe(x.key)?x.key:null;C&&(!y&&C.spaceBefore&&S.push(""),pc(i,S,C.commentBefore,y))}y=!1;let A=Nr(x,m,()=>_=null,()=>y=!0);_&&(A+=us(A,o,g(_))),y&&_&&(y=!1),S.push(r+A)}let w;if(S.length===0)w=a.start+a.end;else{w=S[0];for(let E=1;E<S.length;++E){const x=S[E];w+=x?`
${d}${x}`:`
`}}return n?(w+=`
`+si(g(n),d),f&&f()):y&&u&&u(),w}function hC({items:n},e,{flowChars:i,itemIndent:r}){const{indent:a,indentStep:o,flowCollectionPadding:u,options:{commentString:f}}=e;r+=o;const d=Object.assign({},e,{indent:r,inFlow:!0,type:null});let g=!1,m=0;const y=[];for(let E=0;E<n.length;++E){const x=n[E];let _=null;if(Xe(x))x.spaceBefore&&y.push(""),pc(e,y,x.commentBefore,!1),x.comment&&(_=x.comment);else if(Ve(x)){const C=Xe(x.key)?x.key:null;C&&(C.spaceBefore&&y.push(""),pc(e,y,C.commentBefore,!1),C.comment&&(g=!0));const H=Xe(x.value)?x.value:null;H?(H.comment&&(_=H.comment),H.commentBefore&&(g=!0)):x.value==null&&(C!=null&&C.comment)&&(_=C.comment)}_&&(g=!0);let A=Nr(x,d,()=>_=null);g||(g=y.length>m||A.includes(`
`)),E<n.length-1?A+=",":e.options.trailingComma&&(e.options.lineWidth>0&&(g||(g=y.reduce((C,H)=>C+H.length+2,2)+(A.length+2)>e.options.lineWidth)),g&&(A+=",")),_&&(A+=us(A,r,f(_))),y.push(A),m=y.length}const{start:S,end:w}=i;if(y.length===0)return S+w;if(!g){const E=y.reduce((x,_)=>x+_.length+2,2);g=e.options.lineWidth>0&&E>e.options.lineWidth}if(g){let E=S;for(const x of y)E+=x?`
${o}${a}${x}`:`
`;return`${E}
${a}${w}`}else return`${S}${u}${y.join(" ")}${u}${w}`}function pc({indent:n,options:{commentString:e}},i,r,a){if(r&&a&&(r=r.replace(/^\n+/,"")),r){const o=si(e(r),n);i.push(o.trimStart())}}function fs(n,e){const i=ze(e)?e.value:e;for(const r of n)if(Ve(r)&&(r.key===e||r.key===i||ze(r.key)&&r.key.value===i))return r}class nn extends fS{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(Di,e),this.items=[]}static from(e,i,r){const{keepUndefined:a,replacer:o}=r,u=new this(e),f=(d,g)=>{if(typeof o=="function")g=o.call(i,d,g);else if(Array.isArray(o)&&!o.includes(d))return;(g!==void 0||a)&&u.items.push(Bd(d,g,r))};if(i instanceof Map)for(const[d,g]of i)f(d,g);else if(i&&typeof i=="object")for(const d of Object.keys(i))f(d,i[d]);return typeof e.sortMapEntries=="function"&&u.items.sort(e.sortMapEntries),u}add(e,i){var u;let r;Ve(e)?r=e:!e||typeof e!="object"||!("key"in e)?r=new Nt(e,e==null?void 0:e.value):r=new Nt(e.key,e.value);const a=fs(this.items,r.key),o=(u=this.schema)==null?void 0:u.sortMapEntries;if(a){if(!i)throw new Error(`Key ${r.key} already set`);ze(a.value)&&uS(r.value)?a.value.value=r.value:a.value=r.value}else if(o){const f=this.items.findIndex(d=>o(r,d)<0);f===-1?this.items.push(r):this.items.splice(f,0,r)}else this.items.push(r)}delete(e){const i=fs(this.items,e);return i?this.items.splice(this.items.indexOf(i),1).length>0:!1}get(e,i){const r=fs(this.items,e),a=r==null?void 0:r.value;return(!i&&ze(a)?a.value:a)??void 0}has(e){return!!fs(this.items,e)}set(e,i){this.add(new Nt(e,i),!0)}toJSON(e,i,r){const a=r?new r:i!=null&&i.mapAsMap?new Map:{};i!=null&&i.onCreate&&i.onCreate(a);for(const o of this.items)mS(i,a,o);return a}toString(e,i,r){if(!e)return JSON.stringify(this);for(const a of this.items)if(!Ve(a))throw new Error(`Map items must all be pairs; found ${JSON.stringify(a)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),yS(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:i})}}const Ur={collection:"map",default:!0,nodeClass:nn,tag:"tag:yaml.org,2002:map",resolve(n,e){return Dr(n)||e("Expected a mapping for this tag"),n},createNode:(n,e,i)=>nn.from(n,e,i)};class zi extends fS{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Rr,e),this.items=[]}add(e){this.items.push(e)}delete(e){const i=Io(e);return typeof i!="number"?!1:this.items.splice(i,1).length>0}get(e,i){const r=Io(e);if(typeof r!="number")return;const a=this.items[r];return!i&&ze(a)?a.value:a}has(e){const i=Io(e);return typeof i=="number"&&i<this.items.length}set(e,i){const r=Io(e);if(typeof r!="number")throw new Error(`Expected a valid index, not ${e}.`);const a=this.items[r];ze(a)&&uS(i)?a.value=i:this.items[r]=i}toJSON(e,i){const r=[];i!=null&&i.onCreate&&i.onCreate(r);let a=0;for(const o of this.items)r.push(yn(o,String(a++),i));return r}toString(e,i,r){return e?yS(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+"  ",onChompKeep:r,onComment:i}):JSON.stringify(this)}static from(e,i,r){const{replacer:a}=r,o=new this(e);if(i&&Symbol.iterator in Object(i)){let u=0;for(let f of i){if(typeof a=="function"){const d=i instanceof Set?f:String(u++);f=a.call(i,d,f)}o.items.push(ll(f,void 0,r))}}return o}}function Io(n){let e=ze(n)?n.value:n;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}const Hr={collection:"seq",default:!0,nodeClass:zi,tag:"tag:yaml.org,2002:seq",resolve(n,e){return zr(n)||e("Expected a sequence for this tag"),n},createNode:(n,e,i)=>zi.from(n,e,i)},Oc={identify:n=>typeof n=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n=>n,stringify(n,e,i,r){return e=Object.assign({actualString:!0},e),pl(n,e,i,r)}},jc={identify:n=>n==null,createNode:()=>new de(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new de(null),stringify:({source:n},e)=>typeof n=="string"&&jc.test.test(n)?n:e.options.nullStr},qd={identify:n=>typeof n=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:n=>new de(n[0]==="t"||n[0]==="T"),stringify({source:n,value:e},i){if(n&&qd.test.test(n)){const r=n[0]==="t"||n[0]==="T";if(e===r)return n}return e?i.options.trueStr:i.options.falseStr}};function En({format:n,minFractionDigits:e,tag:i,value:r}){if(typeof r=="bigint")return String(r);const a=typeof r=="number"?r:Number(r);if(!isFinite(a))return isNaN(a)?".nan":a<0?"-.inf":".inf";let o=Object.is(r,-0)?"-0":JSON.stringify(r);if(!n&&e&&(!i||i==="tag:yaml.org,2002:float")&&/^\d/.test(o)){let u=o.indexOf(".");u<0&&(u=o.length,o+=".");let f=e-(o.length-u-1);for(;f-- >0;)o+="0"}return o}const bS={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:n=>n.slice(-3).toLowerCase()==="nan"?NaN:n[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:En},vS={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:n=>parseFloat(n),stringify(n){const e=Number(n.value);return isFinite(e)?e.toExponential():En(n)}},SS={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(n){const e=new de(parseFloat(n)),i=n.indexOf(".");return i!==-1&&n[n.length-1]==="0"&&(e.minFractionDigits=n.length-i-1),e},stringify:En},Lc=n=>typeof n=="bigint"||Number.isInteger(n),$d=(n,e,i,{intAsBigInt:r})=>r?BigInt(n):parseInt(n.substring(e),i);function wS(n,e,i){const{value:r}=n;return Lc(r)&&r>=0?i+r.toString(e):En(n)}const xS={identify:n=>Lc(n)&&n>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(n,e,i)=>$d(n,2,8,i),stringify:n=>wS(n,8,"0o")},_S={identify:Lc,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(n,e,i)=>$d(n,0,10,i),stringify:En},ES={identify:n=>Lc(n)&&n>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(n,e,i)=>$d(n,2,16,i),stringify:n=>wS(n,16,"0x")},dC=[Ur,Hr,Oc,jc,qd,xS,_S,ES,bS,vS,SS];function Zb(n){return typeof n=="bigint"||Number.isInteger(n)}const Vo=({value:n})=>JSON.stringify(n),pC=[{identify:n=>typeof n=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:n=>n,stringify:Vo},{identify:n=>n==null,createNode:()=>new de(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Vo},{identify:n=>typeof n=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:n=>n==="true",stringify:Vo},{identify:Zb,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(n,e,{intAsBigInt:i})=>i?BigInt(n):parseInt(n,10),stringify:({value:n})=>Zb(n)?n.toString():JSON.stringify(n)},{identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:n=>parseFloat(n),stringify:Vo}],gC={default:!0,tag:"",test:/^/,resolve(n,e){return e(`Unresolved plain scalar ${JSON.stringify(n)}`),n}},mC=[Ur,Hr].concat(pC,gC),Id={identify:n=>n instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(n,e){if(typeof atob=="function"){const i=atob(n.replace(/[\n\r]/g,"")),r=new Uint8Array(i.length);for(let a=0;a<i.length;++a)r[a]=i.charCodeAt(a);return r}else return e("This environment does not support reading binary tags; either Buffer or atob is required"),n},stringify({comment:n,type:e,value:i},r,a,o){if(!i)return"";const u=i;let f;if(typeof btoa=="function"){let d="";for(let g=0;g<u.length;++g)d+=String.fromCharCode(u[g]);f=btoa(d)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(e??(e=de.BLOCK_LITERAL),e!==de.QUOTE_DOUBLE){const d=Math.max(r.options.lineWidth-r.indent.length,r.options.minContentWidth),g=Math.ceil(f.length/d),m=new Array(g);for(let y=0,S=0;y<g;++y,S+=d)m[y]=f.substr(S,d);f=m.join(e===de.BLOCK_LITERAL?`
`:" ")}return pl({comment:n,type:e,value:f},r,a,o)}};function TS(n,e){if(zr(n))for(let i=0;i<n.items.length;++i){let r=n.items[i];if(!Ve(r)){if(Dr(r)){r.items.length>1&&e("Each pair must have its own sequence indicator");const a=r.items[0]||new Nt(new de(null));if(r.commentBefore&&(a.key.commentBefore=a.key.commentBefore?`${r.commentBefore}
${a.key.commentBefore}`:r.commentBefore),r.comment){const o=a.value??a.key;o.comment=o.comment?`${r.comment}
${o.comment}`:r.comment}r=a}n.items[i]=Ve(r)?r:new Nt(r)}}else e("Expected a sequence for this tag");return n}function AS(n,e,i){const{replacer:r}=i,a=new zi(n);a.tag="tag:yaml.org,2002:pairs";let o=0;if(e&&Symbol.iterator in Object(e))for(let u of e){typeof r=="function"&&(u=r.call(e,String(o++),u));let f,d;if(Array.isArray(u))if(u.length===2)f=u[0],d=u[1];else throw new TypeError(`Expected [key, value] tuple: ${u}`);else if(u&&u instanceof Object){const g=Object.keys(u);if(g.length===1)f=g[0],d=u[f];else throw new TypeError(`Expected tuple with one key, not ${g.length} keys`)}else f=u;a.items.push(Bd(f,d,i))}return a}const Vd={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:TS,createNode:AS};class Ar extends zi{constructor(){super(),this.add=nn.prototype.add.bind(this),this.delete=nn.prototype.delete.bind(this),this.get=nn.prototype.get.bind(this),this.has=nn.prototype.has.bind(this),this.set=nn.prototype.set.bind(this),this.tag=Ar.tag}toJSON(e,i){if(!i)return super.toJSON(e);const r=new Map;i!=null&&i.onCreate&&i.onCreate(r);for(const a of this.items){let o,u;if(Ve(a)?(o=yn(a.key,"",i),u=yn(a.value,o,i)):o=yn(a,"",i),r.has(o))throw new Error("Ordered maps must not include duplicate keys");r.set(o,u)}return r}static from(e,i,r){const a=AS(e,i,r),o=new this;return o.items=a.items,o}}Ar.tag="tag:yaml.org,2002:omap";const Gd={collection:"seq",identify:n=>n instanceof Map,nodeClass:Ar,default:!1,tag:"tag:yaml.org,2002:omap",resolve(n,e){const i=TS(n,e),r=[];for(const{key:a}of i.items)ze(a)&&(r.includes(a.value)?e(`Ordered maps must not include duplicate keys: ${a.value}`):r.push(a.value));return Object.assign(new Ar,i)},createNode:(n,e,i)=>Ar.from(n,e,i)};function CS({value:n,source:e},i){return e&&(n?NS:kS).test.test(e)?e:n?i.options.trueStr:i.options.falseStr}const NS={identify:n=>n===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new de(!0),stringify:CS},kS={identify:n=>n===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new de(!1),stringify:CS},yC={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:n=>n.slice(-3).toLowerCase()==="nan"?NaN:n[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:En},bC={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:n=>parseFloat(n.replace(/_/g,"")),stringify(n){const e=Number(n.value);return isFinite(e)?e.toExponential():En(n)}},vC={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(n){const e=new de(parseFloat(n.replace(/_/g,""))),i=n.indexOf(".");if(i!==-1){const r=n.substring(i+1).replace(/_/g,"");r[r.length-1]==="0"&&(e.minFractionDigits=r.length)}return e},stringify:En},gl=n=>typeof n=="bigint"||Number.isInteger(n);function Rc(n,e,i,{intAsBigInt:r}){const a=n[0];if((a==="-"||a==="+")&&(e+=1),n=n.substring(e).replace(/_/g,""),r){switch(i){case 2:n=`0b${n}`;break;case 8:n=`0o${n}`;break;case 16:n=`0x${n}`;break}const u=BigInt(n);return a==="-"?BigInt(-1)*u:u}const o=parseInt(n,i);return a==="-"?-1*o:o}function Kd(n,e,i){const{value:r}=n;if(gl(r)){const a=r.toString(e);return r<0?"-"+i+a.substr(1):i+a}return En(n)}const SC={identify:gl,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(n,e,i)=>Rc(n,2,2,i),stringify:n=>Kd(n,2,"0b")},wC={identify:gl,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(n,e,i)=>Rc(n,1,8,i),stringify:n=>Kd(n,8,"0")},xC={identify:gl,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(n,e,i)=>Rc(n,0,10,i),stringify:En},_C={identify:gl,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(n,e,i)=>Rc(n,2,16,i),stringify:n=>Kd(n,16,"0x")};class Cr extends nn{constructor(e){super(e),this.tag=Cr.tag}add(e){let i;Ve(e)?i=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?i=new Nt(e.key,null):i=new Nt(e,null),fs(this.items,i.key)||this.items.push(i)}get(e,i){const r=fs(this.items,e);return!i&&Ve(r)?ze(r.key)?r.key.value:r.key:r}set(e,i){if(typeof i!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof i}`);const r=fs(this.items,e);r&&!i?this.items.splice(this.items.indexOf(r),1):!r&&i&&this.items.push(new Nt(e))}toJSON(e,i){return super.toJSON(e,i,Set)}toString(e,i,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),i,r);throw new Error("Set items must all have null values")}static from(e,i,r){const{replacer:a}=r,o=new this(e);if(i&&Symbol.iterator in Object(i))for(let u of i)typeof a=="function"&&(u=a.call(i,u,u)),o.items.push(Bd(u,null,r));return o}}Cr.tag="tag:yaml.org,2002:set";const Xd={collection:"map",identify:n=>n instanceof Set,nodeClass:Cr,default:!1,tag:"tag:yaml.org,2002:set",createNode:(n,e,i)=>Cr.from(n,e,i),resolve(n,e){if(Dr(n)){if(n.hasAllNullValues(!0))return Object.assign(new Cr,n);e("Set items must all have null values")}else e("Expected a mapping for this tag");return n}};function Yd(n,e){const i=n[0],r=i==="-"||i==="+"?n.substring(1):n,a=u=>e?BigInt(u):Number(u),o=r.replace(/_/g,"").split(":").reduce((u,f)=>u*a(60)+a(f),a(0));return i==="-"?a(-1)*o:o}function MS(n){let{value:e}=n,i=u=>u;if(typeof e=="bigint")i=u=>BigInt(u);else if(isNaN(e)||!isFinite(e))return En(n);let r="";e<0&&(r="-",e*=i(-1));const a=i(60),o=[e%a];return e<60?o.unshift(0):(e=(e-o[0])/a,o.unshift(e%a),e>=60&&(e=(e-o[0])/a,o.unshift(e))),r+o.map(u=>String(u).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const OS={identify:n=>typeof n=="bigint"||Number.isInteger(n),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(n,e,{intAsBigInt:i})=>Yd(n,i),stringify:MS},jS={identify:n=>typeof n=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:n=>Yd(n,!1),stringify:MS},Dc={identify:n=>n instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(n){const e=n.match(Dc.test);if(!e)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,i,r,a,o,u,f]=e.map(Number),d=e[7]?Number((e[7]+"00").substr(1,3)):0;let g=Date.UTC(i,r-1,a,o||0,u||0,f||0,d);const m=e[8];if(m&&m!=="Z"){let y=Yd(m,!1);Math.abs(y)<30&&(y*=60),g-=6e4*y}return new Date(g)},stringify:({value:n})=>(n==null?void 0:n.toISOString().replace(/(T00:00:00)?\.000Z$/,""))??""},Wb=[Ur,Hr,Oc,jc,NS,kS,SC,wC,xC,_C,yC,bC,vC,Id,ri,Gd,Vd,Xd,OS,jS,Dc],e0=new Map([["core",dC],["failsafe",[Ur,Hr,Oc]],["json",mC],["yaml11",Wb],["yaml-1.1",Wb]]),t0={binary:Id,bool:qd,float:SS,floatExp:vS,floatNaN:bS,floatTime:jS,int:_S,intHex:ES,intOct:xS,intTime:OS,map:Ur,merge:ri,null:jc,omap:Gd,pairs:Vd,seq:Hr,set:Xd,timestamp:Dc},EC={"tag:yaml.org,2002:binary":Id,"tag:yaml.org,2002:merge":ri,"tag:yaml.org,2002:omap":Gd,"tag:yaml.org,2002:pairs":Vd,"tag:yaml.org,2002:set":Xd,"tag:yaml.org,2002:timestamp":Dc};function _h(n,e,i){const r=e0.get(e);if(r&&!n)return i&&!r.includes(ri)?r.concat(ri):r.slice();let a=r;if(!a)if(Array.isArray(n))a=[];else{const o=Array.from(e0.keys()).filter(u=>u!=="yaml11").map(u=>JSON.stringify(u)).join(", ");throw new Error(`Unknown schema "${e}"; use one of ${o} or define customTags array`)}if(Array.isArray(n))for(const o of n)a=a.concat(o);else typeof n=="function"&&(a=n(a.slice()));return i&&(a=a.concat(ri)),a.reduce((o,u)=>{const f=typeof u=="string"?t0[u]:u;if(!f){const d=JSON.stringify(u),g=Object.keys(t0).map(m=>JSON.stringify(m)).join(", ");throw new Error(`Unknown custom tag ${d}; use one of ${g}`)}return o.includes(f)||o.push(f),o},[])}const TC=(n,e)=>n.key<e.key?-1:n.key>e.key?1:0;class zc{constructor({compat:e,customTags:i,merge:r,resolveKnownTags:a,schema:o,sortMapEntries:u,toStringDefaults:f}){this.compat=Array.isArray(e)?_h(e,"compat"):e?_h(null,e):null,this.name=typeof o=="string"&&o||"core",this.knownTags=a?EC:{},this.tags=_h(i,this.name,r),this.toStringOptions=f??null,Object.defineProperty(this,Di,{value:Ur}),Object.defineProperty(this,jn,{value:Oc}),Object.defineProperty(this,Rr,{value:Hr}),this.sortMapEntries=typeof u=="function"?u:u===!0?TC:null}clone(){const e=Object.create(zc.prototype,Object.getOwnPropertyDescriptors(this));return e.tags=this.tags.slice(),e}}function AC(n,e){var d;const i=[];let r=e.directives===!0;if(e.directives!==!1&&n.directives){const g=n.directives.toString(n);g?(i.push(g),r=!0):n.directives.docStart&&(r=!0)}r&&i.push("---");const a=dS(n,e),{commentString:o}=a.options;if(n.commentBefore){i.length!==1&&i.unshift("");const g=o(n.commentBefore);i.unshift(si(g,""))}let u=!1,f=null;if(n.contents){if(Xe(n.contents)){if(n.contents.spaceBefore&&r&&i.push(""),n.contents.commentBefore){const y=o(n.contents.commentBefore);i.push(si(y,""))}a.forceBlockIndent=!!n.comment,f=n.contents.comment}const g=f?void 0:()=>u=!0;let m=Nr(n.contents,a,()=>f=null,g);f&&(m+=us(m,"",o(f))),(m[0]==="|"||m[0]===">")&&i[i.length-1]==="---"?i[i.length-1]=`--- ${m}`:i.push(m)}else i.push(Nr(n.contents,a));if((d=n.directives)!=null&&d.docEnd)if(n.comment){const g=o(n.comment);g.includes(`
`)?(i.push("..."),i.push(si(g,""))):i.push(`... ${g}`)}else i.push("...");else{let g=n.comment;g&&u&&(g=g.replace(/^\n+/,"")),g&&((!u||f)&&i[i.length-1]!==""&&i.push(""),i.push(si(o(g),"")))}return i.join(`
`)+`
`}class Br{constructor(e,i,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,bn,{value:Fh});let a=null;typeof i=="function"||Array.isArray(i)?a=i:r===void 0&&i&&(r=i,i=void 0);const o=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=o;let{version:u}=o;r!=null&&r._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(u=this.directives.yaml.version)):this.directives=new Ot({version:u}),this.setSchema(u,r),this.contents=e===void 0?null:this.createNode(e,a,r)}clone(){const e=Object.create(Br.prototype,{[bn]:{value:Fh}});return e.commentBefore=this.commentBefore,e.comment=this.comment,e.errors=this.errors.slice(),e.warnings=this.warnings.slice(),e.options=Object.assign({},this.options),this.directives&&(e.directives=this.directives.clone()),e.schema=this.schema.clone(),e.contents=Xe(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){hr(this.contents)&&this.contents.add(e)}addIn(e,i){hr(this.contents)&&this.contents.addIn(e,i)}createAlias(e,i){if(!e.anchor){const r=oS(this);e.anchor=!i||r.has(i)?cS(i||"a",r):i}return new Cc(e.anchor)}createNode(e,i,r){let a;if(typeof i=="function")e=i.call({"":e},"",e),a=i;else if(Array.isArray(i)){const _=C=>typeof C=="number"||C instanceof String||C instanceof Number,A=i.filter(_).map(String);A.length>0&&(i=i.concat(A)),a=i}else r===void 0&&i&&(r=i,i=void 0);const{aliasDuplicateObjects:o,anchorPrefix:u,flow:f,keepUndefined:d,onTagObj:g,tag:m}=r??{},{onAnchor:y,setAnchors:S,sourceObjects:w}=eC(this,u||"a"),E={aliasDuplicateObjects:o??!0,keepUndefined:d??!1,onAnchor:y,onTagObj:g,replacer:a,schema:this.schema,sourceObjects:w},x=ll(e,m,E);return f&&Ke(x)&&(x.flow=!0),S(),x}createPair(e,i,r={}){const a=this.createNode(e,null,r),o=this.createNode(i,null,r);return new Nt(a,o)}delete(e){return hr(this.contents)?this.contents.delete(e):!1}deleteIn(e){return Ya(e)?this.contents==null?!1:(this.contents=null,!0):hr(this.contents)?this.contents.deleteIn(e):!1}get(e,i){return Ke(this.contents)?this.contents.get(e,i):void 0}getIn(e,i){return Ya(e)?!i&&ze(this.contents)?this.contents.value:this.contents:Ke(this.contents)?this.contents.getIn(e,i):void 0}has(e){return Ke(this.contents)?this.contents.has(e):!1}hasIn(e){return Ya(e)?this.contents!==void 0:Ke(this.contents)?this.contents.hasIn(e):!1}set(e,i){this.contents==null?this.contents=dc(this.schema,[e],i):hr(this.contents)&&this.contents.set(e,i)}setIn(e,i){Ya(e)?this.contents=i:this.contents==null?this.contents=dc(this.schema,Array.from(e),i):hr(this.contents)&&this.contents.setIn(e,i)}setSchema(e,i={}){typeof e=="number"&&(e=String(e));let r;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Ot({version:"1.1"}),r={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=e:this.directives=new Ot({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const a=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${a}`)}}if(i.schema instanceof Object)this.schema=i.schema;else if(r)this.schema=new zc(Object.assign(r,i));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:i,mapAsMap:r,maxAliasCount:a,onAnchor:o,reviver:u}={}){const f={anchors:new Map,doc:this,keep:!e,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof a=="number"?a:100},d=yn(this.contents,i??"",f);if(typeof o=="function")for(const{count:g,res:m}of f.anchors.values())o(m,g);return typeof u=="function"?xr(u,{"":d},"",d):d}toJSON(e,i){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:i})}toString(e={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in e&&(!Number.isInteger(e.indent)||Number(e.indent)<=0)){const i=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${i}`)}return AC(this,e)}}function hr(n){if(Ke(n))return!0;throw new Error("Expected a YAML collection as document contents")}class Fd extends Error{constructor(e,i,r,a){super(),this.name=e,this.code=r,this.message=a,this.pos=i}}class hs extends Fd{constructor(e,i,r){super("YAMLParseError",e,i,r)}}class LS extends Fd{constructor(e,i,r){super("YAMLWarning",e,i,r)}}const gc=(n,e)=>i=>{if(i.pos[0]===-1)return;i.linePos=i.pos.map(f=>e.linePos(f));const{line:r,col:a}=i.linePos[0];i.message+=` at line ${r}, column ${a}`;let o=a-1,u=n.substring(e.lineStarts[r-1],e.lineStarts[r]).replace(/[\n\r]+$/,"");if(o>=60&&u.length>80){const f=Math.min(o-39,u.length-79);u="…"+u.substring(f),o-=f-1}if(u.length>80&&(u=u.substring(0,79)+"…"),r>1&&/^ *$/.test(u.substring(0,o))){let f=n.substring(e.lineStarts[r-2],e.lineStarts[r-1]);f.length>80&&(f=f.substring(0,79)+`…
`),u=f+u}if(/[^ ]/.test(u)){let f=1;const d=i.linePos[1];(d==null?void 0:d.line)===r&&d.col>a&&(f=Math.max(1,Math.min(d.col-a,80-o)));const g=" ".repeat(o)+"^".repeat(f);i.message+=`:

${u}
${g}
`}};function kr(n,{flow:e,indicator:i,next:r,offset:a,onError:o,parentIndent:u,startOnNewline:f}){let d=!1,g=f,m=f,y="",S="",w=!1,E=!1,x=null,_=null,A=null,C=null,H=null,V=null,K=null;for(const I of n)switch(E&&(I.type!=="space"&&I.type!=="newline"&&I.type!=="comma"&&o(I.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),E=!1),x&&(g&&I.type!=="comment"&&I.type!=="newline"&&o(x,"TAB_AS_INDENT","Tabs are not allowed as indentation"),x=null),I.type){case"space":!e&&(i!=="doc-start"||(r==null?void 0:r.type)!=="flow-collection")&&I.source.includes("	")&&(x=I),m=!0;break;case"comment":{m||o(I,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const O=I.source.substring(1)||" ";y?y+=S+O:y=O,S="",g=!1;break}case"newline":g?y?y+=I.source:(!V||i!=="seq-item-ind")&&(d=!0):S+=I.source,g=!0,w=!0,(_||A)&&(C=I),m=!0;break;case"anchor":_&&o(I,"MULTIPLE_ANCHORS","A node can have at most one anchor"),I.source.endsWith(":")&&o(I.offset+I.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),_=I,K??(K=I.offset),g=!1,m=!1,E=!0;break;case"tag":{A&&o(I,"MULTIPLE_TAGS","A node can have at most one tag"),A=I,K??(K=I.offset),g=!1,m=!1,E=!0;break}case i:(_||A)&&o(I,"BAD_PROP_ORDER",`Anchors and tags must be after the ${I.source} indicator`),V&&o(I,"UNEXPECTED_TOKEN",`Unexpected ${I.source} in ${e??"collection"}`),V=I,g=i==="seq-item-ind"||i==="explicit-key-ind",m=!1;break;case"comma":if(e){H&&o(I,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),H=I,g=!1,m=!1;break}default:o(I,"UNEXPECTED_TOKEN",`Unexpected ${I.type} token`),g=!1,m=!1}const Q=n[n.length-1],j=Q?Q.offset+Q.source.length:a;return E&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&o(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),x&&(g&&x.indent<=u||(r==null?void 0:r.type)==="block-map"||(r==null?void 0:r.type)==="block-seq")&&o(x,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:H,found:V,spaceBefore:d,comment:y,hasNewline:w,anchor:_,tag:A,newlineAfterProp:C,end:j,start:K??j}}function ol(n){if(!n)return null;switch(n.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(n.source.includes(`
`))return!0;if(n.end){for(const e of n.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of n.items){for(const i of e.start)if(i.type==="newline")return!0;if(e.sep){for(const i of e.sep)if(i.type==="newline")return!0}if(ol(e.key)||ol(e.value))return!0}return!1;default:return!0}}function Zh(n,e,i){if((e==null?void 0:e.type)==="flow-collection"){const r=e.end[0];r.indent===n&&(r.source==="]"||r.source==="}")&&ol(e)&&i(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function RS(n,e,i){const{uniqueKeys:r}=n.options;if(r===!1)return!1;const a=typeof r=="function"?r:(o,u)=>o===u||ze(o)&&ze(u)&&o.value===u.value;return e.some(o=>a(o.key,i))}const n0="All mapping items must start at the same column";function CC({composeNode:n,composeEmptyNode:e},i,r,a,o){var m;const u=(o==null?void 0:o.nodeClass)??nn,f=new u(i.schema);i.atRoot&&(i.atRoot=!1);let d=r.offset,g=null;for(const y of r.items){const{start:S,key:w,sep:E,value:x}=y,_=kr(S,{indicator:"explicit-key-ind",next:w??(E==null?void 0:E[0]),offset:d,onError:a,parentIndent:r.indent,startOnNewline:!0}),A=!_.found;if(A){if(w&&(w.type==="block-seq"?a(d,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in w&&w.indent!==r.indent&&a(d,"BAD_INDENT",n0)),!_.anchor&&!_.tag&&!E){g=_.end,_.comment&&(f.comment?f.comment+=`
`+_.comment:f.comment=_.comment);continue}(_.newlineAfterProp||ol(w))&&a(w??S[S.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((m=_.found)==null?void 0:m.indent)!==r.indent&&a(d,"BAD_INDENT",n0);i.atKey=!0;const C=_.end,H=w?n(i,w,_,a):e(i,C,S,null,_,a);i.schema.compat&&Zh(r.indent,w,a),i.atKey=!1,RS(i,f.items,H)&&a(C,"DUPLICATE_KEY","Map keys must be unique");const V=kr(E??[],{indicator:"map-value-ind",next:x,offset:H.range[2],onError:a,parentIndent:r.indent,startOnNewline:!w||w.type==="block-scalar"});if(d=V.end,V.found){A&&((x==null?void 0:x.type)==="block-map"&&!V.hasNewline&&a(d,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),i.options.strict&&_.start<V.found.offset-1024&&a(H.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const K=x?n(i,x,V,a):e(i,d,E,null,V,a);i.schema.compat&&Zh(r.indent,x,a),d=K.range[2];const Q=new Nt(H,K);i.options.keepSourceTokens&&(Q.srcToken=y),f.items.push(Q)}else{A&&a(H.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),V.comment&&(H.comment?H.comment+=`
`+V.comment:H.comment=V.comment);const K=new Nt(H);i.options.keepSourceTokens&&(K.srcToken=y),f.items.push(K)}}return g&&g<d&&a(g,"IMPOSSIBLE","Map comment with trailing content"),f.range=[r.offset,d,g??d],f}function NC({composeNode:n,composeEmptyNode:e},i,r,a,o){const u=(o==null?void 0:o.nodeClass)??zi,f=new u(i.schema);i.atRoot&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let d=r.offset,g=null;for(const{start:m,value:y}of r.items){const S=kr(m,{indicator:"seq-item-ind",next:y,offset:d,onError:a,parentIndent:r.indent,startOnNewline:!0});if(!S.found)if(S.anchor||S.tag||y)(y==null?void 0:y.type)==="block-seq"?a(S.end,"BAD_INDENT","All sequence items must start at the same column"):a(d,"MISSING_CHAR","Sequence item without - indicator");else{g=S.end,S.comment&&(f.comment=S.comment);continue}const w=y?n(i,y,S,a):e(i,S.end,m,null,S,a);i.schema.compat&&Zh(r.indent,y,a),d=w.range[2],f.items.push(w)}return f.range=[r.offset,d,g??d],f}function ml(n,e,i,r){let a="";if(n){let o=!1,u="";for(const f of n){const{source:d,type:g}=f;switch(g){case"space":o=!0;break;case"comment":{i&&!o&&r(f,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const m=d.substring(1)||" ";a?a+=u+m:a=m,u="";break}case"newline":a&&(u+=d),o=!0;break;default:r(f,"UNEXPECTED_TOKEN",`Unexpected ${g} at node end`)}e+=d.length}}return{comment:a,offset:e}}const Eh="Block collections are not allowed within flow collections",Th=n=>n&&(n.type==="block-map"||n.type==="block-seq");function kC({composeNode:n,composeEmptyNode:e},i,r,a,o){var _;const u=r.start.source==="{",f=u?"flow map":"flow sequence",d=(o==null?void 0:o.nodeClass)??(u?nn:zi),g=new d(i.schema);g.flow=!0;const m=i.atRoot;m&&(i.atRoot=!1),i.atKey&&(i.atKey=!1);let y=r.offset+r.start.source.length;for(let A=0;A<r.items.length;++A){const C=r.items[A],{start:H,key:V,sep:K,value:Q}=C,j=kr(H,{flow:f,indicator:"explicit-key-ind",next:V??(K==null?void 0:K[0]),offset:y,onError:a,parentIndent:r.indent,startOnNewline:!1});if(!j.found){if(!j.anchor&&!j.tag&&!K&&!Q){A===0&&j.comma?a(j.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`):A<r.items.length-1&&a(j.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${f}`),j.comment&&(g.comment?g.comment+=`
`+j.comment:g.comment=j.comment),y=j.end;continue}!u&&i.options.strict&&ol(V)&&a(V,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(A===0)j.comma&&a(j.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`);else if(j.comma||a(j.start,"MISSING_CHAR",`Missing , between ${f} items`),j.comment){let I="";e:for(const O of H)switch(O.type){case"comma":case"space":break;case"comment":I=O.source.substring(1);break e;default:break e}if(I){let O=g.items[g.items.length-1];Ve(O)&&(O=O.value??O.key),O.comment?O.comment+=`
`+I:O.comment=I,j.comment=j.comment.substring(I.length+1)}}if(!u&&!K&&!j.found){const I=Q?n(i,Q,j,a):e(i,j.end,K,null,j,a);g.items.push(I),y=I.range[2],Th(Q)&&a(I.range,"BLOCK_IN_FLOW",Eh)}else{i.atKey=!0;const I=j.end,O=V?n(i,V,j,a):e(i,I,H,null,j,a);Th(V)&&a(O.range,"BLOCK_IN_FLOW",Eh),i.atKey=!1;const P=kr(K??[],{flow:f,indicator:"map-value-ind",next:Q,offset:O.range[2],onError:a,parentIndent:r.indent,startOnNewline:!1});if(P.found){if(!u&&!j.found&&i.options.strict){if(K)for(const ee of K){if(ee===P.found)break;if(ee.type==="newline"){a(ee,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}j.start<P.found.offset-1024&&a(P.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else Q&&("source"in Q&&((_=Q.source)==null?void 0:_[0])===":"?a(Q,"MISSING_CHAR",`Missing space after : in ${f}`):a(P.start,"MISSING_CHAR",`Missing , or : between ${f} items`));const J=Q?n(i,Q,P,a):P.found?e(i,P.end,K,null,P,a):null;J?Th(Q)&&a(J.range,"BLOCK_IN_FLOW",Eh):P.comment&&(O.comment?O.comment+=`
`+P.comment:O.comment=P.comment);const $=new Nt(O,J);if(i.options.keepSourceTokens&&($.srcToken=C),u){const ee=g;RS(i,ee.items,O)&&a(I,"DUPLICATE_KEY","Map keys must be unique"),ee.items.push($)}else{const ee=new nn(i.schema);ee.flow=!0,ee.items.push($);const ce=(J??O).range;ee.range=[O.range[0],ce[1],ce[2]],g.items.push(ee)}y=J?J.range[2]:P.end}}const S=u?"}":"]",[w,...E]=r.end;let x=y;if((w==null?void 0:w.source)===S)x=w.offset+w.source.length;else{const A=f[0].toUpperCase()+f.substring(1),C=m?`${A} must end with a ${S}`:`${A} in block collection must be sufficiently indented and end with a ${S}`;a(y,m?"MISSING_CHAR":"BAD_INDENT",C),w&&w.source.length!==1&&E.unshift(w)}if(E.length>0){const A=ml(E,x,i.options.strict,a);A.comment&&(g.comment?g.comment+=`
`+A.comment:g.comment=A.comment),g.range=[r.offset,x,A.offset]}else g.range=[r.offset,x,x];return g}function Ah(n,e,i,r,a,o){const u=i.type==="block-map"?CC(n,e,i,r,o):i.type==="block-seq"?NC(n,e,i,r,o):kC(n,e,i,r,o),f=u.constructor;return a==="!"||a===f.tagName?(u.tag=f.tagName,u):(a&&(u.tag=a),u)}function MC(n,e,i,r,a){var S;const o=r.tag,u=o?e.directives.tagName(o.source,w=>a(o,"TAG_RESOLVE_FAILED",w)):null;if(i.type==="block-seq"){const{anchor:w,newlineAfterProp:E}=r,x=w&&o?w.offset>o.offset?w:o:w??o;x&&(!E||E.offset<x.offset)&&a(x,"MISSING_CHAR","Missing newline after block sequence props")}const f=i.type==="block-map"?"map":i.type==="block-seq"?"seq":i.start.source==="{"?"map":"seq";if(!o||!u||u==="!"||u===nn.tagName&&f==="map"||u===zi.tagName&&f==="seq")return Ah(n,e,i,a,u);let d=e.schema.tags.find(w=>w.tag===u&&w.collection===f);if(!d){const w=e.schema.knownTags[u];if((w==null?void 0:w.collection)===f)e.schema.tags.push(Object.assign({},w,{default:!1})),d=w;else return w?a(o,"BAD_COLLECTION_TYPE",`${w.tag} used for ${f} collection, but expects ${w.collection??"scalar"}`,!0):a(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${u}`,!0),Ah(n,e,i,a,u)}const g=Ah(n,e,i,a,u,d),m=((S=d.resolve)==null?void 0:S.call(d,g,w=>a(o,"TAG_RESOLVE_FAILED",w),e.options))??g,y=Xe(m)?m:new de(m);return y.range=g.range,y.tag=u,d!=null&&d.format&&(y.format=d.format),y}function DS(n,e,i){const r=e.offset,a=OC(e,n.options.strict,i);if(!a)return{value:"",type:null,comment:"",range:[r,r,r]};const o=a.mode===">"?de.BLOCK_FOLDED:de.BLOCK_LITERAL,u=e.source?jC(e.source):[];let f=u.length;for(let x=u.length-1;x>=0;--x){const _=u[x][1];if(_===""||_==="\r")f=x;else break}if(f===0){const x=a.chomp==="+"&&u.length>0?`
`.repeat(Math.max(1,u.length-1)):"";let _=r+a.length;return e.source&&(_+=e.source.length),{value:x,type:o,comment:a.comment,range:[r,_,_]}}let d=e.indent+a.indent,g=e.offset+a.length,m=0;for(let x=0;x<f;++x){const[_,A]=u[x];if(A===""||A==="\r")a.indent===0&&_.length>d&&(d=_.length);else{_.length<d&&i(g+_.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),a.indent===0&&(d=_.length),m=x,d===0&&!n.atRoot&&i(g,"BAD_INDENT","Block scalar values in collections must be indented");break}g+=_.length+A.length+1}for(let x=u.length-1;x>=f;--x)u[x][0].length>d&&(f=x+1);let y="",S="",w=!1;for(let x=0;x<m;++x)y+=u[x][0].slice(d)+`
`;for(let x=m;x<f;++x){let[_,A]=u[x];g+=_.length+A.length+1;const C=A[A.length-1]==="\r";if(C&&(A=A.slice(0,-1)),A&&_.length<d){const V=`Block scalar lines must not be less indented than their ${a.indent?"explicit indentation indicator":"first line"}`;i(g-A.length-(C?2:1),"BAD_INDENT",V),_=""}o===de.BLOCK_LITERAL?(y+=S+_.slice(d)+A,S=`
`):_.length>d||A[0]==="	"?(S===" "?S=`
`:!w&&S===`
`&&(S=`

`),y+=S+_.slice(d)+A,S=`
`,w=!0):A===""?S===`
`?y+=`
`:S=`
`:(y+=S+A,S=" ",w=!1)}switch(a.chomp){case"-":break;case"+":for(let x=f;x<u.length;++x)y+=`
`+u[x][0].slice(d);y[y.length-1]!==`
`&&(y+=`
`);break;default:y+=`
`}const E=r+a.length+e.source.length;return{value:y,type:o,comment:a.comment,range:[r,E,E]}}function OC({offset:n,props:e},i,r){if(e[0].type!=="block-scalar-header")return r(e[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:a}=e[0],o=a[0];let u=0,f="",d=-1;for(let S=1;S<a.length;++S){const w=a[S];if(!f&&(w==="-"||w==="+"))f=w;else{const E=Number(w);!u&&E?u=E:d===-1&&(d=n+S)}}d!==-1&&r(d,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${a}`);let g=!1,m="",y=a.length;for(let S=1;S<e.length;++S){const w=e[S];switch(w.type){case"space":g=!0;case"newline":y+=w.source.length;break;case"comment":i&&!g&&r(w,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),y+=w.source.length,m=w.source.substring(1);break;case"error":r(w,"UNEXPECTED_TOKEN",w.message),y+=w.source.length;break;default:{const E=`Unexpected token in block scalar header: ${w.type}`;r(w,"UNEXPECTED_TOKEN",E);const x=w.source;x&&typeof x=="string"&&(y+=x.length)}}}return{mode:o,indent:u,chomp:f,comment:m,length:y}}function jC(n){const e=n.split(/\n( *)/),i=e[0],r=i.match(/^( *)/),o=[r!=null&&r[1]?[r[1],i.slice(r[1].length)]:["",i]];for(let u=1;u<e.length;u+=2)o.push([e[u],e[u+1]]);return o}function zS(n,e,i){const{offset:r,type:a,source:o,end:u}=n;let f,d;const g=(S,w,E)=>i(r+S,w,E);switch(a){case"scalar":f=de.PLAIN,d=LC(o,g);break;case"single-quoted-scalar":f=de.QUOTE_SINGLE,d=RC(o,g);break;case"double-quoted-scalar":f=de.QUOTE_DOUBLE,d=DC(o,g);break;default:return i(n,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${a}`),{value:"",type:null,comment:"",range:[r,r+o.length,r+o.length]}}const m=r+o.length,y=ml(u,m,e,i);return{value:d,type:f,comment:y.comment,range:[r,m,y.offset]}}function LC(n,e){let i="";switch(n[0]){case"	":i="a tab character";break;case",":i="flow indicator character ,";break;case"%":i="directive indicator character %";break;case"|":case">":{i=`block scalar indicator ${n[0]}`;break}case"@":case"`":{i=`reserved character ${n[0]}`;break}}return i&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${i}`),US(n)}function RC(n,e){return(n[n.length-1]!=="'"||n.length===1)&&e(n.length,"MISSING_CHAR","Missing closing 'quote"),US(n.slice(1,-1)).replace(/''/g,"'")}function US(n){let e,i;try{e=new RegExp(`(.*?)(?<![ 	])[ 	]*\r?
`,"sy"),i=new RegExp(`[ 	]*(.*?)(?:(?<![ 	])[ 	]*)?\r?
`,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,i=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=e.exec(n);if(!r)return n;let a=r[1],o=" ",u=e.lastIndex;for(i.lastIndex=u;r=i.exec(n);)r[1]===""?o===`
`?a+=o:o=`
`:(a+=o+r[1],o=" "),u=i.lastIndex;const f=/[ \t]*(.*)/sy;return f.lastIndex=u,r=f.exec(n),a+o+((r==null?void 0:r[1])??"")}function DC(n,e){let i="";for(let r=1;r<n.length-1;++r){const a=n[r];if(!(a==="\r"&&n[r+1]===`
`))if(a===`
`){const{fold:o,offset:u}=zC(n,r);i+=o,r=u}else if(a==="\\"){let o=n[++r];const u=UC[o];if(u)i+=u;else if(o===`
`)for(o=n[r+1];o===" "||o==="	";)o=n[++r+1];else if(o==="\r"&&n[r+1]===`
`)for(o=n[++r+1];o===" "||o==="	";)o=n[++r+1];else if(o==="x"||o==="u"||o==="U"){const f={x:2,u:4,U:8}[o];i+=HC(n,r+1,f,e),r+=f}else{const f=n.substr(r-1,2);e(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${f}`),i+=f}}else if(a===" "||a==="	"){const o=r;let u=n[r+1];for(;u===" "||u==="	";)u=n[++r+1];u!==`
`&&!(u==="\r"&&n[r+2]===`
`)&&(i+=r>o?n.slice(o,r+1):a)}else i+=a}return(n[n.length-1]!=='"'||n.length===1)&&e(n.length,"MISSING_CHAR",'Missing closing "quote'),i}function zC(n,e){let i="",r=n[e+1];for(;(r===" "||r==="	"||r===`
`||r==="\r")&&!(r==="\r"&&n[e+2]!==`
`);)r===`
`&&(i+=`
`),e+=1,r=n[e+1];return i||(i=" "),{fold:i,offset:e}}const UC={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
`,r:"\r",t:"	",v:"\v",N:"",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","	":"	"};function HC(n,e,i,r){const a=n.substr(e,i),u=a.length===i&&/^[0-9a-fA-F]+$/.test(a)?parseInt(a,16):NaN;if(isNaN(u)){const f=n.substr(e-2,i+2);return r(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${f}`),f}return String.fromCodePoint(u)}function HS(n,e,i,r){const{value:a,type:o,comment:u,range:f}=e.type==="block-scalar"?DS(n,e,r):zS(e,n.options.strict,r),d=i?n.directives.tagName(i.source,y=>r(i,"TAG_RESOLVE_FAILED",y)):null;let g;n.options.stringKeys&&n.atKey?g=n.schema[jn]:d?g=BC(n.schema,a,d,i,r):e.type==="scalar"?g=qC(n,a,e,r):g=n.schema[jn];let m;try{const y=g.resolve(a,S=>r(i??e,"TAG_RESOLVE_FAILED",S),n.options);m=ze(y)?y:new de(y)}catch(y){const S=y instanceof Error?y.message:String(y);r(i??e,"TAG_RESOLVE_FAILED",S),m=new de(a)}return m.range=f,m.source=a,o&&(m.type=o),d&&(m.tag=d),g.format&&(m.format=g.format),u&&(m.comment=u),m}function BC(n,e,i,r,a){var f;if(i==="!")return n[jn];const o=[];for(const d of n.tags)if(!d.collection&&d.tag===i)if(d.default&&d.test)o.push(d);else return d;for(const d of o)if((f=d.test)!=null&&f.test(e))return d;const u=n.knownTags[i];return u&&!u.collection?(n.tags.push(Object.assign({},u,{default:!1,test:void 0})),u):(a(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${i}`,i!=="tag:yaml.org,2002:str"),n[jn])}function qC({atKey:n,directives:e,schema:i},r,a,o){const u=i.tags.find(f=>{var d;return(f.default===!0||n&&f.default==="key")&&((d=f.test)==null?void 0:d.test(r))})||i[jn];if(i.compat){const f=i.compat.find(d=>{var g;return d.default&&((g=d.test)==null?void 0:g.test(r))})??i[jn];if(u.tag!==f.tag){const d=e.tagString(u.tag),g=e.tagString(f.tag),m=`Value may be parsed as either ${d} or ${g}`;o(a,"TAG_RESOLVE_FAILED",m,!0)}}return u}function $C(n,e,i){if(e){i??(i=e.length);for(let r=i-1;r>=0;--r){let a=e[r];switch(a.type){case"space":case"comment":case"newline":n-=a.source.length;continue}for(a=e[++r];(a==null?void 0:a.type)==="space";)n+=a.source.length,a=e[++r];break}}return n}const IC={composeNode:BS,composeEmptyNode:Qd};function BS(n,e,i,r){const a=n.atKey,{spaceBefore:o,comment:u,anchor:f,tag:d}=i;let g,m=!0;switch(e.type){case"alias":g=VC(n,e,r),(f||d)&&r(e,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":g=HS(n,e,d,r),f&&(g.anchor=f.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{g=MC(IC,n,e,i,r),f&&(g.anchor=f.source.substring(1))}catch(y){const S=y instanceof Error?y.message:String(y);r(e,"RESOURCE_EXHAUSTION",S)}break;default:{const y=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;r(e,"UNEXPECTED_TOKEN",y),m=!1}}return g??(g=Qd(n,e.offset,void 0,null,i,r)),f&&g.anchor===""&&r(f,"BAD_ALIAS","Anchor cannot be an empty string"),a&&n.options.stringKeys&&(!ze(g)||typeof g.value!="string"||g.tag&&g.tag!=="tag:yaml.org,2002:str")&&r(d??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),o&&(g.spaceBefore=!0),u&&(e.type==="scalar"&&e.source===""?g.comment=u:g.commentBefore=u),n.options.keepSourceTokens&&m&&(g.srcToken=e),g}function Qd(n,e,i,r,{spaceBefore:a,comment:o,anchor:u,tag:f,end:d},g){const m={type:"scalar",offset:$C(e,i,r),indent:-1,source:""},y=HS(n,m,f,g);return u&&(y.anchor=u.source.substring(1),y.anchor===""&&g(u,"BAD_ALIAS","Anchor cannot be an empty string")),a&&(y.spaceBefore=!0),o&&(y.comment=o,y.range[2]=d),y}function VC({options:n},{offset:e,source:i,end:r},a){const o=new Cc(i.substring(1));o.source===""&&a(e,"BAD_ALIAS","Alias cannot be an empty string"),o.source.endsWith(":")&&a(e+i.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const u=e+i.length,f=ml(r,u,n.strict,a);return o.range=[e,u,f.offset],f.comment&&(o.comment=f.comment),o}function GC(n,e,{offset:i,start:r,value:a,end:o},u){const f=Object.assign({_directives:e},n),d=new Br(void 0,f),g={atKey:!1,atRoot:!0,directives:d.directives,options:d.options,schema:d.schema},m=kr(r,{indicator:"doc-start",next:a??(o==null?void 0:o[0]),offset:i,onError:u,parentIndent:0,startOnNewline:!0});m.found&&(d.directives.docStart=!0,a&&(a.type==="block-map"||a.type==="block-seq")&&!m.hasNewline&&u(m.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),d.contents=a?BS(g,a,m,u):Qd(g,m.end,r,null,m,u);const y=d.contents.range[2],S=ml(o,y,!1,u);return S.comment&&(d.comment=S.comment),d.range=[i,y,S.offset],d}function qa(n){if(typeof n=="number")return[n,n+1];if(Array.isArray(n))return n.length===2?n:[n[0],n[1]];const{offset:e,source:i}=n;return[e,e+(typeof i=="string"?i.length:1)]}function i0(n){var a;let e="",i=!1,r=!1;for(let o=0;o<n.length;++o){const u=n[o];switch(u[0]){case"#":e+=(e===""?"":r?`

`:`
`)+(u.substring(1)||" "),i=!0,r=!1;break;case"%":((a=n[o+1])==null?void 0:a[0])!=="#"&&(o+=1),i=!1;break;default:i||(r=!0),i=!1}}return{comment:e,afterEmptyLine:r}}class Pd{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(i,r,a,o)=>{const u=qa(i);o?this.warnings.push(new LS(u,r,a)):this.errors.push(new hs(u,r,a))},this.directives=new Ot({version:e.version||"1.2"}),this.options=e}decorate(e,i){const{comment:r,afterEmptyLine:a}=i0(this.prelude);if(r){const o=e.contents;if(i)e.comment=e.comment?`${e.comment}
${r}`:r;else if(a||e.directives.docStart||!o)e.commentBefore=r;else if(Ke(o)&&!o.flow&&o.items.length>0){let u=o.items[0];Ve(u)&&(u=u.key);const f=u.commentBefore;u.commentBefore=f?`${r}
${f}`:r}else{const u=o.commentBefore;o.commentBefore=u?`${r}
${u}`:r}}i?(Array.prototype.push.apply(e.errors,this.errors),Array.prototype.push.apply(e.warnings,this.warnings)):(e.errors=this.errors,e.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:i0(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,i=!1,r=-1){for(const a of e)yield*this.next(a);yield*this.end(i,r)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(i,r,a)=>{const o=qa(e);o[0]+=i,this.onError(o,"BAD_DIRECTIVE",r,a)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const i=GC(this.options,this.directives,e,this.onError);this.atDirectives&&!i.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(i,!1),this.doc&&(yield this.doc),this.doc=i,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const i=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new hs(qa(e),"UNEXPECTED_TOKEN",i);this.atDirectives||!this.doc?this.errors.push(r):this.doc.errors.push(r);break}case"doc-end":{if(!this.doc){const r="Unexpected doc-end without preceding document";this.errors.push(new hs(qa(e),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;const i=ml(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),i.comment){const r=this.doc.comment;this.doc.comment=r?`${r}
${i.comment}`:i.comment}this.doc.range[2]=i.offset;break}default:this.errors.push(new hs(qa(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,i=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(e){const r=Object.assign({_directives:this.directives},this.options),a=new Br(void 0,r);this.atDirectives&&this.onError(i,"MISSING_CHAR","Missing directives-end indicator line"),a.range=[0,i,i],this.decorate(a,!1),yield a}}}function KC(n,e=!0,i){if(n){const r=(a,o,u)=>{const f=typeof a=="number"?a:Array.isArray(a)?a[0]:a.offset;if(i)i(f,o,u);else throw new hs([f,f+1],o,u)};switch(n.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return zS(n,e,r);case"block-scalar":return DS({options:{strict:e}},n,r)}}return null}function XC(n,e){const{implicitKey:i=!1,indent:r,inFlow:a=!1,offset:o=-1,type:u="PLAIN"}=e,f=pl({type:u,value:n},{implicitKey:i,indent:r>0?" ".repeat(r):"",inFlow:a,options:{blockQuote:!0,lineWidth:-1}}),d=e.end??[{type:"newline",offset:-1,indent:r,source:`
`}];switch(f[0]){case"|":case">":{const g=f.indexOf(`
`),m=f.substring(0,g),y=f.substring(g+1)+`
`,S=[{type:"block-scalar-header",offset:o,indent:r,source:m}];return qS(S,d)||S.push({type:"newline",offset:-1,indent:r,source:`
`}),{type:"block-scalar",offset:o,indent:r,props:S,source:y}}case'"':return{type:"double-quoted-scalar",offset:o,indent:r,source:f,end:d};case"'":return{type:"single-quoted-scalar",offset:o,indent:r,source:f,end:d};default:return{type:"scalar",offset:o,indent:r,source:f,end:d}}}function YC(n,e,i={}){let{afterKey:r=!1,implicitKey:a=!1,inFlow:o=!1,type:u}=i,f="indent"in n?n.indent:null;if(r&&typeof f=="number"&&(f+=2),!u)switch(n.type){case"single-quoted-scalar":u="QUOTE_SINGLE";break;case"double-quoted-scalar":u="QUOTE_DOUBLE";break;case"block-scalar":{const g=n.props[0];if(g.type!=="block-scalar-header")throw new Error("Invalid block scalar header");u=g.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:u="PLAIN"}const d=pl({type:u,value:e},{implicitKey:a||f===null,indent:f!==null&&f>0?" ".repeat(f):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}});switch(d[0]){case"|":case">":FC(n,d);break;case'"':Ch(n,d,"double-quoted-scalar");break;case"'":Ch(n,d,"single-quoted-scalar");break;default:Ch(n,d,"scalar")}}function FC(n,e){const i=e.indexOf(`
`),r=e.substring(0,i),a=e.substring(i+1)+`
`;if(n.type==="block-scalar"){const o=n.props[0];if(o.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o.source=r,n.source=a}else{const{offset:o}=n,u="indent"in n?n.indent:-1,f=[{type:"block-scalar-header",offset:o,indent:u,source:r}];qS(f,"end"in n?n.end:void 0)||f.push({type:"newline",offset:-1,indent:u,source:`
`});for(const d of Object.keys(n))d!=="type"&&d!=="offset"&&delete n[d];Object.assign(n,{type:"block-scalar",indent:u,props:f,source:a})}}function qS(n,e){if(e)for(const i of e)switch(i.type){case"space":case"comment":n.push(i);break;case"newline":return n.push(i),!0}return!1}function Ch(n,e,i){switch(n.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":n.type=i,n.source=e;break;case"block-scalar":{const r=n.props.slice(1);let a=e.length;n.props[0].type==="block-scalar-header"&&(a-=n.props[0].source.length);for(const o of r)o.offset+=a;delete n.props,Object.assign(n,{type:i,source:e,end:r});break}case"block-map":case"block-seq":{const a={type:"newline",offset:n.offset+e.length,indent:n.indent,source:`
`};delete n.items,Object.assign(n,{type:i,source:e,end:[a]});break}default:{const r="indent"in n?n.indent:-1,a="end"in n&&Array.isArray(n.end)?n.end.filter(o=>o.type==="space"||o.type==="comment"||o.type==="newline"):[];for(const o of Object.keys(n))o!=="type"&&o!=="offset"&&delete n[o];Object.assign(n,{type:i,indent:r,source:e,end:a})}}}const QC=n=>"type"in n?mc(n):ic(n);function mc(n){switch(n.type){case"block-scalar":{let e="";for(const i of n.props)e+=mc(i);return e+n.source}case"block-map":case"block-seq":{let e="";for(const i of n.items)e+=ic(i);return e}case"flow-collection":{let e=n.start.source;for(const i of n.items)e+=ic(i);for(const i of n.end)e+=i.source;return e}case"document":{let e=ic(n);if(n.end)for(const i of n.end)e+=i.source;return e}default:{let e=n.source;if("end"in n&&n.end)for(const i of n.end)e+=i.source;return e}}}function ic({start:n,key:e,sep:i,value:r}){let a="";for(const o of n)a+=o.source;if(e&&(a+=mc(e)),i)for(const o of i)a+=o.source;return r&&(a+=mc(r)),a}const Wh=Symbol("break visit"),PC=Symbol("skip children"),$S=Symbol("remove item");function ps(n,e){"type"in n&&n.type==="document"&&(n={start:n.start,value:n.value}),IS(Object.freeze([]),n,e)}ps.BREAK=Wh;ps.SKIP=PC;ps.REMOVE=$S;ps.itemAtPath=(n,e)=>{let i=n;for(const[r,a]of e){const o=i==null?void 0:i[r];if(o&&"items"in o)i=o.items[a];else return}return i};ps.parentCollection=(n,e)=>{const i=ps.itemAtPath(n,e.slice(0,-1)),r=e[e.length-1][0],a=i==null?void 0:i[r];if(a&&"items"in a)return a;throw new Error("Parent collection not found")};function IS(n,e,i){let r=i(e,n);if(typeof r=="symbol")return r;for(const a of["key","value"]){const o=e[a];if(o&&"items"in o){for(let u=0;u<o.items.length;++u){const f=IS(Object.freeze(n.concat([[a,u]])),o.items[u],i);if(typeof f=="number")u=f-1;else{if(f===Wh)return Wh;f===$S&&(o.items.splice(u,1),u-=1)}}typeof r=="function"&&a==="key"&&(r=r(e,n))}}return typeof r=="function"?r(e,n):r}const Uc="\uFEFF",Hc="",Bc="",cl="",JC=n=>!!n&&"items"in n,ZC=n=>!!n&&(n.type==="scalar"||n.type==="single-quoted-scalar"||n.type==="double-quoted-scalar"||n.type==="block-scalar");function WC(n){switch(n){case Uc:return"<BOM>";case Hc:return"<DOC>";case Bc:return"<FLOW_END>";case cl:return"<SCALAR>";default:return JSON.stringify(n)}}function VS(n){switch(n){case Uc:return"byte-order-mark";case Hc:return"doc-mode";case Bc:return"flow-error-end";case cl:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
`:case`\r
`:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(n[0]){case" ":case"	":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}const e2=Object.freeze(Object.defineProperty({__proto__:null,BOM:Uc,DOCUMENT:Hc,FLOW_END:Bc,SCALAR:cl,createScalarToken:XC,isCollection:JC,isScalar:ZC,prettyToken:WC,resolveAsScalar:KC,setScalarValue:YC,stringify:QC,tokenType:VS,visit:ps},Symbol.toStringTag,{value:"Module"}));function xn(n){switch(n){case void 0:case" ":case`
`:case"\r":case"	":return!0;default:return!1}}const s0=new Set("0123456789ABCDEFabcdef"),t2=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Go=new Set(",[]{}"),n2=new Set(` ,[]{}
\r	`),Nh=n=>!n||n2.has(n);class GS{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(e,i=!1){if(e){if(typeof e!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+e:e,this.lineEndPos=null}this.atEnd=!i;let r=this.next??"stream";for(;r&&(i||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,i=this.buffer[e];for(;i===" "||i==="	";)i=this.buffer[++e];return!i||i==="#"||i===`
`?!0:i==="\r"?this.buffer[e+1]===`
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let i=this.buffer[e];if(this.indentNext>0){let r=0;for(;i===" ";)i=this.buffer[++r+e];if(i==="\r"){const a=this.buffer[r+e+1];if(a===`
`||!a&&!this.atEnd)return e+r+1}return i===`
`||r>=this.indentNext||!i&&!this.atEnd?e+r:-1}if(i==="-"||i==="."){const r=this.buffer.substr(e,3);if((r==="---"||r==="...")&&xn(this.buffer[e+3]))return-1}return e}getLine(){let e=this.lineEndPos;return(typeof e!="number"||e!==-1&&e<this.pos)&&(e=this.buffer.indexOf(`
`,this.pos),this.lineEndPos=e),e===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[e-1]==="\r"&&(e-=1),this.buffer.substring(this.pos,e))}hasChars(e){return this.pos+e<=this.buffer.length}setNext(e){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=e,null}peek(e){return this.buffer.substr(this.pos,e)}*parseNext(e){switch(e){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let e=this.getLine();if(e===null)return this.setNext("stream");if(e[0]===Uc&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let i=e.length,r=e.indexOf("#");for(;r!==-1;){const o=e[r-1];if(o===" "||o==="	"){i=r-1;break}else r=e.indexOf("#",r+1)}for(;;){const o=e[i-1];if(o===" "||o==="	")i-=1;else break}const a=(yield*this.pushCount(i))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-a),this.pushNewline(),"stream"}if(this.atLineEnd()){const i=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-i),yield*this.pushNewline(),"stream"}return yield Hc,yield*this.parseLineStart()}*parseLineStart(){const e=this.charAt(0);if(!e&&!this.atEnd)return this.setNext("line-start");if(e==="-"||e==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const i=this.peek(3);if((i==="---"||i==="...")&&xn(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,i==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!xn(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,i]=this.peek(2);if(!i&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&xn(i)){const r=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=r,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const e=this.getLine();if(e===null)return this.setNext("doc");let i=yield*this.pushIndicators();switch(e[i]){case"#":yield*this.pushCount(e.length-i);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Nh),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return i+=yield*this.parseBlockScalarHeader(),i+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-i),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,i,r=-1;do e=yield*this.pushNewline(),e>0?(i=yield*this.pushSpaces(!1),this.indentValue=r=i):i=0,i+=yield*this.pushSpaces(!0);while(e+i>0);const a=this.getLine();if(a===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&a[0]!=="#"||r===0&&(a.startsWith("---")||a.startsWith("..."))&&xn(a[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(a[0]==="]"||a[0]==="}")))return this.flowLevel=0,yield Bc,yield*this.parseLineStart();let o=0;for(;a[o]===",";)o+=yield*this.pushCount(1),o+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(o+=yield*this.pushIndicators(),a[o]){case void 0:return"flow";case"#":return yield*this.pushCount(a.length-o),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Nh),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const u=this.charAt(1);if(this.flowKey||xn(u)||u===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const e=this.charAt(0);let i=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;i!==-1&&this.buffer[i+1]==="'";)i=this.buffer.indexOf("'",i+2);else for(;i!==-1;){let o=0;for(;this.buffer[i-1-o]==="\\";)o+=1;if(o%2===0)break;i=this.buffer.indexOf('"',i+1)}const r=this.buffer.substring(0,i);let a=r.indexOf(`
`,this.pos);if(a!==-1){for(;a!==-1;){const o=this.continueScalar(a+1);if(o===-1)break;a=r.indexOf(`
`,o)}a!==-1&&(i=a-(r[a-1]==="\r"?2:1))}if(i===-1){if(!this.atEnd)return this.setNext("quoted-scalar");i=this.buffer.length}return yield*this.pushToIndex(i+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const i=this.buffer[++e];if(i==="+")this.blockScalarKeep=!0;else if(i>"0"&&i<="9")this.blockScalarIndent=Number(i)-1;else if(i!=="-")break}return yield*this.pushUntil(i=>xn(i)||i==="#")}*parseBlockScalar(){let e=this.pos-1,i=0,r;e:for(let o=this.pos;r=this.buffer[o];++o)switch(r){case" ":i+=1;break;case`
`:e=o,i=0;break;case"\r":{const u=this.buffer[o+1];if(!u&&!this.atEnd)return this.setNext("block-scalar");if(u===`
`)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(i>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=i:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const o=this.continueScalar(e+1);if(o===-1)break;e=this.buffer.indexOf(`
`,o)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let a=e+1;for(r=this.buffer[a];r===" ";)r=this.buffer[++a];if(r==="	"){for(;r==="	"||r===" "||r==="\r"||r===`
`;)r=this.buffer[++a];e=a-1}else if(!this.blockScalarKeep)do{let o=e-1,u=this.buffer[o];u==="\r"&&(u=this.buffer[--o]);const f=o;for(;u===" ";)u=this.buffer[--o];if(u===`
`&&o>=this.pos&&o+1+i>f)e=o;else break}while(!0);return yield cl,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let i=this.pos-1,r=this.pos-1,a;for(;a=this.buffer[++r];)if(a===":"){const o=this.buffer[r+1];if(xn(o)||e&&Go.has(o))break;i=r}else if(xn(a)){let o=this.buffer[r+1];if(a==="\r"&&(o===`
`?(r+=1,a=`
`,o=this.buffer[r+1]):i=r),o==="#"||e&&Go.has(o))break;if(a===`
`){const u=this.continueScalar(r+1);if(u===-1)break;r=Math.max(r,u-2)}}else{if(e&&Go.has(a))break;i=r}return!a&&!this.atEnd?this.setNext("plain-scalar"):(yield cl,yield*this.pushToIndex(i+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,i){const r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(i&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Nh))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,i=this.charAt(1);if(xn(i)||e&&Go.has(i))return e?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let e=this.pos+2,i=this.buffer[e];for(;!xn(i)&&i!==">";)i=this.buffer[++e];return yield*this.pushToIndex(i===">"?e+1:e,!1)}else{let e=this.pos+1,i=this.buffer[e];for(;i;)if(t2.has(i))i=this.buffer[++e];else if(i==="%"&&s0.has(this.buffer[e+1])&&s0.has(this.buffer[e+2]))i=this.buffer[e+=3];else break;return yield*this.pushToIndex(e,!1)}}*pushNewline(){const e=this.buffer[this.pos];return e===`
`?yield*this.pushCount(1):e==="\r"&&this.charAt(1)===`
`?yield*this.pushCount(2):0}*pushSpaces(e){let i=this.pos-1,r;do r=this.buffer[++i];while(r===" "||e&&r==="	");const a=i-this.pos;return a>0&&(yield this.buffer.substr(this.pos,a),this.pos=i),a}*pushUntil(e){let i=this.pos,r=this.buffer[i];for(;!e(r);)r=this.buffer[++i];return yield*this.pushToIndex(i,!1)}}class KS{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let i=0,r=this.lineStarts.length;for(;i<r;){const o=i+r>>1;this.lineStarts[o]<e?i=o+1:r=o}if(this.lineStarts[i]===e)return{line:i+1,col:1};if(i===0)return{line:0,col:e};const a=this.lineStarts[i-1];return{line:i,col:e-a+1}}}}function Li(n,e){for(let i=0;i<n.length;++i)if(n[i].type===e)return!0;return!1}function r0(n){for(let e=0;e<n.length;++e)switch(n[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function XS(n){switch(n==null?void 0:n.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Ko(n){switch(n.type){case"document":return n.start;case"block-map":{const e=n.items[n.items.length-1];return e.sep??e.start}case"block-seq":return n.items[n.items.length-1].start;default:return[]}}function dr(n){var i;if(n.length===0)return[];let e=n.length;e:for(;--e>=0;)switch(n[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((i=n[++e])==null?void 0:i.type)==="space";);return n.splice(e,n.length)}function a0(n){if(n.start.type==="flow-seq-start")for(const e of n.items)e.sep&&!e.value&&!Li(e.start,"explicit-key-ind")&&!Li(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,XS(e.value)?e.value.end?Array.prototype.push.apply(e.value.end,e.sep):e.value.end=e.sep:Array.prototype.push.apply(e.start,e.sep),delete e.sep)}class Jd{constructor(e){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new GS,this.onNewLine=e}*parse(e,i=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const r of this.lexer.lex(e,i))yield*this.next(r);i||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}const i=VS(e);if(i)if(i==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=i,yield*this.step(),i){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+e.length);break;case"space":this.atNewLine&&e[0]===" "&&(this.indent+=e.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=e.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=e.length}else{const r=`Not a YAML token: ${e}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:e}),this.offset+=e.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const e=this.peek(1);if(this.type==="doc-end"&&(e==null?void 0:e.type)!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!e)return yield*this.stream();switch(e.type){case"document":return yield*this.document(e);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(e);case"block-scalar":return yield*this.blockScalar(e);case"block-map":return yield*this.blockMap(e);case"block-seq":return yield*this.blockSequence(e);case"flow-collection":return yield*this.flowCollection(e);case"doc-end":return yield*this.documentEnd(e)}yield*this.pop()}peek(e){return this.stack[this.stack.length-e]}*pop(e){const i=e??this.stack.pop();if(!i)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield i;else{const r=this.peek(1);switch(i.type==="block-scalar"?i.indent="indent"in r?r.indent:0:i.type==="flow-collection"&&r.type==="document"&&(i.indent=0),i.type==="flow-collection"&&a0(i),r.type){case"document":r.value=i;break;case"block-scalar":r.props.push(i);break;case"block-map":{const a=r.items[r.items.length-1];if(a.value){r.items.push({start:[],key:i,sep:[]}),this.onKeyLine=!0;return}else if(a.sep)a.value=i;else{Object.assign(a,{key:i,sep:[]}),this.onKeyLine=!a.explicitKey;return}break}case"block-seq":{const a=r.items[r.items.length-1];a.value?r.items.push({start:[],value:i}):a.value=i;break}case"flow-collection":{const a=r.items[r.items.length-1];!a||a.value?r.items.push({start:[],key:i,sep:[]}):a.sep?a.value=i:Object.assign(a,{key:i,sep:[]});return}default:yield*this.pop(),yield*this.pop(i)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(i.type==="block-map"||i.type==="block-seq")){const a=i.items[i.items.length-1];a&&!a.sep&&!a.value&&a.start.length>0&&r0(a.start)===-1&&(i.indent===0||a.start.every(o=>o.type!=="comment"||o.indent<i.indent))&&(r.type==="document"?r.end=a.start:r.items.push({start:a.start}),i.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const e={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&e.start.push(this.sourceToken),this.stack.push(e);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(e){if(e.value)return yield*this.lineEnd(e);switch(this.type){case"doc-start":{r0(e.start)!==-1?(yield*this.pop(),yield*this.step()):e.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":e.start.push(this.sourceToken);return}const i=this.startBlockValue(e);i?this.stack.push(i):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(e){if(this.type==="map-value-ind"){const i=Ko(this.peek(2)),r=dr(i);let a;e.end?(a=e.end,a.push(this.sourceToken),delete e.end):a=[this.sourceToken];const o={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:r,key:e,sep:a}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(e)}*blockScalar(e){switch(this.type){case"space":case"comment":case"newline":e.props.push(this.sourceToken);return;case"scalar":if(e.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let i=this.source.indexOf(`
`)+1;for(;i!==0;)this.onNewLine(this.offset+i),i=this.source.indexOf(`
`,i)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){var r;const i=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,i.value){const a="end"in i.value?i.value.end:void 0,o=Array.isArray(a)?a[a.length-1]:void 0;(o==null?void 0:o.type)==="comment"?a==null||a.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else i.sep?i.sep.push(this.sourceToken):i.start.push(this.sourceToken);return;case"space":case"comment":if(i.value)e.items.push({start:[this.sourceToken]});else if(i.sep)i.sep.push(this.sourceToken);else{if(this.atIndentedComment(i.start,e.indent)){const a=e.items[e.items.length-2],o=(r=a==null?void 0:a.value)==null?void 0:r.end;if(Array.isArray(o)){Array.prototype.push.apply(o,i.start),o.push(this.sourceToken),e.items.pop();return}}i.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const a=!this.onKeyLine&&this.indent===e.indent,o=a&&(i.sep||i.explicitKey)&&this.type!=="seq-item-ind";let u=[];if(o&&i.sep&&!i.value){const f=[];for(let d=0;d<i.sep.length;++d){const g=i.sep[d];switch(g.type){case"newline":f.push(d);break;case"space":break;case"comment":g.indent>e.indent&&(f.length=0);break;default:f.length=0}}f.length>=2&&(u=i.sep.splice(f[1]))}switch(this.type){case"anchor":case"tag":o||i.value?(u.push(this.sourceToken),e.items.push({start:u}),this.onKeyLine=!0):i.sep?i.sep.push(this.sourceToken):i.start.push(this.sourceToken);return;case"explicit-key-ind":!i.sep&&!i.explicitKey?(i.start.push(this.sourceToken),i.explicitKey=!0):o||i.value?(u.push(this.sourceToken),e.items.push({start:u,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(i.explicitKey)if(i.sep)if(i.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Li(i.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:u,key:null,sep:[this.sourceToken]}]});else if(XS(i.key)&&!Li(i.sep,"newline")){const f=dr(i.start),d=i.key,g=i.sep;g.push(this.sourceToken),delete i.key,delete i.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:f,key:d,sep:g}]})}else u.length>0?i.sep=i.sep.concat(u,this.sourceToken):i.sep.push(this.sourceToken);else if(Li(i.start,"newline"))Object.assign(i,{key:null,sep:[this.sourceToken]});else{const f=dr(i.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:f,key:null,sep:[this.sourceToken]}]})}else i.sep?i.value||o?e.items.push({start:u,key:null,sep:[this.sourceToken]}):Li(i.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):i.sep.push(this.sourceToken):Object.assign(i,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const f=this.flowScalar(this.type);o||i.value?(e.items.push({start:u,key:f,sep:[]}),this.onKeyLine=!0):i.sep?this.stack.push(f):(Object.assign(i,{key:f,sep:[]}),this.onKeyLine=!0);return}default:{const f=this.startBlockValue(e);if(f){if(f.type==="block-seq"){if(!i.explicitKey&&i.sep&&!Li(i.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else a&&e.items.push({start:u});this.stack.push(f);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var r;const i=e.items[e.items.length-1];switch(this.type){case"newline":if(i.value){const a="end"in i.value?i.value.end:void 0,o=Array.isArray(a)?a[a.length-1]:void 0;(o==null?void 0:o.type)==="comment"?a==null||a.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else i.start.push(this.sourceToken);return;case"space":case"comment":if(i.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(i.start,e.indent)){const a=e.items[e.items.length-2],o=(r=a==null?void 0:a.value)==null?void 0:r.end;if(Array.isArray(o)){Array.prototype.push.apply(o,i.start),o.push(this.sourceToken),e.items.pop();return}}i.start.push(this.sourceToken)}return;case"anchor":case"tag":if(i.value||this.indent<=e.indent)break;i.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;i.value||Li(i.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):i.start.push(this.sourceToken);return}if(this.indent>e.indent){const a=this.startBlockValue(e);if(a){this.stack.push(a);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){const i=e.items[e.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while((r==null?void 0:r.type)==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!i||i.sep?e.items.push({start:[this.sourceToken]}):i.start.push(this.sourceToken);return;case"map-value-ind":!i||i.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):i.sep?i.sep.push(this.sourceToken):Object.assign(i,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!i||i.value?e.items.push({start:[this.sourceToken]}):i.sep?i.sep.push(this.sourceToken):i.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const a=this.flowScalar(this.type);!i||i.value?e.items.push({start:[],key:a,sep:[]}):i.sep?this.stack.push(a):Object.assign(i,{key:a,sep:[]});return}case"flow-map-end":case"flow-seq-end":e.end.push(this.sourceToken);return}const r=this.startBlockValue(e);r?this.stack.push(r):(yield*this.pop(),yield*this.step())}else{const r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===e.indent||this.type==="newline"&&!r.items[r.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){const a=Ko(r),o=dr(a);a0(e);const u=e.end.splice(1,e.end.length);u.push(this.sourceToken);const f={type:"block-map",offset:e.offset,indent:e.indent,items:[{start:o,key:e,sep:u}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=f}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let i=this.source.indexOf(`
`)+1;for(;i!==0;)this.onNewLine(this.offset+i),i=this.source.indexOf(`
`,i)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const i=Ko(e),r=dr(i);return r.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const i=Ko(e),r=dr(i);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,i){return this.type!=="comment"||this.indent<=i?!1:e.every(r=>r.type==="newline"||r.type==="space")}*documentEnd(e){this.type!=="doc-mode"&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function YS(n){const e=n.prettyErrors!==!1;return{lineCounter:n.lineCounter||e&&new KS||null,prettyErrors:e}}function i2(n,e={}){const{lineCounter:i,prettyErrors:r}=YS(e),a=new Jd(i==null?void 0:i.addNewLine),o=new Pd(e),u=Array.from(o.compose(a.parse(n)));if(r&&i)for(const f of u)f.errors.forEach(gc(n,i)),f.warnings.forEach(gc(n,i));return u.length>0?u:Object.assign([],{empty:!0},o.streamInfo())}function FS(n,e={}){const{lineCounter:i,prettyErrors:r}=YS(e),a=new Jd(i==null?void 0:i.addNewLine),o=new Pd(e);let u=null;for(const f of o.compose(a.parse(n),!0,n.length))if(!u)u=f;else if(u.options.logLevel!=="silent"){u.errors.push(new hs(f.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&i&&(u.errors.forEach(gc(n,i)),u.warnings.forEach(gc(n,i))),u}function s2(n,e,i){let r;typeof e=="function"?r=e:i===void 0&&e&&typeof e=="object"&&(i=e);const a=FS(n,i);if(!a)return null;if(a.warnings.forEach(o=>pS(a.options.logLevel,o)),a.errors.length>0){if(a.options.logLevel!=="silent")throw a.errors[0];a.errors=[]}return a.toJS(Object.assign({reviver:r},i))}function r2(n,e,i){let r=null;if(typeof e=="function"||Array.isArray(e)?r=e:i===void 0&&e&&(i=e),typeof i=="string"&&(i=i.length),typeof i=="number"){const a=Math.round(i);i=a<1?void 0:a>8?{indent:8}:{indent:a}}if(n===void 0){const{keepUndefined:a}=i??e??{};if(!a)return}return ms(n)&&!r?n.toString(i):new Br(n,r,i).toString(i)}const QS=Object.freeze(Object.defineProperty({__proto__:null,Alias:Cc,CST:e2,Composer:Pd,Document:Br,Lexer:GS,LineCounter:KS,Pair:Nt,Parser:Jd,Scalar:de,Schema:zc,YAMLError:Fd,YAMLMap:nn,YAMLParseError:hs,YAMLSeq:zi,YAMLWarning:LS,isAlias:Hi,isCollection:Ke,isDocument:ms,isMap:Dr,isNode:Xe,isPair:Ve,isScalar:ze,isSeq:zr,parse:s2,parseAllDocuments:i2,parseDocument:FS,stringify:r2,visit:ys,visitAsync:Ac},Symbol.toStringTag,{value:"Module"})),l0=[.5,1,2];function a2(n,e,i,r,a){const[o,u]=R.useState(!1),[f,d]=R.useState(1),[g,m]=R.useState(!1),[y,S]=R.useState(void 0),[w,E]=R.useState(void 0),x=l0[f],_=e?n.indexOf(e):-1,A=a.minimum,C=a.maximum,H=C-A||1,V=r?r.minimum:A,K=r?r.maximum:C,Q=R.useMemo(()=>r?n.filter(fe=>fe.startTime>=r.minimum&&fe.startTime<=r.maximum):n,[n,r]),j=Q.length?n.indexOf(Q[0]):0,I=Q.length?n.indexOf(Q[Q.length-1]):n.length-1,O=R.useRef(n);O.current=n;const P=R.useRef(i);P.current=i;const J=R.useRef(null),$=R.useCallback(fe=>{let _e=0,Ue=n.length-1;for(;_e<Ue;){const He=_e+Ue+1>>1;n[He].startTime<=fe?_e=He:Ue=He-1}if(_e<n.length-1){const He=fe-n[_e].startTime;n[_e+1].startTime-fe<He&&(_e=_e+1)}return Math.max(j,Math.min(I,_e))},[n,j,I]),ee=e?e.startTime:A;let ce;g&&y!==void 0?ce=y*100:o&&w!==void 0?ce=Math.max(0,Math.min(100,(w-A)/H*100)):ce=Math.max(0,Math.min(100,(ee-A)/H*100));const Me=R.useRef(V);Me.current=V;const q=R.useRef(K);q.current=K,R.useEffect(()=>{if(!o)return;let fe,_e,Ue=ee;Ue<Me.current&&(Ue=Me.current);let He=_;E(Ue);const Xt=Ye=>{if(_e!==void 0){const bs=(Ye-_e)*x;Ue=Math.min(Ue+bs,q.current)}_e=Ye,E(Ue);const Yt=$(Ue);if(Yt!==He&&(He=Yt,P.current(O.current[Yt])),Ue>=q.current){u(!1);return}fe=requestAnimationFrame(Xt)};return fe=requestAnimationFrame(Xt),()=>cancelAnimationFrame(fe)},[o,x]),R.useEffect(()=>{o||E(void 0)},[o]);const Z=R.useCallback(()=>{if(!n.length)return;const fe=_>=I;!o&&fe&&i(n[j]),u(!o)},[o,n,_,i,j,I]),re=R.useCallback(()=>{u(!1),n.length&&i(n[j])},[n,i,j]),me=R.useCallback(()=>{const fe=Math.max(_-1,j);fe!==_&&i(n[fe])},[n,_,i,j]),Ee=R.useCallback(()=>{const fe=Math.min(_+1,I);fe!==_&&i(n[fe])},[n,_,i,I]),M=R.useCallback(()=>{d(fe=>(fe+1)%l0.length)},[]);R.useEffect(()=>{u(!1)},[n]);const X=R.useCallback(fe=>{const _e=J.current.getBoundingClientRect();return Math.max(0,Math.min(1,(fe.clientX-_e.left)/_e.width))},[]),W=R.useCallback(fe=>{if(!n.length)return;const _e=A+fe*H,Ue=$(_e);P.current(O.current[Ue])},[n,A,H,$]),te=R.useRef(null);R.useEffect(()=>()=>{var fe;return(fe=te.current)==null?void 0:fe.call(te)},[]);const ue=R.useCallback(fe=>{var Xt;if(!n.length||fe.button!==0)return;fe.preventDefault(),fe.stopPropagation(),(Xt=J.current)==null||Xt.focus(),m(!0),u(!1);const _e=X(fe);S(_e),W(_e);const Ue=Ye=>{const Yt=X(Ye);S(Yt),W(Yt)},He=Ye=>{document.removeEventListener("mousemove",Ue),document.removeEventListener("mouseup",He),te.current=null;const Yt=X(Ye);W(Yt),S(void 0),m(!1)};document.addEventListener("mousemove",Ue),document.addEventListener("mouseup",He),te.current=()=>{document.removeEventListener("mousemove",Ue),document.removeEventListener("mouseup",He)}},[n,W,X]),se=!o&&!g,xe=n.length>0&&n.length<=200?n.map(fe=>(fe.startTime-A)/H*100):void 0,nt=_>j,Re=_<I,Rn=o||_>j;return{playing:o,speed:x,currentIndex:_,percent:ce,animating:se,togglePlay:Z,stop:re,prev:me,next:Ee,cycleSpeed:M,onScrubberMouseDown:ue,scrubberRef:J,actionsLength:n.length,canPrev:nt,canNext:Re,canStop:Rn,ticks:xe}}const l2=({playback:n})=>b.jsxs(b.Fragment,{children:[b.jsx(ct,{icon:"chevron-left",title:"Previous action",onClick:n.prev,disabled:!n.canPrev}),b.jsx(ct,{icon:n.playing?"debug-pause":"play",disabled:!n.actionsLength,title:n.playing?"Pause":"Play",onClick:n.togglePlay}),b.jsx(ct,{icon:"debug-stop",title:"Stop",onClick:n.stop,disabled:!n.canStop}),b.jsx(ct,{icon:"chevron-right",title:"Next action",onClick:n.next,disabled:!n.canNext}),b.jsxs("button",{className:"playback-speed",onClick:n.cycleSpeed,title:"Playback speed",children:[n.speed,"x"]})]}),o2=({playback:n})=>{var i;const e=R.useCallback(r=>{r.key==="ArrowLeft"?(r.preventDefault(),n.prev()):r.key==="ArrowRight"&&(r.preventDefault(),n.next())},[n]);return b.jsxs("div",{className:"playback-scrubber",ref:n.scrubberRef,onMouseDown:n.onScrubberMouseDown,onKeyDown:e,tabIndex:0,role:"slider","aria-label":"Playback position","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.round(n.percent),children:[b.jsx("div",{className:"playback-track"}),b.jsx("div",{className:"playback-track-filled"+(n.animating?" animated":""),style:{width:`${n.percent}%`}}),(i=n.ticks)==null?void 0:i.map((r,a)=>b.jsx("div",{className:"playback-tick",style:{left:`${r}%`}},a)),b.jsx("div",{className:"playback-thumb"+(n.animating?" animated":""),style:{left:`${n.percent}%`}})]})},c2=({action:n,model:e,sdkLanguage:i,testIdAttributeName:r,isInspecting:a,setIsInspecting:o,highlightedElement:u,setHighlightedElement:f,playback:d})=>{const[g,m]=R.useState("action"),[y]=jt("shouldPopulateCanvasFromScreenshot",!1),S=R.useMemo(()=>d2(n),[n]),{snapshotInfoUrl:w,snapshotUrl:E,popoutUrl:x}=R.useMemo(()=>{const A=S[g];return e&&A?p2(e.traceUri,A,y):{snapshotInfoUrl:void 0,snapshotUrl:void 0,popoutUrl:void 0}},[S,g,y,e]),_=R.useMemo(()=>w!==void 0?{snapshotInfoUrl:w,snapshotUrl:E,popoutUrl:x}:void 0,[w,E,x]);return b.jsxs("div",{className:"snapshot-tab vbox",children:[b.jsxs(dl,{children:[b.jsx(ct,{className:"pick-locator",title:"Pick locator",icon:"target",toggled:a,onClick:()=>o(!a)}),b.jsx("div",{className:"hbox",style:{height:"100%"},role:"tablist",children:["action","before","after"].map(A=>b.jsx(W0,{id:A,title:h2(A),selected:g===A,onSelect:()=>m(A)},A))}),b.jsx("div",{style:{flex:"auto"}}),b.jsx(l2,{playback:d}),b.jsx(ct,{icon:"link-external",title:"Open snapshot in a new tab",disabled:!(_!=null&&_.popoutUrl),onClick:()=>{const A=window.open((_==null?void 0:_.popoutUrl)||"","_blank");A==null||A.addEventListener("DOMContentLoaded",()=>{new Qv(A,{isUnderTest:JS,sdkLanguage:i,testIdAttributeName:r,stableRafCount:1,browserName:"chromium",customEngines:[]}).consoleApi.install()})}})]}),b.jsx(u2,{snapshotUrls:_,sdkLanguage:i,testIdAttributeName:r,isInspecting:a,setIsInspecting:o,highlightedElement:u,setHighlightedElement:f})]})},u2=({snapshotUrls:n,sdkLanguage:e,testIdAttributeName:i,isInspecting:r,setIsInspecting:a,highlightedElement:o,setHighlightedElement:u})=>{const f=R.useRef(null),d=R.useRef(null),[g,m]=R.useState({viewport:ZS,url:""}),y=R.useRef({iteration:0,visibleIframe:0});return R.useEffect(()=>{(async()=>{const S=y.current.iteration+1,w=1-y.current.visibleIframe;y.current.iteration=S;const E=await g2(n==null?void 0:n.snapshotInfoUrl);if(y.current.iteration!==S)return;const x=[f,d][w].current;if(x){let _=()=>{};const A=new Promise(C=>_=C);try{x.addEventListener("load",_),x.addEventListener("error",_);const C=(n==null?void 0:n.snapshotUrl)||YA;x.contentWindow?x.contentWindow.location.replace(C):x.src=C,await A}catch{}finally{x.removeEventListener("load",_),x.removeEventListener("error",_)}}y.current.iteration===S&&(y.current.visibleIframe=w,m(E))})()},[n]),b.jsxs("div",{className:"vbox",tabIndex:0,onKeyDown:S=>{S.key==="Escape"&&r&&a(!1)},children:[b.jsx(o0,{isInspecting:r,sdkLanguage:e,testIdAttributeName:i,highlightedElement:o,setHighlightedElement:u,iframe:f.current,iteration:y.current.iteration}),b.jsx(o0,{isInspecting:r,sdkLanguage:e,testIdAttributeName:i,highlightedElement:o,setHighlightedElement:u,iframe:d.current,iteration:y.current.iteration}),b.jsx(f2,{snapshotInfo:g,children:b.jsxs("div",{className:"snapshot-switcher",children:[b.jsx("iframe",{ref:f,name:"snapshot",title:"DOM Snapshot",sandbox:"allow-same-origin allow-scripts",className:ut(y.current.visibleIframe===0&&"snapshot-visible")}),b.jsx("iframe",{ref:d,name:"snapshot",title:"DOM Snapshot",sandbox:"allow-same-origin allow-scripts",className:ut(y.current.visibleIframe===1&&"snapshot-visible")})]})})]})},f2=({snapshotInfo:n,children:e})=>{const[i,r]=gs(),a=40,o={width:n.viewport.width,height:n.viewport.height},u={width:Math.max(o.width,480),height:Math.max(o.height+a,320)},f=Math.min(i.width/u.width,i.height/u.height,1),d={x:(i.width-u.width)/2,y:(i.height-u.height)/2};return b.jsx("div",{ref:r,className:"snapshot-wrapper",children:b.jsxs("div",{className:"snapshot-container",style:{width:u.width+"px",height:u.height+"px",transform:`translate(${d.x}px, ${d.y}px) scale(${f})`},children:[b.jsx(JA,{url:n.url}),b.jsx("div",{className:"snapshot-browser-body",children:b.jsx("div",{style:{width:o.width+"px",height:o.height+"px"},children:e})})]})})};function h2(n){return n==="before"?"Before":n==="after"?"After":n==="action"?"Action":n}const o0=({iframe:n,isInspecting:e,sdkLanguage:i,testIdAttributeName:r,highlightedElement:a,setHighlightedElement:o,iteration:u})=>(R.useEffect(()=>{const f=a.lastEdited==="ariaSnapshot"?a.ariaSnapshot:void 0,d=a.lastEdited==="locator"?a.locator:void 0,g=!!f||!!d||e,m=[],y=new URLSearchParams(window.location.search).get("isUnderTest")==="true";try{PS(m,g,i,r,y,"",n==null?void 0:n.contentWindow)}catch{}const S=f?dd(QS,f):void 0,w=d?QA(i,d,r):void 0;for(const{recorder:E,frameSelector:x}of m){const _=w!=null&&w.startsWith(x)?w.substring(x.length).trim():void 0,A=(S==null?void 0:S.errors.length)===0?S.fragment:void 0;E.setUIState({mode:e?"inspecting":"none",actionSelector:_,ariaTemplate:A,language:i,testIdAttributeName:r,overlay:{offsetX:0}},{async elementPicked(C){o({locator:Ri(i,x+C.selector),ariaSnapshot:C.ariaSnapshot,lastEdited:"none"})},highlightUpdated(){for(const C of m)C.recorder!==E&&C.recorder.clearHighlight()}})}},[n,e,a,o,i,r,u]),b.jsx(b.Fragment,{}));function PS(n,e,i,r,a,o,u){if(!u)return;const f=u;if(!f._recorder&&e){const d=new Qv(u,{isUnderTest:a,sdkLanguage:i,testIdAttributeName:r,stableRafCount:1,browserName:"chromium",customEngines:[]}),g=new IA(d);f._injectedScript=d,f._recorder={recorder:g,frameSelector:o},a&&(window._weakRecordersForTest=window._weakRecordersForTest||new Set,window._weakRecordersForTest.add(new WeakRef(g)))}f._recorder&&n.push(f._recorder);for(let d=0;d<u.frames.length;++d){const g=u.frames[d],m=g.frameElement?f._injectedScript.generateSelectorSimple(g.frameElement,{omitInternalEngines:!0,testIdAttributeName:r})+" >> internal:control=enter-frame >> ":"";PS(n,e,i,r,a,o+m,g)}}const $a=(n,e)=>{if(!n)return;const i=n[e];if(i){if(!n.pageId){console.error("snapshot action must have a pageId");return}return{action:n,snapshotName:i,pageId:n.pageId,point:n.point}}};function d2(n){if(!n)return{};let e=$a(n,"beforeSnapshot");if(!e){for(let a=ob(n);a;a=ob(a))if(a.endTime<=n.startTime&&a.afterSnapshot){e=$a(a,"afterSnapshot");break}}let i=$a(n,"afterSnapshot");if(!i){let a;for(let o=cb(n);o&&o.startTime<=n.endTime;o=cb(o))o.endTime>n.endTime||!o.afterSnapshot||a&&a.endTime>o.endTime||(a=o);a?i=$a(a,"afterSnapshot"):i=e}const r=$a(n,"inputSnapshot")??i;return r&&(r.point=n.point),{action:r,before:e,after:i}}const JS=new URLSearchParams(window.location.search).has("isUnderTest");function p2(n,e,i){const r=new URLSearchParams;r.set("trace",n),r.set("name",e.snapshotName),JS&&r.set("isUnderTest","true"),e.point&&(r.set("pointX",String(e.point.x)),r.set("pointY",String(e.point.y))),i&&r.set("shouldPopulateCanvasFromScreenshot","1");const a=new URL(`snapshot/${e.pageId}?${r.toString()}`,window.location.href).toString(),o=new URL(`snapshotInfo/${e.pageId}?${r.toString()}`,window.location.href).toString(),u=new URLSearchParams;u.set("r",a),u.set("trace",n);const f=new URL(`snapshot.html?${u.toString()}`,window.location.href).toString();return{snapshotInfoUrl:o,snapshotUrl:a,popoutUrl:f}}async function g2(n){const e={url:"",viewport:ZS,timestamp:void 0,wallTime:void 0};if(n){const r=await(await fetch(n)).json();r.error||(e.url=r.url,e.viewport=r.viewport,e.timestamp=r.timestamp,e.wallTime=r.wallTime)}return e}const ZS={width:1280,height:720},m2=hl,y2=({stack:n,setSelectedFrame:e,selectedFrame:i})=>{const r=n||[];return b.jsx(m2,{name:"stack-trace",ariaLabel:"Stack trace",items:r,selectedItem:r[i],render:a=>{const o=a.file[1]===":"?"\\":"/";return b.jsxs(b.Fragment,{children:[b.jsx("span",{className:"stack-trace-frame-function",children:a.function||"(anonymous)"}),b.jsx("span",{className:"stack-trace-frame-location",children:a.file.split(o).pop()}),b.jsx("span",{className:"stack-trace-frame-line",children:":"+a.line})]})},onSelected:a=>e(r.indexOf(a))})};function b2(n,e,i,r,a){const o=Ln();return yc(async()=>{var w,E,x,_;const u=n==null?void 0:n[e],f=u!=null&&u.file?u:a;if(!f)return{source:{file:"",errors:[],content:void 0},targetLine:0,highlight:[]};const d=f.file;let g=i.get(d);g||(g={errors:((w=a==null?void 0:a.source)==null?void 0:w.errors)||[],content:(E=a==null?void 0:a.source)==null?void 0:E.content},i.set(d,g));const m=(f==null?void 0:f.line)||((x=g.errors[0])==null?void 0:x.line)||0,y=r&&d.startsWith(r)?d.substring(r.length+1):d,S=g.errors.map(A=>({type:"error",line:A.line,message:A.message}));if(S.push({line:m,type:"running"}),((_=a==null?void 0:a.source)==null?void 0:_.content)!==void 0)g.content=a.source.content;else if(g.content===void 0||f===a){const A=await S2(d);try{let C=o?await fetch(o.createRelativeUrl(`sha1/src@${A}.txt`)):void 0;(!C||C.status===404)&&(C=await fetch(`file?path=${encodeURIComponent(d)}`)),C.status>=400?g.content="":g.content=await C.text()}catch{g.content=`<Unable to read "${d}">`}}return{model:o,source:g,highlight:S,targetLine:m,fileName:y,location:f}},[n,e,r,a],{source:{errors:[],content:"Loading…"},highlight:[]})}const v2=({stack:n,sources:e,rootDir:i,fallbackLocation:r,stackFrameLocation:a,onOpenExternally:o})=>{const[u,f]=R.useState(),[d,g]=R.useState(0);R.useEffect(()=>{u!==n&&(f(n),g(0))},[n,u,f,g]);const{source:m,highlight:y,targetLine:S,fileName:w,location:E}=b2(n,d,e,i,r),x=R.useCallback(()=>{E&&(o?o(E):window.location.href=`vscode://file//${E.file}:${E.line}`)},[o,E]),_=((n==null?void 0:n.length)??0)>1,A=w2(w),C=A.endsWith(".md")?"markdown":"javascript";return b.jsx(il,{sidebarSize:200,orientation:a==="bottom"?"vertical":"horizontal",sidebarHidden:!_,main:b.jsxs("div",{className:"vbox","data-testid":"source-code",children:[w&&b.jsxs(dl,{children:[b.jsx("div",{className:"source-tab-file-name",title:w,children:b.jsx("div",{children:A})}),b.jsx(ud,{description:"Copy filename",value:A}),E&&b.jsx(ct,{icon:"link-external",title:"Open in VS Code",onClick:x})]}),b.jsx(ds,{text:m.content||"",highlighter:C,highlight:y,revealLine:S,readOnly:!0,lineNumbers:!0,dataTestId:"source-code-mirror"})]}),sidebar:b.jsx(y2,{stack:n,selectedFrame:d,setSelectedFrame:g})})};async function S2(n){const e=new TextEncoder().encode(n),i=await crypto.subtle.digest("SHA-1",e),r=[],a=new DataView(i);for(let o=0;o<a.byteLength;o+=1){const u=a.getUint8(o).toString(16).padStart(2,"0");r.push(u)}return r.join("")}function w2(n){if(!n)return"";const e=n!=null&&n.includes("/")?"/":"\\";return(n==null?void 0:n.split(e).pop())??""}const WS={width:200,height:45},mr=2.5,x2=WS.height+mr*2,_2=({boundaries:n,previewPoint:e})=>{var m,y;const i=Ln(),[r,a]=gs(),o=R.useRef(null);let u=0;if(o.current&&e){const S=o.current.getBoundingClientRect();u=(e.clientY-S.top+o.current.scrollTop)/x2|0}const f=(y=(m=i==null?void 0:i.pages)==null?void 0:m[u])==null?void 0:y.screencastFrames;let d,g;if(e!==void 0&&f&&f.length){const S=n.minimum+(n.maximum-n.minimum)*e.x/r.width;d=f[u0(f,S,ew)-1];const w={width:Math.min(800,window.innerWidth/2|0),height:Math.min(800,window.innerHeight/2|0)};g=d?tw({width:d.width,height:d.height},w):void 0}return b.jsxs("div",{className:"film-strip",ref:a,children:[b.jsx("div",{className:"film-strip-lanes",ref:o,children:i==null?void 0:i.pages.map((S,w)=>S.screencastFrames.length?b.jsx(E2,{boundaries:n,page:S,width:r.width},w):null)}),i&&(e==null?void 0:e.x)!==void 0&&b.jsxs("div",{className:"film-strip-hover",style:{top:r.bottom+5,left:Math.min(e.x,r.width-(g?g.width:0)-10)},children:[d&&g&&b.jsx("div",{style:{width:g.width,height:g.height},children:b.jsx("img",{src:i.createRelativeUrl(`sha1/${d.sha1}`),width:g.width,height:g.height})}),e.action&&b.jsx("div",{className:"film-strip-hover-title",children:od(e.action,e)})]})]})},E2=({boundaries:n,page:e,width:i})=>{const r=Ln(),a={width:0,height:0},o=e.screencastFrames;for(const _ of o)a.width=Math.max(a.width,_.width),a.height=Math.max(a.height,_.height);const u=tw(a,WS),f=o[0].timestamp,d=o[o.length-1].timestamp,g=n.maximum-n.minimum,m=(f-n.minimum)/g*i,y=(n.maximum-d)/g*i,w=(d-f)/g*i/(u.width+2*mr)|0,E=(d-f)/w,x=[];for(let _=0;f&&E&&_<w;++_){const A=f+E*_,C=u0(o,A,ew)-1;x.push(b.jsx("div",{className:"film-strip-frame",style:{width:u.width,height:u.height,backgroundImage:`url(${r==null?void 0:r.createRelativeUrl("sha1/"+o[C].sha1)})`,backgroundSize:`${u.width}px ${u.height}px`,margin:mr,marginRight:mr}},_))}return x.push(b.jsx("div",{className:"film-strip-frame",style:{width:u.width,height:u.height,backgroundImage:`url(${r==null?void 0:r.createRelativeUrl("sha1/"+o[o.length-1].sha1)})`,backgroundSize:`${u.width}px ${u.height}px`,margin:mr,marginRight:mr}},x.length)),b.jsx("div",{className:"film-strip-lane",style:{marginLeft:m+"px",marginRight:y+"px"},children:x})};function ew(n,e){return n-e.timestamp}function tw(n,e){const i=Math.max(n.width/e.width,n.height/e.height);return{width:n.width/i|0,height:n.height/i|0}}const T2=({model:n,boundaries:e,onSelected:i,selectedTime:r,setSelectedTime:a,highlightedTime:o,sdkLanguage:u,scrubber:f})=>{const[d,g]=gs(),[m,y]=R.useState(),[S,w]=R.useState(),[E]=jt("actionsFilter",[]),{offsets:x,curtainLeft:_,curtainRight:A}=R.useMemo(()=>{let P=r||e;if(m&&m.startX!==m.endX){const ce=Mn(d.width,e,m.startX),Me=Mn(d.width,e,m.endX);P={minimum:Math.min(ce,Me),maximum:Math.max(ce,Me)}}const J=Oi(d.width,e,P.minimum),ee=Oi(d.width,e,e.maximum)-Oi(d.width,e,P.maximum);return{offsets:A2(d.width,e),curtainLeft:J,curtainRight:ee}},[r,e,m,d]),C=R.useMemo(()=>n==null?void 0:n.filteredActions(E),[n,E]),H=R.useMemo(()=>{if(!o)return;const P=Oi(d.width,e,o.minimum),J=Oi(d.width,e,o.maximum);return{left:P,width:Math.max(2,J-P)}},[o,e,d]),V=R.useCallback(P=>{if(w(void 0),!g.current)return;const J=P.clientX-g.current.getBoundingClientRect().left,$=Mn(d.width,e,J),ee=r?Oi(d.width,e,r.minimum):0,ce=r?Oi(d.width,e,r.maximum):0;r&&Math.abs(J-ee)<10?y({startX:ce,endX:J,type:"resize"}):r&&Math.abs(J-ce)<10?y({startX:ee,endX:J,type:"resize"}):r&&$>r.minimum&&$<r.maximum&&P.clientY-g.current.getBoundingClientRect().top<20?y({startX:ee,endX:ce,pivot:J,type:"move"}):y({startX:J,endX:J,type:"resize"})},[e,d,g,r]),K=R.useCallback(P=>{if(!g.current)return;const J=P.clientX-g.current.getBoundingClientRect().left,$=Mn(d.width,e,J),ee=C==null?void 0:C.findLast(Z=>Z.startTime<=$);if(!P.buttons){y(void 0);return}if(ee&&i(ee),!m)return;let ce=m;if(m.type==="resize")ce={...m,endX:J};else{const Z=J-m.pivot;let re=m.startX+Z,me=m.endX+Z;re<0&&(re=0,me=re+(m.endX-m.startX)),me>d.width&&(me=d.width,re=me-(m.endX-m.startX)),ce={...m,startX:re,endX:me,pivot:J}}y(ce);const Me=Mn(d.width,e,ce.startX),q=Mn(d.width,e,ce.endX);Me!==q&&a({minimum:Math.min(Me,q),maximum:Math.max(Me,q)})},[e,m,d,C,i,g,a]),Q=R.useCallback(()=>{if(w(void 0),!!m){if(m.startX!==m.endX){const P=Mn(d.width,e,m.startX),J=Mn(d.width,e,m.endX);a({minimum:Math.min(P,J),maximum:Math.max(P,J)})}else{const P=Mn(d.width,e,m.startX),J=C==null?void 0:C.findLast($=>$.startTime<=P);J&&i(J),a(void 0)}y(void 0)}},[e,m,d,C,a,i]),j=R.useCallback(P=>{if(!g.current)return;const J=P.clientX-g.current.getBoundingClientRect().left,$=Mn(d.width,e,J),ee=C==null?void 0:C.findLast(ce=>ce.startTime<=$);w({x:J,clientY:P.clientY,action:ee,sdkLanguage:u})},[e,d,C,g,u]),I=R.useCallback(()=>{w(void 0)},[]),O=R.useCallback(()=>{a(void 0)},[a]);return b.jsxs("div",{className:"timeline-view-container",children:[!!m&&b.jsx(Y0,{cursor:(m==null?void 0:m.type)==="resize"?"ew-resize":"grab",onPaneMouseUp:Q,onPaneMouseMove:K,onPaneDoubleClick:O}),b.jsxs("div",{ref:g,className:"timeline-view",onMouseDown:V,onMouseMove:j,onMouseLeave:I,children:[b.jsx("div",{className:"timeline-grid",children:x.map((P,J)=>b.jsx("div",{className:"timeline-divider",style:{left:P.position+"px"},children:b.jsx("div",{className:"timeline-time",children:yt(P.time-e.minimum)})},J))}),b.jsx(_2,{boundaries:e,previewPoint:S}),f,H&&b.jsx("div",{className:"timeline-highlight",style:{left:H.left,width:H.width}}),r&&b.jsxs("div",{className:"timeline-window",children:[b.jsx("div",{className:"timeline-window-curtain left",style:{width:_}}),b.jsx("div",{className:"timeline-window-resizer",style:{left:-5}}),b.jsx("div",{className:"timeline-window-center",children:b.jsx("div",{className:"timeline-window-drag"})}),b.jsx("div",{className:"timeline-window-resizer",style:{left:5}}),b.jsx("div",{className:"timeline-window-curtain right",style:{width:A}})]})]})]})};function A2(n,e){let r=n/64;const a=e.maximum-e.minimum,o=n/a;let u=a/r;const f=Math.ceil(Math.log(u)/Math.LN10);u=Math.pow(10,f),u*o>=320&&(u=u/5),u*o>=128&&(u=u/2);const d=e.minimum;let g=e.maximum;g+=64/o,r=Math.ceil((g-d)/u),u||(r=0);const m=[];for(let y=0;y<r;++y){const S=d+u*y;m.push({position:Oi(n,e,S),time:S})}return m}function Oi(n,e,i){return(i-e.minimum)/(e.maximum-e.minimum)*n}function Mn(n,e,i){return i/n*(e.maximum-e.minimum)+e.minimum}const C2=({model:n})=>{var i,r;if(!n)return b.jsx(b.Fragment,{});const e=n.wallTime!==void 0?new Date(n.wallTime).toLocaleString(void 0,{timeZoneName:"short"}):void 0;return b.jsxs("div",{style:{flex:"auto",display:"block",overflow:"hidden auto"},children:[b.jsx("div",{className:"call-section",style:{paddingTop:2},children:"Time"}),!!e&&b.jsxs("div",{className:"call-line",children:["start time:",b.jsx("span",{className:"call-value datetime",title:e,children:e})]}),b.jsxs("div",{className:"call-line",children:["duration:",b.jsx("span",{className:"call-value number",title:yt(n.endTime-n.startTime),children:yt(n.endTime-n.startTime)})]}),n.testTimeout!==void 0&&b.jsxs("div",{className:"call-line",children:["test timeout:",b.jsx("span",{className:"call-value number",title:yt(n.testTimeout),children:yt(n.testTimeout)})]}),b.jsx("div",{className:"call-section",children:"Browser"}),b.jsxs("div",{className:"call-line",children:["engine:",b.jsx("span",{className:"call-value string",title:n.browserName,children:n.browserName})]}),n.channel&&b.jsxs("div",{className:"call-line",children:["channel:",b.jsx("span",{className:"call-value string",title:n.channel,children:n.channel})]}),n.platform&&b.jsxs("div",{className:"call-line",children:["platform:",b.jsx("span",{className:"call-value string",title:n.platform,children:n.platform})]}),n.playwrightVersion&&b.jsxs("div",{className:"call-line",children:["playwright version:",b.jsx("span",{className:"call-value string",title:n.playwrightVersion,children:n.playwrightVersion})]}),n.options.userAgent&&b.jsxs("div",{className:"call-line",children:["user agent:",b.jsx("span",{className:"call-value datetime",title:n.options.userAgent,children:n.options.userAgent})]}),n.options.baseURL&&b.jsxs(b.Fragment,{children:[b.jsx("div",{className:"call-section",style:{paddingTop:2},children:"Config"}),b.jsxs("div",{className:"call-line",children:["baseURL:",mx(n.options.baseURL)?b.jsx("a",{className:"call-value string",href:n.options.baseURL,title:n.options.baseURL,target:"_blank",rel:"noopener noreferrer",children:n.options.baseURL}):b.jsx("span",{className:"call-value string",title:n.options.baseURL,children:n.options.baseURL})]})]}),b.jsx("div",{className:"call-section",children:"Viewport"}),n.options.viewport&&b.jsxs("div",{className:"call-line",children:["width:",b.jsx("span",{className:"call-value number",title:String(!!((i=n.options.viewport)!=null&&i.width)),children:n.options.viewport.width})]}),n.options.viewport&&b.jsxs("div",{className:"call-line",children:["height:",b.jsx("span",{className:"call-value number",title:String(!!((r=n.options.viewport)!=null&&r.height)),children:n.options.viewport.height})]}),b.jsxs("div",{className:"call-line",children:["is mobile:",b.jsx("span",{className:"call-value boolean",title:String(!!n.options.isMobile),children:String(!!n.options.isMobile)})]}),n.options.deviceScaleFactor&&b.jsxs("div",{className:"call-line",children:["device scale:",b.jsx("span",{className:"call-value number",title:String(n.options.deviceScaleFactor),children:String(n.options.deviceScaleFactor)})]}),b.jsx("div",{className:"call-section",children:"Counts"}),b.jsxs("div",{className:"call-line",children:["pages:",b.jsx("span",{className:"call-value number",children:n.pages.length})]}),b.jsxs("div",{className:"call-line",children:["actions:",b.jsx("span",{className:"call-value number",children:n.actions.length})]}),b.jsxs("div",{className:"call-line",children:["events:",b.jsx("span",{className:"call-value number",children:n.events.length})]})]})},N2=({annotations:n})=>n.length?b.jsx("div",{className:"annotations-tab",children:n.map((e,i)=>b.jsxs("div",{className:"annotation-item",children:[b.jsx("span",{style:{fontWeight:"bold"},children:e.type}),e.description&&b.jsxs("span",{children:[": ",P0(e.description)]})]},`annotation-${i}`))}):b.jsx(ai,{text:"No annotations"}),k2=({sdkLanguage:n,isInspecting:e,setIsInspecting:i,highlightedElement:r,setHighlightedElement:a})=>{const[o,u]=R.useState(),f=R.useCallback(d=>{const{errors:g}=dd(QS,d,{prettyErrors:!1}),m=g.map(y=>({message:y.message,line:y.range[1].line,column:y.range[1].col,type:"subtle-error"}));u(m),a({...r,ariaSnapshot:d,lastEdited:"ariaSnapshot"}),i(!1)},[r,a,i]);return b.jsxs("div",{style:{flex:"auto",backgroundColor:"var(--vscode-sideBar-background)",padding:"0 10px 10px 10px",overflow:"auto"},children:[b.jsxs("div",{className:"hbox",style:{lineHeight:"28px",color:"var(--vscode-editorCodeLens-foreground)"},children:[b.jsx("div",{children:"Locator"}),b.jsx(ct,{style:{margin:"0 4px"},title:"Pick locator",icon:"target",toggled:e,onClick:()=>i(!e)}),b.jsx("div",{style:{flex:"auto"}}),b.jsx(ct,{icon:"files",title:"Copy locator",onClick:()=>{Zy(r.locator||"")}})]}),b.jsx("div",{style:{height:50},children:b.jsx(ds,{text:r.locator||"",highlighter:n,isFocused:!0,wrapLines:!0,onChange:d=>{a({...r,locator:d,lastEdited:"locator"}),i(!1)}})}),b.jsxs("div",{className:"hbox",style:{lineHeight:"28px",color:"var(--vscode-editorCodeLens-foreground)"},children:[b.jsx("div",{style:{flex:"auto"},children:"Aria snapshot"}),b.jsx(ct,{icon:"files",title:"Copy snapshot",onClick:()=>{Zy(r.ariaSnapshot||"")}})]}),b.jsx("div",{style:{height:150},children:b.jsx(ds,{text:r.ariaSnapshot||"",highlighter:"yaml",wrapLines:!1,highlight:o,onChange:f})})]})},M2=({className:n,style:e,open:i,isModal:r,minWidth:a,verticalOffset:o,requestClose:u,anchor:f,dataTestId:d,children:g})=>{const m=R.useRef(null),[y,S]=R.useState(0),[w]=kh(m),[E,x]=kh(f),_=f?O2(w,E,o):void 0;return R.useEffect(()=>{const A=H=>{!m.current||!(H.target instanceof Node)||m.current.contains(H.target)||u==null||u()},C=H=>{H.key==="Escape"&&(u==null||u())};return i?(document.addEventListener("mousedown",A),document.addEventListener("keydown",C),()=>{document.removeEventListener("mousedown",A),document.removeEventListener("keydown",C)}):()=>{}},[i,u]),R.useLayoutEffect(()=>x(),[i,x]),R.useEffect(()=>{const A=()=>S(C=>C+1);return window.addEventListener("resize",A),()=>{window.removeEventListener("resize",A)}},[]),R.useLayoutEffect(()=>{m.current&&(i?r?m.current.showModal():m.current.show():m.current.close())},[i,r]),b.jsx("dialog",{ref:m,style:{position:"fixed",margin:_?0:void 0,zIndex:110,top:_==null?void 0:_.top,left:_==null?void 0:_.left,minWidth:a||0,...e},className:n,"data-testid":d,children:g})};function O2(n,e,i=4,r=4){let a=Math.max(r,e.left);a+n.width>window.innerWidth-r&&(a=window.innerWidth-n.width-r);let o=Math.max(0,e.bottom)+i;return o+n.height>window.innerHeight-i&&(Math.max(0,e.top)>n.height+i?o=Math.max(0,e.top)-n.height-i:o=window.innerHeight-i-n.height),{left:a,top:o}}const j2=({title:n,icon:e,buttonChildren:i,anchorRef:r,dialogDataTestId:a,children:o})=>{const u=R.useRef(null),f=r??u,[d,g]=R.useState(!1);return b.jsxs(b.Fragment,{children:[b.jsx(ct,{ref:u,icon:e,title:n,onClick:()=>g(m=>!m),children:i}),b.jsx(M2,{style:{backgroundColor:"var(--vscode-sideBar-background)",padding:"4px 8px"},open:d,verticalOffset:8,requestClose:()=>g(!1),anchor:f,dataTestId:a,children:o})]})},nw=({settings:n})=>b.jsx("div",{className:"vbox settings-view",children:n.map(e=>{const i=`setting-${e.name.replaceAll(/\s+/g,"-")}`;return b.jsx("div",{className:`setting setting-${e.type}`,title:e.title,children:L2(e,i)},e.name)})}),L2=(n,e)=>{switch(n.type){case"check":return b.jsxs(b.Fragment,{children:[b.jsx("input",{type:"checkbox",id:e,checked:n.value,onChange:()=>n.set(!n.value)}),b.jsxs("label",{htmlFor:e,children:[n.name,!!n.count&&b.jsx("span",{className:"setting-counter",children:n.count})]})]});case"select":return b.jsxs(b.Fragment,{children:[b.jsxs("label",{htmlFor:e,children:[n.name,":",!!n.count&&b.jsx("span",{className:"setting-counter",children:n.count})]}),b.jsx("select",{id:e,value:n.value,onChange:i=>n.set(i.target.value),children:n.options.map(i=>b.jsx("option",{value:i.value,children:i.label},i.value))})]});default:return null}},K2=n=>{var i;const e=z2((i=n.model)==null?void 0:i.traceUri);return b.jsx(J0.Provider,{value:n.model,children:b.jsx(R2,{partition:e,...n})})},R2=n=>{var Sl;const{partition:e,model:i,showSourcesFirst:r,rootDir:a,fallbackLocation:o,isLive:u,hideTimeline:f,status:d,annotations:g,inert:m,onOpenExternally:y,revealSource:S,testRunMetadata:w}=n,[E,x]=jt("navigatorTab","actions"),[_,A]=jt("propertiesTab",r?"source":"call"),[C,H]=jt("propertiesSidebarLocation","bottom"),[V]=jt("actionsFilter",[]),[K,Q]=or("selectedCallId"),[j,I]=or("selectedTime"),[O,P]=or("highlightedCallId"),[J,$]=or("revealedErrorKey"),[ee,ce]=or("revealedAttachmentCallId"),[Me,q]=or("treeState",{expandedItems:new Map}),[Z,re]=R.useState("");wx(e);const[me,Ee]=R.useState({lastEdited:"none"}),[M,X]=R.useState(!1),[W,te]=R.useState(void 0),ue=R.useCallback(le=>{Q(le==null?void 0:le.callId),$(void 0)},[Q,$]),se=R.useMemo(()=>i==null?void 0:i.filteredActions(V),[i,V]),xe=((i==null?void 0:i.actions.length)??0)-((se==null?void 0:se.length)??0),nt=R.useMemo(()=>se==null?void 0:se.find(le=>le.callId===O),[se,O]),Re=R.useCallback(le=>{P(le==null?void 0:le.callId)},[P]),Rn=R.useMemo(()=>(i==null?void 0:i.sources)||new Map,[i]);R.useEffect(()=>{I(void 0),$(void 0)},[i,I,$]);const fe=R.useMemo(()=>{if(K){const Tn=se==null?void 0:se.find(sn=>sn.callId===K);if(Tn)return Tn}const le=i==null?void 0:i.failedAction();if(le)return le;if(se!=null&&se.length){let Tn=se.length-1;for(let sn=0;sn<se.length;++sn)if(se[sn].title==="After Hooks"&&sn){Tn=sn-1;break}return se[Tn]}},[i,se,K]),_e=R.useMemo(()=>nt||fe,[fe,nt]),Ue=R.useCallback(le=>{ue(le),Re(void 0)},[ue,Re]),{boundaries:He}=R.useMemo(()=>{const le={minimum:(i==null?void 0:i.startTime)||0,maximum:(i==null?void 0:i.endTime)||3e4};return le.minimum>le.maximum&&(le.minimum=0,le.maximum=3e4),le.maximum+=(le.maximum-le.minimum)/20,{boundaries:le}},[i]),Xt=a2(se||[],fe,Ue,j,He),Ye=R.useCallback(le=>{A(le),le!=="inspector"&&X(!1)},[A]),Yt=R.useCallback(le=>{!M&&le&&Ye("inspector"),X(le)},[X,Ye,M]),bs=R.useCallback(le=>{Ee(le),Ye("inspector")},[Ye]),qr=R.useCallback(le=>{Ye("attachments"),ce({callId:le})},[Ye,ce]);R.useEffect(()=>{S&&Ye("source")},[S,Ye]);const vs=aE(i,j),Ss=qE(i,j),ws=nE(i),qc=R.useMemo(()=>{var le;return J!==void 0?(le=ws.errors.get(J))==null?void 0:le.stack:_e==null?void 0:_e.stack},[_e,J,ws]),it=(i==null?void 0:i.sdkLanguage)||"javascript",$c={id:"inspector",title:"Locator",render:()=>b.jsx(k2,{sdkLanguage:it,isInspecting:M,setIsInspecting:Yt,highlightedElement:me,setHighlightedElement:Ee})},yl={id:"call",title:"Call",render:()=>b.jsx(M_,{action:_e,startTimeOffset:(i==null?void 0:i.startTime)??0,sdkLanguage:it})},bl={id:"log",title:"Log",render:()=>b.jsx(L_,{action:_e,isLive:u})},xs={id:"errors",title:"Errors",errorCount:ws.errors.size,render:()=>b.jsx(sE,{errorsModel:ws,testRunMetadata:w,sdkLanguage:it,revealInSource:le=>{le.action?ue(le.action):$(le.message),Ye("source")},wallTime:(i==null?void 0:i.wallTime)??0})};let vl;!fe&&o&&(vl=(Sl=o.source)==null?void 0:Sl.errors.length);const _s={id:"source",title:"Source",errorCount:vl,render:()=>b.jsx(v2,{stack:qc,sources:Rn,rootDir:a,stackFrameLocation:C==="bottom"?"right":"bottom",fallbackLocation:o,onOpenExternally:y})},Ic={id:"console",title:"Console",count:vs.entries.length,render:()=>b.jsx(lE,{consoleModel:vs,boundaries:He,selectedTime:j,onEntryHovered:te,onAccepted:le=>I({minimum:le.timestamp,maximum:le.timestamp})})},Vc={id:"network",title:"Network",count:Ss.resources.length,render:()=>b.jsx($E,{boundaries:He,networkModel:Ss,onResourceHovered:te,sdkLanguage:(i==null?void 0:i.sdkLanguage)??"javascript"})},Bi={id:"attachments",title:"Attachments",count:i==null?void 0:i.visibleAttachments.length,render:()=>b.jsx(W_,{revealedAttachmentCallId:ee})},ft=[$c,yl,bl,xs,Ic,Vc,_s,Bi];if(g!==void 0){const le={id:"annotations",title:"Annotations",count:g.length,render:()=>b.jsx(N2,{annotations:g})};ft.push(le)}if(r){const le=ft.indexOf(_s);ft.splice(le,1),ft.splice(1,0,_s)}let Ft=0;!u&&i&&i.endTime>=0?Ft=i.endTime-i.startTime:i&&i.wallTime&&(Ft=Date.now()-i.wallTime);const kt={id:"actions",title:"Actions",component:b.jsxs("div",{className:"vbox",children:[d&&b.jsxs("div",{className:"workbench-run-status","data-testid":"workbench-run-status",children:[b.jsx("span",{className:ut("codicon",X0(d))}),b.jsx("div",{children:C_(d)}),b.jsx("div",{className:"spacer"}),b.jsx("div",{className:"workbench-run-duration",children:Ft?yt(Ft):""})]}),b.jsx("div",{className:"workbench-action-filter",children:b.jsx("input",{type:"search",placeholder:"Filter actions","aria-label":"Filter actions",spellCheck:!1,value:Z,onChange:le=>re(le.target.value)})}),b.jsx(k_,{sdkLanguage:it,actions:se||[],selectedAction:i?fe:void 0,selectedTime:j,setSelectedTime:I,treeState:Me,setTreeState:q,onSelected:Ue,onHighlighted:Re,revealActionAttachment:qr,revealConsole:()=>Ye("console"),isLive:u,actionFilterText:Z})]})},Gc={id:"metadata",title:"Metadata",component:b.jsx(C2,{model:i})},Kc=E==="actions"&&b.jsx(D2,{counters:i==null?void 0:i.actionCounters,hiddenActionsCount:xe});return b.jsxs("div",{className:"vbox workbench",...m?{inert:!0}:{},children:[!f&&b.jsx(T2,{model:i,boundaries:He,onSelected:Ue,sdkLanguage:it,selectedTime:j,setSelectedTime:I,highlightedTime:W,scrubber:b.jsx(o2,{playback:Xt})}),b.jsx(il,{sidebarSize:250,orientation:C==="bottom"?"vertical":"horizontal",settingName:"propertiesSidebar",main:b.jsx(il,{sidebarSize:250,orientation:"horizontal",sidebarIsFirst:!0,settingName:"actionListSidebar",main:b.jsx(c2,{action:_e,model:i,sdkLanguage:it,testIdAttributeName:(i==null?void 0:i.testIdAttributeName)||"data-testid",isInspecting:M,setIsInspecting:Yt,highlightedElement:me,setHighlightedElement:bs,playback:Xt}),sidebar:b.jsx(oc,{tabs:[kt,Gc],rightToolbar:[Kc],selectedTab:E,setSelectedTab:x})}),sidebar:b.jsx(oc,{tabs:ft,selectedTab:_,setSelectedTab:Ye,rightToolbar:[C==="bottom"?b.jsx(ct,{title:"Dock to right",icon:"layout-sidebar-right-off",onClick:()=>{H("right")}}):b.jsx(ct,{title:"Dock to bottom",icon:"layout-panel-off",onClick:()=>{H("bottom")}})],mode:C==="bottom"?"default":"select"})})]})},D2=({counters:n,hiddenActionsCount:e})=>{const[i,r]=jt("actionsFilter",[]),a=R.useRef(null),o=b.jsxs(b.Fragment,{children:[e>0&&b.jsxs("span",{className:"workbench-actions-hidden-count",title:e+" actions hidden by filters",children:[e," hidden"]}),b.jsx("span",{ref:a,className:"codicon codicon-filter"})]});return b.jsx(j2,{title:"Filter actions",dialogDataTestId:"actions-filter-dialog",buttonChildren:o,anchorRef:a,children:b.jsx(nw,{settings:[{type:"check",value:i.includes("getter"),set:u=>r(u?[...i,"getter"]:i.filter(f=>f!=="getter")),name:"Getters",count:n==null?void 0:n.get("getter")},{type:"check",value:i.includes("route"),set:u=>r(u?[...i,"route"]:i.filter(f=>f!=="route")),name:"Network routes",count:n==null?void 0:n.get("route")},{type:"check",value:i.includes("configuration"),set:u=>r(u?[...i,"configuration"]:i.filter(f=>f!=="configuration")),name:"Configuration",count:n==null?void 0:n.get("configuration")}]})})};function z2(n){if(!n)return"default";const e=new URL(n,"http://localhost");return e.searchParams.delete("timestamp"),e.toString()}var c0;(n=>{function e(i){for(const r of i.splice(0))r.dispose()}n.disposeAll=e})(c0||(c0={}));class pr{constructor(){this._listeners=new Set,this.event=(e,i)=>{this._listeners.add(e);let r=!1;const a=this,o={dispose(){r||(r=!0,a._listeners.delete(e))}};return i&&i.push(o),o}}fire(e){const i=!this._deliveryQueue;this._deliveryQueue||(this._deliveryQueue=[]);for(const r of this._listeners)this._deliveryQueue.push({listener:r,event:e});if(i){for(let r=0;r<this._deliveryQueue.length;r++){const{listener:a,event:o}=this._deliveryQueue[r];a.call(null,o)}this._deliveryQueue=void 0}}dispose(){this._listeners.clear(),this._deliveryQueue&&(this._deliveryQueue=[])}}class U2 extends Error{}class X2{constructor(e){this._ws=new WebSocket(e)}onmessage(e){this._ws.addEventListener("message",i=>e(i.data.toString()))}onopen(e){this._ws.addEventListener("open",e)}onerror(e){this._ws.addEventListener("error",e)}onclose(e){this._ws.addEventListener("close",e)}send(e){this._ws.send(e)}close(){this._ws.close()}}class Y2{constructor(e){this._onCloseEmitter=new pr,this._onReportEmitter=new pr,this._onStdioEmitter=new pr,this._onTestFilesChangedEmitter=new pr,this._onLoadTraceRequestedEmitter=new pr,this._onTestPausedEmitter=new pr,this._lastId=0,this._callbacks=new Map,this._isClosed=!1,this.onClose=this._onCloseEmitter.event,this.onReport=this._onReportEmitter.event,this.onStdio=this._onStdioEmitter.event,this.onTestFilesChanged=this._onTestFilesChangedEmitter.event,this.onLoadTraceRequested=this._onLoadTraceRequestedEmitter.event,this.onTestPaused=this._onTestPausedEmitter.event,this._transport=e,this._transport.onmessage(r=>{const a=JSON.parse(r),{id:o,result:u,error:f,method:d,params:g}=a;if(o){const m=this._callbacks.get(o);if(!m)return;this._callbacks.delete(o),f?m.reject(new Error(f)):m.resolve(u)}else this._dispatchEvent(d,g)});const i=setInterval(()=>this._sendMessage("ping").catch(()=>{}),3e4);this._connectedPromise=new Promise((r,a)=>{this._transport.onopen(r),this._transport.onerror(a)}),this._transport.onclose(()=>{this._isClosed=!0,this._onCloseEmitter.fire(),clearInterval(i);for(const r of this._callbacks.values())r.reject(r.error);this._callbacks.clear()})}isClosed(){return this._isClosed}async _sendMessage(e,i){const r=globalThis.__logForTest;r==null||r({method:e,params:i}),await this._connectedPromise;const a=++this._lastId,o={id:a,method:e,params:i},u=new U2(`${e}: test server connection closed`);return this._transport.send(JSON.stringify(o)),new Promise((f,d)=>{this._callbacks.set(a,{resolve:f,reject:d,error:u})})}_sendMessageNoReply(e,i){this._sendMessage(e,i).catch(()=>{})}_dispatchEvent(e,i){e==="report"?this._onReportEmitter.fire(i):e==="stdio"?this._onStdioEmitter.fire(i):e==="testFilesChanged"?this._onTestFilesChangedEmitter.fire(i):e==="loadTraceRequested"?this._onLoadTraceRequestedEmitter.fire(i):e==="testPaused"&&this._onTestPausedEmitter.fire(i)}async initialize(e){await this._sendMessage("initialize",e)}async ping(e){await this._sendMessage("ping",e)}async pingNoReply(e){this._sendMessageNoReply("ping",e)}async watch(e){await this._sendMessage("watch",e)}watchNoReply(e){this._sendMessageNoReply("watch",e)}async open(e){await this._sendMessage("open",e)}openNoReply(e){this._sendMessageNoReply("open",e)}async resizeTerminal(e){await this._sendMessage("resizeTerminal",e)}resizeTerminalNoReply(e){this._sendMessageNoReply("resizeTerminal",e)}async checkBrowsers(e){return await this._sendMessage("checkBrowsers",e)}async installBrowsers(e){await this._sendMessage("installBrowsers",e)}async runGlobalSetup(e){return await this._sendMessage("runGlobalSetup",e)}async runGlobalTeardown(e){return await this._sendMessage("runGlobalTeardown",e)}async clearCache(e){return await this._sendMessage("clearCache",e)}async listFiles(e){return await this._sendMessage("listFiles",e)}async listTests(e){return await this._sendMessage("listTests",e)}async runTests(e){return await this._sendMessage("runTests",e)}async findRelatedTestFiles(e){return await this._sendMessage("findRelatedTestFiles",e)}async stopTests(e){await this._sendMessage("stopTests",e)}stopTestsNoReply(e){this._sendMessageNoReply("stopTests",e)}async closeGracefully(e){await this._sendMessage("closeGracefully",e)}close(){try{this._transport.close()}catch{}}}const F2=({location:n})=>{const[e,i]=jt("shouldPopulateCanvasFromScreenshot",!1),[r,a]=Cx(),[o,u]=jt("mergeFiles",!1);return b.jsx(nw,{settings:[{type:"select",value:r,set:a,name:"Theme",options:Tx},...n==="ui-mode"?[{type:"check",value:o,set:u,name:"Merge files"}]:[],{type:"check",value:e,set:i,name:"Display canvas content",title:"Attempt to display the captured canvas appearance in the snapshot preview. May not be accurate."}]})};export{j2 as D,Q0 as E,Et as R,il as S,V2 as T,X2 as W,I_ as _,Y2 as a,F2 as b,K2 as c,M2 as d,B2 as e,I2 as f,Ax as g,q2 as h,$2 as i,b as j,ut as k,T_ as l,yt as m,dl as n,ct as o,jt as p,nw as q,R as r,ls as s,X0 as t,gs as u,yx as v};
