First Commit
This commit is contained in:
commit
264e65006a
488 files changed
+155661
No files matched your search
+75
@@ -0,0 +1,75 @@
|
||||
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html style='scrollbar-gutter: stable both-edges;'>
|
||||
<head>
|
||||
<meta charset='UTF-8'>
|
||||
<meta name='color-scheme' content='dark light'>
|
||||
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
|
||||
<title>Playwright Test Report</title>
|
||||
<script type="module">var t1=Object.defineProperty;var n1=(l,s,r)=>s in l?t1(l,s,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[s]=r;var Gt=(l,s,r)=>n1(l,typeof s!="symbol"?s+"":s,r);(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))a(c);new MutationObserver(c=>{for(const f of c)if(f.type==="childList")for(const d of f.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&a(d)}).observe(document,{childList:!0,subtree:!0});function r(c){const f={};return c.integrity&&(f.integrity=c.integrity),c.referrerPolicy&&(f.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?f.credentials="include":c.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function a(c){if(c.ep)return;c.ep=!0;const f=r(c);fetch(c.href,f)}})();function r1(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var Go={exports:{}},mi={},Ko={exports:{}},he={};/**
|
||||
* @license React
|
||||
* react.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var Df;function i1(){if(Df)return he;Df=1;var l=Symbol.for("react.element"),s=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),d=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),A=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),k=Symbol.iterator;function I(R){return R===null||typeof R!="object"?null:(R=k&&R[k]||R["@@iterator"],typeof R=="function"?R:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},F=Object.assign,x={};function v(R,L,$){this.props=R,this.context=L,this.refs=x,this.updater=$||T}v.prototype.isReactComponent={},v.prototype.setState=function(R,L){if(typeof R!="object"&&typeof R!="function"&&R!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,R,L,"setState")},v.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function w(){}w.prototype=v.prototype;function j(R,L,$){this.props=R,this.context=L,this.refs=x,this.updater=$||T}var M=j.prototype=new w;M.constructor=j,F(M,v.prototype),M.isPureReactComponent=!0;var B=Array.isArray,Q=Object.prototype.hasOwnProperty,O={current:null},H={key:!0,ref:!0,__self:!0,__source:!0};function U(R,L,$){var pe,me={},ge=null,Ee=null;if(L!=null)for(pe in L.ref!==void 0&&(Ee=L.ref),L.key!==void 0&&(ge=""+L.key),L)Q.call(L,pe)&&!H.hasOwnProperty(pe)&&(me[pe]=L[pe]);var xe=arguments.length-2;if(xe===1)me.children=$;else if(1<xe){for(var Se=Array(xe),Xe=0;Xe<xe;Xe++)Se[Xe]=arguments[Xe+2];me.children=Se}if(R&&R.defaultProps)for(pe in xe=R.defaultProps,xe)me[pe]===void 0&&(me[pe]=xe[pe]);return{$$typeof:l,type:R,key:ge,ref:Ee,props:me,_owner:O.current}}function G(R,L){return{$$typeof:l,type:R.type,key:L,ref:R.ref,props:R.props,_owner:R._owner}}function V(R){return typeof R=="object"&&R!==null&&R.$$typeof===l}function b(R){var L={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function($){return L[$]})}var re=/\/+/g;function J(R,L){return typeof R=="object"&&R!==null&&R.key!=null?b(""+R.key):L.toString(36)}function ce(R,L,$,pe,me){var ge=typeof R;(ge==="undefined"||ge==="boolean")&&(R=null);var Ee=!1;if(R===null)Ee=!0;else switch(ge){case"string":case"number":Ee=!0;break;case"object":switch(R.$$typeof){case l:case s:Ee=!0}}if(Ee)return Ee=R,me=me(Ee),R=pe===""?"."+J(Ee,0):pe,B(me)?($="",R!=null&&($=R.replace(re,"$&/")+"/"),ce(me,L,$,"",function(Xe){return Xe})):me!=null&&(V(me)&&(me=G(me,$+(!me.key||Ee&&Ee.key===me.key?"":(""+me.key).replace(re,"$&/")+"/")+R)),L.push(me)),1;if(Ee=0,pe=pe===""?".":pe+":",B(R))for(var xe=0;xe<R.length;xe++){ge=R[xe];var Se=pe+J(ge,xe);Ee+=ce(ge,L,$,Se,me)}else if(Se=I(R),typeof Se=="function")for(R=Se.call(R),xe=0;!(ge=R.next()).done;)ge=ge.value,Se=pe+J(ge,xe++),Ee+=ce(ge,L,$,Se,me);else if(ge==="object")throw L=String(R),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.");return Ee}function oe(R,L,$){if(R==null)return R;var pe=[],me=0;return ce(R,pe,"","",function(ge){return L.call($,ge,me++)}),pe}function ie(R){if(R._status===-1){var L=R._result;L=L(),L.then(function($){(R._status===0||R._status===-1)&&(R._status=1,R._result=$)},function($){(R._status===0||R._status===-1)&&(R._status=2,R._result=$)}),R._status===-1&&(R._status=0,R._result=L)}if(R._status===1)return R._result.default;throw R._result}var de={current:null},Y={transition:null},ee={ReactCurrentDispatcher:de,ReactCurrentBatchConfig:Y,ReactCurrentOwner:O};function W(){throw Error("act(...) is not supported in production builds of React.")}return he.Children={map:oe,forEach:function(R,L,$){oe(R,function(){L.apply(this,arguments)},$)},count:function(R){var L=0;return oe(R,function(){L++}),L},toArray:function(R){return oe(R,function(L){return L})||[]},only:function(R){if(!V(R))throw Error("React.Children.only expected to receive a single React element child.");return R}},he.Component=v,he.Fragment=r,he.Profiler=c,he.PureComponent=j,he.StrictMode=a,he.Suspense=g,he.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ee,he.act=W,he.cloneElement=function(R,L,$){if(R==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+R+".");var pe=F({},R.props),me=R.key,ge=R.ref,Ee=R._owner;if(L!=null){if(L.ref!==void 0&&(ge=L.ref,Ee=O.current),L.key!==void 0&&(me=""+L.key),R.type&&R.type.defaultProps)var xe=R.type.defaultProps;for(Se in L)Q.call(L,Se)&&!H.hasOwnProperty(Se)&&(pe[Se]=L[Se]===void 0&&xe!==void 0?xe[Se]:L[Se])}var Se=arguments.length-2;if(Se===1)pe.children=$;else if(1<Se){xe=Array(Se);for(var Xe=0;Xe<Se;Xe++)xe[Xe]=arguments[Xe+2];pe.children=xe}return{$$typeof:l,type:R.type,key:me,ref:ge,pLine truncated
|
||||
* @license React
|
||||
* react-jsx-runtime.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var Mf;function l1(){if(Mf)return mi;Mf=1;var l=Aa(),s=Symbol.for("react.element"),r=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,c=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,f={key:!0,ref:!0,__self:!0,__source:!0};function d(m,g,A){var E,k={},I=null,T=null;A!==void 0&&(I=""+A),g.key!==void 0&&(I=""+g.key),g.ref!==void 0&&(T=g.ref);for(E in g)a.call(g,E)&&!f.hasOwnProperty(E)&&(k[E]=g[E]);if(m&&m.defaultProps)for(E in g=m.defaultProps,g)k[E]===void 0&&(k[E]=g[E]);return{$$typeof:s,type:m,key:I,ref:T,props:k,_owner:c.current}}return mi.Fragment=r,mi.jsx=d,mi.jsxs=d,mi}var Bf;function s1(){return Bf||(Bf=1,Go.exports=l1()),Go.exports}var h=s1();const o1=15,ye=0,Zt=1,a1=2,at=-2,Re=-3,Hf=-4,Jt=-5,pt=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535],bd=1440,u1=0,c1=4,f1=9,d1=5,p1=[96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,192,80,7,10,0,8,96,0,8,32,0,9,160,0,8,0,0,8,128,0,8,64,0,9,224,80,7,6,0,8,88,0,8,24,0,9,144,83,7,59,0,8,120,0,8,56,0,9,208,81,7,17,0,8,104,0,8,40,0,9,176,0,8,8,0,8,136,0,8,72,0,9,240,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,200,81,7,13,0,8,100,0,8,36,0,9,168,0,8,4,0,8,132,0,8,68,0,9,232,80,7,8,0,8,92,0,8,28,0,9,152,84,7,83,0,8,124,0,8,60,0,9,216,82,7,23,0,8,108,0,8,44,0,9,184,0,8,12,0,8,140,0,8,76,0,9,248,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,196,81,7,11,0,8,98,0,8,34,0,9,164,0,8,2,0,8,130,0,8,66,0,9,228,80,7,7,0,8,90,0,8,26,0,9,148,84,7,67,0,8,122,0,8,58,0,9,212,82,7,19,0,8,106,0,8,42,0,9,180,0,8,10,0,8,138,0,8,74,0,9,244,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,204,81,7,15,0,8,102,0,8,38,0,9,172,0,8,6,0,8,134,0,8,70,0,9,236,80,7,9,0,8,94,0,8,30,0,9,156,84,7,99,0,8,126,0,8,62,0,9,220,82,7,27,0,8,110,0,8,46,0,9,188,0,8,14,0,8,142,0,8,78,0,9,252,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,194,80,7,10,0,8,97,0,8,33,0,9,162,0,8,1,0,8,129,0,8,65,0,9,226,80,7,6,0,8,89,0,8,25,0,9,146,83,7,59,0,8,121,0,8,57,0,9,210,81,7,17,0,8,105,0,8,41,0,9,178,0,8,9,0,8,137,0,8,73,0,9,242,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,202,81,7,13,0,8,101,0,8,37,0,9,170,0,8,5,0,8,133,0,8,69,0,9,234,80,7,8,0,8,93,0,8,29,0,9,154,84,7,83,0,8,125,0,8,61,0,9,218,82,7,23,0,8,109,0,8,45,0,9,186,0,8,13,0,8,141,0,8,77,0,9,250,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,198,81,7,11,0,8,99,0,8,35,0,9,166,0,8,3,0,8,131,0,8,67,0,9,230,80,7,7,0,8,91,0,8,27,0,9,150,84,7,67,0,8,123,0,8,59,0,9,214,82,7,19,0,8,107,0,8,43,0,9,182,0,8,11,0,8,139,0,8,75,0,9,246,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,206,81,7,15,0,8,103,0,8,39,0,9,174,0,8,7,0,8,135,0,8,71,0,9,238,80,7,9,0,8,95,0,8,31,0,9,158,84,7,99,0,8,127,0,8,63,0,9,222,82,7,27,0,8,111,0,8,47,0,9,190,0,8,15,0,8,143,0,8,79,0,9,254,96,7,256,0,8,80,0,8,16,84,8,115,82,7,31,0,8,112,0,8,48,0,9,193,80,7,10,0,8,96,0,8,32,0,9,161,0,8,0,0,8,128,0,8,64,0,9,225,80,7,6,0,8,88,0,8,24,0,9,145,83,7,59,0,8,120,0,8,56,0,9,209,81,7,17,0,8,104,0,8,40,0,9,177,0,8,8,0,8,136,0,8,72,0,9,241,80,7,4,0,8,84,0,8,20,85,8,227,83,7,43,0,8,116,0,8,52,0,9,201,81,7,13,0,8,100,0,8,36,0,9,169,0,8,4,0,8,132,0,8,68,0,9,233,80,7,8,0,8,92,0,8,28,0,9,153,84,7,83,0,8,124,0,8,60,0,9,217,82,7,23,0,8,108,0,8,44,0,9,185,0,8,12,0,8,140,0,8,76,0,9,249,80,7,3,0,8,82,0,8,18,85,8,163,83,7,35,0,8,114,0,8,50,0,9,197,81,7,11,0,8,98,0,8,34,0,9,165,0,8,2,0,8,130,0,8,66,0,9,229,80,7,7,0,8,90,0,8,26,0,9,149,84,7,67,0,8,122,0,8,58,0,9,213,82,7,19,0,8,106,0,8,42,0,9,181,0,8,10,0,8,138,0,8,74,0,9,245,80,7,5,0,8,86,0,8,22,192,8,0,83,7,51,0,8,118,0,8,54,0,9,205,81,7,15,0,8,102,0,8,38,0,9,173,0,8,6,0,8,134,0,8,70,0,9,237,80,7,9,0,8,94,0,8,30,0,9,157,84,7,99,0,8,126,0,8,62,0,9,221,82,7,27,0,8,110,0,8,46,0,9,189,0,8,14,0,8,142,0,8,78,0,9,253,96,7,256,0,8,81,0,8,17,85,8,131,82,7,31,0,8,113,0,8,49,0,9,195,80,7,10,0,8,97,0,8,33,0,9,163,0,8,1,0,8,129,0,8,65,0,9,227,80,7,6,0,8,89,0,8,25,0,9,147,83,7,59,0,8,121,0,8,57,0,9,211,81,7,17,0,8,105,0,8,41,0,9,179,0,8,9,0,8,137,0,8,73,0,9,243,80,7,4,0,8,85,0,8,21,80,8,258,83,7,43,0,8,117,0,8,53,0,9,203,81,7,13,0,8,101,0,8,37,0,9,171,0,8,5,0,8,133,0,8,69,0,9,235,80,7,8,0,8,93,0,8,29,0,9,155,84,7,83,0,8,125,0,8,61,0,9,219,82,7,23,0,8,109,0,8,45,0,9,187,0,8,13,0,8,141,0,8,77,0,9,251,80,7,3,0,8,83,0,8,19,85,8,195,83,7,35,0,8,115,0,8,51,0,9,199,81,7,11,0,8,99,0,8,35,0,9,167,0,8,3,0,8,131,0,8,67,0,9,231,80,7,7,0,8,91,0,8,27,0,9,151,84,7,67,0,8,123,0,8,59,0,9,215,82,7,19,0,8,107,0,8,43,0,9,183,0,8,11,0,8,139,0,8,75,0,9,247,80,7,5,0,8,87,0,8,23,192,8,0,83,7,51,0,8,119,0,8,55,0,9,207,81,7,15,0,8,103,0,8,39,0,9,175,0,8,7,0,8,135,0,8,71,0,9,239,80,7,9,0,8,95,0,8,31,0,9,159,84,7,99,0,8,127,0,8,63,0,9,223,82,7,27,0,8,111,0,8,47,0,9,191,0,8,15,0,8,143,0,8,79,0,9,255],h1=[80,5,1,87,5,257,83,5,17,91,5,4097,81,5,5,89,5,1025,85,5,65,93,5,16385,80,5,3,88,5,513,84,5,33,92,5,8193,82,5,9,90,5,2049,86,5,129,192,5,24577,80,5,2,87,5,385,83,5,25,91,5,6145,81,5,7,89,5,1537,85,5,97,93,5,24577,80,5,4,88,5,769,84,5,49,92,5,12289,82,5,13,90,5,3073,86,5,193,1Line truncated
|
||||
* @license React
|
||||
* scheduler.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var Pd;function Tm(){return Pd||(Pd=1,function(l){function s(Y,ee){var W=Y.length;Y.push(ee);e:for(;0<W;){var R=W-1>>>1,L=Y[R];if(0<c(L,ee))Y[R]=ee,Y[W]=L,W=R;else break e}}function r(Y){return Y.length===0?null:Y[0]}function a(Y){if(Y.length===0)return null;var ee=Y[0],W=Y.pop();if(W!==ee){Y[0]=W;e:for(var R=0,L=Y.length,$=L>>>1;R<$;){var pe=2*(R+1)-1,me=Y[pe],ge=pe+1,Ee=Y[ge];if(0>c(me,W))ge<L&&0>c(Ee,me)?(Y[R]=Ee,Y[ge]=W,R=ge):(Y[R]=me,Y[pe]=W,R=pe);else if(ge<L&&0>c(Ee,W))Y[R]=Ee,Y[ge]=W,R=ge;else break e}}return ee}function c(Y,ee){var W=Y.sortIndex-ee.sortIndex;return W!==0?W:Y.id-ee.id}if(typeof performance=="object"&&typeof performance.now=="function"){var f=performance;l.unstable_now=function(){return f.now()}}else{var d=Date,m=d.now();l.unstable_now=function(){return d.now()-m}}var g=[],A=[],E=1,k=null,I=3,T=!1,F=!1,x=!1,v=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function M(Y){for(var ee=r(A);ee!==null;){if(ee.callback===null)a(A);else if(ee.startTime<=Y)a(A),ee.sortIndex=ee.expirationTime,s(g,ee);else break;ee=r(A)}}function B(Y){if(x=!1,M(Y),!F)if(r(g)!==null)F=!0,ie(Q);else{var ee=r(A);ee!==null&&de(B,ee.startTime-Y)}}function Q(Y,ee){F=!1,x&&(x=!1,w(U),U=-1),T=!0;var W=I;try{for(M(ee),k=r(g);k!==null&&(!(k.expirationTime>ee)||Y&&!b());){var R=k.callback;if(typeof R=="function"){k.callback=null,I=k.priorityLevel;var L=R(k.expirationTime<=ee);ee=l.unstable_now(),typeof L=="function"?k.callback=L:k===r(g)&&a(g),M(ee)}else a(g);k=r(g)}if(k!==null)var $=!0;else{var pe=r(A);pe!==null&&de(B,pe.startTime-ee),$=!1}return $}finally{k=null,I=W,T=!1}}var O=!1,H=null,U=-1,G=5,V=-1;function b(){return!(l.unstable_now()-V<G)}function re(){if(H!==null){var Y=l.unstable_now();V=Y;var ee=!0;try{ee=H(!0,Y)}finally{ee?J():(O=!1,H=null)}}else O=!1}var J;if(typeof j=="function")J=function(){j(re)};else if(typeof MessageChannel<"u"){var ce=new MessageChannel,oe=ce.port2;ce.port1.onmessage=re,J=function(){oe.postMessage(null)}}else J=function(){v(re,0)};function ie(Y){H=Y,O||(O=!0,J())}function de(Y,ee){U=v(function(){Y(l.unstable_now())},ee)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(Y){Y.callback=null},l.unstable_continueExecution=function(){F||T||(F=!0,ie(Q))},l.unstable_forceFrameRate=function(Y){0>Y||125<Y?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):G=0<Y?Math.floor(1e3/Y):5},l.unstable_getCurrentPriorityLevel=function(){return I},l.unstable_getFirstCallbackNode=function(){return r(g)},l.unstable_next=function(Y){switch(I){case 1:case 2:case 3:var ee=3;break;default:ee=I}var W=I;I=ee;try{return Y()}finally{I=W}},l.unstable_pauseExecution=function(){},l.unstable_requestPaint=function(){},l.unstable_runWithPriority=function(Y,ee){switch(Y){case 1:case 2:case 3:case 4:case 5:break;default:Y=3}var W=I;I=Y;try{return ee()}finally{I=W}},l.unstable_scheduleCallback=function(Y,ee,W){var R=l.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?R+W:R):W=R,Y){case 1:var L=-1;break;case 2:L=250;break;case 5:L=1073741823;break;case 4:L=1e4;break;default:L=5e3}return L=W+L,Y={id:E++,callback:ee,priorityLevel:Y,startTime:W,expirationTime:L,sortIndex:-1},W>R?(Y.sortIndex=W,s(A,Y),r(g)===null&&Y===r(A)&&(x?(w(U),U=-1):x=!0,de(B,W-R))):(Y.sortIndex=L,s(g,Y),F||T||(F=!0,ie(Q))),Y},l.unstable_shouldYield=b,l.unstable_wrapCallback=function(Y){var ee=I;return function(){var W=I;I=ee;try{return Y.apply(this,arguments)}finally{I=W}}}}(sa)),sa}var Od;function jm(){return Od||(Od=1,la.exports=Tm()),la.exports}/**
|
||||
* @license React
|
||||
* react-dom.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var Dd;function Pm(){if(Dd)return ot;Dd=1;var l=Aa(),s=jm();function r(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,c={};function f(e,t){d(e,t),d(e+"Capture",t)}function d(e,t){for(c[e]=t,e=0;e<t.length;e++)a.add(t[e])}var m=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),g=Object.prototype.hasOwnProperty,A=/^[: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]*$/,E={},k={};function I(e){return g.call(k,e)?!0:g.call(E,e)?!1:A.test(e)?k[e]=!0:(E[e]=!0,!1)}function T(e,t,n,i){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return i?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function F(e,t,n,i){if(t===null||typeof t>"u"||T(e,t,n,i))return!0;if(i)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function x(e,t,n,i,o,u,p){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=i,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=u,this.removeEmptyString=p}var v={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){v[e]=new x(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];v[t]=new x(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){v[e]=new x(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){v[e]=new x(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){v[e]=new x(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){v[e]=new x(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){v[e]=new x(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){v[e]=new x(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){v[e]=new x(e,5,!1,e.toLowerCase(),null,!1,!1)});var w=/[\-:]([a-z])/g;function j(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(w,j);v[t]=new x(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(w,j);v[t]=new x(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(w,j);v[t]=new x(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){v[e]=new x(e,1,!1,e.toLowerCase(),null,!1,!1)}),v.xlinkHref=new x("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){v[e]=new x(e,1,!1,e.toLowerCase(),null,!0,!0)});function M(e,t,n,i){var o=v.hasOwnProperty(t)?v[t]:null;(o!==null?o.type!==0:i||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=Line truncated
|
||||
`+R+e}var $=!1;function pe(e,t){if(!e||$)return"";$=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(N){var i=N}Reflect.construct(e,[],t)}else{try{t.call()}catch(N){i=N}e.call(t.prototype)}else{try{throw Error()}catch(N){i=N}e()}}catch(N){if(N&&i&&typeof N.stack=="string"){for(var o=N.stack.split(`
|
||||
`),u=i.stack.split(`
|
||||
`),p=o.length-1,y=u.length-1;1<=p&&0<=y&&o[p]!==u[y];)y--;for(;1<=p&&0<=y;p--,y--)if(o[p]!==u[y]){if(p!==1||y!==1)do if(p--,y--,0>y||o[p]!==u[y]){var S=`
|
||||
`+o[p].replace(" at new "," at ");return e.displayName&&S.includes("<anonymous>")&&(S=S.replace("<anonymous>",e.displayName)),S}while(1<=p&&0<=y);break}}}finally{$=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?L(e):""}function me(e){switch(e.tag){case 5:return L(e.type);case 16:return L("Lazy");case 13:return L("Suspense");case 19:return L("SuspenseList");case 0:case 2:case 15:return e=pe(e.type,!1),e;case 11:return e=pe(e.type.render,!1),e;case 1:return e=pe(e.type,!0),e;default:return""}}function ge(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case H:return"Fragment";case O:return"Portal";case G:return"Profiler";case U:return"StrictMode";case J:return"Suspense";case ce:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case b:return(e.displayName||"Context")+".Consumer";case V:return(e._context.displayName||"Context")+".Provider";case re:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case oe:return t=e.displayName||null,t!==null?t:ge(e.type)||"Memo";case ie:t=e._payload,e=e._init;try{return ge(e(t))}catch{}}return null}function Ee(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ge(t);case 8:return t===U?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function xe(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Se(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Xe(e){var t=Se(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var o=n.get,u=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(p){i=""+p,u.call(this,p)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return i},setValue:function(p){i=""+p},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function On(e){e._valueTracker||(e._valueTracker=Xe(e))}function Dn(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=Se(e)?e.checked?"true":"false":e.value),e=i,e!==n?(t.setValue(e),!0):!1}function _t(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Nn(e,t){var n=t.checked;return W({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Rr(e,t){var n=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;n=xe(t.value!=null?t.value:n),e._wrapperState={initialChecked:i,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Tr(e,t){t=t.checked,t!=null&&M(e,"checked",t,!1)}function jr(e,t){Tr(e,t);var n=xe(t.value),i=t.type;if(n!=null)i==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ts(e,t.type,n):t.hasOwnProperty("defaultValue")&&ts(e,t.type,xe(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ua(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!(i!=="submit"&&i!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ts(e,t,n){(t!=="number"||_t(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Pr=Array.isArray;function Jn(e,t,n,i){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&i&&(e[n].defaultSelected=!0)}else{for(n=""+xe(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,i&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function ns(e,t){if(t.dangerouslySetInnerLine truncated
|
||||
`).replace(hh,"")}function Zi(e,t,n){if(t=Ju(t),Ju(e)!==t&&n)throw Error(r(425))}function Ji(){}var Ls=null,Fs=null;function Qs(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Us=typeof setTimeout=="function"?setTimeout:void 0,mh=typeof clearTimeout=="function"?clearTimeout:void 0,qu=typeof Promise=="function"?Promise:void 0,gh=typeof queueMicrotask=="function"?queueMicrotask:typeof qu<"u"?function(e){return qu.resolve(null).then(e).catch(vh)}:Us;function vh(e){setTimeout(function(){throw e})}function Ws(e,t){var n=t,i=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"){if(i===0){e.removeChild(o),Vr(t);return}i--}else n!=="$"&&n!=="$?"&&n!=="$!"||i++;n=o}while(n);Vr(t)}function sn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function _u(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var lr=Math.random().toString(36).slice(2),Ot="__reactFiber$"+lr,$r="__reactProps$"+lr,Qt="__reactContainer$"+lr,Vs="__reactEvents$"+lr,yh="__reactListeners$"+lr,xh="__reactHandles$"+lr;function Bn(e){var t=e[Ot];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Qt]||n[Ot]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=_u(e);e!==null;){if(n=e[Ot])return n;e=_u(e)}return t}e=n,n=e.parentNode}return null}function ei(e){return e=e[Ot]||e[Qt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function sr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(r(33))}function qi(e){return e[$r]||null}var bs=[],or=-1;function on(e){return{current:e}}function Ie(e){0>or||(e.current=bs[or],bs[or]=null,or--)}function Ce(e,t){or++,bs[or]=e.current,e.current=t}var an={},Ge=on(an),nt=on(!1),Hn=an;function ar(e,t){var n=e.type.contextTypes;if(!n)return an;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var o={},u;for(u in n)o[u]=t[u];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function rt(e){return e=e.childContextTypes,e!=null}function _i(){Ie(nt),Ie(Ge)}function $u(e,t,n){if(Ge.current!==an)throw Error(r(168));Ce(Ge,t),Ce(nt,n)}function ec(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!="function")return n;i=i.getChildContext();for(var o in i)if(!(o in t))throw Error(r(108,Ee(e)||"Unknown",o));return W({},n,i)}function $i(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||an,Hn=Ge.current,Ce(Ge,e),Ce(nt,nt.current),!0}function tc(e,t,n){var i=e.stateNode;if(!i)throw Error(r(169));n?(e=ec(e,t,Hn),i.__reactInternalMemoizedMergedChildContext=e,Ie(nt),Ie(Ge),Ce(Ge,e)):Ie(nt),Ce(nt,n)}var Ut=null,el=!1,Ys=!1;function nc(e){Ut===null?Ut=[e]:Ut.push(e)}function wh(e){el=!0,nc(e)}function un(){if(!Ys&&Ut!==null){Ys=!0;var e=0,t=Ae;try{var n=Ut;for(Ae=1;e<n.length;e++){var i=n[e];do i=i(!0);while(i!==null)}Ut=null,el=!1}catch(o){throw Ut!==null&&(Ut=Ut.slice(e+1)),iu(ds,un),o}finally{Ae=t,Ys=!1}}return null}var ur=[],cr=0,tl=null,nl=0,ht=[],mt=0,Ln=null,Wt=1,Vt="";function Fn(e,t){ur[cr++]=nl,ur[cr++]=tl,tl=e,nl=t}function rc(e,t,n){ht[mt++]=Wt,ht[mt++]=Vt,ht[mt++]=Ln,Ln=e;var i=Wt;e=Vt;var o=32-St(i)-1;i&=~(1<<o),n+=1;var u=32-St(t)+o;if(30<u){var p=o-o%5;u=(i&(1<<p)-1).toString(32),i>>=p,o-=p,Wt=1<<32-St(t)+o|n<<o|i,Vt=u+e}else Wt=1<<u|n<<o|i,Vt=e}function zs(e){e.return!==null&&(Fn(e,1),rc(e,1,0))}function Xs(e){for(;e===tl;)tl=ur[--cr],ur[cr]=null,nl=ur[--cr],ur[cr]=null;for(;e===Ln;)Ln=ht[--mt],ht[mt]=null,Vt=ht[--mt],ht[mt]=null,Wt=ht[--mt],ht[mt]=null}var ct=null,ft=null,Te=!1,kt=null;function ic(e,t){var n=xt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function lc(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,ct=e,ft=sn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,ct=e,ft=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ln!==null?{id:Wt,overflow:Vt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=xt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,ct=e,ft=null,!0):!1;default:return!1}}function Gs(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Ks(e){if(Te){var t=ft;if(t){var n=t;if(!lc(e,t)){if(Gs(e))throw Error(r(418));t=sn(n.nextSibling);var i=ct;t&&lc(e,t)?ic(i,n):(e.flags=e.flags&-4097|2,Te=!1,ct=e)}}else{if(Gs(e))throw Error(r(418));e.flags=e.flags&-4097|2,Te=!1,ct=e}}}function sc(e){for(e=e.Line truncated
|
||||
Error generating stack: `+u.message+`
|
||||
`+u.stack}return{value:e,source:t,stack:o,digest:null}}function vo(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function yo(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var jh=typeof WeakMap=="function"?WeakMap:Map;function Uc(e,t,n){n=Yt(-1,n),n.tag=3,n.payload={element:null};var i=t.value;return n.callback=function(){El||(El=!0,No=i),yo(e,t)},n}function Wc(e,t,n){n=Yt(-1,n),n.tag=3;var i=e.type.getDerivedStateFromError;if(typeof i=="function"){var o=t.value;n.payload=function(){return i(o)},n.callback=function(){yo(e,t)}}var u=e.stateNode;return u!==null&&typeof u.componentDidCatch=="function"&&(n.callback=function(){yo(e,t),typeof i!="function"&&(pn===null?pn=new Set([this]):pn.add(this));var p=t.stack;this.componentDidCatch(t.value,{componentStack:p!==null?p:""})}),n}function Vc(e,t,n){var i=e.pingCache;if(i===null){i=e.pingCache=new jh;var o=new Set;i.set(t,o)}else o=i.get(t),o===void 0&&(o=new Set,i.set(t,o));o.has(n)||(o.add(n),e=bh.bind(null,e,t,n),t.then(e,e))}function bc(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Yc(e,t,n,i,o){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Yt(-1,1),t.tag=2,fn(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}var Ph=B.ReactCurrentOwner,it=!1;function _e(e,t,n,i){t.child=e===null?cc(t,null,n,i):dr(t,e.child,n,i)}function zc(e,t,n,i,o){n=n.render;var u=t.ref;return hr(t,o),i=ao(e,t,n,i,u,o),n=uo(),e!==null&&!it?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,zt(e,t,o)):(Te&&n&&zs(t),t.flags|=1,_e(e,t,i,o),t.child)}function Xc(e,t,n,i,o){if(e===null){var u=n.type;return typeof u=="function"&&!Uo(u)&&u.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=u,Gc(e,t,u,i,o)):(e=Tl(n.type,null,i,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,(e.lanes&o)===0){var p=u.memoizedProps;if(n=n.compare,n=n!==null?n:Kr,n(p,i)&&e.ref===t.ref)return zt(e,t,o)}return t.flags|=1,e=vn(u,i),e.ref=t.ref,e.return=t,t.child=e}function Gc(e,t,n,i,o){if(e!==null){var u=e.memoizedProps;if(Kr(u,i)&&e.ref===t.ref)if(it=!1,t.pendingProps=i=u,(e.lanes&o)!==0)(e.flags&131072)!==0&&(it=!0);else return t.lanes=e.lanes,zt(e,t,o)}return xo(e,t,n,i,o)}function Kc(e,t,n){var i=t.pendingProps,o=i.children,u=e!==null?e.memoizedState:null;if(i.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ce(yr,dt),dt|=n;else{if((n&1073741824)===0)return e=u!==null?u.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ce(yr,dt),dt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=u!==null?u.baseLanes:n,Ce(yr,dt),dt|=i}else u!==null?(i=u.baseLanes|n,t.memoizedState=null):i=n,Ce(yr,dt),dt|=i;return _e(e,t,o,n),t.child}function Zc(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function xo(e,t,n,i,o){var u=rt(n)?Hn:Ge.current;return u=ar(t,u),hr(t,o),n=ao(e,t,n,i,u,o),i=uo(),e!==null&&!it?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,zt(e,t,o)):(Te&&i&&zs(t),t.flags|=1,_e(e,t,n,o),t.child)}function Jc(e,t,n,i,o){if(rt(n)){var u=!0;$i(t)}else u=!1;if(hr(t,o),t.stateNode===null)vl(e,t),Fc(t,n,i),go(t,n,i,o),i=!0;else if(e===null){var p=t.stateNode,y=t.memoizedProps;p.props=y;var S=p.context,N=n.contextType;typeof N=="object"&&N!==null?N=gt(N):(N=rt(n)?Hn:Ge.current,N=ar(t,N));var X=n.getDerivedStateFromProps,K=typeof X=="function"||typeof p.getSnapshotBeforeUpdate=="function";K||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(y!==i||S!==N)&&Qc(t,p,i,N),cn=!1;var z=t.memoizedState;p.state=z,al(t,i,p,o),S=t.memoizedState,y!==i||z!==S||nt.current||cn?(typeof X=="function"&&(mo(t,n,X,i),S=t.memoizedState),(y=cn||Lc(t,n,y,i,z,S,N))?(K||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"&&(t.flags|=4194308)):(typeof p.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=S),p.props=i,p.state=S,p.context=N,i=y):(typeof p.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{p=t.stateNode,dc(e,t),y=t.memoizedProps,N=t.type===t.elementType?y:It(t.type,y),p.props=N,K=t.pendingProps,z=p.context,S=n.contextType,typeof S=="object"&&S!==null?S=gt(S):(S=rt(n)?Hn:Ge.current,S=ar(t,S));var q=n.getDerivedStateFromProps;(X=typeof q=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(y!==K||z!==S)&&Qc(t,p,i,S),cn=!1,z=t.memoizedState,p.state=z,al(t,i,p,oLine truncated
|
||||
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`},np=({diff:l,noTargetBlank:s,hideDetails:r})=>{const[a,c]=se.useState(l.diff?"diff":"actual"),[f,d]=se.useState(!1),[m,g]=se.useState(null),[A,E]=se.useState("Expected"),[k,I]=se.useState(null),[T,F]=se.useState(null),[x,v]=q0();se.useEffect(()=>{(async()=>{var G,V,b,re;g(await oa((G=l.expected)==null?void 0:G.attachment.path)),E(((V=l.expected)==null?void 0:V.title)||"Expected"),I(await oa((b=l.actual)==null?void 0:b.attachment.path)),F(await oa((re=l.diff)==null?void 0:re.attachment.path))})()},[l]);const w=m&&k&&T,j=w?Math.max(m.naturalWidth,k.naturalWidth,200):500,M=w?Math.max(m.naturalHeight,k.naturalHeight,200):500,B=Math.min(1,(x.width-30)/j),Q=Math.min(1,(x.width-50)/j/2),O=j*B,H=M*B,U={flex:"none",margin:"0 10px",cursor:"pointer",userSelect:"none"};return h.jsx("div",{"data-testid":"test-result-image-mismatch",style:{display:"flex",flexDirection:"column",alignItems:"center",flex:"auto"},ref:v,children:w&&h.jsxs(h.Fragment,{children:[h.jsxs("div",{"data-testid":"test-result-image-mismatch-tabs",style:{display:"flex",margin:"10px 0 20px"},children:[l.diff&&h.jsx("div",{style:{...U,fontWeight:a==="diff"?600:"initial"},onClick:()=>c("diff"),children:"Diff"}),h.jsx("div",{style:{...U,fontWeight:a==="actual"?600:"initial"},onClick:()=>c("actual"),children:"Actual"}),h.jsx("div",{style:{...U,fontWeight:a==="expected"?600:"initial"},onClick:()=>c("expected"),children:A}),h.jsx("div",{style:{...U,fontWeight:a==="sxs"?600:"initial"},onClick:()=>c("sxs"),children:"Side by side"}),h.jsx("div",{style:{...U,fontWeight:a==="slider"?600:"initial"},onClick:()=>c("slider"),children:"Slider"})]}),h.jsxs("div",{style:{display:"flex",justifyContent:"center",flex:"auto",minHeight:H+60},children:[l.diff&&a==="diff"&&h.jsx(Kt,{image:T,alt:"Diff",hideSize:r,canvasWidth:O,canvasHeight:H,scale:B}),l.diff&&a==="actual"&&h.jsx(Kt,{image:k,alt:"Actual",hideSize:r,canvasWidth:O,canvasHeight:H,scale:B}),l.diff&&a==="expected"&&h.jsx(Kt,{image:m,alt:A,hideSize:r,canvasWidth:O,canvasHeight:H,scale:B}),l.diff&&a==="slider"&&h.jsx(fg,{expectedImage:m,actualImage:k,hideSize:r,canvasWidth:O,canvasHeight:H,scale:B,expectedTitle:A}),l.diff&&a==="sxs"&&h.jsxs("div",{style:{display:"flex"},children:[h.jsx(Kt,{image:m,title:A,hideSize:r,canvasWidth:Q*j,canvasHeight:Q*M,scale:Q}),h.jsx(Kt,{image:f?T:k,title:f?"Diff":"Actual",onClick:()=>d(!f),hideSize:r,canvasWidth:Q*j,canvasHeight:Q*M,scale:Q})]}),!l.diff&&a==="actual"&&h.jsx(Kt,{image:k,title:"Actual",hideSize:r,canvasWidth:O,canvasHeight:H,scale:B}),!l.diff&&a==="expected"&&h.jsx(Kt,{image:m,title:A,hideSize:r,canvasWidth:O,canvasHeight:H,scale:B}),!l.diff&&a==="sxs"&&h.jsxs("div",{style:{display:"flex"},children:[h.jsx(Kt,{image:m,title:A,canvasWidth:Q*j,canvasHeight:Q*M,scale:Q}),h.jsx(Kt,{image:k,title:"Actual",canvasWidth:Q*j,canvasHeight:Q*M,scale:Q})]})]}),!r&&h.jsxs("div",{style:{alignSelf:"start",lineHeight:"18px",marginLeft:"15px"},children:[h.jsx("div",{children:l.diff&&h.jsx("a",{target:"_blank",href:l.diff.attachment.path,rel:"noreferrer",children:l.diff.attachment.name})}),h.jsx("div",{children:h.jsx("a",{target:s?"":"_blank",href:l.actual.attachment.path,rel:"noreferrer",children:l.actual.attachment.name})}),h.jsx("div",{children:h.jsx("a",{target:s?"":"_blank",href:l.expected.attachment.path,rel:"noreferrer",children:l.expected.attachment.name})})]})]})})},fg=({expectedImage:l,actualImage:s,canvasWidth:r,canvasHeight:a,scale:c,expectedTitle:f,hideSize:d})=>{const m={position:"absolute",top:0,left:0},[g,A]=se.useState(r/2),E=l.naturalWidth===s.naturalWidth&&l.naturalHeight===s.naturalHeight;return h.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column",userSelect:"none"},children:[!d&&h.jsxs("div",{style:{margin:5},children:[!E&&h.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"Expected "}),h.jsx("span",{children:l.naturalWidth}),h.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),h.jsx("span",{children:l.naturalHeight}),!E&&h.jsx("span",{style:{flex:"none",margin:"0 5px 0 15px"},children:"Actual "}),!E&&h.jsx("span",{children:s.naturalWidth}),!E&&h.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),!E&&h.jsx("span",{children:s.naturalHeight})]}),h.jsxs("div",{style:{position:"relative",width:r,height:a,margin:15,...wa},children:[h.jsx(cg,{orientation:"horizontal",offsets:[g],setOffsets:k=>A(k[0]),resizerColor:"#57606a80",resizerWidth:6}),h.jsx("img",{alt:f,style:{width:l.naturalWidth*c,height:l.naturalHeight*c},draggable:"false",src:l.src}),h.jsx("div",{style:{...m,bottom:0,overflow:"hidden",width:g,...wa},children:h.jsx("img",{alt:"Actual",style:{width:s.naturalWidth*c,height:s.naturalHeight*c},draggable:"false",src:s.src})})]})]})},Kt=({image:l,title:s,alt:r,hideSize:a,canvasWidth:c,canvasHeight:f,scale:d,onClick:m})=>h.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column"},children:[!a&&h.jsxs("div",{style:{margin:5},childrenLine truncated
|
||||
# Instructions
|
||||
|
||||
- Following Playwright test failed.
|
||||
- Explain why, be concise, respect Playwright best practices.
|
||||
- Provide a snippet of code with the fix, if possible.
|
||||
`.trimStart();async function xg({testInfo:l,metadata:s,errorContext:r,errors:a,buildCodeFrame:c,stdout:f,stderr:d}){var k;const m=new Set(a.filter(I=>I.message&&!I.message.includes(`
|
||||
`)).map(I=>I.message));for(const I of a)for(const T of m.keys())(k=I.message)!=null&&k.includes(T)&&m.delete(T);const g=a.filter(I=>!(!I.message||!I.message.includes(`
|
||||
`)&&!m.has(I.message)));if(!g.length)return;const A=[yg,"# Test info","",l];f&&A.push("","# Stdout","","```",aa(f),"```"),d&&A.push("","# Stderr","","```",aa(d),"```"),A.push("","# Error details");for(const I of g)A.push("","```",aa(I.message||""),"```");r&&A.push(r);const E=await c(g[g.length-1]);return E&&A.push("","# Test source","","```ts",E,"```"),s!=null&&s.gitDiff&&A.push("","# Local changes","","```diff",s.gitDiff,"```"),A.join(`
|
||||
`)}const wg=new RegExp("([\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~])))","g");function aa(l){return l.replace(wg,"")}function Ag(l,s){var a;const r=new Map;for(const c of l){const f=c.name.match(/^(.*)-(expected|actual|diff|previous)(\.[^.]+)?$/);if(!f)continue;const[,d,m,g=""]=f,A=d+g;let E=r.get(A);E||(E={name:A,anchors:[`attachment-${d}`]},r.set(A,E)),E.anchors.push(`attachment-${s.attachments.indexOf(c)}`),m==="actual"&&(E.actual={attachment:c}),m==="expected"&&(E.expected={attachment:c,title:"Expected"}),m==="previous"&&(E.expected={attachment:c,title:"Previous"}),m==="diff"&&(E.diff={attachment:c})}for(const[c,f]of r)!f.actual||!f.expected?r.delete(c):(l.delete(f.actual.attachment),l.delete(f.expected.attachment),l.delete((a=f.diff)==null?void 0:a.attachment));return[...r.values()]}const Eg=({test:l,result:s,testRunMetadata:r})=>{const{screenshots:a,videos:c,traces:f,otherAttachments:d,diffs:m,errors:g,otherAttachmentAnchors:A,screenshotAnchors:E,errorContext:k}=se.useMemo(()=>{const T=s.attachments.filter(H=>!H.name.startsWith("_")),F=new Set(T.filter(H=>H.contentType.startsWith("image/"))),x=[...F].map(H=>`attachment-${T.indexOf(H)}`),v=T.filter(H=>H.contentType.startsWith("video/")),w=T.filter(H=>H.name==="trace"),j=T.find(H=>H.name==="error-context"),M=new Set(T);[...F,...v,...w].forEach(H=>M.delete(H));const B=[...M].map(H=>`attachment-${T.indexOf(H)}`),Q=Ag(F,s),O=s.errors.map(H=>H.message);return{screenshots:[...F],videos:v,traces:w,otherAttachments:M,diffs:Q,errors:O,otherAttachmentAnchors:B,screenshotAnchors:x,errorContext:j}},[s]),I=bm(async()=>{const T=s.attachments.find(w=>w.name==="stdout"),F=s.attachments.find(w=>w.name==="stderr"),x=T!=null&&T.body&&T.contentType==="text/plain"?T.body:void 0,v=F!=null&&F.body&&F.contentType==="text/plain"?F.body:void 0;return await xg({testInfo:[`- Name: ${l.path.join(" >> ")} >> ${l.title}`,`- Location: ${l.location.file}:${l.location.line}:${l.location.column}`].join(`
|
||||
`),metadata:r,errorContext:k!=null&&k.path?await fetch(k.path).then(w=>w.text()):k==null?void 0:k.body,errors:s.errors,buildCodeFrame:async w=>w.codeframe,stdout:x,stderr:v})},[l,k,r,s],void 0);return h.jsxs("div",{className:"test-result",children:[!!g.length&&h.jsxs(Bt,{header:"Errors",children:[I&&h.jsx("div",{style:{position:"absolute",right:"16px",padding:"10px",zIndex:1},children:h.jsx(mg,{prompt:I})}),g.map((T,F)=>{const x=Sg(T,m);return h.jsxs(h.Fragment,{children:[h.jsx(Fa,{code:T},"test-result-error-message-"+F),x&&h.jsx(gg,{diff:x})]})})]}),!!s.steps.length&&h.jsx(Bt,{header:"Test Steps",children:s.steps.map((T,F)=>h.jsx(rp,{step:T,result:s,test:l,depth:0},`step-${F}`))}),m.map((T,F)=>h.jsx(yi,{id:T.anchors,children:h.jsx(Bt,{dataTestId:"test-results-image-diff",header:`Image mismatch: ${T.name}`,revealOnAnchorId:T.anchors,children:h.jsx(np,{diff:T})})},`diff-${F}`)),!!a.length&&h.jsx(Bt,{header:"Screenshots",revealOnAnchorId:E,children:a.map((T,F)=>h.jsxs(yi,{id:`attachment-${s.attachments.indexOf(T)}`,children:[h.jsx("a",{href:T.path,children:h.jsx("img",{className:"screenshot",src:T.path})}),h.jsx(Wl,{attachment:T,result:s})]},`screenshot-${F}`))}),!!f.length&&h.jsx(yi,{id:"attachment-trace",children:h.jsx(Bt,{header:"Traces",revealOnAnchorId:"attachment-trace",children:h.jsxs("div",{children:[h.jsx("a",{href:ep(f),children:h.jsx("img",{className:"screenshot",src:og,style:{width:192,height:117,marginLeft:20}})}),f.map((T,F)=>h.jsx(Wl,{attachment:T,result:s,linkName:f.length===1?"trace":`trace-${F+1}`},`trace-${F}`))]})})}),!!c.length&&h.jsx(yi,{id:"attachment-video",children:h.jsx(Bt,{header:"Videos",revealOnAnchorId:"attachment-video",children:c.map(T=>h.jsxs("div",{children:[h.jsx("video",{controls:!0,children:h.jsx("source",{src:T.path,type:T.contentType})}),h.jsx(Wl,{attachment:T,result:s})]},T.path))})}),!!d.size&&h.jsx(Bt,{header:"Attachments",revealOnAnchorId:A,dataTestId:"attachments",children:[...d].map((T,F)=>h.jsx(yi,{id:`attachment-${s.attachments.indexOf(T)}`,children:h.jsx(Wl,{attachment:T,result:s,openInNewTab:T.contentType.startsWith("text/html")})},`attachment-link-${F}`))})]})};function Sg(l,s){const r=l.split(`
|
||||
`)[0];if(!(!r.includes("toHaveScreenshot")&&!r.includes("toMatchSnapshot")))return s.find(a=>l.includes(a.name))}const rp=({test:l,step:s,result:r,depth:a})=>h.jsx(sg,{title:h.jsxs("span",{"aria-label":s.title,children:[h.jsx("span",{style:{float:"right"},children:Ir(s.duration)}),s.attachments.length>0&&h.jsx("a",{style:{float:"right"},title:"reveal attachment",href:qt({test:l,result:r,anchor:`attachment-${s.attachments[0]}`}),onClick:c=>{c.stopPropagation()},children:G0()}),es(s.error||s.duration===-1?"failed":s.skipped?"skipped":"passed"),h.jsx("span",{children:s.title}),s.count>1&&h.jsxs(h.Fragment,{children:[" ✕ ",h.jsx("span",{className:"test-result-counter",children:s.count})]}),s.location&&h.jsxs("span",{className:"test-result-path",children:["— ",s.location.file,":",s.location.line]})]}),loadChildren:s.steps.length||s.snippet?()=>{const c=s.snippet?[h.jsx(Fa,{testId:"test-snippet",code:s.snippet},"line")]:[],f=s.steps.map((d,m)=>h.jsx(rp,{step:d,depth:a+1,result:r,test:l},m));return c.concat(f)}:void 0,depth:a}),Cg=({projectNames:l,test:s,testRunMetadata:r,run:a,next:c,prev:f})=>{const[d,m]=se.useState(a),g=se.useContext(Et),A=g.has("q")?"&q="+g.get("q"):"",E=s.annotations.filter(k=>!k.type.startsWith("_"))??[];return h.jsxs(h.Fragment,{children:[h.jsx(La,{title:s.title,leftSuperHeader:h.jsx("div",{className:"test-case-path",children:s.path.join(" › ")}),rightSuperHeader:h.jsxs(h.Fragment,{children:[h.jsx("div",{className:At(!f&&"hidden"),children:h.jsx(jn,{href:qt({test:f})+A,children:"« previous"})}),h.jsx("div",{style:{width:10}}),h.jsx("div",{className:At(!c&&"hidden"),children:h.jsx(jn,{href:qt({test:c})+A,children:"next »"})})]})}),h.jsxs("div",{className:"hbox",style:{lineHeight:"24px"},children:[h.jsx("div",{className:"test-case-location",children:h.jsxs(Na,{value:`${s.location.file}:${s.location.line}`,children:[s.location.file,":",s.location.line]})}),h.jsx("div",{style:{flex:"auto"}}),h.jsx($0,{test:s,trailingSeparator:!0}),h.jsx("div",{className:"test-case-duration",children:Ir(s.duration)})]}),h.jsx(_0,{style:{marginLeft:"6px"},projectNames:l,activeProjectName:s.projectName,otherLabels:s.tags}),s.results.length===0&&E.length!==0&&h.jsx(Bt,{header:"Annotations",dataTestId:"test-case-annotations",children:E.map((k,I)=>h.jsx(Wd,{annotation:k},I))}),h.jsx(lg,{tabs:s.results.map((k,I)=>({id:String(I),title:h.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[es(k.status)," ",kg(I),s.results.length>1&&h.jsx("span",{className:"test-case-run-duration",children:Ir(k.duration)})]}),render:()=>{const T=k.annotations.filter(F=>!F.type.startsWith("_"));return h.jsxs(h.Fragment,{children:[!!T.length&&h.jsx(Bt,{header:"Annotations",dataTestId:"test-case-annotations",children:T.map((F,x)=>h.jsx(Wd,{annotation:F},x))}),h.jsx(Eg,{test:s,result:k,testRunMetadata:r})]})}}))||[],selectedTab:String(d),setSelectedTab:k=>m(+k)})]})};function Wd({annotation:{type:l,description:s}}){return h.jsxs("div",{className:"test-case-annotation",children:[h.jsx("span",{style:{fontWeight:"bold"},children:l}),s&&h.jsxs(Na,{value:s,children:[": ",Ci(s)]})]})}function kg(l){return l?`Retry #${l}`:"Run"}const Ig=({file:l,projectNames:s,isFileExpanded:r,setFileExpanded:a})=>{const c=se.useContext(Et),f=c.has("q")?"&q="+c.get("q"):"";return h.jsx(tp,{expanded:r(l.fileId),noInsets:!0,setExpanded:d=>a(l.fileId,d),header:h.jsx("span",{className:"chip-header-allow-selection",children:l.fileName}),children:l.tests.map(d=>h.jsxs("div",{className:At("test-file-test","test-file-test-outcome-"+d.outcome),children:[h.jsxs("div",{className:"hbox",style:{alignItems:"flex-start"},children:[h.jsxs("div",{className:"hbox",children:[h.jsx("span",{className:"test-file-test-status-icon",children:es(d.outcome)}),h.jsxs("span",{children:[h.jsx(jn,{href:qt({test:d})+f,title:[...d.path,d.title].join(" › "),children:h.jsx("span",{className:"test-file-title",children:[...d.path,d.title].join(" › ")})}),h.jsx(_0,{style:{marginLeft:"6px"},projectNames:s,activeProjectName:d.projectName,otherLabels:d.tags})]})]}),h.jsx("span",{"data-testid":"test-duration",style:{minWidth:"50px",textAlign:"right"},children:Ir(d.duration)})]}),h.jsx("div",{className:"test-file-details-row",children:h.jsxs("div",{className:"test-file-details-row-items",children:[h.jsx(jn,{href:qt({test:d}),title:[...d.path,d.title].join(" › "),className:"test-file-path-link",children:h.jsxs("span",{className:"test-file-path",children:[d.location.file,":",d.location.line]})}),Rg(d),Tg(d),h.jsx($0,{test:d,dim:!0})]})})]},`test-${d.testId}`))})};function Rg(l){for(const s of l.results)for(const r of s.attachments)if(r.contentType.startsWith("image/")&&r.name.match(/-(expected|actual|diff)/))return h.jsx(Ba,{href:qt({test:l,result:s,anchor:`attachment-${s.attachments.indexOf(r)}`}),title:"View images",dim:!0,children:Qm()})}function Tg(l){const s=l.results.find(r=>r.attachments.some(a=>a.name==="video"));return s?h.jsx(Ba,{href:qt({test:l,result:s,anchor:"attachmentLine truncated
|
||||
</script>
|
||||
<style type='text/css'>:root{--color-canvas-default-transparent: rgba(255,255,255,0);--color-marketing-icon-primary: #218bff;--color-marketing-icon-secondary: #54aeff;--color-diff-blob-addition-num-text: #24292f;--color-diff-blob-addition-fg: #24292f;--color-diff-blob-addition-num-bg: #CCFFD8;--color-diff-blob-addition-line-bg: #E6FFEC;--color-diff-blob-addition-word-bg: #ABF2BC;--color-diff-blob-deletion-num-text: #24292f;--color-diff-blob-deletion-fg: #24292f;--color-diff-blob-deletion-num-bg: #FFD7D5;--color-diff-blob-deletion-line-bg: #FFEBE9;--color-diff-blob-deletion-word-bg: rgba(255,129,130,.4);--color-diff-blob-hunk-num-bg: rgba(84,174,255,.4);--color-diff-blob-expander-icon: #57606a;--color-diff-blob-selected-line-highlight-mix-blend-mode: multiply;--color-diffstat-deletion-border: rgba(27,31,36,.15);--color-diffstat-addition-border: rgba(27,31,36,.15);--color-diffstat-addition-bg: #2da44e;--color-search-keyword-hl: #fff8c5;--color-prettylights-syntax-comment: #6e7781;--color-prettylights-syntax-constant: #0550ae;--color-prettylights-syntax-entity: #8250df;--color-prettylights-syntax-storage-modifier-import: #24292f;--color-prettylights-syntax-entity-tag: #116329;--color-prettylights-syntax-keyword: #cf222e;--color-prettylights-syntax-string: #0a3069;--color-prettylights-syntax-variable: #953800;--color-prettylights-syntax-brackethighlighter-unmatched: #82071e;--color-prettylights-syntax-invalid-illegal-text: #f6f8fa;--color-prettylights-syntax-invalid-illegal-bg: #82071e;--color-prettylights-syntax-carriage-return-text: #f6f8fa;--color-prettylights-syntax-carriage-return-bg: #cf222e;--color-prettylights-syntax-string-regexp: #116329;--color-prettylights-syntax-markup-list: #3b2300;--color-prettylights-syntax-markup-heading: #0550ae;--color-prettylights-syntax-markup-italic: #24292f;--color-prettylights-syntax-markup-bold: #24292f;--color-prettylights-syntax-markup-deleted-text: #82071e;--color-prettylights-syntax-markup-deleted-bg: #FFEBE9;--color-prettylights-syntax-markup-inserted-text: #116329;--color-prettylights-syntax-markup-inserted-bg: #dafbe1;--color-prettylights-syntax-markup-changed-text: #953800;--color-prettylights-syntax-markup-changed-bg: #ffd8b5;--color-prettylights-syntax-markup-ignored-text: #eaeef2;--color-prettylights-syntax-markup-ignored-bg: #0550ae;--color-prettylights-syntax-meta-diff-range: #8250df;--color-prettylights-syntax-brackethighlighter-angle: #57606a;--color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;--color-prettylights-syntax-constant-other-reference-link: #0a3069;--color-codemirror-text: #24292f;--color-codemirror-bg: #ffffff;--color-codemirror-gutters-bg: #ffffff;--color-codemirror-guttermarker-text: #ffffff;--color-codemirror-guttermarker-subtle-text: #6e7781;--color-codemirror-linenumber-text: #57606a;--color-codemirror-cursor: #24292f;--color-codemirror-selection-bg: rgba(84,174,255,.4);--color-codemirror-activeline-bg: rgba(234,238,242,.5);--color-codemirror-matchingbracket-text: #24292f;--color-codemirror-lines-bg: #ffffff;--color-codemirror-syntax-comment: #24292f;--color-codemirror-syntax-constant: #0550ae;--color-codemirror-syntax-entity: #8250df;--color-codemirror-syntax-keyword: #cf222e;--color-codemirror-syntax-storage: #cf222e;--color-codemirror-syntax-string: #0a3069;--color-codemirror-syntax-support: #0550ae;--color-codemirror-syntax-variable: #953800;--color-checks-bg: #24292f;--color-checks-run-border-width: 0px;--color-checks-container-border-width: 0px;--color-checks-text-primary: #f6f8fa;--color-checks-text-secondary: #8c959f;--color-checks-text-link: #54aeff;--color-checks-btn-icon: #afb8c1;--color-checks-btn-hover-icon: #f6f8fa;--color-checks-btn-hover-bg: rgba(255,255,255,.125);--color-checks-input-text: #eaeef2;--color-checks-input-placeholder-text: #8c959f;--color-checks-input-focus-text: #8c959f;--color-checks-input-bg: #32383f;--color-checks-input-shadow: none;--color-checks-donut-error: #fa4549;--color-checks-donut-pending: #bf8700;--color-checks-donut-success: #2da44e;--color-checks-donut-neutral: #afb8c1;--color-checks-dropdown-text: #afb8c1;--color-checks-dropdown-bg: #32383f;--color-checks-dropdown-border: #424a53;--color-checks-dropdown-shadow: rgba(27,31,36,.3);--color-checks-dropdown-hover-text: #f6f8fa;--color-checks-dropdown-hover-bg: #424a53;--color-checks-dropdown-btn-hover-text: #f6f8fa;--color-checks-dropdown-btn-hover-bg: #32383f;--color-checks-scrollbar-thumb-bg: #57606a;--color-checks-header-label-text: #d0d7de;--color-checks-header-label-open-text: #f6f8fa;--color-checks-header-border: #32383f;--color-checks-header-icon: #8c959f;--color-checks-line-text: #d0d7de;--color-checks-line-num-text: rgba(140,149,159,.75);--color-checks-line-timestamp-text: #8c959f;--color-checks-line-hover-bg: #32383f;--color-checks-line-selected-bg: rgba(33,139,255,.15);--color-checks-line-selected-num-text: #54aeff;--color-checks-line-dt-fm-text: #24292f;--color-checks-line-dt-fm-bg: #9a6700;--color-checks-gate-bg: rgba(1Line truncated
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id='root'></div>
|
||||
</body>
|
||||
</html>
|
||||
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
.CodeMirror{font-family:monospace;height:300px;color:#000;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor .CodeMirror-line::selection,.cm-fat-cursor .CodeMirror-line>span::selection,.cm-fat-cursor .CodeMirror-line>span>span::selection{background:transparent}.cm-fat-cursor .CodeMirror-line::-moz-selection,.cm-fat-cursor .CodeMirror-line>span::-moz-selection,.cm-fat-cursor .CodeMirror-line>span>span::-moz-selection{background:transparent}.cm-fat-cursor{caret-color:transparent}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:0;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error,.cm-invalidchar{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:#ff96004d}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:none;position:relative;z-index:0}.CodeMirror-sizer{position:relative;border-right:50px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none;outline:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-50px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:coLine truncated
|
||||
Generated
Vendored
+24
@@ -0,0 +1,24 @@
|
||||
import{g as Wu}from"./index-D7C7daHH.js";var vi={exports:{}},_u=vi.exports,ha;function It(){return ha||(ha=1,function(Et,zt){(function(C,De){Et.exports=De()})(_u,function(){var C=navigator.userAgent,De=navigator.platform,I=/gecko\/\d/i.test(C),K=/MSIE \d/.test(C),$=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(C),V=/Edge\/(\d+)/.exec(C),b=K||$||V,N=b&&(K?document.documentMode||6:+(V||$)[1]),_=!V&&/WebKit\//.test(C),ie=_&&/Qt\/\d+\.\d+/.test(C),O=!V&&/Chrome\/(\d+)/.exec(C),q=O&&+O[1],z=/Opera\//.test(C),X=/Apple Computer/.test(navigator.vendor),ke=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(C),we=/PhantomJS/.test(C),te=X&&(/Mobile\/\w+/.test(C)||navigator.maxTouchPoints>2),re=/Android/.test(C),ne=te||re||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(C),se=te||/Mac/.test(De),Ae=/\bCrOS\b/.test(C),ye=/win/i.test(De),de=z&&C.match(/Version\/(\d*\.\d*)/);de&&(de=Number(de[1])),de&&de>=15&&(z=!1,_=!0);var ze=se&&(ie||z&&(de==null||de<12.11)),fe=I||b&&N>=9;function H(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var Ee=function(e,t){var n=e.className,r=H(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function D(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function J(e,t){return D(e).appendChild(t)}function d(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function S(e,t,n,r){var i=d(e,t,n,r);return i.setAttribute("role","presentation"),i}var w;document.createRange?w=function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:w=function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch{return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};function m(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function y(e){var t=e.ownerDocument||e,n;try{n=e.activeElement}catch{n=t.body||null}for(;n&&n.shadowRoot&&n.shadowRoot.activeElement;)n=n.shadowRoot.activeElement;return n}function P(e,t){var n=e.className;H(t).test(n)||(e.className+=(n?" ":"")+t)}function le(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!H(n[r]).test(t)&&(t+=" "+n[r]);return t}var p=function(e){e.select()};te?p=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:b&&(p=function(e){try{e.select()}catch{}});function c(e){return e.display.wrapper.ownerDocument}function Y(e){return xe(e.display.wrapper)}function xe(e){return e.getRootNode?e.getRootNode():e.ownerDocument}function j(e){return c(e).defaultView}function ue(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function Te(e,t,n){t||(t={});for(var r in e)e.hasOwnProperty(r)&&(n!==!1||!t.hasOwnProperty(r))&&(t[r]=e[r]);return t}function Le(e,t,n,r,i){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var o=r||0,l=i||0;;){var a=e.indexOf(" ",o);if(a<0||a>=t)return l+(t-o);l+=a-o,l+=n-l%n,o=a+1}}var be=function(){this.id=null,this.f=null,this.time=0,this.handler=ue(this.onTimeout,this)};be.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},be.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};function oe(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}var Ne=50,qe={toString:function(){return"CodeMirror.Pass"}},Ve={scroll:!1},ct={origin:"*mouse"},Oe={origin:"+move"};function Re(e,t,n){for(var r=0,i=0;;){var o=e.indexOf(" ",r);o==-1&&(o=e.length);var l=o-r;if(o==e.length||i+l>=t)return r+Math.min(l,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}}var Ue=[""];function et(e){for(;Ue.length<=e;)Ue.push(ge(Ue)+" ");return Ue[e]}function ge(e){return e[e.length-1]}function Pe(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function T(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}function B(){}function F(e,t){var n;return Object.create?n=Object.create(e):(B.prototype=e,n=new B),t&&Te(t,n),n}var Ie=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ae(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||Ie.test(e))}function Se(e,t){return t?t.source.indexOf("\\w")>-1&&ae(e)?!0:t.test(e):ae(e)}function he(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Be=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\uLine truncated
|
||||
|
||||
b`.split(/\n/).length!=3?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf(`
|
||||
`,t);i==-1&&(i=e.length);var o=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),l=o.indexOf("\r");l!=-1?(n.push(o.slice(0,l)),t+=l+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},ur=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch{}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},_n=function(){var e=d("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),_t=null;function xi(e){if(_t!=null)return _t;var t=J(e,d("span","x")),n=t.getBoundingClientRect(),r=w(t,0,1).getBoundingClientRect();return _t=Math.abs(n.left-r.left)>1}var Pr={},Ht={};function Rt(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Pr[e]=t}function kr(e,t){Ht[e]=t}function Ir(e){if(typeof e=="string"&&Ht.hasOwnProperty(e))e=Ht[e];else if(e&&typeof e.name=="string"&&Ht.hasOwnProperty(e.name)){var t=Ht[e.name];typeof t=="string"&&(t={name:t}),e=F(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ir("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ir("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function zr(e,t){t=Ir(t);var n=Pr[t.name];if(!n)return zr(e,"text/plain");var r=n(e,t);if(fr.hasOwnProperty(t.name)){var i=fr[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)r[l]=t.modeProps[l];return r}var fr={};function Br(e,t){var n=fr.hasOwnProperty(e)?fr[e]:fr[e]={};Te(t,n)}function Gt(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function sn(e,t){for(var n;e.innerMode&&(n=e.innerMode(t),!(!n||n.mode==e));)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Wr(e,t,n){return e.startState?e.startState(t,n):!0}var Je=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};Je.prototype.eol=function(){return this.pos>=this.string.length},Je.prototype.sol=function(){return this.pos==this.lineStart},Je.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Je.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Je.prototype.eat=function(e){var t=this.string.charAt(this.pos),n;if(typeof e=="string"?n=t==e:n=t&&(e.test?e.test(t):e(t)),n)return++this.pos,t},Je.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Je.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Je.prototype.skipToEnd=function(){this.pos=this.string.length},Je.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Je.prototype.backUp=function(e){this.pos-=e},Je.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Le(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Le(this.string,this.lineStart,this.tabSize):0)},Je.prototype.indentation=function(){return Le(this.string,null,this.tabSize)-(this.lineStart?Le(this.string,this.lineStart,this.tabSize):0)},Je.prototype.match=function(e,t,n){if(typeof e=="string"){var r=function(l){return n?l.toLowerCase():l},i=this.string.substr(this.pos,e.length);if(r(i)==r(e))return t!==!1&&(this.pos+=e.length),!0}else{var o=this.string.slice(this.pos).match(e);return o&&o.index>0?null:(o&&t!==!1&&(this.pos+=o[0].length),o)}},Je.prototype.current=function(){return this.string.slice(this.start,this.pos)},Je.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Je.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Je.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function ce(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t<o){n=i;break}t-=o}return n.lines[t]}function Vt(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,function(o){var l=o.text;i==n.line&&(l=l.slice(0,n.ch)),i==t.line&&(l=l.slice(t.ch)),r.push(l),++i}),r}function un(e,t,n){var r=[];return e.iter(t,n,function(i){r.push(i.text)}),r}function Ft(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function f(e){if(e.parent==null)return null;for(var t=e.parent,n=oe(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function g(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e
Line truncated
|
||||
`?(E=h.appendChild(d("span",k[0]=="\r"?"␍":"","cm-invalidchar")),E.setAttribute("cm-text",k[0]),e.col+=1):(E=e.cm.options.specialCharPlaceholder(k[0]),E.setAttribute("cm-text",k[0]),b&&N<9?h.appendChild(d("span",[E])):h.appendChild(E),e.col+=1);e.map.push(e.pos,e.pos+1,E),e.pos++}}if(e.trailingSpace=a.charCodeAt(t.length-1)==32,n||r||i||u||o||l){var Q=n||"";r&&(Q+=r),i&&(Q+=i);var G=d("span",[h],Q,o);if(l)for(var ee in l)l.hasOwnProperty(ee)&&ee!="style"&&ee!="class"&&G.setAttribute(ee,l[ee]);return e.content.appendChild(G)}e.content.appendChild(h)}}function is(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var o=e.charAt(i);o==" "&&n&&(i==e.length-1||e.charCodeAt(i+1)==32)&&(o=" "),r+=o,n=o==" "}return r}function os(e,t){return function(n,r,i,o,l,a,s){i=i?i+" cm-force-border":"cm-force-border";for(var u=n.pos,h=u+r.length;;){for(var v=void 0,k=0;k<t.length&&(v=t[k],!(v.to>u&&v.from<=u));k++);if(v.to>=h)return e(n,r,i,o,l,a,s);e(n,r.slice(0,v.to-u),i,o,null,a,s),o=null,r=r.slice(v.to-u),u=v.to}}}function Oo(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function ls(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(!r){for(var l=1;l<n.length;l+=2)t.addToken(t,i.slice(o,o=n[l]),Eo(n[l+1],t.cm.options));return}for(var a=i.length,s=0,u=1,h="",v,k,x=0,M,E,R,U,Q;;){if(x==s){M=E=R=k="",Q=null,U=null,x=1/0;for(var G=[],ee=void 0,me=0;me<r.length;++me){var pe=r[me],Fe=pe.marker;if(Fe.type=="bookmark"&&pe.from==s&&Fe.widgetNode)G.push(Fe);else if(pe.from<=s&&(pe.to==null||pe.to>s||Fe.collapsed&&pe.to==s&&pe.from==s)){if(pe.to!=null&&pe.to!=s&&x>pe.to&&(x=pe.to,E=""),Fe.className&&(M+=" "+Fe.className),Fe.css&&(k=(k?k+";":"")+Fe.css),Fe.startStyle&&pe.from==s&&(R+=" "+Fe.startStyle),Fe.endStyle&&pe.to==x&&(ee||(ee=[])).push(Fe.endStyle,pe.to),Fe.title&&((Q||(Q={})).title=Fe.title),Fe.attributes)for(var Ke in Fe.attributes)(Q||(Q={}))[Ke]=Fe.attributes[Ke];Fe.collapsed&&(!U||Si(U.marker,Fe)<0)&&(U=pe)}else pe.from>s&&x>pe.from&&(x=pe.from)}if(ee)for(var st=0;st<ee.length;st+=2)ee[st+1]==x&&(E+=" "+ee[st]);if(!U||U.from==s)for(var Xe=0;Xe<G.length;++Xe)Oo(t,0,G[Xe]);if(U&&(U.from||0)==s){if(Oo(t,(U.to==null?a+1:U.to)-s,U.marker,U.from==null),U.to==null)return;U.to==s&&(U=!1)}}if(s>=a)break;for(var Mt=Math.min(a,x);;){if(h){var wt=s+h.length;if(!U){var tt=wt>Mt?h.slice(0,Mt-s):h;t.addToken(t,tt,v?v+M:M,R,s+tt.length==x?E:"",k,Q)}if(wt>=Mt){h=h.slice(Mt-s),s=Mt;break}s=wt,R=""}h=i.slice(o,o=n[u++]),v=Eo(n[u++],t.cm.options)}}}function Po(e,t,n){this.line=t,this.rest=Qa(t),this.size=this.rest?f(ge(this.rest))-n+1:1,this.node=this.text=null,this.hidden=cr(e,t)}function Gn(e,t,n){for(var r=[],i,o=t;o<n;o=i){var l=new Po(e.doc,ce(e.doc,o),o);i=o+l.size,r.push(l)}return r}var Rr=null;function as(e){Rr?Rr.ops.push(e):e.ownsGroup=Rr={ops:[e],delayedCallbacks:[]}}function ss(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}function us(e,t){var n=e.ownsGroup;if(n)try{ss(n)}finally{Rr=null,t(n)}}var dn=null;function ot(e,t){var n=Qt(e,t);if(n.length){var r=Array.prototype.slice.call(arguments,2),i;Rr?i=Rr.delayedCallbacks:dn?i=dn:(i=dn=[],setTimeout(fs,0));for(var o=function(a){i.push(function(){return n[a].apply(null,r)})},l=0;l<n.length;++l)o(l)}}function fs(){var e=dn;dn=null;for(var t=0;t<e.length;++t)e[t]()}function Io(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];o=="text"?ds(e,t):o=="gutter"?Bo(e,t,n,r):o=="class"?Di(e,t):o=="widget"&&hs(e,t,r)}t.changes=null}function hn(e){return e.node==e.text&&(e.node=d("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),b&&N<8&&(e.node.style.zIndex=2)),e.node}function cs(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=hn(t);t.background=r.insertBefore(d("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}function zo(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):No(e,t)}function ds(e,t){var n=t.text.className,r=zo(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,Di(e,t)):n&&(t.text.className=n)}function Di(e,t){cs(e,t),t.line.wrapClass?hn(t).className=t.lin
Line truncated
|
||||
top: `+ee+"px; width: "+(me??s-G)+`px;
|
||||
height: `+(pe-ee)+"px"))}function v(G,ee,me){var pe=ce(i,G),Fe=pe.text.length,Ke,st;function Xe(tt,St){return Zn(e,L(G,tt),"div",pe,St)}function Mt(tt,St,ft){var nt=Vo(e,pe,null,tt),rt=St=="ltr"==(ft=="after")?"left":"right",Qe=ft=="after"?nt.begin:nt.end-(/\s/.test(pe.text.charAt(nt.end-1))?2:1);return Xe(Qe,rt)[rt]}var wt=We(pe,i.direction);return or(wt,ee||0,me??Fe,function(tt,St,ft,nt){var rt=ft=="ltr",Qe=Xe(tt,rt?"left":"right"),Tt=Xe(St-1,rt?"right":"left"),nn=ee==null&&tt==0,xr=me==null&&St==Fe,gt=nt==0,Jt=!wt||nt==wt.length-1;if(Tt.top-Qe.top<=3){var ut=(u?nn:xr)&>,co=(u?xr:nn)&&Jt,ir=ut?a:(rt?Qe:Tt).left,Ar=co?s:(rt?Tt:Qe).right;h(ir,Qe.top,Ar-ir,Qe.bottom)}else{var Er,mt,on,ho;rt?(Er=u&&nn&>?a:Qe.left,mt=u?s:Mt(tt,ft,"before"),on=u?a:Mt(St,ft,"after"),ho=u&&xr&&Jt?s:Tt.right):(Er=u?Mt(tt,ft,"before"):a,mt=!u&&nn&>?s:Qe.right,on=!u&&xr&&Jt?a:Tt.left,ho=u?Mt(St,ft,"after"):s),h(Er,Qe.top,mt-Er,Qe.bottom),Qe.bottom<Tt.top&&h(a,Qe.bottom,null,Tt.top),h(on,Tt.top,ho-on,Tt.bottom)}(!Ke||Qn(Qe,Ke)<0)&&(Ke=Qe),Qn(Tt,Ke)<0&&(Ke=Tt),(!st||Qn(Qe,st)<0)&&(st=Qe),Qn(Tt,st)<0&&(st=Tt)}),{start:Ke,end:st}}var k=t.from(),x=t.to();if(k.line==x.line)v(k.line,k.ch,x.ch);else{var M=ce(i,k.line),E=ce(i,x.line),R=qt(M)==qt(E),U=v(k.line,k.ch,R?M.text.length+1:null).end,Q=v(x.line,R?0:null,x.ch).start;R&&(U.top<Q.top-2?(h(U.right,U.top,null,U.bottom),h(a,Q.top,Q.left,Q.bottom)):h(U.right,U.top,Q.left-U.right,U.bottom)),U.bottom<Q.top&&h(a,U.bottom,null,Q.top)}n.appendChild(o)}function _i(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||Ur(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function rl(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Ri(e))}function Hi(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Ur(e))},100)}function Ri(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(Ye(e,"focus",e,t),e.state.focused=!0,P(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),_&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),_i(e))}function Ur(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Ye(e,"blur",e,t),e.state.focused=!1,Ee(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Vn(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,l=0;l<t.view.length;l++){var a=t.view[l],s=e.options.lineWrapping,u=void 0,h=0;if(!a.hidden){if(i+=a.line.height,b&&N<8){var v=a.node.offsetTop+a.node.offsetHeight;u=v-n,n=v}else{var k=a.node.getBoundingClientRect();u=k.bottom-k.top,!s&&a.text.firstChild&&(h=a.text.firstChild.getBoundingClientRect().right-k.left-1)}var x=a.line.height-u;if((x>.005||x<-.005)&&(i<r&&(o-=x),Ft(a.line,u),nl(a.line),a.rest))for(var M=0;M<a.rest.length;M++)nl(a.rest[M]);if(h>e.display.sizerWidth){var E=Math.ceil(h/Kr(e.display));E>e.display.maxLineLength&&(e.display.maxLineLength=E,e.display.maxLine=a.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function nl(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function $n(e,t,n){var r=n&&n.top!=null?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Xn(e));var i=n&&n.bottom!=null?n.bottom:r+e.wrapper.clientHeight,o=g(t,r),l=g(t,i);if(n&&n.ensure){var a=n.ensure.from.line,s=n.ensure.to.line;a<o?(o=a,l=g(t,er(ce(t,a))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=l&&(o=g(t,er(ce(t,s))-e.wrapper.clientHeight),l=s)}return{from:o,to:Math.max(l,o+1)}}function Cs(e,t){if(!Ze(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null,o=n.wrapper.ownerDocument;if(t.top+r.top<0?i=!0:t.bottom+r.top>(o.defaultView.innerHeight||o.documentElement.clientHeight)&&(i=!1),i!=null&&!we){var l=d("div","",null,`position: absolute;
|
||||
top: `+(t.top-n.viewOffset-Xn(e.display))+`px;
|
||||
height: `+(t.bottom-t.top+Yt(e)+n.barHeight)+`px;
|
||||
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(l),l.scrollIntoView(i),e.display.lineSpace.removeChild(l)}}}function Ds(e,t,n,r){r==null&&(r=0);var i;!e.options.lineWrapping&&t==n&&(n=t.sticky=="before"?L(t.line,t.ch+1,"before"):t,t=t.ch?L(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var l=!1,a=jt(e,t),s=!n||n==t?a:jt(e,n);i={left:Math.min(a.left,s.left),top:Math.min(a.top,s.top)-r,right:Math.max(a.left,s.left),bottom:Math.max(a.bottom,s.bottom)+r};var u=qi(e,i),h=e.doc.scrollTop,v=e.doc.scrollLeft;if(u.scrollTop!=null&&(yn(e,u.scrollTop),Math.abs(e.doc.scrollTop-h)>1&&(l=!0)),u.scrollLeft!=null&&(Cr(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-v)>1&&(l=!0)),!l)break}return i}function Ms(e,t){var n=qi(e,t);n.scrollTop!=null&&yn(e,n.scrollTop),n.scrollLeft!=null&&Cr(e,n.scrollLeft)}function qi(e,t){var n=e.display,r=jr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:n.scroller.scrollTop,o=Fi(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var a=e.doc.height+Mi(n),s=t.top<r,u=t.bottom>a-r;if(t.top<i)l.scrollTop=s?0:t.top;else if(t.bottom>i+o){var h=Math.min(t.top,(u?a:t.bottom)-o);h!=i&&(l.scrollTop=h)}var v=e.options.fixedGutter?0:n.gutters.offsetWidth,k=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:n.scroller.scrollLeft-v,x=wr(e)-n.gutters.offsetWidth,M=t.right-t.left>x;return M&&(t.right=t.left+x),t.left<10?l.scrollLeft=0:t.left<k?l.scrollLeft=Math.max(0,t.left+v-(M?0:10)):t.right>x+k-3&&(l.scrollLeft=t.right+(M?0:10)-x),l}function ji(e,t){t!=null&&(ei(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Gr(e){ei(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function mn(e,t,n){(t!=null||n!=null)&&ei(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function Fs(e,t){ei(e),e.curOp.scrollToPos=t}function ei(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=Jo(e,t.from),r=Jo(e,t.to);il(e,n,r,t.margin)}}function il(e,t,n,r){var i=qi(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});mn(e,i.scrollLeft,i.scrollTop)}function yn(e,t){Math.abs(e.doc.scrollTop-t)<2||(I||Ui(e,{top:t}),ol(e,t,!0),I&&Ui(e),kn(e,100))}function ol(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Cr(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r)&&(e.doc.scrollLeft=t,fl(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function xn(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Mi(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Yt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Dr=function(e,t,n){this.cm=n;var r=this.vert=d("div",[d("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=d("div",[d("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),ve(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),ve(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,b&&N<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Dr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(r==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Dr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Dr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert
Line truncated
|
||||
`},setDirection:at(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&Us(this.cm))})}),kt.prototype.eachLine=kt.prototype.iter;var Rl=0;function iu(e){var t=this;if(ql(t),!(Ze(t,e)||tr(t.display,e))){ht(e),b&&(Rl=+new Date);var n=Tr(t,e,!0),r=e.dataTransfer.files;if(!(!n||t.isReadOnly()))if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),l=0,a=function(){++l==i&<(t,function(){n=Ce(t.doc,n);var x={from:n,to:n,text:t.doc.splitLines(o.filter(function(M){return M!=null}).join(t.doc.lineSeparator())),origin:"paste"};Jr(t.doc,x),Cl(t.doc,pr(Ce(t.doc,n),Ce(t.doc,gr(x))))})()},s=function(x,M){if(t.options.allowDropFileTypes&&oe(t.options.allowDropFileTypes,x.type)==-1){a();return}var E=new FileReader;E.onerror=function(){return a()},E.onload=function(){var R=E.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(R)){a();return}o[M]=R,a()},E.readAsText(x)},u=0;u<r.length;u++)s(r[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var h=e.dataTransfer.getData("Text");if(h){var v;if(t.state.draggingText&&!t.state.draggingText.copy&&(v=t.listSelections()),li(t.doc,pr(n,n)),v)for(var k=0;k<v.length;++k)Qr(t.doc,"",v[k].anchor,v[k].head,"drag");t.replaceSelection(h,"around","paste"),t.display.input.focus()}}catch{}}}}function ou(e,t){if(b&&(!e.state.draggingText||+new Date-Rl<100)){ar(t);return}if(!(Ze(e,t)||tr(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!X)){var n=d("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",z&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),z&&n.parentNode.removeChild(n)}}function lu(e,t){var n=Tr(e,t);if(n){var r=document.createDocumentFragment();Wi(e,n,r),e.display.dragCursor||(e.display.dragCursor=d("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),J(e.display.dragCursor,r)}}function ql(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function jl(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<t.length;r++){var i=t[r].CodeMirror;i&&n.push(i)}n.length&&n[0].operation(function(){for(var o=0;o<n.length;o++)e(n[o])})}}var Kl=!1;function au(){Kl||(su(),Kl=!0)}function su(){var e;ve(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,jl(uu)},100))}),ve(window,"blur",function(){return jl(Ur)})}function uu(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var yr={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},An=0;An<10;An++)yr[An+48]=yr[An+96]=String(An);for(var ui=65;ui<=90;ui++)yr[ui]=String.fromCharCode(ui);for(var En=1;En<=12;En++)yr[En+111]=yr[En+63235]="F"+En;var nr={};nr.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},nr.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},nr.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O"Line truncated
|
||||
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Yl(e,t){var n=ce(e.doc,t),r=qt(n);return r!=n&&(t=f(r)),no(!0,e,r,t,1)}function hu(e,t){var n=ce(e.doc,t),r=Ja(n);return r!=n&&(t=f(r)),no(!0,e,n,t,-1)}function Zl(e,t){var n=Yl(e,t.line),r=ce(e.doc,n.line),i=We(r,e.doc.direction);if(!i||i[0].level==0){var o=Math.max(n.ch,r.text.search(/\S/)),l=t.line==n.line&&t.ch<=o&&t.ch;return L(n.line,l?0:o,n.sticky)}return n}function ci(e,t,n){if(typeof t=="string"&&(t=Nn[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=qe}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function pu(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=$r(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&$r(t,e.options.extraKeys,n,e)||$r(t,e.options.keyMap,n,e)}var gu=new be;function On(e,t,n,r){var i=e.state.keySeq;if(i){if(Ul(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:gu.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),Jl(e,i+" "+t,n,r))return!0}return Jl(e,t,n,r)}function Jl(e,t,n,r){var i=pu(e,t,r);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&ot(e,"keyHandled",e,t,n),(i=="handled"||i=="multi")&&(ht(n),_i(e)),!!i}function Ql(e,t){var n=Xl(t,!0);return n?t.shiftKey&&!e.state.keySeq?On(e,"Shift-"+n,t,function(r){return ci(e,r,!0)})||On(e,n,t,function(r){if(typeof r=="string"?/^go[A-Z]/.test(r):r.motion)return ci(e,r)}):On(e,n,t,function(r){return ci(e,r)}):!1}function vu(e,t,n){return On(e,"'"+n+"'",t,function(r){return ci(e,r,!0)})}var io=null;function Vl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=y(Y(t)),!Ze(t,e))){b&&N<11&&e.keyCode==27&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=n==16||e.shiftKey;var r=Ql(t,e);z&&(io=r?n:null,!r&&n==88&&!_n&&(se?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),I&&!se&&!r&&n==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),n==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&mu(t)}}function mu(e){var t=e.display.lineDiv;P(t,"CodeMirror-crosshair");function n(r){(r.keyCode==18||!r.altKey)&&(Ee(t,"CodeMirror-crosshair"),dt(document,"keyup",n),dt(document,"mouseover",n))}ve(document,"keyup",n),ve(document,"mouseover",n)}function $l(e){e.keyCode==16&&(this.doc.sel.shift=!1),Ze(this,e)}function ea(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(tr(t.display,e)||Ze(t,e)||e.ctrlKey&&!e.altKey||se&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(z&&n==io){io=null,ht(e);return}if(!(z&&(!e.which||e.which<10)&&Ql(t,e))){var i=String.fromCharCode(r??n);i!="\b"&&(vu(t,e,i)||t.display.input.onKeyPress(e))}}}var yu=400,oo=function(e,t,n){this.time=e,this.pos=t,this.button=n};oo.prototype.compare=function(e,t,n){return this.time+yu>e&&Z(t,this.pos)==0&&n==this.button};var Pn,In;function xu(e,t){var n=+new Date;return In&&In.compare(n,e,t)?(Pn=In=null,"triple"):Pn&&Pn.compare(n,e,t)?(In=new oo(n,e,t),Pn=null,"double"):(Pn=new oo(n,e,t),In=null,"single")}function ta(e){var t=this,n=t.display;if(!(Ze(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=e.shiftKey,tr(n,e)){_||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(!lo(t,e)){var r=Tr(t,e),i=Wt(e),o=r?xu(r,i):"single";j(t).focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&bu(t,i,r,o,e))&&(i==1?r?wu(t,r,o,e):ln(e)==n.scroller&&ht(e):i==2?(r&&oi(t.doc,r),setTimeout(function(){return n.input.focus()},20)):i==3&&(fe?t.display.input.onContextMenu(e):Hi(t)))}}}function bu(e,t,n,r,i){var o="Click";return r=="double"?o="Double"+o:r=="triple"&&(o="Triple"+o),o=(t==1?"Left":t==2?"Middle":"Right")+o,On(e,Gl(o,i),i,function(l){if(typeof l=="string"&&(l=Nn[l]),!l)return!1;var a=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),a=l(e,n)!=qe}finally{e.state.suppressEdits=!1}return a})}function ku(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(i.unit==null){var o=Ae?n.shiftKey&&n.metaKey:n.altKey;i.unit=o?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),i.addNew==null&&(i.addNew=se?n.metaKey:n.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(se?n.altKey:n.ctrlKey)),i}function wu(e,t,n,r){b?setTimeout(ue(rl,e),0):e.curOp.focus=y(Y(e));var i=ku(e,n,r),o=e.doc.sel,l;e.options.dragDrop&&yi&&!e.isReadOnly()&&n=="single"&&(l=o.contains(t))>-1&&(Z((l=o.ranges[l]).from(),t)<0||t.xRel>0)&&(Z(l.to(),t)>0||t.xRel<0)?Su(e,r,t,i):Tu(e,r,t,i)}function Su(e,t,n,r){var i=e.display,o=!1,l=lt(e,function(u){_&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Hi(e)),dt(i.wrapper.ownerDocument,"mouseup",l),dt(i.wrapper.ownerDocument,"mousemove",a),dt(i.scroller,"dragstart",s),dt(i.scroller,"drop",l),o||(ht(u),r.a
Line truncated
|
||||
`)==t){if(r.ranges.length%Ut.text.length==0){u=[];for(var h=0;h<Ut.text.length;h++)u.push(o.splitLines(Ut.text[h]))}}else s.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(u=Pe(s,function(U){return[U]}));for(var v=e.curOp.updateInput,k=r.ranges.length-1;k>=0;k--){var x=r.ranges[k],M=x.from(),E=x.to();x.empty()&&(n&&n>0?M=L(M.line,M.ch-n):e.state.overwrite&&!a?E=L(E.line,Math.min(ce(o,E.line).text.length,E.ch+ge(s).length)):a&&Ut&&Ut.lineWise&&Ut.text.join(`
|
||||
`)==s.join(`
|
||||
`)&&(M=E=L(M.line,0)));var R={from:M,to:E,text:u?u[k%u.length]:s,origin:i||(a?"paste":e.state.cutIncoming>l?"cut":"+input")};Jr(e.doc,R),ot(e,"inputRead",e,R)}t&&!a&&sa(e,t),Gr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=v),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function aa(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&Dt(t,function(){return so(t,n,0,null,"paste")}),!0}function sa(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var a=0;a<o.electricChars.length;a++)if(t.indexOf(o.electricChars.charAt(a))>-1){l=zn(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(ce(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=zn(e,i.head.line,"smart"));l&&ot(e,"electricInput",e,i.head.line)}}}function ua(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,o={anchor:L(i,0),head:L(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function uo(e,t,n,r){e.setAttribute("autocorrect",n?"on":"off"),e.setAttribute("autocapitalize",r?"on":"off"),e.setAttribute("spellcheck",!!t)}function fa(){var e=d("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=d("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return _?e.style.width="1000px":e.setAttribute("wrap","off"),te&&(e.style.border="1px solid black"),t}function Eu(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){j(this).focus(),this.display.input.focus()},setOption:function(r,i){var o=this.options,l=o[r];o[r]==i&&r!="mode"||(o[r]=i,t.hasOwnProperty(r)&<(this,t[r])(this,i,l),Ye(this,"optionChange",this,r))},getOption:function(r){return this.options[r]},getDoc:function(){return this.doc},addKeyMap:function(r,i){this.state.keyMaps[i?"push":"unshift"](fi(r))},removeKeyMap:function(r){for(var i=this.state.keyMaps,o=0;o<i.length;++o)if(i[o]==r||i[o].name==r)return i.splice(o,1),!0},addOverlay:vt(function(r,i){var o=r.token?r:e.getMode(this.options,r);if(o.startState)throw new Error("Overlays may not be stateful.");T(this.state.overlays,{mode:o,modeSpec:r,opaque:i&&i.opaque,priority:i&&i.priority||0},function(l){return l.priority}),this.state.modeGen++,bt(this)}),removeOverlay:vt(function(r){for(var i=this.state.overlays,o=0;o<i.length;++o){var l=i[o].modeSpec;if(l==r||typeof r=="string"&&l.name==r){i.splice(o,1),this.state.modeGen++,bt(this);return}}}),indentLine:vt(function(r,i,o){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),A(this.doc,r)&&zn(this,r,i,o)}),indentSelection:vt(function(r){for(var i=this.doc.sel.ranges,o=-1,l=0;l<i.length;l++){var a=i[l];if(a.empty())a.head.line>o&&(zn(this,a.head.line,r,!0),o=a.head.line,l==this.doc.sel.primIndex&&Gr(this));else{var s=a.from(),u=a.to(),h=Math.max(o,s.line);o=Math.min(this.lastLine(),u.line-(u.ch?0:1))+1;for(var v=h;v<o;++v)zn(this,v,r);var k=this.doc.sel.ranges;s.ch==0&&i.length==k.length&&k[l].from().ch>0&&eo(this.doc,l,new He(s,k[l].to()),Ve)}}}),getTokenAt:function(r,i){return bo(this,r,i)},getLineTokens:function(r,i){return bo(this,L(r),i,!0)},getTokenTypeAt:function(r){r=Ce(this.doc,r);var i=mo(this,ce(this.doc,r.line)),o=0,l=(i.length-1)/2,a=r.ch,s;if(a==0)s=i[2];else for(;;){var u=o+l>>1;if((u?i[u*2-1]:0)>=a)l=u;else if(i[u*2+1]<a)o=u+1;else{s=i[u*2+2];break}}var h=s?s.indexOf("overlay "):-1;return h<0?s:h==0?null:s.slice(0,h-1)},getModeAt:function(r){var i=this.doc.mode;return i.innerMode?e.innerMode(i,this.getTokenAt(r).state).mode:i},getHelper:function(r,i){return this.getHelpers(r,i)[0]},getHelpers:function(r,i){var o=[];if(!n.hasOwnProperty(i))return o;var l=n[i],a=this.getModeAt(r);if(typeof a[i]=="string")l[a[i]]&&o.push(l[a[i]]);else if(a[i])for(var s=0;s<a[i].length;s++){var u=l[a[i][s]];u&&o.push(u)}else a.helperType&&l[a.helperType]?o.push(l[a.helperType]):l[a.name]&&o.push(l[a.name]);for(var h=0;h<l._global.length;h++){var v=l._global[h];v.pred(a,this)&&oe(o,v.val)==-1&&o.push(v.val)}return o},getStateAfter:function(r,i){var o=this.doc;return r=po(o,r??o.first+o.size-1),fn(this,r+1,i).state},cursorCoords:function(r,i){var o,l=this.doc.sel.primary();return r==null?o=l.head:typeof r=="object"?o=Ce(this.doc,r):o=r?l.from():l.to(),jt(this,o,i||"page")},charCoords:function(r,i){return Zn(this,Ce(this.doc,r),i||"page")},coordsChar:function(r,i){return r=Zo(this,r,i||"page"),Oi(this,r.left,r.top)},lineAtHeight:function(r,i){return r=Zo(this,{top:r,left:0},i||"page").top,g(this.doc,r+this.display.viewOffset)},heightAtLine:function(r,i,o){var l=!1,a;if(typeof r=="number"){var s=this.doc.first+this.doc.size-1;r<t
Line truncated
|
||||
`,R=Se(E,x)?"w":k&&E==`
|
||||
`?"n":!k||/\s/.test(E)?null:"p";if(k&&!M&&!R&&(R="s"),v&&v!=R){n<0&&(n=1,h(),t.sticky="after");break}if(R&&(v=R),n>0&&!h(!M))break}var U=ai(e,t,o,l,!0);return _e(o,U)&&(U.hitSide=!0),U}function ca(e,t,n,r){var i=e.doc,o=t.left,l;if(r=="page"){var a=Math.min(e.display.wrapper.clientHeight,j(e).innerHeight||i(e).documentElement.clientHeight),s=Math.max(a-.5*jr(e.display),3);l=(n>0?t.bottom:t.top)+n*s}else r=="line"&&(l=n>0?t.bottom+3:t.top-3);for(var u;u=Oi(e,o,l),!!u.outside;){if(n<0?l<=0:l>=i.height){u.hitSide=!0;break}l+=n*5}return u}var je=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new be,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};je.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;i.contentEditable=!0,uo(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function o(a){for(var s=a.target;s;s=s.parentNode){if(s==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(s.className))break}return!1}ve(i,"paste",function(a){!o(a)||Ze(r,a)||aa(a,r)||N<=11&&setTimeout(lt(r,function(){return t.updateFromDOM()}),20)}),ve(i,"compositionstart",function(a){t.composing={data:a.data,done:!1}}),ve(i,"compositionupdate",function(a){t.composing||(t.composing={data:a.data,done:!1})}),ve(i,"compositionend",function(a){t.composing&&(a.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),ve(i,"touchstart",function(){return n.forceCompositionEnd()}),ve(i,"input",function(){t.composing||t.readFromDOMSoon()});function l(a){if(!(!o(a)||Ze(r,a))){if(r.somethingSelected())hi({lineWise:!1,text:r.getSelections()}),a.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var s=ua(r);hi({lineWise:!0,text:s.text}),a.type=="cut"&&r.operation(function(){r.setSelections(s.ranges,0,Ve),r.replaceSelection("",null,"cut")})}else return;if(a.clipboardData){a.clipboardData.clearData();var u=Ut.text.join(`
|
||||
`);if(a.clipboardData.setData("Text",u),a.clipboardData.getData("Text")==u){a.preventDefault();return}}var h=fa(),v=h.firstChild;uo(v),r.display.lineSpace.insertBefore(h,r.display.lineSpace.firstChild),v.value=Ut.text.join(`
|
||||
`);var k=y(xe(i));p(v),setTimeout(function(){r.display.lineSpace.removeChild(h),k.focus(),k==i&&n.showPrimarySelection()},50)}}ve(i,"copy",l),ve(i,"cut",l)},je.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},je.prototype.prepareSelection=function(){var e=tl(this.cm,!1);return e.focus=y(xe(this.div))==this.div,e},je.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},je.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},je.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),r=n.from(),i=n.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||i.line<t.display.viewFrom){e.removeAllRanges();return}var o=pi(t,e.anchorNode,e.anchorOffset),l=pi(t,e.focusNode,e.focusOffset);if(!(o&&!o.bad&&l&&!l.bad&&Z(_r(o,l),r)==0&&Z(xt(o,l),i)==0)){var a=t.display.view,s=r.line>=t.display.viewFrom&&da(t,r)||{node:a[0].measure.map[2],offset:0},u=i.line<t.display.viewTo&&da(t,i);if(!u){var h=a[a.length-1].measure,v=h.maps?h.maps[h.maps.length-1]:h.map;u={node:v[v.length-1],offset:v[v.length-2]-v[v.length-3]}}if(!s||!u){e.removeAllRanges();return}var k=e.rangeCount&&e.getRangeAt(0),x;try{x=w(s.node,s.offset,u.offset,u.node)}catch{}x&&(!I&&t.state.focused?(e.collapse(s.node,s.offset),x.collapsed||(e.removeAllRanges(),e.addRange(x))):(e.removeAllRanges(),e.addRange(x)),k&&e.anchorNode==null?e.addRange(k):I&&this.startGracePeriod()),this.rememberSelection()}},je.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},je.prototype.showMultipleSelections=function(e){J(this.cm.display.cursorDiv,e.cursors),J(this.cm.display.selectionDiv,e.selection)},je.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},je.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return m(this.div,t)},je.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||y(xe(this.div))!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},je.prototype.blur=function(){this.div.blur()},je.prototype.getField=function(){return this.div},je.prototype.supportsTouch=function(){return!0},je.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout(function(){return e.pollSelection()},20):Dt(this.cm,function(){return t.cm.curOp.selectionChanged=!0});function n(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,n))}this.polling.set(this.cm.options.pollInterval,n)},je.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},je.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(re&&O&&this.cm.display.gutterSpecs.length&&Nu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var n=pi(t,e.anchorNode,e.anchorOffset),r=pi(t,e.focusNode,e.focusOffset);n&&r&&Dt(t,function(){pt(t.doc,pr(n,r),Ve),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}}},je.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,n=e.doc.sel.primary(),r=n.from(),i=n.to();if(r.ch==0&&r.line>e.firstLine()&&(r=L(r.line-1,ce(e.doc,r.line-1).length)),i.ch==ce(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=L(i.line+1,0)),r.line<t.viewFrom||i.line>t.viewTo-1)return!1;var o,l,a;r.line==t.viewFrom||(o=Lr(e,r.line))==0?(l=f(t.view[0].line),a=t.view[0].node):(l=f(t.view[o].line),a=t.view[o-1].node.nextSibling);var s=Lr(e,i.line),u,h;if(s==t.view.length-1?(u=t.viewTo-1,h=t.lineDiv.lastChild):(u=f(t.view[s+1].line)-1,h=t.view[s+1].node.previousSibling),!a)return!1;for(var v=e.doc.splitLines(Ou(e,a,h,l,u)),k=Vt(e.doc,L(l,0),L(u,ce(e.doc,u).text.length));v.length>1&&k.length>1;)if(ge(v)==ge(k))v.pop(),k.pop(),u--;else if(v[0]==k[0])v.shift(),k.shift(),l++;else break;for(var x=0,M=0,E=v[0],R=k[0],U=Math.min(E.length,R.length);x<U&&E.charCodeAt(x)==R.charCodeAt(x);)++x;for(var Q=ge(v),G=ge(k),ee=Math.min(Q.length-(v.length==1?x:0),G.length-(k.length==1?x:0));M<ee&&Q.charCodeAt(Q.length-M-1)==G.charCodeAt(G.length-M-1);)++M;if(v.length==1&&k.length==1&&l==r.line)for(;x&&
Line truncated
|
||||
`),p(i))}else return;l.type=="cut"&&(r.state.cutIncoming=+new Date)}}ve(i,"cut",o),ve(i,"copy",o),ve(e.scroller,"paste",function(l){if(!(tr(e,l)||Ze(r,l))){if(!i.dispatchEvent){r.state.pasteIncoming=+new Date,n.focus();return}var a=new Event("paste");a.clipboardData=l.clipboardData,i.dispatchEvent(a)}}),ve(e.lineSpace,"selectstart",function(l){tr(e,l)||ht(l)}),ve(i,"compositionstart",function(){var l=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:l,range:r.markText(l,r.getCursor("to"),{className:"CodeMirror-composing"})}}),ve(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},$e.prototype.createField=function(e){this.wrapper=fa(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;uo(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},$e.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},$e.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=tl(e);if(e.options.moveInputWithCursor){var i=jt(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return r},$e.prototype.showSelection=function(e){var t=this.cm,n=t.display;J(n.cursorDiv,e.cursors),J(n.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},$e.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&p(this.textarea),b&&N>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",b&&N>=9&&(this.hasSelection=null));this.resetting=!1}},$e.prototype.getField=function(){return this.textarea},$e.prototype.supportsTouch=function(){return!1},$e.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!ne||y(xe(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},$e.prototype.blur=function(){this.textarea.blur()},$e.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},$e.prototype.receivedFocus=function(){this.slowPoll()},$e.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},$e.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function n(){var r=t.poll();!r&&!e?(e=!0,t.polling.set(60,n)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,n)},$e.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||ur(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(b&&N>=9&&this.hasSelection===i||se&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(o==8203&&!r&&(r=""),o==8666)return this.reset(),this.cm.execCommand("undo")}for(var l=0,a=Math.min(r.length,i.length);l<a&&r.charCodeAt(l)==i.charCodeAt(l);)++l;return Dt(t,function(){so(t,i.slice(l),r.length-l,null,e.composing?"*compose":null),i.length>1e3||i.indexOf(`
|
||||
`)>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},$e.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},$e.prototype.onKeyPress=function(){b&&N>=9&&(this.hasSelection=null),this.fastPoll()},$e.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=Tr(n,e),l=r.scroller.scrollTop;if(!o||z)return;var a=n.options.resetSelectionOnContextMenu;a&&n.doc.sel.contains(o)==-1&<(n,pt)(n.doc,pr(o),Ve);var s=i.style.cssText,u=t.wrapper.style.cssText,h=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
|
||||
top: `+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+`px;
|
||||
z-index: 1000; background: `+(b?"rgba(255, 255, 255, .05)":"transparent")+`;
|
||||
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var v;_&&(v=i.ownerDocument.defaultView.scrollY),r.input.focus(),_&&i.ownerDocument.defaultView.scrollTo(null,v),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=x,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function k(){if(i.selectionStart!=null){var E=n.somethingSelected(),R=""+(E?i.value:"");i.value="⇚",i.value=R,t.prevInput=E?"":"",i.selectionStart=1,i.selectionEnd=R.length,r.selForContextMenu=n.doc.sel}}function x(){if(t.contextMenuPending==x&&(t.contextMenuPending=!1,t.wrapper.style.cssText=u,i.style.cssText=s,b&&N<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=l),i.selectionStart!=null)){(!b||b&&N<9)&&k();var E=0,R=function(){r.selForContextMenu==n.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput==""?lt(n,El)(n):E++<10?r.detectingSelectAll=setTimeout(R,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(R,200)}}if(b&&N>=9&&k(),fe){ar(e);var M=function(){dt(window,"mouseup",M),setTimeout(x,20)};ve(window,"mouseup",M)}else setTimeout(x,50)},$e.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},$e.prototype.setUneditable=function(){},$e.prototype.needsContentAttribute=!1;function Iu(e,t){if(t=t?Te(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var n=y(xe(e));t.autofocus=n==e||e.getAttribute("autofocus")!=null&&n==document.body}function r(){e.value=a.getValue()}var i;if(e.form&&(ve(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var l=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=l}}catch{}}t.finishInit=function(s){s.save=r,s.getTextArea=function(){return e},s.toTextArea=function(){s.toTextArea=isNaN,r(),e.parentNode.removeChild(s.getWrapperElement()),e.style.display="",e.form&&(dt(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var a=Ge(function(s){return e.parentNode.insertBefore(s,e.nextSibling)},t);return a}function zu(e){e.off=dt,e.on=ve,e.wheelEventPixels=js,e.Doc=kt,e.splitLines=Pt,e.countColumn=Le,e.findColumn=Re,e.isWordChar=ae,e.Pass=qe,e.signal=Ye,e.Line=Hr,e.changeEnd=gr,e.scrollbarModel=al,e.Pos=L,e.cmpPos=Z,e.modes=Pr,e.mimeModes=Ht,e.resolveMode=Ir,e.getMode=zr,e.modeExtensions=fr,e.extendMode=Br,e.copyState=Gt,e.startState=Wr,e.innerMode=sn,e.commands=Nn,e.keyMap=nr,e.keyName=Xl,e.isModifierKey=Ul,e.lookupKey=$r,e.normalizeKeyMap=cu,e.StringStream=Je,e.SharedTextMarker=Fn,e.TextMarker=mr,e.LineWidget=Mn,e.e_preventDefault=ht,e.e_stopPropagation=Nr,e.e_stop=ar,e.addClass=P,e.contains=m,e.rmClass=Ee,e.keyNames=yr}Du(Ge),Eu(Ge);var Bu="iter insert remove copy getEditor constructor".split(" ");for(var gi in kt.prototype)kt.prototype.hasOwnProperty(gi)&&oe(Bu,gi)<0&&(Ge.prototype[gi]=function(e){return function(){return e.apply(this.doc,arguments)}}(kt.prototype[gi]));return Bt(kt),Ge.inputStyles={textarea:$e,contenteditable:je},Ge.defineMode=function(e){!Ge.defaults.mode&&e!="null"&&(Ge.defaults.mode=e),Rt.apply(this,arguments)},Ge.defineMIME=kr,Ge.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Ge.defineMIME("text/plain","null"),Ge.defineExtension=function(e,t){Ge.prototype[e]=t},Ge.defineDocExtension=function(e,t){kt.prototype[e]=t},Ge.fromTextArea=Iu,zu(Ge),Ge.version="5.65.18",Ge})}(vi)),vi.exports}var Hu=It();const Ju=Wu(Hu);var pa={exports:{}},ga;function za(){return ga||(ga=1,function(Et,zt){(function(C){C(It())})(function(C){C.defineMode("css",function(fe,H){var Ee=H.inline;H.propertyKeywords||(H=C.resolveMode("text/css"));var D=fe.indentUnit,J=H.tokenHooks,d=H.documentTypes||{},S=H.mediaTypes||{},w=H.mediaFeatures||{},m=H.mediaValueKeywords||{},y=H.propertyKeywords||{},P=H.nonStandardPropertyKeywords||{},le=H.fontProperties||{},p=H.counterDescriptors||{},c=H.colorKeywords||{},Y=H.valueKeywords||{},xe=H.allowNested,j=H.lineComment,ue=H.supportsAtComponent===!0,Te=fe.highlightNonStandardPropertyKeywords!==!1,Le,be;function oe(T,B){return Le=B,T}function Ne(T,B){var F=T.next();if(J[F]){var Ie=J[F](T,B);if(Ie!==!1)return Ie}if(F=="@")return T.eatWhile(/[\w\\\-]/),oe("def",T.current());if(F=="="||(F=="~"||F=="|")&&T.eat("="))return oe(null,"compare");if(F=='"'||F=="'")return B.tokenize=qe(F),B.tokenize(T,B);if(F=="#")return T.eatWhile(/[\w\\\-]/),oe("atom","hash");if(F=="!")return T.match(/^\s*\w*/),oe("keyword","important");if(/\d/.test(F)||F=="."&&T.eat(/\d/))return T.eatWhile(/[\w.%]/),oe("number","unit");if(F==="-"){if(/[\d.]/.test(T.peek()))return T.eatWhile(/[\w.%]/),oe("number","unit");if(T.match(/^-[\w\\\-]*/))return T.eatWhile(/[\w\\\-]/),T.match(/^\s*:/,!1)?oe("variable-2","variable-definition"):oe("variable-2","variable");if(T.match(/^\w+-/))return
Line truncated
|
||||
BIN
Binary file not shown.
+1
@@ -0,0 +1 @@
|
||||
:root{color-scheme:light dark}body{--transparent-blue: #2196F355;--light-pink: #ff69b460;--gray: #888888;--sidebar-width: 250px;--box-shadow: rgba(0, 0, 0, .133) 0px 1.6px 3.6px 0px, rgba(0, 0, 0, .11) 0px .3px .9px 0px}html,body{width:100%;height:100%;padding:0;margin:0;overflow:hidden;display:flex;overscroll-behavior-x:none}#root{width:100%;height:100%;display:flex}body,dialog{background-color:var(--vscode-panel-background);color:var(--vscode-foreground);font-family:var(--vscode-font-family);font-weight:var(--vscode-font-weight);font-size:var(--vscode-font-size);-webkit-font-smoothing:antialiased}a{color:var(--vscode-textLink-foreground)}dialog{border:none;padding:0;box-shadow:var(--box-shadow);line-height:28px;max-width:400px}dialog .title{display:flex;align-items:center;margin:0;padding:0 5px;height:32px;background-color:var(--vscode-sideBar-background);max-width:400px}dialog .title .codicon{margin-right:3px}dialog .body{padding:10px;text-align:center}.button{color:var(--vscode-button-foreground);background:var(--vscode-button-background);margin:10px;border:none;height:28px;min-width:40px;cursor:pointer;-webkit-user-select:none;user-select:none}.button:focus{outline:1px solid var(--vscode-focusBorder)}.button:hover{background:var(--vscode-button-hoverBackground)}.button.secondary{color:var(--vscode-button-secondaryForeground);background:var(--vscode-button-secondaryBackground)}.button.secondary:hover{background:var(--vscode-button-secondaryHoverBackground)}*{box-sizing:border-box;min-width:0;min-height:0}*[hidden],.hidden{display:none!important}.invisible{visibility:hidden!important}svg{fill:currentColor}.vbox{display:flex;flex-direction:column;flex:auto;position:relative}.fill{position:absolute;top:0;right:0;bottom:0;left:0}.hbox{display:flex;flex:auto;position:relative}.spacer{flex:auto}.codicon-check{color:var(--vscode-charts-green)}.codicon-error{color:var(--vscode-errorForeground)}.codicon-warning{color:var(--vscode-list-warningForeground)}.codicon-circle-outline{color:var(--vscode-disabledForeground)}input[type=text],input[type=search]{color:var(--vscode-input-foreground);background-color:var(--vscode-input-background);border:none;outline:none}body.dark-mode ::-webkit-scrollbar{width:10px}body.dark-mode ::-webkit-scrollbar-thumb{background-color:#555}body.dark-mode ::-webkit-scrollbar-track{background-color:#333}body.dark-mode ::-webkit-scrollbar-thumb:hover{background-color:#777}body.dark-mode ::-webkit-scrollbar-track:hover{background-color:#444}.codicon-loading{animation:spin 1s infinite linear}::placeholder{color:var(--vscode-input-placeholderForeground)}@keyframes spin{to{transform:rotate(360deg)}}@font-face{font-family:codicon;src:url(/assets/codicon-DCmgc-ay.ttf) format("truetype")}.codicon{font: 16px/1 codicon;flex:none;display:inline-block;text-decoration:none;text-rendering:auto;text-align:center;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.codicon-add:before{content:""}.codicon-plus:before{content:""}.codicon-gist-new:before{content:""}.codicon-repo-create:before{content:""}.codicon-lightbulb:before{content:""}.codicon-light-bulb:before{content:""}.codicon-repo:before{content:""}.codicon-repo-delete:before{content:""}.codicon-gist-fork:before{content:""}.codicon-repo-forked:before{content:""}.codicon-git-pull-request:before{content:""}.codicon-git-pull-request-abandoned:before{content:""}.codicon-record-keys:before{content:""}.codicon-keyboard:before{content:""}.codicon-tag:before{content:""}.codicon-git-pull-request-label:before{content:""}.codicon-tag-add:before{content:""}.codicon-tag-remove:before{content:""}.codicon-person:before{content:""}.codicon-person-follow:before{content:""}.codicon-person-outline:before{content:""}.codicon-person-filled:before{content:""}.codicon-git-branch:before{content:""}.codicon-git-branch-create:before{content:""}.codicon-git-branch-delete:before{content:""}.codicon-source-control:before{content:""}.codicon-mirror:before{content:""}.codicon-mirror-public:before{content:""}.codicon-star:before{content:""}.codicon-star-add:before{content:""}.codicon-star-delete:before{content:""}.codicon-star-empty:before{content:""}.codicon-comment:before{content:""}.codicon-comment-add:before{content:""}.codicon-alert:before{content:""}.codicon-warning:before{content:""}.codicon-search:before{content:""}.codicon-search-save:before{content:""}.codicon-log-out:before{content:""}.codicon-sign-out:before{content:""}.codicon-log-in:before{content:""}.codicon-sign-in:before{content:""}.codicon-eye:before{content:""}.codicon-eye-unwatch:before{content:""}.codicon-eye-watch:before{content:""}.codicon-circle-filled:before{content:""}.codicon-primitive-dot:before{content:""}.codicon-close-dirty:before{content:""}.codicon-debug-Line truncated
|
||||
+184
@@ -0,0 +1,184 @@
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/codeMirrorModule-DzQ0k89p.js","assets/codeMirrorModule-C3UTv-Ge.css"])))=>i.map(i=>d[i]);
|
||||
(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))l(o);new MutationObserver(o=>{for(const u of o)if(u.type==="childList")for(const f of u.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&l(f)}).observe(document,{childList:!0,subtree:!0});function r(o){const u={};return o.integrity&&(u.integrity=o.integrity),o.referrerPolicy&&(u.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?u.credentials="include":o.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function l(o){if(o.ep)return;o.ep=!0;const u=r(o);fetch(o.href,u)}})();function Xm(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var xa={exports:{}},xs={},Na={exports:{}},ue={};/**
|
||||
* @license React
|
||||
* react.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var id;function Zm(){if(id)return ue;id=1;var i=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),f=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),S=Symbol.iterator;function T(C){return C===null||typeof C!="object"?null:(C=S&&C[S]||C["@@iterator"],typeof C=="function"?C:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},L=Object.assign,v={};function w(C,D,ae){this.props=C,this.context=D,this.refs=v,this.updater=ae||E}w.prototype.isReactComponent={},w.prototype.setState=function(C,D){if(typeof C!="object"&&typeof C!="function"&&C!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,C,D,"setState")},w.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function A(){}A.prototype=w.prototype;function P(C,D,ae){this.props=C,this.context=D,this.refs=v,this.updater=ae||E}var M=P.prototype=new A;M.constructor=P,L(M,w.prototype),M.isPureReactComponent=!0;var V=Array.isArray,q=Object.prototype.hasOwnProperty,z={current:null},ee={key:!0,ref:!0,__self:!0,__source:!0};function U(C,D,ae){var ce,he={},pe=null,Se=null;if(D!=null)for(ce in D.ref!==void 0&&(Se=D.ref),D.key!==void 0&&(pe=""+D.key),D)q.call(D,ce)&&!ee.hasOwnProperty(ce)&&(he[ce]=D[ce]);var ge=arguments.length-2;if(ge===1)he.children=ae;else if(1<ge){for(var Te=Array(ge),ht=0;ht<ge;ht++)Te[ht]=arguments[ht+2];he.children=Te}if(C&&C.defaultProps)for(ce in ge=C.defaultProps,ge)he[ce]===void 0&&(he[ce]=ge[ce]);return{$$typeof:i,type:C,key:pe,ref:Se,props:he,_owner:z.current}}function O(C,D){return{$$typeof:i,type:C.type,key:D,ref:C.ref,props:C.props,_owner:C._owner}}function se(C){return typeof C=="object"&&C!==null&&C.$$typeof===i}function oe(C){var D={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(ae){return D[ae]})}var j=/\/+/g;function Z(C,D){return typeof C=="object"&&C!==null&&C.key!=null?oe(""+C.key):D.toString(36)}function we(C,D,ae,ce,he){var pe=typeof C;(pe==="undefined"||pe==="boolean")&&(C=null);var Se=!1;if(C===null)Se=!0;else switch(pe){case"string":case"number":Se=!0;break;case"object":switch(C.$$typeof){case i:case n:Se=!0}}if(Se)return Se=C,he=he(Se),C=ce===""?"."+Z(Se,0):ce,V(he)?(ae="",C!=null&&(ae=C.replace(j,"$&/")+"/"),we(he,D,ae,"",function(ht){return ht})):he!=null&&(se(he)&&(he=O(he,ae+(!he.key||Se&&Se.key===he.key?"":(""+he.key).replace(j,"$&/")+"/")+C)),D.push(he)),1;if(Se=0,ce=ce===""?".":ce+":",V(C))for(var ge=0;ge<C.length;ge++){pe=C[ge];var Te=ce+Z(pe,ge);Se+=we(pe,D,ae,Te,he)}else if(Te=T(C),typeof Te=="function")for(C=Te.call(C),ge=0;!(pe=C.next()).done;)pe=pe.value,Te=ce+Z(pe,ge++),Se+=we(pe,D,ae,Te,he);else if(pe==="object")throw D=String(C),Error("Objects are not valid as a React child (found: "+(D==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":D)+"). If you meant to render a collection of children, use an array instead.");return Se}function rt(C,D,ae){if(C==null)return C;var ce=[],he=0;return we(C,ce,"","",function(pe){return D.call(ae,pe,he++)}),ce}function He(C){if(C._status===-1){var D=C._result;D=D(),D.then(function(ae){(C._status===0||C._status===-1)&&(C._status=1,C._result=ae)},function(ae){(C._status===0||C._status===-1)&&(C._status=2,C._result=ae)}),C._status===-1&&(C._status=0,C._result=D)}if(C._status===1)return C._result.default;throw C._result}var Ne={current:null},W={transition:null},re={ReactCurrentDispatcher:Ne,ReactCurrentBatchConfig:W,ReactCurrentOwner:z};function J(){throw Error("act(...) is not supported in production builds of React.")}return ue.Children={map:rt,forEach:function(C,D,ae){rt(C,function(){D.apply(this,arguments)},ae)},count:function(C){var D=0;return rt(C,function(){D++}),D},toArray:function(C){return rt(C,function(D){return D})||[]},only:function(C){if(!se(C))throw Error("React.Children.only expected to receive a single React element child.");return C}},ue.Component=w,ue.Fragment=r,ue.Profiler=o,ue.PureComponent=P,ue.StrictMode=l,ue.Suspense=p,ue.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=re,ue.act=J,ue.cloneElement=function(C,D,ae){if(C==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+C+".");var ce=L({},C.props),he=C.key,pe=C.ref,Se=C._owner;if(D!=null){if(D.ref!==void 0&&(pe=D.ref,Se=z.current),D.key!==void 0&&(he=""+D.key),C.type&&C.type.defaultProps)var ge=C.type.defaultProps;for(Te in D)q.call(D,Te)&&!ee.hasOwnProperty(Te)&&(ce[Te]=D[Te]===void 0&&ge!==void 0?ge[Te]:D[Te])}var Te=arguments.length-2;if(Te===1)ce.children=ae;else if(1<Te){ge=Array(Te);for(var ht=0;ht<Te;ht++)ge[ht]=arguments[ht+2];ce.children=ge}return{$$typeofLine truncated
|
||||
* @license React
|
||||
* react-jsx-runtime.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var od;function eg(){if(od)return xs;od=1;var i=Ha(),n=Symbol.for("react.element"),r=Symbol.for("react.fragment"),l=Object.prototype.hasOwnProperty,o=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function f(h,p,g){var N,S={},T=null,E=null;g!==void 0&&(T=""+g),p.key!==void 0&&(T=""+p.key),p.ref!==void 0&&(E=p.ref);for(N in p)l.call(p,N)&&!u.hasOwnProperty(N)&&(S[N]=p[N]);if(h&&h.defaultProps)for(N in p=h.defaultProps,p)S[N]===void 0&&(S[N]=p[N]);return{$$typeof:n,type:h,key:T,ref:E,props:S,_owner:o.current}}return xs.Fragment=r,xs.jsx=f,xs.jsxs=f,xs}var ad;function tg(){return ad||(ad=1,xa.exports=eg()),xa.exports}var K=tg(),fe=Ha();const Un=Xm(fe);function Dd(){const i=Un.useRef(null),[n,r]=Un.useState(new DOMRect(0,0,10,10));return Un.useLayoutEffect(()=>{const l=i.current;if(!l)return;const o=l.getBoundingClientRect();r(new DOMRect(0,0,o.width,o.height));const u=new ResizeObserver(f=>{const h=f[f.length-1];h&&h.contentRect&&r(h.contentRect)});return u.observe(l),()=>u.disconnect()},[i]),[n,i]}function ng(i){if(i<0||!isFinite(i))return"-";if(i===0)return"0";if(i<1e3)return i.toFixed(0)+"ms";const n=i/1e3;if(n<60)return n.toFixed(1)+"s";const r=n/60;if(r<60)return r.toFixed(1)+"m";const l=r/60;return l<24?l.toFixed(1)+"h":(l/24).toFixed(1)+"d"}function ud(i){const n=document.createElement("textarea");n.style.position="absolute",n.style.zIndex="-1000",n.value=i,document.body.appendChild(n),n.select(),document.execCommand("copy"),n.remove()}function ll(i,n){i&&(n=Dn.getObject(i,n));const[r,l]=Un.useState(n),o=Un.useCallback(u=>{i?Dn.setObject(i,u):l(u)},[i,l]);return Un.useEffect(()=>{if(i){const u=()=>l(Dn.getObject(i,n));return Dn.onChangeEmitter.addEventListener(i,u),()=>Dn.onChangeEmitter.removeEventListener(i,u)}},[n,i]),[r,o]}class rg{constructor(){this.onChangeEmitter=new EventTarget}getString(n,r){return localStorage[n]||r}setString(n,r){var l;localStorage[n]=r,this.onChangeEmitter.dispatchEvent(new Event(n)),(l=window.saveSettings)==null||l.call(window)}getObject(n,r){if(!localStorage[n])return r;try{return JSON.parse(localStorage[n])}catch{return r}}setObject(n,r){var l;localStorage[n]=JSON.stringify(r),this.onChangeEmitter.dispatchEvent(new Event(n)),(l=window.saveSettings)==null||l.call(window)}}const Dn=new rg;function Vn(...i){return i.filter(Boolean).join(" ")}const cd="\\u0000-\\u0020\\u007f-\\u009f",sg=new RegExp("(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|www\\.)[^\\s"+cd+'"]{2,}[^\\s'+cd+`"')}\\],:;.!?]`,"ug");function ig(){if(document.playwrightThemeInitialized)return;document.playwrightThemeInitialized=!0,document.defaultView.addEventListener("focus",l=>{l.target.document.nodeType===Node.DOCUMENT_NODE&&document.body.classList.remove("inactive")},!1),document.defaultView.addEventListener("blur",l=>{document.body.classList.add("inactive")},!1);const n=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark-mode":"light-mode";Dn.getString("theme",n)==="dark-mode"&&document.body.classList.add("dark-mode")}const lg=new Set;function og(){const i=ba(),n=i==="dark-mode"?"light-mode":"dark-mode";i&&document.body.classList.remove(i),document.body.classList.add(n),Dn.setString("theme",n);for(const r of lg)r(n)}function ba(){return document.body.classList.contains("dark-mode")?"dark-mode":"light-mode"}function ag(){const[i,n]=Un.useState(ba()==="dark-mode");return[i,r=>{ba()==="dark-mode"!==r&&og(),n(r)}]}var Wi={},Ta={exports:{}},ut={},Ca={exports:{}},_a={};/**
|
||||
* @license React
|
||||
* scheduler.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var fd;function ug(){return fd||(fd=1,function(i){function n(W,re){var J=W.length;W.push(re);e:for(;0<J;){var C=J-1>>>1,D=W[C];if(0<o(D,re))W[C]=re,W[J]=D,J=C;else break e}}function r(W){return W.length===0?null:W[0]}function l(W){if(W.length===0)return null;var re=W[0],J=W.pop();if(J!==re){W[0]=J;e:for(var C=0,D=W.length,ae=D>>>1;C<ae;){var ce=2*(C+1)-1,he=W[ce],pe=ce+1,Se=W[pe];if(0>o(he,J))pe<D&&0>o(Se,he)?(W[C]=Se,W[pe]=J,C=pe):(W[C]=he,W[ce]=J,C=ce);else if(pe<D&&0>o(Se,J))W[C]=Se,W[pe]=J,C=pe;else break e}}return re}function o(W,re){var J=W.sortIndex-re.sortIndex;return J!==0?J:W.id-re.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;i.unstable_now=function(){return u.now()}}else{var f=Date,h=f.now();i.unstable_now=function(){return f.now()-h}}var p=[],g=[],N=1,S=null,T=3,E=!1,L=!1,v=!1,w=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function M(W){for(var re=r(g);re!==null;){if(re.callback===null)l(g);else if(re.startTime<=W)l(g),re.sortIndex=re.expirationTime,n(p,re);else break;re=r(g)}}function V(W){if(v=!1,M(W),!L)if(r(p)!==null)L=!0,He(q);else{var re=r(g);re!==null&&Ne(V,re.startTime-W)}}function q(W,re){L=!1,v&&(v=!1,A(U),U=-1),E=!0;var J=T;try{for(M(re),S=r(p);S!==null&&(!(S.expirationTime>re)||W&&!oe());){var C=S.callback;if(typeof C=="function"){S.callback=null,T=S.priorityLevel;var D=C(S.expirationTime<=re);re=i.unstable_now(),typeof D=="function"?S.callback=D:S===r(p)&&l(p),M(re)}else l(p);S=r(p)}if(S!==null)var ae=!0;else{var ce=r(g);ce!==null&&Ne(V,ce.startTime-re),ae=!1}return ae}finally{S=null,T=J,E=!1}}var z=!1,ee=null,U=-1,O=5,se=-1;function oe(){return!(i.unstable_now()-se<O)}function j(){if(ee!==null){var W=i.unstable_now();se=W;var re=!0;try{re=ee(!0,W)}finally{re?Z():(z=!1,ee=null)}}else z=!1}var Z;if(typeof P=="function")Z=function(){P(j)};else if(typeof MessageChannel<"u"){var we=new MessageChannel,rt=we.port2;we.port1.onmessage=j,Z=function(){rt.postMessage(null)}}else Z=function(){w(j,0)};function He(W){ee=W,z||(z=!0,Z())}function Ne(W,re){U=w(function(){W(i.unstable_now())},re)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(W){W.callback=null},i.unstable_continueExecution=function(){L||E||(L=!0,He(q))},i.unstable_forceFrameRate=function(W){0>W||125<W?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<W?Math.floor(1e3/W):5},i.unstable_getCurrentPriorityLevel=function(){return T},i.unstable_getFirstCallbackNode=function(){return r(p)},i.unstable_next=function(W){switch(T){case 1:case 2:case 3:var re=3;break;default:re=T}var J=T;T=re;try{return W()}finally{T=J}},i.unstable_pauseExecution=function(){},i.unstable_requestPaint=function(){},i.unstable_runWithPriority=function(W,re){switch(W){case 1:case 2:case 3:case 4:case 5:break;default:W=3}var J=T;T=W;try{return re()}finally{T=J}},i.unstable_scheduleCallback=function(W,re,J){var C=i.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?C+J:C):J=C,W){case 1:var D=-1;break;case 2:D=250;break;case 5:D=1073741823;break;case 4:D=1e4;break;default:D=5e3}return D=J+D,W={id:N++,callback:re,priorityLevel:W,startTime:J,expirationTime:D,sortIndex:-1},J>C?(W.sortIndex=J,n(g,W),r(p)===null&&W===r(g)&&(v?(A(U),U=-1):v=!0,Ne(V,J-C))):(W.sortIndex=D,n(p,W),L||E||(L=!0,He(q))),W},i.unstable_shouldYield=oe,i.unstable_wrapCallback=function(W){var re=T;return function(){var J=T;T=re;try{return W.apply(this,arguments)}finally{T=J}}}}(_a)),_a}var dd;function cg(){return dd||(dd=1,Ca.exports=ug()),Ca.exports}/**
|
||||
* @license React
|
||||
* react-dom.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var hd;function fg(){if(hd)return ut;hd=1;var i=Ha(),n=cg();function r(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,s=1;s<arguments.length;s++)t+="&args[]="+encodeURIComponent(arguments[s]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var l=new Set,o={};function u(e,t){f(e,t),f(e+"Capture",t)}function f(e,t){for(o[e]=t,e=0;e<t.length;e++)l.add(t[e])}var h=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,g=/^[: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]*$/,N={},S={};function T(e){return p.call(S,e)?!0:p.call(N,e)?!1:g.test(e)?S[e]=!0:(N[e]=!0,!1)}function E(e,t,s,a){if(s!==null&&s.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return a?!1:s!==null?!s.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function L(e,t,s,a){if(t===null||typeof t>"u"||E(e,t,s,a))return!0;if(a)return!1;if(s!==null)switch(s.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function v(e,t,s,a,c,d,m){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=a,this.attributeNamespace=c,this.mustUseProperty=s,this.propertyName=e,this.type=t,this.sanitizeURL=d,this.removeEmptyString=m}var w={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){w[e]=new v(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];w[t]=new v(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){w[e]=new v(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){w[e]=new v(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){w[e]=new v(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){w[e]=new v(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){w[e]=new v(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){w[e]=new v(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){w[e]=new v(e,5,!1,e.toLowerCase(),null,!1,!1)});var A=/[\-:]([a-z])/g;function P(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(A,P);w[t]=new v(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(A,P);w[t]=new v(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(A,P);w[t]=new v(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){w[e]=new v(e,1,!1,e.toLowerCase(),null,!1,!1)}),w.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){w[e]=new v(e,1,!1,e.toLowerCase(),null,!0,!0)});function M(e,t,s,a){var c=w.hasOwnProperty(t)?w[t]:null;(c!==null?c.type!==0:a||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=
Line truncated
|
||||
`+C+e}var ae=!1;function ce(e,t){if(!e||ae)return"";ae=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(I){var a=I}Reflect.construct(e,[],t)}else{try{t.call()}catch(I){a=I}e.call(t.prototype)}else{try{throw Error()}catch(I){a=I}e()}}catch(I){if(I&&a&&typeof I.stack=="string"){for(var c=I.stack.split(`
|
||||
`),d=a.stack.split(`
|
||||
`),m=c.length-1,y=d.length-1;1<=m&&0<=y&&c[m]!==d[y];)y--;for(;1<=m&&0<=y;m--,y--)if(c[m]!==d[y]){if(m!==1||y!==1)do if(m--,y--,0>y||c[m]!==d[y]){var k=`
|
||||
`+c[m].replace(" at new "," at ");return e.displayName&&k.includes("<anonymous>")&&(k=k.replace("<anonymous>",e.displayName)),k}while(1<=m&&0<=y);break}}}finally{ae=!1,Error.prepareStackTrace=s}return(e=e?e.displayName||e.name:"")?D(e):""}function he(e){switch(e.tag){case 5:return D(e.type);case 16:return D("Lazy");case 13:return D("Suspense");case 19:return D("SuspenseList");case 0:case 2:case 15:return e=ce(e.type,!1),e;case 11:return e=ce(e.type.render,!1),e;case 1:return e=ce(e.type,!0),e;default:return""}}function pe(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ee:return"Fragment";case z:return"Portal";case O:return"Profiler";case U:return"StrictMode";case Z:return"Suspense";case we:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case oe:return(e.displayName||"Context")+".Consumer";case se:return(e._context.displayName||"Context")+".Provider";case j:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case rt:return t=e.displayName||null,t!==null?t:pe(e.type)||"Memo";case He:t=e._payload,e=e._init;try{return pe(e(t))}catch{}}return null}function Se(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return pe(t);case 8:return t===U?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ge(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Te(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ht(e){var t=Te(e)?"checked":"value",s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),a=""+e[t];if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var c=s.get,d=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(m){a=""+m,d.call(this,m)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return a},setValue:function(m){a=""+m},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ms(e){e._valueTracker||(e._valueTracker=ht(e))}function cu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var s=t.getValue(),a="";return e&&(a=Te(e)?e.checked?"true":"false":e.value),e=a,e!==s?(t.setValue(e),!0):!1}function Rs(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ol(e,t){var s=t.checked;return J({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:s??e._wrapperState.initialChecked})}function fu(e,t){var s=t.defaultValue==null?"":t.defaultValue,a=t.checked!=null?t.checked:t.defaultChecked;s=ge(t.value!=null?t.value:s),e._wrapperState={initialChecked:a,initialValue:s,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function du(e,t){t=t.checked,t!=null&&M(e,"checked",t,!1)}function $l(e,t){du(e,t);var s=ge(t.value),a=t.type;if(s!=null)a==="number"?(s===0&&e.value===""||e.value!=s)&&(e.value=""+s):e.value!==""+s&&(e.value=""+s);else if(a==="submit"||a==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Il(e,t.type,s):t.hasOwnProperty("defaultValue")&&Il(e,t.type,ge(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function hu(e,t,s){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var a=t.type;if(!(a!=="submit"&&a!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,s||t===e.value||(e.value=t),e.defaultValue=t}s=e.name,s!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,s!==""&&(e.name=s)}function Il(e,t,s){(t!=="number"||Rs(e.ownerDocument)!==e)&&(s==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+s&&(e.defaultValue=""+s))}var br=Array.isArray;function Hn(e,t,s,a){if(e=e.options,t){t={};for(var c=0;c<s.length;c++)t["$"+s[c]]=!0;for(s=0;s<e.length;s++)c=t.hasOwnProperty("$"+e[s].value),e[s].selected!==c&&(e[s].selected=c),c&&a&&(e[s].defaultSelected=!0)}else{for(s=""+ge(s),t=null,c=0;c<e.length;c++){if(e[c].value===s){e[c].selected=!0,a&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function Al(e,t){if(t.dangerouslySetIn
Line truncated
|
||||
`).replace(fm,"")}function si(e,t,s){if(t=xc(t),xc(e)!==t&&s)throw Error(r(425))}function ii(){}var po=null,mo=null;function go(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var yo=typeof setTimeout=="function"?setTimeout:void 0,dm=typeof clearTimeout=="function"?clearTimeout:void 0,Nc=typeof Promise=="function"?Promise:void 0,hm=typeof queueMicrotask=="function"?queueMicrotask:typeof Nc<"u"?function(e){return Nc.resolve(null).then(e).catch(pm)}:yo;function pm(e){setTimeout(function(){throw e})}function vo(e,t){var s=t,a=0;do{var c=s.nextSibling;if(e.removeChild(s),c&&c.nodeType===8)if(s=c.data,s==="/$"){if(a===0){e.removeChild(c),Yr(t);return}a--}else s!=="$"&&s!=="$?"&&s!=="$!"||a++;s=c}while(s);Yr(t)}function an(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function Tc(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"){if(t===0)return e;t--}else s==="/$"&&t++}e=e.previousSibling}return null}var nr=Math.random().toString(36).slice(2),bt="__reactFiber$"+nr,os="__reactProps$"+nr,Kt="__reactContainer$"+nr,wo="__reactEvents$"+nr,mm="__reactListeners$"+nr,gm="__reactHandles$"+nr;function Tn(e){var t=e[bt];if(t)return t;for(var s=e.parentNode;s;){if(t=s[Kt]||s[bt]){if(s=t.alternate,t.child!==null||s!==null&&s.child!==null)for(e=Tc(e);e!==null;){if(s=e[bt])return s;e=Tc(e)}return t}e=s,s=e.parentNode}return null}function as(e){return e=e[bt]||e[Kt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function rr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(r(33))}function li(e){return e[os]||null}var So=[],sr=-1;function un(e){return{current:e}}function xe(e){0>sr||(e.current=So[sr],So[sr]=null,sr--)}function ke(e,t){sr++,So[sr]=e.current,e.current=t}var cn={},Qe=un(cn),st=un(!1),Cn=cn;function ir(e,t){var s=e.type.contextTypes;if(!s)return cn;var a=e.stateNode;if(a&&a.__reactInternalMemoizedUnmaskedChildContext===t)return a.__reactInternalMemoizedMaskedChildContext;var c={},d;for(d in s)c[d]=t[d];return a&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=c),c}function it(e){return e=e.childContextTypes,e!=null}function oi(){xe(st),xe(Qe)}function Cc(e,t,s){if(Qe.current!==cn)throw Error(r(168));ke(Qe,t),ke(st,s)}function _c(e,t,s){var a=e.stateNode;if(t=t.childContextTypes,typeof a.getChildContext!="function")return s;a=a.getChildContext();for(var c in a)if(!(c in t))throw Error(r(108,Se(e)||"Unknown",c));return J({},s,a)}function ai(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||cn,Cn=Qe.current,ke(Qe,e),ke(st,st.current),!0}function Lc(e,t,s){var a=e.stateNode;if(!a)throw Error(r(169));s?(e=_c(e,t,Cn),a.__reactInternalMemoizedMergedChildContext=e,xe(st),xe(Qe),ke(Qe,e)):xe(st),ke(st,s)}var Wt=null,ui=!1,ko=!1;function Oc(e){Wt===null?Wt=[e]:Wt.push(e)}function ym(e){ui=!0,Oc(e)}function fn(){if(!ko&&Wt!==null){ko=!0;var e=0,t=ye;try{var s=Wt;for(ye=1;e<s.length;e++){var a=s[e];do a=a(!0);while(a!==null)}Wt=null,ui=!1}catch(c){throw Wt!==null&&(Wt=Wt.slice(e+1)),Iu(Ul,fn),c}finally{ye=t,ko=!1}}return null}var lr=[],or=0,ci=null,fi=0,St=[],kt=0,_n=null,qt=1,Ht="";function Ln(e,t){lr[or++]=fi,lr[or++]=ci,ci=e,fi=t}function $c(e,t,s){St[kt++]=qt,St[kt++]=Ht,St[kt++]=_n,_n=e;var a=qt;e=Ht;var c=32-Lt(a)-1;a&=~(1<<c),s+=1;var d=32-Lt(t)+c;if(30<d){var m=c-c%5;d=(a&(1<<m)-1).toString(32),a>>=m,c-=m,qt=1<<32-Lt(t)+c|s<<c|a,Ht=d+e}else qt=1<<d|s<<c|a,Ht=e}function Eo(e){e.return!==null&&(Ln(e,1),$c(e,1,0))}function xo(e){for(;e===ci;)ci=lr[--or],lr[or]=null,fi=lr[--or],lr[or]=null;for(;e===_n;)_n=St[--kt],St[kt]=null,Ht=St[--kt],St[kt]=null,qt=St[--kt],St[kt]=null}var mt=null,gt=null,Ce=!1,$t=null;function Ic(e,t){var s=Tt(5,null,null,0);s.elementType="DELETED",s.stateNode=t,s.return=e,t=e.deletions,t===null?(e.deletions=[s],e.flags|=16):t.push(s)}function Ac(e,t){switch(e.tag){case 5:var s=e.type;return t=t.nodeType!==1||s.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,mt=e,gt=an(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,mt=e,gt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(s=_n!==null?{id:qt,overflow:Ht}:null,e.memoizedState={dehydrated:t,treeContext:s,retryLane:1073741824},s=Tt(18,null,null,0),s.stateNode=t,s.return=e,e.child=s,mt=e,gt=null,!0):!1;default:return!1}}function No(e){return(e.mode&1)!==0&&(e.flags&128)===0}function To(e){if(Ce){var t=gt;if(t){var s=t;if(!Ac(e,t)){if(No(e))throw Error(r(418));t=an(s.nextSibling);var a=mt;t&&Ac(e,t)?Ic(a,s):(e.flags=e.flags&-4097|2,Ce=!1,mt=e)}}else{if(No(e))throw Error(r(418));e.flags=e.flags&-4097|2,Ce=!1,mt=e}}}function Pc(e){for(e=e.
Line truncated
|
||||
Error generating stack: `+d.message+`
|
||||
`+d.stack}return{value:e,source:t,stack:c,digest:null}}function Ho(e,t,s){return{value:e,source:null,stack:s??null,digest:t??null}}function Qo(e,t){try{console.error(t.value)}catch(s){setTimeout(function(){throw s})}}var Cm=typeof WeakMap=="function"?WeakMap:Map;function pf(e,t,s){s=Jt(-1,s),s.tag=3,s.payload={element:null};var a=t.value;return s.callback=function(){Ii||(Ii=!0,ua=a),Qo(e,t)},s}function mf(e,t,s){s=Jt(-1,s),s.tag=3;var a=e.type.getDerivedStateFromError;if(typeof a=="function"){var c=t.value;s.payload=function(){return a(c)},s.callback=function(){Qo(e,t)}}var d=e.stateNode;return d!==null&&typeof d.componentDidCatch=="function"&&(s.callback=function(){Qo(e,t),typeof a!="function"&&(mn===null?mn=new Set([this]):mn.add(this));var m=t.stack;this.componentDidCatch(t.value,{componentStack:m!==null?m:""})}),s}function gf(e,t,s){var a=e.pingCache;if(a===null){a=e.pingCache=new Cm;var c=new Set;a.set(t,c)}else c=a.get(t),c===void 0&&(c=new Set,a.set(t,c));c.has(s)||(c.add(s),e=zm.bind(null,e,t,s),t.then(e,e))}function yf(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function vf(e,t,s,a,c){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,s.flags|=131072,s.flags&=-52805,s.tag===1&&(s.alternate===null?s.tag=17:(t=Jt(-1,1),t.tag=2,hn(s,t,1))),s.lanes|=1),e):(e.flags|=65536,e.lanes=c,e)}var _m=V.ReactCurrentOwner,lt=!1;function et(e,t,s,a){t.child=e===null?Dc(t,null,s,a):ur(t,e.child,s,a)}function wf(e,t,s,a,c){s=s.render;var d=t.ref;return fr(t,c),a=Bo(e,t,s,a,d,c),s=zo(),e!==null&&!lt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~c,Yt(e,t,c)):(Ce&&s&&Eo(t),t.flags|=1,et(e,t,a,c),t.child)}function Sf(e,t,s,a,c){if(e===null){var d=s.type;return typeof d=="function"&&!ga(d)&&d.defaultProps===void 0&&s.compare===null&&s.defaultProps===void 0?(t.tag=15,t.type=d,kf(e,t,d,a,c)):(e=Di(s.type,null,a,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,(e.lanes&c)===0){var m=d.memoizedProps;if(s=s.compare,s=s!==null?s:ns,s(m,a)&&e.ref===t.ref)return Yt(e,t,c)}return t.flags|=1,e=wn(d,a),e.ref=t.ref,e.return=t,t.child=e}function kf(e,t,s,a,c){if(e!==null){var d=e.memoizedProps;if(ns(d,a)&&e.ref===t.ref)if(lt=!1,t.pendingProps=a=d,(e.lanes&c)!==0)(e.flags&131072)!==0&&(lt=!0);else return t.lanes=e.lanes,Yt(e,t,c)}return Jo(e,t,s,a,c)}function Ef(e,t,s){var a=t.pendingProps,c=a.children,d=e!==null?e.memoizedState:null;if(a.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ke(mr,yt),yt|=s;else{if((s&1073741824)===0)return e=d!==null?d.baseLanes|s:s,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ke(mr,yt),yt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},a=d!==null?d.baseLanes:s,ke(mr,yt),yt|=a}else d!==null?(a=d.baseLanes|s,t.memoizedState=null):a=s,ke(mr,yt),yt|=a;return et(e,t,c,s),t.child}function xf(e,t){var s=t.ref;(e===null&&s!==null||e!==null&&e.ref!==s)&&(t.flags|=512,t.flags|=2097152)}function Jo(e,t,s,a,c){var d=it(s)?Cn:Qe.current;return d=ir(t,d),fr(t,c),s=Bo(e,t,s,a,d,c),a=zo(),e!==null&&!lt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~c,Yt(e,t,c)):(Ce&&a&&Eo(t),t.flags|=1,et(e,t,s,c),t.child)}function Nf(e,t,s,a,c){if(it(s)){var d=!0;ai(t)}else d=!1;if(fr(t,c),t.stateNode===null)Ci(e,t),df(t,s,a),qo(t,s,a,c),a=!0;else if(e===null){var m=t.stateNode,y=t.memoizedProps;m.props=y;var k=m.context,I=s.contextType;typeof I=="object"&&I!==null?I=Et(I):(I=it(s)?Cn:Qe.current,I=ir(t,I));var b=s.getDerivedStateFromProps,B=typeof b=="function"||typeof m.getSnapshotBeforeUpdate=="function";B||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(y!==a||k!==I)&&hf(t,m,a,I),dn=!1;var R=t.memoizedState;m.state=R,yi(t,a,m,c),k=t.memoizedState,y!==a||R!==k||st.current||dn?(typeof b=="function"&&(Wo(t,s,b,a),k=t.memoizedState),(y=dn||ff(t,s,y,a,R,k,I))?(B||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(t.flags|=4194308)):(typeof m.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=k),m.props=a,m.state=k,m.context=I,a=y):(typeof m.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{m=t.stateNode,Bc(e,t),y=t.memoizedProps,I=t.type===t.elementType?y:It(t.type,y),m.props=I,B=t.pendingProps,R=m.context,k=s.contextType,typeof k=="object"&&k!==null?k=Et(k):(k=it(s)?Cn:Qe.current,k=ir(t,k));var H=s.getDerivedStateFromProps;(b=typeof H=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(y!==B||R!==k)&&hf(t,m,a,k),dn=!1,R=t.memoizedState,m.state=R,yi(t,a,m,c
Line truncated
|
||||
`:this.value}}class Ir extends Me{constructor(){super(...arguments),this.value=""}ASCIIMatch(n){return this.value.toLowerCase()===n.toLowerCase()}toJSON(){const n=this.constructor.prototype.constructor.prototype.toJSON.call(this);return n.value=this.value,n}}class Gd extends Ir{constructor(n){super(),this.tokenType="IDENT",this.value=n}toString(){return"IDENT("+this.value+")"}toSource(){return Is(this.value)}}class tl extends Ir{constructor(n){super(),this.tokenType="FUNCTION",this.value=n,this.mirror=")"}toString(){return"FUNCTION("+this.value+")"}toSource(){return Is(this.value)+"("}}class Xd extends Ir{constructor(n){super(),this.tokenType="AT-KEYWORD",this.value=n}toString(){return"AT("+this.value+")"}toSource(){return"@"+Is(this.value)}}class Zd extends Ir{constructor(n){super(),this.tokenType="HASH",this.value=n,this.type="unrestricted"}toString(){return"HASH("+this.value+")"}toJSON(){const n=this.constructor.prototype.constructor.prototype.toJSON.call(this);return n.value=this.value,n.type=this.type,n}toSource(){return this.type==="id"?"#"+Is(this.value):"#"+qg(this.value)}}class eh extends Ir{constructor(n){super(),this.tokenType="STRING",this.value=n}toString(){return'"'+sh(this.value)+'"'}}class th extends Ir{constructor(n){super(),this.tokenType="URL",this.value=n}toString(){return"URL("+this.value+")"}toSource(){return'url("'+sh(this.value)+'")'}}class nh extends Me{constructor(){super(),this.tokenType="NUMBER",this.type="integer",this.repr=""}toString(){return this.type==="integer"?"INT("+this.value+")":"NUMBER("+this.value+")"}toJSON(){const n=super.toJSON();return n.value=this.value,n.type=this.type,n.repr=this.repr,n}toSource(){return this.repr}}class rh extends Me{constructor(){super(),this.tokenType="PERCENTAGE",this.repr=""}toString(){return"PERCENTAGE("+this.value+")"}toJSON(){const n=this.constructor.prototype.constructor.prototype.toJSON.call(this);return n.value=this.value,n.repr=this.repr,n}toSource(){return this.repr+"%"}}class Wg extends Me{constructor(){super(),this.tokenType="DIMENSION",this.type="integer",this.repr="",this.unit=""}toString(){return"DIM("+this.value+","+this.unit+")"}toJSON(){const n=this.constructor.prototype.constructor.prototype.toJSON.call(this);return n.value=this.value,n.type=this.type,n.repr=this.repr,n.unit=this.unit,n}toSource(){const n=this.repr;let r=Is(this.unit);return r[0].toLowerCase()==="e"&&(r[1]==="-"||De(r.charCodeAt(1),48,57))&&(r="\\65 "+r.slice(1,r.length)),n+r}}function Is(i){i=""+i;let n="";const r=i.charCodeAt(0);for(let l=0;l<i.length;l++){const o=i.charCodeAt(l);if(o===0)throw new Qa("Invalid character: the input contains U+0000.");De(o,1,31)||o===127||l===0&&De(o,48,57)||l===1&&De(o,48,57)&&r===45?n+="\\"+o.toString(16)+" ":o>=128||o===45||o===95||De(o,48,57)||De(o,65,90)||De(o,97,122)?n+=i[l]:n+="\\"+i[l]}return n}function qg(i){i=""+i;let n="";for(let r=0;r<i.length;r++){const l=i.charCodeAt(r);if(l===0)throw new Qa("Invalid character: the input contains U+0000.");l>=128||l===45||l===95||De(l,48,57)||De(l,65,90)||De(l,97,122)?n+=i[r]:n+="\\"+l.toString(16)+" "}return n}function sh(i){i=""+i;let n="";for(let r=0;r<i.length;r++){const l=i.charCodeAt(r);if(l===0)throw new Qa("Invalid character: the input contains U+0000.");De(l,1,31)||l===127?n+="\\"+l.toString(16)+" ":l===34||l===92?n+="\\"+i[r]:n+=i[r]}return n}class ft extends Error{}function Hg(i,n){let r;try{r=Bg(i),r[r.length-1]instanceof el||r.push(new el)}catch(O){const se=O.message+` while parsing css selector "${i}". Did you mean to CSS.escape it?`,oe=(O.stack||"").indexOf(O.message);throw oe!==-1&&(O.stack=O.stack.substring(0,oe)+se+O.stack.substring(oe+O.message.length)),O.message=se,O}const l=r.find(O=>O instanceof Xd||O instanceof Bd||O instanceof Zi||O instanceof Yd||O instanceof zd||O instanceof Fd||O instanceof Vd||O instanceof Wd||O instanceof qd||O instanceof th||O instanceof rh);if(l)throw new ft(`Unsupported token "${l.toSource()}" while parsing css selector "${i}". Did you mean to CSS.escape it?`);let o=0;const u=new Set;function f(){return new ft(`Unexpected token "${r[o].toSource()}" while parsing css selector "${i}". Did you mean to CSS.escape it?`)}function h(){for(;r[o]instanceof Ba;)o++}function p(O=o){return r[O]instanceof Gd}function g(O=o){return r[O]instanceof eh}function N(O=o){return r[O]instanceof nh}function S(O=o){return r[O]instanceof Kd}function T(O=o){return r[O]instanceof Qd}function E(O=o){return r[O]instanceof Jd}function L(O=o){return r[O]instanceof tl}function v(O=o){return r[O]instanceof Xe&&r[O].value==="*"}function w(O=o){return r[O]instanceof el}function A(O=o){return r[O]instanceof Xe&&[">","+","~"].includes(r[O].value)}function P(O=o){return S(O)||E(O)||w(O)||A(O)||r[O]instanceof Ba}function M(){const O=[V()];for(;h(),!!S();)o++,O.push(V());return O}function V(){return h(),N()||g()?r[o++].value:q()}function q(){const O={simples:[]};for(h(),A()?O.simples.push({selector:{functions:[{name:"scope",args:[]}]},combinator:""}):O.simples.push(
Line truncated
|
||||
`)}}nt.defaultYaml={explicit:!1,version:"1.2"};nt.defaultTags={"!!":"tag:yaml.org,2002:"};function hh(i){if(/[\x00-\x19\s,[\]{}]/.test(i)){const r=`Anchor must not contain whitespace or control characters: ${JSON.stringify(i)}`;throw new Error(r)}return!0}function ph(i){const n=new Set;return En(i,{Value(r,l){l.anchor&&n.add(l.anchor)}}),n}function mh(i,n){for(let r=1;;++r){const l=`${i}${r}`;if(!n.has(l))return l}}function fy(i,n){const r=[],l=new Map;let o=null;return{onAnchor:u=>{r.push(u),o||(o=ph(i));const f=mh(n,o);return o.add(f),f},setAnchors:()=>{for(const u of r){const f=l.get(u);if(typeof f=="object"&&f.anchor&&(ve(f.node)||$e(f.node)))f.node.anchor=f.anchor;else{const h=new Error("Failed to resolve repeated object (this should not happen)");throw h.source=u,h}}},sourceObjects:l}}function Nr(i,n,r,l){if(l&&typeof l=="object")if(Array.isArray(l))for(let o=0,u=l.length;o<u;++o){const f=l[o],h=Nr(i,l,String(o),f);h===void 0?delete l[o]:h!==f&&(l[o]=h)}else if(l instanceof Map)for(const o of Array.from(l.keys())){const u=l.get(o),f=Nr(i,l,o,u);f===void 0?l.delete(o):f!==u&&l.set(o,f)}else if(l instanceof Set)for(const o of Array.from(l)){const u=Nr(i,l,o,o);u===void 0?l.delete(o):u!==o&&(l.delete(o),l.add(u))}else for(const[o,u]of Object.entries(l)){const f=Nr(i,l,o,u);f===void 0?delete l[o]:f!==u&&(l[o]=f)}return i.call(n,r,l)}function Ct(i,n,r){if(Array.isArray(i))return i.map((l,o)=>Ct(l,String(o),r));if(i&&typeof i.toJSON=="function"){if(!r||!ay(i))return i.toJSON(n,r);const l={aliasCount:0,count:1,res:void 0};r.anchors.set(i,l),r.onCreate=u=>{l.res=u,delete r.onCreate};const o=i.toJSON(n,r);return r.onCreate&&r.onCreate(o),o}return typeof i=="bigint"&&!(r!=null&&r.keep)?Number(i):i}class Ya{constructor(n){Object.defineProperty(this,_t,{value:n})}clone(){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(n.range=this.range.slice()),n}toJS(n,{mapAsMap:r,maxAliasCount:l,onAnchor:o,reviver:u}={}){if(!qn(n))throw new TypeError("A document argument is required");const f={anchors:new Map,doc:n,keep:!0,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof l=="number"?l:100},h=Ct(this,"",f);if(typeof o=="function")for(const{count:p,res:g}of f.anchors.values())o(g,p);return typeof u=="function"?Nr(u,{"":h},"",h):h}}class gl extends Ya{constructor(n){super(Ja),this.source=n,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(n){let r;return En(n,{Node:(l,o)=>{if(o===this)return En.BREAK;o.anchor===this.source&&(r=o)}}),r}toJSON(n,r){if(!r)return{source:this.source};const{anchors:l,doc:o,maxAliasCount:u}=r,f=this.resolve(o);if(!f){const p=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(p)}let h=l.get(f);if(h||(Ct(f,null,r),h=l.get(f)),!h||h.res===void 0){const p="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(p)}if(u>=0&&(h.count+=1,h.aliasCount===0&&(h.aliasCount=nl(o,f,l)),h.count*h.aliasCount>u)){const p="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(p)}return h.res}toString(n,r,l){const o=`*${this.source}`;if(n){if(hh(this.source),n.options.verifyAliasOrder&&!n.anchors.has(this.source)){const u=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(u)}if(n.implicitKey)return`${o} `}return o}}function nl(i,n,r){if(Wn(n)){const l=n.resolve(i),o=r&&l&&r.get(l);return o?o.count*o.aliasCount:0}else if($e(n)){let l=0;for(const o of n.items){const u=nl(i,o,r);u>l&&(l=u)}return l}else if(_e(n)){const l=nl(i,n.key,r),o=nl(i,n.value,r);return Math.max(l,o)}return 1}const gh=i=>!i||typeof i!="function"&&typeof i!="object";class le extends Ya{constructor(n){super(Vt),this.value=n}toJSON(n,r){return r!=null&&r.keep?this.value:Ct(this.value,n,r)}toString(){return String(this.value)}}le.BLOCK_FOLDED="BLOCK_FOLDED";le.BLOCK_LITERAL="BLOCK_LITERAL";le.PLAIN="PLAIN";le.QUOTE_DOUBLE="QUOTE_DOUBLE";le.QUOTE_SINGLE="QUOTE_SINGLE";const dy="tag:yaml.org,2002:";function hy(i,n,r){if(n){const l=r.filter(u=>u.tag===n),o=l.find(u=>!u.format)??l[0];if(!o)throw new Error(`Tag ${n} not found`);return o}return r.find(l=>{var o;return((o=l.identify)==null?void 0:o.call(l,i))&&!l.format})}function Ls(i,n,r){var S,T,E;if(qn(i)&&(i=i.contents),Ie(i))return i;if(_e(i)){const L=(T=(S=r.schema[kn]).createNode)==null?void 0:T.call(S,r.schema,null,r);return L.items.push(i),L}(i instanceof String||i instanceof Number||i instanceof Boolean||typeof BigInt<"u"&&i instanceof BigInt)&&(i=i.valueOf());const{aliasDuplicateObjects:l,onAnchor:o,onTagObj:u,schema:f,sourceObjects:h}=r;let p;if(l&&i&&typeof i=="object"){if(p=h.get(i),p)return p.anchor||(p.anchor=o(i)),new gl(p.anchor);p={anchor:null,node:null},h.set(i,p)}n!=null&&n.startsWith("!!")&&(n=dy+n.slice(2));let g=hy(i,n,f.tags);if(!g){if(i&&typeof i.toJSON=="function"&&(i=i.toJSON()),!i||typeof i!="object"){const L=new le(i);r
Line truncated
|
||||
`)?Zt(r,n):r.includes(`
|
||||
`)?`
|
||||
`+Zt(r,n):(i.endsWith(" ")?"":" ")+r,vh="flow",Ua="block",rl="quoted";function yl(i,n,r="flow",{indentAtStart:l,lineWidth:o=80,minContentWidth:u=20,onFold:f,onOverflow:h}={}){if(!o||o<0)return i;o<u&&(u=0);const p=Math.max(1+u,1+o-n.length);if(i.length<=p)return i;const g=[],N={};let S=o-n.length;typeof l=="number"&&(l>o-Math.max(2,u)?g.push(0):S=o-l);let T,E,L=!1,v=-1,w=-1,A=-1;r===Ua&&(v=Td(i,v,n.length),v!==-1&&(S=v+p));for(let M;M=i[v+=1];){if(r===rl&&M==="\\"){switch(w=v,i[v+1]){case"x":v+=3;break;case"u":v+=5;break;case"U":v+=9;break;default:v+=1}A=v}if(M===`
|
||||
`)r===Ua&&(v=Td(i,v,n.length)),S=v+n.length+p,T=void 0;else{if(M===" "&&E&&E!==" "&&E!==`
|
||||
`&&E!==" "){const V=i[v+1];V&&V!==" "&&V!==`
|
||||
`&&V!==" "&&(T=v)}if(v>=S)if(T)g.push(T),S=T+p,T=void 0;else if(r===rl){for(;E===" "||E===" ";)E=M,M=i[v+=1],L=!0;const V=v>A+1?v-2:w-1;if(N[V])return i;g.push(V),N[V]=!0,S=V+p,T=void 0}else L=!0}E=M}if(L&&h&&h(),g.length===0)return i;f&&f();let P=i.slice(0,g[0]);for(let M=0;M<g.length;++M){const V=g[M],q=g[M+1]||i.length;V===0?P=`
|
||||
${n}${i.slice(0,q)}`:(r===rl&&N[V]&&(P+=`${i[V]}\\`),P+=`
|
||||
${n}${i.slice(V+1,q)}`)}return P}function Td(i,n,r){let l=n,o=n+1,u=i[o];for(;u===" "||u===" ";)if(n<o+r)u=i[++n];else{do u=i[++n];while(u&&u!==`
|
||||
`);l=n,o=n+1,u=i[o]}return l}const vl=(i,n)=>({indentAtStart:n?i.indent.length:i.indentAtStart,lineWidth:i.options.lineWidth,minContentWidth:i.options.minContentWidth}),wl=i=>/^(%|---|\.\.\.)/m.test(i);function my(i,n,r){if(!n||n<0)return!1;const l=n-r,o=i.length;if(o<=l)return!1;for(let u=0,f=0;u<o;++u)if(i[u]===`
|
||||
`){if(u-f>l)return!0;if(f=u+1,o-f<=l)return!1}return!0}function _s(i,n){const r=JSON.stringify(i);if(n.options.doubleQuotedAsJSON)return r;const{implicitKey:l}=n,o=n.options.doubleQuotedMinMultiLineLength,u=n.indent||(wl(i)?" ":"");let f="",h=0;for(let p=0,g=r[p];g;g=r[++p])if(g===" "&&r[p+1]==="\\"&&r[p+2]==="n"&&(f+=r.slice(h,p)+"\\ ",p+=1,h=p,g="\\"),g==="\\")switch(r[p+1]){case"u":{f+=r.slice(h,p);const N=r.substr(p+2,4);switch(N){case"0000":f+="\\0";break;case"0007":f+="\\a";break;case"000b":f+="\\v";break;case"001b":f+="\\e";break;case"0085":f+="\\N";break;case"00a0":f+="\\_";break;case"2028":f+="\\L";break;case"2029":f+="\\P";break;default:N.substr(0,2)==="00"?f+="\\x"+N.substr(2):f+=r.substr(p,6)}p+=5,h=p+1}break;case"n":if(l||r[p+2]==='"'||r.length<o)p+=1;else{for(f+=r.slice(h,p)+`
|
||||
|
||||
`;r[p+2]==="\\"&&r[p+3]==="n"&&r[p+4]!=='"';)f+=`
|
||||
`,p+=2;f+=u,r[p+2]===" "&&(f+="\\"),p+=1,h=p+1}break;default:p+=1}return f=h?f+r.slice(h):r,l?f:yl(f,u,rl,vl(n,!1))}function Va(i,n){if(n.options.singleQuote===!1||n.implicitKey&&i.includes(`
|
||||
`)||/[ \t]\n|\n[ \t]/.test(i))return _s(i,n);const r=n.indent||(wl(i)?" ":""),l="'"+i.replace(/'/g,"''").replace(/\n+/g,`$&
|
||||
${r}`)+"'";return n.implicitKey?l:yl(l,r,vh,vl(n,!1))}function Tr(i,n){const{singleQuote:r}=n.options;let l;if(r===!1)l=_s;else{const o=i.includes('"'),u=i.includes("'");o&&!u?l=Va:u&&!o?l=_s:l=r?Va:_s}return l(i,n)}let Ka;try{Ka=new RegExp(`(^|(?<!
|
||||
))
|
||||
+(?!
|
||||
|$)`,"g")}catch{Ka=/\n+(?!\n|$)/g}function sl({comment:i,type:n,value:r},l,o,u){const{blockQuote:f,commentString:h,lineWidth:p}=l.options;if(!f||/\n[\t ]+$/.test(r)||/^\s*$/.test(r))return Tr(r,l);const g=l.indent||(l.forceBlockIndent||wl(r)?" ":""),N=f==="literal"?!0:f==="folded"||n===le.BLOCK_FOLDED?!1:n===le.BLOCK_LITERAL?!0:!my(r,p,g.length);if(!r)return N?`|
|
||||
`:`>
|
||||
`;let S,T;for(T=r.length;T>0;--T){const z=r[T-1];if(z!==`
|
||||
`&&z!==" "&&z!==" ")break}let E=r.substring(T);const L=E.indexOf(`
|
||||
`);L===-1?S="-":r===E||L!==E.length-1?(S="+",u&&u()):S="",E&&(r=r.slice(0,-E.length),E[E.length-1]===`
|
||||
`&&(E=E.slice(0,-1)),E=E.replace(Ka,`$&${g}`));let v=!1,w,A=-1;for(w=0;w<r.length;++w){const z=r[w];if(z===" ")v=!0;else if(z===`
|
||||
`)A=w;else break}let P=r.substring(0,A<w?A+1:w);P&&(r=r.substring(P.length),P=P.replace(/\n+/g,`$&${g}`));let V=(N?"|":">")+(v?g?"2":"1":"")+S;if(i&&(V+=" "+h(i.replace(/ ?[\r\n]+/g," ")),o&&o()),N)return r=r.replace(/\n+/g,`$&${g}`),`${V}
|
||||
${g}${P}${r}${E}`;r=r.replace(/\n+/g,`
|
||||
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${g}`);const q=yl(`${P}${r}${E}`,g,Ua,vl(l,!0));return`${V}
|
||||
${g}${q}`}function gy(i,n,r,l){const{type:o,value:u}=i,{actualString:f,implicitKey:h,indent:p,indentStep:g,inFlow:N}=n;if(h&&u.includes(`
|
||||
`)||N&&/[[\]{},]/.test(u))return Tr(u,n);if(!u||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(u))return h||N||!u.includes(`
|
||||
`)?Tr(u,n):sl(i,n,r,l);if(!h&&!N&&o!==le.PLAIN&&u.includes(`
|
||||
`))return sl(i,n,r,l);if(wl(u)){if(p==="")return n.forceBlockIndent=!0,sl(i,n,r,l);if(h&&p===g)return Tr(u,n)}const S=u.replace(/\n+/g,`$&
|
||||
${p}`);if(f){const T=v=>{var w;return v.default&&v.tag!=="tag:yaml.org,2002:str"&&((w=v.test)==null?void 0:w.test(S))},{compat:E,tags:L}=n.doc.schema;if(L.some(T)||E!=null&&E.some(T))return Tr(u,n)}return h?S:yl(S,p,vh,vl(n,!1))}function As(i,n,r,l){const{implicitKey:o,inFlow:u}=n,f=typeof i.value=="string"?i:Object.assign({},i,{value:String(i.value)});let{type:h}=i;h!==le.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(f.value)&&(h=le.QUOTE_DOUBLE);const p=N=>{switch(N){case le.BLOCK_FOLDED:case le.BLOCK_LITERAL:return o||u?Tr(f.value,n):sl(f,n,r,l);case le.QUOTE_DOUBLE:return _s(f.value,n);case le.QUOTE_SINGLE:return Va(f.value,n);case le.PLAIN:return gy(f,n,r,l);default:return null}};let g=p(h);if(g===null){const{defaultKeyType:N,defaultStringType:S}=n.options,T=o&&N||S;if(g=p(T),g===null)throw new Error(`Unsupported default string type ${T}`)}return g}function wh(i,n){const r=Object.assign({blockQuote:!0,commentString:py,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,trueStr:"true",verifyAliasOrder:!0},i.schema.toStringOptions,n);let l;switch(r.collectionStyle){case"block":l=!1;break;case"flow":l=!0;break;default:l=null}return{anchors:new Set,doc:i,flowCollectionPadding:r.flowCollectionPadding?" ":"",indent:"",indentStep:typeof r.indent=="number"?" ".repeat(r.indent):" ",inFlow:l,options:r}}function yy(i,n){var o;if(n.tag){const u=i.filter(f=>f.tag===n.tag);if(u.length>0)return u.find(f=>f.format===n.format)??u[0]}let r,l;if(ve(n)){l=n.value;let u=i.filter(f=>{var h;return(h=f.identify)==null?void 0:h.call(f,l)});if(u.length>1){const f=u.filter(h=>h.test);f.length>0&&(u=f)}r=u.find(f=>f.format===n.format)??u.find(f=>!f.format)}else l=n,r=i.find(u=>u.nodeClass&&l instanceof u.nodeClass);if(!r){const u=((o=l==null?void 0:l.constructor)==null?void 0:o.name)??typeof l;throw new Error(`Tag not resolved for ${u} value`)}return r}function vy(i,n,{anchors:r,doc:l}){if(!l.directives)return"";const o=[],u=(ve(i)||$e(i))&&i.anchor;u&&hh(u)&&(r.add(u),o.push(`&${u}`));const f=i.tag?i.tag:n.default?null:n.tag;return f&&o.push(l.directives.tagString(f)),o.join(" ")}function Lr(i,n,r,l){var p;if(_e(i))return i.toString(n,r,l);if(Wn(i)){if(n.doc.directives)return i.toString(n);if((p=n.resolvedAliases)!=null&&p.has(i))throw new TypeError("Cannot stringify circular structure without alias nodes");n.resolvedAliases?n.resolvedAliases.add(i):n.resolvedAliases=new Set([i]),i=i.resolve(n.doc)}let o;const u=Ie(i)?i:n.doc.createNode(i,{onTagObj:g=>o=g});o||(o=yy(n.doc.schema.tags,u));const f=vy(u,o,n);f.length>0&&(n.indentAtStart=(n.indentAtStart??0)+f.length+1);const h=typeof o.stringify=="function"?o.stringify(u,n,r,l):ve(u)?As(u,n,r,l):u.toString(n,r,l);return f?ve(u)||h[0]==="{"||h[0]==="["?`${f} ${h}`:`${f}
|
||||
${n.indent}${h}`:h}function wy({key:i,value:n},r,l,o){const{allNullValues:u,doc:f,indent:h,indentStep:p,options:{commentString:g,indentSeq:N,simpleKeys:S}}=r;let T=Ie(i)&&i.comment||null;if(S){if(T)throw new Error("With simple keys, key nodes cannot have comments");if($e(i)||!Ie(i)&&typeof i=="object"){const ee="With simple keys, collection cannot be used as a key value";throw new Error(ee)}}let E=!S&&(!i||T&&n==null&&!r.inFlow||$e(i)||(ve(i)?i.type===le.BLOCK_FOLDED||i.type===le.BLOCK_LITERAL:typeof i=="object"));r=Object.assign({},r,{allNullValues:!1,implicitKey:!E&&(S||!u),indent:h+p});let L=!1,v=!1,w=Lr(i,r,()=>L=!0,()=>v=!0);if(!E&&!r.inFlow&&w.length>1024){if(S)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");E=!0}if(r.inFlow){if(u||n==null)return L&&l&&l(),w===""?"?":E?`? ${w}`:w}else if(u&&!S||n==null&&E)return w=`? ${w}`,T&&!L?w+=Bn(w,r.indent,g(T)):v&&o&&o(),w;L&&(T=null),E?(T&&(w+=Bn(w,r.indent,g(T))),w=`? ${w}
|
||||
${h}:`):(w=`${w}:`,T&&(w+=Bn(w,r.indent,g(T))));let A,P,M;Ie(n)?(A=!!n.spaceBefore,P=n.commentBefore,M=n.comment):(A=!1,P=null,M=null,n&&typeof n=="object"&&(n=f.createNode(n))),r.implicitKey=!1,!E&&!T&&ve(n)&&(r.indentAtStart=w.length+1),v=!1,!N&&p.length>=2&&!r.inFlow&&!E&&jr(n)&&!n.flow&&!n.tag&&!n.anchor&&(r.indent=r.indent.substring(2));let V=!1;const q=Lr(n,r,()=>V=!0,()=>v=!0);let z=" ";if(T||A||P){if(z=A?`
|
||||
`:"",P){const ee=g(P);z+=`
|
||||
${Zt(ee,r.indent)}`}q===""&&!r.inFlow?z===`
|
||||
`&&(z=`
|
||||
|
||||
`):z+=`
|
||||
${r.indent}`}else if(!E&&$e(n)){const ee=q[0],U=q.indexOf(`
|
||||
`),O=U!==-1,se=r.inFlow??n.flow??n.items.length===0;if(O||!se){let oe=!1;if(O&&(ee==="&"||ee==="!")){let j=q.indexOf(" ");ee==="&"&&j!==-1&&j<U&&q[j+1]==="!"&&(j=q.indexOf(" ",j+1)),(j===-1||U<j)&&(oe=!0)}oe||(z=`
|
||||
${r.indent}`)}}else(q===""||q[0]===`
|
||||
`)&&(z="");return w+=z+q,r.inFlow?V&&l&&l():M&&!V?w+=Bn(w,r.indent,g(M)):v&&o&&o(),w}function Sh(i,n){(i==="debug"||i==="warn")&&(typeof process<"u"&&process.emitWarning?process.emitWarning(n):console.warn(n))}const qi="<<",en={identify:i=>i===qi||typeof i=="symbol"&&i.description===qi,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new le(Symbol(qi)),{addToJSMap:kh}),stringify:()=>qi},Sy=(i,n)=>(en.identify(n)||ve(n)&&(!n.type||n.type===le.PLAIN)&&en.identify(n.value))&&(i==null?void 0:i.doc.schema.tags.some(r=>r.tag===en.tag&&r.default));function kh(i,n,r){if(r=i&&Wn(r)?r.resolve(i.doc):r,jr(r))for(const l of r.items)$a(i,n,l);else if(Array.isArray(r))for(const l of r)$a(i,n,l);else $a(i,n,r)}function $a(i,n,r){const l=i&&Wn(r)?r.resolve(i.doc):r;if(!Pr(l))throw new Error("Merge sources must be maps or map aliases");const o=l.toJSON(null,i,Map);for(const[u,f]of o)n instanceof Map?n.has(u)||n.set(u,f):n instanceof Set?n.add(u):Object.prototype.hasOwnProperty.call(n,u)||Object.defineProperty(n,u,{value:f,writable:!0,enumerable:!0,configurable:!0});return n}function Eh(i,n,{key:r,value:l}){if(Ie(r)&&r.addToJSMap)r.addToJSMap(i,n,l);else if(Sy(i,r))kh(i,n,l);else{const o=Ct(r,"",i);if(n instanceof Map)n.set(o,Ct(l,o,i));else if(n instanceof Set)n.add(o);else{const u=ky(r,o,i),f=Ct(l,u,i);u in n?Object.defineProperty(n,u,{value:f,writable:!0,enumerable:!0,configurable:!0}):n[u]=f}}return n}function ky(i,n,r){if(n===null)return"";if(typeof n!="object")return String(n);if(Ie(i)&&(r!=null&&r.doc)){const l=wh(r.doc,{});l.anchors=new Set;for(const u of r.anchors.keys())l.anchors.add(u.anchor);l.inFlow=!0,l.inStringifyKey=!0;const o=i.toString(l);if(!r.mapKeyWarned){let u=JSON.stringify(o);u.length>40&&(u=u.substring(0,36)+'..."'),Sh(r.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${u}. Set mapAsMap: true to use object keys.`),r.mapKeyWarned=!0}return o}return JSON.stringify(n)}function Ga(i,n,r){const l=Ls(i,void 0,r),o=Ls(n,void 0,r);return new Ze(l,o)}class Ze{constructor(n,r=null){Object.defineProperty(this,_t,{value:ah}),this.key=n,this.value=r}clone(n){let{key:r,value:l}=this;return Ie(r)&&(r=r.clone(n)),Ie(l)&&(l=l.clone(n)),new Ze(r,l)}toJSON(n,r){const l=r!=null&&r.mapAsMap?new Map:{};return Eh(r,l,this)}toString(n,r,l){return n!=null&&n.doc?wy(this,n,r,l):JSON.stringify(this)}}function xh(i,n,r){return(n.inFlow??i.flow?xy:Ey)(i,n,r)}function Ey({comment:i,items:n},r,{blockItemPrefix:l,flowChars:o,itemIndent:u,onChompKeep:f,onComment:h}){const{indent:p,options:{commentString:g}}=r,N=Object.assign({},r,{indent:u,type:null});let S=!1;const T=[];for(let L=0;L<n.length;++L){const v=n[L];let w=null;if(Ie(v))!S&&v.spaceBefore&&T.push(""),ul(r,T,v.commentBefore,S),v.comment&&(w=v.comment);else if(_e(v)){const P=Ie(v.key)?v.key:null;P&&(!S&&P.spaceBefore&&T.push(""),ul(r,T,P.commentBefore,S))}S=!1;let A=Lr(v,N,()=>w=null,()=>S=!0);w&&(A+=Bn(A,u,g(w))),S&&w&&(S=!1),T.push(l+A)}let E;if(T.length===0)E=o.start+o.end;else{E=T[0];for(let L=1;L<T.length;++L){const v=T[L];E+=v?`
|
||||
${p}${v}`:`
|
||||
`}}return i?(E+=`
|
||||
`+Zt(g(i),p),h&&h()):S&&f&&f(),E}function xy({items:i},n,{flowChars:r,itemIndent:l}){const{indent:o,indentStep:u,flowCollectionPadding:f,options:{commentString:h}}=n;l+=u;const p=Object.assign({},n,{indent:l,inFlow:!0,type:null});let g=!1,N=0;const S=[];for(let L=0;L<i.length;++L){const v=i[L];let w=null;if(Ie(v))v.spaceBefore&&S.push(""),ul(n,S,v.commentBefore,!1),v.comment&&(w=v.comment);else if(_e(v)){const P=Ie(v.key)?v.key:null;P&&(P.spaceBefore&&S.push(""),ul(n,S,P.commentBefore,!1),P.comment&&(g=!0));const M=Ie(v.value)?v.value:null;M?(M.comment&&(w=M.comment),M.commentBefore&&(g=!0)):v.value==null&&(P!=null&&P.comment)&&(w=P.comment)}w&&(g=!0);let A=Lr(v,p,()=>w=null);L<i.length-1&&(A+=","),w&&(A+=Bn(A,l,h(w))),!g&&(S.length>N||A.includes(`
|
||||
`))&&(g=!0),S.push(A),N=S.length}const{start:T,end:E}=r;if(S.length===0)return T+E;if(!g){const L=S.reduce((v,w)=>v+w.length+2,2);g=n.options.lineWidth>0&&L>n.options.lineWidth}if(g){let L=T;for(const v of S)L+=v?`
|
||||
${u}${o}${v}`:`
|
||||
`;return`${L}
|
||||
${o}${E}`}else return`${T}${f}${S.join(" ")}${f}${E}`}function ul({indent:i,options:{commentString:n}},r,l,o){if(l&&o&&(l=l.replace(/^\n+/,"")),l){const u=Zt(n(l),i);r.push(u.trimStart())}}function zn(i,n){const r=ve(n)?n.value:n;for(const l of i)if(_e(l)&&(l.key===n||l.key===r||ve(l.key)&&l.key.value===r))return l}class wt extends yh{static get tagName(){return"tag:yaml.org,2002:map"}constructor(n){super(kn,n),this.items=[]}static from(n,r,l){const{keepUndefined:o,replacer:u}=l,f=new this(n),h=(p,g)=>{if(typeof u=="function")g=u.call(r,p,g);else if(Array.isArray(u)&&!u.includes(p))return;(g!==void 0||o)&&f.items.push(Ga(p,g,l))};if(r instanceof Map)for(const[p,g]of r)h(p,g);else if(r&&typeof r=="object")for(const p of Object.keys(r))h(p,r[p]);return typeof n.sortMapEntries=="function"&&f.items.sort(n.sortMapEntries),f}add(n,r){var f;let l;_e(n)?l=n:!n||typeof n!="object"||!("key"in n)?l=new Ze(n,n==null?void 0:n.value):l=new Ze(n.key,n.value);const o=zn(this.items,l.key),u=(f=this.schema)==null?void 0:f.sortMapEntries;if(o){if(!r)throw new Error(`Key ${l.key} already set`);ve(o.value)&&gh(l.value)?o.value.value=l.value:o.value=l.value}else if(u){const h=this.items.findIndex(p=>u(l,p)<0);h===-1?this.items.push(l):this.items.splice(h,0,l)}else this.items.push(l)}delete(n){const r=zn(this.items,n);return r?this.items.splice(this.items.indexOf(r),1).length>0:!1}get(n,r){const l=zn(this.items,n),o=l==null?void 0:l.value;return(!r&&ve(o)?o.value:o)??void 0}has(n){return!!zn(this.items,n)}set(n,r){this.add(new Ze(n,r),!0)}toJSON(n,r,l){const o=l?new l:r!=null&&r.mapAsMap?new Map:{};r!=null&&r.onCreate&&r.onCreate(o);for(const u of this.items)Eh(r,o,u);return o}toString(n,r,l){if(!n)return JSON.stringify(this);for(const o of this.items)if(!_e(o))throw new Error(`Map items must all be pairs; found ${JSON.stringify(o)} instead`);return!n.allNullValues&&this.hasAllNullValues(!1)&&(n=Object.assign({},n,{allNullValues:!0})),xh(this,n,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:n.indent||"",onChompKeep:l,onComment:r})}}const Mr={collection:"map",default:!0,nodeClass:wt,tag:"tag:yaml.org,2002:map",resolve(i,n){return Pr(i)||n("Expected a mapping for this tag"),i},createNode:(i,n,r)=>wt.from(i,n,r)};class xn extends yh{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(n){super(Ar,n),this.items=[]}add(n){this.items.push(n)}delete(n){const r=Hi(n);return typeof r!="number"?!1:this.items.splice(r,1).length>0}get(n,r){const l=Hi(n);if(typeof l!="number")return;const o=this.items[l];return!r&&ve(o)?o.value:o}has(n){const r=Hi(n);return typeof r=="number"&&r<this.items.length}set(n,r){const l=Hi(n);if(typeof l!="number")throw new Error(`Expected a valid index, not ${n}.`);const o=this.items[l];ve(o)&&gh(r)?o.value=r:this.items[l]=r}toJSON(n,r){const l=[];r!=null&&r.onCreate&&r.onCreate(l);let o=0;for(const u of this.items)l.push(Ct(u,String(o++),r));return l}toString(n,r,l){return n?xh(this,n,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(n.indent||"")+" ",onChompKeep:l,onComment:r}):JSON.stringify(this)}static from(n,r,l){const{replacer:o}=l,u=new this(n);if(r&&Symbol.iterator in Object(r)){let f=0;for(let h of r){if(typeof o=="function"){const p=r instanceof Set?h:String(f++);h=o.call(r,p,h)}u.items.push(Ls(h,void 0,l))}}return u}}function Hi(i){let n=ve(i)?i.value:i;return n&&typeof n=="string"&&(n=Number(n)),typeof n=="number"&&Number.isInteger(n)&&n>=0?n:null}const Rr={collection:"seq",default:!0,nodeClass:xn,tag:"tag:yaml.org,2002:seq",resolve(i,n){return jr(i)||n("Expected a sequence for this tag"),i},createNode:(i,n,r)=>xn.from(i,n,r)},Sl={identify:i=>typeof i=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:i=>i,stringify(i,n,r,l){return n=Object.assign({actualString:!0},n),As(i,n,r,l)}},kl={identify:i=>i==null,createNode:()=>new le(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new le(null),stringify:({source:i},n)=>typeof i=="string"&&kl.test.test(i)?i:n.options.nullStr},Xa={identify:i=>typeof i=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:i=>new le(i[0]==="t"||i[0]==="T"),stringify({source:i,value:n},r){if(i&&Xa.test.test(i)){const l=i[0]==="t"||i[0]==="T";if(n===l)return i}return n?r.options.trueStr:r.options.falseStr}};function Rt({format:i,minFractionDigits:n,tag:r,value:l}){if(typeof l=="bigint")return String(l);const o=typeof l=="number"?l:Number(l);if(!isFinite(o))return isNaN(o)?".nan":o<0?"-.inf":".inf";let u=JSON.stringify(l);if(!i&&n&&(!r||r==="tag:yaml.org,2002:float")&&/^\d/.test(u)){let f=u.indexOf(".");f<0&&(f=u.length,u+=".");let h=n-(u.length-f-1);for(;h-- >0;)u+="0"}return u}const Nh={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:i=>i.slice(-3).toLowerCase()==="nan"?NaN:i[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Rt},Th={identify:i=>type
Line truncated
|
||||
`:" ")}return As({comment:i,type:n,value:h},l,o,u)}};function Ih(i,n){if(jr(i))for(let r=0;r<i.items.length;++r){let l=i.items[r];if(!_e(l)){if(Pr(l)){l.items.length>1&&n("Each pair must have its own sequence indicator");const o=l.items[0]||new Ze(new le(null));if(l.commentBefore&&(o.key.commentBefore=o.key.commentBefore?`${l.commentBefore}
|
||||
${o.key.commentBefore}`:l.commentBefore),l.comment){const u=o.value??o.key;u.comment=u.comment?`${l.comment}
|
||||
${u.comment}`:l.comment}l=o}i.items[r]=_e(l)?l:new Ze(l)}}else n("Expected a sequence for this tag");return i}function Ah(i,n,r){const{replacer:l}=r,o=new xn(i);o.tag="tag:yaml.org,2002:pairs";let u=0;if(n&&Symbol.iterator in Object(n))for(let f of n){typeof l=="function"&&(f=l.call(n,String(u++),f));let h,p;if(Array.isArray(f))if(f.length===2)h=f[0],p=f[1];else throw new TypeError(`Expected [key, value] tuple: ${f}`);else if(f&&f instanceof Object){const g=Object.keys(f);if(g.length===1)h=g[0],p=f[h];else throw new TypeError(`Expected tuple with one key, not ${g.length} keys`)}else h=f;o.items.push(Ga(h,p,r))}return o}const tu={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Ih,createNode:Ah};class Cr extends xn{constructor(){super(),this.add=wt.prototype.add.bind(this),this.delete=wt.prototype.delete.bind(this),this.get=wt.prototype.get.bind(this),this.has=wt.prototype.has.bind(this),this.set=wt.prototype.set.bind(this),this.tag=Cr.tag}toJSON(n,r){if(!r)return super.toJSON(n);const l=new Map;r!=null&&r.onCreate&&r.onCreate(l);for(const o of this.items){let u,f;if(_e(o)?(u=Ct(o.key,"",r),f=Ct(o.value,u,r)):u=Ct(o,"",r),l.has(u))throw new Error("Ordered maps must not include duplicate keys");l.set(u,f)}return l}static from(n,r,l){const o=Ah(n,r,l),u=new this;return u.items=o.items,u}}Cr.tag="tag:yaml.org,2002:omap";const nu={collection:"seq",identify:i=>i instanceof Map,nodeClass:Cr,default:!1,tag:"tag:yaml.org,2002:omap",resolve(i,n){const r=Ih(i,n),l=[];for(const{key:o}of r.items)ve(o)&&(l.includes(o.value)?n(`Ordered maps must not include duplicate keys: ${o.value}`):l.push(o.value));return Object.assign(new Cr,r)},createNode:(i,n,r)=>Cr.from(i,n,r)};function Ph({value:i,source:n},r){return n&&(i?jh:Mh).test.test(n)?n:i?r.options.trueStr:r.options.falseStr}const jh={identify:i=>i===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new le(!0),stringify:Ph},Mh={identify:i=>i===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new le(!1),stringify:Ph},Ly={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:i=>i.slice(-3).toLowerCase()==="nan"?NaN:i[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Rt},Oy={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:i=>parseFloat(i.replace(/_/g,"")),stringify(i){const n=Number(i.value);return isFinite(n)?n.toExponential():Rt(i)}},$y={identify:i=>typeof i=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(i){const n=new le(parseFloat(i.replace(/_/g,""))),r=i.indexOf(".");if(r!==-1){const l=i.substring(r+1).replace(/_/g,"");l[l.length-1]==="0"&&(n.minFractionDigits=l.length)}return n},stringify:Rt},Ps=i=>typeof i=="bigint"||Number.isInteger(i);function xl(i,n,r,{intAsBigInt:l}){const o=i[0];if((o==="-"||o==="+")&&(n+=1),i=i.substring(n).replace(/_/g,""),l){switch(r){case 2:i=`0b${i}`;break;case 8:i=`0o${i}`;break;case 16:i=`0x${i}`;break}const f=BigInt(i);return o==="-"?BigInt(-1)*f:f}const u=parseInt(i,r);return o==="-"?-1*u:u}function ru(i,n,r){const{value:l}=i;if(Ps(l)){const o=l.toString(n);return l<0?"-"+r+o.substr(1):r+o}return Rt(i)}const Iy={identify:Ps,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(i,n,r)=>xl(i,2,2,r),stringify:i=>ru(i,2,"0b")},Ay={identify:Ps,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(i,n,r)=>xl(i,1,8,r),stringify:i=>ru(i,8,"0")},Py={identify:Ps,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(i,n,r)=>xl(i,0,10,r),stringify:Rt},jy={identify:Ps,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(i,n,r)=>xl(i,2,16,r),stringify:i=>ru(i,16,"0x")};class _r extends wt{constructor(n){super(n),this.tag=_r.tag}add(n){let r;_e(n)?r=n:n&&typeof n=="object"&&"key"in n&&"value"in n&&n.value===null?r=new Ze(n.key,null):r=new Ze(n,null),zn(this.items,r.key)||this.items.push(r)}get(n,r){const l=zn(this.items,n);return!r&&_e(l)?ve(l.key)?l.key.value:l.key:l}set(n,r){if(typeof r!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof r}`);const l=zn(this.items,n);l&&!r?this.items.splice(this.items.indexOf(l),1):!l&&r&&this.items.push(new Ze(n))}toJSON(n,r){return super.toJSON(n,r,Set)}toString(n,r,l){if(!n)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},n,{allNullValues:!0}),r,l);throw new Error("Set items must all have null values")}static from(n,r,l){const{replacer:o}=l,u=new this(n);if(r&&Symbol.iterator in Object(r))for(let f of r)typeof o=="function"&&(f=o.call(r,f,f)),u.items.push(Ga(f,null,l));return u}}_r.tag="tag:yaml.org,2002:set";const su={col
Line truncated
|
||||
`)?(r.push("..."),r.push(Zt(g,""))):r.push(`... ${g}`)}else r.push("...");else{let g=i.comment;g&&f&&(g=g.replace(/^\n+/,"")),g&&((!f||h)&&r[r.length-1]!==""&&r.push(""),r.push(Zt(u(g),"")))}return r.join(`
|
||||
`)+`
|
||||
`}class Dr{constructor(n,r,l){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,_t,{value:Fa});let o=null;typeof r=="function"||Array.isArray(r)?o=r:l===void 0&&r&&(l=r,r=void 0);const u=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},l);this.options=u;let{version:f}=u;l!=null&&l._directives?(this.directives=l._directives.atDocument(),this.directives.yaml.explicit&&(f=this.directives.yaml.version)):this.directives=new nt({version:f}),this.setSchema(f,l),this.contents=n===void 0?null:this.createNode(n,o,l)}clone(){const n=Object.create(Dr.prototype,{[_t]:{value:Fa}});return n.commentBefore=this.commentBefore,n.comment=this.comment,n.errors=this.errors.slice(),n.warnings=this.warnings.slice(),n.options=Object.assign({},this.options),this.directives&&(n.directives=this.directives.clone()),n.schema=this.schema.clone(),n.contents=Ie(this.contents)?this.contents.clone(n.schema):this.contents,this.range&&(n.range=this.range.slice()),n}add(n){vr(this.contents)&&this.contents.add(n)}addIn(n,r){vr(this.contents)&&this.contents.addIn(n,r)}createAlias(n,r){if(!n.anchor){const l=ph(this);n.anchor=!r||l.has(r)?mh(r||"a",l):r}return new gl(n.anchor)}createNode(n,r,l){let o;if(typeof r=="function")n=r.call({"":n},"",n),o=r;else if(Array.isArray(r)){const w=P=>typeof P=="number"||P instanceof String||P instanceof Number,A=r.filter(w).map(String);A.length>0&&(r=r.concat(A)),o=r}else l===void 0&&r&&(l=r,r=void 0);const{aliasDuplicateObjects:u,anchorPrefix:f,flow:h,keepUndefined:p,onTagObj:g,tag:N}=l??{},{onAnchor:S,setAnchors:T,sourceObjects:E}=fy(this,f||"a"),L={aliasDuplicateObjects:u??!0,keepUndefined:p??!1,onAnchor:S,onTagObj:g,replacer:o,schema:this.schema,sourceObjects:E},v=Ls(n,N,L);return h&&$e(v)&&(v.flow=!0),T(),v}createPair(n,r,l={}){const o=this.createNode(n,null,l),u=this.createNode(r,null,l);return new Ze(o,u)}delete(n){return vr(this.contents)?this.contents.delete(n):!1}deleteIn(n){return Cs(n)?this.contents==null?!1:(this.contents=null,!0):vr(this.contents)?this.contents.deleteIn(n):!1}get(n,r){return $e(this.contents)?this.contents.get(n,r):void 0}getIn(n,r){return Cs(n)?!r&&ve(this.contents)?this.contents.value:this.contents:$e(this.contents)?this.contents.getIn(n,r):void 0}has(n){return $e(this.contents)?this.contents.has(n):!1}hasIn(n){return Cs(n)?this.contents!==void 0:$e(this.contents)?this.contents.hasIn(n):!1}set(n,r){this.contents==null?this.contents=al(this.schema,[n],r):vr(this.contents)&&this.contents.set(n,r)}setIn(n,r){Cs(n)?this.contents=r:this.contents==null?this.contents=al(this.schema,Array.from(n),r):vr(this.contents)&&this.contents.setIn(n,r)}setSchema(n,r={}){typeof n=="number"&&(n=String(n));let l;switch(n){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new nt({version:"1.1"}),l={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=n:this.directives=new nt({version:n}),l={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,l=null;break;default:{const o=JSON.stringify(n);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${o}`)}}if(r.schema instanceof Object)this.schema=r.schema;else if(l)this.schema=new Tl(Object.assign(l,r));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:n,jsonArg:r,mapAsMap:l,maxAliasCount:o,onAnchor:u,reviver:f}={}){const h={anchors:new Map,doc:this,keep:!n,mapAsMap:l===!0,mapKeyWarned:!1,maxAliasCount:typeof o=="number"?o:100},p=Ct(this.contents,r??"",h);if(typeof u=="function")for(const{count:g,res:N}of h.anchors.values())u(N,g);return typeof f=="function"?Nr(f,{"":p},"",p):p}toJSON(n,r){return this.toJS({json:!0,jsonArg:n,mapAsMap:!1,onAnchor:r})}toString(n={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in n&&(!Number.isInteger(n.indent)||Number(n.indent)<=0)){const r=JSON.stringify(n.indent);throw new Error(`"indent" option must be a positive integer, not ${r}`)}return Dy(this,n)}}function vr(i){if($e(i))return!0;throw new Error("Expected a YAML collection as document contents")}class lu extends Error{constructor(n,r,l,o){super(),this.name=n,this.code=l,this.message=o,this.pos=r}}class Fn extends lu{constructor(n,r,l){super("YAMLParseError",n,r,l)}}class Bh extends lu{constructor(n,r,l){super("YAMLWarning",n,r,l)}}const cl=(i,n)=>r=>{if(r.pos[0]===-1)return;r.linePos=r.pos.map(h=>n.linePos(h));const{line:l,col:o}=r.linePos[0];r.message+=` at line ${l}, column ${o}`;let u=o-1,f=i.substring(n.lineStarts[l-1],n.lineStarts[l]).replace(/[\n\r]+$/,"");if(u>=60&&f.length>80){const h=Math.min(u-39,f.length-79);f="…"+f.substring(h),u-=h-1}if(f.length>80&&(f=f.substring(0,79)+"…"),l>1&&/^ *$/.test(f.substring(0,u))){let h=i.substring(n.lineStarts[l-2],n.lineStarts[l-1]);h.len
Line truncated
|
||||
`),f=h+f}if(/[^ ]/.test(f)){let h=1;const p=r.linePos[1];p&&p.line===l&&p.col>o&&(h=Math.max(1,Math.min(p.col-o,80-u)));const g=" ".repeat(u)+"^".repeat(h);r.message+=`:
|
||||
|
||||
${f}
|
||||
${g}
|
||||
`}};function Or(i,{flow:n,indicator:r,next:l,offset:o,onError:u,parentIndent:f,startOnNewline:h}){let p=!1,g=h,N=h,S="",T="",E=!1,L=!1,v=null,w=null,A=null,P=null,M=null,V=null,q=null;for(const U of i)switch(L&&(U.type!=="space"&&U.type!=="newline"&&U.type!=="comma"&&u(U.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),L=!1),v&&(g&&U.type!=="comment"&&U.type!=="newline"&&u(v,"TAB_AS_INDENT","Tabs are not allowed as indentation"),v=null),U.type){case"space":!n&&(r!=="doc-start"||(l==null?void 0:l.type)!=="flow-collection")&&U.source.includes(" ")&&(v=U),N=!0;break;case"comment":{N||u(U,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const O=U.source.substring(1)||" ";S?S+=T+O:S=O,T="",g=!1;break}case"newline":g?S?S+=U.source:p=!0:T+=U.source,g=!0,E=!0,(w||A)&&(P=U),N=!0;break;case"anchor":w&&u(U,"MULTIPLE_ANCHORS","A node can have at most one anchor"),U.source.endsWith(":")&&u(U.offset+U.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),w=U,q===null&&(q=U.offset),g=!1,N=!1,L=!0;break;case"tag":{A&&u(U,"MULTIPLE_TAGS","A node can have at most one tag"),A=U,q===null&&(q=U.offset),g=!1,N=!1,L=!0;break}case r:(w||A)&&u(U,"BAD_PROP_ORDER",`Anchors and tags must be after the ${U.source} indicator`),V&&u(U,"UNEXPECTED_TOKEN",`Unexpected ${U.source} in ${n??"collection"}`),V=U,g=r==="seq-item-ind"||r==="explicit-key-ind",N=!1;break;case"comma":if(n){M&&u(U,"UNEXPECTED_TOKEN",`Unexpected , in ${n}`),M=U,g=!1,N=!1;break}default:u(U,"UNEXPECTED_TOKEN",`Unexpected ${U.type} token`),g=!1,N=!1}const z=i[i.length-1],ee=z?z.offset+z.source.length:o;return L&&l&&l.type!=="space"&&l.type!=="newline"&&l.type!=="comma"&&(l.type!=="scalar"||l.source!=="")&&u(l.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),v&&(g&&v.indent<=f||(l==null?void 0:l.type)==="block-map"||(l==null?void 0:l.type)==="block-seq")&&u(v,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:M,found:V,spaceBefore:p,comment:S,hasNewline:E,anchor:w,tag:A,newlineAfterProp:P,end:ee,start:q??ee}}function Os(i){if(!i)return null;switch(i.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(i.source.includes(`
|
||||
`))return!0;if(i.end){for(const n of i.end)if(n.type==="newline")return!0}return!1;case"flow-collection":for(const n of i.items){for(const r of n.start)if(r.type==="newline")return!0;if(n.sep){for(const r of n.sep)if(r.type==="newline")return!0}if(Os(n.key)||Os(n.value))return!0}return!1;default:return!0}}function Wa(i,n,r){if((n==null?void 0:n.type)==="flow-collection"){const l=n.end[0];l.indent===i&&(l.source==="]"||l.source==="}")&&Os(n)&&r(l,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function zh(i,n,r){const{uniqueKeys:l}=i.options;if(l===!1)return!1;const o=typeof l=="function"?l:(u,f)=>u===f||ve(u)&&ve(f)&&u.value===f.value;return n.some(u=>o(u.key,r))}const $d="All mapping items must start at the same column";function by({composeNode:i,composeEmptyNode:n},r,l,o,u){var N;const f=(u==null?void 0:u.nodeClass)??wt,h=new f(r.schema);r.atRoot&&(r.atRoot=!1);let p=l.offset,g=null;for(const S of l.items){const{start:T,key:E,sep:L,value:v}=S,w=Or(T,{indicator:"explicit-key-ind",next:E??(L==null?void 0:L[0]),offset:p,onError:o,parentIndent:l.indent,startOnNewline:!0}),A=!w.found;if(A){if(E&&(E.type==="block-seq"?o(p,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in E&&E.indent!==l.indent&&o(p,"BAD_INDENT",$d)),!w.anchor&&!w.tag&&!L){g=w.end,w.comment&&(h.comment?h.comment+=`
|
||||
`+w.comment:h.comment=w.comment);continue}(w.newlineAfterProp||Os(E))&&o(E??T[T.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((N=w.found)==null?void 0:N.indent)!==l.indent&&o(p,"BAD_INDENT",$d);r.atKey=!0;const P=w.end,M=E?i(r,E,w,o):n(r,P,T,null,w,o);r.schema.compat&&Wa(l.indent,E,o),r.atKey=!1,zh(r,h.items,M)&&o(P,"DUPLICATE_KEY","Map keys must be unique");const V=Or(L??[],{indicator:"map-value-ind",next:v,offset:M.range[2],onError:o,parentIndent:l.indent,startOnNewline:!E||E.type==="block-scalar"});if(p=V.end,V.found){A&&((v==null?void 0:v.type)==="block-map"&&!V.hasNewline&&o(p,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),r.options.strict&&w.start<V.found.offset-1024&&o(M.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const q=v?i(r,v,V,o):n(r,p,L,null,V,o);r.schema.compat&&Wa(l.indent,v,o),p=q.range[2];const z=new Ze(M,q);r.options.keepSourceTokens&&(z.srcToken=S),h.items.push(z)}else{A&&o(M.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),V.comment&&(M.comment?M.comment+=`
|
||||
`+V.comment:M.comment=V.comment);const q=new Ze(M);r.options.keepSourceTokens&&(q.srcToken=S),h.items.push(q)}}return g&&g<p&&o(g,"IMPOSSIBLE","Map comment with trailing content"),h.range=[l.offset,p,g??p],h}function By({composeNode:i,composeEmptyNode:n},r,l,o,u){const f=(u==null?void 0:u.nodeClass)??xn,h=new f(r.schema);r.atRoot&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let p=l.offset,g=null;for(const{start:N,value:S}of l.items){const T=Or(N,{indicator:"seq-item-ind",next:S,offset:p,onError:o,parentIndent:l.indent,startOnNewline:!0});if(!T.found)if(T.anchor||T.tag||S)S&&S.type==="block-seq"?o(T.end,"BAD_INDENT","All sequence items must start at the same column"):o(p,"MISSING_CHAR","Sequence item without - indicator");else{g=T.end,T.comment&&(h.comment=T.comment);continue}const E=S?i(r,S,T,o):n(r,T.end,N,null,T,o);r.schema.compat&&Wa(l.indent,S,o),p=E.range[2],h.items.push(E)}return h.range=[l.offset,p,g??p],h}function js(i,n,r,l){let o="";if(i){let u=!1,f="";for(const h of i){const{source:p,type:g}=h;switch(g){case"space":u=!0;break;case"comment":{r&&!u&&l(h,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const N=p.substring(1)||" ";o?o+=f+N:o=N,f="";break}case"newline":o&&(f+=p),u=!0;break;default:l(h,"UNEXPECTED_TOKEN",`Unexpected ${g} at node end`)}n+=p.length}}return{comment:o,offset:n}}const Aa="Block collections are not allowed within flow collections",Pa=i=>i&&(i.type==="block-map"||i.type==="block-seq");function zy({composeNode:i,composeEmptyNode:n},r,l,o,u){const f=l.start.source==="{",h=f?"flow map":"flow sequence",p=(u==null?void 0:u.nodeClass)??(f?wt:xn),g=new p(r.schema);g.flow=!0;const N=r.atRoot;N&&(r.atRoot=!1),r.atKey&&(r.atKey=!1);let S=l.offset+l.start.source.length;for(let w=0;w<l.items.length;++w){const A=l.items[w],{start:P,key:M,sep:V,value:q}=A,z=Or(P,{flow:h,indicator:"explicit-key-ind",next:M??(V==null?void 0:V[0]),offset:S,onError:o,parentIndent:l.indent,startOnNewline:!1});if(!z.found){if(!z.anchor&&!z.tag&&!V&&!q){w===0&&z.comma?o(z.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${h}`):w<l.items.length-1&&o(z.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${h}`),z.comment&&(g.comment?g.comment+=`
|
||||
`+z.comment:g.comment=z.comment),S=z.end;continue}!f&&r.options.strict&&Os(M)&&o(M,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(w===0)z.comma&&o(z.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${h}`);else if(z.comma||o(z.start,"MISSING_CHAR",`Missing , between ${h} items`),z.comment){let ee="";e:for(const U of P)switch(U.type){case"comma":case"space":break;case"comment":ee=U.source.substring(1);break e;default:break e}if(ee){let U=g.items[g.items.length-1];_e(U)&&(U=U.value??U.key),U.comment?U.comment+=`
|
||||
`+ee:U.comment=ee,z.comment=z.comment.substring(ee.length+1)}}if(!f&&!V&&!z.found){const ee=q?i(r,q,z,o):n(r,z.end,V,null,z,o);g.items.push(ee),S=ee.range[2],Pa(q)&&o(ee.range,"BLOCK_IN_FLOW",Aa)}else{r.atKey=!0;const ee=z.end,U=M?i(r,M,z,o):n(r,ee,P,null,z,o);Pa(M)&&o(U.range,"BLOCK_IN_FLOW",Aa),r.atKey=!1;const O=Or(V??[],{flow:h,indicator:"map-value-ind",next:q,offset:U.range[2],onError:o,parentIndent:l.indent,startOnNewline:!1});if(O.found){if(!f&&!z.found&&r.options.strict){if(V)for(const j of V){if(j===O.found)break;if(j.type==="newline"){o(j,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}z.start<O.found.offset-1024&&o(O.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&&q.source[0]===":"?o(q,"MISSING_CHAR",`Missing space after : in ${h}`):o(O.start,"MISSING_CHAR",`Missing , or : between ${h} items`));const se=q?i(r,q,O,o):O.found?n(r,O.end,V,null,O,o):null;se?Pa(q)&&o(se.range,"BLOCK_IN_FLOW",Aa):O.comment&&(U.comment?U.comment+=`
|
||||
`+O.comment:U.comment=O.comment);const oe=new Ze(U,se);if(r.options.keepSourceTokens&&(oe.srcToken=A),f){const j=g;zh(r,j.items,U)&&o(ee,"DUPLICATE_KEY","Map keys must be unique"),j.items.push(oe)}else{const j=new wt(r.schema);j.flow=!0,j.items.push(oe);const Z=(se??U).range;j.range=[U.range[0],Z[1],Z[2]],g.items.push(j)}S=se?se.range[2]:O.end}}const T=f?"}":"]",[E,...L]=l.end;let v=S;if(E&&E.source===T)v=E.offset+E.source.length;else{const w=h[0].toUpperCase()+h.substring(1),A=N?`${w} must end with a ${T}`:`${w} in block collection must be sufficiently indented and end with a ${T}`;o(S,N?"MISSING_CHAR":"BAD_INDENT",A),E&&E.source.length!==1&&L.unshift(E)}if(L.length>0){const w=js(L,v,r.options.strict,o);w.comment&&(g.comment?g.comment+=`
|
||||
`+w.comment:g.comment=w.comment),g.range=[l.offset,v,w.offset]}else g.range=[l.offset,v,v];return g}function ja(i,n,r,l,o,u){const f=r.type==="block-map"?by(i,n,r,l,u):r.type==="block-seq"?By(i,n,r,l,u):zy(i,n,r,l,u),h=f.constructor;return o==="!"||o===h.tagName?(f.tag=h.tagName,f):(o&&(f.tag=o),f)}function Fy(i,n,r,l,o){var T;const u=l.tag,f=u?n.directives.tagName(u.source,E=>o(u,"TAG_RESOLVE_FAILED",E)):null;if(r.type==="block-seq"){const{anchor:E,newlineAfterProp:L}=l,v=E&&u?E.offset>u.offset?E:u:E??u;v&&(!L||L.offset<v.offset)&&o(v,"MISSING_CHAR","Missing newline after block sequence props")}const h=r.type==="block-map"?"map":r.type==="block-seq"?"seq":r.start.source==="{"?"map":"seq";if(!u||!f||f==="!"||f===wt.tagName&&h==="map"||f===xn.tagName&&h==="seq")return ja(i,n,r,o,f);let p=n.schema.tags.find(E=>E.tag===f&&E.collection===h);if(!p){const E=n.schema.knownTags[f];if(E&&E.collection===h)n.schema.tags.push(Object.assign({},E,{default:!1})),p=E;else return E!=null&&E.collection?o(u,"BAD_COLLECTION_TYPE",`${E.tag} used for ${h} collection, but expects ${E.collection}`,!0):o(u,"TAG_RESOLVE_FAILED",`Unresolved tag: ${f}`,!0),ja(i,n,r,o,f)}const g=ja(i,n,r,o,f,p),N=((T=p.resolve)==null?void 0:T.call(p,g,E=>o(u,"TAG_RESOLVE_FAILED",E),n.options))??g,S=Ie(N)?N:new le(N);return S.range=g.range,S.tag=f,p!=null&&p.format&&(S.format=p.format),S}function Fh(i,n,r){const l=n.offset,o=Uy(n,i.options.strict,r);if(!o)return{value:"",type:null,comment:"",range:[l,l,l]};const u=o.mode===">"?le.BLOCK_FOLDED:le.BLOCK_LITERAL,f=n.source?Vy(n.source):[];let h=f.length;for(let v=f.length-1;v>=0;--v){const w=f[v][1];if(w===""||w==="\r")h=v;else break}if(h===0){const v=o.chomp==="+"&&f.length>0?`
|
||||
`.repeat(Math.max(1,f.length-1)):"";let w=l+o.length;return n.source&&(w+=n.source.length),{value:v,type:u,comment:o.comment,range:[l,w,w]}}let p=n.indent+o.indent,g=n.offset+o.length,N=0;for(let v=0;v<h;++v){const[w,A]=f[v];if(A===""||A==="\r")o.indent===0&&w.length>p&&(p=w.length);else{w.length<p&&r(g+w.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),o.indent===0&&(p=w.length),N=v,p===0&&!i.atRoot&&r(g,"BAD_INDENT","Block scalar values in collections must be indented");break}g+=w.length+A.length+1}for(let v=f.length-1;v>=h;--v)f[v][0].length>p&&(h=v+1);let S="",T="",E=!1;for(let v=0;v<N;++v)S+=f[v][0].slice(p)+`
|
||||
`;for(let v=N;v<h;++v){let[w,A]=f[v];g+=w.length+A.length+1;const P=A[A.length-1]==="\r";if(P&&(A=A.slice(0,-1)),A&&w.length<p){const V=`Block scalar lines must not be less indented than their ${o.indent?"explicit indentation indicator":"first line"}`;r(g-A.length-(P?2:1),"BAD_INDENT",V),w=""}u===le.BLOCK_LITERAL?(S+=T+w.slice(p)+A,T=`
|
||||
`):w.length>p||A[0]===" "?(T===" "?T=`
|
||||
`:!E&&T===`
|
||||
`&&(T=`
|
||||
|
||||
`),S+=T+w.slice(p)+A,T=`
|
||||
`,E=!0):A===""?T===`
|
||||
`?S+=`
|
||||
`:T=`
|
||||
`:(S+=T+A,T=" ",E=!1)}switch(o.chomp){case"-":break;case"+":for(let v=h;v<f.length;++v)S+=`
|
||||
`+f[v][0].slice(p);S[S.length-1]!==`
|
||||
`&&(S+=`
|
||||
`);break;default:S+=`
|
||||
`}const L=l+o.length+n.source.length;return{value:S,type:u,comment:o.comment,range:[l,L,L]}}function Uy({offset:i,props:n},r,l){if(n[0].type!=="block-scalar-header")return l(n[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:o}=n[0],u=o[0];let f=0,h="",p=-1;for(let T=1;T<o.length;++T){const E=o[T];if(!h&&(E==="-"||E==="+"))h=E;else{const L=Number(E);!f&&L?f=L:p===-1&&(p=i+T)}}p!==-1&&l(p,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${o}`);let g=!1,N="",S=o.length;for(let T=1;T<n.length;++T){const E=n[T];switch(E.type){case"space":g=!0;case"newline":S+=E.source.length;break;case"comment":r&&!g&&l(E,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),S+=E.source.length,N=E.source.substring(1);break;case"error":l(E,"UNEXPECTED_TOKEN",E.message),S+=E.source.length;break;default:{const L=`Unexpected token in block scalar header: ${E.type}`;l(E,"UNEXPECTED_TOKEN",L);const v=E.source;v&&typeof v=="string"&&(S+=v.length)}}}return{mode:u,indent:f,chomp:h,comment:N,length:S}}function Vy(i){const n=i.split(/\n( *)/),r=n[0],l=r.match(/^( *)/),u=[l!=null&&l[1]?[l[1],r.slice(l[1].length)]:["",r]];for(let f=1;f<n.length;f+=2)u.push([n[f],n[f+1]]);return u}function Uh(i,n,r){const{offset:l,type:o,source:u,end:f}=i;let h,p;const g=(T,E,L)=>r(l+T,E,L);switch(o){case"scalar":h=le.PLAIN,p=Ky(u,g);break;case"single-quoted-scalar":h=le.QUOTE_SINGLE,p=Wy(u,g);break;case"double-quoted-scalar":h=le.QUOTE_DOUBLE,p=qy(u,g);break;default:return r(i,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${o}`),{value:"",type:null,comment:"",range:[l,l+u.length,l+u.length]}}const N=l+u.length,S=js(f,N,n,r);return{value:p,type:h,comment:S.comment,range:[l,N,S.offset]}}function Ky(i,n){let r="";switch(i[0]){case" ":r="a tab character";break;case",":r="flow indicator character ,";break;case"%":r="directive indicator character %";break;case"|":case">":{r=`block scalar indicator ${i[0]}`;break}case"@":case"`":{r=`reserved character ${i[0]}`;break}}return r&&n(0,"BAD_SCALAR_START",`Plain value cannot start with ${r}`),Vh(i)}function Wy(i,n){return(i[i.length-1]!=="'"||i.length===1)&&n(i.length,"MISSING_CHAR","Missing closing 'quote"),Vh(i.slice(1,-1)).replace(/''/g,"'")}function Vh(i){let n,r;try{n=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
||||
`,"sy"),r=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
||||
`,"sy")}catch{n=/(.*?)[ \t]*\r?\n/sy,r=/[ \t]*(.*?)[ \t]*\r?\n/sy}let l=n.exec(i);if(!l)return i;let o=l[1],u=" ",f=n.lastIndex;for(r.lastIndex=f;l=r.exec(i);)l[1]===""?u===`
|
||||
`?o+=u:u=`
|
||||
`:(o+=u+l[1],u=" "),f=r.lastIndex;const h=/[ \t]*(.*)/sy;return h.lastIndex=f,l=h.exec(i),o+u+((l==null?void 0:l[1])??"")}function qy(i,n){let r="";for(let l=1;l<i.length-1;++l){const o=i[l];if(!(o==="\r"&&i[l+1]===`
|
||||
`))if(o===`
|
||||
`){const{fold:u,offset:f}=Hy(i,l);r+=u,l=f}else if(o==="\\"){let u=i[++l];const f=Qy[u];if(f)r+=f;else if(u===`
|
||||
`)for(u=i[l+1];u===" "||u===" ";)u=i[++l+1];else if(u==="\r"&&i[l+1]===`
|
||||
`)for(u=i[++l+1];u===" "||u===" ";)u=i[++l+1];else if(u==="x"||u==="u"||u==="U"){const h={x:2,u:4,U:8}[u];r+=Jy(i,l+1,h,n),l+=h}else{const h=i.substr(l-1,2);n(l-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${h}`),r+=h}}else if(o===" "||o===" "){const u=l;let f=i[l+1];for(;f===" "||f===" ";)f=i[++l+1];f!==`
|
||||
`&&!(f==="\r"&&i[l+2]===`
|
||||
`)&&(r+=l>u?i.slice(u,l+1):o)}else r+=o}return(i[i.length-1]!=='"'||i.length===1)&&n(i.length,"MISSING_CHAR",'Missing closing "quote'),r}function Hy(i,n){let r="",l=i[n+1];for(;(l===" "||l===" "||l===`
|
||||
`||l==="\r")&&!(l==="\r"&&i[n+2]!==`
|
||||
`);)l===`
|
||||
`&&(r+=`
|
||||
`),n+=1,l=i[n+1];return r||(r=" "),{fold:r,offset:n}}const Qy={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
||||
`,r:"\r",t:" ",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function Jy(i,n,r,l){const o=i.substr(n,r),f=o.length===r&&/^[0-9a-fA-F]+$/.test(o)?parseInt(o,16):NaN;if(isNaN(f)){const h=i.substr(n-2,r+2);return l(n-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${h}`),h}return String.fromCodePoint(f)}function Kh(i,n,r,l){const{value:o,type:u,comment:f,range:h}=n.type==="block-scalar"?Fh(i,n,l):Uh(n,i.options.strict,l),p=r?i.directives.tagName(r.source,S=>l(r,"TAG_RESOLVE_FAILED",S)):null;let g;i.options.stringKeys&&i.atKey?g=i.schema[Vt]:p?g=Yy(i.schema,o,p,r,l):n.type==="scalar"?g=Gy(i,o,n,l):g=i.schema[Vt];let N;try{const S=g.resolve(o,T=>l(r??n,"TAG_RESOLVE_FAILED",T),i.options);N=ve(S)?S:new le(S)}catch(S){const T=S instanceof Error?S.message:String(S);l(r??n,"TAG_RESOLVE_FAILED",T),N=new le(o)}return N.range=h,N.source=o,u&&(N.type=u),p&&(N.tag=p),g.format&&(N.format=g.format),f&&(N.comment=f),N}function Yy(i,n,r,l,o){var h;if(r==="!")return i[Vt];const u=[];for(const p of i.tags)if(!p.collection&&p.tag===r)if(p.default&&p.test)u.push(p);else return p;for(const p of u)if((h=p.test)!=null&&h.test(n))return p;const f=i.knownTags[r];return f&&!f.collection?(i.tags.push(Object.assign({},f,{default:!1,test:void 0})),f):(o(l,"TAG_RESOLVE_FAILED",`Unresolved tag: ${r}`,r!=="tag:yaml.org,2002:str"),i[Vt])}function Gy({atKey:i,directives:n,schema:r},l,o,u){const f=r.tags.find(h=>{var p;return(h.default===!0||i&&h.default==="key")&&((p=h.test)==null?void 0:p.test(l))})||r[Vt];if(r.compat){const h=r.compat.find(p=>{var g;return p.default&&((g=p.test)==null?void 0:g.test(l))})??r[Vt];if(f.tag!==h.tag){const p=n.tagString(f.tag),g=n.tagString(h.tag),N=`Value may be parsed as either ${p} or ${g}`;u(o,"TAG_RESOLVE_FAILED",N,!0)}}return f}function Xy(i,n,r){if(n){r===null&&(r=n.length);for(let l=r-1;l>=0;--l){let o=n[l];switch(o.type){case"space":case"comment":case"newline":i-=o.source.length;continue}for(o=n[++l];(o==null?void 0:o.type)==="space";)i+=o.source.length,o=n[++l];break}}return i}const Zy={composeNode:Wh,composeEmptyNode:ou};function Wh(i,n,r,l){const o=i.atKey,{spaceBefore:u,comment:f,anchor:h,tag:p}=r;let g,N=!0;switch(n.type){case"alias":g=e0(i,n,l),(h||p)&&l(n,"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=Kh(i,n,p,l),h&&(g.anchor=h.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":g=Fy(Zy,i,n,r,l),h&&(g.anchor=h.source.substring(1));break;default:{const S=n.type==="error"?n.message:`Unsupported token (type: ${n.type})`;l(n,"UNEXPECTED_TOKEN",S),g=ou(i,n.offset,void 0,null,r,l),N=!1}}return h&&g.anchor===""&&l(h,"BAD_ALIAS","Anchor cannot be an empty string"),o&&i.options.stringKeys&&(!ve(g)||typeof g.value!="string"||g.tag&&g.tag!=="tag:yaml.org,2002:str")&&l(p??n,"NON_STRING_KEY","With stringKeys, all keys must be strings"),u&&(g.spaceBefore=!0),f&&(n.type==="scalar"&&n.source===""?g.comment=f:g.commentBefore=f),i.options.keepSourceTokens&&N&&(g.srcToken=n),g}function ou(i,n,r,l,{spaceBefore:o,comment:u,anchor:f,tag:h,end:p},g){const N={type:"scalar",offset:Xy(n,r,l),indent:-1,source:""},S=Kh(i,N,h,g);return f&&(S.anchor=f.source.substring(1),S.anchor===""&&g(f,"BAD_ALIAS","Anchor cannot be an empty string")),o&&(S.spaceBefore=!0),u&&(S.comment=u,S.range[2]=p),S}function e0({options:i},{offset:n,source:r,end:l},o){const u=new gl(r.substring(1));u.source===""&&o(n,"BAD_ALIAS","Alias cannot be an empty string"),u.source.endsWith(":")&&o(n+r.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const f=n+r.length,h=js(l,f,i.strict,o);return u.range=[n,f,h.offset],h.comment&&(u.comment=h.comment),u}function t0(i,n,{offset:r,start:l,value:o,end:u},f){const h=Object.assign({_directives:n},i),p=new Dr(void 0,h),g={atKey:!1,atRoot:!0,directives:p.directives,options:p.options,schema:p.schema},N=Or(l,{indicator:"doc-start",next:o??(u==null?void 0:u[0]),offset:r,onError:f,parentIndent:0,startOnNewline:!0});N.found&&(p.directives.docStart=!0,o&&(o.type==="block-map"||o.type==="block-seq")&&!N.hasNewline&&f(N.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),p.contents=o?Wh(g,o,N,f):ou(g,N.end,l,null,N,f);const S=p.contents.range[2],T=js(u,S,!1,f);return T.comment&&(p.comment=T.comment),p.range=[r,S,T.offset],p}function Ts(i){if(typeof i=="number")return[i,i+1];if(Array.isArray(i))return i.length===2?i:[i[0],i[1]];const{offset:n,source:r}=i;return[n,n+(typeof r=="string"?r.length:1)]}function Id(i){var o;let n="",r=!1,l=!1;for(let u=0;u<i.length;++u){const f=i[u];switch(f[0]){case"#":n+=(n===""?"":l?`
|
||||
|
||||
`:`
|
||||
`)+(f.substring(1)||" "),r=!0,l=!1;break;case"%":((o=i[u+1])==null?void 0:o[0])!=="#"&&(u+=1),r=!1;break;default:r||(l=!0),r=!1}}return{comment:n,afterEmptyLine:l}}class au{constructor(n={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(r,l,o,u)=>{const f=Ts(r);u?this.warnings.push(new Bh(f,l,o)):this.errors.push(new Fn(f,l,o))},this.directives=new nt({version:n.version||"1.2"}),this.options=n}decorate(n,r){const{comment:l,afterEmptyLine:o}=Id(this.prelude);if(l){const u=n.contents;if(r)n.comment=n.comment?`${n.comment}
|
||||
${l}`:l;else if(o||n.directives.docStart||!u)n.commentBefore=l;else if($e(u)&&!u.flow&&u.items.length>0){let f=u.items[0];_e(f)&&(f=f.key);const h=f.commentBefore;f.commentBefore=h?`${l}
|
||||
${h}`:l}else{const f=u.commentBefore;u.commentBefore=f?`${l}
|
||||
${f}`:l}}r?(Array.prototype.push.apply(n.errors,this.errors),Array.prototype.push.apply(n.warnings,this.warnings)):(n.errors=this.errors,n.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Id(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(n,r=!1,l=-1){for(const o of n)yield*this.next(o);yield*this.end(r,l)}*next(n){switch(n.type){case"directive":this.directives.add(n.source,(r,l,o)=>{const u=Ts(n);u[0]+=r,this.onError(u,"BAD_DIRECTIVE",l,o)}),this.prelude.push(n.source),this.atDirectives=!0;break;case"document":{const r=t0(this.options,this.directives,n,this.onError);this.atDirectives&&!r.directives.docStart&&this.onError(n,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(r,!1),this.doc&&(yield this.doc),this.doc=r,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(n.source);break;case"error":{const r=n.source?`${n.message}: ${JSON.stringify(n.source)}`:n.message,l=new Fn(Ts(n),"UNEXPECTED_TOKEN",r);this.atDirectives||!this.doc?this.errors.push(l):this.doc.errors.push(l);break}case"doc-end":{if(!this.doc){const l="Unexpected doc-end without preceding document";this.errors.push(new Fn(Ts(n),"UNEXPECTED_TOKEN",l));break}this.doc.directives.docEnd=!0;const r=js(n.end,n.offset+n.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),r.comment){const l=this.doc.comment;this.doc.comment=l?`${l}
|
||||
${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.push(new Fn(Ts(n),"UNEXPECTED_TOKEN",`Unsupported token ${n.type}`))}}*end(n=!1,r=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(n){const l=Object.assign({_directives:this.directives},this.options),o=new Dr(void 0,l);this.atDirectives&&this.onError(r,"MISSING_CHAR","Missing directives-end indicator line"),o.range=[0,r,r],this.decorate(o,!1),yield o}}}function n0(i,n=!0,r){if(i){const l=(o,u,f)=>{const h=typeof o=="number"?o:Array.isArray(o)?o[0]:o.offset;if(r)r(h,u,f);else throw new Fn([h,h+1],u,f)};switch(i.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return Uh(i,n,l);case"block-scalar":return Fh({options:{strict:n}},i,l)}}return null}function r0(i,n){const{implicitKey:r=!1,indent:l,inFlow:o=!1,offset:u=-1,type:f="PLAIN"}=n,h=As({type:f,value:i},{implicitKey:r,indent:l>0?" ".repeat(l):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}}),p=n.end??[{type:"newline",offset:-1,indent:l,source:`
|
||||
`}];switch(h[0]){case"|":case">":{const g=h.indexOf(`
|
||||
`),N=h.substring(0,g),S=h.substring(g+1)+`
|
||||
`,T=[{type:"block-scalar-header",offset:u,indent:l,source:N}];return qh(T,p)||T.push({type:"newline",offset:-1,indent:l,source:`
|
||||
`}),{type:"block-scalar",offset:u,indent:l,props:T,source:S}}case'"':return{type:"double-quoted-scalar",offset:u,indent:l,source:h,end:p};case"'":return{type:"single-quoted-scalar",offset:u,indent:l,source:h,end:p};default:return{type:"scalar",offset:u,indent:l,source:h,end:p}}}function s0(i,n,r={}){let{afterKey:l=!1,implicitKey:o=!1,inFlow:u=!1,type:f}=r,h="indent"in i?i.indent:null;if(l&&typeof h=="number"&&(h+=2),!f)switch(i.type){case"single-quoted-scalar":f="QUOTE_SINGLE";break;case"double-quoted-scalar":f="QUOTE_DOUBLE";break;case"block-scalar":{const g=i.props[0];if(g.type!=="block-scalar-header")throw new Error("Invalid block scalar header");f=g.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:f="PLAIN"}const p=As({type:f,value:n},{implicitKey:o||h===null,indent:h!==null&&h>0?" ".repeat(h):"",inFlow:u,options:{blockQuote:!0,lineWidth:-1}});switch(p[0]){case"|":case">":i0(i,p);break;case'"':Ma(i,p,"double-quoted-scalar");break;case"'":Ma(i,p,"single-quoted-scalar");break;default:Ma(i,p,"scalar")}}function i0(i,n){const r=n.indexOf(`
|
||||
`),l=n.substring(0,r),o=n.substring(r+1)+`
|
||||
`;if(i.type==="block-scalar"){const u=i.props[0];if(u.type!=="block-scalar-header")throw new Error("Invalid block scalar header");u.source=l,i.source=o}else{const{offset:u}=i,f="indent"in i?i.indent:-1,h=[{type:"block-scalar-header",offset:u,indent:f,source:l}];qh(h,"end"in i?i.end:void 0)||h.push({type:"newline",offset:-1,indent:f,source:`
|
||||
`});for(const p of Object.keys(i))p!=="type"&&p!=="offset"&&delete i[p];Object.assign(i,{type:"block-scalar",indent:f,props:h,source:o})}}function qh(i,n){if(n)for(const r of n)switch(r.type){case"space":case"comment":i.push(r);break;case"newline":return i.push(r),!0}return!1}function Ma(i,n,r){switch(i.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":i.type=r,i.source=n;break;case"block-scalar":{const l=i.props.slice(1);let o=n.length;i.props[0].type==="block-scalar-header"&&(o-=i.props[0].source.length);for(const u of l)u.offset+=o;delete i.props,Object.assign(i,{type:r,source:n,end:l});break}case"block-map":case"block-seq":{const o={type:"newline",offset:i.offset+n.length,indent:i.indent,source:`
|
||||
`};delete i.items,Object.assign(i,{type:r,source:n,end:[o]});break}default:{const l="indent"in i?i.indent:-1,o="end"in i&&Array.isArray(i.end)?i.end.filter(u=>u.type==="space"||u.type==="comment"||u.type==="newline"):[];for(const u of Object.keys(i))u!=="type"&&u!=="offset"&&delete i[u];Object.assign(i,{type:r,indent:l,source:n,end:o})}}}const l0=i=>"type"in i?fl(i):il(i);function fl(i){switch(i.type){case"block-scalar":{let n="";for(const r of i.props)n+=fl(r);return n+i.source}case"block-map":case"block-seq":{let n="";for(const r of i.items)n+=il(r);return n}case"flow-collection":{let n=i.start.source;for(const r of i.items)n+=il(r);for(const r of i.end)n+=r.source;return n}case"document":{let n=il(i);if(i.end)for(const r of i.end)n+=r.source;return n}default:{let n=i.source;if("end"in i&&i.end)for(const r of i.end)n+=r.source;return n}}}function il({start:i,key:n,sep:r,value:l}){let o="";for(const u of i)o+=u.source;if(n&&(o+=fl(n)),r)for(const u of r)o+=u.source;return l&&(o+=fl(l)),o}const qa=Symbol("break visit"),o0=Symbol("skip children"),Hh=Symbol("remove item");function Kn(i,n){"type"in i&&i.type==="document"&&(i={start:i.start,value:i.value}),Qh(Object.freeze([]),i,n)}Kn.BREAK=qa;Kn.SKIP=o0;Kn.REMOVE=Hh;Kn.itemAtPath=(i,n)=>{let r=i;for(const[l,o]of n){const u=r==null?void 0:r[l];if(u&&"items"in u)r=u.items[o];else return}return r};Kn.parentCollection=(i,n)=>{const r=Kn.itemAtPath(i,n.slice(0,-1)),l=n[n.length-1][0],o=r==null?void 0:r[l];if(o&&"items"in o)return o;throw new Error("Parent collection not found")};function Qh(i,n,r){let l=r(n,i);if(typeof l=="symbol")return l;for(const o of["key","value"]){const u=n[o];if(u&&"items"in u){for(let f=0;f<u.items.length;++f){const h=Qh(Object.freeze(i.concat([[o,f]])),u.items[f],r);if(typeof h=="number")f=h-1;else{if(h===qa)return qa;h===Hh&&(u.items.splice(f,1),f-=1)}}typeof l=="function"&&o==="key"&&(l=l(n,i))}}return typeof l=="function"?l(n,i):l}const Cl="\uFEFF",_l="",Ll="",$s="",a0=i=>!!i&&"items"in i,u0=i=>!!i&&(i.type==="scalar"||i.type==="single-quoted-scalar"||i.type==="double-quoted-scalar"||i.type==="block-scalar");function c0(i){switch(i){case Cl:return"<BOM>";case _l:return"<DOC>";case Ll:return"<FLOW_END>";case $s:return"<SCALAR>";default:return JSON.stringify(i)}}function Jh(i){switch(i){case Cl:return"byte-order-mark";case _l:return"doc-mode";case Ll:return"flow-error-end";case $s: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(i[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 f0=Object.freeze(Object.defineProperty({__proto__:null,BOM:Cl,DOCUMENT:_l,FLOW_END:Ll,SCALAR:$s,createScalarToken:r0,isCollection:a0,isScalar:u0,prettyToken:c0,resolveAsScalar:n0,setScalarValue:s0,stringify:l0,tokenType:Jh,visit:Kn},Symbol.toStringTag,{value:"Module"}));function Mt(i){switch(i){case void 0:case" ":case`
|
||||
`:case"\r":case" ":return!0;default:return!1}}const Ad=new Set("0123456789ABCDEFabcdef"),d0=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Ji=new Set(",[]{}"),h0=new Set(` ,[]{}
|
||||
\r `),Ra=i=>!i||h0.has(i);class Yh{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(n,r=!1){if(n){if(typeof n!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+n:n,this.lineEndPos=null}this.atEnd=!r;let l=this.next??"stream";for(;l&&(r||this.hasChars(1));)l=yield*this.parseNext(l)}atLineEnd(){let n=this.pos,r=this.buffer[n];for(;r===" "||r===" ";)r=this.buffer[++n];return!r||r==="#"||r===`
|
||||
`?!0:r==="\r"?this.buffer[n+1]===`
|
||||
`:!1}charAt(n){return this.buffer[this.pos+n]}continueScalar(n){let r=this.buffer[n];if(this.indentNext>0){let l=0;for(;r===" ";)r=this.buffer[++l+n];if(r==="\r"){const o=this.buffer[l+n+1];if(o===`
|
||||
`||!o&&!this.atEnd)return n+l+1}return r===`
|
||||
`||l>=this.indentNext||!r&&!this.atEnd?n+l:-1}if(r==="-"||r==="."){const l=this.buffer.substr(n,3);if((l==="---"||l==="...")&&Mt(this.buffer[n+3]))return-1}return n}getLine(){let n=this.lineEndPos;return(typeof n!="number"||n!==-1&&n<this.pos)&&(n=this.buffer.indexOf(`
|
||||
`,this.pos),this.lineEndPos=n),n===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[n-1]==="\r"&&(n-=1),this.buffer.substring(this.pos,n))}hasChars(n){return this.pos+n<=this.buffer.length}setNext(n){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=n,null}peek(n){return this.buffer.substr(this.pos,n)}*parseNext(n){switch(n){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 n=this.getLine();if(n===null)return this.setNext("stream");if(n[0]===Cl&&(yield*this.pushCount(1),n=n.substring(1)),n[0]==="%"){let r=n.length,l=n.indexOf("#");for(;l!==-1;){const u=n[l-1];if(u===" "||u===" "){r=l-1;break}else l=n.indexOf("#",l+1)}for(;;){const u=n[r-1];if(u===" "||u===" ")r-=1;else break}const o=(yield*this.pushCount(r))+(yield*this.pushSpaces(!0));return yield*this.pushCount(n.length-o),this.pushNewline(),"stream"}if(this.atLineEnd()){const r=yield*this.pushSpaces(!0);return yield*this.pushCount(n.length-r),yield*this.pushNewline(),"stream"}return yield _l,yield*this.parseLineStart()}*parseLineStart(){const n=this.charAt(0);if(!n&&!this.atEnd)return this.setNext("line-start");if(n==="-"||n==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const r=this.peek(3);if((r==="---"||r==="...")&&Mt(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,r==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Mt(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[n,r]=this.peek(2);if(!r&&!this.atEnd)return this.setNext("block-start");if((n==="-"||n==="?"||n===":")&&Mt(r)){const l=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=l,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const n=this.getLine();if(n===null)return this.setNext("doc");let r=yield*this.pushIndicators();switch(n[r]){case"#":yield*this.pushCount(n.length-r);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(Ra),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return r+=yield*this.parseBlockScalarHeader(),r+=yield*this.pushSpaces(!0),yield*this.pushCount(n.length-r),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let n,r,l=-1;do n=yield*this.pushNewline(),n>0?(r=yield*this.pushSpaces(!1),this.indentValue=l=r):r=0,r+=yield*this.pushSpaces(!0);while(n+r>0);const o=this.getLine();if(o===null)return this.setNext("flow");if((l!==-1&&l<this.indentNext&&o[0]!=="#"||l===0&&(o.startsWith("---")||o.startsWith("..."))&&Mt(o[3]))&&!(l===this.indentNext-1&&this.flowLevel===1&&(o[0]==="]"||o[0]==="}")))return this.flowLevel=0,yield Ll,yield*this.parseLineStart();let u=0;for(;o[u]===",";)u+=yield*this.pushCount(1),u+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(u+=yield*this.pushIndicators(),o[u]){case void 0:return"flow";case"#":return yield*this.pushCount(o.length-u),"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(Ra),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const f=this.charAt(1);if(this.flowKey||Mt(f)||f===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const n=this.charAt(0);let r=this.buffer.indexOf(n,this.pos+1);if(n==="'")for(;r!==-1&&this.buffer[r+1]==="'";)r=this.buffer.indexOf("'",r+2);else for(;r!==-1;){let u=0;for(;this.buffer[r-1-u]==="\\";)u+=1;if(u%2===0)break;r=this.buffer.indexOf('"',r+1)}const l=this.buffer.substring(0,r);let o=l.indexOf(`
|
||||
`,this.pos);if(o!==-1){for(;o!==-1;){const u=this.continueScalar(o+1);if(u===-1)break;o=l.indexOf(`
|
||||
`,u)}o!==-1&&(r=o-(l[o-1]==="\r"?2:1))}if(r===-1){if(!this.atEnd)return this.setNext("quoted-scalar");r=this.buffer.length}return yield*this.pushToIndex(r+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let n=this.pos;for(;;){const r=this.buffer[++n];if(r==="+")this.blockScalarKeep=!0;else if(r>"0"&&r<="9")this.blockScalarIndent=Number(r)-1;else if(r!=="-")break}return yield*this.pushUntil(r=>Mt(r)||r==="#")}*parseBlockScalar(){let n=this.pos-1,r=0,l;e:for(let u=this.pos;l=this.buffer[u];++u)switch(l){case" ":r+=1;break;case`
|
||||
`:n=u,r=0;break;case"\r":{const f=this.buffer[u+1];if(!f&&!this.atEnd)return this.setNext("block-scalar");if(f===`
|
||||
`)break}default:break e}if(!l&&!this.atEnd)return this.setNext("block-scalar");if(r>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=r:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const u=this.continueScalar(n+1);if(u===-1)break;n=this.buffer.indexOf(`
|
||||
`,u)}while(n!==-1);if(n===-1){if(!this.atEnd)return this.setNext("block-scalar");n=this.buffer.length}}let o=n+1;for(l=this.buffer[o];l===" ";)l=this.buffer[++o];if(l===" "){for(;l===" "||l===" "||l==="\r"||l===`
|
||||
`;)l=this.buffer[++o];n=o-1}else if(!this.blockScalarKeep)do{let u=n-1,f=this.buffer[u];f==="\r"&&(f=this.buffer[--u]);const h=u;for(;f===" ";)f=this.buffer[--u];if(f===`
|
||||
`&&u>=this.pos&&u+1+r>h)n=u;else break}while(!0);return yield $s,yield*this.pushToIndex(n+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const n=this.flowLevel>0;let r=this.pos-1,l=this.pos-1,o;for(;o=this.buffer[++l];)if(o===":"){const u=this.buffer[l+1];if(Mt(u)||n&&Ji.has(u))break;r=l}else if(Mt(o)){let u=this.buffer[l+1];if(o==="\r"&&(u===`
|
||||
`?(l+=1,o=`
|
||||
`,u=this.buffer[l+1]):r=l),u==="#"||n&&Ji.has(u))break;if(o===`
|
||||
`){const f=this.continueScalar(l+1);if(f===-1)break;l=Math.max(l,f-2)}}else{if(n&&Ji.has(o))break;r=l}return!o&&!this.atEnd?this.setNext("plain-scalar"):(yield $s,yield*this.pushToIndex(r+1,!0),n?"flow":"doc")}*pushCount(n){return n>0?(yield this.buffer.substr(this.pos,n),this.pos+=n,n):0}*pushToIndex(n,r){const l=this.buffer.slice(this.pos,n);return l?(yield l,this.pos+=l.length,l.length):(r&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Ra))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const n=this.flowLevel>0,r=this.charAt(1);if(Mt(r)||n&&Ji.has(r))return n?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 n=this.pos+2,r=this.buffer[n];for(;!Mt(r)&&r!==">";)r=this.buffer[++n];return yield*this.pushToIndex(r===">"?n+1:n,!1)}else{let n=this.pos+1,r=this.buffer[n];for(;r;)if(d0.has(r))r=this.buffer[++n];else if(r==="%"&&Ad.has(this.buffer[n+1])&&Ad.has(this.buffer[n+2]))r=this.buffer[n+=3];else break;return yield*this.pushToIndex(n,!1)}}*pushNewline(){const n=this.buffer[this.pos];return n===`
|
||||
`?yield*this.pushCount(1):n==="\r"&&this.charAt(1)===`
|
||||
`?yield*this.pushCount(2):0}*pushSpaces(n){let r=this.pos-1,l;do l=this.buffer[++r];while(l===" "||n&&l===" ");const o=r-this.pos;return o>0&&(yield this.buffer.substr(this.pos,o),this.pos=r),o}*pushUntil(n){let r=this.pos,l=this.buffer[r];for(;!n(l);)l=this.buffer[++r];return yield*this.pushToIndex(r,!1)}}class Gh{constructor(){this.lineStarts=[],this.addNewLine=n=>this.lineStarts.push(n),this.linePos=n=>{let r=0,l=this.lineStarts.length;for(;r<l;){const u=r+l>>1;this.lineStarts[u]<n?r=u+1:l=u}if(this.lineStarts[r]===n)return{line:r+1,col:1};if(r===0)return{line:0,col:n};const o=this.lineStarts[r-1];return{line:r,col:n-o+1}}}}function bn(i,n){for(let r=0;r<i.length;++r)if(i[r].type===n)return!0;return!1}function Pd(i){for(let n=0;n<i.length;++n)switch(i[n].type){case"space":case"comment":case"newline":break;default:return n}return-1}function Xh(i){switch(i==null?void 0:i.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Yi(i){switch(i.type){case"document":return i.start;case"block-map":{const n=i.items[i.items.length-1];return n.sep??n.start}case"block-seq":return i.items[i.items.length-1].start;default:return[]}}function wr(i){var r;if(i.length===0)return[];let n=i.length;e:for(;--n>=0;)switch(i[n].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((r=i[++n])==null?void 0:r.type)==="space";);return i.splice(n,i.length)}function jd(i){if(i.start.type==="flow-seq-start")for(const n of i.items)n.sep&&!n.value&&!bn(n.start,"explicit-key-ind")&&!bn(n.sep,"map-value-ind")&&(n.key&&(n.value=n.key),delete n.key,Xh(n.value)?n.value.end?Array.prototype.push.apply(n.value.end,n.sep):n.value.end=n.sep:Array.prototype.push.apply(n.start,n.sep),delete n.sep)}class uu{constructor(n){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new Yh,this.onNewLine=n}*parse(n,r=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const l of this.lexer.lex(n,r))yield*this.next(l);r||(yield*this.end())}*next(n){if(this.source=n,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=n.length;return}const r=Jh(n);if(r)if(r==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=r,yield*this.step(),r){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+n.length);break;case"space":this.atNewLine&&n[0]===" "&&(this.indent+=n.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=n.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=n.length}else{const l=`Not a YAML token: ${n}`;yield*this.pop({type:"error",offset:this.offset,message:l,source:n}),this.offset+=n.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 n=this.peek(1);if(this.type==="doc-end"&&(!n||n.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(!n)return yield*this.stream();switch(n.type){case"document":return yield*this.document(n);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(n);case"block-scalar":return yield*this.blockScalar(n);case"block-map":return yield*this.blockMap(n);case"block-seq":return yield*this.blockSequence(n);case"flow-collection":return yield*this.flowCollection(n);case"doc-end":return yield*this.documentEnd(n)}yield*this.pop()}peek(n){return this.stack[this.stack.length-n]}*pop(n){const r=n??this.stack.pop();if(!r)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield r;else{const l=this.peek(1);switch(r.type==="block-scalar"?r.indent="indent"in l?l.indent:0:r.type==="flow-collection"&&l.type==="document"&&(r.indent=0),r.type==="flow-collection"&&jd(r),l.type){case"document":l.value=r;break;case"block-scalar":l.props.push(r);break;case"block-map":{const o=l.items[l.items.length-1];if(o.value){l.items.push({start:[],key:r,sep:[]}),this.onKeyLine=!0;return}else if(o.sep)o.value=r;else{Object.assign(o,{key:r,sep:[]}),this.onKeyLine=!o.explicitKey;return}break}case"block-seq":{const o=l.items[l.items.length-1];o.value?l.items.push({start:[],value:r}):o.value=r;break}case"flow-collection":{const o=l.items[l.items.length-1];!o||o.value?l.items.push({start:[],key:r,sep:[]}):o.sep?o.value=r:Object.assign(o,{key:r,sep:[]});return}default:yield*this.pop(),yield*this.pop(r)}if((l.type==="document"||l.type==="block-map"||l.type==="block-seq")&&(r.type==="block-map"||r.type==="block-seq")){const o=r.items[r.items.length-1];o&&!o.sep&&!o.value&&o.start.length>0&&Pd(o.start)===-1&&(r.indent===0||o.start.every(u=>u.type!=="comment"|
Line truncated
|
||||
`)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
|
||||
`,r)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(n){var l;const r=n.items[n.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,r.value){const o="end"in r.value?r.value.end:void 0,u=Array.isArray(o)?o[o.length-1]:void 0;(u==null?void 0:u.type)==="comment"?o==null||o.push(this.sourceToken):n.items.push({start:[this.sourceToken]})}else r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)n.items.push({start:[this.sourceToken]});else if(r.sep)r.sep.push(this.sourceToken);else{if(this.atIndentedComment(r.start,n.indent)){const o=n.items[n.items.length-2],u=(l=o==null?void 0:o.value)==null?void 0:l.end;if(Array.isArray(u)){Array.prototype.push.apply(u,r.start),u.push(this.sourceToken),n.items.pop();return}}r.start.push(this.sourceToken)}return}if(this.indent>=n.indent){const o=!this.onKeyLine&&this.indent===n.indent,u=o&&(r.sep||r.explicitKey)&&this.type!=="seq-item-ind";let f=[];if(u&&r.sep&&!r.value){const h=[];for(let p=0;p<r.sep.length;++p){const g=r.sep[p];switch(g.type){case"newline":h.push(p);break;case"space":break;case"comment":g.indent>n.indent&&(h.length=0);break;default:h.length=0}}h.length>=2&&(f=r.sep.splice(h[1]))}switch(this.type){case"anchor":case"tag":u||r.value?(f.push(this.sourceToken),n.items.push({start:f}),this.onKeyLine=!0):r.sep?r.sep.push(this.sourceToken):r.start.push(this.sourceToken);return;case"explicit-key-ind":!r.sep&&!r.explicitKey?(r.start.push(this.sourceToken),r.explicitKey=!0):u||r.value?(f.push(this.sourceToken),n.items.push({start:f,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(r.explicitKey)if(r.sep)if(r.value)n.items.push({start:[],key:null,sep:[this.sourceToken]});else if(bn(r.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:f,key:null,sep:[this.sourceToken]}]});else if(Xh(r.key)&&!bn(r.sep,"newline")){const h=wr(r.start),p=r.key,g=r.sep;g.push(this.sourceToken),delete r.key,delete r.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:h,key:p,sep:g}]})}else f.length>0?r.sep=r.sep.concat(f,this.sourceToken):r.sep.push(this.sourceToken);else if(bn(r.start,"newline"))Object.assign(r,{key:null,sep:[this.sourceToken]});else{const h=wr(r.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:h,key:null,sep:[this.sourceToken]}]})}else r.sep?r.value||u?n.items.push({start:f,key:null,sep:[this.sourceToken]}):bn(r.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const h=this.flowScalar(this.type);u||r.value?(n.items.push({start:f,key:h,sep:[]}),this.onKeyLine=!0):r.sep?this.stack.push(h):(Object.assign(r,{key:h,sep:[]}),this.onKeyLine=!0);return}default:{const h=this.startBlockValue(n);if(h){o&&h.type!=="block-seq"&&n.items.push({start:f}),this.stack.push(h);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(n){var l;const r=n.items[n.items.length-1];switch(this.type){case"newline":if(r.value){const o="end"in r.value?r.value.end:void 0,u=Array.isArray(o)?o[o.length-1]:void 0;(u==null?void 0:u.type)==="comment"?o==null||o.push(this.sourceToken):n.items.push({start:[this.sourceToken]})}else r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)n.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(r.start,n.indent)){const o=n.items[n.items.length-2],u=(l=o==null?void 0:o.value)==null?void 0:l.end;if(Array.isArray(u)){Array.prototype.push.apply(u,r.start),u.push(this.sourceToken),n.items.pop();return}}r.start.push(this.sourceToken)}return;case"anchor":case"tag":if(r.value||this.indent<=n.indent)break;r.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==n.indent)break;r.value||bn(r.start,"seq-item-ind")?n.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return}if(this.indent>n.indent){const o=this.startBlockValue(n);if(o){this.stack.push(o);return}}yield*this.pop(),yield*this.step()}*flowCollection(n){const r=n.items[n.items.length-1];if(this.type==="flow-error-end"){let l;do yield*this.pop(),l=this.peek(1);while(l&&l.type==="flow-collection")}else if(n.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!r||r.sep?n.items.push({start:[this.sourceToken]}):r.start.push(this.sourceToken);return;case"map-value-ind":!r||r.value?n.items.push({start:[],key:null,sep:[this.sourceToken]}):r.sep?r.sep.push(this.sourceToken):Object.assign(r,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":c
Line truncated
|
||||
`)+1;for(;r!==0;)this.onNewLine(this.offset+r),r=this.source.indexOf(`
|
||||
`,r)+1}return{type:n,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(n){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 r=Yi(n),l=wr(r);return l.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:l,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const r=Yi(n),l=wr(r);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:l,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(n,r){return this.type!=="comment"||this.indent<=r?!1:n.every(l=>l.type==="newline"||l.type==="space")}*documentEnd(n){this.type!=="doc-mode"&&(n.end?n.end.push(this.sourceToken):n.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(n){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:n.end?n.end.push(this.sourceToken):n.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function Zh(i){const n=i.prettyErrors!==!1;return{lineCounter:i.lineCounter||n&&new Gh||null,prettyErrors:n}}function p0(i,n={}){const{lineCounter:r,prettyErrors:l}=Zh(n),o=new uu(r==null?void 0:r.addNewLine),u=new au(n),f=Array.from(u.compose(o.parse(i)));if(l&&r)for(const h of f)h.errors.forEach(cl(i,r)),h.warnings.forEach(cl(i,r));return f.length>0?f:Object.assign([],{empty:!0},u.streamInfo())}function ep(i,n={}){const{lineCounter:r,prettyErrors:l}=Zh(n),o=new uu(r==null?void 0:r.addNewLine),u=new au(n);let f=null;for(const h of u.compose(o.parse(i),!0,i.length))if(!f)f=h;else if(f.options.logLevel!=="silent"){f.errors.push(new Fn(h.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return l&&r&&(f.errors.forEach(cl(i,r)),f.warnings.forEach(cl(i,r))),f}function m0(i,n,r){let l;typeof n=="function"?l=n:r===void 0&&n&&typeof n=="object"&&(r=n);const o=ep(i,r);if(!o)return null;if(o.warnings.forEach(u=>Sh(o.options.logLevel,u)),o.errors.length>0){if(o.options.logLevel!=="silent")throw o.errors[0];o.errors=[]}return o.toJS(Object.assign({reviver:l},r))}function g0(i,n,r){let l=null;if(typeof n=="function"||Array.isArray(n)?l=n:r===void 0&&n&&(r=n),typeof r=="string"&&(r=r.length),typeof r=="number"){const o=Math.round(r);r=o<1?void 0:o>8?{indent:8}:{indent:o}}if(i===void 0){const{keepUndefined:o}=r??n??{};if(!o)return}return qn(i)&&!l?i.toString(r):new Dr(i,l,r).toString(r)}const y0=Object.freeze(Object.defineProperty({__proto__:null,Alias:gl,CST:f0,Composer:au,Document:Dr,Lexer:Yh,LineCounter:Gh,Pair:Ze,Parser:uu,Scalar:le,Schema:Tl,YAMLError:lu,YAMLMap:wt,YAMLParseError:Fn,YAMLSeq:xn,YAMLWarning:Bh,isAlias:Wn,isCollection:$e,isDocument:qn,isMap:Pr,isNode:Ie,isPair:_e,isScalar:ve,isSeq:jr,parse:m0,parseAllDocuments:p0,parseDocument:ep,stringify:g0,visit:En,visitAsync:ml},Symbol.toStringTag,{value:"Module"}));function v0(i,n,r={}){var T;const l=new i.LineCounter,o={keepSourceTokens:!0,lineCounter:l,...r},u=i.parseDocument(n,o),f=[],h=E=>[l.linePos(E[0]),l.linePos(E[1])],p=E=>{f.push({message:E.message,range:[l.linePos(E.pos[0]),l.linePos(E.pos[1])]})},g=(E,L)=>{for(const v of L.items){if(v instanceof i.Scalar&&typeof v.value=="string"){const P=dl.parse(v,o,f);P&&(E.children=E.children||[],E.children.push(P));continue}if(v instanceof i.YAMLMap){N(E,v);continue}f.push({message:"Sequence items should be strings or maps",range:h(v.range||L.range)})}},N=(E,L)=>{for(const v of L.items){if(E.children=E.children||[],!(v.key instanceof i.Scalar&&typeof v.key.value=="string")){f.push({message:"Only string keys are supported",range:h(v.key.range||L.range)});continue}const A=v.key,P=v.value;if(A.value==="text"){if(!(P instanceof i.Scalar&&typeof P.value=="string")){f.push({message:"Text value should be a string",range:h(v.value.range||L.range)});continue}E.children.push({kind:"text",text:Da(P.value)});continue}if(A.value==="/children"){if(!(P instanceof i.Scalar&&typeof P.value=="string")||P.value!=="contain"&&P.value!=="equal"&&P.value!=="deep-equal"){f.push({message:'Strict value should be "contain", "equal" or "deep-equal"',range:h(v.value.range||L.range)});continue}E.containerMode=P.value;continue}if(A.value.startsWith("/")){if(!(P instanceof i.Scalar&&typeof P.value=="string")){f.push({message:"Property value should be a string",range:h(v.value.range||L.range)});continue}E.props=E.
Line truncated
|
||||
|
||||
`+n.value+`
|
||||
`+" ".repeat(o.pos)+`^
|
||||
`;return l.push({message:u,range:[r.lineCounter.linePos(n.range[0]),r.lineCounter.linePos(n.range[0]+o.pos)]}),null}throw o}}constructor(n,r){this._input=n,this._pos=0,this._length=n.length,this._options=r}_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(n){this._eof()&&this._throwError(`Unexpected end of input when expecting ${n}`);const r=this._pos;for(;!this._eof()&&/[a-zA-Z]/.test(this._peek());)this._pos++;return this._input.slice(r,this._pos)}_readString(){let n="",r=!1;for(;!this._eof();){const l=this._next();if(r)n+=l,r=!1;else if(l==="\\")r=!0;else{if(l==='"')return n;n+=l}}this._throwError("Unterminated string")}_throwError(n,r=0){throw new Md(n,r||this._pos)}_readRegex(){let n="",r=!1,l=!1;for(;!this._eof();){const o=this._next();if(r)n+=o,r=!1;else if(o==="\\")r=!0,n+=o;else{if(o==="/"&&!l)return{pattern:n};o==="["?(l=!0,n+=o):o==="]"&&l?(n+=o,l=!1):n+=o}}this._throwError("Unterminated regex")}_readStringOrRegex(){const n=this._peek();return n==='"'?(this._next(),tp(this._readString())):n==="/"?(this._next(),this._readRegex()):null}_readAttributes(n){let r=this._pos;for(;this._skipWhitespace(),this._peek()==="[";){this._next(),this._skipWhitespace(),r=this._pos;const l=this._readIdentifier("attribute");this._skipWhitespace();let o="";if(this._peek()==="=")for(this._next(),this._skipWhitespace(),r=this._pos;this._peek()!=="]"&&!this._isWhitespace()&&!this._eof();)o+=this._next();this._skipWhitespace(),this._peek()!=="]"&&this._throwError("Expected ]"),this._next(),this._applyAttribute(n,l,o||"true",r)}}_parse(){this._skipWhitespace();const n=this._readIdentifier("role");this._skipWhitespace();const r=this._readStringOrRegex()||"",l={kind:"role",role:n,name:r};return this._readAttributes(l),this._skipWhitespace(),this._eof()||this._throwError("Unexpected input"),l}_applyAttribute(n,r,l,o){if(r==="checked"){this._assert(l==="true"||l==="false"||l==="mixed",'Value of "checked" attribute must be a boolean or "mixed"',o),n.checked=l==="true"?!0:l==="false"?!1:"mixed";return}if(r==="disabled"){this._assert(l==="true"||l==="false",'Value of "disabled" attribute must be a boolean',o),n.disabled=l==="true";return}if(r==="expanded"){this._assert(l==="true"||l==="false",'Value of "expanded" attribute must be a boolean',o),n.expanded=l==="true";return}if(r==="active"){this._assert(l==="true"||l==="false",'Value of "active" attribute must be a boolean',o),n.active=l==="true";return}if(r==="level"){this._assert(!isNaN(Number(l)),'Value of "level" attribute must be a number',o),n.level=Number(l);return}if(r==="pressed"){this._assert(l==="true"||l==="false"||l==="mixed",'Value of "pressed" attribute must be a boolean or "mixed"',o),n.pressed=l==="true"?!0:l==="false"?!1:"mixed";return}if(r==="selected"){this._assert(l==="true"||l==="false",'Value of "selected" attribute must be a boolean',o),n.selected=l==="true";return}this._assert(!1,`Unsupported attribute [${r}]`,o)}_assert(n,r,l){n||this._throwError(r||"Assertion error",l)}}class Md extends Error{constructor(n,r){super(n),this.pos=r}}const S0=({className:i,style:n,open:r,isModal:l,width:o,verticalOffset:u,requestClose:f,anchor:h,dataTestId:p,children:g})=>{const N=fe.useRef(null),[S,T]=fe.useState(0);let E=n;if(h!=null&&h.current){const L=h.current.getBoundingClientRect();E={position:"fixed",margin:0,top:L.bottom+(u??0),left:k0(L,o??0),width:o,zIndex:1,...n}}return fe.useEffect(()=>{const L=w=>{!N.current||!(w.target instanceof Node)||N.current.contains(w.target)||f==null||f()},v=w=>{w.key==="Escape"&&(f==null||f())};return r?(document.addEventListener("mousedown",L),document.addEventListener("keydown",v),()=>{document.removeEventListener("mousedown",L),document.removeEventListener("keydown",v)}):()=>{}},[r,f]),fe.useEffect(()=>{const L=()=>T(v=>v+1);return window.addEventListener("resize",L),()=>{window.removeEventListener("resize",L)}},[]),fe.useLayoutEffect(()=>{N.current&&(r?l?N.current.showModal():N.current.show():N.current.close())},[r,l]),K.jsx("dialog",{ref:N,style:E,className:i,"data-testid":p,children:g})},k0=(i,n)=>{const r=Rd(i,n,"left");if(r.inBounds)return r.value;const l=Rd(i,n,"right");return l.inBounds?l.value:r.value},Rd=(i,n,r)=>{const l=document.documentElement.clientWidth;if(r==="left"){const o=i.left;return{value:o,inBounds:o+n<=l}}else return{value:i.right-n,inBounds:i.right-n>=0}},E0=({sources:i,paused:n,log:r,mode:l})=>{const[o,u]=fe.useState(),[f,h]=ll("recorderPropertiesTab","log"),[p,g]=fe.useState(),[N,S]=fe.useState(),[T,E]=fe.useState(!1),[L,v]=ag(),[w,A]=ll("autoExpect",!1),P=fe.useRef(null);window.playwrightSelectSource=O=>u(O),fe.useEffect(()=>{window.dispatch({event:"setAutoExpect",params:{autoExpect:w}})},[w]);const M=fe.useMemo(()=>i.find(se=>se.id===o)??Ig(),[i,o]),[V,q]=fe.useState("");windo
Line truncated
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
<!--
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" translate="no">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="icon" href="/playwright-logo.svg" type="image/svg+xml">
|
||||
<title>Playwright Inspector</title>
|
||||
<script type="module" crossorigin src="/assets/index-D7C7daHH.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-CI4HQ-Zb.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
</body>
|
||||
</html>
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
<svg width="400" height="400" viewBox="0 0 400 400" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M136.444 221.556C123.558 225.213 115.104 231.625 109.535 238.032C114.869 233.364 122.014 229.08 131.652 226.348C141.51 223.554 149.92 223.574 156.869 224.915V219.481C150.941 218.939 144.145 219.371 136.444 221.556ZM108.946 175.876L61.0895 188.484C61.0895 188.484 61.9617 189.716 63.5767 191.36L104.153 180.668C104.153 180.668 103.578 188.077 98.5847 194.705C108.03 187.559 108.946 175.876 108.946 175.876ZM149.005 288.347C81.6582 306.486 46.0272 228.438 35.2396 187.928C30.2556 169.229 28.0799 155.067 27.5 145.928C27.4377 144.979 27.4665 144.179 27.5336 143.446C24.04 143.657 22.3674 145.473 22.7077 150.721C23.2876 159.855 25.4633 174.016 30.4473 192.721C41.2301 233.225 76.8659 311.273 144.213 293.134C158.872 289.185 169.885 281.992 178.152 272.81C170.532 279.692 160.995 285.112 149.005 288.347ZM161.661 128.11V132.903H188.077C187.535 131.206 186.989 129.677 186.447 128.11H161.661Z" fill="#2D4552"/>
|
||||
<path d="M193.981 167.584C205.861 170.958 212.144 179.287 215.465 186.658L228.711 190.42C228.711 190.42 226.904 164.623 203.57 157.995C181.741 151.793 168.308 170.124 166.674 172.496C173.024 167.972 182.297 164.268 193.981 167.584ZM299.422 186.777C277.573 180.547 264.145 198.916 262.535 201.255C268.89 196.736 278.158 193.031 289.837 196.362C301.698 199.741 307.976 208.06 311.307 215.436L324.572 219.212C324.572 219.212 322.736 193.41 299.422 186.777ZM286.262 254.795L176.072 223.99C176.072 223.99 177.265 230.038 181.842 237.869L274.617 263.805C282.255 259.386 286.262 254.795 286.262 254.795ZM209.867 321.102C122.618 297.71 133.166 186.543 147.284 133.865C153.097 112.156 159.073 96.0203 164.029 85.204C161.072 84.5953 158.623 86.1529 156.203 91.0746C150.941 101.747 144.212 119.124 137.7 143.45C123.586 196.127 113.038 307.29 200.283 330.682C241.406 341.699 273.442 324.955 297.323 298.659C274.655 319.19 245.714 330.701 209.867 321.102Z" fill="#2D4552"/>
|
||||
<path d="M161.661 262.296V239.863L99.3324 257.537C99.3324 257.537 103.938 230.777 136.444 221.556C146.302 218.762 154.713 218.781 161.661 220.123V128.11H192.869C189.471 117.61 186.184 109.526 183.423 103.909C178.856 94.612 174.174 100.775 163.545 109.665C156.059 115.919 137.139 129.261 108.668 136.933C80.1966 144.61 57.179 142.574 47.5752 140.911C33.9601 138.562 26.8387 135.572 27.5049 145.928C28.0847 155.062 30.2605 169.224 35.2445 187.928C46.0272 228.433 81.663 306.481 149.01 288.342C166.602 283.602 179.019 274.233 187.626 262.291H161.661V262.296ZM61.0848 188.484L108.946 175.876C108.946 175.876 107.551 194.288 89.6087 199.018C71.6614 203.743 61.0848 188.484 61.0848 188.484Z" fill="#E2574C"/>
|
||||
<path d="M341.786 129.174C329.345 131.355 299.498 134.072 262.612 124.185C225.716 114.304 201.236 97.0224 191.537 88.8994C177.788 77.3834 171.74 69.3802 165.788 81.4857C160.526 92.163 153.797 109.54 147.284 133.866C133.171 186.543 122.623 297.706 209.867 321.098C297.093 344.47 343.53 242.92 357.644 190.238C364.157 165.917 367.013 147.5 367.799 135.625C368.695 122.173 359.455 126.078 341.786 129.174ZM166.497 172.756C166.497 172.756 180.246 151.372 203.565 158C226.899 164.628 228.706 190.425 228.706 190.425L166.497 172.756ZM223.42 268.713C182.403 256.698 176.077 223.99 176.077 223.99L286.262 254.796C286.262 254.791 264.021 280.578 223.42 268.713ZM262.377 201.495C262.377 201.495 276.107 180.126 299.422 186.773C322.736 193.411 324.572 219.208 324.572 219.208L262.377 201.495Z" fill="#2EAD33"/>
|
||||
<path d="M139.88 246.04L99.3324 257.532C99.3324 257.532 103.737 232.44 133.607 222.496L110.647 136.33L108.663 136.933C80.1918 144.611 57.1742 142.574 47.5704 140.911C33.9554 138.563 26.834 135.572 27.5001 145.929C28.08 155.063 30.2557 169.224 35.2397 187.929C46.0225 228.433 81.6583 306.481 149.005 288.342L150.989 287.719L139.88 246.04ZM61.0848 188.485L108.946 175.876C108.946 175.876 107.551 194.288 89.6087 199.018C71.6615 203.743 61.0848 188.485 61.0848 188.485Z" fill="#D65348"/>
|
||||
<path d="M225.27 269.163L223.415 268.712C182.398 256.698 176.072 223.99 176.072 223.99L232.89 239.872L262.971 124.281L262.607 124.185C225.711 114.304 201.232 97.0224 191.532 88.8994C177.783 77.3834 171.735 69.3802 165.783 81.4857C160.526 92.163 153.797 109.54 147.284 133.866C133.171 186.543 122.623 297.706 209.867 321.097L211.655 321.5L225.27 269.163ZM166.497 172.756C166.497 172.756 180.246 151.372 203.565 158C226.899 164.628 228.706 190.425 228.706 190.425L166.497 172.756Z" fill="#1D8D22"/>
|
||||
<path d="M141.946 245.451L131.072 248.537C133.641 263.019 138.169 276.917 145.276 289.195C146.513 288.922 147.74 288.687 149 288.342C152.302 287.451 155.364 286.348 158.312 285.145C150.371 273.361 145.118 259.789 141.946 245.451ZM137.7 143.451C132.112 164.307 127.113 194.326 128.489 224.436C130.952 223.367 133.554 222.371 136.444 221.551L138.457 221.101C136.003 188.939 141.308 156.165 147.284 133.866C148.799 128.225 150.318 122.978 151.832 118.085C149.393 119.637 146.767 121.228 143.776 122.867C141.759 129.093 139.722 135.898 137.7 143.451Z" fill="#C04B41"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.9 KiB |
Generated
Vendored
+24
@@ -0,0 +1,24 @@
|
||||
import{n as Wu}from"./defaultSettingsView-Do_wwdKw.js";var vi={exports:{}},_u=vi.exports,ha;function It(){return ha||(ha=1,function(Et,zt){(function(C,De){Et.exports=De()})(_u,function(){var C=navigator.userAgent,De=navigator.platform,I=/gecko\/\d/i.test(C),K=/MSIE \d/.test(C),$=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(C),V=/Edge\/(\d+)/.exec(C),b=K||$||V,N=b&&(K?document.documentMode||6:+(V||$)[1]),_=!V&&/WebKit\//.test(C),ie=_&&/Qt\/\d+\.\d+/.test(C),O=!V&&/Chrome\/(\d+)/.exec(C),q=O&&+O[1],z=/Opera\//.test(C),X=/Apple Computer/.test(navigator.vendor),ke=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(C),we=/PhantomJS/.test(C),te=X&&(/Mobile\/\w+/.test(C)||navigator.maxTouchPoints>2),re=/Android/.test(C),ne=te||re||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(C),se=te||/Mac/.test(De),Ae=/\bCrOS\b/.test(C),ye=/win/i.test(De),de=z&&C.match(/Version\/(\d*\.\d*)/);de&&(de=Number(de[1])),de&&de>=15&&(z=!1,_=!0);var ze=se&&(ie||z&&(de==null||de<12.11)),fe=I||b&&N>=9;function H(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var Ee=function(e,t){var n=e.className,r=H(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function D(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function J(e,t){return D(e).appendChild(t)}function d(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),typeof t=="string")i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function S(e,t,n,r){var i=d(e,t,n,r);return i.setAttribute("role","presentation"),i}var w;document.createRange?w=function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:w=function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch{return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};function m(e,t){if(t.nodeType==3&&(t=t.parentNode),e.contains)return e.contains(t);do if(t.nodeType==11&&(t=t.host),t==e)return!0;while(t=t.parentNode)}function y(e){var t=e.ownerDocument||e,n;try{n=e.activeElement}catch{n=t.body||null}for(;n&&n.shadowRoot&&n.shadowRoot.activeElement;)n=n.shadowRoot.activeElement;return n}function P(e,t){var n=e.className;H(t).test(n)||(e.className+=(n?" ":"")+t)}function le(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!H(n[r]).test(t)&&(t+=" "+n[r]);return t}var p=function(e){e.select()};te?p=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:b&&(p=function(e){try{e.select()}catch{}});function c(e){return e.display.wrapper.ownerDocument}function Y(e){return xe(e.display.wrapper)}function xe(e){return e.getRootNode?e.getRootNode():e.ownerDocument}function j(e){return c(e).defaultView}function ue(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function Te(e,t,n){t||(t={});for(var r in e)e.hasOwnProperty(r)&&(n!==!1||!t.hasOwnProperty(r))&&(t[r]=e[r]);return t}function Le(e,t,n,r,i){t==null&&(t=e.search(/[^\s\u00a0]/),t==-1&&(t=e.length));for(var o=r||0,l=i||0;;){var a=e.indexOf(" ",o);if(a<0||a>=t)return l+(t-o);l+=a-o,l+=n-l%n,o=a+1}}var be=function(){this.id=null,this.f=null,this.time=0,this.handler=ue(this.onTimeout,this)};be.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},be.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};function oe(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}var Ne=50,qe={toString:function(){return"CodeMirror.Pass"}},Ve={scroll:!1},ct={origin:"*mouse"},Oe={origin:"+move"};function Re(e,t,n){for(var r=0,i=0;;){var o=e.indexOf(" ",r);o==-1&&(o=e.length);var l=o-r;if(o==e.length||i+l>=t)return r+Math.min(l,t-i);if(i+=o-r,i+=n-i%n,r=o+1,i>=t)return r}}var Ue=[""];function et(e){for(;Ue.length<=e;)Ue.push(ge(Ue)+" ");return Ue[e]}function ge(e){return e[e.length-1]}function Pe(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function T(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}function B(){}function F(e,t){var n;return Object.create?n=Object.create(e):(B.prototype=e,n=new B),t&&Te(t,n),n}var Ie=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ae(e){return/\w/.test(e)||e>""&&(e.toUpperCase()!=e.toLowerCase()||Ie.test(e))}function Se(e,t){return t?t.source.indexOf("\\w")>-1&&ae(e)?!0:t.test(e):ae(e)}function he(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var Be=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4Line truncated
|
||||
|
||||
b`.split(/\n/).length!=3?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf(`
|
||||
`,t);i==-1&&(i=e.length);var o=e.slice(t,e.charAt(i-1)=="\r"?i-1:i),l=o.indexOf("\r");l!=-1?(n.push(o.slice(0,l)),t+=l+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},ur=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch{return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch{}return!t||t.parentElement()!=e?!1:t.compareEndPoints("StartToEnd",t)!=0},_n=function(){var e=d("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),_t=null;function xi(e){if(_t!=null)return _t;var t=J(e,d("span","x")),n=t.getBoundingClientRect(),r=w(t,0,1).getBoundingClientRect();return _t=Math.abs(n.left-r.left)>1}var Pr={},Ht={};function Rt(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Pr[e]=t}function kr(e,t){Ht[e]=t}function Ir(e){if(typeof e=="string"&&Ht.hasOwnProperty(e))e=Ht[e];else if(e&&typeof e.name=="string"&&Ht.hasOwnProperty(e.name)){var t=Ht[e.name];typeof t=="string"&&(t={name:t}),e=F(t,e),e.name=t.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ir("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ir("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function zr(e,t){t=Ir(t);var n=Pr[t.name];if(!n)return zr(e,"text/plain");var r=n(e,t);if(fr.hasOwnProperty(t.name)){var i=fr[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)r[l]=t.modeProps[l];return r}var fr={};function Br(e,t){var n=fr.hasOwnProperty(e)?fr[e]:fr[e]={};Te(t,n)}function Gt(e,t){if(t===!0)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function sn(e,t){for(var n;e.innerMode&&(n=e.innerMode(t),!(!n||n.mode==e));)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Wr(e,t,n){return e.startState?e.startState(t,n):!0}var Je=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};Je.prototype.eol=function(){return this.pos>=this.string.length},Je.prototype.sol=function(){return this.pos==this.lineStart},Je.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Je.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Je.prototype.eat=function(e){var t=this.string.charAt(this.pos),n;if(typeof e=="string"?n=t==e:n=t&&(e.test?e.test(t):e(t)),n)return++this.pos,t},Je.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Je.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Je.prototype.skipToEnd=function(){this.pos=this.string.length},Je.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Je.prototype.backUp=function(e){this.pos-=e},Je.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Le(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Le(this.string,this.lineStart,this.tabSize):0)},Je.prototype.indentation=function(){return Le(this.string,null,this.tabSize)-(this.lineStart?Le(this.string,this.lineStart,this.tabSize):0)},Je.prototype.match=function(e,t,n){if(typeof e=="string"){var r=function(l){return n?l.toLowerCase():l},i=this.string.substr(this.pos,e.length);if(r(i)==r(e))return t!==!1&&(this.pos+=e.length),!0}else{var o=this.string.slice(this.pos).match(e);return o&&o.index>0?null:(o&&t!==!1&&(this.pos+=o[0].length),o)}},Je.prototype.current=function(){return this.string.slice(this.start,this.pos)},Je.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Je.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Je.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function ce(e,t){if(t-=e.first,t<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t<o){n=i;break}t-=o}return n.lines[t]}function Vt(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,function(o){var l=o.text;i==n.line&&(l=l.slice(0,n.ch)),i==t.line&&(l=l.slice(t.ch)),r.push(l),++i}),r}function un(e,t,n){var r=[];return e.iter(t,n,function(i){r.push(i.text)}),r}function Ft(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function f(e){if(e.parent==null)return null;for(var t=e.parent,n=oe(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function g(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e
Line truncated
|
||||
`?(E=h.appendChild(d("span",k[0]=="\r"?"␍":"","cm-invalidchar")),E.setAttribute("cm-text",k[0]),e.col+=1):(E=e.cm.options.specialCharPlaceholder(k[0]),E.setAttribute("cm-text",k[0]),b&&N<9?h.appendChild(d("span",[E])):h.appendChild(E),e.col+=1);e.map.push(e.pos,e.pos+1,E),e.pos++}}if(e.trailingSpace=a.charCodeAt(t.length-1)==32,n||r||i||u||o||l){var Q=n||"";r&&(Q+=r),i&&(Q+=i);var G=d("span",[h],Q,o);if(l)for(var ee in l)l.hasOwnProperty(ee)&&ee!="style"&&ee!="class"&&G.setAttribute(ee,l[ee]);return e.content.appendChild(G)}e.content.appendChild(h)}}function is(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var o=e.charAt(i);o==" "&&n&&(i==e.length-1||e.charCodeAt(i+1)==32)&&(o=" "),r+=o,n=o==" "}return r}function os(e,t){return function(n,r,i,o,l,a,s){i=i?i+" cm-force-border":"cm-force-border";for(var u=n.pos,h=u+r.length;;){for(var v=void 0,k=0;k<t.length&&(v=t[k],!(v.to>u&&v.from<=u));k++);if(v.to>=h)return e(n,r,i,o,l,a,s);e(n,r.slice(0,v.to-u),i,o,null,a,s),o=null,r=r.slice(v.to-u),u=v.to}}}function Oo(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function ls(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(!r){for(var l=1;l<n.length;l+=2)t.addToken(t,i.slice(o,o=n[l]),Eo(n[l+1],t.cm.options));return}for(var a=i.length,s=0,u=1,h="",v,k,x=0,M,E,R,U,Q;;){if(x==s){M=E=R=k="",Q=null,U=null,x=1/0;for(var G=[],ee=void 0,me=0;me<r.length;++me){var pe=r[me],Fe=pe.marker;if(Fe.type=="bookmark"&&pe.from==s&&Fe.widgetNode)G.push(Fe);else if(pe.from<=s&&(pe.to==null||pe.to>s||Fe.collapsed&&pe.to==s&&pe.from==s)){if(pe.to!=null&&pe.to!=s&&x>pe.to&&(x=pe.to,E=""),Fe.className&&(M+=" "+Fe.className),Fe.css&&(k=(k?k+";":"")+Fe.css),Fe.startStyle&&pe.from==s&&(R+=" "+Fe.startStyle),Fe.endStyle&&pe.to==x&&(ee||(ee=[])).push(Fe.endStyle,pe.to),Fe.title&&((Q||(Q={})).title=Fe.title),Fe.attributes)for(var Ke in Fe.attributes)(Q||(Q={}))[Ke]=Fe.attributes[Ke];Fe.collapsed&&(!U||Si(U.marker,Fe)<0)&&(U=pe)}else pe.from>s&&x>pe.from&&(x=pe.from)}if(ee)for(var st=0;st<ee.length;st+=2)ee[st+1]==x&&(E+=" "+ee[st]);if(!U||U.from==s)for(var Xe=0;Xe<G.length;++Xe)Oo(t,0,G[Xe]);if(U&&(U.from||0)==s){if(Oo(t,(U.to==null?a+1:U.to)-s,U.marker,U.from==null),U.to==null)return;U.to==s&&(U=!1)}}if(s>=a)break;for(var Mt=Math.min(a,x);;){if(h){var wt=s+h.length;if(!U){var tt=wt>Mt?h.slice(0,Mt-s):h;t.addToken(t,tt,v?v+M:M,R,s+tt.length==x?E:"",k,Q)}if(wt>=Mt){h=h.slice(Mt-s),s=Mt;break}s=wt,R=""}h=i.slice(o,o=n[u++]),v=Eo(n[u++],t.cm.options)}}}function Po(e,t,n){this.line=t,this.rest=Qa(t),this.size=this.rest?f(ge(this.rest))-n+1:1,this.node=this.text=null,this.hidden=cr(e,t)}function Gn(e,t,n){for(var r=[],i,o=t;o<n;o=i){var l=new Po(e.doc,ce(e.doc,o),o);i=o+l.size,r.push(l)}return r}var Rr=null;function as(e){Rr?Rr.ops.push(e):e.ownsGroup=Rr={ops:[e],delayedCallbacks:[]}}function ss(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}function us(e,t){var n=e.ownsGroup;if(n)try{ss(n)}finally{Rr=null,t(n)}}var dn=null;function ot(e,t){var n=Qt(e,t);if(n.length){var r=Array.prototype.slice.call(arguments,2),i;Rr?i=Rr.delayedCallbacks:dn?i=dn:(i=dn=[],setTimeout(fs,0));for(var o=function(a){i.push(function(){return n[a].apply(null,r)})},l=0;l<n.length;++l)o(l)}}function fs(){var e=dn;dn=null;for(var t=0;t<e.length;++t)e[t]()}function Io(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];o=="text"?ds(e,t):o=="gutter"?Bo(e,t,n,r):o=="class"?Di(e,t):o=="widget"&&hs(e,t,r)}t.changes=null}function hn(e){return e.node==e.text&&(e.node=d("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),b&&N<8&&(e.node.style.zIndex=2)),e.node}function cs(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=hn(t);t.background=r.insertBefore(d("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}function zo(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):No(e,t)}function ds(e,t){var n=t.text.className,r=zo(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,Di(e,t)):n&&(t.text.className=n)}function Di(e,t){cs(e,t),t.line.wrapClass?hn(t).className=t.lin
Line truncated
|
||||
top: `+ee+"px; width: "+(me??s-G)+`px;
|
||||
height: `+(pe-ee)+"px"))}function v(G,ee,me){var pe=ce(i,G),Fe=pe.text.length,Ke,st;function Xe(tt,St){return Zn(e,L(G,tt),"div",pe,St)}function Mt(tt,St,ft){var nt=Vo(e,pe,null,tt),rt=St=="ltr"==(ft=="after")?"left":"right",Qe=ft=="after"?nt.begin:nt.end-(/\s/.test(pe.text.charAt(nt.end-1))?2:1);return Xe(Qe,rt)[rt]}var wt=We(pe,i.direction);return or(wt,ee||0,me??Fe,function(tt,St,ft,nt){var rt=ft=="ltr",Qe=Xe(tt,rt?"left":"right"),Tt=Xe(St-1,rt?"right":"left"),nn=ee==null&&tt==0,xr=me==null&&St==Fe,gt=nt==0,Jt=!wt||nt==wt.length-1;if(Tt.top-Qe.top<=3){var ut=(u?nn:xr)&>,co=(u?xr:nn)&&Jt,ir=ut?a:(rt?Qe:Tt).left,Ar=co?s:(rt?Tt:Qe).right;h(ir,Qe.top,Ar-ir,Qe.bottom)}else{var Er,mt,on,ho;rt?(Er=u&&nn&>?a:Qe.left,mt=u?s:Mt(tt,ft,"before"),on=u?a:Mt(St,ft,"after"),ho=u&&xr&&Jt?s:Tt.right):(Er=u?Mt(tt,ft,"before"):a,mt=!u&&nn&>?s:Qe.right,on=!u&&xr&&Jt?a:Tt.left,ho=u?Mt(St,ft,"after"):s),h(Er,Qe.top,mt-Er,Qe.bottom),Qe.bottom<Tt.top&&h(a,Qe.bottom,null,Tt.top),h(on,Tt.top,ho-on,Tt.bottom)}(!Ke||Qn(Qe,Ke)<0)&&(Ke=Qe),Qn(Tt,Ke)<0&&(Ke=Tt),(!st||Qn(Qe,st)<0)&&(st=Qe),Qn(Tt,st)<0&&(st=Tt)}),{start:Ke,end:st}}var k=t.from(),x=t.to();if(k.line==x.line)v(k.line,k.ch,x.ch);else{var M=ce(i,k.line),E=ce(i,x.line),R=qt(M)==qt(E),U=v(k.line,k.ch,R?M.text.length+1:null).end,Q=v(x.line,R?0:null,x.ch).start;R&&(U.top<Q.top-2?(h(U.right,U.top,null,U.bottom),h(a,Q.top,Q.left,Q.bottom)):h(U.right,U.top,Q.left-U.right,U.bottom)),U.bottom<Q.top&&h(a,U.bottom,null,Q.top)}n.appendChild(o)}function _i(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){e.hasFocus()||Ur(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function rl(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Ri(e))}function Hi(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Ur(e))},100)}function Ri(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(Ye(e,"focus",e,t),e.state.focused=!0,P(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),_&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),_i(e))}function Ur(e,t){e.state.delayingBlurEvent||(e.state.focused&&(Ye(e,"blur",e,t),e.state.focused=!1,Ee(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Vn(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,l=0;l<t.view.length;l++){var a=t.view[l],s=e.options.lineWrapping,u=void 0,h=0;if(!a.hidden){if(i+=a.line.height,b&&N<8){var v=a.node.offsetTop+a.node.offsetHeight;u=v-n,n=v}else{var k=a.node.getBoundingClientRect();u=k.bottom-k.top,!s&&a.text.firstChild&&(h=a.text.firstChild.getBoundingClientRect().right-k.left-1)}var x=a.line.height-u;if((x>.005||x<-.005)&&(i<r&&(o-=x),Ft(a.line,u),nl(a.line),a.rest))for(var M=0;M<a.rest.length;M++)nl(a.rest[M]);if(h>e.display.sizerWidth){var E=Math.ceil(h/Kr(e.display));E>e.display.maxLineLength&&(e.display.maxLineLength=E,e.display.maxLine=a.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function nl(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function $n(e,t,n){var r=n&&n.top!=null?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Xn(e));var i=n&&n.bottom!=null?n.bottom:r+e.wrapper.clientHeight,o=g(t,r),l=g(t,i);if(n&&n.ensure){var a=n.ensure.from.line,s=n.ensure.to.line;a<o?(o=a,l=g(t,er(ce(t,a))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=l&&(o=g(t,er(ce(t,s))-e.wrapper.clientHeight),l=s)}return{from:o,to:Math.max(l,o+1)}}function Cs(e,t){if(!Ze(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null,o=n.wrapper.ownerDocument;if(t.top+r.top<0?i=!0:t.bottom+r.top>(o.defaultView.innerHeight||o.documentElement.clientHeight)&&(i=!1),i!=null&&!we){var l=d("div","",null,`position: absolute;
|
||||
top: `+(t.top-n.viewOffset-Xn(e.display))+`px;
|
||||
height: `+(t.bottom-t.top+Yt(e)+n.barHeight)+`px;
|
||||
left: `+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(l),l.scrollIntoView(i),e.display.lineSpace.removeChild(l)}}}function Ds(e,t,n,r){r==null&&(r=0);var i;!e.options.lineWrapping&&t==n&&(n=t.sticky=="before"?L(t.line,t.ch+1,"before"):t,t=t.ch?L(t.line,t.sticky=="before"?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var l=!1,a=jt(e,t),s=!n||n==t?a:jt(e,n);i={left:Math.min(a.left,s.left),top:Math.min(a.top,s.top)-r,right:Math.max(a.left,s.left),bottom:Math.max(a.bottom,s.bottom)+r};var u=qi(e,i),h=e.doc.scrollTop,v=e.doc.scrollLeft;if(u.scrollTop!=null&&(yn(e,u.scrollTop),Math.abs(e.doc.scrollTop-h)>1&&(l=!0)),u.scrollLeft!=null&&(Cr(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-v)>1&&(l=!0)),!l)break}return i}function Ms(e,t){var n=qi(e,t);n.scrollTop!=null&&yn(e,n.scrollTop),n.scrollLeft!=null&&Cr(e,n.scrollLeft)}function qi(e,t){var n=e.display,r=jr(e.display);t.top<0&&(t.top=0);var i=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:n.scroller.scrollTop,o=Fi(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var a=e.doc.height+Mi(n),s=t.top<r,u=t.bottom>a-r;if(t.top<i)l.scrollTop=s?0:t.top;else if(t.bottom>i+o){var h=Math.min(t.top,(u?a:t.bottom)-o);h!=i&&(l.scrollTop=h)}var v=e.options.fixedGutter?0:n.gutters.offsetWidth,k=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:n.scroller.scrollLeft-v,x=wr(e)-n.gutters.offsetWidth,M=t.right-t.left>x;return M&&(t.right=t.left+x),t.left<10?l.scrollLeft=0:t.left<k?l.scrollLeft=Math.max(0,t.left+v-(M?0:10)):t.right>x+k-3&&(l.scrollLeft=t.right+(M?0:10)-x),l}function ji(e,t){t!=null&&(ei(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Gr(e){ei(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function mn(e,t,n){(t!=null||n!=null)&&ei(e),t!=null&&(e.curOp.scrollLeft=t),n!=null&&(e.curOp.scrollTop=n)}function Fs(e,t){ei(e),e.curOp.scrollToPos=t}function ei(e){var t=e.curOp.scrollToPos;if(t){e.curOp.scrollToPos=null;var n=Jo(e,t.from),r=Jo(e,t.to);il(e,n,r,t.margin)}}function il(e,t,n,r){var i=qi(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});mn(e,i.scrollLeft,i.scrollTop)}function yn(e,t){Math.abs(e.doc.scrollTop-t)<2||(I||Ui(e,{top:t}),ol(e,t,!0),I&&Ui(e),kn(e,100))}function ol(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),!(e.display.scroller.scrollTop==t&&!n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Cr(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r)&&(e.doc.scrollLeft=t,fl(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function xn(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Mi(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Yt(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Dr=function(e,t,n){this.cm=n;var r=this.vert=d("div",[d("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=d("div",[d("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),ve(r,"scroll",function(){r.clientHeight&&t(r.scrollTop,"vertical")}),ve(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,b&&N<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Dr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.scrollTop=0,this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(r==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Dr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Dr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert
Line truncated
|
||||
`},setDirection:at(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(t){return t.order=null}),this.cm&&Us(this.cm))})}),kt.prototype.eachLine=kt.prototype.iter;var Rl=0;function iu(e){var t=this;if(ql(t),!(Ze(t,e)||tr(t.display,e))){ht(e),b&&(Rl=+new Date);var n=Tr(t,e,!0),r=e.dataTransfer.files;if(!(!n||t.isReadOnly()))if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),l=0,a=function(){++l==i&<(t,function(){n=Ce(t.doc,n);var x={from:n,to:n,text:t.doc.splitLines(o.filter(function(M){return M!=null}).join(t.doc.lineSeparator())),origin:"paste"};Jr(t.doc,x),Cl(t.doc,pr(Ce(t.doc,n),Ce(t.doc,gr(x))))})()},s=function(x,M){if(t.options.allowDropFileTypes&&oe(t.options.allowDropFileTypes,x.type)==-1){a();return}var E=new FileReader;E.onerror=function(){return a()},E.onload=function(){var R=E.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(R)){a();return}o[M]=R,a()},E.readAsText(x)},u=0;u<r.length;u++)s(r[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1){t.state.draggingText(e),setTimeout(function(){return t.display.input.focus()},20);return}try{var h=e.dataTransfer.getData("Text");if(h){var v;if(t.state.draggingText&&!t.state.draggingText.copy&&(v=t.listSelections()),li(t.doc,pr(n,n)),v)for(var k=0;k<v.length;++k)Qr(t.doc,"",v[k].anchor,v[k].head,"drag");t.replaceSelection(h,"around","paste"),t.display.input.focus()}}catch{}}}}function ou(e,t){if(b&&(!e.state.draggingText||+new Date-Rl<100)){ar(t);return}if(!(Ze(e,t)||tr(e.display,t))&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!X)){var n=d("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",z&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),z&&n.parentNode.removeChild(n)}}function lu(e,t){var n=Tr(e,t);if(n){var r=document.createDocumentFragment();Wi(e,n,r),e.display.dragCursor||(e.display.dragCursor=d("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),J(e.display.dragCursor,r)}}function ql(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function jl(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<t.length;r++){var i=t[r].CodeMirror;i&&n.push(i)}n.length&&n[0].operation(function(){for(var o=0;o<n.length;o++)e(n[o])})}}var Kl=!1;function au(){Kl||(su(),Kl=!0)}function su(){var e;ve(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,jl(uu)},100))}),ve(window,"blur",function(){return jl(Ur)})}function uu(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var yr={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},An=0;An<10;An++)yr[An+48]=yr[An+96]=String(An);for(var ui=65;ui<=90;ui++)yr[ui]=String.fromCharCode(ui);for(var En=1;En<=12;En++)yr[En+111]=yr[En+63235]="F"+En;var nr={};nr.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},nr.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},nr.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O"Line truncated
|
||||
`,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Yl(e,t){var n=ce(e.doc,t),r=qt(n);return r!=n&&(t=f(r)),no(!0,e,r,t,1)}function hu(e,t){var n=ce(e.doc,t),r=Ja(n);return r!=n&&(t=f(r)),no(!0,e,n,t,-1)}function Zl(e,t){var n=Yl(e,t.line),r=ce(e.doc,n.line),i=We(r,e.doc.direction);if(!i||i[0].level==0){var o=Math.max(n.ch,r.text.search(/\S/)),l=t.line==n.line&&t.ch<=o&&t.ch;return L(n.line,l?0:o,n.sticky)}return n}function ci(e,t,n){if(typeof t=="string"&&(t=Nn[t],!t))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=qe}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}function pu(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=$r(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&$r(t,e.options.extraKeys,n,e)||$r(t,e.options.keyMap,n,e)}var gu=new be;function On(e,t,n,r){var i=e.state.keySeq;if(i){if(Ul(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:gu.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),Jl(e,i+" "+t,n,r))return!0}return Jl(e,t,n,r)}function Jl(e,t,n,r){var i=pu(e,t,r);return i=="multi"&&(e.state.keySeq=t),i=="handled"&&ot(e,"keyHandled",e,t,n),(i=="handled"||i=="multi")&&(ht(n),_i(e)),!!i}function Ql(e,t){var n=Xl(t,!0);return n?t.shiftKey&&!e.state.keySeq?On(e,"Shift-"+n,t,function(r){return ci(e,r,!0)})||On(e,n,t,function(r){if(typeof r=="string"?/^go[A-Z]/.test(r):r.motion)return ci(e,r)}):On(e,n,t,function(r){return ci(e,r)}):!1}function vu(e,t,n){return On(e,"'"+n+"'",t,function(r){return ci(e,r,!0)})}var io=null;function Vl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&(t.curOp.focus=y(Y(t)),!Ze(t,e))){b&&N<11&&e.keyCode==27&&(e.returnValue=!1);var n=e.keyCode;t.display.shift=n==16||e.shiftKey;var r=Ql(t,e);z&&(io=r?n:null,!r&&n==88&&!_n&&(se?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),I&&!se&&!r&&n==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),n==18&&!/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)&&mu(t)}}function mu(e){var t=e.display.lineDiv;P(t,"CodeMirror-crosshair");function n(r){(r.keyCode==18||!r.altKey)&&(Ee(t,"CodeMirror-crosshair"),dt(document,"keyup",n),dt(document,"mouseover",n))}ve(document,"keyup",n),ve(document,"mouseover",n)}function $l(e){e.keyCode==16&&(this.doc.sel.shift=!1),Ze(this,e)}function ea(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField())&&!(tr(t.display,e)||Ze(t,e)||e.ctrlKey&&!e.altKey||se&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(z&&n==io){io=null,ht(e);return}if(!(z&&(!e.which||e.which<10)&&Ql(t,e))){var i=String.fromCharCode(r??n);i!="\b"&&(vu(t,e,i)||t.display.input.onKeyPress(e))}}}var yu=400,oo=function(e,t,n){this.time=e,this.pos=t,this.button=n};oo.prototype.compare=function(e,t,n){return this.time+yu>e&&Z(t,this.pos)==0&&n==this.button};var Pn,In;function xu(e,t){var n=+new Date;return In&&In.compare(n,e,t)?(Pn=In=null,"triple"):Pn&&Pn.compare(n,e,t)?(In=new oo(n,e,t),Pn=null,"double"):(Pn=new oo(n,e,t),In=null,"single")}function ta(e){var t=this,n=t.display;if(!(Ze(t,e)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=e.shiftKey,tr(n,e)){_||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(!lo(t,e)){var r=Tr(t,e),i=Wt(e),o=r?xu(r,i):"single";j(t).focus(),i==1&&t.state.selectingText&&t.state.selectingText(e),!(r&&bu(t,i,r,o,e))&&(i==1?r?wu(t,r,o,e):ln(e)==n.scroller&&ht(e):i==2?(r&&oi(t.doc,r),setTimeout(function(){return n.input.focus()},20)):i==3&&(fe?t.display.input.onContextMenu(e):Hi(t)))}}}function bu(e,t,n,r,i){var o="Click";return r=="double"?o="Double"+o:r=="triple"&&(o="Triple"+o),o=(t==1?"Left":t==2?"Middle":"Right")+o,On(e,Gl(o,i),i,function(l){if(typeof l=="string"&&(l=Nn[l]),!l)return!1;var a=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),a=l(e,n)!=qe}finally{e.state.suppressEdits=!1}return a})}function ku(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(i.unit==null){var o=Ae?n.shiftKey&&n.metaKey:n.altKey;i.unit=o?"rectangle":t=="single"?"char":t=="double"?"word":"line"}return(i.extend==null||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),i.addNew==null&&(i.addNew=se?n.metaKey:n.ctrlKey),i.moveOnDrag==null&&(i.moveOnDrag=!(se?n.altKey:n.ctrlKey)),i}function wu(e,t,n,r){b?setTimeout(ue(rl,e),0):e.curOp.focus=y(Y(e));var i=ku(e,n,r),o=e.doc.sel,l;e.options.dragDrop&&yi&&!e.isReadOnly()&&n=="single"&&(l=o.contains(t))>-1&&(Z((l=o.ranges[l]).from(),t)<0||t.xRel>0)&&(Z(l.to(),t)>0||t.xRel<0)?Su(e,r,t,i):Tu(e,r,t,i)}function Su(e,t,n,r){var i=e.display,o=!1,l=lt(e,function(u){_&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Hi(e)),dt(i.wrapper.ownerDocument,"mouseup",l),dt(i.wrapper.ownerDocument,"mousemove",a),dt(i.scroller,"dragstart",s),dt(i.scroller,"drop",l),o||(ht(u),r.a
Line truncated
|
||||
`)==t){if(r.ranges.length%Ut.text.length==0){u=[];for(var h=0;h<Ut.text.length;h++)u.push(o.splitLines(Ut.text[h]))}}else s.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(u=Pe(s,function(U){return[U]}));for(var v=e.curOp.updateInput,k=r.ranges.length-1;k>=0;k--){var x=r.ranges[k],M=x.from(),E=x.to();x.empty()&&(n&&n>0?M=L(M.line,M.ch-n):e.state.overwrite&&!a?E=L(E.line,Math.min(ce(o,E.line).text.length,E.ch+ge(s).length)):a&&Ut&&Ut.lineWise&&Ut.text.join(`
|
||||
`)==s.join(`
|
||||
`)&&(M=E=L(M.line,0)));var R={from:M,to:E,text:u?u[k%u.length]:s,origin:i||(a?"paste":e.state.cutIncoming>l?"cut":"+input")};Jr(e.doc,R),ot(e,"inputRead",e,R)}t&&!a&&sa(e,t),Gr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=v),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function aa(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),!t.isReadOnly()&&!t.options.disableInput&&t.hasFocus()&&Dt(t,function(){return so(t,n,0,null,"paste")}),!0}function sa(e,t){if(!(!e.options.electricChars||!e.options.smartIndent))for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var a=0;a<o.electricChars.length;a++)if(t.indexOf(o.electricChars.charAt(a))>-1){l=zn(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(ce(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=zn(e,i.head.line,"smart"));l&&ot(e,"electricInput",e,i.head.line)}}}function ua(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,o={anchor:L(i,0),head:L(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function uo(e,t,n,r){e.setAttribute("autocorrect",n?"on":"off"),e.setAttribute("autocapitalize",r?"on":"off"),e.setAttribute("spellcheck",!!t)}function fa(){var e=d("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; min-height: 1em; outline: none"),t=d("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return _?e.style.width="1000px":e.setAttribute("wrap","off"),te&&(e.style.border="1px solid black"),t}function Eu(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){j(this).focus(),this.display.input.focus()},setOption:function(r,i){var o=this.options,l=o[r];o[r]==i&&r!="mode"||(o[r]=i,t.hasOwnProperty(r)&<(this,t[r])(this,i,l),Ye(this,"optionChange",this,r))},getOption:function(r){return this.options[r]},getDoc:function(){return this.doc},addKeyMap:function(r,i){this.state.keyMaps[i?"push":"unshift"](fi(r))},removeKeyMap:function(r){for(var i=this.state.keyMaps,o=0;o<i.length;++o)if(i[o]==r||i[o].name==r)return i.splice(o,1),!0},addOverlay:vt(function(r,i){var o=r.token?r:e.getMode(this.options,r);if(o.startState)throw new Error("Overlays may not be stateful.");T(this.state.overlays,{mode:o,modeSpec:r,opaque:i&&i.opaque,priority:i&&i.priority||0},function(l){return l.priority}),this.state.modeGen++,bt(this)}),removeOverlay:vt(function(r){for(var i=this.state.overlays,o=0;o<i.length;++o){var l=i[o].modeSpec;if(l==r||typeof r=="string"&&l.name==r){i.splice(o,1),this.state.modeGen++,bt(this);return}}}),indentLine:vt(function(r,i,o){typeof i!="string"&&typeof i!="number"&&(i==null?i=this.options.smartIndent?"smart":"prev":i=i?"add":"subtract"),A(this.doc,r)&&zn(this,r,i,o)}),indentSelection:vt(function(r){for(var i=this.doc.sel.ranges,o=-1,l=0;l<i.length;l++){var a=i[l];if(a.empty())a.head.line>o&&(zn(this,a.head.line,r,!0),o=a.head.line,l==this.doc.sel.primIndex&&Gr(this));else{var s=a.from(),u=a.to(),h=Math.max(o,s.line);o=Math.min(this.lastLine(),u.line-(u.ch?0:1))+1;for(var v=h;v<o;++v)zn(this,v,r);var k=this.doc.sel.ranges;s.ch==0&&i.length==k.length&&k[l].from().ch>0&&eo(this.doc,l,new He(s,k[l].to()),Ve)}}}),getTokenAt:function(r,i){return bo(this,r,i)},getLineTokens:function(r,i){return bo(this,L(r),i,!0)},getTokenTypeAt:function(r){r=Ce(this.doc,r);var i=mo(this,ce(this.doc,r.line)),o=0,l=(i.length-1)/2,a=r.ch,s;if(a==0)s=i[2];else for(;;){var u=o+l>>1;if((u?i[u*2-1]:0)>=a)l=u;else if(i[u*2+1]<a)o=u+1;else{s=i[u*2+2];break}}var h=s?s.indexOf("overlay "):-1;return h<0?s:h==0?null:s.slice(0,h-1)},getModeAt:function(r){var i=this.doc.mode;return i.innerMode?e.innerMode(i,this.getTokenAt(r).state).mode:i},getHelper:function(r,i){return this.getHelpers(r,i)[0]},getHelpers:function(r,i){var o=[];if(!n.hasOwnProperty(i))return o;var l=n[i],a=this.getModeAt(r);if(typeof a[i]=="string")l[a[i]]&&o.push(l[a[i]]);else if(a[i])for(var s=0;s<a[i].length;s++){var u=l[a[i][s]];u&&o.push(u)}else a.helperType&&l[a.helperType]?o.push(l[a.helperType]):l[a.name]&&o.push(l[a.name]);for(var h=0;h<l._global.length;h++){var v=l._global[h];v.pred(a,this)&&oe(o,v.val)==-1&&o.push(v.val)}return o},getStateAfter:function(r,i){var o=this.doc;return r=po(o,r??o.first+o.size-1),fn(this,r+1,i).state},cursorCoords:function(r,i){var o,l=this.doc.sel.primary();return r==null?o=l.head:typeof r=="object"?o=Ce(this.doc,r):o=r?l.from():l.to(),jt(this,o,i||"page")},charCoords:function(r,i){return Zn(this,Ce(this.doc,r),i||"page")},coordsChar:function(r,i){return r=Zo(this,r,i||"page"),Oi(this,r.left,r.top)},lineAtHeight:function(r,i){return r=Zo(this,{top:r,left:0},i||"page").top,g(this.doc,r+this.display.viewOffset)},heightAtLine:function(r,i,o){var l=!1,a;if(typeof r=="number"){var s=this.doc.first+this.doc.size-1;r<t
Line truncated
|
||||
`,R=Se(E,x)?"w":k&&E==`
|
||||
`?"n":!k||/\s/.test(E)?null:"p";if(k&&!M&&!R&&(R="s"),v&&v!=R){n<0&&(n=1,h(),t.sticky="after");break}if(R&&(v=R),n>0&&!h(!M))break}var U=ai(e,t,o,l,!0);return _e(o,U)&&(U.hitSide=!0),U}function ca(e,t,n,r){var i=e.doc,o=t.left,l;if(r=="page"){var a=Math.min(e.display.wrapper.clientHeight,j(e).innerHeight||i(e).documentElement.clientHeight),s=Math.max(a-.5*jr(e.display),3);l=(n>0?t.bottom:t.top)+n*s}else r=="line"&&(l=n>0?t.bottom+3:t.top-3);for(var u;u=Oi(e,o,l),!!u.outside;){if(n<0?l<=0:l>=i.height){u.hitSide=!0;break}l+=n*5}return u}var je=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new be,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};je.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;i.contentEditable=!0,uo(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize);function o(a){for(var s=a.target;s;s=s.parentNode){if(s==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(s.className))break}return!1}ve(i,"paste",function(a){!o(a)||Ze(r,a)||aa(a,r)||N<=11&&setTimeout(lt(r,function(){return t.updateFromDOM()}),20)}),ve(i,"compositionstart",function(a){t.composing={data:a.data,done:!1}}),ve(i,"compositionupdate",function(a){t.composing||(t.composing={data:a.data,done:!1})}),ve(i,"compositionend",function(a){t.composing&&(a.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),ve(i,"touchstart",function(){return n.forceCompositionEnd()}),ve(i,"input",function(){t.composing||t.readFromDOMSoon()});function l(a){if(!(!o(a)||Ze(r,a))){if(r.somethingSelected())hi({lineWise:!1,text:r.getSelections()}),a.type=="cut"&&r.replaceSelection("",null,"cut");else if(r.options.lineWiseCopyCut){var s=ua(r);hi({lineWise:!0,text:s.text}),a.type=="cut"&&r.operation(function(){r.setSelections(s.ranges,0,Ve),r.replaceSelection("",null,"cut")})}else return;if(a.clipboardData){a.clipboardData.clearData();var u=Ut.text.join(`
|
||||
`);if(a.clipboardData.setData("Text",u),a.clipboardData.getData("Text")==u){a.preventDefault();return}}var h=fa(),v=h.firstChild;uo(v),r.display.lineSpace.insertBefore(h,r.display.lineSpace.firstChild),v.value=Ut.text.join(`
|
||||
`);var k=y(xe(i));p(v),setTimeout(function(){r.display.lineSpace.removeChild(h),k.focus(),k==i&&n.showPrimarySelection()},50)}}ve(i,"copy",l),ve(i,"cut",l)},je.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},je.prototype.prepareSelection=function(){var e=tl(this.cm,!1);return e.focus=y(xe(this.div))==this.div,e},je.prototype.showSelection=function(e,t){!e||!this.cm.display.view.length||((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},je.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},je.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,n=t.doc.sel.primary(),r=n.from(),i=n.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||i.line<t.display.viewFrom){e.removeAllRanges();return}var o=pi(t,e.anchorNode,e.anchorOffset),l=pi(t,e.focusNode,e.focusOffset);if(!(o&&!o.bad&&l&&!l.bad&&Z(_r(o,l),r)==0&&Z(xt(o,l),i)==0)){var a=t.display.view,s=r.line>=t.display.viewFrom&&da(t,r)||{node:a[0].measure.map[2],offset:0},u=i.line<t.display.viewTo&&da(t,i);if(!u){var h=a[a.length-1].measure,v=h.maps?h.maps[h.maps.length-1]:h.map;u={node:v[v.length-1],offset:v[v.length-2]-v[v.length-3]}}if(!s||!u){e.removeAllRanges();return}var k=e.rangeCount&&e.getRangeAt(0),x;try{x=w(s.node,s.offset,u.offset,u.node)}catch{}x&&(!I&&t.state.focused?(e.collapse(s.node,s.offset),x.collapsed||(e.removeAllRanges(),e.addRange(x))):(e.removeAllRanges(),e.addRange(x)),k&&e.anchorNode==null?e.addRange(k):I&&this.startGracePeriod()),this.rememberSelection()}},je.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},je.prototype.showMultipleSelections=function(e){J(this.cm.display.cursorDiv,e.cursors),J(this.cm.display.selectionDiv,e.selection)},je.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},je.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return m(this.div,t)},je.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||y(xe(this.div))!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},je.prototype.blur=function(){this.div.blur()},je.prototype.getField=function(){return this.div},je.prototype.supportsTouch=function(){return!0},je.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout(function(){return e.pollSelection()},20):Dt(this.cm,function(){return t.cm.curOp.selectionChanged=!0});function n(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,n))}this.polling.set(this.cm.options.pollInterval,n)},je.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},je.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),t=this.cm;if(re&&O&&this.cm.display.gutterSpecs.length&&Nu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var n=pi(t,e.anchorNode,e.anchorOffset),r=pi(t,e.focusNode,e.focusOffset);n&&r&&Dt(t,function(){pt(t.doc,pr(n,r),Ve),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)})}}},je.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,t=e.display,n=e.doc.sel.primary(),r=n.from(),i=n.to();if(r.ch==0&&r.line>e.firstLine()&&(r=L(r.line-1,ce(e.doc,r.line-1).length)),i.ch==ce(e.doc,i.line).text.length&&i.line<e.lastLine()&&(i=L(i.line+1,0)),r.line<t.viewFrom||i.line>t.viewTo-1)return!1;var o,l,a;r.line==t.viewFrom||(o=Lr(e,r.line))==0?(l=f(t.view[0].line),a=t.view[0].node):(l=f(t.view[o].line),a=t.view[o-1].node.nextSibling);var s=Lr(e,i.line),u,h;if(s==t.view.length-1?(u=t.viewTo-1,h=t.lineDiv.lastChild):(u=f(t.view[s+1].line)-1,h=t.view[s+1].node.previousSibling),!a)return!1;for(var v=e.doc.splitLines(Ou(e,a,h,l,u)),k=Vt(e.doc,L(l,0),L(u,ce(e.doc,u).text.length));v.length>1&&k.length>1;)if(ge(v)==ge(k))v.pop(),k.pop(),u--;else if(v[0]==k[0])v.shift(),k.shift(),l++;else break;for(var x=0,M=0,E=v[0],R=k[0],U=Math.min(E.length,R.length);x<U&&E.charCodeAt(x)==R.charCodeAt(x);)++x;for(var Q=ge(v),G=ge(k),ee=Math.min(Q.length-(v.length==1?x:0),G.length-(k.length==1?x:0));M<ee&&Q.charCodeAt(Q.length-M-1)==G.charCodeAt(G.length-M-1);)++M;if(v.length==1&&k.length==1&&l==r.line)for(;x&&
Line truncated
|
||||
`),p(i))}else return;l.type=="cut"&&(r.state.cutIncoming=+new Date)}}ve(i,"cut",o),ve(i,"copy",o),ve(e.scroller,"paste",function(l){if(!(tr(e,l)||Ze(r,l))){if(!i.dispatchEvent){r.state.pasteIncoming=+new Date,n.focus();return}var a=new Event("paste");a.clipboardData=l.clipboardData,i.dispatchEvent(a)}}),ve(e.lineSpace,"selectstart",function(l){tr(e,l)||ht(l)}),ve(i,"compositionstart",function(){var l=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:l,range:r.markText(l,r.getCursor("to"),{className:"CodeMirror-composing"})}}),ve(i,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},$e.prototype.createField=function(e){this.wrapper=fa(),this.textarea=this.wrapper.firstChild;var t=this.cm.options;uo(this.textarea,t.spellcheck,t.autocorrect,t.autocapitalize)},$e.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},$e.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=tl(e);if(e.options.moveInputWithCursor){var i=jt(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return r},$e.prototype.showSelection=function(e){var t=this.cm,n=t.display;J(n.cursorDiv,e.cursors),J(n.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},$e.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing&&e)){var t=this.cm;if(this.resetting=!0,t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&p(this.textarea),b&&N>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",b&&N>=9&&(this.hasSelection=null));this.resetting=!1}},$e.prototype.getField=function(){return this.textarea},$e.prototype.supportsTouch=function(){return!1},$e.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!ne||y(xe(this.textarea))!=this.textarea))try{this.textarea.focus()}catch{}},$e.prototype.blur=function(){this.textarea.blur()},$e.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},$e.prototype.receivedFocus=function(){this.slowPoll()},$e.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},$e.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0;function n(){var r=t.poll();!r&&!e?(e=!0,t.polling.set(60,n)):(t.pollingFast=!1,t.slowPoll())}t.polling.set(20,n)},$e.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||this.resetting||!t.state.focused||ur(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(b&&N>=9&&this.hasSelection===i||se&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(o==8203&&!r&&(r=""),o==8666)return this.reset(),this.cm.execCommand("undo")}for(var l=0,a=Math.min(r.length,i.length);l<a&&r.charCodeAt(l)==i.charCodeAt(l);)++l;return Dt(t,function(){so(t,i.slice(l),r.length-l,null,e.composing?"*compose":null),i.length>1e3||i.indexOf(`
|
||||
`)>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},$e.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},$e.prototype.onKeyPress=function(){b&&N>=9&&(this.hasSelection=null),this.fastPoll()},$e.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=Tr(n,e),l=r.scroller.scrollTop;if(!o||z)return;var a=n.options.resetSelectionOnContextMenu;a&&n.doc.sel.contains(o)==-1&<(n,pt)(n.doc,pr(o),Ve);var s=i.style.cssText,u=t.wrapper.style.cssText,h=t.wrapper.offsetParent.getBoundingClientRect();t.wrapper.style.cssText="position: static",i.style.cssText=`position: absolute; width: 30px; height: 30px;
|
||||
top: `+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+`px;
|
||||
z-index: 1000; background: `+(b?"rgba(255, 255, 255, .05)":"transparent")+`;
|
||||
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var v;_&&(v=i.ownerDocument.defaultView.scrollY),r.input.focus(),_&&i.ownerDocument.defaultView.scrollTo(null,v),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=x,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll);function k(){if(i.selectionStart!=null){var E=n.somethingSelected(),R=""+(E?i.value:"");i.value="⇚",i.value=R,t.prevInput=E?"":"",i.selectionStart=1,i.selectionEnd=R.length,r.selForContextMenu=n.doc.sel}}function x(){if(t.contextMenuPending==x&&(t.contextMenuPending=!1,t.wrapper.style.cssText=u,i.style.cssText=s,b&&N<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=l),i.selectionStart!=null)){(!b||b&&N<9)&&k();var E=0,R=function(){r.selForContextMenu==n.doc.sel&&i.selectionStart==0&&i.selectionEnd>0&&t.prevInput==""?lt(n,El)(n):E++<10?r.detectingSelectAll=setTimeout(R,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(R,200)}}if(b&&N>=9&&k(),fe){ar(e);var M=function(){dt(window,"mouseup",M),setTimeout(x,20)};ve(window,"mouseup",M)}else setTimeout(x,50)},$e.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},$e.prototype.setUneditable=function(){},$e.prototype.needsContentAttribute=!1;function Iu(e,t){if(t=t?Te(t):{},t.value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),t.autofocus==null){var n=y(xe(e));t.autofocus=n==e||e.getAttribute("autofocus")!=null&&n==document.body}function r(){e.value=a.getValue()}var i;if(e.form&&(ve(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var l=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=l}}catch{}}t.finishInit=function(s){s.save=r,s.getTextArea=function(){return e},s.toTextArea=function(){s.toTextArea=isNaN,r(),e.parentNode.removeChild(s.getWrapperElement()),e.style.display="",e.form&&(dt(e.form,"submit",r),!t.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=i))}},e.style.display="none";var a=Ge(function(s){return e.parentNode.insertBefore(s,e.nextSibling)},t);return a}function zu(e){e.off=dt,e.on=ve,e.wheelEventPixels=js,e.Doc=kt,e.splitLines=Pt,e.countColumn=Le,e.findColumn=Re,e.isWordChar=ae,e.Pass=qe,e.signal=Ye,e.Line=Hr,e.changeEnd=gr,e.scrollbarModel=al,e.Pos=L,e.cmpPos=Z,e.modes=Pr,e.mimeModes=Ht,e.resolveMode=Ir,e.getMode=zr,e.modeExtensions=fr,e.extendMode=Br,e.copyState=Gt,e.startState=Wr,e.innerMode=sn,e.commands=Nn,e.keyMap=nr,e.keyName=Xl,e.isModifierKey=Ul,e.lookupKey=$r,e.normalizeKeyMap=cu,e.StringStream=Je,e.SharedTextMarker=Fn,e.TextMarker=mr,e.LineWidget=Mn,e.e_preventDefault=ht,e.e_stopPropagation=Nr,e.e_stop=ar,e.addClass=P,e.contains=m,e.rmClass=Ee,e.keyNames=yr}Du(Ge),Eu(Ge);var Bu="iter insert remove copy getEditor constructor".split(" ");for(var gi in kt.prototype)kt.prototype.hasOwnProperty(gi)&&oe(Bu,gi)<0&&(Ge.prototype[gi]=function(e){return function(){return e.apply(this.doc,arguments)}}(kt.prototype[gi]));return Bt(kt),Ge.inputStyles={textarea:$e,contenteditable:je},Ge.defineMode=function(e){!Ge.defaults.mode&&e!="null"&&(Ge.defaults.mode=e),Rt.apply(this,arguments)},Ge.defineMIME=kr,Ge.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Ge.defineMIME("text/plain","null"),Ge.defineExtension=function(e,t){Ge.prototype[e]=t},Ge.defineDocExtension=function(e,t){kt.prototype[e]=t},Ge.fromTextArea=Iu,zu(Ge),Ge.version="5.65.18",Ge})}(vi)),vi.exports}var Hu=It();const Ju=Wu(Hu);var pa={exports:{}},ga;function za(){return ga||(ga=1,function(Et,zt){(function(C){C(It())})(function(C){C.defineMode("css",function(fe,H){var Ee=H.inline;H.propertyKeywords||(H=C.resolveMode("text/css"));var D=fe.indentUnit,J=H.tokenHooks,d=H.documentTypes||{},S=H.mediaTypes||{},w=H.mediaFeatures||{},m=H.mediaValueKeywords||{},y=H.propertyKeywords||{},P=H.nonStandardPropertyKeywords||{},le=H.fontProperties||{},p=H.counterDescriptors||{},c=H.colorKeywords||{},Y=H.valueKeywords||{},xe=H.allowNested,j=H.lineComment,ue=H.supportsAtComponent===!0,Te=fe.highlightNonStandardPropertyKeywords!==!1,Le,be;function oe(T,B){return Le=B,T}function Ne(T,B){var F=T.next();if(J[F]){var Ie=J[F](T,B);if(Ie!==!1)return Ie}if(F=="@")return T.eatWhile(/[\w\\\-]/),oe("def",T.current());if(F=="="||(F=="~"||F=="|")&&T.eat("="))return oe(null,"compare");if(F=='"'||F=="'")return B.tokenize=qe(F),B.tokenize(T,B);if(F=="#")return T.eatWhile(/[\w\\\-]/),oe("atom","hash");if(F=="!")return T.match(/^\s*\w*/),oe("keyword","important");if(/\d/.test(F)||F=="."&&T.eat(/\d/))return T.eatWhile(/[\w.%]/),oe("number","unit");if(F==="-"){if(/[\d.]/.test(T.peek()))return T.eatWhile(/[\w.%]/),oe("number","unit");if(T.match(/^-[\w\\\-]*/))return T.eatWhile(/[\w\\\-]/),T.match(/^\s*:/,!1)?oe("variable-2","variable-definition"):oe("variable-2","variable");if(T.match(/^\w+-/))return
Line truncated
|
||||
Generated
Vendored
+256
@@ -0,0 +1,256 @@
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./codeMirrorModule-B9MwJ51G.js","../codeMirrorModule.C3UTv-Ge.css"])))=>i.map(i=>d[i]);
|
||||
var p0=Object.defineProperty;var m0=(t,e,n)=>e in t?p0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var be=(t,e,n)=>m0(t,typeof e!="symbol"?e+"":e,n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const c of l.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerPolicy&&(l.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?l.credentials="include":o.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function r(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}})();function g0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var uu={exports:{}},Ti={},fu={exports:{}},he={};/**
|
||||
* @license React
|
||||
* react.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var kp;function y0(){if(kp)return he;kp=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),y=Symbol.iterator;function v(I){return I===null||typeof I!="object"?null:(I=y&&I[y]||I["@@iterator"],typeof I=="function"?I:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,S={};function k(I,B,ce){this.props=I,this.context=B,this.refs=S,this.updater=ce||x}k.prototype.isReactComponent={},k.prototype.setState=function(I,B){if(typeof I!="object"&&typeof I!="function"&&I!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,I,B,"setState")},k.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function C(){}C.prototype=k.prototype;function A(I,B,ce){this.props=I,this.context=B,this.refs=S,this.updater=ce||x}var U=A.prototype=new C;U.constructor=A,E(U,k.prototype),U.isPureReactComponent=!0;var R=Array.isArray,D=Object.prototype.hasOwnProperty,z={current:null},q={key:!0,ref:!0,__self:!0,__source:!0};function F(I,B,ce){var de,ye={},me=null,ve=null;if(B!=null)for(de in B.ref!==void 0&&(ve=B.ref),B.key!==void 0&&(me=""+B.key),B)D.call(B,de)&&!q.hasOwnProperty(de)&&(ye[de]=B[de]);var _e=arguments.length-2;if(_e===1)ye.children=ce;else if(1<_e){for(var ke=Array(_e),Ne=0;Ne<_e;Ne++)ke[Ne]=arguments[Ne+2];ye.children=ke}if(I&&I.defaultProps)for(de in _e=I.defaultProps,_e)ye[de]===void 0&&(ye[de]=_e[de]);return{$$typeof:t,type:I,key:me,ref:ve,props:ye,_owner:z.current}}function j(I,B){return{$$typeof:t,type:I.type,key:B,ref:I.ref,props:I.props,_owner:I._owner}}function oe(I){return typeof I=="object"&&I!==null&&I.$$typeof===t}function ae(I){var B={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(ce){return B[ce]})}var M=/\/+/g;function H(I,B){return typeof I=="object"&&I!==null&&I.key!=null?ae(""+I.key):B.toString(36)}function fe(I,B,ce,de,ye){var me=typeof I;(me==="undefined"||me==="boolean")&&(I=null);var ve=!1;if(I===null)ve=!0;else switch(me){case"string":case"number":ve=!0;break;case"object":switch(I.$$typeof){case t:case e:ve=!0}}if(ve)return ve=I,ye=ye(ve),I=de===""?"."+H(ve,0):de,R(ye)?(ce="",I!=null&&(ce=I.replace(M,"$&/")+"/"),fe(ye,B,ce,"",function(Ne){return Ne})):ye!=null&&(oe(ye)&&(ye=j(ye,ce+(!ye.key||ve&&ve.key===ye.key?"":(""+ye.key).replace(M,"$&/")+"/")+I)),B.push(ye)),1;if(ve=0,de=de===""?".":de+":",R(I))for(var _e=0;_e<I.length;_e++){me=I[_e];var ke=de+H(me,_e);ve+=fe(me,B,ce,ke,ye)}else if(ke=v(I),typeof ke=="function")for(I=ke.call(I),_e=0;!(me=I.next()).done;)me=me.value,ke=de+H(me,_e++),ve+=fe(me,B,ce,ke,ye);else if(me==="object")throw B=String(I),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.");return ve}function xe(I,B,ce){if(I==null)return I;var de=[],ye=0;return fe(I,de,"","",function(me){return B.call(ce,me,ye++)}),de}function pe(I){if(I._status===-1){var B=I._result;B=B(),B.then(function(ce){(I._status===0||I._status===-1)&&(I._status=1,I._result=ce)},function(ce){(I._status===0||I._status===-1)&&(I._status=2,I._result=ce)}),I._status===-1&&(I._status=0,I._result=B)}if(I._status===1)return I._result.default;throw I._result}var ge={current:null},Q={transition:null},ne={ReactCurrentDispatcher:ge,ReactCurrentBatchConfig:Q,ReactCurrentOwner:z};function J(){throw Error("act(...) is not supported in production builds of React.")}return he.Children={map:xe,forEach:function(I,B,ce){xe(I,function(){B.apply(this,arguments)},ce)},count:function(I){var B=0;return xe(I,function(){B++}),B},toArray:function(I){return xe(I,function(B){return B})||[]},only:function(I){if(!oe(I))throw Error("React.Children.only expected to receive a single React element child.");return I}},he.Component=k,he.Fragment=n,he.Profiler=o,he.PureComponent=A,he.StrictMode=r,he.Suspense=d,he.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ne,he.act=J,he.cloneElement=function(I,B,ce){if(I==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+I+".");var de=E({},I.props),ye=I.key,me=I.ref,ve=I._owner;if(B!=null){if(B.ref!==void 0&&(me=B.ref,ve=z.current),B.key!==void 0&&(ye=""+B.key),I.type&&I.type.defaultProps)var _e=I.type.defaultProps;for(ke in B)D.call(B,ke)&&!q.hasOwnProperty(ke)&&(de[ke]=B[ke]===void 0&&_e!==void 0?_e[ke]:B[ke])}var ke=arguments.length-2;if(ke===1)de.children=ce;else if(1<ke){_e=Array(ke);for(var Ne=0;Ne<ke;Ne++)_e[Ne]=arguments[Ne+2];de.children=_e}return{$$typeof:t,Line truncated
|
||||
* @license React
|
||||
* react-jsx-runtime.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var Tp;function v0(){if(Tp)return Ti;Tp=1;var t=Qu(),e=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(u,d,p){var g,y={},v=null,x=null;p!==void 0&&(v=""+p),d.key!==void 0&&(v=""+d.key),d.ref!==void 0&&(x=d.ref);for(g in d)r.call(d,g)&&!l.hasOwnProperty(g)&&(y[g]=d[g]);if(u&&u.defaultProps)for(g in d=u.defaultProps,d)y[g]===void 0&&(y[g]=d[g]);return{$$typeof:e,type:u,key:v,ref:x,props:y,_owner:o.current}}return Ti.Fragment=n,Ti.jsx=c,Ti.jsxs=c,Ti}var Cp;function w0(){return Cp||(Cp=1,uu.exports=v0()),uu.exports}var w=w0(),$=Qu();const Mt=g0($);function Bl(t,e,n,r){const[o,l]=Mt.useState(n);return Mt.useEffect(()=>{let c=!1;return t().then(u=>{c||l(u)}),()=>{c=!0}},e),o}function jr(){const t=Mt.useRef(null),[e,n]=Mt.useState(new DOMRect(0,0,10,10));return Mt.useLayoutEffect(()=>{const r=t.current;if(!r)return;const o=r.getBoundingClientRect();n(new DOMRect(0,0,o.width,o.height));const l=new ResizeObserver(c=>{const u=c[c.length-1];u&&u.contentRect&&n(u.contentRect)});return l.observe(r),()=>l.disconnect()},[t]),[e,t]}function pt(t){if(t<0||!isFinite(t))return"-";if(t===0)return"0";if(t<1e3)return t.toFixed(0)+"ms";const e=t/1e3;if(e<60)return e.toFixed(1)+"s";const n=e/60;if(n<60)return n.toFixed(1)+"m";const r=n/60;return r<24?r.toFixed(1)+"h":(r/24).toFixed(1)+"d"}function S0(t){if(t<0||!isFinite(t))return"-";if(t===0)return"0";if(t<1e3)return t.toFixed(0);const e=t/1024;if(e<1e3)return e.toFixed(1)+"K";const n=e/1024;return n<1e3?n.toFixed(1)+"M":(n/1024).toFixed(1)+"G"}function Pm(t,e,n,r,o){let l=0,c=t.length;for(;l<c;){const u=l+c>>1;n(e,t[u])>=0?l=u+1:c=u}return c}function Np(t){const e=document.createElement("textarea");e.style.position="absolute",e.style.zIndex="-1000",e.value=t,document.body.appendChild(e),e.select(),document.execCommand("copy"),e.remove()}function Nn(t,e){t&&(e=kr.getObject(t,e));const[n,r]=Mt.useState(e),o=Mt.useCallback(l=>{t?kr.setObject(t,l):r(l)},[t,r]);return Mt.useEffect(()=>{if(t){const l=()=>r(kr.getObject(t,e));return kr.onChangeEmitter.addEventListener(t,l),()=>kr.onChangeEmitter.removeEventListener(t,l)}},[e,t]),[n,o]}class x0{constructor(){this.onChangeEmitter=new EventTarget}getString(e,n){return localStorage[e]||n}setString(e,n){var r;localStorage[e]=n,this.onChangeEmitter.dispatchEvent(new Event(e)),(r=window.saveSettings)==null||r.call(window)}getObject(e,n){if(!localStorage[e])return n;try{return JSON.parse(localStorage[e])}catch{return n}}setObject(e,n){var r;localStorage[e]=JSON.stringify(n),this.onChangeEmitter.dispatchEvent(new Event(e)),(r=window.saveSettings)==null||r.call(window)}}const kr=new x0;function ze(...t){return t.filter(Boolean).join(" ")}function Om(t){t&&(t!=null&&t.scrollIntoViewIfNeeded?t.scrollIntoViewIfNeeded(!1):t==null||t.scrollIntoView())}const Ap="\\u0000-\\u0020\\u007f-\\u009f",Rm=new RegExp("(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|www\\.)[^\\s"+Ap+'"]{2,}[^\\s'+Ap+`"')}\\],:;.!?]`,"ug");function _0(){const[t,e]=Mt.useState(!1),n=Mt.useCallback(()=>{const r=[];return e(o=>(r.push(setTimeout(()=>e(!1),1e3)),o?(r.push(setTimeout(()=>e(!0),50)),!1):!0)),()=>r.forEach(clearTimeout)},[e]);return[t,n]}function Ak(){if(document.playwrightThemeInitialized)return;document.playwrightThemeInitialized=!0,document.defaultView.addEventListener("focus",r=>{r.target.document.nodeType===Node.DOCUMENT_NODE&&document.body.classList.remove("inactive")},!1),document.defaultView.addEventListener("blur",r=>{document.body.classList.add("inactive")},!1);const e=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark-mode":"light-mode";kr.getString("theme",e)==="dark-mode"&&document.body.classList.add("dark-mode")}const Ju=new Set;function E0(){const t=Mu(),e=t==="dark-mode"?"light-mode":"dark-mode";t&&document.body.classList.remove(t),document.body.classList.add(e),kr.setString("theme",e);for(const n of Ju)n(e)}function Ik(t){Ju.add(t)}function Lk(t){Ju.delete(t)}function Mu(){return document.body.classList.contains("dark-mode")?"dark-mode":"light-mode"}function k0(){const[t,e]=Mt.useState(Mu()==="dark-mode");return[t,n=>{Mu()==="dark-mode"!==n&&E0(),e(n)}]}var gl={},du={exports:{}},xt={},hu={exports:{}},pu={};/**
|
||||
* @license React
|
||||
* scheduler.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var Ip;function b0(){return Ip||(Ip=1,function(t){function e(Q,ne){var J=Q.length;Q.push(ne);e:for(;0<J;){var I=J-1>>>1,B=Q[I];if(0<o(B,ne))Q[I]=ne,Q[J]=B,J=I;else break e}}function n(Q){return Q.length===0?null:Q[0]}function r(Q){if(Q.length===0)return null;var ne=Q[0],J=Q.pop();if(J!==ne){Q[0]=J;e:for(var I=0,B=Q.length,ce=B>>>1;I<ce;){var de=2*(I+1)-1,ye=Q[de],me=de+1,ve=Q[me];if(0>o(ye,J))me<B&&0>o(ve,ye)?(Q[I]=ve,Q[me]=J,I=me):(Q[I]=ye,Q[de]=J,I=de);else if(me<B&&0>o(ve,J))Q[I]=ve,Q[me]=J,I=me;else break e}}return ne}function o(Q,ne){var J=Q.sortIndex-ne.sortIndex;return J!==0?J:Q.id-ne.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;t.unstable_now=function(){return l.now()}}else{var c=Date,u=c.now();t.unstable_now=function(){return c.now()-u}}var d=[],p=[],g=1,y=null,v=3,x=!1,E=!1,S=!1,k=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function U(Q){for(var ne=n(p);ne!==null;){if(ne.callback===null)r(p);else if(ne.startTime<=Q)r(p),ne.sortIndex=ne.expirationTime,e(d,ne);else break;ne=n(p)}}function R(Q){if(S=!1,U(Q),!E)if(n(d)!==null)E=!0,pe(D);else{var ne=n(p);ne!==null&&ge(R,ne.startTime-Q)}}function D(Q,ne){E=!1,S&&(S=!1,C(F),F=-1),x=!0;var J=v;try{for(U(ne),y=n(d);y!==null&&(!(y.expirationTime>ne)||Q&&!ae());){var I=y.callback;if(typeof I=="function"){y.callback=null,v=y.priorityLevel;var B=I(y.expirationTime<=ne);ne=t.unstable_now(),typeof B=="function"?y.callback=B:y===n(d)&&r(d),U(ne)}else r(d);y=n(d)}if(y!==null)var ce=!0;else{var de=n(p);de!==null&&ge(R,de.startTime-ne),ce=!1}return ce}finally{y=null,v=J,x=!1}}var z=!1,q=null,F=-1,j=5,oe=-1;function ae(){return!(t.unstable_now()-oe<j)}function M(){if(q!==null){var Q=t.unstable_now();oe=Q;var ne=!0;try{ne=q(!0,Q)}finally{ne?H():(z=!1,q=null)}}else z=!1}var H;if(typeof A=="function")H=function(){A(M)};else if(typeof MessageChannel<"u"){var fe=new MessageChannel,xe=fe.port2;fe.port1.onmessage=M,H=function(){xe.postMessage(null)}}else H=function(){k(M,0)};function pe(Q){q=Q,z||(z=!0,H())}function ge(Q,ne){F=k(function(){Q(t.unstable_now())},ne)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(Q){Q.callback=null},t.unstable_continueExecution=function(){E||x||(E=!0,pe(D))},t.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"):j=0<Q?Math.floor(1e3/Q):5},t.unstable_getCurrentPriorityLevel=function(){return v},t.unstable_getFirstCallbackNode=function(){return n(d)},t.unstable_next=function(Q){switch(v){case 1:case 2:case 3:var ne=3;break;default:ne=v}var J=v;v=ne;try{return Q()}finally{v=J}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(Q,ne){switch(Q){case 1:case 2:case 3:case 4:case 5:break;default:Q=3}var J=v;v=Q;try{return ne()}finally{v=J}},t.unstable_scheduleCallback=function(Q,ne,J){var I=t.unstable_now();switch(typeof J=="object"&&J!==null?(J=J.delay,J=typeof J=="number"&&0<J?I+J:I):J=I,Q){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=J+B,Q={id:g++,callback:ne,priorityLevel:Q,startTime:J,expirationTime:B,sortIndex:-1},J>I?(Q.sortIndex=J,e(p,Q),n(d)===null&&Q===n(p)&&(S?(C(F),F=-1):S=!0,ge(R,J-I))):(Q.sortIndex=B,e(d,Q),E||x||(E=!0,pe(D))),Q},t.unstable_shouldYield=ae,t.unstable_wrapCallback=function(Q){var ne=v;return function(){var J=v;v=ne;try{return Q.apply(this,arguments)}finally{v=J}}}}(pu)),pu}var Lp;function T0(){return Lp||(Lp=1,hu.exports=b0()),hu.exports}/**
|
||||
* @license React
|
||||
* react-dom.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/var Mp;function C0(){if(Mp)return xt;Mp=1;var t=Qu(),e=T0();function n(s){for(var i="https://reactjs.org/docs/error-decoder.html?invariant="+s,a=1;a<arguments.length;a++)i+="&args[]="+encodeURIComponent(arguments[a]);return"Minified React error #"+s+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function l(s,i){c(s,i),c(s+"Capture",i)}function c(s,i){for(o[s]=i,s=0;s<i.length;s++)r.add(i[s])}var u=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),d=Object.prototype.hasOwnProperty,p=/^[: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]*$/,g={},y={};function v(s){return d.call(y,s)?!0:d.call(g,s)?!1:p.test(s)?y[s]=!0:(g[s]=!0,!1)}function x(s,i,a,f){if(a!==null&&a.type===0)return!1;switch(typeof i){case"function":case"symbol":return!0;case"boolean":return f?!1:a!==null?!a.acceptsBooleans:(s=s.toLowerCase().slice(0,5),s!=="data-"&&s!=="aria-");default:return!1}}function E(s,i,a,f){if(i===null||typeof i>"u"||x(s,i,a,f))return!0;if(f)return!1;if(a!==null)switch(a.type){case 3:return!i;case 4:return i===!1;case 5:return isNaN(i);case 6:return isNaN(i)||1>i}return!1}function S(s,i,a,f,h,m,_){this.acceptsBooleans=i===2||i===3||i===4,this.attributeName=f,this.attributeNamespace=h,this.mustUseProperty=a,this.propertyName=s,this.type=i,this.sanitizeURL=m,this.removeEmptyString=_}var k={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(s){k[s]=new S(s,0,!1,s,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(s){var i=s[0];k[i]=new S(i,1,!1,s[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(s){k[s]=new S(s,2,!1,s.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(s){k[s]=new S(s,2,!1,s,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(s){k[s]=new S(s,3,!1,s.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(s){k[s]=new S(s,3,!0,s,null,!1,!1)}),["capture","download"].forEach(function(s){k[s]=new S(s,4,!1,s,null,!1,!1)}),["cols","rows","size","span"].forEach(function(s){k[s]=new S(s,6,!1,s,null,!1,!1)}),["rowSpan","start"].forEach(function(s){k[s]=new S(s,5,!1,s.toLowerCase(),null,!1,!1)});var C=/[\-:]([a-z])/g;function A(s){return s[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(s){var i=s.replace(C,A);k[i]=new S(i,1,!1,s,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(s){var i=s.replace(C,A);k[i]=new S(i,1,!1,s,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(s){var i=s.replace(C,A);k[i]=new S(i,1,!1,s,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(s){k[s]=new S(s,1,!1,s.toLowerCase(),null,!1,!1)}),k.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(s){k[s]=new S(s,1,!1,s.toLowerCase(),null,!0,!0)});function U(s,i,a,f){var h=k.hasOwnProperty(i)?k[i]:null;(h!==null?h.type!==0:f||!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=
Line truncated
|
||||
`+I+s}var ce=!1;function de(s,i){if(!s||ce)return"";ce=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(i)if(i=function(){throw Error()},Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(O){var f=O}Reflect.construct(s,[],i)}else{try{i.call()}catch(O){f=O}s.call(i.prototype)}else{try{throw Error()}catch(O){f=O}s()}}catch(O){if(O&&f&&typeof O.stack=="string"){for(var h=O.stack.split(`
|
||||
`),m=f.stack.split(`
|
||||
`),_=h.length-1,b=m.length-1;1<=_&&0<=b&&h[_]!==m[b];)b--;for(;1<=_&&0<=b;_--,b--)if(h[_]!==m[b]){if(_!==1||b!==1)do if(_--,b--,0>b||h[_]!==m[b]){var T=`
|
||||
`+h[_].replace(" at new "," at ");return s.displayName&&T.includes("<anonymous>")&&(T=T.replace("<anonymous>",s.displayName)),T}while(1<=_&&0<=b);break}}}finally{ce=!1,Error.prepareStackTrace=a}return(s=s?s.displayName||s.name:"")?B(s):""}function ye(s){switch(s.tag){case 5:return B(s.type);case 16:return B("Lazy");case 13:return B("Suspense");case 19:return B("SuspenseList");case 0:case 2:case 15:return s=de(s.type,!1),s;case 11:return s=de(s.type.render,!1),s;case 1:return s=de(s.type,!0),s;default:return""}}function me(s){if(s==null)return null;if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case q:return"Fragment";case z:return"Portal";case j:return"Profiler";case F:return"StrictMode";case H:return"Suspense";case fe:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case ae:return(s.displayName||"Context")+".Consumer";case oe:return(s._context.displayName||"Context")+".Provider";case M:var i=s.render;return s=s.displayName,s||(s=i.displayName||i.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case xe:return i=s.displayName||null,i!==null?i:me(s.type)||"Memo";case pe:i=s._payload,s=s._init;try{return me(s(i))}catch{}}return null}function ve(s){var i=s.type;switch(s.tag){case 24:return"Cache";case 9:return(i.displayName||"Context")+".Consumer";case 10:return(i._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return s=i.render,s=s.displayName||s.name||"",i.displayName||(s!==""?"ForwardRef("+s+")":"ForwardRef");case 7:return"Fragment";case 5:return i;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return me(i);case 8:return i===F?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i}return null}function _e(s){switch(typeof s){case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function ke(s){var i=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function Ne(s){var i=ke(s)?"checked":"value",a=Object.getOwnPropertyDescriptor(s.constructor.prototype,i),f=""+s[i];if(!s.hasOwnProperty(i)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var h=a.get,m=a.set;return Object.defineProperty(s,i,{configurable:!0,get:function(){return h.call(this)},set:function(_){f=""+_,m.call(this,_)}}),Object.defineProperty(s,i,{enumerable:a.enumerable}),{getValue:function(){return f},setValue:function(_){f=""+_},stopTracking:function(){s._valueTracker=null,delete s[i]}}}}function sr(s){s._valueTracker||(s._valueTracker=Ne(s))}function no(s){if(!s)return!1;var i=s._valueTracker;if(!i)return!0;var a=i.getValue(),f="";return s&&(f=ke(s)?s.checked?"true":"false":s.value),s=f,s!==a?(i.setValue(s),!0):!1}function $r(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}function ir(s,i){var a=i.checked;return J({},i,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??s._wrapperState.initialChecked})}function zs(s,i){var a=i.defaultValue==null?"":i.defaultValue,f=i.checked!=null?i.checked:i.defaultChecked;a=_e(i.value!=null?i.value:a),s._wrapperState={initialChecked:f,initialValue:a,controlled:i.type==="checkbox"||i.type==="radio"?i.checked!=null:i.value!=null}}function Us(s,i){i=i.checked,i!=null&&U(s,"checked",i,!1)}function rn(s,i){Us(s,i);var a=_e(i.value),f=i.type;if(a!=null)f==="number"?(a===0&&s.value===""||s.value!=a)&&(s.value=""+a):s.value!==""+a&&(s.value=""+a);else if(f==="submit"||f==="reset"){s.removeAttribute("value");return}i.hasOwnProperty("value")?Hs(s,i.type,a):i.hasOwnProperty("defaultValue")&&Hs(s,i.type,_e(i.defaultValue)),i.checked==null&&i.defaultChecked!=null&&(s.defaultChecked=!!i.defaultChecked)}function ro(s,i,a){if(i.hasOwnProperty("value")||i.hasOwnProperty("defaultValue")){var f=i.type;if(!(f!=="submit"&&f!=="reset"||i.value!==void 0&&i.value!==null))return;i=""+s._wrapperState.initialValue,a||i===s.value||(s.value=i),s.defaultValue=i}a=s.name,a!==""&&(s.name=""),s.defaultChecked=!!s._wrapperState.initialChecked,a!==""&&(s.name=a)}function Hs(s,i,a){(i!=="number"||$r(s.ownerDocument)!==s)&&(a==null?s.defaultValue=""+s._wrapperState.initialValue:s.defaultValue!==""+a&&(s.defaultValue=""+a))}var or=Array.isArray;function In(s,i,a,f){if(s=s.options,i){i={};for(var h=0;h<a.length;h++)i["$"+a[h]]=!0;for(a=0;a<s.length;a++)h=i.hasOwnProperty("$"+s[a].value),s[a].selected!==h&&(s[a].selected=h),h&&f&&(s[a].defaultSelected=!0)}else{for(a=""+_e(a),i=null,h=0;h<s.length;h++){if(s[h].value===a){s[h].selected=!0,f&&(s[h].defaultSelected=!0);return}i!==null||s[h].disabled||(i=s[h])}i!==null&&(i.selected=!0)}}function Dr(s,i){if(i.dangerouslySetInn
Line truncated
|
||||
`).replace(Cw,"")}function Ao(s,i,a){if(i=Hd(i),Hd(s)!==i&&a)throw Error(n(425))}function Io(){}var tc=null,nc=null;function rc(s,i){return s==="textarea"||s==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var sc=typeof setTimeout=="function"?setTimeout:void 0,Nw=typeof clearTimeout=="function"?clearTimeout:void 0,qd=typeof Promise=="function"?Promise:void 0,Aw=typeof queueMicrotask=="function"?queueMicrotask:typeof qd<"u"?function(s){return qd.resolve(null).then(s).catch(Iw)}:sc;function Iw(s){setTimeout(function(){throw s})}function ic(s,i){var a=i,f=0;do{var h=a.nextSibling;if(s.removeChild(a),h&&h.nodeType===8)if(a=h.data,a==="/$"){if(f===0){s.removeChild(h),Zs(i);return}f--}else a!=="$"&&a!=="$?"&&a!=="$!"||f++;a=h}while(a);Zs(i)}function Dn(s){for(;s!=null;s=s.nextSibling){var i=s.nodeType;if(i===1||i===3)break;if(i===8){if(i=s.data,i==="$"||i==="$!"||i==="$?")break;if(i==="/$")return null}}return s}function Vd(s){s=s.previousSibling;for(var i=0;s;){if(s.nodeType===8){var a=s.data;if(a==="$"||a==="$!"||a==="$?"){if(i===0)return s;i--}else a==="/$"&&i++}s=s.previousSibling}return null}var Gr=Math.random().toString(36).slice(2),on="__reactFiber$"+Gr,ui="__reactProps$"+Gr,pn="__reactContainer$"+Gr,oc="__reactEvents$"+Gr,Lw="__reactListeners$"+Gr,Mw="__reactHandles$"+Gr;function fr(s){var i=s[on];if(i)return i;for(var a=s.parentNode;a;){if(i=a[pn]||a[on]){if(a=i.alternate,i.child!==null||a!==null&&a.child!==null)for(s=Vd(s);s!==null;){if(a=s[on])return a;s=Vd(s)}return i}s=a,a=s.parentNode}return null}function fi(s){return s=s[on]||s[pn],!s||s.tag!==5&&s.tag!==6&&s.tag!==13&&s.tag!==3?null:s}function Qr(s){if(s.tag===5||s.tag===6)return s.stateNode;throw Error(n(33))}function Lo(s){return s[ui]||null}var lc=[],Jr=-1;function Fn(s){return{current:s}}function Ie(s){0>Jr||(s.current=lc[Jr],lc[Jr]=null,Jr--)}function Ce(s,i){Jr++,lc[Jr]=s.current,s.current=i}var Bn={},st=Fn(Bn),gt=Fn(!1),dr=Bn;function Xr(s,i){var a=s.type.contextTypes;if(!a)return Bn;var f=s.stateNode;if(f&&f.__reactInternalMemoizedUnmaskedChildContext===i)return f.__reactInternalMemoizedMaskedChildContext;var h={},m;for(m in a)h[m]=i[m];return f&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=i,s.__reactInternalMemoizedMaskedChildContext=h),h}function yt(s){return s=s.childContextTypes,s!=null}function Mo(){Ie(gt),Ie(st)}function Wd(s,i,a){if(st.current!==Bn)throw Error(n(168));Ce(st,i),Ce(gt,a)}function Kd(s,i,a){var f=s.stateNode;if(i=i.childContextTypes,typeof f.getChildContext!="function")return a;f=f.getChildContext();for(var h in f)if(!(h in i))throw Error(n(108,ve(s)||"Unknown",h));return J({},a,f)}function jo(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||Bn,dr=st.current,Ce(st,s),Ce(gt,gt.current),!0}function Gd(s,i,a){var f=s.stateNode;if(!f)throw Error(n(169));a?(s=Kd(s,i,dr),f.__reactInternalMemoizedMergedChildContext=s,Ie(gt),Ie(st),Ce(st,s)):Ie(gt),Ce(gt,a)}var mn=null,Po=!1,ac=!1;function Qd(s){mn===null?mn=[s]:mn.push(s)}function jw(s){Po=!0,Qd(s)}function zn(){if(!ac&&mn!==null){ac=!0;var s=0,i=Ee;try{var a=mn;for(Ee=1;s<a.length;s++){var f=a[s];do f=f(!0);while(f!==null)}mn=null,Po=!1}catch(h){throw mn!==null&&(mn=mn.slice(s+1)),Xf(Ia,zn),h}finally{Ee=i,ac=!1}}return null}var Yr=[],Zr=0,Oo=null,Ro=0,jt=[],Pt=0,hr=null,gn=1,yn="";function pr(s,i){Yr[Zr++]=Ro,Yr[Zr++]=Oo,Oo=s,Ro=i}function Jd(s,i,a){jt[Pt++]=gn,jt[Pt++]=yn,jt[Pt++]=hr,hr=s;var f=gn;s=yn;var h=32-Kt(f)-1;f&=~(1<<h),a+=1;var m=32-Kt(i)+h;if(30<m){var _=h-h%5;m=(f&(1<<_)-1).toString(32),f>>=_,h-=_,gn=1<<32-Kt(i)+h|a<<h|f,yn=m+s}else gn=1<<m|a<<h|f,yn=s}function cc(s){s.return!==null&&(pr(s,1),Jd(s,1,0))}function uc(s){for(;s===Oo;)Oo=Yr[--Zr],Yr[Zr]=null,Ro=Yr[--Zr],Yr[Zr]=null;for(;s===hr;)hr=jt[--Pt],jt[Pt]=null,yn=jt[--Pt],jt[Pt]=null,gn=jt[--Pt],jt[Pt]=null}var Nt=null,At=null,Le=!1,Qt=null;function Xd(s,i){var a=Dt(5,null,null,0);a.elementType="DELETED",a.stateNode=i,a.return=s,i=s.deletions,i===null?(s.deletions=[a],s.flags|=16):i.push(a)}function Yd(s,i){switch(s.tag){case 5:var a=s.type;return i=i.nodeType!==1||a.toLowerCase()!==i.nodeName.toLowerCase()?null:i,i!==null?(s.stateNode=i,Nt=s,At=Dn(i.firstChild),!0):!1;case 6:return i=s.pendingProps===""||i.nodeType!==3?null:i,i!==null?(s.stateNode=i,Nt=s,At=null,!0):!1;case 13:return i=i.nodeType!==8?null:i,i!==null?(a=hr!==null?{id:gn,overflow:yn}:null,s.memoizedState={dehydrated:i,treeContext:a,retryLane:1073741824},a=Dt(18,null,null,0),a.stateNode=i,a.return=s,s.child=a,Nt=s,At=null,!0):!1;default:return!1}}function fc(s){return(s.mode&1)!==0&&(s.flags&128)===0}function dc(s){if(Le){var i=At;if(i){var a=i;if(!Yd(s,i)){if(fc(s))throw Error(n(418));i=Dn(a.nextSibling);var f=Nt;i&&Yd(s,i)?Xd(f,a):(s.flags=s.flags&-4097|2,Le=!1,Nt=s)}}else{if(fc(s))throw Error(n(418));s.flags=s.flags&-4097|2,Le=!1,Nt=s}}}function Zd(s){for(s=s.
Line truncated
|
||||
Error generating stack: `+m.message+`
|
||||
`+m.stack}return{value:s,source:i,stack:h,digest:null}}function Pc(s,i,a){return{value:s,source:null,stack:a??null,digest:i??null}}function Oc(s,i){try{console.error(i.value)}catch(a){setTimeout(function(){throw a})}}var Uw=typeof WeakMap=="function"?WeakMap:Map;function jh(s,i,a){a=wn(-1,a),a.tag=3,a.payload={element:null};var f=i.value;return a.callback=function(){nl||(nl=!0,Jc=f),Oc(s,i)},a}function Ph(s,i,a){a=wn(-1,a),a.tag=3;var f=s.type.getDerivedStateFromError;if(typeof f=="function"){var h=i.value;a.payload=function(){return f(h)},a.callback=function(){Oc(s,i)}}var m=s.stateNode;return m!==null&&typeof m.componentDidCatch=="function"&&(a.callback=function(){Oc(s,i),typeof f!="function"&&(Vn===null?Vn=new Set([this]):Vn.add(this));var _=i.stack;this.componentDidCatch(i.value,{componentStack:_!==null?_:""})}),a}function Oh(s,i,a){var f=s.pingCache;if(f===null){f=s.pingCache=new Uw;var h=new Set;f.set(i,h)}else h=f.get(i),h===void 0&&(h=new Set,f.set(i,h));h.has(a)||(h.add(a),s=n0.bind(null,s,i,a),i.then(s,s))}function Rh(s){do{var i;if((i=s.tag===13)&&(i=s.memoizedState,i=i!==null?i.dehydrated!==null:!0),i)return s;s=s.return}while(s!==null);return null}function $h(s,i,a,f,h){return(s.mode&1)===0?(s===i?s.flags|=65536:(s.flags|=128,a.flags|=131072,a.flags&=-52805,a.tag===1&&(a.alternate===null?a.tag=17:(i=wn(-1,1),i.tag=2,Hn(a,i,1))),a.lanes|=1),s):(s.flags|=65536,s.lanes=h,s)}var Hw=R.ReactCurrentOwner,vt=!1;function ut(s,i,a,f){i.child=s===null?rh(i,null,a,f):ts(i,s.child,a,f)}function Dh(s,i,a,f,h){a=a.render;var m=i.ref;return rs(i,h),f=Tc(s,i,a,f,m,h),a=Cc(),s!==null&&!vt?(i.updateQueue=s.updateQueue,i.flags&=-2053,s.lanes&=~h,Sn(s,i,h)):(Le&&a&&cc(i),i.flags|=1,ut(s,i,f,h),i.child)}function Fh(s,i,a,f,h){if(s===null){var m=a.type;return typeof m=="function"&&!ru(m)&&m.defaultProps===void 0&&a.compare===null&&a.defaultProps===void 0?(i.tag=15,i.type=m,Bh(s,i,m,f,h)):(s=al(a.type,null,f,i,i.mode,h),s.ref=i.ref,s.return=i,i.child=s)}if(m=s.child,(s.lanes&h)===0){var _=m.memoizedProps;if(a=a.compare,a=a!==null?a:ii,a(_,f)&&s.ref===i.ref)return Sn(s,i,h)}return i.flags|=1,s=Qn(m,f),s.ref=i.ref,s.return=i,i.child=s}function Bh(s,i,a,f,h){if(s!==null){var m=s.memoizedProps;if(ii(m,f)&&s.ref===i.ref)if(vt=!1,i.pendingProps=f=m,(s.lanes&h)!==0)(s.flags&131072)!==0&&(vt=!0);else return i.lanes=s.lanes,Sn(s,i,h)}return Rc(s,i,a,f,h)}function zh(s,i,a){var f=i.pendingProps,h=f.children,m=s!==null?s.memoizedState:null;if(f.mode==="hidden")if((i.mode&1)===0)i.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ce(ls,It),It|=a;else{if((a&1073741824)===0)return s=m!==null?m.baseLanes|a:a,i.lanes=i.childLanes=1073741824,i.memoizedState={baseLanes:s,cachePool:null,transitions:null},i.updateQueue=null,Ce(ls,It),It|=s,null;i.memoizedState={baseLanes:0,cachePool:null,transitions:null},f=m!==null?m.baseLanes:a,Ce(ls,It),It|=f}else m!==null?(f=m.baseLanes|a,i.memoizedState=null):f=a,Ce(ls,It),It|=f;return ut(s,i,h,a),i.child}function Uh(s,i){var a=i.ref;(s===null&&a!==null||s!==null&&s.ref!==a)&&(i.flags|=512,i.flags|=2097152)}function Rc(s,i,a,f,h){var m=yt(a)?dr:st.current;return m=Xr(i,m),rs(i,h),a=Tc(s,i,a,f,m,h),f=Cc(),s!==null&&!vt?(i.updateQueue=s.updateQueue,i.flags&=-2053,s.lanes&=~h,Sn(s,i,h)):(Le&&f&&cc(i),i.flags|=1,ut(s,i,a,h),i.child)}function Hh(s,i,a,f,h){if(yt(a)){var m=!0;jo(i)}else m=!1;if(rs(i,h),i.stateNode===null)Xo(s,i),Lh(i,a,f),jc(i,a,f,h),f=!0;else if(s===null){var _=i.stateNode,b=i.memoizedProps;_.props=b;var T=_.context,O=a.contextType;typeof O=="object"&&O!==null?O=Ot(O):(O=yt(a)?dr:st.current,O=Xr(i,O));var W=a.getDerivedStateFromProps,K=typeof W=="function"||typeof _.getSnapshotBeforeUpdate=="function";K||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(b!==f||T!==O)&&Mh(i,_,f,O),Un=!1;var V=i.memoizedState;_.state=V,Uo(i,f,_,h),T=i.memoizedState,b!==f||V!==T||gt.current||Un?(typeof W=="function"&&(Mc(i,a,W,f),T=i.memoizedState),(b=Un||Ih(i,a,b,f,V,T,O))?(K||typeof _.UNSAFE_componentWillMount!="function"&&typeof _.componentWillMount!="function"||(typeof _.componentWillMount=="function"&&_.componentWillMount(),typeof _.UNSAFE_componentWillMount=="function"&&_.UNSAFE_componentWillMount()),typeof _.componentDidMount=="function"&&(i.flags|=4194308)):(typeof _.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=f,i.memoizedState=T),_.props=f,_.state=T,_.context=O,f=b):(typeof _.componentDidMount=="function"&&(i.flags|=4194308),f=!1)}else{_=i.stateNode,ih(s,i),b=i.memoizedProps,O=i.type===i.elementType?b:Jt(i.type,b),_.props=O,K=i.pendingProps,V=_.context,T=a.contextType,typeof T=="object"&&T!==null?T=Ot(T):(T=yt(a)?dr:st.current,T=Xr(i,T));var X=a.getDerivedStateFromProps;(W=typeof X=="function"||typeof _.getSnapshotBeforeUpdate=="function")||typeof _.UNSAFE_componentWillReceiveProps!="function"&&typeof _.componentWillReceiveProps!="function"||(b!==K||V!==T)&&Mh(i,_,f,T),Un=!1,V=i.memoizedState,_.state=V,Uo(i,f,_,h
Line truncated
|
||||
`:this.value}}class Ms extends Ue{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 Zu extends Ms{constructor(e){super(),this.tokenType="IDENT",this.value=e}toString(){return"IDENT("+this.value+")"}toSource(){return Xi(this.value)}}class Di extends Ms{constructor(e){super(),this.tokenType="FUNCTION",this.value=e,this.mirror=")"}toString(){return"FUNCTION("+this.value+")"}toSource(){return Xi(this.value)+"("}}class Zm extends Ms{constructor(e){super(),this.tokenType="AT-KEYWORD",this.value=e}toString(){return"AT("+this.value+")"}toSource(){return"@"+Xi(this.value)}}class eg extends Ms{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"?"#"+Xi(this.value):"#"+sS(this.value)}}class ef extends Ms{constructor(e){super(),this.tokenType="STRING",this.value=e}toString(){return'"'+sg(this.value)+'"'}}class tg extends Ms{constructor(e){super(),this.tokenType="URL",this.value=e}toString(){return"URL("+this.value+")"}toSource(){return'url("'+sg(this.value)+'")'}}class ng extends Ue{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 rg extends Ue{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 rS extends Ue{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 n=Xi(this.unit);return n[0].toLowerCase()==="e"&&(n[1]==="-"||Ve(n.charCodeAt(1),48,57))&&(n="\\65 "+n.slice(1,n.length)),e+n}}function Xi(t){t=""+t;let e="";const n=t.charCodeAt(0);for(let r=0;r<t.length;r++){const o=t.charCodeAt(r);if(o===0)throw new Xu("Invalid character: the input contains U+0000.");Ve(o,1,31)||o===127||r===0&&Ve(o,48,57)||r===1&&Ve(o,48,57)&&n===45?e+="\\"+o.toString(16)+" ":o>=128||o===45||o===95||Ve(o,48,57)||Ve(o,65,90)||Ve(o,97,122)?e+=t[r]:e+="\\"+t[r]}return e}function sS(t){t=""+t;let e="";for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);if(r===0)throw new Xu("Invalid character: the input contains U+0000.");r>=128||r===45||r===95||Ve(r,48,57)||Ve(r,65,90)||Ve(r,97,122)?e+=t[n]:e+="\\"+r.toString(16)+" "}return e}function sg(t){t=""+t;let e="";for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);if(r===0)throw new Xu("Invalid character: the input contains U+0000.");Ve(r,1,31)||r===127?e+="\\"+r.toString(16)+" ":r===34||r===92?e+="\\"+t[n]:e+=t[n]}return e}class Et extends Error{}function iS(t,e){let n;try{n=zm(t),n[n.length-1]instanceof Il||n.push(new Il)}catch(j){const oe=j.message+` while parsing css selector "${t}". Did you mean to CSS.escape it?`,ae=(j.stack||"").indexOf(j.message);throw ae!==-1&&(j.stack=j.stack.substring(0,ae)+oe+j.stack.substring(ae+j.message.length)),j.message=oe,j}const r=n.find(j=>j instanceof Zm||j instanceof Um||j instanceof Al||j instanceof Ym||j instanceof Hm||j instanceof qm||j instanceof Wm||j instanceof Gm||j instanceof Qm||j instanceof tg||j instanceof rg);if(r)throw new Et(`Unsupported token "${r.toSource()}" while parsing css selector "${t}". Did you mean to CSS.escape it?`);let o=0;const l=new Set;function c(){return new Et(`Unexpected token "${n[o].toSource()}" while parsing css selector "${t}". Did you mean to CSS.escape it?`)}function u(){for(;n[o]instanceof Hl;)o++}function d(j=o){return n[j]instanceof Zu}function p(j=o){return n[j]instanceof ef}function g(j=o){return n[j]instanceof ng}function y(j=o){return n[j]instanceof Km}function v(j=o){return n[j]instanceof Xm}function x(j=o){return n[j]instanceof Yu}function E(j=o){return n[j]instanceof Di}function S(j=o){return n[j]instanceof tt&&n[j].value==="*"}function k(j=o){return n[j]instanceof Il}function C(j=o){return n[j]instanceof tt&&[">","+","~"].includes(n[j].value)}function A(j=o){return y(j)||x(j)||k(j)||C(j)||n[j]instanceof Hl}function U(){const j=[R()];for(;u(),!!y();)o++,j.push(R());return j}function R(){return u(),g()||p()?n[o++].value:D()}function D(){const j={simples:[]};for(u(),C()?j.simples.push({selector:{functions:[{name:"scope",args:[]}]},combinator:""}):j.simples.push(
Line truncated
|
||||
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`},PS=({diff:t,noTargetBlank:e,hideDetails:n})=>{const[r,o]=$.useState(t.diff?"diff":"actual"),[l,c]=$.useState(!1),[u,d]=$.useState(null),[p,g]=$.useState("Expected"),[y,v]=$.useState(null),[x,E]=$.useState(null),[S,k]=jr();$.useEffect(()=>{(async()=>{var j,oe,ae,M;d(await mu((j=t.expected)==null?void 0:j.attachment.path)),g(((oe=t.expected)==null?void 0:oe.title)||"Expected"),v(await mu((ae=t.actual)==null?void 0:ae.attachment.path)),E(await mu((M=t.diff)==null?void 0:M.attachment.path))})()},[t]);const C=u&&y&&x,A=C?Math.max(u.naturalWidth,y.naturalWidth,200):500,U=C?Math.max(u.naturalHeight,y.naturalHeight,200):500,R=Math.min(1,(S.width-30)/A),D=Math.min(1,(S.width-50)/A/2),z=A*R,q=U*R,F={flex:"none",margin:"0 10px",cursor:"pointer",userSelect:"none"};return w.jsx("div",{"data-testid":"test-result-image-mismatch",style:{display:"flex",flexDirection:"column",alignItems:"center",flex:"auto"},ref:k,children:C&&w.jsxs(w.Fragment,{children:[w.jsxs("div",{"data-testid":"test-result-image-mismatch-tabs",style:{display:"flex",margin:"10px 0 20px"},children:[t.diff&&w.jsx("div",{style:{...F,fontWeight:r==="diff"?600:"initial"},onClick:()=>o("diff"),children:"Diff"}),w.jsx("div",{style:{...F,fontWeight:r==="actual"?600:"initial"},onClick:()=>o("actual"),children:"Actual"}),w.jsx("div",{style:{...F,fontWeight:r==="expected"?600:"initial"},onClick:()=>o("expected"),children:p}),w.jsx("div",{style:{...F,fontWeight:r==="sxs"?600:"initial"},onClick:()=>o("sxs"),children:"Side by side"}),w.jsx("div",{style:{...F,fontWeight:r==="slider"?600:"initial"},onClick:()=>o("slider"),children:"Slider"})]}),w.jsxs("div",{style:{display:"flex",justifyContent:"center",flex:"auto",minHeight:q+60},children:[t.diff&&r==="diff"&&w.jsx(En,{image:x,alt:"Diff",hideSize:n,canvasWidth:z,canvasHeight:q,scale:R}),t.diff&&r==="actual"&&w.jsx(En,{image:y,alt:"Actual",hideSize:n,canvasWidth:z,canvasHeight:q,scale:R}),t.diff&&r==="expected"&&w.jsx(En,{image:u,alt:p,hideSize:n,canvasWidth:z,canvasHeight:q,scale:R}),t.diff&&r==="slider"&&w.jsx(OS,{expectedImage:u,actualImage:y,hideSize:n,canvasWidth:z,canvasHeight:q,scale:R,expectedTitle:p}),t.diff&&r==="sxs"&&w.jsxs("div",{style:{display:"flex"},children:[w.jsx(En,{image:u,title:p,hideSize:n,canvasWidth:D*A,canvasHeight:D*U,scale:D}),w.jsx(En,{image:l?x:y,title:l?"Diff":"Actual",onClick:()=>c(!l),hideSize:n,canvasWidth:D*A,canvasHeight:D*U,scale:D})]}),!t.diff&&r==="actual"&&w.jsx(En,{image:y,title:"Actual",hideSize:n,canvasWidth:z,canvasHeight:q,scale:R}),!t.diff&&r==="expected"&&w.jsx(En,{image:u,title:p,hideSize:n,canvasWidth:z,canvasHeight:q,scale:R}),!t.diff&&r==="sxs"&&w.jsxs("div",{style:{display:"flex"},children:[w.jsx(En,{image:u,title:p,canvasWidth:D*A,canvasHeight:D*U,scale:D}),w.jsx(En,{image:y,title:"Actual",canvasWidth:D*A,canvasHeight:D*U,scale:D})]})]}),!n&&w.jsxs("div",{style:{alignSelf:"start",lineHeight:"18px",marginLeft:"15px"},children:[w.jsx("div",{children:t.diff&&w.jsx("a",{target:"_blank",href:t.diff.attachment.path,rel:"noreferrer",children:t.diff.attachment.name})}),w.jsx("div",{children:w.jsx("a",{target:e?"":"_blank",href:t.actual.attachment.path,rel:"noreferrer",children:t.actual.attachment.name})}),w.jsx("div",{children:w.jsx("a",{target:e?"":"_blank",href:t.expected.attachment.path,rel:"noreferrer",children:t.expected.attachment.name})})]})]})})},OS=({expectedImage:t,actualImage:e,canvasWidth:n,canvasHeight:r,scale:o,expectedTitle:l,hideSize:c})=>{const u={position:"absolute",top:0,left:0},[d,p]=$.useState(n/2),g=t.naturalWidth===e.naturalWidth&&t.naturalHeight===e.naturalHeight;return w.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column",userSelect:"none"},children:[!c&&w.jsxs("div",{style:{margin:5},children:[!g&&w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"Expected "}),w.jsx("span",{children:t.naturalWidth}),w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),w.jsx("span",{children:t.naturalHeight}),!g&&w.jsx("span",{style:{flex:"none",margin:"0 5px 0 15px"},children:"Actual "}),!g&&w.jsx("span",{children:e.naturalWidth}),!g&&w.jsx("span",{style:{flex:"none",margin:"0 5px"},children:"x"}),!g&&w.jsx("span",{children:e.naturalHeight})]}),w.jsxs("div",{style:{position:"relative",width:n,height:r,margin:15,...Ou},children:[w.jsx(hg,{orientation:"horizontal",offsets:[d],setOffsets:y=>p(y[0]),resizerColor:"#57606a80",resizerWidth:6}),w.jsx("img",{alt:l,style:{width:t.naturalWidth*o,height:t.naturalHeight*o},draggable:"false",src:t.src}),w.jsx("div",{style:{...u,bottom:0,overflow:"hidden",width:d,...Ou},children:w.jsx("img",{alt:"Actual",style:{width:e.naturalWidth*o,height:e.naturalHeight*o},draggable:"false",src:e.src})})]})]})},En=({image:t,title:e,alt:n,hideSize:r,canvasWidth:o,canvasHeight:l,scale:c,onClick:u})=>w.jsxs("div",{style:{flex:"none",display:"flex",alignItems:"center",flexDirection:"column"},children:[!r&&w.jsxs("div",{style:{margin:5},children:[e&&
Line truncated
|
||||
`).length:0;return Math.min(Math.max(5,S),20)*FS},[o]),E=w.jsxs("span",{style:{marginLeft:5},ref:g,"aria-label":t.name,children:[w.jsx("span",{children:pg(t.name)}),v&&w.jsx("a",{style:{marginLeft:5},href:Ml(t),children:"download"})]});return!y||!v?w.jsx("div",{style:{marginLeft:20},children:E}):w.jsxs("div",{className:ze(d&&"yellow-flash"),children:[w.jsx(VS,{title:E,expanded:n,setExpanded:r,expandOnTitleClick:!0,children:c&&w.jsx("i",{children:c})}),n&&o!==null&&w.jsx("div",{className:"vbox",style:{height:x},children:w.jsx(Ns,{text:o,readOnly:!0,mimeType:t.contentType,linkify:!0,lineNumbers:!0,wrapLines:!1})})]})},GS=({model:t,revealedAttachment:e})=>{const{diffMap:n,screenshots:r,attachments:o}=$.useMemo(()=>{const l=new Set((t==null?void 0:t.visibleAttachments)??[]),c=new Set,u=new Map;for(const d of l){if(!d.path&&!d.sha1)continue;const p=d.name.match(/^(.*)-(expected|actual|diff)\.png$/);if(p){const g=p[1],y=p[2],v=u.get(g)||{expected:void 0,actual:void 0,diff:void 0};v[y]=d,u.set(g,v),l.delete(d)}else d.contentType.startsWith("image/")&&(c.add(d),l.delete(d))}return{diffMap:u,attachments:l,screenshots:c}},[t]);return!n.size&&!r.size&&!o.size?w.jsx(Pr,{text:"No attachments"}):w.jsxs("div",{className:"attachments-tab",children:[[...n.values()].map(({expected:l,actual:c,diff:u})=>w.jsxs(w.Fragment,{children:[l&&c&&w.jsx("div",{className:"attachments-section",children:"Image diff"}),l&&c&&w.jsx(PS,{noTargetBlank:!0,diff:{name:"Image diff",expected:{attachment:{...l,path:Ml(l)},title:"Expected"},actual:{attachment:{...c,path:Ml(c)}},diff:u?{attachment:{...u,path:Ml(u)}}:void 0}})]})),r.size?w.jsx("div",{className:"attachments-section",children:"Screenshots"}):void 0,[...r.values()].map((l,c)=>{const u=ia(l);return w.jsxs("div",{className:"attachment-item",children:[w.jsx("div",{children:w.jsx("img",{draggable:"false",src:u})}),w.jsx("div",{children:w.jsx("a",{target:"_blank",href:u,rel:"noreferrer",children:l.name})})]},`screenshot-${c}`)}),o.size?w.jsx("div",{className:"attachments-section",children:"Attachments"}):void 0,[...o.values()].map((l,c)=>w.jsx("div",{className:"attachment-item",children:w.jsx(KS,{attachment:l,reveal:e&&QS(l,e[0])?e:void 0})},JS(l,c)))]})};function QS(t,e){return t.name===e.name&&t.path===e.path&&t.sha1===e.sha1}function ia(t,e={}){const n=new URLSearchParams(e);return t.sha1?(n.set("trace",t.traceUrl),"sha1/"+t.sha1+"?"+n.toString()):(n.set("path",t.path),"file?"+n.toString())}function Ml(t){const e={dn:t.name};return t.contentType&&(e.dct=t.contentType),ia(t,e)}function JS(t,e){return e+"-"+(t.sha1?"sha1-"+t.sha1:"path-"+t.path)}const XS=`
|
||||
# Instructions
|
||||
|
||||
- Following Playwright test failed.
|
||||
- Explain why, be concise, respect Playwright best practices.
|
||||
- Provide a snippet of code with the fix, if possible.
|
||||
`.trimStart();async function YS({testInfo:t,metadata:e,errorContext:n,errors:r,buildCodeFrame:o,stdout:l,stderr:c}){var y;const u=new Set(r.filter(v=>v.message&&!v.message.includes(`
|
||||
`)).map(v=>v.message));for(const v of r)for(const x of u.keys())(y=v.message)!=null&&y.includes(x)&&u.delete(x);const d=r.filter(v=>!(!v.message||!v.message.includes(`
|
||||
`)&&!u.has(v.message)));if(!d.length)return;const p=[XS,"# Test info","",t];l&&p.push("","# Stdout","","```",jl(l),"```"),c&&p.push("","# Stderr","","```",jl(c),"```"),p.push("","# Error details");for(const v of d)p.push("","```",jl(v.message||""),"```");n&&p.push(n);const g=await o(d[d.length-1]);return g&&p.push("","# Test source","","```ts",g,"```"),e!=null&&e.gitDiff&&p.push("","# Local changes","","```diff",e.gitDiff,"```"),p.join(`
|
||||
`)}const ZS=new RegExp("([\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~])))","g");function jl(t){return t.replace(ZS,"")}const e1=sa,t1=({stack:t,setSelectedFrame:e,selectedFrame:n})=>{const r=t||[];return w.jsx(e1,{name:"stack-trace",ariaLabel:"Stack trace",items:r,selectedItem:r[n],render:o=>{const l=o.file[1]===":"?"\\":"/";return w.jsxs(w.Fragment,{children:[w.jsx("span",{className:"stack-trace-frame-function",children:o.function||"(anonymous)"}),w.jsx("span",{className:"stack-trace-frame-location",children:o.file.split(l).pop()}),w.jsx("span",{className:"stack-trace-frame-line",children:":"+o.line})]})},onSelected:o=>e(r.indexOf(o))})},rf=({noShadow:t,children:e,noMinHeight:n,className:r,sidebarBackground:o,onClick:l})=>w.jsx("div",{className:ze("toolbar",t&&"no-shadow",n&&"no-min-height",r,o&&"toolbar-sidebar-background"),onClick:l,children:e});function n1(t,e,n,r,o){return Bl(async()=>{var v,x,E,S;const l=t==null?void 0:t[e],c=l!=null&&l.file?l:o;if(!c)return{source:{file:"",errors:[],content:void 0},targetLine:0,highlight:[]};const u=c.file;let d=n.get(u);d||(d={errors:((v=o==null?void 0:o.source)==null?void 0:v.errors)||[],content:(x=o==null?void 0:o.source)==null?void 0:x.content},n.set(u,d));const p=(c==null?void 0:c.line)||((E=d.errors[0])==null?void 0:E.line)||0,g=r&&u.startsWith(r)?u.substring(r.length+1):u,y=d.errors.map(k=>({type:"error",line:k.line,message:k.message}));if(y.push({line:p,type:"running"}),((S=o==null?void 0:o.source)==null?void 0:S.content)!==void 0)d.content=o.source.content;else if(d.content===void 0||c===o){const k=await mg(u);try{let C=await fetch(`sha1/src@${k}.txt`);C.status===404&&(C=await fetch(`file?path=${encodeURIComponent(u)}`)),C.status>=400?d.content=`<Unable to read "${u}">`:d.content=await C.text()}catch{d.content=`<Unable to read "${u}">`}}return{source:d,highlight:y,targetLine:p,fileName:g,location:c}},[t,e,r,o],{source:{errors:[],content:"Loading…"},highlight:[]})}const r1=({stack:t,sources:e,rootDir:n,fallbackLocation:r,stackFrameLocation:o,onOpenExternally:l})=>{const[c,u]=$.useState(),[d,p]=$.useState(0);$.useEffect(()=>{c!==t&&(u(t),p(0))},[t,c,u,p]);const{source:g,highlight:y,targetLine:v,fileName:x,location:E}=n1(t,d,e,n,r),S=$.useCallback(()=>{E&&(l?l(E):window.location.href=`vscode://file//${E.file}:${E.line}`)},[l,E]),k=((t==null?void 0:t.length)??0)>1,C=s1(x);return w.jsx(Ul,{sidebarSize:200,orientation:o==="bottom"?"vertical":"horizontal",sidebarHidden:!k,main:w.jsxs("div",{className:"vbox","data-testid":"source-code",children:[x&&w.jsxs(rf,{children:[w.jsx("div",{className:"source-tab-file-name",title:x,children:w.jsx("div",{children:C})}),w.jsx(nf,{description:"Copy filename",value:C}),E&&w.jsx(Ht,{icon:"link-external",title:"Open in VS Code",onClick:S})]}),w.jsx(Ns,{text:g.content||"",highlighter:"javascript",highlight:y,revealLine:v,readOnly:!0,lineNumbers:!0,dataTestId:"source-code-mirror"})]}),sidebar:w.jsx(t1,{stack:t,selectedFrame:d,setSelectedFrame:p})})};async function mg(t){const e=new TextEncoder().encode(t),n=await crypto.subtle.digest("SHA-1",e),r=[],o=new DataView(n);for(let l=0;l<o.byteLength;l+=1){const c=o.getUint8(l).toString(16).padStart(2,"0");r.push(c)}return r.join("")}function s1(t){if(!t)return"";const e=t!=null&&t.includes("/")?"/":"\\";return(t==null?void 0:t.split(e).pop())??""}const i1=({prompt:t})=>w.jsx(Ll,{value:t,description:"Copy prompt",copiedDescription:w.jsxs(w.Fragment,{children:["Copied ",w.jsx("span",{className:"codicon codicon-copy",style:{marginLeft:"5px"}})]}),style:{width:"120px",justifyContent:"center"}});function o1(t){return $.useMemo(()=>{if(!t)return{errors:new Map};const e=new Map;for(const n of t.errorDescriptors)e.set(n.message,n);return{errors:e}},[t])}function l1({message:t,error:e,sdkLanguage:n,revealInSource:r}){var u;let o,l;const c=(u=e.stack)==null?void 0:u[0];return c&&(o=c.file.replace(/.*[/\\](.*)/,"$1")+":"+c.line,l=c.file+":"+c.line),w.jsxs("div",{style:{display:"flex",flexDirection:"column",overflowX:"clip"},children:[w.jsxs("div",{className:"hbox",style:{alignItems:"center",padding:"5px 10px",minHeight:36,fontWeight:"bold",color:"var(--vscode-errorForeground)",flex:0},children:[e.action&&tf(e.action,{sdkLanguage:n}),o&&w.jsxs("div",{className:"action-location",children:["@ ",w.jsx("span",{title:l,onClick:()=>r(e),children:o})]})]}),w.jsx(MS,{error:t})]})}const a1=({errorsModel:t,model:e,sdkLanguage:n,revealInSource:r,wallTime:o,testRunMetadata:l})=>{const c=Bl(async()=>{const p=e==null?void 0:e.attachments.find(g=>g.name==="error-context");if(p)return await fetch(ia(p)).then(g=>g.text())},[e],void 0),u=$.useCallback(async p=>{var x;const g=(x=p.stack)==null?void 0:x[0];if(!g)return;let y=await fetch(`sha1/src@${await mg(g.file)}.txt`);if(y.status===404&&(y=await fetch(`file?path=${encodeURIComponent(g.file)}`)),y.status>=400)return;const v=await y.text();return c1({source:v,message
Line truncated
|
||||
`)[0]||void 0,location:g,linesAbove:100,linesBelow:100})},[]),d=Bl(()=>YS({testInfo:(e==null?void 0:e.title)??"",metadata:l,errorContext:c,errors:(e==null?void 0:e.errorDescriptors)??[],buildCodeFrame:u}),[c,l,e,u],void 0);return t.errors.size?w.jsxs("div",{className:"fill",style:{overflow:"auto"},children:[w.jsx("span",{style:{position:"absolute",right:"5px",top:"5px",zIndex:1},children:d&&w.jsx(i1,{prompt:d})}),[...t.errors.entries()].map(([p,g])=>{const y=`error-${o}-${p}`;return w.jsx(l1,{message:p,error:g,revealInSource:r,sdkLanguage:n},y)})]}):w.jsx(Pr,{text:"No errors"})};function c1({source:t,message:e,location:n,linesAbove:r,linesBelow:o}){const l=t.split(`
|
||||
`).slice(),c=Math.max(0,n.line-r-1),u=Math.min(l.length,n.line+o),d=l.slice(c,u),p=String(u).length,g=d.map((y,v)=>`${c+v+1===n.line?"> ":" "}${(c+v+1).toString().padEnd(p," ")} | ${y}`);return e&&g.splice(n.line-c,0,`${" ".repeat(p+2)} | ${" ".repeat(n.column-2)} ^ ${e}`),g.join(`
|
||||
`)}const u1=sa;function f1(t,e){const{entries:n}=$.useMemo(()=>{if(!t)return{entries:[]};const o=[];function l(u){var g,y,v,x,E,S;const d=o[o.length-1];d&&((g=u.browserMessage)==null?void 0:g.bodyString)===((y=d.browserMessage)==null?void 0:y.bodyString)&&((v=u.browserMessage)==null?void 0:v.location)===((x=d.browserMessage)==null?void 0:x.location)&&u.browserError===d.browserError&&((E=u.nodeMessage)==null?void 0:E.html)===((S=d.nodeMessage)==null?void 0:S.html)&&u.isError===d.isError&&u.isWarning===d.isWarning&&u.timestamp-d.timestamp<1e3?d.repeat++:o.push({...u,repeat:1})}const c=[...t.events,...t.stdio].sort((u,d)=>{const p="time"in u?u.time:u.timestamp,g="time"in d?d.time:d.timestamp;return p-g});for(const u of c){if(u.type==="console"){const d=u.args&&u.args.length?h1(u.args):gg(u.text),p=u.location.url,y=`${p?p.substring(p.lastIndexOf("/")+1):"<anonymous>"}:${u.location.lineNumber}`;l({browserMessage:{body:d,bodyString:u.text,location:y},isError:u.messageType==="error",isWarning:u.messageType==="warning",timestamp:u.time})}if(u.type==="event"&&u.method==="pageError"&&l({browserError:u.params.error,isError:!0,isWarning:!1,timestamp:u.time}),u.type==="stderr"||u.type==="stdout"){let d="";u.text&&(d=Wi(u.text.trim())||""),u.base64&&(d=Wi(atob(u.base64).trim())||""),l({nodeMessage:{html:d},isError:u.type==="stderr",isWarning:!1,timestamp:u.timestamp})}}return{entries:o}},[t]);return{entries:$.useMemo(()=>e?n.filter(o=>o.timestamp>=e.minimum&&o.timestamp<=e.maximum):n,[n,e])}}const d1=({consoleModel:t,boundaries:e,onEntryHovered:n,onAccepted:r})=>t.entries.length?w.jsx("div",{className:"console-tab",children:w.jsx(u1,{name:"console",onAccepted:r,onHighlighted:n,items:t.entries,isError:o=>o.isError,isWarning:o=>o.isWarning,render:o=>{const l=pt(o.timestamp-e.minimum),c=w.jsx("span",{className:"console-time",children:l}),u=o.isError?"status-error":o.isWarning?"status-warning":"status-none",d=o.browserMessage||o.browserError?w.jsx("span",{className:ze("codicon","codicon-browser",u),title:"Browser message"}):w.jsx("span",{className:ze("codicon","codicon-file",u),title:"Runner message"});let p,g,y,v;const{browserMessage:x,browserError:E,nodeMessage:S}=o;if(x&&(p=x.location,g=x.body),E){const{error:k,value:C}=E;k?(g=k.message,v=k.stack):g=String(C)}return S&&(y=S.html),w.jsxs("div",{className:"console-line",children:[c,d,p&&w.jsx("span",{className:"console-location",children:p}),o.repeat>1&&w.jsx("span",{className:"console-repeat",children:o.repeat}),g&&w.jsx("span",{className:"console-line-message",children:g}),y&&w.jsx("span",{className:"console-line-message",dangerouslySetInnerHTML:{__html:y}}),v&&w.jsx("div",{className:"console-stack",children:v})]})}})}):w.jsx(Pr,{text:"No console entries"});function h1(t){if(t.length===1)return gg(t[0].preview);const e=typeof t[0].value=="string"&&t[0].value.includes("%"),n=e?t[0].value:"",r=e?t.slice(1):t;let o=0;const l=/%([%sdifoOc])/g;let c;const u=[];let d=[];u.push(w.jsx("span",{children:d},u.length+1));let p=0;for(;(c=l.exec(n))!==null;){const g=n.substring(p,c.index);d.push(w.jsx("span",{children:g},d.length+1)),p=c.index+2;const y=c[0][1];if(y==="%")d.push(w.jsx("span",{children:"%"},d.length+1));else if(y==="s"||y==="o"||y==="O"||y==="d"||y==="i"||y==="f"){const v=r[o++],x={};typeof(v==null?void 0:v.value)!="string"&&(x.color="var(--vscode-debugTokenExpression-number)"),d.push(w.jsx("span",{style:x,children:(v==null?void 0:v.preview)||""},d.length+1))}else if(y==="c"){d=[];const v=r[o++],x=v?p1(v.preview):{};u.push(w.jsx("span",{style:x,children:d},u.length+1))}}for(p<n.length&&d.push(w.jsx("span",{children:n.substring(p)},d.length+1));o<r.length;o++){const g=r[o],y={};d.length&&d.push(w.jsx("span",{children:" "},d.length+1)),typeof(g==null?void 0:g.value)!="string"&&(y.color="var(--vscode-debugTokenExpression-number)"),d.push(w.jsx("span",{style:y,children:(g==null?void 0:g.preview)||""},d.length+1))}return u}function gg(t){return[w.jsx("span",{dangerouslySetInnerHTML:{__html:Wi(t.trim())}})]}function p1(t){try{const e={},n=t.split(";");for(const r of n){const o=r.trim();if(!o)continue;let[l,c]=o.split(":");if(l=l.trim(),c=c.trim(),!m1(l))continue;const u=l.replace(/-([a-z])/g,d=>d[1].toUpperCase());e[u]=c}return e}catch{return{}}}function m1(t){return["background","border","color","font","line","margin","padding","text"].some(n=>t.startsWith(n))}const Ru=({tabs:t,selectedTab:e,setSelectedTab:n,leftToolbar:r,rightToolbar:o,dataTestId:l,mode:c})=>{const u=$.useId();return e||(e=t[0].id),c||(c="default"),w.jsx("div",{className:"tabbed-pane","data-testid":l,children:w.jsxs("div",{className:"vbox",children:[w.jsxs(rf,{children:[r&&w.jsxs("div",{style:{flex:"none",display:"flex",margin:"0 4px",alignItems:"center"},children:[...r]}),c==="default"&&w.jsx("div",{style:{flex:"auto",display:"flex",height:"100%",overflow:"hidden"},role:"tablist",children:[...t.map(d=>w.jsx(yg,{id:d.id,ariaControls:`${u}-${d.id}`,title:d.title,count:d.count,errorCount:d.errorCount,selecte
Line truncated
|
||||
|
||||
`)+v}function l(y){function v(x){let S=x.charCodeAt(0).toString(16);for(;S.length<4;)S="0"+S;return"\\u"+S}return/[\0-\x1F\x7F-\x9F!]|\'/.test(y)?"$'"+y.replace(/\\/g,"\\\\").replace(/\'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\0-\x1F\x7F-\x9F!]/g,v)+"'":"'"+y+"'"}const c=e==="win"?o:l;n.push(c(t.request.url).replace(/[[{}\]]/g,"\\$&"));let u="GET";const d=[],p=await vg(t);p&&(d.push("--data-raw "+c(p)),r.add("content-length"),u="POST"),t.request.method!==u&&n.push("-X "+c(t.request.method));const g=t.request.headers;for(let y=0;y<g.length;y++){const v=g[y],x=v.name.replace(/^:/,"");r.has(x.toLowerCase())||(v.value.trim()?n.push("-H "+c(x+": "+v.value)):n.push("-H "+c(x+";")))}return n=n.concat(d),"curl "+n.join(n.length>=3?e==="win"?` ^
|
||||
`:` \\
|
||||
`:" ")}async function y1(t,e=0){const n=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"]),r=new Set(["cookie","authorization"]),o=JSON.stringify(t.request.url),l=t.request.headers,c=l.reduce((E,S)=>{const k=S.name;return!n.has(k.toLowerCase())&&!k.includes(":")&&E.append(k,S.value),E},new Headers),u={};for(const E of c)u[E[0]]=E[1];const d=t.request.cookies.length||l.some(({name:E})=>r.has(E.toLowerCase()))?"include":"omit",p=l.find(({name:E})=>E.toLowerCase()==="referer"),g=p?p.value:void 0,y=await vg(t),v={headers:Object.keys(u).length?u:void 0,referrer:g,body:y,method:t.request.method,mode:"cors"};if(e===1){const E=l.find(k=>k.name.toLowerCase()==="cookie"),S={};delete v.mode,E&&(S.cookie=E.value),g&&(delete v.referrer,S.Referer=g),Object.keys(S).length&&(v.headers={...u,...S})}else v.credentials=d;const x=JSON.stringify(v,null,2);return`fetch(${o}, ${x});`}async function vg(t){var e,n;return(e=t.request.postData)!=null&&e._sha1?await fetch(`sha1/${t.request.postData._sha1}`).then(r=>r.text()):(n=t.request.postData)==null?void 0:n.text}class v1{generatePlaywrightRequestCall(e,n){let r=e.method.toLowerCase();const o=new URL(e.url),l=`${o.origin}${o.pathname}`,c={};["delete","get","head","post","put","patch"].includes(r)||(c.method=r,r="fetch"),o.searchParams.size&&(c.params=Object.fromEntries(o.searchParams.entries())),n&&(c.data=n),e.headers.length&&(c.headers=Object.fromEntries(e.headers.map(p=>[p.name,p.value])));const u=[`'${l}'`];return Object.keys(c).length>0&&u.push(this.prettyPrintObject(c)),`await page.request.${r}(${u.join(", ")});`}prettyPrintObject(e,n=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 u=" ".repeat(r*n),d=" ".repeat((r+1)*n);return`[
|
||||
${e.map(g=>`${d}${this.prettyPrintObject(g,n,r+1)}`).join(`,
|
||||
`)}
|
||||
${u}]`}if(Object.keys(e).length===0)return"{}";const o=" ".repeat(r*n),l=" ".repeat((r+1)*n);return`{
|
||||
${Object.entries(e).map(([u,d])=>{const p=this.prettyPrintObject(d,n,r+1),g=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(u)?u:this.stringLiteral(u);return`${l}${g}: ${p}`}).join(`,
|
||||
`)}
|
||||
${o}}`}stringLiteral(e){return e=e.replace(/\\/g,"\\\\").replace(/'/g,"\\'"),e.includes(`
|
||||
`)||e.includes("\r")||e.includes(" ")?"`"+e+"`":`'${e}'`}}class w1{generatePlaywrightRequestCall(e,n){const r=new URL(e.url),l=[`"${`${r.origin}${r.pathname}`}"`];let c=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(c)||(l.push(`method="${c}"`),c="fetch"),r.searchParams.size&&l.push(`params=${this.prettyPrintObject(Object.fromEntries(r.searchParams.entries()))}`),n&&l.push(`data=${this.prettyPrintObject(n)}`),e.headers.length&&l.push(`headers=${this.prettyPrintObject(Object.fromEntries(e.headers.map(d=>[d.name,d.value])))}`);const u=l.length===1?l[0]:`
|
||||
${l.map(d=>this.indent(d,2)).join(`,
|
||||
`)}
|
||||
`;return`await page.request.${c}(${u})`}indent(e,n){return e.split(`
|
||||
`).map(r=>" ".repeat(n)+r).join(`
|
||||
`)}prettyPrintObject(e,n=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 u=" ".repeat(r*n),d=" ".repeat((r+1)*n);return`[
|
||||
${e.map(g=>`${d}${this.prettyPrintObject(g,n,r+1)}`).join(`,
|
||||
`)}
|
||||
${u}]`}if(Object.keys(e).length===0)return"{}";const o=" ".repeat(r*n),l=" ".repeat((r+1)*n);return`{
|
||||
${Object.entries(e).map(([u,d])=>{const p=this.prettyPrintObject(d,n,r+1);return`${l}${this.stringLiteral(u)}: ${p}`}).join(`,
|
||||
`)}
|
||||
${o}}`}stringLiteral(e){return JSON.stringify(e)}}class S1{generatePlaywrightRequestCall(e,n){const r=new URL(e.url),o=`${r.origin}${r.pathname}`,l={},c=[];let u=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(u)||(l.Method=u,u="fetch"),r.searchParams.size&&(l.Params=Object.fromEntries(r.searchParams.entries())),n&&(l.Data=n),e.headers.length&&(l.Headers=Object.fromEntries(e.headers.map(g=>[g.name,g.value])));const d=[`"${o}"`];return Object.keys(l).length>0&&d.push(this.prettyPrintObject(l)),`${c.join(`
|
||||
`)}${c.length?`
|
||||
`:""}await request.${this.toFunctionName(u)}(${d.join(", ")});`}toFunctionName(e){return e[0].toUpperCase()+e.slice(1)+"Async"}prettyPrintObject(e,n=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 u=" ".repeat(r*n),d=" ".repeat((r+1)*n);return`new object[] {
|
||||
${e.map(g=>`${d}${this.prettyPrintObject(g,n,r+1)}`).join(`,
|
||||
`)}
|
||||
${u}}`}if(Object.keys(e).length===0)return"new {}";const o=" ".repeat(r*n),l=" ".repeat((r+1)*n);return`new() {
|
||||
${Object.entries(e).map(([u,d])=>{const p=this.prettyPrintObject(d,n,r+1),g=r===0?u:`[${this.stringLiteral(u)}]`;return`${l}${g} = ${p}`}).join(`,
|
||||
`)}
|
||||
${o}}`}stringLiteral(e){return JSON.stringify(e)}}class x1{generatePlaywrightRequestCall(e,n){const r=new URL(e.url),o=[`"${r.origin}${r.pathname}"`],l=[];let c=e.method.toLowerCase();["delete","get","head","post","put","patch"].includes(c)||(l.push(`setMethod("${c}")`),c="fetch");for(const[u,d]of r.searchParams)l.push(`setQueryParam(${this.stringLiteral(u)}, ${this.stringLiteral(d)})`);n&&l.push(`setData(${this.stringLiteral(n)})`);for(const u of e.headers)l.push(`setHeader(${this.stringLiteral(u.name)}, ${this.stringLiteral(u.value)})`);return l.length>0&&o.push(`RequestOptions.create()
|
||||
.${l.join(`
|
||||
.`)}
|
||||
`),`request.${c}(${o.join(", ")});`}stringLiteral(e){return JSON.stringify(e)}}function _1(t){if(t==="javascript")return new v1;if(t==="python")return new w1;if(t==="csharp")return new S1;if(t==="java")return new x1;throw new Error("Unsupported language: "+t)}const E1=({resource:t,sdkLanguage:e,startTimeOffset:n,onClose:r})=>{const[o,l]=$.useState("request"),c=Bl(async()=>{if(t.request.postData){const u=t.request.headers.find(p=>p.name.toLowerCase()==="content-type"),d=u?u.value:"";if(t.request.postData._sha1){const p=await fetch(`sha1/${t.request.postData._sha1}`);return{text:$u(await p.text(),d),mimeType:d}}else return{text:$u(t.request.postData.text,d),mimeType:d}}else return null},[t],null);return w.jsx(Ru,{dataTestId:"network-request-details",leftToolbar:[w.jsx(Ht,{icon:"close",title:"Close",onClick:r},"close")],rightToolbar:[w.jsx(k1,{requestBody:c,resource:t,sdkLanguage:e},"dropdown")],tabs:[{id:"request",title:"Request",render:()=>w.jsx(b1,{resource:t,startTimeOffset:n,requestBody:c})},{id:"response",title:"Response",render:()=>w.jsx(T1,{resource:t})},{id:"body",title:"Body",render:()=>w.jsx(C1,{resource:t})}],selectedTab:o,setSelectedTab:l})},k1=({resource:t,sdkLanguage:e,requestBody:n})=>{const r=w.jsxs(w.Fragment,{children:[w.jsx("span",{className:"codicon codicon-check",style:{marginRight:"5px"}})," Copied "]}),o=async()=>_1(e).generatePlaywrightRequestCall(t.request,n==null?void 0:n.text);return w.jsxs("div",{className:"copy-request-dropdown",children:[w.jsxs(Ht,{className:"copy-request-dropdown-toggle",children:[w.jsx("span",{className:"codicon codicon-copy",style:{marginRight:"5px"}}),"Copy request",w.jsx("span",{className:"codicon codicon-chevron-down",style:{marginLeft:"5px"}})]}),w.jsxs("div",{className:"copy-request-dropdown-menu",children:[w.jsx(Ll,{description:"Copy as cURL",copiedDescription:r,value:()=>g1(t)}),w.jsx(Ll,{description:"Copy as Fetch",copiedDescription:r,value:()=>y1(t)}),w.jsx(Ll,{description:"Copy as Playwright",copiedDescription:r,value:o})]})]})},b1=({resource:t,startTimeOffset:e,requestBody:n})=>w.jsxs("div",{className:"network-request-details-tab",children:[w.jsx("div",{className:"network-request-details-header",children:"General"}),w.jsx("div",{className:"network-request-details-url",children:`URL: ${t.request.url}`}),w.jsx("div",{className:"network-request-details-general",children:`Method: ${t.request.method}`}),t.response.status!==-1&&w.jsxs("div",{className:"network-request-details-general",style:{display:"flex"},children:["Status Code: ",w.jsx("span",{className:A1(t.response.status),style:{display:"inline-flex"},children:`${t.response.status} ${t.response.statusText}`})]}),t.request.queryString.length?w.jsxs(w.Fragment,{children:[w.jsx("div",{className:"network-request-details-header",children:"Query String Parameters"}),w.jsx("div",{className:"network-request-details-headers",children:t.request.queryString.map(r=>`${r.name}: ${r.value}`).join(`
|
||||
`)})]}):null,w.jsx("div",{className:"network-request-details-header",children:"Request Headers"}),w.jsx("div",{className:"network-request-details-headers",children:t.request.headers.map(r=>`${r.name}: ${r.value}`).join(`
|
||||
`)}),w.jsx("div",{className:"network-request-details-header",children:"Time"}),w.jsx("div",{className:"network-request-details-general",children:`Start: ${pt(e)}`}),w.jsx("div",{className:"network-request-details-general",children:`Duration: ${pt(t.time)}`}),n&&w.jsx("div",{className:"network-request-details-header",children:"Request Body"}),n&&w.jsx(Ns,{text:n.text,mimeType:n.mimeType,readOnly:!0,lineNumbers:!0})]}),T1=({resource:t})=>w.jsxs("div",{className:"network-request-details-tab",children:[w.jsx("div",{className:"network-request-details-header",children:"Response Headers"}),w.jsx("div",{className:"network-request-details-headers",children:t.response.headers.map(e=>`${e.name}: ${e.value}`).join(`
|
||||
`)})]}),C1=({resource:t})=>{const[e,n]=$.useState(null);return $.useEffect(()=>{(async()=>{if(t.response.content._sha1){const o=t.response.content.mimeType.includes("image"),l=t.response.content.mimeType.includes("font"),c=await fetch(`sha1/${t.response.content._sha1}`);if(o){const u=await c.blob(),d=new FileReader,p=new Promise(g=>d.onload=g);d.readAsDataURL(u),n({dataUrl:(await p).target.result})}else if(l){const u=await c.arrayBuffer();n({font:u})}else{const u=$u(await c.text(),t.response.content.mimeType);n({text:u,mimeType:t.response.content.mimeType})}}else n(null)})()},[t]),w.jsxs("div",{className:"network-request-details-tab",children:[!t.response.content._sha1&&w.jsx("div",{children:"Response body is not available for this request."}),e&&e.font&&w.jsx(N1,{font:e.font}),e&&e.dataUrl&&w.jsx("img",{draggable:"false",src:e.dataUrl}),e&&e.text&&w.jsx(Ns,{text:e.text,mimeType:e.mimeType,readOnly:!0,lineNumbers:!0})]})},N1=({font:t})=>{const[e,n]=$.useState(!1);return $.useEffect(()=>{let r;try{r=new FontFace("font-preview",t),r.status==="loaded"&&document.fonts.add(r),r.status==="error"&&n(!0)}catch{n(!0)}return()=>{document.fonts.delete(r)}},[t]),e?w.jsx("div",{className:"network-font-preview-error",children:"Could not load font preview"}):w.jsxs("div",{className:"network-font-preview",children:["ABCDEFGHIJKLM",w.jsx("br",{}),"NOPQRSTUVWXYZ",w.jsx("br",{}),"abcdefghijklm",w.jsx("br",{}),"nopqrstuvwxyz",w.jsx("br",{}),"1234567890"]})};function A1(t){return t<300||t===304?"green-circle":t<400?"yellow-circle":"red-circle"}function $u(t,e){if(t===null)return"Loading...";const n=t;if(n==="")return"<Empty>";if(e.includes("application/json"))try{return JSON.stringify(JSON.parse(n),null,2)}catch{return n}return e.includes("application/x-www-form-urlencoded")?decodeURIComponent(n):n}function I1(t){const[e,n]=$.useState([]);$.useEffect(()=>{const l=[];for(let c=0;c<t.columns.length-1;++c){const u=t.columns[c];l[c]=(l[c-1]||0)+t.columnWidths.get(u)}n(l)},[t.columns,t.columnWidths]);function r(l){const c=new Map(t.columnWidths.entries());for(let u=0;u<l.length;++u){const d=l[u]-(l[u-1]||0),p=t.columns[u];c.set(p,d)}t.setColumnWidths(c)}const o=$.useCallback(l=>{var c,u;(u=t.setSorting)==null||u.call(t,{by:l,negate:((c=t.sorting)==null?void 0:c.by)===l?!t.sorting.negate:!1})},[t]);return w.jsxs("div",{className:`grid-view ${t.name}-grid-view`,children:[w.jsx(hg,{orientation:"horizontal",offsets:e,setOffsets:r,resizerColor:"var(--vscode-panel-border)",resizerWidth:1,minColumnWidth:25}),w.jsxs("div",{className:"vbox",children:[w.jsx("div",{className:"grid-view-header",children:t.columns.map((l,c)=>w.jsxs("div",{className:"grid-view-header-cell "+L1(l,t.sorting),style:{width:c<t.columns.length-1?t.columnWidths.get(l):void 0},onClick:()=>t.setSorting&&o(l),children:[w.jsx("span",{className:"grid-view-header-cell-title",children:t.columnTitle(l)}),w.jsx("span",{className:"codicon codicon-triangle-up"}),w.jsx("span",{className:"codicon codicon-triangle-down"})]},t.columnTitle(l)))}),w.jsx(sa,{name:t.name,items:t.items,ariaLabel:t.ariaLabel,id:t.id,render:(l,c)=>w.jsx(w.Fragment,{children:t.columns.map((u,d)=>{const{body:p,title:g}=t.render(l,u,c);return w.jsx("div",{className:`grid-view-cell grid-view-column-${String(u)}`,title:g,style:{width:d<t.columns.length-1?t.columnWidths.get(u):void 0},children:p},t.columnTitle(u))})}),icon:t.icon,isError:t.isError,isWarning:t.isWarning,isInfo:t.isInfo,selectedItem:t.selectedItem,onAccepted:t.onAccepted,onSelected:t.onSelected,onHighlighted:t.onHighlighted,onIconClicked:t.onIconClicked,noItemsMessage:t.noItemsMessage,dataTestId:t.dataTestId,notSelectable:t.notSelectable})]})]})}function L1(t,e){return t===(e==null?void 0:e.by)?" filter-"+(e.negate?"negative":"positive"):""}const M1=["All","Fetch","HTML","JS","CSS","Font","Image"],j1={searchValue:"",resourceType:"All"},P1=({filterState:t,onFilterStateChange:e})=>w.jsxs("div",{className:"network-filters",children:[w.jsx("input",{type:"search",placeholder:"Filter network",spellCheck:!1,value:t.searchValue,onChange:n=>e({...t,searchValue:n.target.value})}),w.jsx("div",{className:"network-filters-resource-types",children:M1.map(n=>w.jsx("div",{title:n,onClick:()=>e({...t,resourceType:n}),className:`network-filters-resource-type ${t.resourceType===n?"selected":""}`,children:n},n))})]}),O1=I1;function R1(t,e){const n=$.useMemo(()=>((t==null?void 0:t.resources)||[]).filter(c=>e?!!c._monotonicTime&&c._monotonicTime>=e.minimum&&c._monotonicTime<=e.maximum:!0),[t,e]),r=$.useMemo(()=>new U1(t),[t]);return{resources:n,contextIdMap:r}}const $1=({boundaries:t,networkModel:e,onEntryHovered:n,sdkLanguage:r})=>{const[o,l]=$.useState(void 0),[c,u]=$.useState(void 0),[d,p]=$.useState(j1),{renderedEntries:g}=$.useMemo(()=>{const S=e.resources.map(k=>H1(k,t,e.contextIdMap)).filter(G1(d));return o&&V1(S,o),{renderedEntries:S}},[e.resources,e.contextIdMap,d,o,t]),[y,v]=$.useState(()=>new Map(wg().map(S=>[S,F1(S)]))),x=$.useCallback(S=>{p(S),u(void 0)},[]
Line truncated
|
||||
|
||||
`+e.value+`
|
||||
`+" ".repeat(o.pos)+`^
|
||||
`;return r.push({message:l,range:[n.lineCounter.linePos(e.range[0]),n.lineCounter.linePos(e.range[0]+o.pos)]}),null}throw o}}constructor(e,n){this._input=e,this._pos=0,this._length=e.length,this._options=n}_peek(){return this._input[this._pos]||""}_next(){return this._pos<this._length?this._input[this._pos++]:null}_eof(){return this._pos>=this._length}_isWhitespace(){return!this._eof()&&/\s/.test(this._peek())}_skipWhitespace(){for(;this._isWhitespace();)this._pos++}_readIdentifier(e){this._eof()&&this._throwError(`Unexpected end of input when expecting ${e}`);const n=this._pos;for(;!this._eof()&&/[a-zA-Z]/.test(this._peek());)this._pos++;return this._input.slice(n,this._pos)}_readString(){let e="",n=!1;for(;!this._eof();){const r=this._next();if(n)e+=r,n=!1;else if(r==="\\")n=!0;else{if(r==='"')return e;e+=r}}this._throwError("Unterminated string")}_throwError(e,n=0){throw new Zp(e,n||this._pos)}_readRegex(){let e="",n=!1,r=!1;for(;!this._eof();){const o=this._next();if(n)e+=o,n=!1;else if(o==="\\")n=!0,e+=o;else{if(o==="/"&&!r)return{pattern:e};o==="["?(r=!0,e+=o):o==="]"&&r?(e+=o,r=!1):e+=o}}this._throwError("Unterminated regex")}_readStringOrRegex(){const e=this._peek();return e==='"'?(this._next(),Sg(this._readString())):e==="/"?(this._next(),this._readRegex()):null}_readAttributes(e){let n=this._pos;for(;this._skipWhitespace(),this._peek()==="[";){this._next(),this._skipWhitespace(),n=this._pos;const r=this._readIdentifier("attribute");this._skipWhitespace();let o="";if(this._peek()==="=")for(this._next(),this._skipWhitespace(),n=this._pos;this._peek()!=="]"&&!this._isWhitespace()&&!this._eof();)o+=this._next();this._skipWhitespace(),this._peek()!=="]"&&this._throwError("Expected ]"),this._next(),this._applyAttribute(e,r,o||"true",n)}}_parse(){this._skipWhitespace();const e=this._readIdentifier("role");this._skipWhitespace();const n=this._readStringOrRegex()||"",r={kind:"role",role:e,name:n};return this._readAttributes(r),this._skipWhitespace(),this._eof()||this._throwError("Unexpected input"),r}_applyAttribute(e,n,r,o){if(n==="checked"){this._assert(r==="true"||r==="false"||r==="mixed",'Value of "checked" attribute must be a boolean or "mixed"',o),e.checked=r==="true"?!0:r==="false"?!1:"mixed";return}if(n==="disabled"){this._assert(r==="true"||r==="false",'Value of "disabled" attribute must be a boolean',o),e.disabled=r==="true";return}if(n==="expanded"){this._assert(r==="true"||r==="false",'Value of "expanded" attribute must be a boolean',o),e.expanded=r==="true";return}if(n==="active"){this._assert(r==="true"||r==="false",'Value of "active" attribute must be a boolean',o),e.active=r==="true";return}if(n==="level"){this._assert(!isNaN(Number(r)),'Value of "level" attribute must be a number',o),e.level=Number(r);return}if(n==="pressed"){this._assert(r==="true"||r==="false"||r==="mixed",'Value of "pressed" attribute must be a boolean or "mixed"',o),e.pressed=r==="true"?!0:r==="false"?!1:"mixed";return}if(n==="selected"){this._assert(r==="true"||r==="false",'Value of "selected" attribute must be a boolean',o),e.selected=r==="true";return}this._assert(!1,`Unsupported attribute [${n}]`,o)}_assert(e,n,r){e||this._throwError(n||"Assertion error",r)}}class Zp extends Error{constructor(e,n){super(e),this.pos=n}}let xg={};function J1(t){xg=t}function oa(t,e){for(;e;){if(t.contains(e))return!0;e=Eg(e)}return!1}function at(t){if(t.parentElement)return t.parentElement;if(t.parentNode&&t.parentNode.nodeType===11&&t.parentNode.host)return t.parentNode.host}function _g(t){let e=t;for(;e.parentNode;)e=e.parentNode;if(e.nodeType===11||e.nodeType===9)return e}function Eg(t){for(;t.parentElement;)t=t.parentElement;return at(t)}function Pi(t,e,n){for(;t;){const r=t.closest(e);if(n&&r!==n&&(r!=null&&r.contains(n)))return;if(r)return r;t=Eg(t)}}function rr(t,e){return t.ownerDocument&&t.ownerDocument.defaultView?t.ownerDocument.defaultView.getComputedStyle(t,e):void 0}function kg(t,e){if(e=e??rr(t),!e)return!0;if(Element.prototype.checkVisibility&&xg.browserNameForWorkarounds!=="webkit"){if(!t.checkVisibility())return!1}else{const n=t.closest("details,summary");if(n!==t&&(n==null?void 0:n.nodeName)==="DETAILS"&&!n.open)return!1}return e.visibility==="visible"}function Gl(t){const e=rr(t);if(!e)return{visible:!0};if(e.display==="contents"){for(let r=t.firstChild;r;r=r.nextSibling){if(r.nodeType===1&&Zn(r))return{visible:!0,style:e};if(r.nodeType===3&&bg(r))return{visible:!0,style:e}}return{visible:!1,style:e}}if(!kg(t,e))return{style:e,visible:!1};const n=t.getBoundingClientRect();return{rect:n,style:e,visible:n.width>0&&n.height>0}}function Zn(t){return Gl(t).visible}function bg(t){const e=t.ownerDocument.createRange();e.selectNode(t);const n=e.getBoundingClientRect();return n.width>0&&n.height>0}function Ye(t){return t instanceof HTMLFormElement?"FORM":t.tagName.toUpperCase()}function em(t){return t.hasAttribute("aria-label")||t.hasAttribute("aria-labelledby")}const tm="article:not([role]), aside:not([role]), main:not([
Line truncated
|
||||
`).replace(/[\u200b\u00ad]/g,"").replace(/\s\s*/g," ")).join(" ").trim()}function rm(t,e){const n=[...t.querySelectorAll(e)];for(const r of js(t,t.getAttribute("aria-owns")))r.matches(e)&&n.push(r),n.push(...r.querySelectorAll(e));return n}function Bi(t,e){const n=e==="::before"?yf:e==="::after"?vf:gf;if(n!=null&&n.has(t))return n==null?void 0:n.get(t);const r=rr(t,e);let o;return r&&r.display!=="none"&&r.visibility!=="hidden"&&(o=nx(t,r.content,!!e)),e&&o!==void 0&&((r==null?void 0:r.display)||"inline")!=="inline"&&(o=" "+o+" "),n&&n.set(t,o),o}function nx(t,e,n){if(!(!e||e==="none"||e==="normal"))try{let r=zm(e).filter(u=>!(u instanceof Hl));const o=r.findIndex(u=>u instanceof tt&&u.value==="/");if(o!==-1)r=r.slice(o+1);else if(!n)return;const l=[];let c=0;for(;c<r.length;)if(r[c]instanceof ef)l.push(r[c].value),c++;else if(c+2<r.length&&r[c]instanceof Di&&r[c].value==="attr"&&r[c+1]instanceof Zu&&r[c+2]instanceof Yu){const u=r[c+1].value;l.push(t.getAttribute(u)||""),c+=3}else return;return l.join("")}catch{}}function Mg(t){const e=t.getAttribute("aria-labelledby");if(e===null)return null;const n=js(t,e);return n.length?n:null}function rx(t,e){const n=["button","cell","checkbox","columnheader","gridcell","heading","link","menuitem","menuitemcheckbox","menuitemradio","option","radio","row","rowheader","switch","tab","tooltip","treeitem"].includes(t),r=e&&["","caption","code","contentinfo","definition","deletion","emphasis","insertion","list","listitem","mark","none","paragraph","presentation","region","row","rowgroup","section","strong","subscript","superscript","table","term","time"].includes(t);return n||r}function Ki(t,e){const n=e?hf:df;let r=n==null?void 0:n.get(t);return r===void 0&&(r="",["caption","code","definition","deletion","emphasis","generic","insertion","mark","paragraph","presentation","strong","subscript","suggestion","superscript","term","time"].includes(rt(t)||"")||(r=Fi(tn(t,{includeHidden:e,visitedElements:new Set,embeddedInTargetElement:"self"}))),n==null||n.set(t,r)),r}function sm(t,e){const n=e?mf:pf;let r=n==null?void 0:n.get(t);if(r===void 0){if(r="",t.hasAttribute("aria-describedby")){const o=js(t,t.getAttribute("aria-describedby"));r=Fi(o.map(l=>tn(l,{includeHidden:e,visitedElements:new Set,embeddedInDescribedBy:{element:l,hidden:Bt(l)}})).join(" "))}else t.hasAttribute("aria-description")?r=Fi(t.getAttribute("aria-description")||""):r=Fi(t.getAttribute("title")||"");n==null||n.set(t,r)}return r}function sx(t){const e=t.getAttribute("aria-invalid");return!e||e.trim()===""||e.toLocaleLowerCase()==="false"?"false":e==="true"||e==="grammar"||e==="spelling"?e:"true"}function ix(t){if("validity"in t){const e=t.validity;return(e==null?void 0:e.valid)===!1}return!1}function ox(t){const e=ws;let n=ws==null?void 0:ws.get(t);if(n===void 0){n="";const r=sx(t)!=="false",o=ix(t);if(r||o){const l=t.getAttribute("aria-errormessage");n=js(t,l).map(d=>Fi(tn(d,{visitedElements:new Set,embeddedInDescribedBy:{element:d,hidden:Bt(d)}}))).join(" ").trim()}e==null||e.set(t,n)}return n}function tn(t,e){var d,p,g,y;if(e.visitedElements.has(t))return"";const n={...e,embeddedInTargetElement:e.embeddedInTargetElement==="self"?"descendant":e.embeddedInTargetElement};if(!e.includeHidden){const v=!!((d=e.embeddedInLabelledBy)!=null&&d.hidden)||!!((p=e.embeddedInDescribedBy)!=null&&p.hidden)||!!((g=e.embeddedInNativeTextAlternative)!=null&&g.hidden)||!!((y=e.embeddedInLabel)!=null&&y.hidden);if(Ig(t)||!v&&Bt(t))return e.visitedElements.add(t),""}const r=Mg(t);if(!e.embeddedInLabelledBy){const v=(r||[]).map(x=>tn(x,{...e,embeddedInLabelledBy:{element:x,hidden:Bt(x)},embeddedInDescribedBy:void 0,embeddedInTargetElement:void 0,embeddedInLabel:void 0,embeddedInNativeTextAlternative:void 0})).join(" ");if(v)return v}const o=rt(t)||"",l=Ye(t);if(e.embeddedInLabel||e.embeddedInLabelledBy||e.embeddedInTargetElement==="descendant"){const v=[...t.labels||[]].includes(t),x=(r||[]).includes(t);if(!v&&!x){if(o==="textbox")return e.visitedElements.add(t),l==="INPUT"||l==="TEXTAREA"?t.value:t.textContent||"";if(["combobox","listbox"].includes(o)){e.visitedElements.add(t);let E;if(l==="SELECT")E=[...t.selectedOptions],!E.length&&t.options.length&&E.push(t.options[0]);else{const S=o==="combobox"?rm(t,"*").find(k=>rt(k)==="listbox"):t;E=S?rm(S,'[aria-selected="true"]').filter(k=>rt(k)==="option"):[]}return!E.length&&l==="INPUT"?t.value:E.map(S=>tn(S,n)).join(" ")}if(["progressbar","scrollbar","slider","spinbutton","meter"].includes(o))return e.visitedElements.add(t),t.hasAttribute("aria-valuetext")?t.getAttribute("aria-valuetext")||"":t.hasAttribute("aria-valuenow")?t.getAttribute("aria-valuenow")||"":t.getAttribute("value")||"";if(["menu"].includes(o))return e.visitedElements.add(t),""}}const c=t.getAttribute("aria-label")||"";if(kn(c))return e.visitedElements.add(t),c;if(!["presentation","none"].includes(o)){if(l==="INPUT"&&["button","submit","reset"].includes(t.type)){e.visitedElements.add(t);const v=t.value||"";return kn
Line truncated
|
||||
`:return"\\n";case"\r":return"\\r";case" ":return"\\t";default:return"\\x"+e.charCodeAt(0).toString(16).padStart(2,"0")}})+'"':t}function Ug(t){return!!(t.length===0||/^\s|\s$/.test(t)||/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f-\x9f]/.test(t)||/^-/.test(t)||/[\n:](\s|$)/.test(t)||/\s#/.test(t)||/[\n\r]/.test(t)||/^[&*\],?!>|@"'#%]/.test(t)||/[{}`]/.test(t)||/^\[/.test(t)||!isNaN(Number(t))||["y","n","yes","no","true","false","on","off","null"].includes(t.toLowerCase()))}let yx=0;function Hg(t){return t.mode==="ai"?{visibility:"ariaOrVisible",refs:"interactable",refPrefix:t.refPrefix,includeGenericRole:!0,renderActive:!0,renderCursorPointer:!0}:t.mode==="autoexpect"?{visibility:"ariaAndVisible",refs:"none"}:t.mode==="codegen"?{visibility:"aria",refs:"none",renderStringsAsRegex:!0}:{visibility:"aria",refs:"none"}}function zi(t,e){const n=Hg(e),r=new Set,o={root:{role:"fragment",name:"",children:[],element:t,props:{},box:Gl(t),receivesPointerEvents:!0},elements:new Map,refs:new Map},l=(u,d,p)=>{if(r.has(d))return;if(r.add(d),d.nodeType===Node.TEXT_NODE&&d.nodeValue){if(!p)return;const S=d.nodeValue;u.role!=="textbox"&&S&&u.children.push(d.nodeValue||"");return}if(d.nodeType!==Node.ELEMENT_NODE)return;const g=d,y=!Bt(g);let v=y;if(n.visibility==="ariaOrVisible"&&(v=y||Zn(g)),n.visibility==="ariaAndVisible"&&(v=y&&Zn(g)),n.visibility==="aria"&&!v)return;const x=[];if(g.hasAttribute("aria-owns")){const S=g.getAttribute("aria-owns").split(/\s+/);for(const k of S){const C=t.ownerDocument.getElementById(k);C&&x.push(C)}}const E=v?vx(g,n):null;E&&(E.ref&&(o.elements.set(E.ref,g),o.refs.set(g,E.ref)),u.children.push(E)),c(E||u,g,x,v)};function c(u,d,p,g){var E;const v=(((E=rr(d))==null?void 0:E.display)||"inline")!=="inline"||d.nodeName==="BR"?" ":"";v&&u.children.push(v),u.children.push(Bi(d,"::before")||"");const x=d.nodeName==="SLOT"?d.assignedNodes():[];if(x.length)for(const S of x)l(u,S,g);else{for(let S=d.firstChild;S;S=S.nextSibling)S.assignedSlot||l(u,S,g);if(d.shadowRoot)for(let S=d.shadowRoot.firstChild;S;S=S.nextSibling)l(u,S,g)}for(const S of p)l(u,S,g);if(u.children.push(Bi(d,"::after")||""),v&&u.children.push(v),u.children.length===1&&u.name===u.children[0]&&(u.children=[]),u.role==="link"&&d.hasAttribute("href")){const S=d.getAttribute("href");u.props.url=S}}Sf();try{l(o.root,t,!0)}finally{xf()}return Sx(o.root),wx(o.root),o}function im(t,e){if(e.refs==="none"||e.refs==="interactable"&&(!t.box.visible||!t.receivesPointerEvents))return;let n;n=t.element._ariaRef,(!n||n.role!==t.role||n.name!==t.name)&&(n={role:t.role,name:t.name,ref:(e.refPrefix??"")+"e"+ ++yx},t.element._ariaRef=n),t.ref=n.ref}function vx(t,e){const n=t.ownerDocument.activeElement===t;if(t.nodeName==="IFRAME"){const d={role:"iframe",name:"",children:[],props:{},element:t,box:Gl(t),receivesPointerEvents:!0,active:n};return im(d,e),d}const r=e.includeGenericRole?"generic":null,o=rt(t)??r;if(!o||o==="presentation"||o==="none")return null;const l=mt(Ki(t,!1)||""),c=px(t),u={role:o,name:l,children:[],props:{},element:t,box:Gl(t),receivesPointerEvents:c,active:n};return im(u,e),lf.includes(o)&&(u.checked=Pg(t)),Dg.includes(o)&&(u.disabled=Jl(t)),uf.includes(o)&&(u.expanded=Rg(t)),ff.includes(o)&&(u.level=$g(t)),cf.includes(o)&&(u.pressed=Og(t)),of.includes(o)&&(u.selected=jg(t)),(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)&&t.type!=="checkbox"&&t.type!=="radio"&&t.type!=="file"&&(u.children=[t.value]),u}function wx(t){const e=n=>{const r=[];for(const l of n.children||[]){if(typeof l=="string"){r.push(l);continue}const c=e(l);r.push(...c)}return n.role==="generic"&&r.length<=1&&r.every(l=>typeof l!="string"&&!!l.ref)?r:(n.children=r,[n])};e(t)}function Sx(t){const e=(r,o)=>{if(!r.length)return;const l=mt(r.join(""));l&&o.push(l),r.length=0},n=r=>{const o=[],l=[];for(const c of r.children||[])typeof c=="string"?l.push(c):(e(l,o),n(c),o.push(c));e(l,o),r.children=o.length?o:[],r.children.length===1&&r.children[0]===r.name&&(r.children=[])};n(t)}function _f(t,e){return e?t?typeof e=="string"?t===e:!!t.match(new RegExp(e.pattern)):!1:!0}function xx(t,e){return _f(t,e.text)}function _x(t,e){return _f(t,e.name)}function Ex(t,e){const n=zi(t,{mode:"expect"});return{matches:qg(n.root,e,!1,!1),received:{raw:Xl(n,{mode:"expect"}),regex:Xl(n,{mode:"codegen"})}}}function kx(t,e){const n=zi(t,{mode:"expect"}).root;return qg(n,e,!0,!1).map(o=>o.element)}function Ef(t,e,n){var r;return typeof t=="string"&&e.kind==="text"?xx(t,e):t===null||typeof t!="object"||e.kind!=="role"||e.role!=="fragment"&&e.role!==t.role||e.checked!==void 0&&e.checked!==t.checked||e.disabled!==void 0&&e.disabled!==t.disabled||e.expanded!==void 0&&e.expanded!==t.expanded||e.level!==void 0&&e.level!==t.level||e.pressed!==void 0&&e.pressed!==t.pressed||e.selected!==void 0&&e.selected!==t.selected||!_x(t.name,e)||!_f(t.props.url,(r=e.props)==null?void 0:r.url)?!1:e.containerMode==="contain"?lm(t.children||[],e.children||[]):e.containerMode==="equal"?om(t.children||[],e.childrLine truncated
|
||||
`)}function bx(t){const e=[{regex:/\b[\d,.]+[bkmBKM]+\b/,replacement:"[\\d,.]+[bkmBKM]+"},{regex:/\b\d+[hmsp]+\b/,replacement:"\\d+[hmsp]+"},{regex:/\b[\d,.]+[hmsp]+\b/,replacement:"[\\d,.]+[hmsp]+"},{regex:/\b\d+,\d+\b/,replacement:"\\d+,\\d+"},{regex:/\b\d+\.\d{2,}\b/,replacement:"\\d+\\.\\d+"},{regex:/\b\d{2,}\.\d+\b/,replacement:"\\d+\\.\\d+"},{regex:/\b\d{2,}\b/,replacement:"\\d+"}];let n="",r=0;const o=new RegExp(e.map(l=>"("+l.regex.source+")").join("|"),"g");return t.replace(o,(l,...c)=>{const u=c[c.length-2],d=c.slice(0,-2);n+=Vl(t.slice(r,u));for(let p=0;p<d.length;p++)if(d[p]){const{replacement:g}=e[p];n+=g;break}return r=u+l.length,l}),n?(n+=Vl(t.slice(r)),String(new RegExp(n))):t}function Tx(t,e){if(!e.length)return!1;if(!t.name)return!0;if(t.name.length>e.length)return!1;const n=e.length<=200&&t.name.length<=200?dS(e,t.name):"";let r=e;for(;n&&r.includes(n);)r=r.replace(n,"");return r.trim().length/e.length>.1}function Cx(t){var e;return((e=t.box.style)==null?void 0:e.cursor)==="pointer"}const am=":host{font-size:13px;font-family:system-ui,Ubuntu,Droid Sans,sans-serif;color:#333}svg{position:absolute;height:0}x-pw-tooltip{-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);background-color:#fff;border-radius:6px;box-shadow:0 .5rem 1.2rem #0000004d;display:none;font-size:12.8px;font-weight:400;left:0;line-height:1.5;max-width:600px;position:absolute;top:0;padding:0;flex-direction:column;overflow:hidden}x-pw-tooltip-line{display:flex;max-width:600px;padding:6px;-webkit-user-select:none;user-select:none;cursor:pointer}x-pw-tooltip-line.selectable:hover{background-color:#f2f2f2;overflow:hidden}x-pw-tooltip-footer{display:flex;max-width:600px;padding:6px;-webkit-user-select:none;user-select:none;color:#777}x-pw-dialog{background-color:#fff;pointer-events:auto;border-radius:6px;box-shadow:0 .5rem 1.2rem #0000004d;display:flex;flex-direction:column;position:absolute;width:400px;height:150px;z-index:10;font-size:13px}x-pw-dialog-body{display:flex;flex-direction:column;flex:auto}x-pw-dialog-body label{margin:5px 8px;display:flex;flex-direction:row;align-items:center}x-pw-highlight{position:absolute;top:0;left:0;width:0;height:0}x-pw-action-point{position:absolute;width:20px;height:20px;background:red;border-radius:10px;margin:-10px 0 0 -10px;z-index:2}x-pw-separator{height:1px;margin:6px 9px;background:#949494e5}x-pw-tool-gripper{height:28px;width:24px;margin:2px 0;cursor:grab}x-pw-tool-gripper:active{cursor:grabbing}x-pw-tool-gripper>x-div{width:16px;height:16px;margin:6px 4px;clip-path:url(#icon-gripper);background-color:#555}x-pw-tools-list>label{display:flex;align-items:center;margin:0 10px;-webkit-user-select:none;user-select:none}x-pw-tools-list{display:flex;width:100%;border-bottom:1px solid #dddddd}x-pw-tool-item{pointer-events:auto;height:28px;width:28px;border-radius:3px}x-pw-tool-item:not(.disabled){cursor:pointer}x-pw-tool-item:not(.disabled):hover{background-color:#dbdbdb}x-pw-tool-item.toggled{background-color:#8acae480}x-pw-tool-item.toggled:not(.disabled):hover{background-color:#8acae4c4}x-pw-tool-item>x-div{width:16px;height:16px;margin:6px;background-color:#3a3a3a}x-pw-tool-item.disabled>x-div{background-color:#61616180;cursor:default}x-pw-tool-item.record.toggled{background-color:transparent}x-pw-tool-item.record.toggled:not(.disabled):hover{background-color:#dbdbdb}x-pw-tool-item.record.toggled>x-div{background-color:#a1260d}x-pw-tool-item.record.disabled.toggled>x-div{opacity:.8}x-pw-tool-item.accept>x-div{background-color:#388a34}x-pw-tool-item.record>x-div{clip-path:url(#icon-circle-large-filled)}x-pw-tool-item.pick-locator>x-div{clip-path:url(#icon-inspect)}x-pw-tool-item.text>x-div{clip-path:url(#icon-whole-word)}x-pw-tool-item.visibility>x-div{clip-path:url(#icon-eye)}x-pw-tool-item.value>x-div{clip-path:url(#icon-symbol-constant)}x-pw-tool-item.snapshot>x-div{clip-path:url(#icon-gist)}x-pw-tool-item.accept>x-div{clip-path:url(#icon-check)}x-pw-tool-item.cancel>x-div{clip-path:url(#icon-close)}x-pw-tool-item.succeeded>x-div{clip-path:url(#icon-pass);background-color:#388a34!important}x-pw-overlay{position:absolute;top:0;max-width:min-content;z-index:2147483647;background:transparent;pointer-events:auto}x-pw-overlay x-pw-tools-list{background-color:#fffd;box-shadow:#0000001a 0 5px 5px;border-radius:3px;border-bottom:none}x-pw-overlay x-pw-tool-item{margin:2px}textarea.text-editor{font-family:system-ui,Ubuntu,Droid Sans,sans-serif;flex:auto;border:none;margin:6px 10px;color:#333;outline:1px solid transparent!important;resize:none;padding:0;font-size:13px}textarea.text-editor.does-not-match{outline:1px solid red!important}x-div{display:block}x-spacer{flex:auto}*{box-sizing:border-box}*[hidden]{display:none!important}x-locator-editor{flex:none;width:100%;height:60px;padding:4px;border-bottom:1px solid #dddddd;outline:1px solid transparent}x-locator-editor.does-not-match{outline:1px solid red}.CodeMirror{width:100%!important;height:100%!important}";class wu{constructor(e){
Line truncated
|
||||
${t.stack}`,{e:{n:t.name,m:t.message,s:c}}}if(M_(t))return{d:t.toJSON()};if(j_(t))return{u:t.toJSON()};if(L_(t))return{r:{p:t.source,f:t.flags}};for(const[c,u]of Object.entries(py))if(O_(t,u))return{ta:{b:R_(t),k:c}};const o=n.visited.get(t);if(o)return{ref:o};if(Array.isArray(t)){const c=[],u=++n.lastId;n.visited.set(t,u);for(let d=0;d<t.length;++d)c.push(Bu(t[d],e,n));return{a:c,id:u}}if(typeof t=="object"){const c=[],u=++n.lastId;n.visited.set(t,u);for(const p of Object.keys(t)){let g;try{g=t[p]}catch{continue}p==="toJSON"&&typeof g=="function"?c.push({k:p,v:{o:[],id:0}}):c.push({k:p,v:Bu(g,e,n)})}let d;try{c.length===0&&t.toJSON&&typeof t.toJSON=="function"&&(d={value:t.toJSON()})}catch{}return d?my(d.value,e,n):{o:c,id:u}}}class F_{constructor(e,n){var r,o,l,c,u,d,p,g;this.global=e,this.isUnderTest=n,e.__pwClock?this.builtins=e.__pwClock.builtins:this.builtins={setTimeout:(r=e.setTimeout)==null?void 0:r.bind(e),clearTimeout:(o=e.clearTimeout)==null?void 0:o.bind(e),setInterval:(l=e.setInterval)==null?void 0:l.bind(e),clearInterval:(c=e.clearInterval)==null?void 0:c.bind(e),requestAnimationFrame:(u=e.requestAnimationFrame)==null?void 0:u.bind(e),cancelAnimationFrame:(d=e.cancelAnimationFrame)==null?void 0:d.bind(e),requestIdleCallback:(p=e.requestIdleCallback)==null?void 0:p.bind(e),cancelIdleCallback:(g=e.cancelIdleCallback)==null?void 0:g.bind(e),performance:e.performance,Intl:e.Intl,Date:e.Date},this.isUnderTest&&(e.builtins=this.builtins)}evaluate(e,n,r,o,...l){const c=l.slice(0,o),u=l.slice(o),d=[];for(let g=0;g<c.length;g++)d[g]=Fu(c[g],u);let p=this.global.eval(r);return e===!0?p=p(...d):e===!1?p=p:typeof p=="function"&&(p=p(...d)),n?this._promiseAwareJsonValueNoThrow(p):p}jsonValue(e,n){if(n!==void 0)return D_(n,r=>({fallThrough:r}))}_promiseAwareJsonValueNoThrow(e){const n=r=>{try{return this.jsonValue(!0,r)}catch{return}};return e&&typeof e=="object"&&typeof e.then=="function"?(async()=>{const r=await e;return n(r)})():n(e)}}class gy{constructor(e,n){this._testIdAttributeNameForStrictErrorAndConsoleCodegen="data-testid",this.utils={asLocator:Lr,cacheNormalizedWhitespaces:uS,elementText:Tt,getAriaRole:rt,getElementAccessibleDescription:sm,getElementAccessibleName:Ki,isElementVisible:Zn,isInsideScope:oa,normalizeWhiteSpace:mt,parseAriaSnapshot:sf,generateAriaTree:zi,builtins:null},this.window=e,this.document=e.document,this.isUnderTest=n.isUnderTest,this.utils.builtins=new F_(e,n.isUnderTest).builtins,this._sdkLanguage=n.sdkLanguage,this._testIdAttributeNameForStrictErrorAndConsoleCodegen=n.testIdAttributeName,this._evaluator=new zx,this.consoleApi=new I_(this),this.onGlobalListenersRemoved=new Set,this._autoClosingTags=new Set(["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","MENUITEM","META","PARAM","SOURCE","TRACK","WBR"]),this._booleanAttributes=new Set(["checked","selected","disabled","readonly","multiple"]),this._eventTypes=new Map([["auxclick","mouse"],["click","mouse"],["dblclick","mouse"],["mousedown","mouse"],["mouseeenter","mouse"],["mouseleave","mouse"],["mousemove","mouse"],["mouseout","mouse"],["mouseover","mouse"],["mouseup","mouse"],["mouseleave","mouse"],["mousewheel","mouse"],["keydown","keyboard"],["keyup","keyboard"],["keypress","keyboard"],["textInput","keyboard"],["touchstart","touch"],["touchmove","touch"],["touchend","touch"],["touchcancel","touch"],["pointerover","pointer"],["pointerout","pointer"],["pointerenter","pointer"],["pointerleave","pointer"],["pointerdown","pointer"],["pointerup","pointer"],["pointermove","pointer"],["pointercancel","pointer"],["gotpointercapture","pointer"],["lostpointercapture","pointer"],["focus","focus"],["blur","focus"],["drag","drag"],["dragstart","drag"],["dragend","drag"],["dragover","drag"],["dragenter","drag"],["dragleave","drag"],["dragexit","drag"],["drop","drag"],["wheel","wheel"],["deviceorientation","deviceorientation"],["deviceorientationabsolute","deviceorientation"],["devicemotion","devicemotion"]]),this._hoverHitTargetInterceptorEvents=new Set(["mousemove"]),this._tapHitTargetInterceptorEvents=new Set(["pointerdown","pointerup","touchstart","touchend","touchcancel"]),this._mouseHitTargetInterceptorEvents=new Set(["mousedown","mouseup","pointerdown","pointerup","click","auxclick","dblclick","contextmenu"]),this._allHitTargetInterceptorEvents=new Set([...this._hoverHitTargetInterceptorEvents,...this._tapHitTargetInterceptorEvents,...this._mouseHitTargetInterceptorEvents]),this._engines=new Map,this._engines.set("xpath",gm),this._engines.set("xpath:light",gm),this._engines.set("_react",Dx()),this._engines.set("_vue",S_()),this._engines.set("role",um(!1)),this._engines.set("text",this._createTextEngine(!0,!1)),this._engines.set("text:light",this._createTextEngine(!1,!1)),this._engines.set("id",this._createAttributeEngine("id",!0)),this._engines.set("id:light",this._createAttributeEngine("id",!1)),this._engines.set("data-testid",this._createAttributeEngine("data-testid",!0)),this._engines.set("data-t
Line truncated
|
||||
(() => {
|
||||
const module = {};
|
||||
${e}
|
||||
return module.exports.default();
|
||||
})()`);return new r(this,n)}async viewportRatio(e){return await new Promise(n=>{const r=new IntersectionObserver(o=>{n(o[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 n=e.ownerDocument.defaultView.getComputedStyle(e);return{left:parseInt(n.borderLeftWidth||"",10),top:parseInt(n.borderTopWidth||"",10)}}describeIFrameStyle(e){if(!e.ownerDocument||!e.ownerDocument.defaultView)return"error:notconnected";const n=e.ownerDocument.defaultView;for(let o=e;o;o=at(o))if(n.getComputedStyle(o).transform!=="none")return"transformed";const r=n.getComputedStyle(e);return{left:parseInt(r.borderLeftWidth||"",10)+parseInt(r.paddingLeft||"",10),top:parseInt(r.borderTopWidth||"",10)+parseInt(r.paddingTop||"",10)}}retarget(e,n){let r=e.nodeType===Node.ELEMENT_NODE?e:e.parentElement;if(!r)return null;if(n==="none")return r;if(!r.matches("input, textarea, select")&&!r.isContentEditable&&(n==="button-link"?r=r.closest("button, [role=button], a, [role=link]")||r:r=r.closest("button, [role=button], [role=checkbox], [role=radio]")||r),n==="follow-label"&&!r.matches("a, input, textarea, button, select, [role=link], [role=button], [role=checkbox], [role=radio]")&&!r.isContentEditable){const o=r.closest("label");o&&o.control&&(r=o.control)}return r}async checkElementStates(e,n){if(n.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 n)if(r!=="stable"){const o=this.elementState(e,r);if(o.received==="error:notconnected")return"error:notconnected";if(!o.matches)return{missingState:r}}}async _checkElementIsStable(e){const n=Symbol("continuePolling");let r,o=0,l=0;const c=()=>{const y=this.retarget(e,"no-follow-label");if(!y)return"error:notconnected";const v=this.utils.builtins.performance.now();if(this._stableRafCount>1&&v-l<15)return n;l=v;const x=y.getBoundingClientRect(),E={x:x.top,y:x.left,width:x.width,height:x.height};if(r){if(!(E.x===r.x&&E.y===r.y&&E.width===r.width&&E.height===r.height))return!1;if(++o>=this._stableRafCount)return!0}return r=E,n};let u,d;const p=new Promise((y,v)=>{u=y,d=v}),g=()=>{try{const y=c();y!==n?u(y):this.utils.builtins.requestAnimationFrame(g)}catch(y){d(y)}};return this.utils.builtins.requestAnimationFrame(g),p}_createAriaRefEngine(){return{queryAll:(n,r)=>{var l,c;const o=(c=(l=this._lastAriaSnapshot)==null?void 0:l.elements)==null?void 0:c.get(r);return o&&o.isConnected?[o]:[]}}}elementState(e,n){const r=this.retarget(e,["visible","hidden"].includes(n)?"none":"follow-label");if(!r||!r.isConnected)return n==="hidden"?{matches:!0,received:"hidden"}:{matches:!1,received:"error:notconnected"};if(n==="visible"||n==="hidden"){const o=Zn(r);return{matches:n==="visible"?o:!o,received:o?"visible":"hidden"}}if(n==="disabled"||n==="enabled"){const o=Jl(r);return{matches:n==="disabled"?o:!o,received:o?"disabled":"enabled"}}if(n==="editable"){const o=Jl(r),l=fx(r);if(l==="error")throw this.createStacklessError("Element is not an <input>, <textarea>, <select> or [contenteditable] and does not have a role allowing [aria-readonly]");return{matches:!o&&!l,received:o?"disabled":l?"readOnly":"editable"}}if(n==="checked"||n==="unchecked"){const o=n==="checked",l=cx(r);if(l==="error")throw this.createStacklessError("Not a checkbox or radio button");return{matches:o===l,received:l?"checked":"unchecked"}}if(n==="indeterminate"){const o=ax(r);if(o==="error")throw this.createStacklessError("Not a checkbox or radio button");return{matches:o==="mixed",received:o===!0?"checked":o===!1?"unchecked":"mixed"}}throw this.createStacklessError(`Unexpected element state "${n}"`)}selectOptions(e,n){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 o=r,l=[...o.options],c=[];let u=n.slice();for(let d=0;d<l.length;d++){const p=l[d],g=y=>{if(y instanceof Node)return p===y;let v=!0;return y.valueOrLabel!==void 0&&(v=v&&(y.valueOrLabel===p.value||y.valueOrLabel===p.label)),y.value!==void 0&&(v=v&&y.value===p.value),y.label!==void 0&&(v=v&&y.label===p.label),y.index!==void 0&&(v=v&&y.index===d),v};if(u.some(g)){if(!this.elementState(p,"enabled").matches)return"error:optionnotenabled";if(c.push(p),o.multiple)u=u.filter(y=>!g(y));else{u=[];break}}}return u.length?"error:optionsnotfound":(o.value=void 0,c.forEach(d=>d.selected=!0),o.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),o.dispatchEvent(new Event("change",{bubbles:!0})),c.map(d=>d.value))}fill(e,n){const r=this.retarget(e,"follow-label");if(!r)return"error:notconnected";if(r.nodeName.toLowerCase()==="input"){const o=r,l=o.type.toLowerCase(),c=new Set(["color","date","time","datetime-local","month","range","week"]);if(!new Set(["","
Line truncated
|
||||
${c+1}) ${l.preview} aka ${Lr(this._sdkLanguage,l.selector)}`);return r.length<n.length&&o.push(`
|
||||
...`),this.createStacklessError(`strict mode violation: ${Lr(this._sdkLanguage,Tn(e))} resolved to ${n.length} elements:${o.join("")}
|
||||
`)}createStacklessError(e){if(this._browserName==="firefox"){const r=new Error("Error: "+e);return r.stack="",r}const n=new Error(e);return delete n.stack,n}createHighlight(){return new wu(this)}maskSelectors(e,n){this._highlight&&this.hideHighlight(),this._highlight=new wu(this),this._highlight.install();const r=[];for(const o of e)r.push(this.querySelectorAll(o,this.document.documentElement));this._highlight.maskElements(r.flat(),n)}highlight(e){this._highlight||(this._highlight=new wu(this),this._highlight.install()),this._highlight.runHighlightOnRaf(e)}hideHighlight(){this._highlight&&(this._highlight.uninstall(),delete this._highlight)}markTargetElements(e,n){var c,u;((c=this._markedElements)==null?void 0:c.callId)!==n&&(this._markedElements=void 0);const r=((u=this._markedElements)==null?void 0:u.elements)||new Set,o=new CustomEvent("__playwright_unmark_target__",{bubbles:!0,cancelable:!0,detail:n,composed:!0});for(const d of r)e.has(d)||d.dispatchEvent(o);const l=new CustomEvent("__playwright_mark_target__",{bubbles:!0,cancelable:!0,detail:n,composed:!0});for(const d of e)r.has(d)||d.dispatchEvent(l);this._markedElements={callId:n,elements:e}}_setupGlobalListenersRemovalDetection(){const e="__playwright_global_listeners_check__";let n=!1;const r=()=>n=!0;this.window.addEventListener(e,r),new MutationObserver(o=>{if(o.some(c=>Array.from(c.addedNodes).includes(this.document.documentElement))&&(n=!1,this.window.dispatchEvent(new CustomEvent(e)),!n)){this.window.addEventListener(e,r);for(const c of this.onGlobalListenersRemoved)c()}}).observe(this.document,{childList:!0})}_setupHitTargetInterceptors(){const e=r=>{var o;return(o=this._hitTargetInterceptor)==null?void 0:o.call(this,r)},n=()=>{for(const r of this._allHitTargetInterceptorEvents)this.window.addEventListener(r,e,{capture:!0,passive:!1})};n(),this.onGlobalListenersRemoved.add(n)}async expect(e,n,r){var l,c;if(n.expression==="to.have.count"||n.expression.endsWith(".array"))return this.expectArray(r,n);if(!e){if(!n.isNot&&n.expression==="to.be.hidden")return{matches:!0};if(n.isNot&&n.expression==="to.be.visible")return{matches:!1};if(!n.isNot&&n.expression==="to.be.detached")return{matches:!0};if(n.isNot&&n.expression==="to.be.attached")return{matches:!1};if(n.isNot&&n.expression==="to.be.in.viewport")return{matches:!1};if(n.expression==="to.have.title"&&((l=n==null?void 0:n.expectedText)!=null&&l[0])){const u=new hs(n.expectedText[0]),d=this.document.title;return{received:d,matches:u.matches(d)}}if(n.expression==="to.have.url"&&((c=n==null?void 0:n.expectedText)!=null&&c[0])){const u=new hs(n.expectedText[0]),d=this.document.location.href;return{received:d,matches:u.matches(d)}}return{matches:n.isNot,missingReceived:!0}}return await this.expectSingleElement(e,n)}async expectSingleElement(e,n){var o;const r=n.expression;{let l;if(r==="to.have.attribute"){const c=e.hasAttribute(n.expressionArg);l={matches:c,received:c?"attribute present":"attribute not present"}}else if(r==="to.be.checked"){const{checked:c,indeterminate:u}=n.expectedValue;if(u){if(c!==void 0)throw this.createStacklessError("Can't assert indeterminate and checked at the same time");l=this.elementState(e,"indeterminate")}else l=this.elementState(e,c===!1?"unchecked":"checked")}else if(r==="to.be.disabled")l=this.elementState(e,"disabled");else if(r==="to.be.editable")l=this.elementState(e,"editable");else if(r==="to.be.readonly")l=this.elementState(e,"editable"),l.matches=!l.matches;else if(r==="to.be.empty")if(e.nodeName==="INPUT"||e.nodeName==="TEXTAREA"){const c=e.value;l={matches:!c,received:c?"notEmpty":"empty"}}else{const c=(o=e.textContent)==null?void 0:o.trim();l={matches:!c,received:c?"notEmpty":"empty"}}else if(r==="to.be.enabled")l=this.elementState(e,"enabled");else if(r==="to.be.focused"){const c=this._activelyFocused(e).isFocused;l={matches:c,received:c?"focused":"inactive"}}else r==="to.be.hidden"?l=this.elementState(e,"hidden"):r==="to.be.visible"?l=this.elementState(e,"visible"):r==="to.be.attached"?l={matches:!0,received:"attached"}:r==="to.be.detached"&&(l={matches:!1,received:"attached"});if(l){if(l.received==="error:notconnected")throw this.createStacklessError("Element is not connected");return l}}if(r==="to.have.property"){let l=e;const c=n.expressionArg.split(".");for(let p=0;p<c.length-1;p++){if(typeof l!="object"||!(c[p]in l))return{received:void 0,matches:!1};l=l[c[p]]}const u=l[c[c.length-1]],d=zu(u,n.expectedValue);return{received:u,matches:d}}if(r==="to.be.in.viewport"){const l=await this.viewportRatio(e);return{received:`viewport ratio ${l}`,matches:l>0&&l>(n.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 l=[...e.selectedOptions].map(c=>c.value);return l.length!==n.expectedText.length?{received:l,matches:!1}:{received:l,matches:l.map((c,u)=>new hs(n.expectedText[u]).matches(c)).every(Boolean
Line truncated
|
||||
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,o,l;yy(this._listeners),this._listeners=[Me(this.document,"click",c=>this._onClick(c),!0),Me(this.document,"auxclick",c=>this._onClick(c),!0),Me(this.document,"dblclick",c=>this._onDblClick(c),!0),Me(this.document,"contextmenu",c=>this._onContextMenu(c),!0),Me(this.document,"dragstart",c=>this._onDragStart(c),!0),Me(this.document,"input",c=>this._onInput(c),!0),Me(this.document,"keydown",c=>this._onKeyDown(c),!0),Me(this.document,"keyup",c=>this._onKeyUp(c),!0),Me(this.document,"pointerdown",c=>this._onPointerDown(c),!0),Me(this.document,"pointerup",c=>this._onPointerUp(c),!0),Me(this.document,"mousedown",c=>this._onMouseDown(c),!0),Me(this.document,"mouseup",c=>this._onMouseUp(c),!0),Me(this.document,"mousemove",c=>this._onMouseMove(c),!0),Me(this.document,"mouseleave",c=>this._onMouseLeave(c),!0),Me(this.document,"mouseenter",c=>this._onMouseEnter(c),!0),Me(this.document,"focus",c=>this._onFocus(c),!0),Me(this.document,"scroll",c=>this._onScroll(c),!0)],this.highlight.install();let e;const n=()=>{this.highlight.install(),e=this.injectedScript.utils.builtins.setTimeout(n,500)};e=this.injectedScript.utils.builtins.setTimeout(n,500),this._listeners.push(()=>this.injectedScript.utils.builtins.clearTimeout(e)),this.highlight.appendChild(vy(this.document,z_)),(r=this.overlay)==null||r.install(),(l=(o=this._currentTool)==null?void 0:o.install)==null||l.call(o),this.document.adoptedStyleSheets.push(this._stylesheet)}_switchCurrentTool(){var r,o,l,c,u,d;const e=this._tools[this.state.mode];if(e===this._currentTool)return;(o=(r=this._currentTool).uninstall)==null||o.call(r),this.clearHighlight(),this._currentTool=e,(c=(l=this._currentTool).install)==null||c.call(l);const n=(u=e.cursor)==null?void 0:u.call(e);n&&((d=this.injectedScript.document.body)==null||d.setAttribute("data-pw-cursor",n))}setUIState(e,n){var l;this._delegate=n,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(),(l=this.overlay)==null||l.setUIState(e);let r="noop";if(e.actionSelector!==this._lastHighlightedSelector){const c=e.actionSelector?G_(this.injectedScript,e.language,e.actionSelector,this.document):null;r=c!=null&&c.length?c:"clear",this._lastHighlightedSelector=c!=null&&c.length?e.actionSelector:void 0}const o=JSON.stringify(e.ariaTemplate);if(this._lastHighlightedAriaTemplateJSON!==o){const c=e.ariaTemplate?this.injectedScript.getAllElementsMatchingExpectAriaTemplate(this.document,e.ariaTemplate):[];if(c.length){const u=c.length>1?zt.multiple:zt.single;r=c.map(d=>({element:d,color:u})),this._lastHighlightedAriaTemplateJSON=o}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 n,r,o;e.isTrusted&&((n=this.overlay)!=null&&n.onClick(e)||this._ignoreOverlayEvent(e)||(o=(r=this._currentTool).onClick)==null||o.call(r,e))}_onDblClick(e){var n,r,o;e.isTrusted&&((n=this.overlay)!=null&&n.onDblClick(e)||this._ignoreOverlayEvent(e)||(o=(r=this._currentTool).onDblClick)==null||o.call(r,e))}_onContextMenu(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onContextMenu)==null||r.call(n,e))}_onDragStart(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onDragStart)==null||r.call(n,e))}_onPointerDown(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onPointerDown)==null||r.call(n,e))}_onPointerUp(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onPointerUp)==null||r.call(n,e))}_onMouseDown(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onMouseDown)==null||r.call(n,e))}_onMouseUp(e){var n,r,o;e.isTrusted&&((n=this.overlay)!=null&&n.onMouseUp(e)||this._ignoreOverlayEvent(e)||(o=(r=this._currentTool).onMouseUp)==null||o.call(r,e))}_onMouseMove(e){var n,r,o;e.isTrusted&&((n=this.overlay)!=null&&n.onMouseMove(e)||this._ignoreOverlayEvent(e)||(o=(r=this._currentTool).onMouseMove)==null||o.call(r,e))}_onMouseEnter(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onMouseEnter)==null||r.call(n,e))}_onMouseLeave(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onMouseLeave)==null||r.call(n,e))}_onFocus(e){var n,r;e.isTrusted&&(this._ignoreOverlayEvent(e)||(r=(n=this._currentTool).onFocus)==null||r.call(n,e))}_onScroll(e){var n,r;e.isTrusted&&(this._lastHighlightedSelector=void 0,this._l
Line truncated
|
||||
`:t[l]==="r"?d+="\r":t[l]==="t"?d+=" ":d+=t[l]),++l;continue}if(t[l]!==c){d+=t[l++];continue}break}n.push({quote:c,text:d}),r+=(c==="/"?"r":"")+"$"+n.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 o=n.map(l=>l.quote).filter(l=>"'\"`".includes(l))[0];return{selector:wy(r,n,e),preferredQuote:o}}function vm(t){return[...t.matchAll(/\$\d+/g)].length}function wm(t,e){return t.replace(/\$(\d+)/g,(n,r)=>`$${r-e}`)}function wy(t,e,n){for(;;){const o=t.match(/filter\(,?(has=|hasnot=|sethas\(|sethasnot\()/);if(!o)break;const l=o.index+o[0].length;let c=0,u=l;for(;u<t.length&&(t[u]==="("?c++:t[u]===")"&&c--,!(c<0));u++);let d=t.substring(0,l),p=0;["sethas(","sethasnot("].includes(o[1])&&(p=1,d=d.replace(/sethas\($/,"has=").replace(/sethasnot\($/,"hasnot="));const g=vm(t.substring(0,l)),y=wm(t.substring(l,u),g),v=vm(y),x=e.slice(g,g+v),E=JSON.stringify(wy(y,x,n));t=d.replace(/=$/,"2=")+`$${g+1}`+wm(t.substring(u+p),v-1);const S=e.slice(0,g),k=e.slice(g+v);e=S.concat([{quote:'"',text:E}]).concat(k)}t=t.replace(/\,set([\w]+)\(([^)]+)\)/g,(o,l,c)=>","+l.toLowerCase()+"="+c.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=[${n}=$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(/,exact=true/g,"s").replace(/,includehidden=/g,",include-hidden=").replace(/\,/g,"][");const r=t.split(".");for(let o=0;o<r.length-1;o++)if(r[o]==="internal:control=enter-frame"&&r[o+1].startsWith("nth=")){const[l]=r.splice(o,1);r.splice(o+1,0,l)}return r.map(o=>!o.startsWith("internal:")||o==="internal:control"?o.replace(/\$(\d+)/g,(l,c)=>e[+c-1].text):(o=o.includes("[")?o.replace(/\]/,"")+"]":o,o=o.replace(/(?:r)\$(\d+)(i)?/g,(l,c,u)=>{const d=e[+c-1];return o.startsWith("internal:attr")||o.startsWith("internal:testid")||o.startsWith("internal:role")?ht(new RegExp(d.text),!1)+(u||""):kt(new RegExp(d.text,u),!1)}).replace(/\$(\d+)(i|s)?/g,(l,c,u)=>{const d=e[+c-1];return o.startsWith("internal:has=")||o.startsWith("internal:has-not=")?d.text:o.startsWith("internal:testid")?ht(d.text,!0):o.startsWith("internal:attr")||o.startsWith("internal:role")?ht(d.text,u==="s"):kt(d.text,u==="s")}),o)).join(" >> ")}function Y_(t,e,n){try{return Z_(t,e,n)}catch{return""}}function Z_(t,e,n){try{return Yi(e),e}catch{}const{selector:r,preferredQuote:o}=X_(e,n),l=ag(t,r,void 0,void 0,o),c=Sm(t,e);return l.some(u=>Sm(t,u)===c)?r:""}function Sm(t,e){return e=e.replace(/\s/g,""),t==="javascript"&&(e=e.replace(/\\?["`]/g,"'").replace(/,{}/g,"")),e}const eE=({url:t})=>w.jsxs("div",{className:"browser-frame-header",children:[w.jsxs("div",{style:{whiteSpace:"nowrap"},children:[w.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(242, 95, 88)"}}),w.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(251, 190, 60)"}}),w.jsx("span",{className:"browser-frame-dot",style:{backgroundColor:"rgb(88, 203, 66)"}})]}),w.jsxs("div",{className:"browser-frame-address-bar",title:t||"about:blank",children:[t||"about:blank",t&&w.jsx(nf,{value:t})]}),w.jsx("div",{style:{marginLeft:"auto"},children:w.jsxs("div",{children:[w.jsx("span",{className:"browser-frame-menu-bLine truncated
|
||||
`)}}dt.defaultYaml={explicit:!1,version:"1.2"};dt.defaultTags={"!!":"tag:yaml.org,2002:"};function by(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(n)}return!0}function Ty(t){const e=new Set;return tr(t,{Value(n,r){r.anchor&&e.add(r.anchor)}}),e}function Cy(t,e){for(let n=1;;++n){const r=`${t}${n}`;if(!e.has(r))return r}}function sE(t,e){const n=[],r=new Map;let o=null;return{onAnchor:l=>{n.push(l),o||(o=Ty(t));const c=Cy(e,o);return o.add(c),c},setAnchors:()=>{for(const l of n){const c=r.get(l);if(typeof c=="object"&&c.anchor&&(Te(c.node)||Re(c.node)))c.node.anchor=c.anchor;else{const u=new Error("Failed to resolve repeated object (this should not happen)");throw u.source=l,u}}},sourceObjects:r}}function Es(t,e,n,r){if(r&&typeof r=="object")if(Array.isArray(r))for(let o=0,l=r.length;o<l;++o){const c=r[o],u=Es(t,r,String(o),c);u===void 0?delete r[o]:u!==c&&(r[o]=u)}else if(r instanceof Map)for(const o of Array.from(r.keys())){const l=r.get(o),c=Es(t,r,o,l);c===void 0?r.delete(o):c!==l&&r.set(o,c)}else if(r instanceof Set)for(const o of Array.from(r)){const l=Es(t,r,o,o);l===void 0?r.delete(o):l!==o&&(r.delete(o),r.add(l))}else for(const[o,l]of Object.entries(r)){const c=Es(t,r,o,l);c===void 0?delete r[o]:c!==l&&(r[o]=c)}return t.call(e,n,r)}function Ut(t,e,n){if(Array.isArray(t))return t.map((r,o)=>Ut(r,String(o),n));if(t&&typeof t.toJSON=="function"){if(!n||!tE(t))return t.toJSON(e,n);const r={aliasCount:0,count:1,res:void 0};n.anchors.set(t,r),n.onCreate=l=>{r.res=l,delete n.onCreate};const o=t.toJSON(e,n);return n.onCreate&&n.onCreate(o),o}return typeof t=="bigint"&&!(n!=null&&n.keep)?Number(t):t}class Cf{constructor(e){Object.defineProperty(this,qt,{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:n,maxAliasCount:r,onAnchor:o,reviver:l}={}){if(!Rr(e))throw new TypeError("A document argument is required");const c={anchors:new Map,doc:e,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof r=="number"?r:100},u=Ut(this,"",c);if(typeof o=="function")for(const{count:d,res:p}of c.anchors.values())o(p,d);return typeof l=="function"?Es(l,{"":u},"",u):u}}class ca extends Cf{constructor(e){super(Tf),this.source=e,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(e){let n;return tr(e,{Node:(r,o)=>{if(o===this)return tr.BREAK;o.anchor===this.source&&(n=o)}}),n}toJSON(e,n){if(!n)return{source:this.source};const{anchors:r,doc:o,maxAliasCount:l}=n,c=this.resolve(o);if(!c){const d=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(d)}let u=r.get(c);if(u||(Ut(c,null,n),u=r.get(c)),!u||u.res===void 0){const d="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(d)}if(l>=0&&(u.count+=1,u.aliasCount===0&&(u.aliasCount=Rl(o,c,r)),u.count*u.aliasCount>l)){const d="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(d)}return u.res}toString(e,n,r){const o=`*${this.source}`;if(e){if(by(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){const l=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(l)}if(e.implicitKey)return`${o} `}return o}}function Rl(t,e,n){if(Or(e)){const r=e.resolve(t),o=n&&r&&n.get(r);return o?o.count*o.aliasCount:0}else if(Re(e)){let r=0;for(const o of e.items){const l=Rl(t,o,n);l>r&&(r=l)}return r}else if(je(e)){const r=Rl(t,e.key,n),o=Rl(t,e.value,n);return Math.max(r,o)}return 1}const Ny=t=>!t||typeof t!="function"&&typeof t!="object";class ue extends Cf{constructor(e){super(dn),this.value=e}toJSON(e,n){return n!=null&&n.keep?this.value:Ut(this.value,e,n)}toString(){return String(this.value)}}ue.BLOCK_FOLDED="BLOCK_FOLDED";ue.BLOCK_LITERAL="BLOCK_LITERAL";ue.PLAIN="PLAIN";ue.QUOTE_DOUBLE="QUOTE_DOUBLE";ue.QUOTE_SINGLE="QUOTE_SINGLE";const iE="tag:yaml.org,2002:";function oE(t,e,n){if(e){const r=n.filter(l=>l.tag===e),o=r.find(l=>!l.format)??r[0];if(!o)throw new Error(`Tag ${e} not found`);return o}return n.find(r=>{var o;return((o=r.identify)==null?void 0:o.call(r,t))&&!r.format})}function Gi(t,e,n){var y,v,x;if(Rr(t)&&(t=t.contents),$e(t))return t;if(je(t)){const E=(v=(y=n.schema[er]).createNode)==null?void 0:v.call(y,n.schema,null,n);return E.items.push(t),E}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());const{aliasDuplicateObjects:r,onAnchor:o,onTagObj:l,schema:c,sourceObjects:u}=n;let d;if(r&&t&&typeof t=="object"){if(d=u.get(t),d)return d.anchor||(d.anchor=o(t)),new ca(d.anchor);d={anchor:null,node:null},u.set(t,d)}e!=null&&e.startsWith("!!")&&(e=iE+e.slice(2));let p=oE(t,e,c.tags);if(!p){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){const E=new ue(t);r
Line truncated
|
||||
`)?Cn(n,e):n.includes(`
|
||||
`)?`
|
||||
`+Cn(n,e):(t.endsWith(" ")?"":" ")+n,Iy="flow",qu="block",$l="quoted";function ua(t,e,n="flow",{indentAtStart:r,lineWidth:o=80,minContentWidth:l=20,onFold:c,onOverflow:u}={}){if(!o||o<0)return t;o<l&&(l=0);const d=Math.max(1+l,1+o-e.length);if(t.length<=d)return t;const p=[],g={};let y=o-e.length;typeof r=="number"&&(r>o-Math.max(2,l)?p.push(0):y=o-r);let v,x,E=!1,S=-1,k=-1,C=-1;n===qu&&(S=xm(t,S,e.length),S!==-1&&(y=S+d));for(let U;U=t[S+=1];){if(n===$l&&U==="\\"){switch(k=S,t[S+1]){case"x":S+=3;break;case"u":S+=5;break;case"U":S+=9;break;default:S+=1}C=S}if(U===`
|
||||
`)n===qu&&(S=xm(t,S,e.length)),y=S+e.length+d,v=void 0;else{if(U===" "&&x&&x!==" "&&x!==`
|
||||
`&&x!==" "){const R=t[S+1];R&&R!==" "&&R!==`
|
||||
`&&R!==" "&&(v=S)}if(S>=y)if(v)p.push(v),y=v+d,v=void 0;else if(n===$l){for(;x===" "||x===" ";)x=U,U=t[S+=1],E=!0;const R=S>C+1?S-2:k-1;if(g[R])return t;p.push(R),g[R]=!0,y=R+d,v=void 0}else E=!0}x=U}if(E&&u&&u(),p.length===0)return t;c&&c();let A=t.slice(0,p[0]);for(let U=0;U<p.length;++U){const R=p[U],D=p[U+1]||t.length;R===0?A=`
|
||||
${e}${t.slice(0,D)}`:(n===$l&&g[R]&&(A+=`${t[R]}\\`),A+=`
|
||||
${e}${t.slice(R+1,D)}`)}return A}function xm(t,e,n){let r=e,o=e+1,l=t[o];for(;l===" "||l===" ";)if(e<o+n)l=t[++e];else{do l=t[++e];while(l&&l!==`
|
||||
`);r=e,o=e+1,l=t[o]}return r}const fa=(t,e)=>({indentAtStart:e?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),da=t=>/^(%|---|\.\.\.)/m.test(t);function aE(t,e,n){if(!e||e<0)return!1;const r=e-n,o=t.length;if(o<=r)return!1;for(let l=0,c=0;l<o;++l)if(t[l]===`
|
||||
`){if(l-c>r)return!0;if(c=l+1,o-c<=r)return!1}return!0}function Vi(t,e){const n=JSON.stringify(t);if(e.options.doubleQuotedAsJSON)return n;const{implicitKey:r}=e,o=e.options.doubleQuotedMinMultiLineLength,l=e.indent||(da(t)?" ":"");let c="",u=0;for(let d=0,p=n[d];p;p=n[++d])if(p===" "&&n[d+1]==="\\"&&n[d+2]==="n"&&(c+=n.slice(u,d)+"\\ ",d+=1,u=d,p="\\"),p==="\\")switch(n[d+1]){case"u":{c+=n.slice(u,d);const g=n.substr(d+2,4);switch(g){case"0000":c+="\\0";break;case"0007":c+="\\a";break;case"000b":c+="\\v";break;case"001b":c+="\\e";break;case"0085":c+="\\N";break;case"00a0":c+="\\_";break;case"2028":c+="\\L";break;case"2029":c+="\\P";break;default:g.substr(0,2)==="00"?c+="\\x"+g.substr(2):c+=n.substr(d,6)}d+=5,u=d+1}break;case"n":if(r||n[d+2]==='"'||n.length<o)d+=1;else{for(c+=n.slice(u,d)+`
|
||||
|
||||
`;n[d+2]==="\\"&&n[d+3]==="n"&&n[d+4]!=='"';)c+=`
|
||||
`,d+=2;c+=l,n[d+2]===" "&&(c+="\\"),d+=1,u=d+1}break;default:d+=1}return c=u?c+n.slice(u):n,r?c:ua(c,l,$l,fa(e,!1))}function Vu(t,e){if(e.options.singleQuote===!1||e.implicitKey&&t.includes(`
|
||||
`)||/[ \t]\n|\n[ \t]/.test(t))return Vi(t,e);const n=e.indent||(da(t)?" ":""),r="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
|
||||
${n}`)+"'";return e.implicitKey?r:ua(r,n,Iy,fa(e,!1))}function ks(t,e){const{singleQuote:n}=e.options;let r;if(n===!1)r=Vi;else{const o=t.includes('"'),l=t.includes("'");o&&!l?r=Vu:l&&!o?r=Vi:r=n?Vu:Vi}return r(t,e)}let Wu;try{Wu=new RegExp(`(^|(?<!
|
||||
))
|
||||
+(?!
|
||||
|$)`,"g")}catch{Wu=/\n+(?!\n|$)/g}function Dl({comment:t,type:e,value:n},r,o,l){const{blockQuote:c,commentString:u,lineWidth:d}=r.options;if(!c||/\n[\t ]+$/.test(n)||/^\s*$/.test(n))return ks(n,r);const p=r.indent||(r.forceBlockIndent||da(n)?" ":""),g=c==="literal"?!0:c==="folded"||e===ue.BLOCK_FOLDED?!1:e===ue.BLOCK_LITERAL?!0:!aE(n,d,p.length);if(!n)return g?`|
|
||||
`:`>
|
||||
`;let y,v;for(v=n.length;v>0;--v){const z=n[v-1];if(z!==`
|
||||
`&&z!==" "&&z!==" ")break}let x=n.substring(v);const E=x.indexOf(`
|
||||
`);E===-1?y="-":n===x||E!==x.length-1?(y="+",l&&l()):y="",x&&(n=n.slice(0,-x.length),x[x.length-1]===`
|
||||
`&&(x=x.slice(0,-1)),x=x.replace(Wu,`$&${p}`));let S=!1,k,C=-1;for(k=0;k<n.length;++k){const z=n[k];if(z===" ")S=!0;else if(z===`
|
||||
`)C=k;else break}let A=n.substring(0,C<k?C+1:k);A&&(n=n.substring(A.length),A=A.replace(/\n+/g,`$&${p}`));let R=(g?"|":">")+(S?p?"2":"1":"")+y;if(t&&(R+=" "+u(t.replace(/ ?[\r\n]+/g," ")),o&&o()),g)return n=n.replace(/\n+/g,`$&${p}`),`${R}
|
||||
${p}${A}${n}${x}`;n=n.replace(/\n+/g,`
|
||||
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${p}`);const D=ua(`${A}${n}${x}`,p,qu,fa(r,!0));return`${R}
|
||||
${p}${D}`}function cE(t,e,n,r){const{type:o,value:l}=t,{actualString:c,implicitKey:u,indent:d,indentStep:p,inFlow:g}=e;if(u&&l.includes(`
|
||||
`)||g&&/[[\]{},]/.test(l))return ks(l,e);if(!l||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(l))return u||g||!l.includes(`
|
||||
`)?ks(l,e):Dl(t,e,n,r);if(!u&&!g&&o!==ue.PLAIN&&l.includes(`
|
||||
`))return Dl(t,e,n,r);if(da(l)){if(d==="")return e.forceBlockIndent=!0,Dl(t,e,n,r);if(u&&d===p)return ks(l,e)}const y=l.replace(/\n+/g,`$&
|
||||
${d}`);if(c){const v=S=>{var k;return S.default&&S.tag!=="tag:yaml.org,2002:str"&&((k=S.test)==null?void 0:k.test(y))},{compat:x,tags:E}=e.doc.schema;if(E.some(v)||x!=null&&x.some(v))return ks(l,e)}return u?y:ua(y,d,Iy,fa(e,!1))}function Zi(t,e,n,r){const{implicitKey:o,inFlow:l}=e,c=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)});let{type:u}=t;u!==ue.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(c.value)&&(u=ue.QUOTE_DOUBLE);const d=g=>{switch(g){case ue.BLOCK_FOLDED:case ue.BLOCK_LITERAL:return o||l?ks(c.value,e):Dl(c,e,n,r);case ue.QUOTE_DOUBLE:return Vi(c.value,e);case ue.QUOTE_SINGLE:return Vu(c.value,e);case ue.PLAIN:return cE(c,e,n,r);default:return null}};let p=d(u);if(p===null){const{defaultKeyType:g,defaultStringType:y}=e.options,v=o&&g||y;if(p=d(v),p===null)throw new Error(`Unsupported default string type ${v}`)}return p}function Ly(t,e){const n=Object.assign({blockQuote:!0,commentString:lE,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,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,e);let r;switch(n.collectionStyle){case"block":r=!1;break;case"flow":r=!0;break;default:r=null}return{anchors:new Set,doc:t,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:r,options:n}}function uE(t,e){var o;if(e.tag){const l=t.filter(c=>c.tag===e.tag);if(l.length>0)return l.find(c=>c.format===e.format)??l[0]}let n,r;if(Te(e)){r=e.value;let l=t.filter(c=>{var u;return(u=c.identify)==null?void 0:u.call(c,r)});if(l.length>1){const c=l.filter(u=>u.test);c.length>0&&(l=c)}n=l.find(c=>c.format===e.format)??l.find(c=>!c.format)}else r=e,n=t.find(l=>l.nodeClass&&r instanceof l.nodeClass);if(!n){const l=((o=r==null?void 0:r.constructor)==null?void 0:o.name)??typeof r;throw new Error(`Tag not resolved for ${l} value`)}return n}function fE(t,e,{anchors:n,doc:r}){if(!r.directives)return"";const o=[],l=(Te(t)||Re(t))&&t.anchor;l&&by(l)&&(n.add(l),o.push(`&${l}`));const c=t.tag?t.tag:e.default?null:e.tag;return c&&o.push(r.directives.tagString(c)),o.join(" ")}function As(t,e,n,r){var d;if(je(t))return t.toString(e,n,r);if(Or(t)){if(e.doc.directives)return t.toString(e);if((d=e.resolvedAliases)!=null&&d.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");e.resolvedAliases?e.resolvedAliases.add(t):e.resolvedAliases=new Set([t]),t=t.resolve(e.doc)}let o;const l=$e(t)?t:e.doc.createNode(t,{onTagObj:p=>o=p});o||(o=uE(e.doc.schema.tags,l));const c=fE(l,o,e);c.length>0&&(e.indentAtStart=(e.indentAtStart??0)+c.length+1);const u=typeof o.stringify=="function"?o.stringify(l,e,n,r):Te(l)?Zi(l,e,n,r):l.toString(e,n,r);return c?Te(l)||u[0]==="{"||u[0]==="["?`${c} ${u}`:`${c}
|
||||
${e.indent}${u}`:u}function dE({key:t,value:e},n,r,o){const{allNullValues:l,doc:c,indent:u,indentStep:d,options:{commentString:p,indentSeq:g,simpleKeys:y}}=n;let v=$e(t)&&t.comment||null;if(y){if(v)throw new Error("With simple keys, key nodes cannot have comments");if(Re(t)||!$e(t)&&typeof t=="object"){const q="With simple keys, collection cannot be used as a key value";throw new Error(q)}}let x=!y&&(!t||v&&e==null&&!n.inFlow||Re(t)||(Te(t)?t.type===ue.BLOCK_FOLDED||t.type===ue.BLOCK_LITERAL:typeof t=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!x&&(y||!l),indent:u+d});let E=!1,S=!1,k=As(t,n,()=>E=!0,()=>S=!0);if(!x&&!n.inFlow&&k.length>1024){if(y)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");x=!0}if(n.inFlow){if(l||e==null)return E&&r&&r(),k===""?"?":x?`? ${k}`:k}else if(l&&!y||e==null&&x)return k=`? ${k}`,v&&!E?k+=Cr(k,n.indent,p(v)):S&&o&&o(),k;E&&(v=null),x?(v&&(k+=Cr(k,n.indent,p(v))),k=`? ${k}
|
||||
${u}:`):(k=`${k}:`,v&&(k+=Cr(k,n.indent,p(v))));let C,A,U;$e(e)?(C=!!e.spaceBefore,A=e.commentBefore,U=e.comment):(C=!1,A=null,U=null,e&&typeof e=="object"&&(e=c.createNode(e))),n.implicitKey=!1,!x&&!v&&Te(e)&&(n.indentAtStart=k.length+1),S=!1,!g&&d.length>=2&&!n.inFlow&&!x&&$s(e)&&!e.flow&&!e.tag&&!e.anchor&&(n.indent=n.indent.substring(2));let R=!1;const D=As(e,n,()=>R=!0,()=>S=!0);let z=" ";if(v||C||A){if(z=C?`
|
||||
`:"",A){const q=p(A);z+=`
|
||||
${Cn(q,n.indent)}`}D===""&&!n.inFlow?z===`
|
||||
`&&(z=`
|
||||
|
||||
`):z+=`
|
||||
${n.indent}`}else if(!x&&Re(e)){const q=D[0],F=D.indexOf(`
|
||||
`),j=F!==-1,oe=n.inFlow??e.flow??e.items.length===0;if(j||!oe){let ae=!1;if(j&&(q==="&"||q==="!")){let M=D.indexOf(" ");q==="&"&&M!==-1&&M<F&&D[M+1]==="!"&&(M=D.indexOf(" ",M+1)),(M===-1||F<M)&&(ae=!0)}ae||(z=`
|
||||
${n.indent}`)}}else(D===""||D[0]===`
|
||||
`)&&(z="");return k+=z+D,n.inFlow?R&&r&&r():U&&!R?k+=Cr(k,n.indent,p(U)):S&&o&&o(),k}function My(t,e){(t==="debug"||t==="warn")&&(typeof process<"u"&&process.emitWarning?process.emitWarning(e):console.warn(e))}const _l="<<",An={identify:t=>t===_l||typeof t=="symbol"&&t.description===_l,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new ue(Symbol(_l)),{addToJSMap:jy}),stringify:()=>_l},hE=(t,e)=>(An.identify(e)||Te(e)&&(!e.type||e.type===ue.PLAIN)&&An.identify(e.value))&&(t==null?void 0:t.doc.schema.tags.some(n=>n.tag===An.tag&&n.default));function jy(t,e,n){if(n=t&&Or(n)?n.resolve(t.doc):n,$s(n))for(const r of n.items)bu(t,e,r);else if(Array.isArray(n))for(const r of n)bu(t,e,r);else bu(t,e,n)}function bu(t,e,n){const r=t&&Or(n)?n.resolve(t.doc):n;if(!Rs(r))throw new Error("Merge sources must be maps or map aliases");const o=r.toJSON(null,t,Map);for(const[l,c]of o)e instanceof Map?e.has(l)||e.set(l,c):e instanceof Set?e.add(l):Object.prototype.hasOwnProperty.call(e,l)||Object.defineProperty(e,l,{value:c,writable:!0,enumerable:!0,configurable:!0});return e}function Py(t,e,{key:n,value:r}){if($e(n)&&n.addToJSMap)n.addToJSMap(t,e,r);else if(hE(t,n))jy(t,e,r);else{const o=Ut(n,"",t);if(e instanceof Map)e.set(o,Ut(r,o,t));else if(e instanceof Set)e.add(o);else{const l=pE(n,o,t),c=Ut(r,l,t);l in e?Object.defineProperty(e,l,{value:c,writable:!0,enumerable:!0,configurable:!0}):e[l]=c}}return e}function pE(t,e,n){if(e===null)return"";if(typeof e!="object")return String(e);if($e(t)&&(n!=null&&n.doc)){const r=Ly(n.doc,{});r.anchors=new Set;for(const l of n.anchors.keys())r.anchors.add(l.anchor);r.inFlow=!0,r.inStringifyKey=!0;const o=t.toString(r);if(!n.mapKeyWarned){let l=JSON.stringify(o);l.length>40&&(l=l.substring(0,36)+'..."'),My(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${l}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return o}return JSON.stringify(e)}function Nf(t,e,n){const r=Gi(t,void 0,n),o=Gi(e,void 0,n);return new ct(r,o)}class ct{constructor(e,n=null){Object.defineProperty(this,qt,{value:Sy}),this.key=e,this.value=n}clone(e){let{key:n,value:r}=this;return $e(n)&&(n=n.clone(e)),$e(r)&&(r=r.clone(e)),new ct(n,r)}toJSON(e,n){const r=n!=null&&n.mapAsMap?new Map:{};return Py(n,r,this)}toString(e,n,r){return e!=null&&e.doc?dE(this,e,n,r):JSON.stringify(this)}}function Oy(t,e,n){return(e.inFlow??t.flow?gE:mE)(t,e,n)}function mE({comment:t,items:e},n,{blockItemPrefix:r,flowChars:o,itemIndent:l,onChompKeep:c,onComment:u}){const{indent:d,options:{commentString:p}}=n,g=Object.assign({},n,{indent:l,type:null});let y=!1;const v=[];for(let E=0;E<e.length;++E){const S=e[E];let k=null;if($e(S))!y&&S.spaceBefore&&v.push(""),Zl(n,v,S.commentBefore,y),S.comment&&(k=S.comment);else if(je(S)){const A=$e(S.key)?S.key:null;A&&(!y&&A.spaceBefore&&v.push(""),Zl(n,v,A.commentBefore,y))}y=!1;let C=As(S,g,()=>k=null,()=>y=!0);k&&(C+=Cr(C,l,p(k))),y&&k&&(y=!1),v.push(r+C)}let x;if(v.length===0)x=o.start+o.end;else{x=v[0];for(let E=1;E<v.length;++E){const S=v[E];x+=S?`
|
||||
${d}${S}`:`
|
||||
`}}return t?(x+=`
|
||||
`+Cn(p(t),d),u&&u()):y&&c&&c(),x}function gE({items:t},e,{flowChars:n,itemIndent:r}){const{indent:o,indentStep:l,flowCollectionPadding:c,options:{commentString:u}}=e;r+=l;const d=Object.assign({},e,{indent:r,inFlow:!0,type:null});let p=!1,g=0;const y=[];for(let E=0;E<t.length;++E){const S=t[E];let k=null;if($e(S))S.spaceBefore&&y.push(""),Zl(e,y,S.commentBefore,!1),S.comment&&(k=S.comment);else if(je(S)){const A=$e(S.key)?S.key:null;A&&(A.spaceBefore&&y.push(""),Zl(e,y,A.commentBefore,!1),A.comment&&(p=!0));const U=$e(S.value)?S.value:null;U?(U.comment&&(k=U.comment),U.commentBefore&&(p=!0)):S.value==null&&(A!=null&&A.comment)&&(k=A.comment)}k&&(p=!0);let C=As(S,d,()=>k=null);E<t.length-1&&(C+=","),k&&(C+=Cr(C,r,u(k))),!p&&(y.length>g||C.includes(`
|
||||
`))&&(p=!0),y.push(C),g=y.length}const{start:v,end:x}=n;if(y.length===0)return v+x;if(!p){const E=y.reduce((S,k)=>S+k.length+2,2);p=e.options.lineWidth>0&&E>e.options.lineWidth}if(p){let E=v;for(const S of y)E+=S?`
|
||||
${l}${o}${S}`:`
|
||||
`;return`${E}
|
||||
${o}${x}`}else return`${v}${c}${y.join(" ")}${c}${x}`}function Zl({indent:t,options:{commentString:e}},n,r,o){if(r&&o&&(r=r.replace(/^\n+/,"")),r){const l=Cn(e(r),t);n.push(l.trimStart())}}function Nr(t,e){const n=Te(e)?e.value:e;for(const r of t)if(je(r)&&(r.key===e||r.key===n||Te(r.key)&&r.key.value===n))return r}class Lt extends Ay{static get tagName(){return"tag:yaml.org,2002:map"}constructor(e){super(er,e),this.items=[]}static from(e,n,r){const{keepUndefined:o,replacer:l}=r,c=new this(e),u=(d,p)=>{if(typeof l=="function")p=l.call(n,d,p);else if(Array.isArray(l)&&!l.includes(d))return;(p!==void 0||o)&&c.items.push(Nf(d,p,r))};if(n instanceof Map)for(const[d,p]of n)u(d,p);else if(n&&typeof n=="object")for(const d of Object.keys(n))u(d,n[d]);return typeof e.sortMapEntries=="function"&&c.items.sort(e.sortMapEntries),c}add(e,n){var c;let r;je(e)?r=e:!e||typeof e!="object"||!("key"in e)?r=new ct(e,e==null?void 0:e.value):r=new ct(e.key,e.value);const o=Nr(this.items,r.key),l=(c=this.schema)==null?void 0:c.sortMapEntries;if(o){if(!n)throw new Error(`Key ${r.key} already set`);Te(o.value)&&Ny(r.value)?o.value.value=r.value:o.value=r.value}else if(l){const u=this.items.findIndex(d=>l(r,d)<0);u===-1?this.items.push(r):this.items.splice(u,0,r)}else this.items.push(r)}delete(e){const n=Nr(this.items,e);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(e,n){const r=Nr(this.items,e),o=r==null?void 0:r.value;return(!n&&Te(o)?o.value:o)??void 0}has(e){return!!Nr(this.items,e)}set(e,n){this.add(new ct(e,n),!0)}toJSON(e,n,r){const o=r?new r:n!=null&&n.mapAsMap?new Map:{};n!=null&&n.onCreate&&n.onCreate(o);for(const l of this.items)Py(n,o,l);return o}toString(e,n,r){if(!e)return JSON.stringify(this);for(const o of this.items)if(!je(o))throw new Error(`Map items must all be pairs; found ${JSON.stringify(o)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),Oy(this,e,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:e.indent||"",onChompKeep:r,onComment:n})}}const Ds={collection:"map",default:!0,nodeClass:Lt,tag:"tag:yaml.org,2002:map",resolve(t,e){return Rs(t)||e("Expected a mapping for this tag"),t},createNode:(t,e,n)=>Lt.from(t,e,n)};class nr extends Ay{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(e){super(Os,e),this.items=[]}add(e){this.items.push(e)}delete(e){const n=El(e);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(e,n){const r=El(e);if(typeof r!="number")return;const o=this.items[r];return!n&&Te(o)?o.value:o}has(e){const n=El(e);return typeof n=="number"&&n<this.items.length}set(e,n){const r=El(e);if(typeof r!="number")throw new Error(`Expected a valid index, not ${e}.`);const o=this.items[r];Te(o)&&Ny(n)?o.value=n:this.items[r]=n}toJSON(e,n){const r=[];n!=null&&n.onCreate&&n.onCreate(r);let o=0;for(const l of this.items)r.push(Ut(l,String(o++),n));return r}toString(e,n,r){return e?Oy(this,e,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(e.indent||"")+" ",onChompKeep:r,onComment:n}):JSON.stringify(this)}static from(e,n,r){const{replacer:o}=r,l=new this(e);if(n&&Symbol.iterator in Object(n)){let c=0;for(let u of n){if(typeof o=="function"){const d=n instanceof Set?u:String(c++);u=o.call(n,d,u)}l.items.push(Gi(u,void 0,r))}}return l}}function El(t){let e=Te(t)?t.value:t;return e&&typeof e=="string"&&(e=Number(e)),typeof e=="number"&&Number.isInteger(e)&&e>=0?e:null}const Fs={collection:"seq",default:!0,nodeClass:nr,tag:"tag:yaml.org,2002:seq",resolve(t,e){return $s(t)||e("Expected a sequence for this tag"),t},createNode:(t,e,n)=>nr.from(t,e,n)},ha={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,e,n,r){return e=Object.assign({actualString:!0},e),Zi(t,e,n,r)}},pa={identify:t=>t==null,createNode:()=>new ue(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new ue(null),stringify:({source:t},e)=>typeof t=="string"&&pa.test.test(t)?t:e.options.nullStr},Af={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new ue(t[0]==="t"||t[0]==="T"),stringify({source:t,value:e},n){if(t&&Af.test.test(t)){const r=t[0]==="t"||t[0]==="T";if(e===r)return t}return e?n.options.trueStr:n.options.falseStr}};function nn({format:t,minFractionDigits:e,tag:n,value:r}){if(typeof r=="bigint")return String(r);const o=typeof r=="number"?r:Number(r);if(!isFinite(o))return isNaN(o)?".nan":o<0?"-.inf":".inf";let l=JSON.stringify(r);if(!t&&e&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(l)){let c=l.indexOf(".");c<0&&(c=l.length,l+=".");let u=e-(l.length-c-1);for(;u-- >0;)l+="0"}return l}const Ry={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:nn},$y={identify:t=>type
Line truncated
|
||||
`:" ")}return Zi({comment:t,type:e,value:u},r,o,l)}};function Hy(t,e){if($s(t))for(let n=0;n<t.items.length;++n){let r=t.items[n];if(!je(r)){if(Rs(r)){r.items.length>1&&e("Each pair must have its own sequence indicator");const o=r.items[0]||new ct(new ue(null));if(r.commentBefore&&(o.key.commentBefore=o.key.commentBefore?`${r.commentBefore}
|
||||
${o.key.commentBefore}`:r.commentBefore),r.comment){const l=o.value??o.key;l.comment=l.comment?`${r.comment}
|
||||
${l.comment}`:r.comment}r=o}t.items[n]=je(r)?r:new ct(r)}}else e("Expected a sequence for this tag");return t}function qy(t,e,n){const{replacer:r}=n,o=new nr(t);o.tag="tag:yaml.org,2002:pairs";let l=0;if(e&&Symbol.iterator in Object(e))for(let c of e){typeof r=="function"&&(c=r.call(e,String(l++),c));let u,d;if(Array.isArray(c))if(c.length===2)u=c[0],d=c[1];else throw new TypeError(`Expected [key, value] tuple: ${c}`);else if(c&&c instanceof Object){const p=Object.keys(c);if(p.length===1)u=p[0],d=c[u];else throw new TypeError(`Expected tuple with one key, not ${p.length} keys`)}else u=c;o.items.push(Nf(u,d,n))}return o}const Mf={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Hy,createNode:qy};class Ts extends nr{constructor(){super(),this.add=Lt.prototype.add.bind(this),this.delete=Lt.prototype.delete.bind(this),this.get=Lt.prototype.get.bind(this),this.has=Lt.prototype.has.bind(this),this.set=Lt.prototype.set.bind(this),this.tag=Ts.tag}toJSON(e,n){if(!n)return super.toJSON(e);const r=new Map;n!=null&&n.onCreate&&n.onCreate(r);for(const o of this.items){let l,c;if(je(o)?(l=Ut(o.key,"",n),c=Ut(o.value,l,n)):l=Ut(o,"",n),r.has(l))throw new Error("Ordered maps must not include duplicate keys");r.set(l,c)}return r}static from(e,n,r){const o=qy(e,n,r),l=new this;return l.items=o.items,l}}Ts.tag="tag:yaml.org,2002:omap";const jf={collection:"seq",identify:t=>t instanceof Map,nodeClass:Ts,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,e){const n=Hy(t,e),r=[];for(const{key:o}of n.items)Te(o)&&(r.includes(o.value)?e(`Ordered maps must not include duplicate keys: ${o.value}`):r.push(o.value));return Object.assign(new Ts,n)},createNode:(t,e,n)=>Ts.from(t,e,n)};function Vy({value:t,source:e},n){return e&&(t?Wy:Ky).test.test(e)?e:t?n.options.trueStr:n.options.falseStr}const Wy={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new ue(!0),stringify:Vy},Ky={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new ue(!1),stringify:Vy},xE={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:nn},_E={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){const e=Number(t.value);return isFinite(e)?e.toExponential():nn(t)}},EE={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){const e=new ue(parseFloat(t.replace(/_/g,""))),n=t.indexOf(".");if(n!==-1){const r=t.substring(n+1).replace(/_/g,"");r[r.length-1]==="0"&&(e.minFractionDigits=r.length)}return e},stringify:nn},eo=t=>typeof t=="bigint"||Number.isInteger(t);function ga(t,e,n,{intAsBigInt:r}){const o=t[0];if((o==="-"||o==="+")&&(e+=1),t=t.substring(e).replace(/_/g,""),r){switch(n){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}const c=BigInt(t);return o==="-"?BigInt(-1)*c:c}const l=parseInt(t,n);return o==="-"?-1*l:l}function Pf(t,e,n){const{value:r}=t;if(eo(r)){const o=r.toString(e);return r<0?"-"+n+o.substr(1):n+o}return nn(t)}const kE={identify:eo,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,e,n)=>ga(t,2,2,n),stringify:t=>Pf(t,2,"0b")},bE={identify:eo,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,e,n)=>ga(t,1,8,n),stringify:t=>Pf(t,8,"0")},TE={identify:eo,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,e,n)=>ga(t,0,10,n),stringify:nn},CE={identify:eo,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,e,n)=>ga(t,2,16,n),stringify:t=>Pf(t,16,"0x")};class Cs extends Lt{constructor(e){super(e),this.tag=Cs.tag}add(e){let n;je(e)?n=e:e&&typeof e=="object"&&"key"in e&&"value"in e&&e.value===null?n=new ct(e.key,null):n=new ct(e,null),Nr(this.items,n.key)||this.items.push(n)}get(e,n){const r=Nr(this.items,e);return!n&&je(r)?Te(r.key)?r.key.value:r.key:r}set(e,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);const r=Nr(this.items,e);r&&!n?this.items.splice(this.items.indexOf(r),1):!r&&n&&this.items.push(new ct(e))}toJSON(e,n){return super.toJSON(e,n,Set)}toString(e,n,r){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),n,r);throw new Error("Set items must all have null values")}static from(e,n,r){const{replacer:o}=r,l=new this(e);if(n&&Symbol.iterator in Object(n))for(let c of n)typeof o=="function"&&(c=o.call(n,c,c)),l.items.push(Nf(c,null,r));return l}}Cs.tag="tag:yaml.org,2002:set";const Of={col
Line truncated
|
||||
`)?(n.push("..."),n.push(Cn(p,""))):n.push(`... ${p}`)}else n.push("...");else{let p=t.comment;p&&c&&(p=p.replace(/^\n+/,"")),p&&((!c||u)&&n[n.length-1]!==""&&n.push(""),n.push(Cn(l(p),"")))}return n.join(`
|
||||
`)+`
|
||||
`}class Bs{constructor(e,n,r){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,qt,{value:Hu});let o=null;typeof n=="function"||Array.isArray(n)?o=n:r===void 0&&n&&(r=n,n=void 0);const l=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},r);this.options=l;let{version:c}=l;r!=null&&r._directives?(this.directives=r._directives.atDocument(),this.directives.yaml.explicit&&(c=this.directives.yaml.version)):this.directives=new dt({version:c}),this.setSchema(c,r),this.contents=e===void 0?null:this.createNode(e,o,r)}clone(){const e=Object.create(Bs.prototype,{[qt]:{value:Hu}});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=$e(this.contents)?this.contents.clone(e.schema):this.contents,this.range&&(e.range=this.range.slice()),e}add(e){ps(this.contents)&&this.contents.add(e)}addIn(e,n){ps(this.contents)&&this.contents.addIn(e,n)}createAlias(e,n){if(!e.anchor){const r=Ty(this);e.anchor=!n||r.has(n)?Cy(n||"a",r):n}return new ca(e.anchor)}createNode(e,n,r){let o;if(typeof n=="function")e=n.call({"":e},"",e),o=n;else if(Array.isArray(n)){const k=A=>typeof A=="number"||A instanceof String||A instanceof Number,C=n.filter(k).map(String);C.length>0&&(n=n.concat(C)),o=n}else r===void 0&&n&&(r=n,n=void 0);const{aliasDuplicateObjects:l,anchorPrefix:c,flow:u,keepUndefined:d,onTagObj:p,tag:g}=r??{},{onAnchor:y,setAnchors:v,sourceObjects:x}=sE(this,c||"a"),E={aliasDuplicateObjects:l??!0,keepUndefined:d??!1,onAnchor:y,onTagObj:p,replacer:o,schema:this.schema,sourceObjects:x},S=Gi(e,g,E);return u&&Re(S)&&(S.flow=!0),v(),S}createPair(e,n,r={}){const o=this.createNode(e,null,r),l=this.createNode(n,null,r);return new ct(o,l)}delete(e){return ps(this.contents)?this.contents.delete(e):!1}deleteIn(e){return $i(e)?this.contents==null?!1:(this.contents=null,!0):ps(this.contents)?this.contents.deleteIn(e):!1}get(e,n){return Re(this.contents)?this.contents.get(e,n):void 0}getIn(e,n){return $i(e)?!n&&Te(this.contents)?this.contents.value:this.contents:Re(this.contents)?this.contents.getIn(e,n):void 0}has(e){return Re(this.contents)?this.contents.has(e):!1}hasIn(e){return $i(e)?this.contents!==void 0:Re(this.contents)?this.contents.hasIn(e):!1}set(e,n){this.contents==null?this.contents=Yl(this.schema,[e],n):ps(this.contents)&&this.contents.set(e,n)}setIn(e,n){$i(e)?this.contents=n:this.contents==null?this.contents=Yl(this.schema,Array.from(e),n):ps(this.contents)&&this.contents.setIn(e,n)}setSchema(e,n={}){typeof e=="number"&&(e=String(e));let r;switch(e){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new dt({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 dt({version:e}),r={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,r=null;break;default:{const o=JSON.stringify(e);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${o}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(r)this.schema=new va(Object.assign(r,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:e,jsonArg:n,mapAsMap:r,maxAliasCount:o,onAnchor:l,reviver:c}={}){const u={anchors:new Map,doc:this,keep:!e,mapAsMap:r===!0,mapKeyWarned:!1,maxAliasCount:typeof o=="number"?o:100},d=Ut(this.contents,n??"",u);if(typeof l=="function")for(const{count:p,res:g}of u.anchors.values())l(g,p);return typeof c=="function"?Es(c,{"":d},"",d):d}toJSON(e,n){return this.toJS({json:!0,jsonArg:e,mapAsMap:!1,onAnchor:n})}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 n=JSON.stringify(e.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return IE(this,e)}}function ps(t){if(Re(t))return!0;throw new Error("Expected a YAML collection as document contents")}class $f extends Error{constructor(e,n,r,o){super(),this.name=e,this.code=r,this.message=o,this.pos=n}}class Ar extends $f{constructor(e,n,r){super("YAMLParseError",e,n,r)}}class Xy extends $f{constructor(e,n,r){super("YAMLWarning",e,n,r)}}const ea=(t,e)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(u=>e.linePos(u));const{line:r,col:o}=n.linePos[0];n.message+=` at line ${r}, column ${o}`;let l=o-1,c=t.substring(e.lineStarts[r-1],e.lineStarts[r]).replace(/[\n\r]+$/,"");if(l>=60&&c.length>80){const u=Math.min(l-39,c.length-79);c="…"+c.substring(u),l-=u-1}if(c.length>80&&(c=c.substring(0,79)+"…"),r>1&&/^ *$/.test(c.substring(0,l))){let u=t.substring(e.lineStarts[r-2],e.lineStarts[r-1]);u.len
Line truncated
|
||||
`),c=u+c}if(/[^ ]/.test(c)){let u=1;const d=n.linePos[1];d&&d.line===r&&d.col>o&&(u=Math.max(1,Math.min(d.col-o,80-l)));const p=" ".repeat(l)+"^".repeat(u);n.message+=`:
|
||||
|
||||
${c}
|
||||
${p}
|
||||
`}};function Is(t,{flow:e,indicator:n,next:r,offset:o,onError:l,parentIndent:c,startOnNewline:u}){let d=!1,p=u,g=u,y="",v="",x=!1,E=!1,S=null,k=null,C=null,A=null,U=null,R=null,D=null;for(const F of t)switch(E&&(F.type!=="space"&&F.type!=="newline"&&F.type!=="comma"&&l(F.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),E=!1),S&&(p&&F.type!=="comment"&&F.type!=="newline"&&l(S,"TAB_AS_INDENT","Tabs are not allowed as indentation"),S=null),F.type){case"space":!e&&(n!=="doc-start"||(r==null?void 0:r.type)!=="flow-collection")&&F.source.includes(" ")&&(S=F),g=!0;break;case"comment":{g||l(F,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const j=F.source.substring(1)||" ";y?y+=v+j:y=j,v="",p=!1;break}case"newline":p?y?y+=F.source:d=!0:v+=F.source,p=!0,x=!0,(k||C)&&(A=F),g=!0;break;case"anchor":k&&l(F,"MULTIPLE_ANCHORS","A node can have at most one anchor"),F.source.endsWith(":")&&l(F.offset+F.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),k=F,D===null&&(D=F.offset),p=!1,g=!1,E=!0;break;case"tag":{C&&l(F,"MULTIPLE_TAGS","A node can have at most one tag"),C=F,D===null&&(D=F.offset),p=!1,g=!1,E=!0;break}case n:(k||C)&&l(F,"BAD_PROP_ORDER",`Anchors and tags must be after the ${F.source} indicator`),R&&l(F,"UNEXPECTED_TOKEN",`Unexpected ${F.source} in ${e??"collection"}`),R=F,p=n==="seq-item-ind"||n==="explicit-key-ind",g=!1;break;case"comma":if(e){U&&l(F,"UNEXPECTED_TOKEN",`Unexpected , in ${e}`),U=F,p=!1,g=!1;break}default:l(F,"UNEXPECTED_TOKEN",`Unexpected ${F.type} token`),p=!1,g=!1}const z=t[t.length-1],q=z?z.offset+z.source.length:o;return E&&r&&r.type!=="space"&&r.type!=="newline"&&r.type!=="comma"&&(r.type!=="scalar"||r.source!=="")&&l(r.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),S&&(p&&S.indent<=c||(r==null?void 0:r.type)==="block-map"||(r==null?void 0:r.type)==="block-seq")&&l(S,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:U,found:R,spaceBefore:d,comment:y,hasNewline:x,anchor:k,tag:C,newlineAfterProp:A,end:q,start:D??q}}function Qi(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
|
||||
`))return!0;if(t.end){for(const e of t.end)if(e.type==="newline")return!0}return!1;case"flow-collection":for(const e of t.items){for(const n of e.start)if(n.type==="newline")return!0;if(e.sep){for(const n of e.sep)if(n.type==="newline")return!0}if(Qi(e.key)||Qi(e.value))return!0}return!1;default:return!0}}function Ku(t,e,n){if((e==null?void 0:e.type)==="flow-collection"){const r=e.end[0];r.indent===t&&(r.source==="]"||r.source==="}")&&Qi(e)&&n(r,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Yy(t,e,n){const{uniqueKeys:r}=t.options;if(r===!1)return!1;const o=typeof r=="function"?r:(l,c)=>l===c||Te(l)&&Te(c)&&l.value===c.value;return e.some(l=>o(l.key,n))}const Tm="All mapping items must start at the same column";function LE({composeNode:t,composeEmptyNode:e},n,r,o,l){var g;const c=(l==null?void 0:l.nodeClass)??Lt,u=new c(n.schema);n.atRoot&&(n.atRoot=!1);let d=r.offset,p=null;for(const y of r.items){const{start:v,key:x,sep:E,value:S}=y,k=Is(v,{indicator:"explicit-key-ind",next:x??(E==null?void 0:E[0]),offset:d,onError:o,parentIndent:r.indent,startOnNewline:!0}),C=!k.found;if(C){if(x&&(x.type==="block-seq"?o(d,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in x&&x.indent!==r.indent&&o(d,"BAD_INDENT",Tm)),!k.anchor&&!k.tag&&!E){p=k.end,k.comment&&(u.comment?u.comment+=`
|
||||
`+k.comment:u.comment=k.comment);continue}(k.newlineAfterProp||Qi(x))&&o(x??v[v.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((g=k.found)==null?void 0:g.indent)!==r.indent&&o(d,"BAD_INDENT",Tm);n.atKey=!0;const A=k.end,U=x?t(n,x,k,o):e(n,A,v,null,k,o);n.schema.compat&&Ku(r.indent,x,o),n.atKey=!1,Yy(n,u.items,U)&&o(A,"DUPLICATE_KEY","Map keys must be unique");const R=Is(E??[],{indicator:"map-value-ind",next:S,offset:U.range[2],onError:o,parentIndent:r.indent,startOnNewline:!x||x.type==="block-scalar"});if(d=R.end,R.found){C&&((S==null?void 0:S.type)==="block-map"&&!R.hasNewline&&o(d,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&k.start<R.found.offset-1024&&o(U.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const D=S?t(n,S,R,o):e(n,d,E,null,R,o);n.schema.compat&&Ku(r.indent,S,o),d=D.range[2];const z=new ct(U,D);n.options.keepSourceTokens&&(z.srcToken=y),u.items.push(z)}else{C&&o(U.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),R.comment&&(U.comment?U.comment+=`
|
||||
`+R.comment:U.comment=R.comment);const D=new ct(U);n.options.keepSourceTokens&&(D.srcToken=y),u.items.push(D)}}return p&&p<d&&o(p,"IMPOSSIBLE","Map comment with trailing content"),u.range=[r.offset,d,p??d],u}function ME({composeNode:t,composeEmptyNode:e},n,r,o,l){const c=(l==null?void 0:l.nodeClass)??nr,u=new c(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let d=r.offset,p=null;for(const{start:g,value:y}of r.items){const v=Is(g,{indicator:"seq-item-ind",next:y,offset:d,onError:o,parentIndent:r.indent,startOnNewline:!0});if(!v.found)if(v.anchor||v.tag||y)y&&y.type==="block-seq"?o(v.end,"BAD_INDENT","All sequence items must start at the same column"):o(d,"MISSING_CHAR","Sequence item without - indicator");else{p=v.end,v.comment&&(u.comment=v.comment);continue}const x=y?t(n,y,v,o):e(n,v.end,g,null,v,o);n.schema.compat&&Ku(r.indent,y,o),d=x.range[2],u.items.push(x)}return u.range=[r.offset,d,p??d],u}function to(t,e,n,r){let o="";if(t){let l=!1,c="";for(const u of t){const{source:d,type:p}=u;switch(p){case"space":l=!0;break;case"comment":{n&&!l&&r(u,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const g=d.substring(1)||" ";o?o+=c+g:o=g,c="";break}case"newline":o&&(c+=d),l=!0;break;default:r(u,"UNEXPECTED_TOKEN",`Unexpected ${p} at node end`)}e+=d.length}}return{comment:o,offset:e}}const Cu="Block collections are not allowed within flow collections",Nu=t=>t&&(t.type==="block-map"||t.type==="block-seq");function jE({composeNode:t,composeEmptyNode:e},n,r,o,l){const c=r.start.source==="{",u=c?"flow map":"flow sequence",d=(l==null?void 0:l.nodeClass)??(c?Lt:nr),p=new d(n.schema);p.flow=!0;const g=n.atRoot;g&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let y=r.offset+r.start.source.length;for(let k=0;k<r.items.length;++k){const C=r.items[k],{start:A,key:U,sep:R,value:D}=C,z=Is(A,{flow:u,indicator:"explicit-key-ind",next:U??(R==null?void 0:R[0]),offset:y,onError:o,parentIndent:r.indent,startOnNewline:!1});if(!z.found){if(!z.anchor&&!z.tag&&!R&&!D){k===0&&z.comma?o(z.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${u}`):k<r.items.length-1&&o(z.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${u}`),z.comment&&(p.comment?p.comment+=`
|
||||
`+z.comment:p.comment=z.comment),y=z.end;continue}!c&&n.options.strict&&Qi(U)&&o(U,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(k===0)z.comma&&o(z.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${u}`);else if(z.comma||o(z.start,"MISSING_CHAR",`Missing , between ${u} items`),z.comment){let q="";e:for(const F of A)switch(F.type){case"comma":case"space":break;case"comment":q=F.source.substring(1);break e;default:break e}if(q){let F=p.items[p.items.length-1];je(F)&&(F=F.value??F.key),F.comment?F.comment+=`
|
||||
`+q:F.comment=q,z.comment=z.comment.substring(q.length+1)}}if(!c&&!R&&!z.found){const q=D?t(n,D,z,o):e(n,z.end,R,null,z,o);p.items.push(q),y=q.range[2],Nu(D)&&o(q.range,"BLOCK_IN_FLOW",Cu)}else{n.atKey=!0;const q=z.end,F=U?t(n,U,z,o):e(n,q,A,null,z,o);Nu(U)&&o(F.range,"BLOCK_IN_FLOW",Cu),n.atKey=!1;const j=Is(R??[],{flow:u,indicator:"map-value-ind",next:D,offset:F.range[2],onError:o,parentIndent:r.indent,startOnNewline:!1});if(j.found){if(!c&&!z.found&&n.options.strict){if(R)for(const M of R){if(M===j.found)break;if(M.type==="newline"){o(M,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}z.start<j.found.offset-1024&&o(j.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else D&&("source"in D&&D.source&&D.source[0]===":"?o(D,"MISSING_CHAR",`Missing space after : in ${u}`):o(j.start,"MISSING_CHAR",`Missing , or : between ${u} items`));const oe=D?t(n,D,j,o):j.found?e(n,j.end,R,null,j,o):null;oe?Nu(D)&&o(oe.range,"BLOCK_IN_FLOW",Cu):j.comment&&(F.comment?F.comment+=`
|
||||
`+j.comment:F.comment=j.comment);const ae=new ct(F,oe);if(n.options.keepSourceTokens&&(ae.srcToken=C),c){const M=p;Yy(n,M.items,F)&&o(q,"DUPLICATE_KEY","Map keys must be unique"),M.items.push(ae)}else{const M=new Lt(n.schema);M.flow=!0,M.items.push(ae);const H=(oe??F).range;M.range=[F.range[0],H[1],H[2]],p.items.push(M)}y=oe?oe.range[2]:j.end}}const v=c?"}":"]",[x,...E]=r.end;let S=y;if(x&&x.source===v)S=x.offset+x.source.length;else{const k=u[0].toUpperCase()+u.substring(1),C=g?`${k} must end with a ${v}`:`${k} in block collection must be sufficiently indented and end with a ${v}`;o(y,g?"MISSING_CHAR":"BAD_INDENT",C),x&&x.source.length!==1&&E.unshift(x)}if(E.length>0){const k=to(E,S,n.options.strict,o);k.comment&&(p.comment?p.comment+=`
|
||||
`+k.comment:p.comment=k.comment),p.range=[r.offset,S,k.offset]}else p.range=[r.offset,S,S];return p}function Au(t,e,n,r,o,l){const c=n.type==="block-map"?LE(t,e,n,r,l):n.type==="block-seq"?ME(t,e,n,r,l):jE(t,e,n,r,l),u=c.constructor;return o==="!"||o===u.tagName?(c.tag=u.tagName,c):(o&&(c.tag=o),c)}function PE(t,e,n,r,o){var v;const l=r.tag,c=l?e.directives.tagName(l.source,x=>o(l,"TAG_RESOLVE_FAILED",x)):null;if(n.type==="block-seq"){const{anchor:x,newlineAfterProp:E}=r,S=x&&l?x.offset>l.offset?x:l:x??l;S&&(!E||E.offset<S.offset)&&o(S,"MISSING_CHAR","Missing newline after block sequence props")}const u=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!l||!c||c==="!"||c===Lt.tagName&&u==="map"||c===nr.tagName&&u==="seq")return Au(t,e,n,o,c);let d=e.schema.tags.find(x=>x.tag===c&&x.collection===u);if(!d){const x=e.schema.knownTags[c];if(x&&x.collection===u)e.schema.tags.push(Object.assign({},x,{default:!1})),d=x;else return x!=null&&x.collection?o(l,"BAD_COLLECTION_TYPE",`${x.tag} used for ${u} collection, but expects ${x.collection}`,!0):o(l,"TAG_RESOLVE_FAILED",`Unresolved tag: ${c}`,!0),Au(t,e,n,o,c)}const p=Au(t,e,n,o,c,d),g=((v=d.resolve)==null?void 0:v.call(d,p,x=>o(l,"TAG_RESOLVE_FAILED",x),e.options))??p,y=$e(g)?g:new ue(g);return y.range=p.range,y.tag=c,d!=null&&d.format&&(y.format=d.format),y}function Zy(t,e,n){const r=e.offset,o=OE(e,t.options.strict,n);if(!o)return{value:"",type:null,comment:"",range:[r,r,r]};const l=o.mode===">"?ue.BLOCK_FOLDED:ue.BLOCK_LITERAL,c=e.source?RE(e.source):[];let u=c.length;for(let S=c.length-1;S>=0;--S){const k=c[S][1];if(k===""||k==="\r")u=S;else break}if(u===0){const S=o.chomp==="+"&&c.length>0?`
|
||||
`.repeat(Math.max(1,c.length-1)):"";let k=r+o.length;return e.source&&(k+=e.source.length),{value:S,type:l,comment:o.comment,range:[r,k,k]}}let d=e.indent+o.indent,p=e.offset+o.length,g=0;for(let S=0;S<u;++S){const[k,C]=c[S];if(C===""||C==="\r")o.indent===0&&k.length>d&&(d=k.length);else{k.length<d&&n(p+k.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),o.indent===0&&(d=k.length),g=S,d===0&&!t.atRoot&&n(p,"BAD_INDENT","Block scalar values in collections must be indented");break}p+=k.length+C.length+1}for(let S=c.length-1;S>=u;--S)c[S][0].length>d&&(u=S+1);let y="",v="",x=!1;for(let S=0;S<g;++S)y+=c[S][0].slice(d)+`
|
||||
`;for(let S=g;S<u;++S){let[k,C]=c[S];p+=k.length+C.length+1;const A=C[C.length-1]==="\r";if(A&&(C=C.slice(0,-1)),C&&k.length<d){const R=`Block scalar lines must not be less indented than their ${o.indent?"explicit indentation indicator":"first line"}`;n(p-C.length-(A?2:1),"BAD_INDENT",R),k=""}l===ue.BLOCK_LITERAL?(y+=v+k.slice(d)+C,v=`
|
||||
`):k.length>d||C[0]===" "?(v===" "?v=`
|
||||
`:!x&&v===`
|
||||
`&&(v=`
|
||||
|
||||
`),y+=v+k.slice(d)+C,v=`
|
||||
`,x=!0):C===""?v===`
|
||||
`?y+=`
|
||||
`:v=`
|
||||
`:(y+=v+C,v=" ",x=!1)}switch(o.chomp){case"-":break;case"+":for(let S=u;S<c.length;++S)y+=`
|
||||
`+c[S][0].slice(d);y[y.length-1]!==`
|
||||
`&&(y+=`
|
||||
`);break;default:y+=`
|
||||
`}const E=r+o.length+e.source.length;return{value:y,type:l,comment:o.comment,range:[r,E,E]}}function OE({offset:t,props:e},n,r){if(e[0].type!=="block-scalar-header")return r(e[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:o}=e[0],l=o[0];let c=0,u="",d=-1;for(let v=1;v<o.length;++v){const x=o[v];if(!u&&(x==="-"||x==="+"))u=x;else{const E=Number(x);!c&&E?c=E:d===-1&&(d=t+v)}}d!==-1&&r(d,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${o}`);let p=!1,g="",y=o.length;for(let v=1;v<e.length;++v){const x=e[v];switch(x.type){case"space":p=!0;case"newline":y+=x.source.length;break;case"comment":n&&!p&&r(x,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),y+=x.source.length,g=x.source.substring(1);break;case"error":r(x,"UNEXPECTED_TOKEN",x.message),y+=x.source.length;break;default:{const E=`Unexpected token in block scalar header: ${x.type}`;r(x,"UNEXPECTED_TOKEN",E);const S=x.source;S&&typeof S=="string"&&(y+=S.length)}}}return{mode:l,indent:c,chomp:u,comment:g,length:y}}function RE(t){const e=t.split(/\n( *)/),n=e[0],r=n.match(/^( *)/),l=[r!=null&&r[1]?[r[1],n.slice(r[1].length)]:["",n]];for(let c=1;c<e.length;c+=2)l.push([e[c],e[c+1]]);return l}function ev(t,e,n){const{offset:r,type:o,source:l,end:c}=t;let u,d;const p=(v,x,E)=>n(r+v,x,E);switch(o){case"scalar":u=ue.PLAIN,d=$E(l,p);break;case"single-quoted-scalar":u=ue.QUOTE_SINGLE,d=DE(l,p);break;case"double-quoted-scalar":u=ue.QUOTE_DOUBLE,d=FE(l,p);break;default:return n(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${o}`),{value:"",type:null,comment:"",range:[r,r+l.length,r+l.length]}}const g=r+l.length,y=to(c,g,e,n);return{value:d,type:u,comment:y.comment,range:[r,g,y.offset]}}function $E(t,e){let n="";switch(t[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${t[0]}`;break}case"@":case"`":{n=`reserved character ${t[0]}`;break}}return n&&e(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),tv(t)}function DE(t,e){return(t[t.length-1]!=="'"||t.length===1)&&e(t.length,"MISSING_CHAR","Missing closing 'quote"),tv(t.slice(1,-1)).replace(/''/g,"'")}function tv(t){let e,n;try{e=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
||||
`,"sy"),n=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
||||
`,"sy")}catch{e=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let r=e.exec(t);if(!r)return t;let o=r[1],l=" ",c=e.lastIndex;for(n.lastIndex=c;r=n.exec(t);)r[1]===""?l===`
|
||||
`?o+=l:l=`
|
||||
`:(o+=l+r[1],l=" "),c=n.lastIndex;const u=/[ \t]*(.*)/sy;return u.lastIndex=c,r=u.exec(t),o+l+((r==null?void 0:r[1])??"")}function FE(t,e){let n="";for(let r=1;r<t.length-1;++r){const o=t[r];if(!(o==="\r"&&t[r+1]===`
|
||||
`))if(o===`
|
||||
`){const{fold:l,offset:c}=BE(t,r);n+=l,r=c}else if(o==="\\"){let l=t[++r];const c=zE[l];if(c)n+=c;else if(l===`
|
||||
`)for(l=t[r+1];l===" "||l===" ";)l=t[++r+1];else if(l==="\r"&&t[r+1]===`
|
||||
`)for(l=t[++r+1];l===" "||l===" ";)l=t[++r+1];else if(l==="x"||l==="u"||l==="U"){const u={x:2,u:4,U:8}[l];n+=UE(t,r+1,u,e),r+=u}else{const u=t.substr(r-1,2);e(r-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${u}`),n+=u}}else if(o===" "||o===" "){const l=r;let c=t[r+1];for(;c===" "||c===" ";)c=t[++r+1];c!==`
|
||||
`&&!(c==="\r"&&t[r+2]===`
|
||||
`)&&(n+=r>l?t.slice(l,r+1):o)}else n+=o}return(t[t.length-1]!=='"'||t.length===1)&&e(t.length,"MISSING_CHAR",'Missing closing "quote'),n}function BE(t,e){let n="",r=t[e+1];for(;(r===" "||r===" "||r===`
|
||||
`||r==="\r")&&!(r==="\r"&&t[e+2]!==`
|
||||
`);)r===`
|
||||
`&&(n+=`
|
||||
`),e+=1,r=t[e+1];return n||(n=" "),{fold:n,offset:e}}const zE={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
||||
`,r:"\r",t:" ",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function UE(t,e,n,r){const o=t.substr(e,n),c=o.length===n&&/^[0-9a-fA-F]+$/.test(o)?parseInt(o,16):NaN;if(isNaN(c)){const u=t.substr(e-2,n+2);return r(e-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${u}`),u}return String.fromCodePoint(c)}function nv(t,e,n,r){const{value:o,type:l,comment:c,range:u}=e.type==="block-scalar"?Zy(t,e,r):ev(e,t.options.strict,r),d=n?t.directives.tagName(n.source,y=>r(n,"TAG_RESOLVE_FAILED",y)):null;let p;t.options.stringKeys&&t.atKey?p=t.schema[dn]:d?p=HE(t.schema,o,d,n,r):e.type==="scalar"?p=qE(t,o,e,r):p=t.schema[dn];let g;try{const y=p.resolve(o,v=>r(n??e,"TAG_RESOLVE_FAILED",v),t.options);g=Te(y)?y:new ue(y)}catch(y){const v=y instanceof Error?y.message:String(y);r(n??e,"TAG_RESOLVE_FAILED",v),g=new ue(o)}return g.range=u,g.source=o,l&&(g.type=l),d&&(g.tag=d),p.format&&(g.format=p.format),c&&(g.comment=c),g}function HE(t,e,n,r,o){var u;if(n==="!")return t[dn];const l=[];for(const d of t.tags)if(!d.collection&&d.tag===n)if(d.default&&d.test)l.push(d);else return d;for(const d of l)if((u=d.test)!=null&&u.test(e))return d;const c=t.knownTags[n];return c&&!c.collection?(t.tags.push(Object.assign({},c,{default:!1,test:void 0})),c):(o(r,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),t[dn])}function qE({atKey:t,directives:e,schema:n},r,o,l){const c=n.tags.find(u=>{var d;return(u.default===!0||t&&u.default==="key")&&((d=u.test)==null?void 0:d.test(r))})||n[dn];if(n.compat){const u=n.compat.find(d=>{var p;return d.default&&((p=d.test)==null?void 0:p.test(r))})??n[dn];if(c.tag!==u.tag){const d=e.tagString(c.tag),p=e.tagString(u.tag),g=`Value may be parsed as either ${d} or ${p}`;l(o,"TAG_RESOLVE_FAILED",g,!0)}}return c}function VE(t,e,n){if(e){n===null&&(n=e.length);for(let r=n-1;r>=0;--r){let o=e[r];switch(o.type){case"space":case"comment":case"newline":t-=o.source.length;continue}for(o=e[++r];(o==null?void 0:o.type)==="space";)t+=o.source.length,o=e[++r];break}}return t}const WE={composeNode:rv,composeEmptyNode:Df};function rv(t,e,n,r){const o=t.atKey,{spaceBefore:l,comment:c,anchor:u,tag:d}=n;let p,g=!0;switch(e.type){case"alias":p=KE(t,e,r),(u||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":p=nv(t,e,d,r),u&&(p.anchor=u.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":p=PE(WE,t,e,n,r),u&&(p.anchor=u.source.substring(1));break;default:{const y=e.type==="error"?e.message:`Unsupported token (type: ${e.type})`;r(e,"UNEXPECTED_TOKEN",y),p=Df(t,e.offset,void 0,null,n,r),g=!1}}return u&&p.anchor===""&&r(u,"BAD_ALIAS","Anchor cannot be an empty string"),o&&t.options.stringKeys&&(!Te(p)||typeof p.value!="string"||p.tag&&p.tag!=="tag:yaml.org,2002:str")&&r(d??e,"NON_STRING_KEY","With stringKeys, all keys must be strings"),l&&(p.spaceBefore=!0),c&&(e.type==="scalar"&&e.source===""?p.comment=c:p.commentBefore=c),t.options.keepSourceTokens&&g&&(p.srcToken=e),p}function Df(t,e,n,r,{spaceBefore:o,comment:l,anchor:c,tag:u,end:d},p){const g={type:"scalar",offset:VE(e,n,r),indent:-1,source:""},y=nv(t,g,u,p);return c&&(y.anchor=c.source.substring(1),y.anchor===""&&p(c,"BAD_ALIAS","Anchor cannot be an empty string")),o&&(y.spaceBefore=!0),l&&(y.comment=l,y.range[2]=d),y}function KE({options:t},{offset:e,source:n,end:r},o){const l=new ca(n.substring(1));l.source===""&&o(e,"BAD_ALIAS","Alias cannot be an empty string"),l.source.endsWith(":")&&o(e+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const c=e+n.length,u=to(r,c,t.strict,o);return l.range=[e,c,u.offset],u.comment&&(l.comment=u.comment),l}function GE(t,e,{offset:n,start:r,value:o,end:l},c){const u=Object.assign({_directives:e},t),d=new Bs(void 0,u),p={atKey:!1,atRoot:!0,directives:d.directives,options:d.options,schema:d.schema},g=Is(r,{indicator:"doc-start",next:o??(l==null?void 0:l[0]),offset:n,onError:c,parentIndent:0,startOnNewline:!0});g.found&&(d.directives.docStart=!0,o&&(o.type==="block-map"||o.type==="block-seq")&&!g.hasNewline&&c(g.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),d.contents=o?rv(p,o,g,c):Df(p,g.end,r,null,g,c);const y=d.contents.range[2],v=to(l,y,!1,c);return v.comment&&(d.comment=v.comment),d.range=[n,y,v.offset],d}function Mi(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];const{offset:e,source:n}=t;return[e,e+(typeof n=="string"?n.length:1)]}function Cm(t){var o;let e="",n=!1,r=!1;for(let l=0;l<t.length;++l){const c=t[l];switch(c[0]){case"#":e+=(e===""?"":r?`
|
||||
|
||||
`:`
|
||||
`)+(c.substring(1)||" "),n=!0,r=!1;break;case"%":((o=t[l+1])==null?void 0:o[0])!=="#"&&(l+=1),n=!1;break;default:n||(r=!0),n=!1}}return{comment:e,afterEmptyLine:r}}class Ff{constructor(e={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,r,o,l)=>{const c=Mi(n);l?this.warnings.push(new Xy(c,r,o)):this.errors.push(new Ar(c,r,o))},this.directives=new dt({version:e.version||"1.2"}),this.options=e}decorate(e,n){const{comment:r,afterEmptyLine:o}=Cm(this.prelude);if(r){const l=e.contents;if(n)e.comment=e.comment?`${e.comment}
|
||||
${r}`:r;else if(o||e.directives.docStart||!l)e.commentBefore=r;else if(Re(l)&&!l.flow&&l.items.length>0){let c=l.items[0];je(c)&&(c=c.key);const u=c.commentBefore;c.commentBefore=u?`${r}
|
||||
${u}`:r}else{const c=l.commentBefore;l.commentBefore=c?`${r}
|
||||
${c}`:r}}n?(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:Cm(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(e,n=!1,r=-1){for(const o of e)yield*this.next(o);yield*this.end(n,r)}*next(e){switch(e.type){case"directive":this.directives.add(e.source,(n,r,o)=>{const l=Mi(e);l[0]+=n,this.onError(l,"BAD_DIRECTIVE",r,o)}),this.prelude.push(e.source),this.atDirectives=!0;break;case"document":{const n=GE(this.options,this.directives,e,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(e,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(e.source);break;case"error":{const n=e.source?`${e.message}: ${JSON.stringify(e.source)}`:e.message,r=new Ar(Mi(e),"UNEXPECTED_TOKEN",n);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 Ar(Mi(e),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=!0;const n=to(e.end,e.offset+e.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){const r=this.doc.comment;this.doc.comment=r?`${r}
|
||||
${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new Ar(Mi(e),"UNEXPECTED_TOKEN",`Unsupported token ${e.type}`))}}*end(e=!1,n=-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),o=new Bs(void 0,r);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),o.range=[0,n,n],this.decorate(o,!1),yield o}}}function QE(t,e=!0,n){if(t){const r=(o,l,c)=>{const u=typeof o=="number"?o:Array.isArray(o)?o[0]:o.offset;if(n)n(u,l,c);else throw new Ar([u,u+1],l,c)};switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return ev(t,e,r);case"block-scalar":return Zy({options:{strict:e}},t,r)}}return null}function JE(t,e){const{implicitKey:n=!1,indent:r,inFlow:o=!1,offset:l=-1,type:c="PLAIN"}=e,u=Zi({type:c,value:t},{implicitKey:n,indent:r>0?" ".repeat(r):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}}),d=e.end??[{type:"newline",offset:-1,indent:r,source:`
|
||||
`}];switch(u[0]){case"|":case">":{const p=u.indexOf(`
|
||||
`),g=u.substring(0,p),y=u.substring(p+1)+`
|
||||
`,v=[{type:"block-scalar-header",offset:l,indent:r,source:g}];return sv(v,d)||v.push({type:"newline",offset:-1,indent:r,source:`
|
||||
`}),{type:"block-scalar",offset:l,indent:r,props:v,source:y}}case'"':return{type:"double-quoted-scalar",offset:l,indent:r,source:u,end:d};case"'":return{type:"single-quoted-scalar",offset:l,indent:r,source:u,end:d};default:return{type:"scalar",offset:l,indent:r,source:u,end:d}}}function XE(t,e,n={}){let{afterKey:r=!1,implicitKey:o=!1,inFlow:l=!1,type:c}=n,u="indent"in t?t.indent:null;if(r&&typeof u=="number"&&(u+=2),!c)switch(t.type){case"single-quoted-scalar":c="QUOTE_SINGLE";break;case"double-quoted-scalar":c="QUOTE_DOUBLE";break;case"block-scalar":{const p=t.props[0];if(p.type!=="block-scalar-header")throw new Error("Invalid block scalar header");c=p.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:c="PLAIN"}const d=Zi({type:c,value:e},{implicitKey:o||u===null,indent:u!==null&&u>0?" ".repeat(u):"",inFlow:l,options:{blockQuote:!0,lineWidth:-1}});switch(d[0]){case"|":case">":YE(t,d);break;case'"':Iu(t,d,"double-quoted-scalar");break;case"'":Iu(t,d,"single-quoted-scalar");break;default:Iu(t,d,"scalar")}}function YE(t,e){const n=e.indexOf(`
|
||||
`),r=e.substring(0,n),o=e.substring(n+1)+`
|
||||
`;if(t.type==="block-scalar"){const l=t.props[0];if(l.type!=="block-scalar-header")throw new Error("Invalid block scalar header");l.source=r,t.source=o}else{const{offset:l}=t,c="indent"in t?t.indent:-1,u=[{type:"block-scalar-header",offset:l,indent:c,source:r}];sv(u,"end"in t?t.end:void 0)||u.push({type:"newline",offset:-1,indent:c,source:`
|
||||
`});for(const d of Object.keys(t))d!=="type"&&d!=="offset"&&delete t[d];Object.assign(t,{type:"block-scalar",indent:c,props:u,source:o})}}function sv(t,e){if(e)for(const n of e)switch(n.type){case"space":case"comment":t.push(n);break;case"newline":return t.push(n),!0}return!1}function Iu(t,e,n){switch(t.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":t.type=n,t.source=e;break;case"block-scalar":{const r=t.props.slice(1);let o=e.length;t.props[0].type==="block-scalar-header"&&(o-=t.props[0].source.length);for(const l of r)l.offset+=o;delete t.props,Object.assign(t,{type:n,source:e,end:r});break}case"block-map":case"block-seq":{const o={type:"newline",offset:t.offset+e.length,indent:t.indent,source:`
|
||||
`};delete t.items,Object.assign(t,{type:n,source:e,end:[o]});break}default:{const r="indent"in t?t.indent:-1,o="end"in t&&Array.isArray(t.end)?t.end.filter(l=>l.type==="space"||l.type==="comment"||l.type==="newline"):[];for(const l of Object.keys(t))l!=="type"&&l!=="offset"&&delete t[l];Object.assign(t,{type:n,indent:r,source:e,end:o})}}}const ZE=t=>"type"in t?ta(t):Fl(t);function ta(t){switch(t.type){case"block-scalar":{let e="";for(const n of t.props)e+=ta(n);return e+t.source}case"block-map":case"block-seq":{let e="";for(const n of t.items)e+=Fl(n);return e}case"flow-collection":{let e=t.start.source;for(const n of t.items)e+=Fl(n);for(const n of t.end)e+=n.source;return e}case"document":{let e=Fl(t);if(t.end)for(const n of t.end)e+=n.source;return e}default:{let e=t.source;if("end"in t&&t.end)for(const n of t.end)e+=n.source;return e}}}function Fl({start:t,key:e,sep:n,value:r}){let o="";for(const l of t)o+=l.source;if(e&&(o+=ta(e)),n)for(const l of n)o+=l.source;return r&&(o+=ta(r)),o}const Gu=Symbol("break visit"),ek=Symbol("skip children"),iv=Symbol("remove item");function Mr(t,e){"type"in t&&t.type==="document"&&(t={start:t.start,value:t.value}),ov(Object.freeze([]),t,e)}Mr.BREAK=Gu;Mr.SKIP=ek;Mr.REMOVE=iv;Mr.itemAtPath=(t,e)=>{let n=t;for(const[r,o]of e){const l=n==null?void 0:n[r];if(l&&"items"in l)n=l.items[o];else return}return n};Mr.parentCollection=(t,e)=>{const n=Mr.itemAtPath(t,e.slice(0,-1)),r=e[e.length-1][0],o=n==null?void 0:n[r];if(o&&"items"in o)return o;throw new Error("Parent collection not found")};function ov(t,e,n){let r=n(e,t);if(typeof r=="symbol")return r;for(const o of["key","value"]){const l=e[o];if(l&&"items"in l){for(let c=0;c<l.items.length;++c){const u=ov(Object.freeze(t.concat([[o,c]])),l.items[c],n);if(typeof u=="number")c=u-1;else{if(u===Gu)return Gu;u===iv&&(l.items.splice(c,1),c-=1)}}typeof r=="function"&&o==="key"&&(r=r(e,t))}}return typeof r=="function"?r(e,t):r}const wa="\uFEFF",Sa="",xa="",Ji="",tk=t=>!!t&&"items"in t,nk=t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar");function rk(t){switch(t){case wa:return"<BOM>";case Sa:return"<DOC>";case xa:return"<FLOW_END>";case Ji:return"<SCALAR>";default:return JSON.stringify(t)}}function lv(t){switch(t){case wa:return"byte-order-mark";case Sa:return"doc-mode";case xa:return"flow-error-end";case Ji: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(t[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 sk=Object.freeze(Object.defineProperty({__proto__:null,BOM:wa,DOCUMENT:Sa,FLOW_END:xa,SCALAR:Ji,createScalarToken:JE,isCollection:tk,isScalar:nk,prettyToken:rk,resolveAsScalar:QE,setScalarValue:XE,stringify:ZE,tokenType:lv,visit:Mr},Symbol.toStringTag,{value:"Module"}));function en(t){switch(t){case void 0:case" ":case`
|
||||
`:case"\r":case" ":return!0;default:return!1}}const Nm=new Set("0123456789ABCDEFabcdef"),ik=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),bl=new Set(",[]{}"),ok=new Set(` ,[]{}
|
||||
\r `),Lu=t=>!t||ok.has(t);class av{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,n=!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=!n;let r=this.next??"stream";for(;r&&(n||this.hasChars(1));)r=yield*this.parseNext(r)}atLineEnd(){let e=this.pos,n=this.buffer[e];for(;n===" "||n===" ";)n=this.buffer[++e];return!n||n==="#"||n===`
|
||||
`?!0:n==="\r"?this.buffer[e+1]===`
|
||||
`:!1}charAt(e){return this.buffer[this.pos+e]}continueScalar(e){let n=this.buffer[e];if(this.indentNext>0){let r=0;for(;n===" ";)n=this.buffer[++r+e];if(n==="\r"){const o=this.buffer[r+e+1];if(o===`
|
||||
`||!o&&!this.atEnd)return e+r+1}return n===`
|
||||
`||r>=this.indentNext||!n&&!this.atEnd?e+r:-1}if(n==="-"||n==="."){const r=this.buffer.substr(e,3);if((r==="---"||r==="...")&&en(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]===wa&&(yield*this.pushCount(1),e=e.substring(1)),e[0]==="%"){let n=e.length,r=e.indexOf("#");for(;r!==-1;){const l=e[r-1];if(l===" "||l===" "){n=r-1;break}else r=e.indexOf("#",r+1)}for(;;){const l=e[n-1];if(l===" "||l===" ")n-=1;else break}const o=(yield*this.pushCount(n))+(yield*this.pushSpaces(!0));return yield*this.pushCount(e.length-o),this.pushNewline(),"stream"}if(this.atLineEnd()){const n=yield*this.pushSpaces(!0);return yield*this.pushCount(e.length-n),yield*this.pushNewline(),"stream"}return yield Sa,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 n=this.peek(3);if((n==="---"||n==="...")&&en(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,n==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!en(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[e,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((e==="-"||e==="?"||e===":")&&en(n)){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 n=yield*this.pushIndicators();switch(e[n]){case"#":yield*this.pushCount(e.length-n);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(Lu),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(e.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let e,n,r=-1;do e=yield*this.pushNewline(),e>0?(n=yield*this.pushSpaces(!1),this.indentValue=r=n):n=0,n+=yield*this.pushSpaces(!0);while(e+n>0);const o=this.getLine();if(o===null)return this.setNext("flow");if((r!==-1&&r<this.indentNext&&o[0]!=="#"||r===0&&(o.startsWith("---")||o.startsWith("..."))&&en(o[3]))&&!(r===this.indentNext-1&&this.flowLevel===1&&(o[0]==="]"||o[0]==="}")))return this.flowLevel=0,yield xa,yield*this.parseLineStart();let l=0;for(;o[l]===",";)l+=yield*this.pushCount(1),l+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(l+=yield*this.pushIndicators(),o[l]){case void 0:return"flow";case"#":return yield*this.pushCount(o.length-l),"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(Lu),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const c=this.charAt(1);if(this.flowKey||en(c)||c===",")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 n=this.buffer.indexOf(e,this.pos+1);if(e==="'")for(;n!==-1&&this.buffer[n+1]==="'";)n=this.buffer.indexOf("'",n+2);else for(;n!==-1;){let l=0;for(;this.buffer[n-1-l]==="\\";)l+=1;if(l%2===0)break;n=this.buffer.indexOf('"',n+1)}const r=this.buffer.substring(0,n);let o=r.indexOf(`
|
||||
`,this.pos);if(o!==-1){for(;o!==-1;){const l=this.continueScalar(o+1);if(l===-1)break;o=r.indexOf(`
|
||||
`,l)}o!==-1&&(n=o-(r[o-1]==="\r"?2:1))}if(n===-1){if(!this.atEnd)return this.setNext("quoted-scalar");n=this.buffer.length}return yield*this.pushToIndex(n+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let e=this.pos;for(;;){const n=this.buffer[++e];if(n==="+")this.blockScalarKeep=!0;else if(n>"0"&&n<="9")this.blockScalarIndent=Number(n)-1;else if(n!=="-")break}return yield*this.pushUntil(n=>en(n)||n==="#")}*parseBlockScalar(){let e=this.pos-1,n=0,r;e:for(let l=this.pos;r=this.buffer[l];++l)switch(r){case" ":n+=1;break;case`
|
||||
`:e=l,n=0;break;case"\r":{const c=this.buffer[l+1];if(!c&&!this.atEnd)return this.setNext("block-scalar");if(c===`
|
||||
`)break}default:break e}if(!r&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=n:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const l=this.continueScalar(e+1);if(l===-1)break;e=this.buffer.indexOf(`
|
||||
`,l)}while(e!==-1);if(e===-1){if(!this.atEnd)return this.setNext("block-scalar");e=this.buffer.length}}let o=e+1;for(r=this.buffer[o];r===" ";)r=this.buffer[++o];if(r===" "){for(;r===" "||r===" "||r==="\r"||r===`
|
||||
`;)r=this.buffer[++o];e=o-1}else if(!this.blockScalarKeep)do{let l=e-1,c=this.buffer[l];c==="\r"&&(c=this.buffer[--l]);const u=l;for(;c===" ";)c=this.buffer[--l];if(c===`
|
||||
`&&l>=this.pos&&l+1+n>u)e=l;else break}while(!0);return yield Ji,yield*this.pushToIndex(e+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const e=this.flowLevel>0;let n=this.pos-1,r=this.pos-1,o;for(;o=this.buffer[++r];)if(o===":"){const l=this.buffer[r+1];if(en(l)||e&&bl.has(l))break;n=r}else if(en(o)){let l=this.buffer[r+1];if(o==="\r"&&(l===`
|
||||
`?(r+=1,o=`
|
||||
`,l=this.buffer[r+1]):n=r),l==="#"||e&&bl.has(l))break;if(o===`
|
||||
`){const c=this.continueScalar(r+1);if(c===-1)break;r=Math.max(r,c-2)}}else{if(e&&bl.has(o))break;n=r}return!o&&!this.atEnd?this.setNext("plain-scalar"):(yield Ji,yield*this.pushToIndex(n+1,!0),e?"flow":"doc")}*pushCount(e){return e>0?(yield this.buffer.substr(this.pos,e),this.pos+=e,e):0}*pushToIndex(e,n){const r=this.buffer.slice(this.pos,e);return r?(yield r,this.pos+=r.length,r.length):(n&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Lu))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const e=this.flowLevel>0,n=this.charAt(1);if(en(n)||e&&bl.has(n))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,n=this.buffer[e];for(;!en(n)&&n!==">";)n=this.buffer[++e];return yield*this.pushToIndex(n===">"?e+1:e,!1)}else{let e=this.pos+1,n=this.buffer[e];for(;n;)if(ik.has(n))n=this.buffer[++e];else if(n==="%"&&Nm.has(this.buffer[e+1])&&Nm.has(this.buffer[e+2]))n=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 n=this.pos-1,r;do r=this.buffer[++n];while(r===" "||e&&r===" ");const o=n-this.pos;return o>0&&(yield this.buffer.substr(this.pos,o),this.pos=n),o}*pushUntil(e){let n=this.pos,r=this.buffer[n];for(;!e(r);)r=this.buffer[++n];return yield*this.pushToIndex(n,!1)}}class cv{constructor(){this.lineStarts=[],this.addNewLine=e=>this.lineStarts.push(e),this.linePos=e=>{let n=0,r=this.lineStarts.length;for(;n<r;){const l=n+r>>1;this.lineStarts[l]<e?n=l+1:r=l}if(this.lineStarts[n]===e)return{line:n+1,col:1};if(n===0)return{line:0,col:e};const o=this.lineStarts[n-1];return{line:n,col:e-o+1}}}}function Tr(t,e){for(let n=0;n<t.length;++n)if(t[n].type===e)return!0;return!1}function Am(t){for(let e=0;e<t.length;++e)switch(t[e].type){case"space":case"comment":case"newline":break;default:return e}return-1}function uv(t){switch(t==null?void 0:t.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Tl(t){switch(t.type){case"document":return t.start;case"block-map":{const e=t.items[t.items.length-1];return e.sep??e.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}function ms(t){var n;if(t.length===0)return[];let e=t.length;e:for(;--e>=0;)switch(t[e].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((n=t[++e])==null?void 0:n.type)==="space";);return t.splice(e,t.length)}function Im(t){if(t.start.type==="flow-seq-start")for(const e of t.items)e.sep&&!e.value&&!Tr(e.start,"explicit-key-ind")&&!Tr(e.sep,"map-value-ind")&&(e.key&&(e.value=e.key),delete e.key,uv(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 Bf{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 av,this.onNewLine=e}*parse(e,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const r of this.lexer.lex(e,n))yield*this.next(r);n||(yield*this.end())}*next(e){if(this.source=e,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=e.length;return}const n=lv(e);if(n)if(n==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){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||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 n=e??this.stack.pop();if(!n)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield n;else{const r=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in r?r.indent:0:n.type==="flow-collection"&&r.type==="document"&&(n.indent=0),n.type==="flow-collection"&&Im(n),r.type){case"document":r.value=n;break;case"block-scalar":r.props.push(n);break;case"block-map":{const o=r.items[r.items.length-1];if(o.value){r.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(o.sep)o.value=n;else{Object.assign(o,{key:n,sep:[]}),this.onKeyLine=!o.explicitKey;return}break}case"block-seq":{const o=r.items[r.items.length-1];o.value?r.items.push({start:[],value:n}):o.value=n;break}case"flow-collection":{const o=r.items[r.items.length-1];!o||o.value?r.items.push({start:[],key:n,sep:[]}):o.sep?o.value=n:Object.assign(o,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((r.type==="document"||r.type==="block-map"||r.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){const o=n.items[n.items.length-1];o&&!o.sep&&!o.value&&o.start.length>0&&Am(o.start)===-1&&(n.indent===0||o.start.every(l=>l.type!=="comment"|
Line truncated
|
||||
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
||||
`,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){var r;const n=e.items[e.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){const o="end"in n.value?n.value.end:void 0,l=Array.isArray(o)?o[o.length-1]:void 0;(l==null?void 0:l.type)==="comment"?o==null||o.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,e.indent)){const o=e.items[e.items.length-2],l=(r=o==null?void 0:o.value)==null?void 0:r.end;if(Array.isArray(l)){Array.prototype.push.apply(l,n.start),l.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=e.indent){const o=!this.onKeyLine&&this.indent===e.indent,l=o&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind";let c=[];if(l&&n.sep&&!n.value){const u=[];for(let d=0;d<n.sep.length;++d){const p=n.sep[d];switch(p.type){case"newline":u.push(d);break;case"space":break;case"comment":p.indent>e.indent&&(u.length=0);break;default:u.length=0}}u.length>=2&&(c=n.sep.splice(u[1]))}switch(this.type){case"anchor":case"tag":l||n.value?(c.push(this.sourceToken),e.items.push({start:c}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):l||n.value?(c.push(this.sourceToken),e.items.push({start:c,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(n.explicitKey)if(n.sep)if(n.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Tr(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:c,key:null,sep:[this.sourceToken]}]});else if(uv(n.key)&&!Tr(n.sep,"newline")){const u=ms(n.start),d=n.key,p=n.sep;p.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:u,key:d,sep:p}]})}else c.length>0?n.sep=n.sep.concat(c,this.sourceToken):n.sep.push(this.sourceToken);else if(Tr(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const u=ms(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:u,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||l?e.items.push({start:c,key:null,sep:[this.sourceToken]}):Tr(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const u=this.flowScalar(this.type);l||n.value?(e.items.push({start:c,key:u,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(u):(Object.assign(n,{key:u,sep:[]}),this.onKeyLine=!0);return}default:{const u=this.startBlockValue(e);if(u){o&&u.type!=="block-seq"&&e.items.push({start:c}),this.stack.push(u);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){var r;const n=e.items[e.items.length-1];switch(this.type){case"newline":if(n.value){const o="end"in n.value?n.value.end:void 0,l=Array.isArray(o)?o[o.length-1]:void 0;(l==null?void 0:l.type)==="comment"?o==null||o.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,e.indent)){const o=e.items[e.items.length-2],l=(r=o==null?void 0:o.value)==null?void 0:r.end;if(Array.isArray(l)){Array.prototype.push.apply(l,n.start),l.push(this.sourceToken),e.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=e.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==e.indent)break;n.value||Tr(n.start,"seq-item-ind")?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>e.indent){const o=this.startBlockValue(e);if(o){this.stack.push(o);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){const n=e.items[e.items.length-1];if(this.type==="flow-error-end"){let r;do yield*this.pop(),r=this.peek(1);while(r&&r.type==="flow-collection")}else if(e.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?e.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":c
Line truncated
|
||||
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
||||
`,n)+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 n=Tl(e),r=ms(n);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 n=Tl(e),r=ms(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:r,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,n){return this.type!=="comment"||this.indent<=n?!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 fv(t){const e=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||e&&new cv||null,prettyErrors:e}}function lk(t,e={}){const{lineCounter:n,prettyErrors:r}=fv(e),o=new Bf(n==null?void 0:n.addNewLine),l=new Ff(e),c=Array.from(l.compose(o.parse(t)));if(r&&n)for(const u of c)u.errors.forEach(ea(t,n)),u.warnings.forEach(ea(t,n));return c.length>0?c:Object.assign([],{empty:!0},l.streamInfo())}function dv(t,e={}){const{lineCounter:n,prettyErrors:r}=fv(e),o=new Bf(n==null?void 0:n.addNewLine),l=new Ff(e);let c=null;for(const u of l.compose(o.parse(t),!0,t.length))if(!c)c=u;else if(c.options.logLevel!=="silent"){c.errors.push(new Ar(u.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return r&&n&&(c.errors.forEach(ea(t,n)),c.warnings.forEach(ea(t,n))),c}function ak(t,e,n){let r;typeof e=="function"?r=e:n===void 0&&e&&typeof e=="object"&&(n=e);const o=dv(t,n);if(!o)return null;if(o.warnings.forEach(l=>My(o.options.logLevel,l)),o.errors.length>0){if(o.options.logLevel!=="silent")throw o.errors[0];o.errors=[]}return o.toJS(Object.assign({reviver:r},n))}function ck(t,e,n){let r=null;if(typeof e=="function"||Array.isArray(e)?r=e:n===void 0&&e&&(n=e),typeof n=="string"&&(n=n.length),typeof n=="number"){const o=Math.round(n);n=o<1?void 0:o>8?{indent:8}:{indent:o}}if(t===void 0){const{keepUndefined:o}=n??e??{};if(!o)return}return Rr(t)&&!r?t.toString(n):new Bs(t,r,n).toString(n)}const hv=Object.freeze(Object.defineProperty({__proto__:null,Alias:ca,CST:sk,Composer:Ff,Document:Bs,Lexer:av,LineCounter:cv,Pair:ct,Parser:Bf,Scalar:ue,Schema:va,YAMLError:$f,YAMLMap:Lt,YAMLParseError:Ar,YAMLSeq:nr,YAMLWarning:Xy,isAlias:Or,isCollection:Re,isDocument:Rr,isMap:Rs,isNode:$e,isPair:je,isScalar:Te,isSeq:$s,parse:ak,parseAllDocuments:lk,parseDocument:dv,stringify:ck,visit:tr,visitAsync:aa},Symbol.toStringTag,{value:"Module"})),uk=({action:t,sdkLanguage:e,testIdAttributeName:n,isInspecting:r,setIsInspecting:o,highlightedElement:l,setHighlightedElement:c})=>{const[u,d]=$.useState("action"),[p]=Nn("shouldPopulateCanvasFromScreenshot",!1),g=$.useMemo(()=>pk(t),[t]),{snapshotInfoUrl:y,snapshotUrl:v,popoutUrl:x}=$.useMemo(()=>{const S=g[u];return S?mk(S,p):{snapshotInfoUrl:void 0,snapshotUrl:void 0,popoutUrl:void 0}},[g,u,p]),E=$.useMemo(()=>y!==void 0?{snapshotInfoUrl:y,snapshotUrl:v,popoutUrl:x}:void 0,[y,v,x]);return w.jsxs("div",{className:"snapshot-tab vbox",children:[w.jsxs(rf,{children:[w.jsx(Ht,{className:"pick-locator",title:"Pick locator",icon:"target",toggled:r,onClick:()=>o(!r)}),["action","before","after"].map(S=>w.jsx(yg,{id:S,title:hk(S),selected:u===S,onSelect:()=>d(S)},S)),w.jsx("div",{style:{flex:"auto"}}),w.jsx(Ht,{icon:"link-external",title:"Open snapshot in a new tab",disabled:!(E!=null&&E.popoutUrl),onClick:()=>{const S=window.open((E==null?void 0:E.popoutUrl)||"","_blank");S==null||S.addEventListener("DOMContentLoaded",()=>{new gy(S,{isUnderTest:mv,sdkLanguage:e,testIdAttributeName:n,stableRafCount:1,browserName:"chromium",customEngines:[]}).consoleApi.install()})}})]}),w.jsx(fk,{snapshotUrls:E,sdkLanguage:e,testIdAttributeName:n,isInspecting:r,setIsInspecting:o,highlightedElement:l,setHighlightedElement:c})]})},fk=({snapshotUrls:t,sdkLanguage:e,testIdAttributeName:n,isInspecting:r,setIsInspecting:o,highlightedElement:l,setHighlightedElement:c})=>{const u=$.useRef(null),d=$.u
Line truncated
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
var fe={exports:{}},pe;function be(){return pe||(pe=1,function(he,Se){(function(te,J){he.exports=J()})(self,()=>(()=>{var te={4567:function(I,r,a){var c=this&&this.__decorate||function(i,o,l,v){var m,h=arguments.length,p=h<3?o:v===null?v=Object.getOwnPropertyDescriptor(o,l):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(i,o,l,v);else for(var b=i.length-1;b>=0;b--)(m=i[b])&&(p=(h<3?m(p):h>3?m(o,l,p):m(o,l))||p);return h>3&&p&&Object.defineProperty(o,l,p),p},_=this&&this.__param||function(i,o){return function(l,v){o(l,v,i)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AccessibilityManager=void 0;const n=a(9042),d=a(6114),f=a(9924),g=a(844),u=a(5596),e=a(4725),s=a(3656);let t=r.AccessibilityManager=class extends g.Disposable{constructor(i,o){super(),this._terminal=i,this._renderService=o,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=document.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=document.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let l=0;l<this._terminal.rows;l++)this._rowElements[l]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[l]);if(this._topBoundaryFocusListener=l=>this._handleBoundaryFocus(l,0),this._bottomBoundaryFocusListener=l=>this._handleBoundaryFocus(l,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=document.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new f.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(l=>this._handleResize(l.rows))),this.register(this._terminal.onRender(l=>this._refreshRows(l.start,l.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(l=>this._handleChar(l))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
|
||||
`))),this.register(this._terminal.onA11yTab(l=>this._handleTab(l))),this.register(this._terminal.onKey(l=>this._handleKey(l.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._screenDprMonitor=new u.ScreenDprMonitor(window),this.register(this._screenDprMonitor),this._screenDprMonitor.setListener(()=>this._refreshRowsDimensions()),this.register((0,s.addDisposableDomListener)(window,"resize",()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,g.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(i){for(let o=0;o<i;o++)this._handleChar(" ")}_handleChar(i){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==i&&(this._charsToAnnounce+=i):this._charsToAnnounce+=i,i===`
|
||||
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=n.tooMuchOutput)),d.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(()=>{this._accessibilityContainer.appendChild(this._liveRegion)},0))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0,d.isMac&&this._liveRegion.remove()}_handleKey(i){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(i)||this._charsToConsume.push(i)}_refreshRows(i,o){this._liveRegionDebouncer.refresh(i,o,this._terminal.rows)}_renderRows(i,o){const l=this._terminal.buffer,v=l.lines.length.toString();for(let m=i;m<=o;m++){const h=l.translateBufferLineToString(l.ydisp+m,!0),p=(l.ydisp+m+1).toString(),b=this._rowElements[m];b&&(h.length===0?b.innerText=" ":b.textContent=h,b.setAttribute("aria-posinset",p),b.setAttribute("aria-setsize",v))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(i,o){const l=i.target,v=this._rowElements[o===0?1:this._rowElements.length-2];if(l.getAttribute("aria-posinset")===(o===0?"1":`${this._terminal.buffer.lines.length}`)||i.relatedTarget!==v)return;let m,h;if(o===0?(m=l,h=this._rowElements.pop(),this._rowContainer.removeChild(h)):(m=this._rowElements.shift(),h=l,this._rowContainer.removeChild(m)),m.removeEventListener("focus",this._topBoundaryFocusListener),h.removeEventListener("focus",this._bottomBoundaryFocusListener),o===0){const p=this._createAccessibilityTreeNode();this._rowElements.unshift(p),this._rowContainer.insertAdjacentElement("afterbegin",p)}else{const p=this._createAccessibilityTreeNode();this._rowElements.push(p),this._rowContainer.appendChild(p)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(o===0?-1:1),this._rowElements[o===0?1:this._rowElements.length-2].focus(),i.preventDefault(),i.stopImmediatePropagation()}_handleResize(i){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let o=this._rowContainer.children.length;o<this._terminal.rows;o++)this._rowElements[o]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[o]);for(;this._rowElements.length>i;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const i=document.createElement("div");return i.setAttribute("role","listitem"),i.tabIndex=-1,this._refreshRowDimensions(i),i}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let i=0;i<this._terminal.rows;i++)this._refreshRowDimensions(this._rowElements[i])}}_refreshRowDimensions(i){i.style.height=`${this._renderService.dimensions.css.cell.height}px`}};r.AccessibilityManager=t=c([_(1,e.IRenderService)],t)},3614:(I,r)=>{function a(d){return d.replace(/\r?\n/g,"\r")}function c(d,f){return f?"\x1B[200~"+d+"\x1B[201~":d}function _(d,f,g,u){d=c(d=a(d),g.decPrivateModes.bracketedPasteMode&&u.rawOptions.ignoreBracketedPasteMode!==!0),g.triggerDataEvent(d,!0),f.value=""}function n(d,f,g){const u=g.getBoundingClientRect(),e=d.clientX-u.left-10,s=d.clientY-u.top-10;f.style.width="20px",f.style.height="20px",f.style.left=`${e}px`,f.style.top=`${s}px`,f.style.zIndex="1000",f.focus()}Object.defineProperty(r,"__esModule",{value:!0}),r.rightClickHandler=r.moveTextAreaUnderMouseCursor=r.paste=r.handlePasteEvent=r.copyHandler=r.bracketTextForPaste=r.prepareTextForTerminal=void 0,r.prepareTextForTerminal=a,r.bracketTextForPaste=c,r.copyHandler=function(d,f){d.clipboardData&&d.clipboardData.setData("text/plain",f.selectionText),d.preventDefault()},r.handlePasteEvent=function(d,f,g,u){d.stopPropagation(),d.clipboardData&&_(d.clipboardData.getData("text/plain"),f,g,u)},r.paste=_,r.moveTextAreaUnderMouseCursor=n,r.rightClickHandler=function(d,f,g,u,e){n(d,f,g),e&&u.rightClickSelect(d),f.value=u.selectionText,f.select()}},7239:(I,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ColorContrastCache=void 0;const c=a(1505);r.ColorContrastCache=class{constructor(){this._color=new c.TwoKeyMap,this._css=new c.TwoKeyMap}setCss(_,n,d){this._css.set(_,n,d)}getCss(_,n){return this._css.get(_,n)}setColor(_,n,d){this._color.set(_,n,d)}getColor(_,n){return this._color.get(_,n)}clear(){this._color.clear(),this._css.clear()}}},3656:(I,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.addDisposableDomListener=void 0,r.addDisposableDomListener=function(a,c,_,n)
Line truncated
|
||||
|
||||
WARNING: This link could potentially be dangerous`)){const s=window.open();if(s){try{s.opener=null}catch{}s.location.href=e}else console.warn("Opening link blocked as opener could not be cleared")}}r.OscLinkProvider=f=c([_(0,d.IBufferService),_(1,d.IOptionsService),_(2,d.IOscLinkService)],f)},6193:(I,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.RenderDebouncer=void 0,r.RenderDebouncer=class{constructor(a,c){this._parentWindow=a,this._renderCallback=c,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._parentWindow.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(a){return this._refreshCallbacks.push(a),this._animationFrame||(this._animationFrame=this._parentWindow.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(a,c,_){this._rowCount=_,a=a!==void 0?a:0,c=c!==void 0?c:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,a):a,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,c):c,this._animationFrame||(this._animationFrame=this._parentWindow.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const a=Math.max(this._rowStart,0),c=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(a,c),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const a of this._refreshCallbacks)a(0);this._refreshCallbacks=[]}}},5596:(I,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ScreenDprMonitor=void 0;const c=a(844);class _ extends c.Disposable{constructor(d){super(),this._parentWindow=d,this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this.register((0,c.toDisposable)(()=>{this.clearListener()}))}setListener(d){this._listener&&this.clearListener(),this._listener=d,this._outerListener=()=>{this._listener&&(this._listener(this._parentWindow.devicePixelRatio,this._currentDevicePixelRatio),this._updateDpr())},this._updateDpr()}_updateDpr(){var d;this._outerListener&&((d=this._resolutionMediaMatchList)===null||d===void 0||d.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._listener&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._listener=void 0,this._outerListener=void 0)}}r.ScreenDprMonitor=_},3236:(I,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Terminal=void 0;const c=a(3614),_=a(3656),n=a(6465),d=a(9042),f=a(3730),g=a(1680),u=a(3107),e=a(5744),s=a(2950),t=a(1296),i=a(428),o=a(4269),l=a(5114),v=a(8934),m=a(3230),h=a(9312),p=a(4725),b=a(6731),L=a(8055),y=a(8969),k=a(8460),x=a(844),T=a(6114),O=a(8437),M=a(2584),C=a(7399),w=a(5941),E=a(9074),D=a(2585),P=a(5435),H=a(4567),U=typeof window<"u"?window.document:null;class W extends y.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(S={}){super(S),this.browser=T,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new x.MutableDisposable),this._onCursorMove=this.register(new k.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new k.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new k.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new k.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new k.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new k.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new k.EventEmitter),this._onBlur=this.register(new k.EventEmitter),this._onA11yCharEmitter=this.register(new k.EventEmitter),this._onA11yTabEmitter=this.register(new k.EventEmitter),this._onWillOpen=this.register(new k.EventEmitter),this._setup(),this.linkifier2=this.register(this._instantiationService.createInstance(n.Linkifier2)),this.linkifier2.registerLinkProvider(this._instantiationService.createInstance(f.OscLinkProvider)),this._decorationService=this._instantiationService.createInstance(E.DecorationService),this._instantiationService.setService(D.IDecorationService,this._decorationService),this.register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this.register(this._inputHandler.onRequestRefreshRows((R,B)=>this.refresh(R,B))),this.r
Line truncated
|
||||
`:`
|
||||
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(h){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),s.isLinux&&h&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(h){const p=this._getMouseBufferCoords(h),b=this._model.finalSelectionStart,L=this._model.finalSelectionEnd;return!!(b&&L&&p)&&this._areCoordsInSelection(p,b,L)}isCellInSelection(h,p){const b=this._model.finalSelectionStart,L=this._model.finalSelectionEnd;return!(!b||!L)&&this._areCoordsInSelection([h,p],b,L)}_areCoordsInSelection(h,p,b){return h[1]>p[1]&&h[1]<b[1]||p[1]===b[1]&&h[1]===p[1]&&h[0]>=p[0]&&h[0]<b[0]||p[1]<b[1]&&h[1]===b[1]&&h[0]<b[0]||p[1]<b[1]&&h[1]===p[1]&&h[0]>=p[0]}_selectWordAtCursor(h,p){var b,L;const y=(L=(b=this._linkifier.currentLink)===null||b===void 0?void 0:b.link)===null||L===void 0?void 0:L.range;if(y)return this._model.selectionStart=[y.start.x-1,y.start.y-1],this._model.selectionStartLength=(0,t.getRangeLength)(y,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const k=this._getMouseBufferCoords(h);return!!k&&(this._selectWordAt(k,p),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(h,p){this._model.clearSelection(),h=Math.max(h,0),p=Math.min(p,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,h],this._model.selectionEnd=[this._bufferService.cols,p],this.refresh(),this._onSelectionChange.fire()}_handleTrim(h){this._model.handleTrim(h)&&this.refresh()}_getMouseBufferCoords(h){const p=this._mouseService.getCoords(h,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(p)return p[0]--,p[1]--,p[1]+=this._bufferService.buffer.ydisp,p}_getMouseEventScrollAmount(h){let p=(0,n.getCoordsRelativeToElement)(this._coreBrowserService.window,h,this._screenElement)[1];const b=this._renderService.dimensions.css.canvas.height;return p>=0&&p<=b?0:(p>b&&(p-=b),p=Math.min(Math.max(p,-50),50),p/=50,p/Math.abs(p)+Math.round(14*p))}shouldForceSelection(h){return s.isMac?h.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:h.shiftKey}handleMouseDown(h){if(this._mouseDownTimeStamp=h.timeStamp,(h.button!==2||!this.hasSelection)&&h.button===0){if(!this._enabled){if(!this.shouldForceSelection(h))return;h.stopPropagation()}h.preventDefault(),this._dragScrollAmount=0,this._enabled&&h.shiftKey?this._handleIncrementalClick(h):h.detail===1?this._handleSingleClick(h):h.detail===2?this._handleDoubleClick(h):h.detail===3&&this._handleTripleClick(h),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(h){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(h))}_handleSingleClick(h){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(h)?3:0,this._model.selectionStart=this._getMouseBufferCoords(h),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const p=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);p&&p.length!==this._model.selectionStart[0]&&p.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(h){this._selectWordAtCursor(h,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(h){const p=this._getMouseBufferCoords(h);p&&(this._activeSelectionMode=2,this._selectLineAt(p[1]))}shouldColumnSelect(h){return h.altKey&&!(s.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(h){if(h.stopImmediatePropagation(),!this._model.selectionStart)return;const p=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(h),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.sele
Line truncated
|
||||
`,n.VT="\v",n.FF="\f",n.CR="\r",n.SO="",n.SI="",n.DLE="",n.DC1="",n.DC2="",n.DC3="",n.DC4="",n.NAK="",n.SYN="",n.ETB="",n.CAN="",n.EM="",n.SUB="",n.ESC="\x1B",n.FS="",n.GS="",n.RS="",n.US="",n.SP=" ",n.DEL=""}(a||(r.C0=a={})),function(n){n.PAD="",n.HOP="",n.BPH="",n.NBH="",n.IND="",n.NEL="
",n.SSA="",n.ESA="",n.HTS="",n.HTJ="",n.VTS="",n.PLD="",n.PLU="",n.RI="",n.SS2="",n.SS3="",n.DCS="",n.PU1="",n.PU2="",n.STS="",n.CCH="",n.MW="",n.SPA="",n.EPA="",n.SOS="",n.SGCI="",n.SCI="",n.CSI="",n.ST="",n.OSC="",n.PM="",n.APC=""}(c||(r.C1=c={})),function(n){n.ST=`${a.ESC}\\`}(_||(r.C1_ESCAPED=_={}))},7399:(I,r,a)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.evaluateKeyboardEvent=void 0;const c=a(2584),_={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};r.evaluateKeyboardEvent=function(n,d,f,g){const u={type:0,cancel:!1,key:void 0},e=(n.shiftKey?1:0)|(n.altKey?2:0)|(n.ctrlKey?4:0)|(n.metaKey?8:0);switch(n.keyCode){case 0:n.key==="UIKeyInputUpArrow"?u.key=d?c.C0.ESC+"OA":c.C0.ESC+"[A":n.key==="UIKeyInputLeftArrow"?u.key=d?c.C0.ESC+"OD":c.C0.ESC+"[D":n.key==="UIKeyInputRightArrow"?u.key=d?c.C0.ESC+"OC":c.C0.ESC+"[C":n.key==="UIKeyInputDownArrow"&&(u.key=d?c.C0.ESC+"OB":c.C0.ESC+"[B");break;case 8:if(n.altKey){u.key=c.C0.ESC+c.C0.DEL;break}u.key=c.C0.DEL;break;case 9:if(n.shiftKey){u.key=c.C0.ESC+"[Z";break}u.key=c.C0.HT,u.cancel=!0;break;case 13:u.key=n.altKey?c.C0.ESC+c.C0.CR:c.C0.CR,u.cancel=!0;break;case 27:u.key=c.C0.ESC,n.altKey&&(u.key=c.C0.ESC+c.C0.ESC),u.cancel=!0;break;case 37:if(n.metaKey)break;e?(u.key=c.C0.ESC+"[1;"+(e+1)+"D",u.key===c.C0.ESC+"[1;3D"&&(u.key=c.C0.ESC+(f?"b":"[1;5D"))):u.key=d?c.C0.ESC+"OD":c.C0.ESC+"[D";break;case 39:if(n.metaKey)break;e?(u.key=c.C0.ESC+"[1;"+(e+1)+"C",u.key===c.C0.ESC+"[1;3C"&&(u.key=c.C0.ESC+(f?"f":"[1;5C"))):u.key=d?c.C0.ESC+"OC":c.C0.ESC+"[C";break;case 38:if(n.metaKey)break;e?(u.key=c.C0.ESC+"[1;"+(e+1)+"A",f||u.key!==c.C0.ESC+"[1;3A"||(u.key=c.C0.ESC+"[1;5A")):u.key=d?c.C0.ESC+"OA":c.C0.ESC+"[A";break;case 40:if(n.metaKey)break;e?(u.key=c.C0.ESC+"[1;"+(e+1)+"B",f||u.key!==c.C0.ESC+"[1;3B"||(u.key=c.C0.ESC+"[1;5B")):u.key=d?c.C0.ESC+"OB":c.C0.ESC+"[B";break;case 45:n.shiftKey||n.ctrlKey||(u.key=c.C0.ESC+"[2~");break;case 46:u.key=e?c.C0.ESC+"[3;"+(e+1)+"~":c.C0.ESC+"[3~";break;case 36:u.key=e?c.C0.ESC+"[1;"+(e+1)+"H":d?c.C0.ESC+"OH":c.C0.ESC+"[H";break;case 35:u.key=e?c.C0.ESC+"[1;"+(e+1)+"F":d?c.C0.ESC+"OF":c.C0.ESC+"[F";break;case 33:n.shiftKey?u.type=2:n.ctrlKey?u.key=c.C0.ESC+"[5;"+(e+1)+"~":u.key=c.C0.ESC+"[5~";break;case 34:n.shiftKey?u.type=3:n.ctrlKey?u.key=c.C0.ESC+"[6;"+(e+1)+"~":u.key=c.C0.ESC+"[6~";break;case 112:u.key=e?c.C0.ESC+"[1;"+(e+1)+"P":c.C0.ESC+"OP";break;case 113:u.key=e?c.C0.ESC+"[1;"+(e+1)+"Q":c.C0.ESC+"OQ";break;case 114:u.key=e?c.C0.ESC+"[1;"+(e+1)+"R":c.C0.ESC+"OR";break;case 115:u.key=e?c.C0.ESC+"[1;"+(e+1)+"S":c.C0.ESC+"OS";break;case 116:u.key=e?c.C0.ESC+"[15;"+(e+1)+"~":c.C0.ESC+"[15~";break;case 117:u.key=e?c.C0.ESC+"[17;"+(e+1)+"~":c.C0.ESC+"[17~";break;case 118:u.key=e?c.C0.ESC+"[18;"+(e+1)+"~":c.C0.ESC+"[18~";break;case 119:u.key=e?c.C0.ESC+"[19;"+(e+1)+"~":c.C0.ESC+"[19~";break;case 120:u.key=e?c.C0.ESC+"[20;"+(e+1)+"~":c.C0.ESC+"[20~";break;case 121:u.key=e?c.C0.ESC+"[21;"+(e+1)+"~":c.C0.ESC+"[21~";break;case 122:u.key=e?c.C0.ESC+"[23;"+(e+1)+"~":c.C0.ESC+"[23~";break;case 123:u.key=e?c.C0.ESC+"[24;"+(e+1)+"~":c.C0.ESC+"[24~";break;default:if(!n.ctrlKey||n.shiftKey||n.altKey||n.metaKey)if(f&&!g||!n.altKey||n.metaKey)!f||n.altKey||n.ctrlKey||n.shiftKey||!n.metaKey?n.key&&!n.ctrlKey&&!n.altKey&&!n.metaKey&&n.keyCode>=48&&n.key.length===1?u.key=n.key:n.key&&n.ctrlKey&&(n.key==="_"&&(u.key=c.C0.US),n.key==="@"&&(u.key=c.C0.NUL)):n.keyCode===65&&(u.type=1);else{const s=_[n.keyCode],t=s==null?void 0:s[n.shiftKey?1:0];if(t)u.key=c.C0.ESC+t;else if(n.keyCode>=65&&n.keyCode<=90){const i=n.ctrlKey?n.keyCode-64:n.keyCode+32;let o=String.fromCharCode(i);n.shiftKey&&(o=o.toUpperCase()),u.key=c.C0.ESC+o}else if(n.keyCode===32)u.key=c.C0.ESC+(n.ctrlKey?c.C0.NUL:" ");else if(n.key==="Dead"&&n.code.startsWith("Key")){let i=n.code.slice(3,4);n.shiftKey||(i=i.toLowerCase()),u.key=c.C0.ESC+i,u.cancel=!0}}else n.keyCode>=65&&n.keyCode<=90?u.key=String.fromCharCode(n.keyCode-64):n.keyCode===32?u.key=c.C0.NUL:n.keyCode>=51&&n.keyCode<=55?u.key=String.fromCharCode(n.keyCode-51+27):n.keyCode===56?u.key=c.C0.DEL:n.keyCode===219?u.key=c.C0.ESC:n.keyCode===220?u.key=c.C0.FS:n.keyCode===221&&(u.key=c.C0.GS)}return u}},482:(I,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.Utf8ToUtf32=r.StringToUtf32=r.utf32ToString=r.stringFromCodePoint=void 0,r.stringFromCodePoint=function(a){return a>65535?(a-=65536,String.fromCharCode(55296+(a>>10Line truncated
|
||||
`,t)}paste(s){this._core.paste(s)}refresh(s,t){this._verifyIntegers(s,t),this._core.refresh(s,t)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(s){this._addonManager.loadAddon(this,s)}static get strings(){return r}_verifyIntegers(...s){for(const t of s)if(t===1/0||isNaN(t)||t%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...s){for(const t of s)if(t&&(t===1/0||isNaN(t)||t%1!=0||t<0))throw new Error("This API only accepts positive integers")}}I.Terminal=u})(),Z})())}(fe)),fe.exports}var ye=be(),ve={exports:{}},ge;function we(){return ge||(ge=1,function(he,Se){(function(te,J){he.exports=J()})(self,function(){return(()=>{var te={};return(()=>{var J=te;Object.defineProperty(J,"__esModule",{value:!0}),J.FitAddon=void 0,J.FitAddon=class{constructor(){}activate(q){this._terminal=q}dispose(){}fit(){const q=this.proposeDimensions();if(!q||!this._terminal||isNaN(q.cols)||isNaN(q.rows))return;const Z=this._terminal._core;this._terminal.rows===q.rows&&this._terminal.cols===q.cols||(Z._renderService.clear(),this._terminal.resize(q.cols,q.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const q=this._terminal._core,Z=q._renderService.dimensions;if(Z.css.cell.width===0||Z.css.cell.height===0)return;const I=this._terminal.options.scrollback===0?0:q.viewport.scrollBarWidth,r=window.getComputedStyle(this._terminal.element.parentElement),a=parseInt(r.getPropertyValue("height")),c=Math.max(0,parseInt(r.getPropertyValue("width"))),_=window.getComputedStyle(this._terminal.element),n=a-(parseInt(_.getPropertyValue("padding-top"))+parseInt(_.getPropertyValue("padding-bottom"))),d=c-(parseInt(_.getPropertyValue("padding-right"))+parseInt(_.getPropertyValue("padding-left")))-I;return{cols:Math.max(2,Math.floor(d/Z.css.cell.width)),rows:Math.max(1,Math.floor(n/Z.css.cell.height))}}}})(),te})()})}(ve)),ve.exports}var Ee=we();const ke={Terminal:ye.Terminal,FitAddon:Ee.FitAddon};export{ke as default};
|
||||
+1
@@ -0,0 +1 @@
|
||||
.CodeMirror{font-family:monospace;height:300px;color:#000;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor .CodeMirror-line::selection,.cm-fat-cursor .CodeMirror-line>span::selection,.cm-fat-cursor .CodeMirror-line>span>span::selection{background:transparent}.cm-fat-cursor .CodeMirror-line::-moz-selection,.cm-fat-cursor .CodeMirror-line>span::-moz-selection,.cm-fat-cursor .CodeMirror-line>span>span::-moz-selection{background:transparent}.cm-fat-cursor{caret-color:transparent}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:0;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error,.cm-invalidchar{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:#ff96004d}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:none;position:relative;z-index:0}.CodeMirror-sizer{position:relative;border-right:50px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none;outline:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-50px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:coLine truncated
|
||||
BIN
Binary file not shown.
Generated
Vendored
+1
@@ -0,0 +1 @@
|
||||
:root{color-scheme:light dark}body{--transparent-blue: #2196F355;--light-pink: #ff69b460;--gray: #888888;--sidebar-width: 250px;--box-shadow: rgba(0, 0, 0, .133) 0px 1.6px 3.6px 0px, rgba(0, 0, 0, .11) 0px .3px .9px 0px}html,body{width:100%;height:100%;padding:0;margin:0;overflow:hidden;display:flex;overscroll-behavior-x:none}#root{width:100%;height:100%;display:flex}body,dialog{background-color:var(--vscode-panel-background);color:var(--vscode-foreground);font-family:var(--vscode-font-family);font-weight:var(--vscode-font-weight);font-size:var(--vscode-font-size);-webkit-font-smoothing:antialiased}a{color:var(--vscode-textLink-foreground)}dialog{border:none;padding:0;box-shadow:var(--box-shadow);line-height:28px;max-width:400px}dialog .title{display:flex;align-items:center;margin:0;padding:0 5px;height:32px;background-color:var(--vscode-sideBar-background);max-width:400px}dialog .title .codicon{margin-right:3px}dialog .body{padding:10px;text-align:center}.button{color:var(--vscode-button-foreground);background:var(--vscode-button-background);margin:10px;border:none;height:28px;min-width:40px;cursor:pointer;-webkit-user-select:none;user-select:none}.button:focus{outline:1px solid var(--vscode-focusBorder)}.button:hover{background:var(--vscode-button-hoverBackground)}.button.secondary{color:var(--vscode-button-secondaryForeground);background:var(--vscode-button-secondaryBackground)}.button.secondary:hover{background:var(--vscode-button-secondaryHoverBackground)}*{box-sizing:border-box;min-width:0;min-height:0}*[hidden],.hidden{display:none!important}.invisible{visibility:hidden!important}svg{fill:currentColor}.vbox{display:flex;flex-direction:column;flex:auto;position:relative}.fill{position:absolute;top:0;right:0;bottom:0;left:0}.hbox{display:flex;flex:auto;position:relative}.spacer{flex:auto}.codicon-check{color:var(--vscode-charts-green)}.codicon-error{color:var(--vscode-errorForeground)}.codicon-warning{color:var(--vscode-list-warningForeground)}.codicon-circle-outline{color:var(--vscode-disabledForeground)}input[type=text],input[type=search]{color:var(--vscode-input-foreground);background-color:var(--vscode-input-background);border:none;outline:none}body.dark-mode ::-webkit-scrollbar{width:10px}body.dark-mode ::-webkit-scrollbar-thumb{background-color:#555}body.dark-mode ::-webkit-scrollbar-track{background-color:#333}body.dark-mode ::-webkit-scrollbar-thumb:hover{background-color:#777}body.dark-mode ::-webkit-scrollbar-track:hover{background-color:#444}.codicon-loading{animation:spin 1s infinite linear}::placeholder{color:var(--vscode-input-placeholderForeground)}@keyframes spin{to{transform:rotate(360deg)}}@font-face{font-family:codicon;src:url(./codicon.DCmgc-ay.ttf) format("truetype")}.codicon{font: 16px/1 codicon;flex:none;display:inline-block;text-decoration:none;text-rendering:auto;text-align:center;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.codicon-add:before{content:""}.codicon-plus:before{content:""}.codicon-gist-new:before{content:""}.codicon-repo-create:before{content:""}.codicon-lightbulb:before{content:""}.codicon-light-bulb:before{content:""}.codicon-repo:before{content:""}.codicon-repo-delete:before{content:""}.codicon-gist-fork:before{content:""}.codicon-repo-forked:before{content:""}.codicon-git-pull-request:before{content:""}.codicon-git-pull-request-abandoned:before{content:""}.codicon-record-keys:before{content:""}.codicon-keyboard:before{content:""}.codicon-tag:before{content:""}.codicon-git-pull-request-label:before{content:""}.codicon-tag-add:before{content:""}.codicon-tag-remove:before{content:""}.codicon-person:before{content:""}.codicon-person-follow:before{content:""}.codicon-person-outline:before{content:""}.codicon-person-filled:before{content:""}.codicon-git-branch:before{content:""}.codicon-git-branch-create:before{content:""}.codicon-git-branch-delete:before{content:""}.codicon-source-control:before{content:""}.codicon-mirror:before{content:""}.codicon-mirror-public:before{content:""}.codicon-star:before{content:""}.codicon-star-add:before{content:""}.codicon-star-delete:before{content:""}.codicon-star-empty:before{content:""}.codicon-comment:before{content:""}.codicon-comment-add:before{content:""}.codicon-alert:before{content:""}.codicon-warning:before{content:""}.codicon-search:before{content:""}.codicon-search-save:before{content:""}.codicon-log-out:before{content:""}.codicon-sign-out:before{content:""}.codicon-log-in:before{content:""}.codicon-sign-in:before{content:""}.codicon-eye:before{content:""}.codicon-eye-unwatch:before{content:""}.codicon-eye-watch:before{content:""}.codicon-circle-filled:before{content:""}.codicon-primitive-dot:before{content:""}.codicon-close-dirty:before{content:""}.codicon-debug-breakpLine truncated
|
||||
+1
@@ -0,0 +1 @@
|
||||
.drop-target{display:flex;align-items:center;justify-content:center;flex:auto;flex-direction:column;background-color:var(--vscode-editor-background);position:absolute;top:0;right:0;bottom:0;left:0;z-index:100;line-height:24px}body .drop-target{background:#fffc}body.dark-mode .drop-target{background:#000c}.drop-target .title{font-size:24px;font-weight:700;margin-bottom:30px}.drop-target .processing-error{font-size:24px;color:#e74c3c;font-weight:700;text-align:center;margin:30px}.drop-target input{margin-top:50px}.drop-target button{color:#fff;background-color:#007acc;padding:8px 12px;border:none;margin:30px 0;cursor:pointer}.progress-dialog{width:400px;top:0;right:0;bottom:0;left:0;border:none;outline:none;background-color:var(--vscode-sideBar-background)}.progress-dialog::backdrop{background-color:#0006}.progress-content{padding:16px}.progress-content .title{background-color:unset;font-size:18px;font-weight:700;padding:0}.progress-wrapper{background-color:var(--vscode-commandCenter-activeBackground);width:100%;margin-top:16px;margin-bottom:8px}.inner-progress{background-color:var(--vscode-progressBar-background);height:4px}.header{display:flex;background-color:#000;flex:none;flex-basis:48px;line-height:48px;font-size:16px;color:#ccc}.workbench-loader{contain:size}.workbench-loader .header .toolbar-button{margin:12px;padding:8px 4px}.workbench-loader .logo{margin-left:16px;display:flex;align-items:center}.workbench-loader .logo img{height:32px;width:32px;pointer-events:none;flex:none}.workbench-loader .product{font-weight:600;margin-left:16px;flex:none}.workbench-loader .header .title{margin-left:16px;overflow:hidden;text-overflow:ellipsis;text-wrap:nowrap}html,body{min-width:550px;min-height:450px;overflow:auto}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
import{r,j as e,T as z,D as I,M as k,a as A,W as O,b as F,c as V,d as $}from"./assets/defaultSettingsView-Do_wwdKw.js";const M=({className:n,style:o,open:s,isModal:a,width:l,verticalOffset:m,requestClose:u,anchor:x,dataTestId:p,children:T})=>{const g=r.useRef(null),[E,b]=r.useState(0);let j=o;if(x!=null&&x.current){const h=x.current.getBoundingClientRect();j={position:"fixed",margin:0,top:h.bottom+(m??0),left:G(h,l??0),width:l,zIndex:1,...o}}return r.useEffect(()=>{const h=y=>{!g.current||!(y.target instanceof Node)||g.current.contains(y.target)||u==null||u()},L=y=>{y.key==="Escape"&&(u==null||u())};return s?(document.addEventListener("mousedown",h),document.addEventListener("keydown",L),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("keydown",L)}):()=>{}},[s,u]),r.useEffect(()=>{const h=()=>b(L=>L+1);return window.addEventListener("resize",h),()=>{window.removeEventListener("resize",h)}},[]),r.useLayoutEffect(()=>{g.current&&(s?a?g.current.showModal():g.current.show():g.current.close())},[s,a]),e.jsx("dialog",{ref:g,style:j,className:n,"data-testid":p,children:T})},G=(n,o)=>{const s=U(n,o,"left");if(s.inBounds)return s.value;const a=U(n,o,"right");return a.inBounds?a.value:s.value},U=(n,o,s)=>{const a=document.documentElement.clientWidth;if(s==="left"){const l=n.left;return{value:l,inBounds:l+o<=a}}else return{value:n.right-o,inBounds:n.right-o>=0}},H=()=>{const n=r.useRef(null),[o,s]=r.useState(!1);return e.jsxs(e.Fragment,{children:[e.jsx(z,{ref:n,icon:"settings-gear",title:"Settings",onClick:()=>s(a=>!a)}),e.jsx(M,{style:{backgroundColor:"var(--vscode-sideBar-background)",padding:"4px 8px"},open:o,width:200,verticalOffset:8,requestClose:()=>s(!1),anchor:n,dataTestId:"settings-toolbar-dialog",children:e.jsx(I,{})})]})},K=()=>{const[n,o]=r.useState(!1),[s,a]=r.useState([]),[l,m]=r.useState([]),[u,x]=r.useState(W),[p,T]=r.useState({done:0,total:0}),[g,E]=r.useState(!1),[b,j]=r.useState(null),[h,L]=r.useState(null),[y,N]=r.useState(!1),S=r.useCallback(t=>{const c=[],d=[],i=new URL(window.location.href);for(let f=0;f<t.length;f++){const w=t.item(f);if(!w)continue;const P=URL.createObjectURL(w);c.push(P),d.push(w.name),i.searchParams.append("trace",P),i.searchParams.append("traceFileName",w.name)}const v=i.toString();window.history.pushState({},"",v),a(c),m(d),E(!1),j(null)},[]);r.useEffect(()=>{const t=async c=>{var d;if((d=c.clipboardData)!=null&&d.files.length){for(const i of c.clipboardData.files)if(i.type!=="application/zip")return;c.preventDefault(),S(c.clipboardData.files)}};return document.addEventListener("paste",t),()=>document.removeEventListener("paste",t)}),r.useEffect(()=>{const t=c=>{const{method:d,params:i}=c.data;if(d!=="load"||!((i==null?void 0:i.trace)instanceof Blob))return;const v=new File([i.trace],"trace.zip",{type:"application/zip"}),f=new DataTransfer;f.items.add(v),S(f.files)};return window.addEventListener("message",t),()=>window.removeEventListener("message",t)});const B=r.useCallback(t=>{t.preventDefault(),S(t.dataTransfer.files)},[S]),C=r.useCallback(t=>{t.preventDefault(),t.target.files&&S(t.target.files)},[S]);r.useEffect(()=>{const t=new URL(window.location.href).searchParams,c=t.getAll("trace");o(t.has("isServer"));for(const d of c)if(d.startsWith("file:")){L(d||null);return}if(t.has("isServer")){const d=new URLSearchParams(window.location.search).get("ws"),i=new URL(`../${d}`,window.location.toString());i.protocol=window.location.protocol==="https:"?"wss:":"ws:";const v=new A(new O(i));v.onLoadTraceRequested(async f=>{a(f.traceUrl?[f.traceUrl]:[]),E(!1),j(null)}),v.initialize({}).catch(()=>{})}else c.some(d=>d.startsWith("blob:"))||a(c)},[]),r.useEffect(()=>{(async()=>{if(s.length){const t=i=>{i.data.method==="progress"&&T(i.data.params)};navigator.serviceWorker.addEventListener("message",t),T({done:0,total:1});const c=[];for(let i=0;i<s.length;i++){const v=s[i],f=new URLSearchParams;f.set("trace",v),l.length&&f.set("traceFileName",l[i]),f.set("limit",String(s.length));const w=await fetch(`contexts?${f.toString()}`);if(!w.ok){n||a([]),j((await w.json()).error);return}c.push(...await w.json())}navigator.serviceWorker.removeEventListener("message",t);const d=new k(c);T({done:0,total:0}),x(d)}else x(W)})()},[n,s,l]);const D=p.done!==p.total&&p.total!==0;r.useEffect(()=>{if(D){const t=setTimeout(()=>{N(!0)},200);return()=>clearTimeout(t)}else N(!1)},[D]);const R=!!(!n&&!g&&!h&&(!s.length||b));return e.jsxs("div",{className:"vbox workbench-loader",onDragOver:t=>{t.preventDefault(),E(!0)},children:[e.jsxs("div",{className:"hbox header",...R?{inert:"true"}:{},children:[e.jsx("div",{className:"logo",children:e.jsx("img",{src:"playwright-logo.svg",alt:"Playwright logo"})}),e.jsx("div",{className:"product",children:"Playwright"}),u.title&&e.jsx("div",{className:"title",children:u.title}),e.jsx("div",{className:"spacer"}),e.jsx(H,{})]}),e.jsx(F,{model:u,inert:R}),h&&e.jsxs("div",{className:"drop-target",children:[e.jsx("div",{children:"Trace Viewer uses
Line truncated
|
||||
Make sure to serve the Trace Viewer (${window.location}) via HTTPS or localhost.`);navigator.serviceWorker.register("sw.bundle.js"),navigator.serviceWorker.controller||await new Promise(l=>{navigator.serviceWorker.oncontrollerchange=()=>l()}),setInterval(function(){fetch("ping")},1e4)}const o=n.get("trace"),a=(o==null?void 0:o.endsWith(".json"))?e.jsx(_,{traceJson:o}):e.jsx(K,{});$.createRoot(document.querySelector("#root")).render(a)})();
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" translate="no">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="icon" href="./playwright-logo.svg" type="image/svg+xml">
|
||||
<link rel="manifest" href="./manifest.webmanifest">
|
||||
<title>Playwright Trace Viewer</title>
|
||||
<script type="module" crossorigin src="./index.BZPYnuWQ.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="./assets/defaultSettingsView-Do_wwdKw.js">
|
||||
<link rel="stylesheet" crossorigin href="./defaultSettingsView.DVJHpiGt.css">
|
||||
<link rel="stylesheet" crossorigin href="./index.BFsek2M6.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<dialog id="fallback-error">
|
||||
<p>The Playwright Trace Viewer must be loaded over the <code>http://</code> or <code>https://</code> protocols.</p>
|
||||
<p>For more information, please see the <a href="https://aka.ms/playwright/trace-viewer-file-protocol">docs</a>.</p>
|
||||
</dialog>
|
||||
<script>
|
||||
if (!/^https?:/.test(window.location.protocol)) {
|
||||
const fallbackErrorDialog = document.getElementById('fallback-error');
|
||||
const isTraceViewerInsidePlaywrightReport = window.location.protocol === 'file:' && window.location.pathname.endsWith('/trace/index.html');
|
||||
// Best-effort to show the report path in the dialog.
|
||||
if (isTraceViewerInsidePlaywrightReport) {
|
||||
const reportPath = (() => {
|
||||
const base = window.location.pathname.replace(/\/trace\/index\.html$/, '');
|
||||
if (navigator.platform === 'Win32')
|
||||
return base.replace(/^\//, '').replace(/\//g, '\\\\');
|
||||
return base;
|
||||
})();
|
||||
const reportLink = document.createElement('div');
|
||||
const command = `npx playwright show-report ${reportPath}`;
|
||||
reportLink.innerHTML = `You can open the report via <code>${command}</code> from your Playwright project. <button type="button">Copy Command</button>`;
|
||||
fallbackErrorDialog.insertBefore(reportLink, fallbackErrorDialog.children[1]);
|
||||
reportLink.querySelector('button').addEventListener('click', () => navigator.clipboard.writeText(command));
|
||||
}
|
||||
fallbackErrorDialog.show();
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
<svg width="400" height="400" viewBox="0 0 400 400" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M136.444 221.556C123.558 225.213 115.104 231.625 109.535 238.032C114.869 233.364 122.014 229.08 131.652 226.348C141.51 223.554 149.92 223.574 156.869 224.915V219.481C150.941 218.939 144.145 219.371 136.444 221.556ZM108.946 175.876L61.0895 188.484C61.0895 188.484 61.9617 189.716 63.5767 191.36L104.153 180.668C104.153 180.668 103.578 188.077 98.5847 194.705C108.03 187.559 108.946 175.876 108.946 175.876ZM149.005 288.347C81.6582 306.486 46.0272 228.438 35.2396 187.928C30.2556 169.229 28.0799 155.067 27.5 145.928C27.4377 144.979 27.4665 144.179 27.5336 143.446C24.04 143.657 22.3674 145.473 22.7077 150.721C23.2876 159.855 25.4633 174.016 30.4473 192.721C41.2301 233.225 76.8659 311.273 144.213 293.134C158.872 289.185 169.885 281.992 178.152 272.81C170.532 279.692 160.995 285.112 149.005 288.347ZM161.661 128.11V132.903H188.077C187.535 131.206 186.989 129.677 186.447 128.11H161.661Z" fill="#2D4552"/>
|
||||
<path d="M193.981 167.584C205.861 170.958 212.144 179.287 215.465 186.658L228.711 190.42C228.711 190.42 226.904 164.623 203.57 157.995C181.741 151.793 168.308 170.124 166.674 172.496C173.024 167.972 182.297 164.268 193.981 167.584ZM299.422 186.777C277.573 180.547 264.145 198.916 262.535 201.255C268.89 196.736 278.158 193.031 289.837 196.362C301.698 199.741 307.976 208.06 311.307 215.436L324.572 219.212C324.572 219.212 322.736 193.41 299.422 186.777ZM286.262 254.795L176.072 223.99C176.072 223.99 177.265 230.038 181.842 237.869L274.617 263.805C282.255 259.386 286.262 254.795 286.262 254.795ZM209.867 321.102C122.618 297.71 133.166 186.543 147.284 133.865C153.097 112.156 159.073 96.0203 164.029 85.204C161.072 84.5953 158.623 86.1529 156.203 91.0746C150.941 101.747 144.212 119.124 137.7 143.45C123.586 196.127 113.038 307.29 200.283 330.682C241.406 341.699 273.442 324.955 297.323 298.659C274.655 319.19 245.714 330.701 209.867 321.102Z" fill="#2D4552"/>
|
||||
<path d="M161.661 262.296V239.863L99.3324 257.537C99.3324 257.537 103.938 230.777 136.444 221.556C146.302 218.762 154.713 218.781 161.661 220.123V128.11H192.869C189.471 117.61 186.184 109.526 183.423 103.909C178.856 94.612 174.174 100.775 163.545 109.665C156.059 115.919 137.139 129.261 108.668 136.933C80.1966 144.61 57.179 142.574 47.5752 140.911C33.9601 138.562 26.8387 135.572 27.5049 145.928C28.0847 155.062 30.2605 169.224 35.2445 187.928C46.0272 228.433 81.663 306.481 149.01 288.342C166.602 283.602 179.019 274.233 187.626 262.291H161.661V262.296ZM61.0848 188.484L108.946 175.876C108.946 175.876 107.551 194.288 89.6087 199.018C71.6614 203.743 61.0848 188.484 61.0848 188.484Z" fill="#E2574C"/>
|
||||
<path d="M341.786 129.174C329.345 131.355 299.498 134.072 262.612 124.185C225.716 114.304 201.236 97.0224 191.537 88.8994C177.788 77.3834 171.74 69.3802 165.788 81.4857C160.526 92.163 153.797 109.54 147.284 133.866C133.171 186.543 122.623 297.706 209.867 321.098C297.093 344.47 343.53 242.92 357.644 190.238C364.157 165.917 367.013 147.5 367.799 135.625C368.695 122.173 359.455 126.078 341.786 129.174ZM166.497 172.756C166.497 172.756 180.246 151.372 203.565 158C226.899 164.628 228.706 190.425 228.706 190.425L166.497 172.756ZM223.42 268.713C182.403 256.698 176.077 223.99 176.077 223.99L286.262 254.796C286.262 254.791 264.021 280.578 223.42 268.713ZM262.377 201.495C262.377 201.495 276.107 180.126 299.422 186.773C322.736 193.411 324.572 219.208 324.572 219.208L262.377 201.495Z" fill="#2EAD33"/>
|
||||
<path d="M139.88 246.04L99.3324 257.532C99.3324 257.532 103.737 232.44 133.607 222.496L110.647 136.33L108.663 136.933C80.1918 144.611 57.1742 142.574 47.5704 140.911C33.9554 138.563 26.834 135.572 27.5001 145.929C28.08 155.063 30.2557 169.224 35.2397 187.929C46.0225 228.433 81.6583 306.481 149.005 288.342L150.989 287.719L139.88 246.04ZM61.0848 188.485L108.946 175.876C108.946 175.876 107.551 194.288 89.6087 199.018C71.6615 203.743 61.0848 188.485 61.0848 188.485Z" fill="#D65348"/>
|
||||
<path d="M225.27 269.163L223.415 268.712C182.398 256.698 176.072 223.99 176.072 223.99L232.89 239.872L262.971 124.281L262.607 124.185C225.711 114.304 201.232 97.0224 191.532 88.8994C177.783 77.3834 171.735 69.3802 165.783 81.4857C160.526 92.163 153.797 109.54 147.284 133.866C133.171 186.543 122.623 297.706 209.867 321.097L211.655 321.5L225.27 269.163ZM166.497 172.756C166.497 172.756 180.246 151.372 203.565 158C226.899 164.628 228.706 190.425 228.706 190.425L166.497 172.756Z" fill="#1D8D22"/>
|
||||
<path d="M141.946 245.451L131.072 248.537C133.641 263.019 138.169 276.917 145.276 289.195C146.513 288.922 147.74 288.687 149 288.342C152.302 287.451 155.364 286.348 158.312 285.145C150.371 273.361 145.118 259.789 141.946 245.451ZM137.7 143.451C132.112 164.307 127.113 194.326 128.489 224.436C130.952 223.367 133.554 222.371 136.444 221.551L138.457 221.101C136.003 188.939 141.308 156.165 147.284 133.866C148.799 128.225 150.318 122.978 151.832 118.085C149.393 119.637 146.767 121.228 143.776 122.867C141.759 129.093 139.722 135.898 137.7 143.451Z" fill="#C04B41"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.9 KiB |
+21
@@ -0,0 +1,21 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<body>
|
||||
<script>
|
||||
(async () => {
|
||||
if (!navigator.serviceWorker)
|
||||
throw new Error(`Service workers are not supported.\nMake sure to serve the Trace Viewer (${window.location}) via HTTPS or localhost.`);
|
||||
navigator.serviceWorker.register('sw.bundle.js');
|
||||
if (!navigator.serviceWorker.controller)
|
||||
await new Promise(f => navigator.serviceWorker.oncontrollerchange = f);
|
||||
const traceUrl = new URL(location.href).searchParams.get('trace');
|
||||
const params = new URLSearchParams();
|
||||
params.set('trace', traceUrl);
|
||||
await fetch('contexts?' + params.toString()).then(r => r.json());
|
||||
await location.reload();
|
||||
})();
|
||||
</script>
|
||||
<script src="stall.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
+3
@@ -0,0 +1,3 @@
|
||||
var Ys=Object.defineProperty;var Vs=(n,t,e)=>t in n?Ys(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var L=(n,t,e)=>Vs(n,typeof t!="symbol"?t+"":t,e);function Gs(n,t){const e=new Array(t.length).fill(0);return new Array(t.length).fill(0).map((s,r)=>(i,a)=>{e[r]=i/a*t[r]*1e3,n(e.reduce((c,l)=>c+l,0),1e3)})}const vn={"&":"&","<":"<",">":">",'"':""","'":"'"};function Zs(n){return n.replace(/[&<>"']/ug,t=>vn[t])}function Ks(n){return n.replace(/[&<]/ug,t=>vn[t])}function Lt(n,t,e){return n.find((s,r)=>{if(r===n.length-1)return!0;const i=n[r+1];return Math.abs(t(s)-e)<Math.abs(t(i)-e)})}function Ln(n){return Array.isArray(n)&&typeof n[0]=="string"}function Xs(n){return Array.isArray(n)&&Array.isArray(n[0])}class $s{constructor(t,e,s,r,i){L(this,"_htmlCache");L(this,"_snapshots");L(this,"_index");L(this,"snapshotName");L(this,"_resources");L(this,"_snapshot");L(this,"_callId");L(this,"_screencastFrames");this._htmlCache=t,this._resources=e,this._snapshots=s,this._index=i,this._snapshot=s[i],this._callId=s[i].callId,this._screencastFrames=r,this.snapshotName=s[i].snapshotName}snapshot(){return this._snapshots[this._index]}viewport(){return this._snapshots[this._index].viewport}closestScreenshot(){var r;const{wallTime:t,timestamp:e}=this.snapshot(),s=t&&((r=this._screencastFrames[0])!=null&&r.frameSwapWallTime)?Lt(this._screencastFrames,i=>i.frameSwapWallTime,t):Lt(this._screencastFrames,i=>i.timestamp,e);return s==null?void 0:s.sha1}render(){const t=[],e=(i,a,c,l)=>{if(typeof i=="string"){c==="STYLE"||c==="style"?t.push(rr(tr(i))):t.push(Ks(i));return}if(Xs(i)){const _=a-i[0][0];if(_>=0&&_<=a){const f=Qs(this._snapshots[_]),b=i[0][1];if(b>=0&&b<f.length)return e(f[b],_,c,l)}}else if(Ln(i)){const[_,f,...b]=i,h=_==="NOSCRIPT"?"X-NOSCRIPT":_,S=Object.entries(f||{});t.push("<",h);const C="__playwright_current_src__",u=h==="IFRAME"||h==="FRAME",o=h==="A",d=h==="IMG",y=d&&S.some(m=>m[0]===C),g=h==="SOURCE"&&c==="PICTURE"&&(l==null?void 0:l.some(m=>m[0]===C));for(const[m,E]of S){let p=m;u&&m.toLowerCase()==="src"&&(p="__playwright_src__"),d&&m===C&&(p="src"),["src","srcset"].includes(m.toLowerCase())&&(y||g)&&(p="_"+p);let R=E;o&&m.toLowerCase()==="href"?R="link://"+E:(m.toLowerCase()==="href"||m.toLowerCase()==="src"||m===C)&&(R=rt(E)),t.push(" ",p,'="',Zs(R),'"')}t.push(">");for(const m of b)e(m,a,h,S);Js.has(h)||t.push("</",h,">");return}else return},s=this._snapshot;return{html:this._htmlCache.getOrCompute(this,()=>{e(s.html,this._index,void 0,void 0);const a=(s.doctype?`<!DOCTYPE ${s.doctype}>`:"")+["<style>*,*::before,*::after { visibility: hidden }</style>",`<script>${zs(this.viewport(),this._callId,this.snapshotName)}<\/script>`].join("")+t.join("");return{value:a,size:a.length}}),pageId:s.pageId,frameId:s.frameId,index:this._index}}resourceByUrl(t,e){const s=this._snapshot;let r,i;for(const c of this._resources){if(typeof c._monotonicTime=="number"&&c._monotonicTime>=s.timestamp)break;c.response.status!==304&&c.request.url===t&&c.request.method===e&&(c._frameref===s.frameId?r=c:i=c)}let a=r??i;if(a&&e.toUpperCase()==="GET"){for(const c of s.resourceOverrides)if(t===c.url&&c.sha1){a={...a,response:{...a.response,content:{...a.response.content,_sha1:c.sha1}}};break}}return a}}const Js=new Set(["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","MENUITEM","META","PARAM","SOURCE","TRACK","WBR"]);function Qs(n){if(!n._nodes){const t=[],e=s=>{if(typeof s=="string")t.push(s);else if(Ln(s)){const[,,...r]=s;for(const i of r)e(i);t.push(s)}};e(n.html),n._nodes=t}return n._nodes}function zs(n,...t){function e(s,r,...i){const a=new URLSearchParams(location.search),c=a.has("shouldPopulateCanvasFromScreenshot"),l=a.has("isUnderTest"),_={viewport:r,frames:new WeakMap};window.__playwright_frame_bounding_rects__=_;const f="Recorded click position in absolute coordinates did not match the center of the clicked element. This is likely due to a difference between the test runner and the trace viewer operating systems.",b=[],h=[],S=[],C=[];let u=window;for(;u!==u.parent&&!u.location.pathname.match(/\/page@[a-z0-9]+$/);)u=u.parent;const o=g=>{for(const m of g.querySelectorAll("[__playwright_scroll_top_]"))b.push(m);for(const m of g.querySelectorAll("[__playwright_scroll_left_]"))h.push(m);for(const m of g.querySelectorAll("[__playwright_value_]")){const E=m;E.type!=="file"&&(E.value=E.getAttribute("__playwright_value_")),m.removeAttribute("__playwright_value_")}for(const m of g.querySelectorAll("[__playwright_checked_]"))m.checked=m.getAttribute("__playwright_checked_")==="true",m.removeAttribute("__playwright_checked_");for(const m of g.querySelectorAll("[__playwright_selected_]"))m.selected=m.getAttribute("__playwright_selected_")==="true",m.removeAttribute("__playwright_selected_");for(const m of g.querySelectorAll("[__playwright_popover_open_]")){try{m.showPopover()}catch{}m.removeAttribute("__playwright_popover_open_")}for(const m of g.querySelectorAll("[__playwrigLine truncated
|
||||
(${e.toString()})(${it.toString()}, ${JSON.stringify(n)}${t.map(s=>`, "${s}"`).join("")})`}const Fn=["about:","blob:","data:","file:","ftp:","http:","https:","mailto:","sftp:","ws:","wss:"],Ft="http://playwright.bloburl/#";function rt(n){n.startsWith(Ft)&&(n=n.substring(Ft.length));try{const t=new URL(n);if(t.protocol==="javascript:"||t.protocol==="vbscript:")return"javascript:void(0)";const e=t.protocol==="blob:",s=t.protocol==="file:";if(!e&&!s&&Fn.includes(t.protocol))return n;const r="pw-"+t.protocol.slice(0,t.protocol.length-1);return s||(t.protocol="https:"),t.hostname=t.hostname?`${r}--${t.hostname}`:r,s&&(t.protocol="https:"),t.toString()}catch{return n}}const er=/url\(['"]?([\w-]+:)\/\//ig;function tr(n){return n.replace(er,(t,e)=>!(e==="blob:")&&!(e==="file:")&&Fn.includes(e)?t:t.replace(e+"//",`https://pw-${e.slice(0,-1)}--`))}const nr=/url\(\s*'([^']*)'\s*\)/ig,sr=/url\(\s*"([^"]*)"\s*\)/ig;function rr(n){const t=(e,s)=>s.includes("</")?e.replace(s,encodeURI(s)):e;return n.replace(nr,t).replace(sr,t)}function it(n){const t=new URL(n);return t.pathname.endsWith("/snapshot.html")?t.searchParams.get("r"):n}class ir{constructor(t,e){L(this,"_snapshotStorage");L(this,"_resourceLoader");L(this,"_snapshotIds",new Map);this._snapshotStorage=t,this._resourceLoader=e}serveSnapshot(t,e,s){const r=this._snapshot(t,e);if(!r)return new Response(null,{status:404});const i=r.render();return this._snapshotIds.set(s,r),new Response(i.html,{status:200,headers:{"Content-Type":"text/html; charset=utf-8"}})}async serveClosestScreenshot(t,e){const s=this._snapshot(t,e),r=s==null?void 0:s.closestScreenshot();return r?new Response(await this._resourceLoader(r)):new Response(null,{status:404})}serveSnapshotInfo(t,e){const s=this._snapshot(t,e);return this._respondWithJson(s?{viewport:s.viewport(),url:s.snapshot().frameUrl,timestamp:s.snapshot().timestamp,wallTime:s.snapshot().wallTime}:{error:"No snapshot found"})}_snapshot(t,e){const s=e.get("name");return this._snapshotStorage.snapshotByName(t,s)}_respondWithJson(t){return new Response(JSON.stringify(t),{status:200,headers:{"Cache-Control":"public, max-age=31536000","Content-Type":"application/json"}})}async serveResource(t,e,s){let r;const i=this._snapshotIds.get(s);for(const S of t)if(r=i==null?void 0:i.resourceByUrl(ar(S),e),r)break;if(!r)return new Response(null,{status:404});const a=r.response.content._sha1,c=a?await this._resourceLoader(a)||new Blob([]):new Blob([]);let l=r.response.content.mimeType;/^text\/|^application\/(javascript|json)/.test(l)&&!l.includes("charset")&&(l=`${l}; charset=utf-8`);const f=new Headers;l!=="x-unknown"&&f.set("Content-Type",l);for(const{name:S,value:C}of r.response.headers)f.set(S,C);f.delete("Content-Encoding"),f.delete("Access-Control-Allow-Origin"),f.set("Access-Control-Allow-Origin","*"),f.delete("Content-Length"),f.set("Content-Length",String(c.size)),f.set("Cache-Control","public, max-age=31536000");const{status:b}=r.response,h=b===101||b===204||b===205||b===304;return new Response(h?null:c,{headers:f,status:r.response.status,statusText:r.response.statusText})}}function ar(n){try{const t=new URL(n);return t.hash="",t.toString()}catch{return n}}function or(n){const t=new Map,{files:e,stacks:s}=n;for(const r of s){const[i,a]=r;t.set(`call@${i}`,a.map(c=>({file:e[c[0]],line:c[1],column:c[2],function:c[3]})))}return t}class cr{constructor(t){L(this,"_maxSize");L(this,"_map");L(this,"_size");this._maxSize=t,this._map=new Map,this._size=0}getOrCompute(t,e){if(this._map.has(t)){const r=this._map.get(t);return this._map.delete(t),this._map.set(t,r),r.value}const s=e();for(;this._map.size&&this._size+s.size>this._maxSize;){const[r,i]=this._map.entries().next().value;this._size-=i.size,this._map.delete(r)}return this._map.set(t,s),this._size+=s.size,s.value}}class lr{constructor(){L(this,"_frameSnapshots",new Map);L(this,"_cache",new cr(1e8));L(this,"_contextToResources",new Map)}addResource(t,e){e.request.url=rt(e.request.url),this._ensureResourcesForContext(t).push(e)}addFrameSnapshot(t,e,s){for(const c of e.resourceOverrides)c.url=rt(c.url);let r=this._frameSnapshots.get(e.frameId);r||(r={raw:[],renderers:[]},this._frameSnapshots.set(e.frameId,r),e.isMainFrame&&this._frameSnapshots.set(e.pageId,r)),r.raw.push(e);const i=this._ensureResourcesForContext(t),a=new $s(this._cache,i,r.raw,s,r.raw.length-1);return r.renderers.push(a),a}snapshotByName(t,e){const s=this._frameSnapshots.get(t);return s==null?void 0:s.renderers.find(r=>r.snapshotName===e)}snapshotsForTest(){return[...this._frameSnapshots.keys()]}finalize(){for(const t of this._contextToResources.values())t.sort((e,s)=>(e._monotonicTime||0)-(s._monotonicTime||0))}_ensureResourcesForContext(t){let e=this._contextToResources.get(t);return e||(e=[],this._contextToResources.set(t,e)),e}}class Un extends Error{constructor(t){super(t),this.name="TraceVersionError"}}const Ut=8;class fr{constructor(t,e){L(this,"_contextEntry");L(this,"_snapshotStorage");L(this,"_actionMap",new Map);L(
Line truncated
|
||||
`))this._appendEvent(e)}actions(){return[...this._actionMap.values()]}_pageEntry(t){let e=this._pageEntries.get(t);return e||(e={pageId:t,screencastFrames:[]},this._pageEntries.set(t,e),this._contextEntry.pages.push(e)),e}_appendEvent(t){if(!t)return;const e=this._modernize(JSON.parse(t));for(const s of e)this._innerAppendEvent(s)}_innerAppendEvent(t){const e=this._contextEntry;switch(t.type){case"context-options":{if(t.version>Ut)throw new Un("The trace was created by a newer version of Playwright and is not supported by this version of the viewer. Please use latest Playwright to open the trace.");this._version=t.version,e.origin=t.origin,e.browserName=t.browserName,e.channel=t.channel,e.title=t.title,e.platform=t.platform,e.wallTime=t.wallTime,e.startTime=t.monotonicTime,e.sdkLanguage=t.sdkLanguage,e.options=t.options,e.testIdAttributeName=t.testIdAttributeName,e.contextId=t.contextId??"";break}case"screencast-frame":{this._pageEntry(t.pageId).screencastFrames.push(t);break}case"before":{this._actionMap.set(t.callId,{...t,type:"action",endTime:0,log:[]});break}case"input":{const s=this._actionMap.get(t.callId);s.inputSnapshot=t.inputSnapshot,s.point=t.point;break}case"log":{const s=this._actionMap.get(t.callId);if(!s)return;s.log.push({time:t.time,message:t.message});break}case"after":{const s=this._actionMap.get(t.callId);s.afterSnapshot=t.afterSnapshot,s.endTime=t.endTime,s.result=t.result,s.error=t.error,s.attachments=t.attachments,s.annotations=t.annotations,t.point&&(s.point=t.point);break}case"action":{this._actionMap.set(t.callId,{...t,log:[]});break}case"event":{e.events.push(t);break}case"stdout":{e.stdio.push(t);break}case"stderr":{e.stdio.push(t);break}case"error":{e.errors.push(t);break}case"console":{e.events.push(t);break}case"resource-snapshot":this._snapshotStorage.addResource(this._contextEntry.contextId,t.snapshot),e.resources.push(t.snapshot);break;case"frame-snapshot":this._snapshotStorage.addFrameSnapshot(this._contextEntry.contextId,t.snapshot,this._pageEntry(t.snapshot.pageId).screencastFrames);break}"pageId"in t&&t.pageId&&this._pageEntry(t.pageId),(t.type==="action"||t.type==="before")&&(e.startTime=Math.min(e.startTime,t.startTime)),(t.type==="action"||t.type==="after")&&(e.endTime=Math.max(e.endTime,t.endTime)),t.type==="event"&&(e.startTime=Math.min(e.startTime,t.time),e.endTime=Math.max(e.endTime,t.time)),t.type==="screencast-frame"&&(e.startTime=Math.min(e.startTime,t.timestamp),e.endTime=Math.max(e.endTime,t.timestamp))}_processedContextCreatedEvent(){return this._version!==void 0}_modernize(t){let e=this._version??t.version??6,s=[t];for(;e<Ut;++e)s=this[`_modernize_${e}_to_${e+1}`].call(this,s);return s}_modernize_0_to_1(t){for(const e of t)e.type==="action"&&typeof e.metadata.error=="string"&&(e.metadata.error={error:{name:"Error",message:e.metadata.error}});return t}_modernize_1_to_2(t){var e;for(const s of t)s.type!=="frame-snapshot"||!s.snapshot.isMainFrame||(s.snapshot.viewport=((e=this._contextEntry.options)==null?void 0:e.viewport)||{width:1280,height:720});return t}_modernize_2_to_3(t){for(const e of t){if(e.type!=="resource-snapshot"||e.snapshot.request)continue;const s=e.snapshot;e.snapshot={_frameref:s.frameId,request:{url:s.url,method:s.method,headers:s.requestHeaders,postData:s.requestSha1?{_sha1:s.requestSha1}:void 0},response:{status:s.status,headers:s.responseHeaders,content:{mimeType:s.contentType,_sha1:s.responseSha1}},_monotonicTime:s.timestamp}}return t}_modernize_3_to_4(t){const e=[];for(const s of t){const r=this._modernize_event_3_to_4(s);r&&e.push(r)}return e}_modernize_event_3_to_4(t){var s,r,i,a;if(t.type!=="action"&&t.type!=="event")return t;const e=t.metadata;return e.internal||e.method.startsWith("tracing")?null:t.type==="event"?e.method==="__create__"&&e.type==="ConsoleMessage"?{type:"object",class:e.type,guid:e.params.guid,initializer:e.params.initializer}:{type:"event",time:e.startTime,class:e.type,method:e.method,params:e.params,pageId:e.pageId}:{type:"action",callId:e.id,startTime:e.startTime,endTime:e.endTime,apiName:e.apiName||e.type+"."+e.method,class:e.type,method:e.method,params:e.params,wallTime:e.wallTime||Date.now(),log:e.log,beforeSnapshot:(s=e.snapshots.find(c=>c.title==="before"))==null?void 0:s.snapshotName,inputSnapshot:(r=e.snapshots.find(c=>c.title==="input"))==null?void 0:r.snapshotName,afterSnapshot:(i=e.snapshots.find(c=>c.title==="after"))==null?void 0:i.snapshotName,error:(a=e.error)==null?void 0:a.error,result:e.result,point:e.point,pageId:e.pageId}}_modernize_4_to_5(t){const e=[];for(const s of t){const r=this._modernize_event_4_to_5(s);r&&e.push(r)}return e}_modernize_event_4_to_5(t){var e,s;if(t.type==="event"&&t.method==="__create__"&&t.class==="JSHandle"&&this._jsHandles.set(t.params.guid,t.params.initializer),t.type==="object"){if(t.class!=="ConsoleMessage")return null;const r=(e=t.initializer.args)==null?void 0:e.map(i=>{if(i.guid){const a=this._jsHandles.get(i.guid);return{preview:(a==null?void 0:a.preview)||""
Line truncated
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./assets/xtermModule-BoAIEibi.js","./xtermModule.Beg8tuEN.css"])))=>i.map(i=>d[i]);
|
||||
import{u as Mt,r as K,e as Dt,_ as Ft,f as Ot,g as At,j as o,R as d,E as Ut,s as vt,h as at,i as Wt,t as zt,m as Vt,k as Y,T as F,M as bt,b as Kt,l as $t,a as Ht,W as qt,S as Yt,D as Qt,c as Xt,d as Jt}from"./assets/defaultSettingsView-Do_wwdKw.js";var Zt={};class ot{constructor(t,e={}){this.isListing=!1,this._tests=new Map,this._rootSuite=new Q("","root"),this._options=e,this._reporter=t}reset(){this._rootSuite._entries=[],this._tests.clear()}dispatch(t){const{method:e,params:s}=t;if(e==="onConfigure"){this._onConfigure(s.config);return}if(e==="onProject"){this._onProject(s.project);return}if(e==="onBegin"){this._onBegin();return}if(e==="onTestBegin"){this._onTestBegin(s.testId,s.result);return}if(e==="onTestEnd"){this._onTestEnd(s.test,s.result);return}if(e==="onStepBegin"){this._onStepBegin(s.testId,s.resultId,s.step);return}if(e==="onAttach"){this._onAttach(s.testId,s.resultId,s.attachments);return}if(e==="onStepEnd"){this._onStepEnd(s.testId,s.resultId,s.step);return}if(e==="onError"){this._onError(s.error);return}if(e==="onStdIO"){this._onStdIO(s.type,s.testId,s.resultId,s.data,s.isBase64);return}if(e==="onEnd")return this._onEnd(s.result);if(e==="onExit")return this._onExit()}_onConfigure(t){var e,s;this._rootDir=t.rootDir,this._config=this._parseConfig(t),(s=(e=this._reporter).onConfigure)==null||s.call(e,this._config)}_onProject(t){let e=this._options.mergeProjects?this._rootSuite.suites.find(s=>s.project().name===t.name):void 0;e||(e=new Q(t.name,"project"),this._rootSuite._addSuite(e)),e._project=this._parseProject(t);for(const s of t.suites)this._mergeSuiteInto(s,e)}_onBegin(){var t,e;(e=(t=this._reporter).onBegin)==null||e.call(t,this._rootSuite)}_onTestBegin(t,e){var c,n;const s=this._tests.get(t);this._options.clearPreviousResultsWhenTestBegins&&(s.results=[]);const i=s._createTestResult(e.id);i.retry=e.retry,i.workerIndex=e.workerIndex,i.parallelIndex=e.parallelIndex,i.setStartTimeNumber(e.startTime),(n=(c=this._reporter).onTestBegin)==null||n.call(c,s,i)}_onTestEnd(t,e){var c,n,g;const s=this._tests.get(t.testId);s.timeout=t.timeout,s.expectedStatus=t.expectedStatus;const i=s.results.find(l=>l._id===e.id);i.duration=e.duration,i.status=e.status,i.errors=e.errors,i.error=(c=i.errors)==null?void 0:c[0],e.attachments&&(i.attachments=this._parseAttachments(e.attachments)),e.annotations&&(this._absoluteAnnotationLocationsInplace(e.annotations),i.annotations=e.annotations,s.annotations=e.annotations),(g=(n=this._reporter).onTestEnd)==null||g.call(n,s,i),i._stepMap=new Map}_onStepBegin(t,e,s){var _,a;const i=this._tests.get(t),c=i.results.find(h=>h._id===e),n=s.parentStepId?c._stepMap.get(s.parentStepId):void 0,g=this._absoluteLocation(s.location),l=new te(s,n,g,c);n?n.steps.push(l):c.steps.push(l),c._stepMap.set(s.id,l),(a=(_=this._reporter).onStepBegin)==null||a.call(_,i,c,l)}_onStepEnd(t,e,s){var g,l;const i=this._tests.get(t),c=i.results.find(_=>_._id===e),n=c._stepMap.get(s.id);n._endPayload=s,n.duration=s.duration,n.error=s.error,(l=(g=this._reporter).onStepEnd)==null||l.call(g,i,c,n)}_onAttach(t,e,s){this._tests.get(t).results.find(n=>n._id===e).attachments.push(...s.map(n=>({name:n.name,contentType:n.contentType,path:n.path,body:n.base64&&globalThis.Buffer?Buffer.from(n.base64,"base64"):void 0})))}_onError(t){var e,s;(s=(e=this._reporter).onError)==null||s.call(e,t)}_onStdIO(t,e,s,i,c){var _,a,h,v;const n=c?globalThis.Buffer?Buffer.from(i,"base64"):atob(i):i,g=e?this._tests.get(e):void 0,l=g&&s?g.results.find(u=>u._id===s):void 0;t==="stdout"?(l==null||l.stdout.push(n),(a=(_=this._reporter).onStdOut)==null||a.call(_,n,g,l)):(l==null||l.stderr.push(n),(v=(h=this._reporter).onStdErr)==null||v.call(h,n,g,l))}async _onEnd(t){var e,s;await((s=(e=this._reporter).onEnd)==null?void 0:s.call(e,{status:t.status,startTime:new Date(t.startTime),duration:t.duration}))}_onExit(){var t,e;return(e=(t=this._reporter).onExit)==null?void 0:e.call(t)}_parseConfig(t){const e={...se,...t};return this._options.configOverrides&&(e.configFile=this._options.configOverrides.configFile,e.reportSlowTests=this._options.configOverrides.reportSlowTests,e.quiet=this._options.configOverrides.quiet,e.reporter=[...this._options.configOverrides.reporter]),e}_parseProject(t){return{metadata:t.metadata,name:t.name,outputDir:this._absolutePath(t.outputDir),repeatEach:t.repeatEach,retries:t.retries,testDir:this._absolutePath(t.testDir),testIgnore:st(t.testIgnore),testMatch:st(t.testMatch),timeout:t.timeout,grep:st(t.grep),grepInvert:st(t.grepInvert),dependencies:t.dependencies,teardown:t.teardown,snapshotDir:this._absolutePath(t.snapshotDir),use:t.use}}_parseAttachments(t){return t.map(e=>({...e,body:e.base64&&globalThis.Buffer?Buffer.from(e.base64,"base64"):void 0}))}_mergeSuiteInto(t,e){let s=e.suites.find(i=>i.title===t.title);s||(s=new Q(t.title,e.type==="project"?"file":"describe"),e._addSuite(s)),s.location=this._absoluteLocation(t.location),t.entries.forEach(i=>{"testId"in i?this._mergeTestInto(i,s):this._mergeSuiteInto(iLine truncated
|
||||
Projects: `+v,onClick:()=>_(!l),children:[o.jsx("span",{className:"filter-label",children:"Status:"})," ",h,o.jsx("span",{className:"filter-label",children:"Projects:"})," ",v]}),l&&o.jsxs("div",{className:"hbox",style:{marginLeft:14,maxHeight:200,overflowY:"auto"},children:[o.jsx("div",{className:"filter-list",role:"list","data-testid":"status-filters",children:[...e.entries()].map(([u,b])=>o.jsx("div",{className:"filter-entry",role:"listitem",children:o.jsxs("label",{children:[o.jsx("input",{type:"checkbox",checked:b,onChange:()=>{const S=new Map(e);S.set(u,!S.get(u)),s(S)}}),o.jsx("div",{children:u})]})},u))}),o.jsx("div",{className:"filter-list",role:"list","data-testid":"project-filters",children:[...i.entries()].map(([u,b])=>o.jsx("div",{className:"filter-entry",role:"listitem",children:o.jsxs("label",{children:[o.jsx("input",{type:"checkbox",checked:b,onChange:()=>{var C;const S=new Map(i);S.set(u,!S.get(u)),c(S);const B=(C=n==null?void 0:n.config)==null?void 0:C.configFile;B&&vt.setObject(B+":projects",[...S.entries()].filter(([T,L])=>L).map(([T])=>T))}}),o.jsx("div",{children:u||"untitled"})]})},u))})]})]})},ue=({tag:r,style:t,onClick:e})=>o.jsx("span",{className:at("tag",`tag-color-${de(r)}`),onClick:e,style:{margin:"6px 0 0 6px",...t},title:`Click to filter by tag: ${r}`,children:r});function de(r){let t=0;for(let e=0;e<r.length;e++)t=r.charCodeAt(e)+((t<<8)-t);return Math.abs(t%6)}const he=Wt,fe=({filterText:r,testModel:t,testServerConnection:e,testTree:s,runTests:i,runningState:c,watchAll:n,watchedTreeIds:g,setWatchedTreeIds:l,isLoading:_,onItemSelected:a,requestedCollapseAllCount:h,requestedExpandAllCount:v,setFilterText:u,onRevealSource:b})=>{const[S,B]=d.useState({expandedItems:new Map}),[C,T]=d.useState(),[L,O]=d.useState(h),[$,N]=d.useState(v);d.useEffect(()=>{if(L!==h){S.expandedItems.clear();for(const x of s.flatTreeItems())S.expandedItems.set(x.id,!1);O(h),T(void 0),B({...S});return}if($!==v){S.expandedItems.clear();for(const x of s.flatTreeItems())S.expandedItems.set(x.id,!0);N(v),T(void 0),B({...S});return}if(!c||c.itemSelectedByUser)return;let f;const E=x=>{var M;x.children.forEach(E),!f&&x.status==="failed"&&(x.kind==="test"&&c.testIds.has(x.test.id)||x.kind==="case"&&c.testIds.has((M=x.tests[0])==null?void 0:M.id))&&(f=x)};E(s.rootItem),f&&T(f.id)},[c,T,s,L,O,h,$,N,v,S,B]);const R=d.useMemo(()=>{if(C)return s.treeItemById(C)},[C,s]);d.useEffect(()=>{if(!t)return;const f=pe(R,t);let E;(R==null?void 0:R.kind)==="test"?E=R.test:(R==null?void 0:R.kind)==="case"&&R.tests.length===1&&(E=R.tests[0]),a({treeItem:R,testCase:E,testFile:f})},[t,R,a]),d.useEffect(()=>{if(!_)if(n)e==null||e.watchNoReply({fileNames:s.fileNames()});else{const f=new Set;for(const E of g.value){const x=s.treeItemById(E),M=x==null?void 0:x.location.file;M&&f.add(M)}e==null||e.watchNoReply({fileNames:[...f]})}},[_,s,n,g,e]);const J=f=>{T(f.id),i("bounce-if-busy",s.collectTestIds(f))},H=(f,E)=>{if(f.preventDefault(),f.stopPropagation(),f.metaKey||f.ctrlKey){const x=r.split(" ");x.includes(E)?u(x.filter(M=>M!==E).join(" ").trim()):u((r+" "+E).trim())}else u((r.split(" ").filter(x=>!x.startsWith("@")).join(" ")+" "+E).trim())};return o.jsx(he,{name:"tests",treeState:S,setTreeState:B,rootItem:s.rootItem,dataTestId:"test-tree",render:f=>{const E=f.id.replace(/[^\w\d-_]/g,"-"),x=E+"-label",M=E+"-time";return o.jsxs("div",{className:"hbox ui-mode-tree-item","aria-labelledby":`${x} ${M}`,children:[o.jsxs("div",{id:x,className:"ui-mode-tree-item-title",children:[o.jsx("span",{children:f.title}),f.kind==="case"?f.tags.map(q=>o.jsx(ue,{tag:q.slice(1),onClick:Z=>H(Z,q)},q)):null]}),!!f.duration&&f.status!=="skipped"&&o.jsx("div",{id:M,className:"ui-mode-tree-item-time",children:Vt(f.duration)}),o.jsxs(Y,{noMinHeight:!0,noShadow:!0,children:[o.jsx(F,{icon:"play",title:"Run",onClick:()=>J(f),disabled:!!c&&!c.completed}),o.jsx(F,{icon:"go-to-file",title:"Show source",onClick:b,style:f.kind==="group"&&f.subKind==="folder"?{visibility:"hidden"}:{}}),!n&&o.jsx(F,{icon:"eye",title:"Watch",onClick:()=>{g.value.has(f.id)?g.value.delete(f.id):g.value.add(f.id),l({...g})},toggled:g.value.has(f.id)})]})]})},icon:f=>zt(f.status),title:f=>f.title,selectedItem:R,onAccepted:J,onSelected:f=>{c&&(c.itemSelectedByUser=!0),T(f.id)},isError:f=>f.kind==="group"?f.hasLoadErrors:!1,autoExpandDepth:r?5:1,noItemsMessage:_?"Loading…":"No tests"})};function pe(r,t){if(!(!r||!t))return{file:r.location.file,line:r.location.line,column:r.location.column,source:{errors:t.loadErrors.filter(e=>{var s;return((s=e.location)==null?void 0:s.file)===r.location.file}).map(e=>({line:e.location.line,message:e.message})),content:void 0}}}function ge(r){return`.playwright-artifacts-${r}`}const me=({item:r,rootDir:t,onOpenExternally:e,revealSource:s,pathSeparator:i})=>{var h,v;const[c,n]=d.useState(void 0),[g,l]=d.useState(0),_=d.useRef(null),{outputDir:a}=d.useMemo(()=>({outputDir:r.testCase?_e(r.testCase):void 0}),[r]);return d.useEffect(()=>{var B,C;_.current&&clearT
Line truncated
|
||||
`),c(!0)},pathSeparator:I.pathSeparator});return Et(m),h(void 0),L(!0),f({value:new Set}),(async()=>{try{await w.initialize({interceptStdio:!0,watchTestDirs:!0});const{status:k,report:y}=await w.runGlobalSetup({});if(m.processGlobalReport(y),k!=="passed")return;const P=await w.listTests({projects:I.projects,locations:I.args,grep:I.grep,grepInvert:I.grepInvert});m.processListReport(P.report),w.onReport(D=>{m.processTestReportEvent(D)});const{hasBrowsers:U}=await w.checkBrowsers({});ut(U)}finally{L(!1)}})(),()=>{clearTimeout(p)}},[w]),d.useEffect(()=>{if(!a)return;const{config:p,rootSuite:m}=a,k=p.configFile?vt.getObject(p.configFile+":projects",void 0):void 0,y=new Map(l);for(const P of y.keys())m.suites.find(U=>U.title===P)||y.delete(P);for(const P of m.suites)y.has(P.title)||y.set(P.title,!!(k!=null&&k.includes(P.title)));!k&&y.size&&![...y.values()].includes(!0)&&y.set(y.entries().next().value[0],!0),(l.size!==y.size||[...l].some(([P,U])=>y.get(P)!==U))&&_(y)},[l,a]),d.useEffect(()=>{N&&(a!=null&&a.progress)?u(a.progress):a||u(void 0)},[a,N]);const{testTree:Pt}=d.useMemo(()=>{if(!a)return{testTree:new nt("",new Q("","root"),[],l,I.pathSeparator)};const p=new nt("",a.rootSuite,a.loadErrors,l,I.pathSeparator);return p.filterTree(r,n,N?O==null?void 0:O.testIds:void 0),p.sortAndPropagateStatus(),p.shortenRoot(),p.flattenForSingleProject(),C(p.testIds()),{testTree:p}},[r,a,n,l,C,O,N]),V=d.useCallback((p,m)=>{!w||!a||p==="bounce-if-busy"&&N||(x.current=new Set([...x.current,...m]),E.current=E.current.then(async()=>{var P,U,D;const k=x.current;if(x.current=new Set,!k.size)return;{for(const j of((P=a.rootSuite)==null?void 0:P.allTests())||[])if(k.has(j.id)){j.results=[];const W=j._createTestResult("pending");W[X]="scheduled"}h({...a})}const y=" ["+new Date().toLocaleTimeString()+"]";z.write("\x1B[2m—".repeat(Math.max(0,_t.cols-y.length))+y+"\x1B[22m"),u({total:0,passed:0,failed:0,skipped:0}),$({testIds:k}),await w.runTests({locations:I.args,grep:I.grep,grepInvert:I.grepInvert,testIds:[...k],projects:[...l].filter(([j,W])=>W).map(([j])=>j),...ht?{workers:"1"}:{},...ft?{headed:!0}:{},...pt?{updateSnapshots:"all"}:{},reporters:I.reporters,trace:"on"});for(const j of((U=a.rootSuite)==null?void 0:U.allTests())||[])((D=j.results[0])==null?void 0:D.duration)===-1&&(j.results=[]);h({...a}),$(j=>j?{...j,completed:!0}:void 0)}))},[l,N,a,w,ht,ft,pt]);d.useEffect(()=>{if(!w||!G)return;const p=w.onTestFilesChanged(async m=>{if(E.current=E.current.then(async()=>{L(!0);try{const D=await w.listTests({projects:I.projects,locations:I.args,grep:I.grep,grepInvert:I.grepInvert});G.processListReport(D.report)}catch(D){console.log(D)}finally{L(!1)}}),await E.current,m.testFiles.length===0)return;const k=G.asModel(),y=new nt("",k.rootSuite,k.loadErrors,l,I.pathSeparator),P=[],U=new Set(m.testFiles);if(R){const D=j=>{const W=j.location.file;W&&U.has(W)&&P.push(...y.collectTestIds(j)),j.kind==="group"&&j.subKind==="folder"&&j.children.forEach(D)};D(y.rootItem)}else for(const D of H.value){const j=y.treeItemById(D),W=j==null?void 0:j.location.file;W&&U.has(W)&&P.push(...y.collectTestIds(j))}V("queue-if-busy",new Set(P))});return()=>p.dispose()},[V,w,R,H,G,l]),d.useEffect(()=>{if(!w)return;const p=m=>{m.code==="Backquote"&&m.ctrlKey?(m.preventDefault(),s(!e)):m.code==="F5"&&m.shiftKey?(m.preventDefault(),w==null||w.stopTestsNoReply({})):m.code==="F5"&&(m.preventDefault(),V("bounce-if-busy",B))};return addEventListener("keydown",p),()=>{removeEventListener("keydown",p)}},[V,et,w,B,e]);const it=d.useRef(null),Nt=d.useCallback(p=>{var m;p.preventDefault(),p.stopPropagation(),(m=it.current)==null||m.showModal()},[]),rt=d.useCallback(p=>{var m;p.preventDefault(),p.stopPropagation(),(m=it.current)==null||m.close()},[]),Lt=d.useCallback(p=>{rt(p),s(!0),w==null||w.installBrowsers({}).then(async()=>{s(!1);const{hasBrowsers:m}=await(w==null?void 0:w.checkBrowsers({}));ut(m)})},[rt,w]);return o.jsxs("div",{className:"vbox ui-mode",children:[!ct&&o.jsxs("dialog",{ref:it,children:[o.jsxs("div",{className:"title",children:[o.jsx("span",{className:"codicon codicon-lightbulb"}),"Install browsers"]}),o.jsxs("div",{className:"body",children:["Playwright did not find installed browsers.",o.jsx("br",{}),"Would you like to run `playwright install`?",o.jsx("br",{}),o.jsx("button",{className:"button",onClick:Lt,children:"Install"}),o.jsx("button",{className:"button secondary",onClick:rt,children:"Dismiss"})]})]}),Tt&&o.jsxs("div",{className:"disconnected",children:[o.jsx("div",{className:"title",children:"UI Mode disconnected"}),o.jsxs("div",{children:[o.jsx("a",{href:"#",onClick:()=>window.location.href="/",children:"Reload the page"})," to reconnect"]})]}),o.jsx(Yt,{sidebarSize:250,minSidebarSize:150,orientation:"horizontal",sidebarIsFirst:!0,settingName:"testListSidebar",main:o.jsxs("div",{className:"vbox",children:[o.jsxs("div",{className:at("vbox",!e&&"hidden"),children:[o.jsxs(Y,{children:[o.jsx("div",{className:"section-title",style:{flex:"none"},child
Line truncated
|
||||
Make sure to serve the website (${window.location}) via HTTPS or localhost.`);navigator.serviceWorker.register("sw.bundle.js"),navigator.serviceWorker.controller||await new Promise(r=>{navigator.serviceWorker.oncontrollerchange=()=>r()}),setInterval(function(){fetch("ping")},1e4)}Jt.createRoot(document.querySelector("#root")).render(o.jsx(ve,{}))})();
|
||||
+1
@@ -0,0 +1 @@
|
||||
.ui-mode-sidebar{background-color:var(--vscode-sideBar-background)}.ui-mode-sidebar>.settings-toolbar{border-top:1px solid var(--vscode-panel-border);cursor:pointer}.ui-mode-sidebar>.settings-view{margin:0 0 8px 23px}.ui-mode-sidebar input[type=search]{flex:auto}.ui-mode-sidebar .toolbar-button:not([disabled]) .codicon-play{color:var(--vscode-debugIcon-restartForeground)}.ui-mode-sidebar .toolbar-button:not([disabled]) .codicon-debug-stop{color:var(--vscode-debugIcon-stopForeground)}.ui-mode .section-title{display:flex;flex:auto;flex-direction:row;align-items:center;font-size:11px;text-transform:uppercase;font-weight:700;text-overflow:ellipsis;overflow:hidden;padding:8px;height:30px}.ui-mode-sidebar img{flex:none;margin-left:6px;width:24px;height:24px}.ui-mode .disconnected{display:flex;align-items:center;justify-content:center;flex:auto;flex-direction:column;background-color:var(--vscode-editor-background);position:absolute;top:0;right:0;bottom:0;left:0;z-index:1000;line-height:24px}.disconnected .title{font-size:24px;font-weight:700;margin-bottom:30px}.status-line{flex:auto;white-space:nowrap;line-height:22px;padding-left:10px;display:flex;flex-direction:row;align-items:center;height:30px}.status-line>div{overflow:hidden;text-overflow:ellipsis}.ui-mode-sidebar input[type=search]{flex:auto;padding:0 5px;line-height:24px;outline:none;margin:0 4px;border:none;color:var(--vscode-input-foreground);background-color:var(--vscode-input-background)}body{--vscode-font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif;--vscode-font-weight: normal;--vscode-font-size: 13px;--vscode-editor-font-family: "Droid Sans Mono", "monospace", monospace;--vscode-editor-font-weight: normal;--vscode-editor-font-size: 14px;--vscode-foreground: #616161;--vscode-disabledForeground: rgba(97, 97, 97, .5);--vscode-errorForeground: #a1260d;--vscode-descriptionForeground: #717171;--vscode-icon-foreground: #424242;--vscode-focusBorder: #0090f1;--vscode-textSeparator-foreground: rgba(0, 0, 0, .18);--vscode-textLink-foreground: #006ab1;--vscode-textLink-activeForeground: #006ab1;--vscode-textPreformat-foreground: #a31515;--vscode-textBlockQuote-background: rgba(127, 127, 127, .1);--vscode-textBlockQuote-border: rgba(0, 122, 204, .5);--vscode-textCodeBlock-background: rgba(220, 220, 220, .4);--vscode-widget-shadow: rgba(0, 0, 0, .16);--vscode-input-background: #ffffff;--vscode-input-foreground: #616161;--vscode-inputOption-activeBorder: #007acc;--vscode-inputOption-hoverBackground: rgba(184, 184, 184, .31);--vscode-inputOption-activeBackground: rgba(0, 144, 241, .2);--vscode-inputOption-activeForeground: #000000;--vscode-input-placeholderForeground: #767676;--vscode-inputValidation-infoBackground: #d6ecf2;--vscode-inputValidation-infoBorder: #007acc;--vscode-inputValidation-warningBackground: #f6f5d2;--vscode-inputValidation-warningBorder: #b89500;--vscode-inputValidation-errorBackground: #f2dede;--vscode-inputValidation-errorBorder: #be1100;--vscode-dropdown-background: #ffffff;--vscode-dropdown-border: #cecece;--vscode-checkbox-background: #ffffff;--vscode-checkbox-border: #cecece;--vscode-button-foreground: #ffffff;--vscode-button-separator: rgba(255, 255, 255, .4);--vscode-button-background: #007acc;--vscode-button-hoverBackground: #0062a3;--vscode-button-secondaryForeground: #ffffff;--vscode-button-secondaryBackground: #5f6a79;--vscode-button-secondaryHoverBackground: #4c5561;--vscode-badge-background: #c4c4c4;--vscode-badge-foreground: #333333;--vscode-scrollbar-shadow: #dddddd;--vscode-scrollbarSlider-background: rgba(100, 100, 100, .4);--vscode-scrollbarSlider-hoverBackground: rgba(100, 100, 100, .7);--vscode-scrollbarSlider-activeBackground: rgba(0, 0, 0, .6);--vscode-progressBar-background: #0e70c0;--vscode-editorError-foreground: #e51400;--vscode-editorWarning-foreground: #bf8803;--vscode-editorInfo-foreground: #1a85ff;--vscode-editorHint-foreground: #6c6c6c;--vscode-sash-hoverBorder: #0090f1;--vscode-editor-background: #ffffff;--vscode-editor-foreground: #000000;--vscode-editorStickyScroll-background: #ffffff;--vscode-editorStickyScrollHover-background: #f0f0f0;--vscode-editorWidget-background: #f3f3f3;--vscode-editorWidget-foreground: #616161;--vscode-editorWidget-border: #c8c8c8;--vscode-quickInput-background: #f3f3f3;--vscode-quickInput-foreground: #616161;--vscode-quickInputTitle-background: rgba(0, 0, 0, .06);--vscode-pickerGroup-foreground: #0066bf;--vscode-pickerGroup-border: #cccedb;--vscode-keybindingLabel-background: rgba(221, 221, 221, .4);--vscode-keybindingLabel-foreground: #555555;--vscode-keybindingLabel-border: rgba(204, 204, 204, .4);--vscode-keybindingLabel-bottomBorder: rgba(187, 187, 187, .4);--vscode-editor-selectionBackground: #add6ff;--vscode-editor-inactiveSelectionBackground: #e5ebf1;--vscode-editor-selectionHighlightBackground: rgba(173, 214, 255, .5);--vscode-editor-findMatchBackground: #a8ac94;--vscode-editor-findMatchHighlightBackground: rgba(234, 92, 0, .33);--vscode-editor-findRangeHighlightBackLine truncated
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" translate="no">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="icon" href="./playwright-logo.svg" type="image/svg+xml">
|
||||
<title>Playwright Test</title>
|
||||
<script type="module" crossorigin src="./uiMode.9zHYMU6d.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="./assets/defaultSettingsView-Do_wwdKw.js">
|
||||
<link rel="stylesheet" crossorigin href="./defaultSettingsView.DVJHpiGt.css">
|
||||
<link rel="stylesheet" crossorigin href="./uiMode.BatfzHMG.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
</body>
|
||||
</html>
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* Copyright (c) 2014 The xterm.js authors. All rights reserved.
|
||||
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
||||
* https://github.com/chjj/term.js
|
||||
* @license MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*
|
||||
* Originally forked from (with the author's permission):
|
||||
* Fabrice Bellard's javascript vt100 for jslinux:
|
||||
* http://bellard.org/jslinux/
|
||||
* Copyright (c) 2011 Fabrice Bellard
|
||||
* The original design remains. The terminal itself
|
||||
* has been extended to include xterm CSI codes, among
|
||||
* other features.
|
||||
*/.xterm{cursor:text;position:relative;user-select:none;-ms-user-select:none;-webkit-user-select:none}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{position:absolute;top:0;z-index:5}.xterm .xterm-helper-textarea{padding:0;border:0;margin:0;position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-5;white-space:nowrap;overflow:hidden;resize:none}.xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{background-color:#000;overflow-y:scroll;cursor:default;position:absolute;right:0;left:0;top:0;bottom:0}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;left:0;top:0}.xterm .xterm-scroll-area{visibility:hidden}.xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;top:0;left:-9999em;line-height:normal}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility,.xterm .xterm-message{position:absolute;left:0;top:0;bottom:0;right:0;z-index:10;color:transparent;pointer-events:none}.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{text-decoration:double underline}.xterm-underline-3{text-decoration:wavy underline}.xterm-underline-4{text-decoration:dotted underline}.xterm-underline-5{text-decoration:dashed underline}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:overline underline}.xterm-overline.xterm-underline-2{text-decoration:overline double underline}.xterm-overline.xterm-underline-3{text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;position:absolute;top:0;right:0;pointer-events:none}.xterm-decoration-top{z-index:2;position:relative}
|
||||
Reference in new issue
Block a user